Files
MLPproject/.venv/lib/python3.12/site-packages/plotly/package_data/widgetbundle.js
2025-10-23 15:44:32 +02:00

3910 lines
4.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var tX=Object.create;var HC=Object.defineProperty;var rX=Object.getOwnPropertyDescriptor;var aX=Object.getOwnPropertyNames;var iX=Object.getPrototypeOf,nX=Object.prototype.hasOwnProperty;var oX=(se,ge)=>()=>(ge||se((ge={exports:{}}).exports,ge),ge.exports);var sX=(se,ge,Ye,Pt)=>{if(ge&&typeof ge=="object"||typeof ge=="function")for(let vr of aX(ge))!nX.call(se,vr)&&vr!==Ye&&HC(se,vr,{get:()=>ge[vr],enumerable:!(Pt=rX(ge,vr))||Pt.enumerable});return se};var lX=(se,ge,Ye)=>(Ye=se!=null?tX(iX(se)):{},sX(ge||!se||!se.__esModule?HC(Ye,"default",{value:se,enumerable:!0}):Ye,se));var r7=oX((t7,u2)=>{(function(se,ge){typeof u2=="object"&&u2.exports?u2.exports=ge():se.moduleName=ge()})(typeof self<"u"?self:t7,()=>{"use strict";var se=(()=>{var ge=Object.create,Ye=Object.defineProperty,Pt=Object.defineProperties,vr=Object.getOwnPropertyDescriptor,Zr=Object.getOwnPropertyDescriptors,ka=Object.getOwnPropertyNames,oi=Object.getOwnPropertySymbols,ci=Object.getPrototypeOf,Ln=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Fn=(Z,q,d)=>q in Z?Ye(Z,q,{enumerable:!0,configurable:!0,writable:!0,value:d}):Z[q]=d,Uo=(Z,q)=>{for(var d in q||(q={}))Ln.call(q,d)&&Fn(Z,d,q[d]);if(oi)for(var d of oi(q))bn.call(q,d)&&Fn(Z,d,q[d]);return Z},ws=(Z,q)=>Pt(Z,Zr(q)),wo=(Z,q)=>function(){return Z&&(q=(0,Z[ka(Z)[0]])(Z=0)),q},Ze=(Z,q)=>function(){return q||(0,Z[ka(Z)[0]])((q={exports:{}}).exports,q),q.exports},Ws=(Z,q)=>{for(var d in q)Ye(Z,d,{get:q[d],enumerable:!0})},Yl=(Z,q,d,x)=>{if(q&&typeof q=="object"||typeof q=="function")for(let A of ka(q))!Ln.call(Z,A)&&A!==d&&Ye(Z,A,{get:()=>q[A],enumerable:!(x=vr(q,A))||x.enumerable});return Z},cu=(Z,q,d)=>(d=Z!=null?ge(ci(Z)):{},Yl(q||!Z||!Z.__esModule?Ye(d,"default",{value:Z,enumerable:!0}):d,Z)),nh=Z=>Yl(Ye({},"__esModule",{value:!0}),Z),Eh=Ze({"src/version.js"(Z){"use strict";Z.version="3.1.1"}}),Up=Ze({"node_modules/native-promise-only/lib/npo.src.js"(Z,q){(function(x,A,M){A[x]=A[x]||M(),typeof q<"u"&&q.exports&&(q.exports=A[x])})("Promise",typeof window<"u"?window:Z,function(){"use strict";var x,A,M,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(_,w,S,E){return Object.defineProperty(_,w,{value:S,writable:!0,configurable:E!==!1})}}catch{x=function(w,S,E){return w[S]=E,w}}M=function(){var _,w,S;function E(y,b){this.fn=y,this.self=b,this.next=void 0}return{add:function(b,p){S=new E(b,p),w?w.next=S:_=S,w=S,S=void 0},drain:function(){var b=_;for(_=w=A=void 0;b;)b.fn.call(b.self),b=b.next}}}();function r(l,_){M.add(l,_),A||(A=t(M.drain))}function o(l){var _,w=typeof l;return l!=null&&(w=="object"||w=="function")&&(_=l.then),typeof _=="function"?_:!1}function a(){for(var l=0;l<this.chain.length;l++)i(this,this.state===1?this.chain[l].success:this.chain[l].failure,this.chain[l]);this.chain.length=0}function i(l,_,w){var S,E;try{_===!1?w.reject(l.msg):(_===!0?S=l.msg:S=_.call(void 0,l.msg),S===w.promise?w.reject(TypeError("Promise-chain cycle")):(E=o(S))?E.call(S,w.resolve,w.reject):w.resolve(S))}catch(y){w.reject(y)}}function n(l){var _,w=this;if(!w.triggered){w.triggered=!0,w.def&&(w=w.def);try{(_=o(l))?r(function(){var S=new f(w);try{_.call(l,function(){n.apply(S,arguments)},function(){s.apply(S,arguments)})}catch(E){s.call(S,E)}}):(w.msg=l,w.state=1,w.chain.length>0&&r(a,w))}catch(S){s.call(new f(w),S)}}}function s(l){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=l,_.state=2,_.chain.length>0&&r(a,_))}function c(l,_,w,S){for(var E=0;E<_.length;E++)(function(b){l.resolve(_[b]).then(function(u){w(b,u)},S)})(E)}function f(l){this.def=l,this.triggered=!1}function g(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function v(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new g(this);this.then=function(S,E){var y={success:typeof S=="function"?S:!0,failure:typeof E=="function"?E:!1};return y.promise=new this.constructor(function(p,u){if(typeof p!="function"||typeof u!="function")throw TypeError("Not a function");y.resolve=p,y.reject=u}),_.chain.push(y),_.state!==0&&r(a,_),y.promise},this.catch=function(S){return this.then(void 0,S)};try{l.call(void 0,function(S){n.call(_,S)},function(S){s.call(_,S)})}catch(w){s.call(_,w)}}var T=x({},"constructor",v,!1);return v.prototype=T,x(T,"__NPO__",0,!1),x(v,"resolve",function(_){var w=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new w(function(E,y){if(typeof E!="function"||typeof y!="function")throw TypeError("Not a function");E(_)})}),x(v,"reject",function(_){return new this(function(S,E){if(typeof S!="function"||typeof E!="function")throw TypeError("Not a function");E(_)})}),x(v,"all",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):_.length===0?w.resolve([]):new w(function(E,y){if(typeof E!="function"||typeof y!="function")throw TypeError("Not a function");var b=_.length,p=Array(b),u=0;c(w,_,function(h,P){p[h]=P,++u===b&&E(p)},y)})}),x(v,"race",function(_){var w=this;return e.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):new w(function(E,y){if(typeof E!="function"||typeof y!="function")throw TypeError("Not a function");c(w,_,function(p,u){E(u)},y)})}),v})}}),On=Ze({"node_modules/@plotly/d3/d3.js"(Z,q){(function(){var d={version:"3.8.2"},x=[].slice,A=function(de){return x.call(de)},M=self.document;function e(de){return de&&(de.ownerDocument||de.document||de).documentElement}function t(de){return de&&(de.ownerDocument&&de.ownerDocument.defaultView||de.document&&de||de.defaultView)}if(M)try{A(M.documentElement.childNodes)[0].nodeType}catch{A=function(De){for(var et=De.length,vt=new Array(et);et--;)vt[et]=De[et];return vt}}if(Date.now||(Date.now=function(){return+new Date}),M)try{M.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,o=r.setAttribute,a=r.setAttributeNS,i=this.CSSStyleDeclaration.prototype,n=i.setProperty;r.setAttribute=function(De,et){o.call(this,De,et+"")},r.setAttributeNS=function(De,et,vt){a.call(this,De,et,vt+"")},i.setProperty=function(De,et,vt){n.call(this,De,et+"",vt)}}d.ascending=s;function s(de,De){return de<De?-1:de>De?1:de>=De?0:NaN}d.descending=function(de,De){return De<de?-1:De>de?1:De>=de?0:NaN},d.min=function(de,De){var et=-1,vt=de.length,_t,St;if(arguments.length===1){for(;++et<vt;)if((St=de[et])!=null&&St>=St){_t=St;break}for(;++et<vt;)(St=de[et])!=null&&_t>St&&(_t=St)}else{for(;++et<vt;)if((St=De.call(de,de[et],et))!=null&&St>=St){_t=St;break}for(;++et<vt;)(St=De.call(de,de[et],et))!=null&&_t>St&&(_t=St)}return _t},d.max=function(de,De){var et=-1,vt=de.length,_t,St;if(arguments.length===1){for(;++et<vt;)if((St=de[et])!=null&&St>=St){_t=St;break}for(;++et<vt;)(St=de[et])!=null&&St>_t&&(_t=St)}else{for(;++et<vt;)if((St=De.call(de,de[et],et))!=null&&St>=St){_t=St;break}for(;++et<vt;)(St=De.call(de,de[et],et))!=null&&St>_t&&(_t=St)}return _t},d.extent=function(de,De){var et=-1,vt=de.length,_t,St,ar;if(arguments.length===1){for(;++et<vt;)if((St=de[et])!=null&&St>=St){_t=ar=St;break}for(;++et<vt;)(St=de[et])!=null&&(_t>St&&(_t=St),ar<St&&(ar=St))}else{for(;++et<vt;)if((St=De.call(de,de[et],et))!=null&&St>=St){_t=ar=St;break}for(;++et<vt;)(St=De.call(de,de[et],et))!=null&&(_t>St&&(_t=St),ar<St&&(ar=St))}return[_t,ar]};function c(de){return de===null?NaN:+de}function f(de){return!isNaN(de)}d.sum=function(de,De){var et=0,vt=de.length,_t,St=-1;if(arguments.length===1)for(;++St<vt;)f(_t=+de[St])&&(et+=_t);else for(;++St<vt;)f(_t=+De.call(de,de[St],St))&&(et+=_t);return et},d.mean=function(de,De){var et=0,vt=de.length,_t,St=-1,ar=vt;if(arguments.length===1)for(;++St<vt;)f(_t=c(de[St]))?et+=_t:--ar;else for(;++St<vt;)f(_t=c(De.call(de,de[St],St)))?et+=_t:--ar;if(ar)return et/ar},d.quantile=function(de,De){var et=(de.length-1)*De+1,vt=Math.floor(et),_t=+de[vt-1],St=et-vt;return St?_t+St*(de[vt]-_t):_t},d.median=function(de,De){var et=[],vt=de.length,_t,St=-1;if(arguments.length===1)for(;++St<vt;)f(_t=c(de[St]))&&et.push(_t);else for(;++St<vt;)f(_t=c(De.call(de,de[St],St)))&&et.push(_t);if(et.length)return d.quantile(et.sort(s),.5)},d.variance=function(de,De){var et=de.length,vt=0,_t,St,ar=0,zt=-1,gr=0;if(arguments.length===1)for(;++zt<et;)f(_t=c(de[zt]))&&(St=_t-vt,vt+=St/++gr,ar+=St*(_t-vt));else for(;++zt<et;)f(_t=c(De.call(de,de[zt],zt)))&&(St=_t-vt,vt+=St/++gr,ar+=St*(_t-vt));if(gr>1)return ar/(gr-1)},d.deviation=function(){var de=d.variance.apply(this,arguments);return de&&Math.sqrt(de)};function g(de){return{left:function(De,et,vt,_t){for(arguments.length<3&&(vt=0),arguments.length<4&&(_t=De.length);vt<_t;){var St=vt+_t>>>1;de(De[St],et)<0?vt=St+1:_t=St}return vt},right:function(De,et,vt,_t){for(arguments.length<3&&(vt=0),arguments.length<4&&(_t=De.length);vt<_t;){var St=vt+_t>>>1;de(De[St],et)>0?_t=St:vt=St+1}return vt}}}var v=g(s);d.bisectLeft=v.left,d.bisect=d.bisectRight=v.right,d.bisector=function(de){return g(de.length===1?function(De,et){return s(de(De),et)}:de)},d.shuffle=function(de,De,et){(vt=arguments.length)<3&&(et=de.length,vt<2&&(De=0));for(var vt=et-De,_t,St;vt;)St=Math.random()*vt--|0,_t=de[vt+De],de[vt+De]=de[St+De],de[St+De]=_t;return de},d.permute=function(de,De){for(var et=De.length,vt=new Array(et);et--;)vt[et]=de[De[et]];return vt},d.pairs=function(de){for(var De=0,et=de.length-1,vt,_t=de[0],St=new Array(et<0?0:et);De<et;)St[De]=[vt=_t,_t=de[++De]];return St},d.transpose=function(de){if(!(St=de.length))return[];for(var De=-1,et=d.min(de,T),vt=new Array(et);++De<et;)for(var _t=-1,St,ar=vt[De]=new Array(St);++_t<St;)ar[_t]=de[_t][De];return vt};function T(de){return de.length}d.zip=function(){return d.transpose(arguments)},d.keys=function(de){var De=[];for(var et in de)De.push(et);return De},d.values=function(de){var De=[];for(var et in de)De.push(de[et]);return De},d.entries=function(de){var De=[];for(var et in de)De.push({key:et,value:de[et]});return De},d.merge=function(de){for(var De=de.length,et,vt=-1,_t=0,St,ar;++vt<De;)_t+=de[vt].length;for(St=new Array(_t);--De>=0;)for(ar=de[De],et=ar.length;--et>=0;)St[--_t]=ar[et];return St};var l=Math.abs;d.range=function(de,De,et){if(arguments.length<3&&(et=1,arguments.length<2&&(De=de,de=0)),(De-de)/et===1/0)throw new Error("infinite range");var vt=[],_t=_(l(et)),St=-1,ar;if(de*=_t,De*=_t,et*=_t,et<0)for(;(ar=de+et*++St)>De;)vt.push(ar/_t);else for(;(ar=de+et*++St)<De;)vt.push(ar/_t);return vt};function _(de){for(var De=1;de*De%1;)De*=10;return De}function w(de,De){for(var et in De)Object.defineProperty(de.prototype,et,{value:De[et],enumerable:!1})}d.map=function(de,De){var et=new S;if(de instanceof S)de.forEach(function(zt,gr){et.set(zt,gr)});else if(Array.isArray(de)){var vt=-1,_t=de.length,St;if(arguments.length===1)for(;++vt<_t;)et.set(vt,de[vt]);else for(;++vt<_t;)et.set(De.call(de,St=de[vt],vt),St)}else for(var ar in de)et.set(ar,de[ar]);return et};function S(){this._=Object.create(null)}var E="__proto__",y="\0";w(S,{has:u,get:function(de){return this._[b(de)]},set:function(de,De){return this._[b(de)]=De},remove:m,keys:h,values:function(){var de=[];for(var De in this._)de.push(this._[De]);return de},entries:function(){var de=[];for(var De in this._)de.push({key:p(De),value:this._[De]});return de},size:P,empty:L,forEach:function(de){for(var De in this._)de.call(this,p(De),this._[De])}});function b(de){return(de+="")===E||de[0]===y?y+de:de}function p(de){return(de+="")[0]===y?de.slice(1):de}function u(de){return b(de)in this._}function m(de){return(de=b(de))in this._&&delete this._[de]}function h(){var de=[];for(var De in this._)de.push(p(De));return de}function P(){var de=0;for(var De in this._)++de;return de}function L(){for(var de in this._)return!1;return!0}d.nest=function(){var de={},De=[],et=[],vt,_t;function St(zt,gr,Vr){if(Vr>=De.length)return _t?_t.call(de,gr):vt?gr.sort(vt):gr;for(var Wr=-1,Ta=gr.length,ya=De[Vr++],ri,ni,Ma,Na=new S,Ka;++Wr<Ta;)(Ka=Na.get(ri=ya(ni=gr[Wr])))?Ka.push(ni):Na.set(ri,[ni]);return zt?(ni=zt(),Ma=function(vi,ui){ni.set(vi,St(zt,ui,Vr))}):(ni={},Ma=function(vi,ui){ni[vi]=St(zt,ui,Vr)}),Na.forEach(Ma),ni}function ar(zt,gr){if(gr>=De.length)return zt;var Vr=[],Wr=et[gr++];return zt.forEach(function(Ta,ya){Vr.push({key:Ta,values:ar(ya,gr)})}),Wr?Vr.sort(function(Ta,ya){return Wr(Ta.key,ya.key)}):Vr}return de.map=function(zt,gr){return St(gr,zt,0)},de.entries=function(zt){return ar(St(d.map,zt,0),0)},de.key=function(zt){return De.push(zt),de},de.sortKeys=function(zt){return et[De.length-1]=zt,de},de.sortValues=function(zt){return vt=zt,de},de.rollup=function(zt){return _t=zt,de},de},d.set=function(de){var De=new z;if(de)for(var et=0,vt=de.length;et<vt;++et)De.add(de[et]);return De};function z(){this._=Object.create(null)}w(z,{has:u,add:function(de){return this._[b(de+="")]=!0,de},remove:m,values:h,size:P,empty:L,forEach:function(de){for(var De in this._)de.call(this,p(De))}}),d.behavior={};function F(de){return de}d.rebind=function(de,De){for(var et=1,vt=arguments.length,_t;++et<vt;)de[_t=arguments[et]]=B(de,De,De[_t]);return de};function B(de,De,et){return function(){var vt=et.apply(De,arguments);return vt===De?de:vt}}function O(de,De){if(De in de)return De;De=De.charAt(0).toUpperCase()+De.slice(1);for(var et=0,vt=I.length;et<vt;++et){var _t=I[et]+De;if(_t in de)return _t}}var I=["webkit","ms","moz","Moz","o","O"];function N(){}d.dispatch=function(){for(var de=new U,De=-1,et=arguments.length;++De<et;)de[arguments[De]]=W(de);return de};function U(){}U.prototype.on=function(de,De){var et=de.indexOf("."),vt="";if(et>=0&&(vt=de.slice(et+1),de=de.slice(0,et)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,De);if(arguments.length===2){if(De==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function W(de){var De=[],et=new S;function vt(){for(var _t=De,St=-1,ar=_t.length,zt;++St<ar;)(zt=_t[St].on)&&zt.apply(this,arguments);return de}return vt.on=function(_t,St){var ar=et.get(_t),zt;return arguments.length<2?ar&&ar.on:(ar&&(ar.on=null,De=De.slice(0,zt=De.indexOf(ar)).concat(De.slice(zt+1)),et.remove(_t)),St&&De.push(et.set(_t,{on:St})),de)},vt}d.event=null;function Q(){d.event.preventDefault()}function ue(){for(var de=d.event,De;De=de.sourceEvent;)de=De;return de}function le(de){for(var De=new U,et=0,vt=arguments.length;++et<vt;)De[arguments[et]]=W(De);return De.of=function(_t,St){return function(ar){try{var zt=ar.sourceEvent=d.event;ar.target=de,d.event=ar,De[ar.type].apply(_t,St)}finally{d.event=zt}}},De}d.requote=function(de){return de.replace(he,"\\$&")};var he=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(de,De){de.__proto__=De}:function(de,De){for(var et in De)de[et]=De[et]};function $(de){return G(de,ie),de}var J=function(de,De){return De.querySelector(de)},X=function(de,De){return De.querySelectorAll(de)},oe=function(de,De){var et=de.matches||de[O(de,"matchesSelector")];return oe=function(vt,_t){return et.call(vt,_t)},oe(de,De)};typeof Sizzle=="function"&&(J=function(de,De){return Sizzle(de,De)[0]||null},X=Sizzle,oe=Sizzle.matchesSelector),d.selection=function(){return d.select(M.documentElement)};var ie=d.selection.prototype=[];ie.select=function(de){var De=[],et,vt,_t,St;de=j(de);for(var ar=-1,zt=this.length;++ar<zt;){De.push(et=[]),et.parentNode=(_t=this[ar]).parentNode;for(var gr=-1,Vr=_t.length;++gr<Vr;)(St=_t[gr])?(et.push(vt=de.call(St,St.__data__,gr,ar)),vt&&"__data__"in St&&(vt.__data__=St.__data__)):et.push(null)}return $(De)};function j(de){return typeof de=="function"?de:function(){return J(de,this)}}ie.selectAll=function(de){var De=[],et,vt;de=ee(de);for(var _t=-1,St=this.length;++_t<St;)for(var ar=this[_t],zt=-1,gr=ar.length;++zt<gr;)(vt=ar[zt])&&(De.push(et=A(de.call(vt,vt.__data__,zt,_t))),et.parentNode=vt);return $(De)};function ee(de){return typeof de=="function"?de:function(){return X(de,this)}}var re="http://www.w3.org/1999/xhtml",ce={svg:"http://www.w3.org/2000/svg",xhtml:re,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d.ns={prefix:ce,qualify:function(de){var De=de.indexOf(":"),et=de;return De>=0&&(et=de.slice(0,De))!=="xmlns"&&(de=de.slice(De+1)),ce.hasOwnProperty(et)?{space:ce[et],local:de}:de}},ie.attr=function(de,De){if(arguments.length<2){if(typeof de=="string"){var et=this.node();return de=d.ns.qualify(de),de.local?et.getAttributeNS(de.space,de.local):et.getAttribute(de)}for(De in de)this.each(be(De,de[De]));return this}return this.each(be(de,De))};function be(de,De){de=d.ns.qualify(de);function et(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function _t(){this.setAttribute(de,De)}function St(){this.setAttributeNS(de.space,de.local,De)}function ar(){var gr=De.apply(this,arguments);gr==null?this.removeAttribute(de):this.setAttribute(de,gr)}function zt(){var gr=De.apply(this,arguments);gr==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,gr)}return De==null?de.local?vt:et:typeof De=="function"?de.local?zt:ar:de.local?St:_t}function Ae(de){return de.trim().replace(/\s+/g," ")}ie.classed=function(de,De){if(arguments.length<2){if(typeof de=="string"){var et=this.node(),vt=(de=Re(de)).length,_t=-1;if(De=et.classList){for(;++_t<vt;)if(!De.contains(de[_t]))return!1}else for(De=et.getAttribute("class");++_t<vt;)if(!ze(de[_t]).test(De))return!1;return!0}for(De in de)this.each(Xe(De,de[De]));return this}return this.each(Xe(de,De))};function ze(de){return new RegExp("(?:^|\\s+)"+d.requote(de)+"(?:\\s+|$)","g")}function Re(de){return(de+"").trim().split(/^|\s+/)}function Xe(de,De){de=Re(de).map(it);var et=de.length;function vt(){for(var St=-1;++St<et;)de[St](this,De)}function _t(){for(var St=-1,ar=De.apply(this,arguments);++St<et;)de[St](this,ar)}return typeof De=="function"?_t:vt}function it(de){var De=ze(de);return function(et,vt){if(_t=et.classList)return vt?_t.add(de):_t.remove(de);var _t=et.getAttribute("class")||"";vt?(De.lastIndex=0,De.test(_t)||et.setAttribute("class",Ae(_t+" "+de))):et.setAttribute("class",Ae(_t.replace(De," ")))}}ie.style=function(de,De,et){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(De="");for(et in de)this.each(ot(et,de[et],De));return this}if(vt<2){var _t=this.node();return t(_t).getComputedStyle(_t,null).getPropertyValue(de)}et=""}return this.each(ot(de,De,et))};function ot(de,De,et){function vt(){this.style.removeProperty(de)}function _t(){this.style.setProperty(de,De,et)}function St(){var ar=De.apply(this,arguments);ar==null?this.style.removeProperty(de):this.style.setProperty(de,ar,et)}return De==null?vt:typeof De=="function"?St:_t}ie.property=function(de,De){if(arguments.length<2){if(typeof de=="string")return this.node()[de];for(De in de)this.each(tt(De,de[De]));return this}return this.each(tt(de,De))};function tt(de,De){function et(){delete this[de]}function vt(){this[de]=De}function _t(){var St=De.apply(this,arguments);St==null?delete this[de]:this[de]=St}return De==null?et:typeof De=="function"?_t:vt}ie.text=function(de){return arguments.length?this.each(typeof de=="function"?function(){var De=de.apply(this,arguments);this.textContent=De??""}:de==null?function(){this.textContent=""}:function(){this.textContent=de}):this.node().textContent},ie.html=function(de){return arguments.length?this.each(typeof de=="function"?function(){var De=de.apply(this,arguments);this.innerHTML=De??""}:de==null?function(){this.innerHTML=""}:function(){this.innerHTML=de}):this.node().innerHTML},ie.append=function(de){return de=lt(de),this.select(function(){return this.appendChild(de.apply(this,arguments))})};function lt(de){function De(){var vt=this.ownerDocument,_t=this.namespaceURI;return _t===re&&vt.documentElement.namespaceURI===re?vt.createElement(de):vt.createElementNS(_t,de)}function et(){return this.ownerDocument.createElementNS(de.space,de.local)}return typeof de=="function"?de:(de=d.ns.qualify(de)).local?et:De}ie.insert=function(de,De){return de=lt(de),De=j(De),this.select(function(){return this.insertBefore(de.apply(this,arguments),De.apply(this,arguments)||null)})},ie.remove=function(){return this.each(Ee)};function Ee(){var de=this.parentNode;de&&de.removeChild(this)}ie.data=function(de,De){var et=-1,vt=this.length,_t,St;if(!arguments.length){for(de=new Array(vt=(_t=this[0]).length);++et<vt;)(St=_t[et])&&(de[et]=St.__data__);return de}function ar(Wr,Ta){var ya,ri=Wr.length,ni=Ta.length,Ma=Math.min(ri,ni),Na=new Array(ni),Ka=new Array(ni),vi=new Array(ri),ui,Pa;if(De){var sn=new S,an=new Array(ri),vn;for(ya=-1;++ya<ri;)(ui=Wr[ya])&&(sn.has(vn=De.call(ui,ui.__data__,ya))?vi[ya]=ui:sn.set(vn,ui),an[ya]=vn);for(ya=-1;++ya<ni;)(ui=sn.get(vn=De.call(Ta,Pa=Ta[ya],ya)))?ui!==!0&&(Na[ya]=ui,ui.__data__=Pa):Ka[ya]=_e(Pa),sn.set(vn,!0);for(ya=-1;++ya<ri;)ya in an&&sn.get(an[ya])!==!0&&(vi[ya]=Wr[ya])}else{for(ya=-1;++ya<Ma;)ui=Wr[ya],Pa=Ta[ya],ui?(ui.__data__=Pa,Na[ya]=ui):Ka[ya]=_e(Pa);for(;ya<ni;++ya)Ka[ya]=_e(Ta[ya]);for(;ya<ri;++ya)vi[ya]=Wr[ya]}Ka.update=Na,Ka.parentNode=Na.parentNode=vi.parentNode=Wr.parentNode,zt.push(Ka),gr.push(Na),Vr.push(vi)}var zt=st([]),gr=$([]),Vr=$([]);if(typeof de=="function")for(;++et<vt;)ar(_t=this[et],de.call(_t,_t.parentNode.__data__,et));else for(;++et<vt;)ar(_t=this[et],de);return gr.enter=function(){return zt},gr.exit=function(){return Vr},gr};function _e(de){return{__data__:de}}ie.datum=function(de){return arguments.length?this.property("__data__",de):this.property("__data__")},ie.filter=function(de){var De=[],et,vt,_t;typeof de!="function"&&(de=fe(de));for(var St=0,ar=this.length;St<ar;St++){De.push(et=[]),et.parentNode=(vt=this[St]).parentNode;for(var zt=0,gr=vt.length;zt<gr;zt++)(_t=vt[zt])&&de.call(_t,_t.__data__,zt,St)&&et.push(_t)}return $(De)};function fe(de){return function(){return oe(this,de)}}ie.order=function(){for(var de=-1,De=this.length;++de<De;)for(var et=this[de],vt=et.length-1,_t=et[vt],St;--vt>=0;)(St=et[vt])&&(_t&&_t!==St.nextSibling&&_t.parentNode.insertBefore(St,_t),_t=St);return this},ie.sort=function(de){de=Fe.apply(this,arguments);for(var De=-1,et=this.length;++De<et;)this[De].sort(de);return this.order()};function Fe(de){return arguments.length||(de=s),function(De,et){return De&&et?de(De.__data__,et.__data__):!De-!et}}ie.each=function(de){return rt(this,function(De,et,vt){de.call(De,De.__data__,et,vt)})};function rt(de,De){for(var et=0,vt=de.length;et<vt;et++)for(var _t=de[et],St=0,ar=_t.length,zt;St<ar;St++)(zt=_t[St])&&De(zt,St,et);return de}ie.call=function(de){var De=A(arguments);return de.apply(De[0]=this,De),this},ie.empty=function(){return!this.node()},ie.node=function(){for(var de=0,De=this.length;de<De;de++)for(var et=this[de],vt=0,_t=et.length;vt<_t;vt++){var St=et[vt];if(St)return St}return null},ie.size=function(){var de=0;return rt(this,function(){++de}),de};function st(de){return G(de,Qe),de}var Qe=[];d.selection.enter=st,d.selection.enter.prototype=Qe,Qe.append=ie.append,Qe.empty=ie.empty,Qe.node=ie.node,Qe.call=ie.call,Qe.size=ie.size,Qe.select=function(de){for(var De=[],et,vt,_t,St,ar,zt=-1,gr=this.length;++zt<gr;){_t=(St=this[zt]).update,De.push(et=[]),et.parentNode=St.parentNode;for(var Vr=-1,Wr=St.length;++Vr<Wr;)(ar=St[Vr])?(et.push(_t[Vr]=vt=de.call(St.parentNode,ar.__data__,Vr,zt)),vt.__data__=ar.__data__):et.push(null)}return $(De)},Qe.insert=function(de,De){return arguments.length<2&&(De=Lt(this)),ie.insert.call(this,de,De)};function Lt(de){var De,et;return function(vt,_t,St){var ar=de[St].update,zt=ar.length,gr;for(St!=et&&(et=St,De=0),_t>=De&&(De=_t+1);!(gr=ar[De])&&++De<zt;);return gr}}d.select=function(de){var De;return typeof de=="string"?(De=[J(de,M)],De.parentNode=M.documentElement):(De=[de],De.parentNode=e(de)),$([De])},d.selectAll=function(de){var De;return typeof de=="string"?(De=A(X(de,M)),De.parentNode=M.documentElement):(De=A(de),De.parentNode=null),$([De])},ie.on=function(de,De,et){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(De=!1);for(et in de)this.each(kt(et,de[et],De));return this}if(vt<2)return(vt=this.node()["__on"+de])&&vt._;et=!1}return this.each(kt(de,De,et))};function kt(de,De,et){var vt="__on"+de,_t=de.indexOf("."),St=Zt;_t>0&&(de=de.slice(0,_t));var ar=Vt.get(de);ar&&(de=ar,St=Sr);function zt(){var Wr=this[vt];Wr&&(this.removeEventListener(de,Wr,Wr.$),delete this[vt])}function gr(){var Wr=St(De,A(arguments));zt.call(this),this.addEventListener(de,this[vt]=Wr,Wr.$=et),Wr._=De}function Vr(){var Wr=new RegExp("^__on([^.]+)"+d.requote(de)+"$"),Ta;for(var ya in this)if(Ta=ya.match(Wr)){var ri=this[ya];this.removeEventListener(Ta[1],ri,ri.$),delete this[ya]}}return _t?De?gr:zt:De?N:Vr}var Vt=d.map({mouseenter:"mouseover",mouseleave:"mouseout"});M&&Vt.forEach(function(de){"on"+de in M&&Vt.remove(de)});function Zt(de,De){return function(et){var vt=d.event;d.event=et,De[0]=this.__data__;try{de.apply(this,De)}finally{d.event=vt}}}function Sr(de,De){var et=Zt(de,De);return function(vt){var _t=this,St=vt.relatedTarget;(!St||St!==_t&&!(St.compareDocumentPosition(_t)&8))&&et.call(_t,vt)}}var xr,jr=0;function wr(de){var De=".dragsuppress-"+ ++jr,et="click"+De,vt=d.select(t(de)).on("touchmove"+De,Q).on("dragstart"+De,Q).on("selectstart"+De,Q);if(xr==null&&(xr="onselectstart"in de?!1:O(de.style,"userSelect")),xr){var _t=e(de).style,St=_t[xr];_t[xr]="none"}return function(ar){if(vt.on(De,null),xr&&(_t[xr]=St),ar){var zt=function(){vt.on(et,null)};vt.on(et,function(){Q(),zt()},!0),setTimeout(zt,0)}}}d.mouse=function(de){return bt(de,ue())};var Ir=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function bt(de,De){De.changedTouches&&(De=De.changedTouches[0]);var et=de.ownerSVGElement||de;if(et.createSVGPoint){var vt=et.createSVGPoint();if(Ir<0){var _t=t(de);if(_t.scrollX||_t.scrollY){et=d.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var St=et[0][0].getScreenCTM();Ir=!(St.f||St.e),et.remove()}}return Ir?(vt.x=De.pageX,vt.y=De.pageY):(vt.x=De.clientX,vt.y=De.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var ar=de.getBoundingClientRect();return[De.clientX-ar.left-de.clientLeft,De.clientY-ar.top-de.clientTop]}d.touch=function(de,De,et){if(arguments.length<3&&(et=De,De=ue().changedTouches),De){for(var vt=0,_t=De.length,St;vt<_t;++vt)if((St=De[vt]).identifier===et)return bt(de,St)}},d.behavior.drag=function(){var de=le(_t,"drag","dragstart","dragend"),De=null,et=St(N,d.mouse,t,"mousemove","mouseup"),vt=St(Be,d.touch,F,"touchmove","touchend");function _t(){this.on("mousedown.drag",et).on("touchstart.drag",vt)}function St(ar,zt,gr,Vr,Wr){return function(){var Ta=this,ya=d.event.target.correspondingElement||d.event.target,ri=Ta.parentNode,ni=de.of(Ta,arguments),Ma=0,Na=ar(),Ka=".drag"+(Na==null?"":"-"+Na),vi,ui=d.select(gr(ya)).on(Vr+Ka,an).on(Wr+Ka,vn),Pa=wr(ya),sn=zt(ri,Na);De?(vi=De.apply(Ta,arguments),vi=[vi.x-sn[0],vi.y-sn[1]]):vi=[0,0],ni({type:"dragstart"});function an(){var Pn=zt(ri,Na),Zn,eo;Pn&&(Zn=Pn[0]-sn[0],eo=Pn[1]-sn[1],Ma|=Zn|eo,sn=Pn,ni({type:"drag",x:Pn[0]+vi[0],y:Pn[1]+vi[1],dx:Zn,dy:eo}))}function vn(){zt(ri,Na)&&(ui.on(Vr+Ka,null).on(Wr+Ka,null),Pa(Ma),ni({type:"dragend"}))}}}return _t.origin=function(ar){return arguments.length?(De=ar,_t):De},d.rebind(_t,de,"on")};function Be(){return d.event.changedTouches[0].identifier}d.touches=function(de,De){return arguments.length<2&&(De=ue().touches),De?A(De).map(function(et){var vt=bt(de,et);return vt.identifier=et.identifier,vt}):[]};var Ke=1e-6,Ue=Ke*Ke,Me=Math.PI,qe=2*Me,Ce=qe-Ke,Te=Me/2,Pe=Me/180,at=180/Me;function yt(de){return de>0?1:de<0?-1:0}function Tt(de,De,et){return(De[0]-de[0])*(et[1]-de[1])-(De[1]-de[1])*(et[0]-de[0])}function Ot(de){return de>1?0:de<-1?Me:Math.acos(de)}function Gt(de){return de>1?Te:de<-1?-Te:Math.asin(de)}function rr(de){return((de=Math.exp(de))-1/de)/2}function Qt(de){return((de=Math.exp(de))+1/de)/2}function Tr(de){return((de=Math.exp(2*de))-1)/(de+1)}function la(de){return(de=Math.sin(de/2))*de}var Ua=Math.SQRT2,Ba=2,Ra=4;d.interpolateZoom=function(de,De){var et=de[0],vt=de[1],_t=de[2],St=De[0],ar=De[1],zt=De[2],gr=St-et,Vr=ar-vt,Wr=gr*gr+Vr*Vr,Ta,ya;if(Wr<Ue)ya=Math.log(zt/_t)/Ua,Ta=function(vi){return[et+vi*gr,vt+vi*Vr,_t*Math.exp(Ua*vi*ya)]};else{var ri=Math.sqrt(Wr),ni=(zt*zt-_t*_t+Ra*Wr)/(2*_t*Ba*ri),Ma=(zt*zt-_t*_t-Ra*Wr)/(2*zt*Ba*ri),Na=Math.log(Math.sqrt(ni*ni+1)-ni),Ka=Math.log(Math.sqrt(Ma*Ma+1)-Ma);ya=(Ka-Na)/Ua,Ta=function(vi){var ui=vi*ya,Pa=Qt(Na),sn=_t/(Ba*ri)*(Pa*Tr(Ua*ui+Na)-rr(Na));return[et+sn*gr,vt+sn*Vr,_t*Pa/Qt(Ua*ui+Na)]}}return Ta.duration=ya*1e3,Ta},d.behavior.zoom=function(){var de={x:0,y:0,k:1},De,et,vt,_t=[960,500],St=ei,ar=250,zt=0,gr="mousedown.zoom",Vr="mousemove.zoom",Wr="mouseup.zoom",Ta,ya="touchstart.zoom",ri,ni=le(ui,"zoomstart","zoom","zoomend"),Ma,Na,Ka,vi;ti||(ti="onwheel"in M?(za=function(){return-d.event.deltaY*(d.event.deltaMode?120:1)},"wheel"):"onmousewheel"in M?(za=function(){return d.event.wheelDelta},"mousewheel"):(za=function(){return-d.event.detail},"MozMousePixelScroll"));function ui(gn){gn.on(gr,Zo).on(ti+".zoom",el).on("dblclick.zoom",_l).on(ya,ul)}ui.event=function(gn){gn.each(function(){var vo=ni.of(this,arguments),cs=de;hs?d.select(this).transition().each("start.zoom",function(){de=this.__chart__||{x:0,y:0,k:1},eo(vo)}).tween("zoom:zoom",function(){var ps=_t[0],Tl=_t[1],Gl=et?et[0]:ps/2,Tu=et?et[1]:Tl/2,Il=d.interpolateZoom([(Gl-de.x)/de.k,(Tu-de.y)/de.k,ps/de.k],[(Gl-cs.x)/cs.k,(Tu-cs.y)/cs.k,ps/cs.k]);return function(yc){var nt=Il(yc),Yt=ps/nt[2];this.__chart__=de={x:Gl-nt[0]*Yt,y:Tu-nt[1]*Yt,k:Yt},$o(vo)}}).each("interrupt.zoom",function(){io(vo)}).each("end.zoom",function(){io(vo)}):(this.__chart__=de,eo(vo),$o(vo),io(vo))})},ui.translate=function(gn){return arguments.length?(de={x:+gn[0],y:+gn[1],k:de.k},Zn(),ui):[de.x,de.y]},ui.scale=function(gn){return arguments.length?(de={x:de.x,y:de.y,k:null},an(+gn),Zn(),ui):de.k},ui.scaleExtent=function(gn){return arguments.length?(St=gn==null?ei:[+gn[0],+gn[1]],ui):St},ui.center=function(gn){return arguments.length?(vt=gn&&[+gn[0],+gn[1]],ui):vt},ui.size=function(gn){return arguments.length?(_t=gn&&[+gn[0],+gn[1]],ui):_t},ui.duration=function(gn){return arguments.length?(ar=+gn,ui):ar},ui.x=function(gn){return arguments.length?(Na=gn,Ma=gn.copy(),de={x:0,y:0,k:1},ui):Na},ui.y=function(gn){return arguments.length?(vi=gn,Ka=gn.copy(),de={x:0,y:0,k:1},ui):vi};function Pa(gn){return[(gn[0]-de.x)/de.k,(gn[1]-de.y)/de.k]}function sn(gn){return[gn[0]*de.k+de.x,gn[1]*de.k+de.y]}function an(gn){de.k=Math.max(St[0],Math.min(St[1],gn))}function vn(gn,vo){vo=sn(vo),de.x+=gn[0]-vo[0],de.y+=gn[1]-vo[1]}function Pn(gn,vo,cs,ps){gn.__chart__={x:de.x,y:de.y,k:de.k},an(Math.pow(2,ps)),vn(et=vo,cs),gn=d.select(gn),ar>0&&(gn=gn.transition().duration(ar)),gn.call(ui.event)}function Zn(){Na&&Na.domain(Ma.range().map(function(gn){return(gn-de.x)/de.k}).map(Ma.invert)),vi&&vi.domain(Ka.range().map(function(gn){return(gn-de.y)/de.k}).map(Ka.invert))}function eo(gn){zt++||gn({type:"zoomstart"})}function $o(gn){Zn(),gn({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function io(gn){--zt||(gn({type:"zoomend"}),et=null)}function Zo(){var gn=this,vo=ni.of(gn,arguments),cs=0,ps=d.select(t(gn)).on(Vr,Tu).on(Wr,Il),Tl=Pa(d.mouse(gn)),Gl=wr(gn);Bn.call(gn),eo(vo);function Tu(){cs=1,vn(d.mouse(gn),Tl),$o(vo)}function Il(){ps.on(Vr,null).on(Wr,null),Gl(cs),io(vo)}}function ul(){var gn=this,vo=ni.of(gn,arguments),cs={},ps=0,Tl,Gl=".zoom-"+d.event.changedTouches[0].identifier,Tu="touchmove"+Gl,Il="touchend"+Gl,yc=[],nt=d.select(gn),Yt=wr(gn);ua(),eo(vo),nt.on(gr,null).on(ya,ua);function cr(){var wa=d.touches(gn);return Tl=de.k,wa.forEach(function(Ja){Ja.identifier in cs&&(cs[Ja.identifier]=Pa(Ja))}),wa}function ua(){var wa=d.event.target;d.select(wa).on(Tu,Aa).on(Il,xa),yc.push(wa);for(var Ja=d.event.changedTouches,Ai=0,bi=Ja.length;Ai<bi;++Ai)cs[Ja[Ai].identifier]=null;var fi=cr(),yn=Date.now();if(fi.length===1){if(yn-ri<500){var Oi=fi[0];Pn(gn,Oi,cs[Oi.identifier],Math.floor(Math.log(de.k)/Math.LN2)+1),Q()}ri=yn}else if(fi.length>1){var Oi=fi[0],ki=fi[1],qa=Oi[0]-ki[0],ea=Oi[1]-ki[1];ps=qa*qa+ea*ea}}function Aa(){var wa=d.touches(gn),Ja,Ai,bi,fi;Bn.call(gn);for(var yn=0,Oi=wa.length;yn<Oi;++yn,fi=null)if(bi=wa[yn],fi=cs[bi.identifier]){if(Ai)break;Ja=bi,Ai=fi}if(fi){var ki=(ki=bi[0]-Ja[0])*ki+(ki=bi[1]-Ja[1])*ki,qa=ps&&Math.sqrt(ki/ps);Ja=[(Ja[0]+bi[0])/2,(Ja[1]+bi[1])/2],Ai=[(Ai[0]+fi[0])/2,(Ai[1]+fi[1])/2],an(qa*Tl)}ri=null,vn(Ja,Ai),$o(vo)}function xa(){if(d.event.touches.length){for(var wa=d.event.changedTouches,Ja=0,Ai=wa.length;Ja<Ai;++Ja)delete cs[wa[Ja].identifier];for(var bi in cs)return void cr()}d.selectAll(yc).on(Gl,null),nt.on(gr,Zo).on(ya,ul),Yt(),io(vo)}}function el(){var gn=ni.of(this,arguments);Ta?clearTimeout(Ta):(Bn.call(this),De=Pa(et=vt||d.mouse(this)),eo(gn)),Ta=setTimeout(function(){Ta=null,io(gn)},50),Q(),an(Math.pow(2,za()*.002)*de.k),vn(et,De),$o(gn)}function _l(){var gn=d.mouse(this),vo=Math.log(de.k)/Math.LN2;Pn(this,gn,Pa(gn),d.event.shiftKey?Math.ceil(vo)-1:Math.floor(vo)+1)}return d.rebind(ui,ni,"on")};var ei=[0,1/0],za,ti;d.color=Ci;function Ci(){}Ci.prototype.toString=function(){return this.rgb()+""},d.hsl=Jt;function Jt(de,De,et){return this instanceof Jt?(this.h=+de,this.s=+De,void(this.l=+et)):arguments.length<2?de instanceof Jt?new Jt(de.h,de.s,de.l):aa(""+de,da,Jt):new Jt(de,De,et)}var Nt=Jt.prototype=new Ci;Nt.brighter=function(de){return de=Math.pow(.7,arguments.length?de:1),new Jt(this.h,this.s,this.l/de)},Nt.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new Jt(this.h,this.s,de*this.l)},Nt.rgb=function(){return Kt(this.h,this.s,this.l)};function Kt(de,De,et){var vt,_t;de=isNaN(de)?0:(de%=360)<0?de+360:de,De=isNaN(De)||De<0?0:De>1?1:De,et=et<0?0:et>1?1:et,_t=et<=.5?et*(1+De):et+De-et*De,vt=2*et-_t;function St(zt){return zt>360?zt-=360:zt<0&&(zt+=360),zt<60?vt+(_t-vt)*zt/60:zt<180?_t:zt<240?vt+(_t-vt)*(240-zt)/60:vt}function ar(zt){return Math.round(St(zt)*255)}return new Rr(ar(de+120),ar(de),ar(de-120))}d.hcl=Wt;function Wt(de,De,et){return this instanceof Wt?(this.h=+de,this.c=+De,void(this.l=+et)):arguments.length<2?de instanceof Wt?new Wt(de.h,de.c,de.l):de instanceof ma?xt(de.l,de.a,de.b):xt((de=fa((de=d.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Wt(de,De,et)}var Pr=Wt.prototype=new Ci;Pr.brighter=function(de){return new Wt(this.h,this.c,Math.min(100,this.l+ra*(arguments.length?de:1)))},Pr.darker=function(de){return new Wt(this.h,this.c,Math.max(0,this.l-ra*(arguments.length?de:1)))},Pr.rgb=function(){return ta(this.h,this.c,this.l).rgb()};function ta(de,De,et){return isNaN(de)&&(de=0),isNaN(De)&&(De=0),new ma(et,Math.cos(de*=Pe)*De,Math.sin(de)*De)}d.lab=ma;function ma(de,De,et){return this instanceof ma?(this.l=+de,this.a=+De,void(this.b=+et)):arguments.length<2?de instanceof ma?new ma(de.l,de.a,de.b):de instanceof Wt?ta(de.h,de.c,de.l):fa((de=Rr(de)).r,de.g,de.b):new ma(de,De,et)}var ra=18,Ia=.95047,Ha=1,$a=1.08883,ai=ma.prototype=new Ci;ai.brighter=function(de){return new ma(Math.min(100,this.l+ra*(arguments.length?de:1)),this.a,this.b)},ai.darker=function(de){return new ma(Math.max(0,this.l-ra*(arguments.length?de:1)),this.a,this.b)},ai.rgb=function(){return mi(this.l,this.a,this.b)};function mi(de,De,et){var vt=(de+16)/116,_t=vt+De/500,St=vt-et/200;return _t=ct(_t)*Ia,vt=ct(vt)*Ha,St=ct(St)*$a,new Rr(Or(3.2404542*_t-1.5371385*vt-.4985314*St),Or(-.969266*_t+1.8760108*vt+.041556*St),Or(.0556434*_t-.2040259*vt+1.0572252*St))}function xt(de,De,et){return de>0?new Wt(Math.atan2(et,De)*at,Math.sqrt(De*De+et*et),de):new Wt(NaN,NaN,de)}function ct(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Nr(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Or(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}d.rgb=Rr;function Rr(de,De,et){return this instanceof Rr?(this.r=~~de,this.g=~~De,void(this.b=~~et)):arguments.length<2?de instanceof Rr?new Rr(de.r,de.g,de.b):aa(""+de,Rr,Kt):new Rr(de,De,et)}function Lr(de){return new Rr(de>>16,de>>8&255,de&255)}function Gr(de){return Lr(de)+""}var Kr=Rr.prototype=new Ci;Kr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var De=this.r,et=this.g,vt=this.b,_t=30;return!De&&!et&&!vt?new Rr(_t,_t,_t):(De&&De<_t&&(De=_t),et&&et<_t&&(et=_t),vt&&vt<_t&&(vt=_t),new Rr(Math.min(255,De/de),Math.min(255,et/de),Math.min(255,vt/de)))},Kr.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new Rr(de*this.r,de*this.g,de*this.b)},Kr.hsl=function(){return da(this.r,this.g,this.b)},Kr.toString=function(){return"#"+Ur(this.r)+Ur(this.g)+Ur(this.b)};function Ur(de){return de<16?"0"+Math.max(0,de).toString(16):Math.min(255,de).toString(16)}function aa(de,De,et){var vt=0,_t=0,St=0,ar,zt,gr;if(ar=/([a-z]+)\((.*)\)/.exec(de=de.toLowerCase()),ar)switch(zt=ar[2].split(","),ar[1]){case"hsl":return et(parseFloat(zt[0]),parseFloat(zt[1])/100,parseFloat(zt[2])/100);case"rgb":return De(dr(zt[0]),dr(zt[1]),dr(zt[2]))}return(gr=kr.get(de))?De(gr.r,gr.g,gr.b):(de!=null&&de.charAt(0)==="#"&&!isNaN(gr=parseInt(de.slice(1),16))&&(de.length===4?(vt=(gr&3840)>>4,vt=vt>>4|vt,_t=gr&240,_t=_t>>4|_t,St=gr&15,St=St<<4|St):de.length===7&&(vt=(gr&16711680)>>16,_t=(gr&65280)>>8,St=gr&255)),De(vt,_t,St))}function da(de,De,et){var vt=Math.min(de/=255,De/=255,et/=255),_t=Math.max(de,De,et),St=_t-vt,ar,zt,gr=(_t+vt)/2;return St?(zt=gr<.5?St/(_t+vt):St/(2-_t-vt),de==_t?ar=(De-et)/St+(De<et?6:0):De==_t?ar=(et-de)/St+2:ar=(de-De)/St+4,ar*=60):(ar=NaN,zt=gr>0&&gr<1?0:ar),new Jt(ar,zt,gr)}function fa(de,De,et){de=It(de),De=It(De),et=It(et);var vt=Nr((.4124564*de+.3575761*De+.1804375*et)/Ia),_t=Nr((.2126729*de+.7151522*De+.072175*et)/Ha),St=Nr((.0193339*de+.119192*De+.9503041*et)/$a);return ma(116*_t-16,500*(vt-_t),200*(_t-St))}function It(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function dr(de){var De=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(De*2.55):De}var kr=d.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});kr.forEach(function(de,De){kr.set(de,Lr(De))});function ia(de){return typeof de=="function"?de:function(){return de}}d.functor=ia,d.xhr=Ca(F);function Ca(de){return function(De,et,vt){return arguments.length===2&&typeof et=="function"&&(vt=et,et=null),Fa(De,et,de,vt)}}function Fa(de,De,et,vt){var _t={},St=d.dispatch("beforesend","progress","load","error"),ar={},zt=new XMLHttpRequest,gr=null;self.XDomainRequest&&!("withCredentials"in zt)&&/^(http(s)?:)?\/\//.test(de)&&(zt=new XDomainRequest),"onload"in zt?zt.onload=zt.onerror=Vr:zt.onreadystatechange=function(){zt.readyState>3&&Vr()};function Vr(){var Wr=zt.status,Ta;if(!Wr&&ha(zt)||Wr>=200&&Wr<300||Wr===304){try{Ta=et.call(_t,zt)}catch(ya){St.error.call(_t,ya);return}St.load.call(_t,Ta)}else St.error.call(_t,zt)}return zt.onprogress=function(Wr){var Ta=d.event;d.event=Wr;try{St.progress.call(_t,zt)}finally{d.event=Ta}},_t.header=function(Wr,Ta){return Wr=(Wr+"").toLowerCase(),arguments.length<2?ar[Wr]:(Ta==null?delete ar[Wr]:ar[Wr]=Ta+"",_t)},_t.mimeType=function(Wr){return arguments.length?(De=Wr==null?null:Wr+"",_t):De},_t.responseType=function(Wr){return arguments.length?(gr=Wr,_t):gr},_t.response=function(Wr){return et=Wr,_t},["get","post"].forEach(function(Wr){_t[Wr]=function(){return _t.send.apply(_t,[Wr].concat(A(arguments)))}}),_t.send=function(Wr,Ta,ya){if(arguments.length===2&&typeof Ta=="function"&&(ya=Ta,Ta=null),zt.open(Wr,de,!0),De!=null&&!("accept"in ar)&&(ar.accept=De+",*/*"),zt.setRequestHeader)for(var ri in ar)zt.setRequestHeader(ri,ar[ri]);return De!=null&&zt.overrideMimeType&&zt.overrideMimeType(De),gr!=null&&(zt.responseType=gr),ya!=null&&_t.on("error",ya).on("load",function(ni){ya(null,ni)}),St.beforesend.call(_t,zt),zt.send(Ta??null),_t},_t.abort=function(){return zt.abort(),_t},d.rebind(_t,St,"on"),vt==null?_t:_t.get(Ya(vt))}function Ya(de){return de.length===1?function(De,et){de(De==null?et:null)}:de}function ha(de){var De=de.responseType;return De&&De!=="text"?de.response:de.responseText}d.dsv=function(de,De){var et=new RegExp('["'+de+`
]`),vt=de.charCodeAt(0);function _t(Vr,Wr,Ta){arguments.length<3&&(Ta=Wr,Wr=null);var ya=Fa(Vr,De,Wr==null?St:ar(Wr),Ta);return ya.row=function(ri){return arguments.length?ya.response((Wr=ri)==null?St:ar(ri)):Wr},ya}function St(Vr){return _t.parse(Vr.responseText)}function ar(Vr){return function(Wr){return _t.parse(Wr.responseText,Vr)}}_t.parse=function(Vr,Wr){var Ta;return _t.parseRows(Vr,function(ya,ri){if(Ta)return Ta(ya,ri-1);var ni=function(Ma){for(var Na={},Ka=ya.length,vi=0;vi<Ka;++vi)Na[ya[vi]]=Ma[vi];return Na};Ta=Wr?function(Ma,Na){return Wr(ni(Ma),Na)}:ni})},_t.parseRows=function(Vr,Wr){var Ta={},ya={},ri=[],ni=Vr.length,Ma=0,Na=0,Ka,vi;function ui(){if(Ma>=ni)return ya;if(vi)return vi=!1,Ta;var sn=Ma;if(Vr.charCodeAt(sn)===34){for(var an=sn;an++<ni;)if(Vr.charCodeAt(an)===34){if(Vr.charCodeAt(an+1)!==34)break;++an}Ma=an+2;var vn=Vr.charCodeAt(an+1);return vn===13?(vi=!0,Vr.charCodeAt(an+2)===10&&++Ma):vn===10&&(vi=!0),Vr.slice(sn+1,an).replace(/""/g,'"')}for(;Ma<ni;){var vn=Vr.charCodeAt(Ma++),Pn=1;if(vn===10)vi=!0;else if(vn===13)vi=!0,Vr.charCodeAt(Ma)===10&&(++Ma,++Pn);else if(vn!==vt)continue;return Vr.slice(sn,Ma-Pn)}return Vr.slice(sn)}for(;(Ka=ui())!==ya;){for(var Pa=[];Ka!==Ta&&Ka!==ya;)Pa.push(Ka),Ka=ui();Wr&&(Pa=Wr(Pa,Na++))==null||ri.push(Pa)}return ri},_t.format=function(Vr){if(Array.isArray(Vr[0]))return _t.formatRows(Vr);var Wr=new z,Ta=[];return Vr.forEach(function(ya){for(var ri in ya)Wr.has(ri)||Ta.push(Wr.add(ri))}),[Ta.map(gr).join(de)].concat(Vr.map(function(ya){return Ta.map(function(ri){return gr(ya[ri])}).join(de)})).join(`
`)},_t.formatRows=function(Vr){return Vr.map(zt).join(`
`)};function zt(Vr){return Vr.map(gr).join(de)}function gr(Vr){return et.test(Vr)?'"'+Vr.replace(/\"/g,'""')+'"':Vr}return _t},d.csv=d.dsv(",","text/csv"),d.tsv=d.dsv(" ","text/tab-separated-values");var Da,Xi,Li,fn,An=this[O(this,"requestAnimationFrame")]||function(de){setTimeout(de,17)};d.timer=function(){kn.apply(this,arguments)};function kn(de,De,et){var vt=arguments.length;vt<2&&(De=0),vt<3&&(et=Date.now());var _t=et+De,St={c:de,t:_t,n:null};return Xi?Xi.n=St:Da=St,Xi=St,Li||(fn=clearTimeout(fn),Li=1,An(zn)),St}function zn(){var de=Xn(),De=to()-de;De>24?(isFinite(De)&&(clearTimeout(fn),fn=setTimeout(zn,De)),Li=0):(Li=1,An(zn))}d.timer.flush=function(){Xn(),to()};function Xn(){for(var de=Date.now(),De=Da;De;)de>=De.t&&De.c(de-De.t)&&(De.c=null),De=De.n;return de}function to(){for(var de,De=Da,et=1/0;De;)De.c?(De.t<et&&(et=De.t),De=(de=De).n):De=de?de.n=De.n:Da=De.n;return Xi=de,et}d.round=function(de,De){return De?Math.round(de*(De=Math.pow(10,De)))/De:Math.round(de)},d.geom={};function mo(de){return de[0]}function pn(de){return de[1]}d.geom.hull=function(de){var De=mo,et=pn;if(arguments.length)return vt(de);function vt(_t){if(_t.length<3)return[];var St=ia(De),ar=ia(et),zt,gr=_t.length,Vr=[],Wr=[];for(zt=0;zt<gr;zt++)Vr.push([+St.call(this,_t[zt],zt),+ar.call(this,_t[zt],zt),zt]);for(Vr.sort(Xo),zt=0;zt<gr;zt++)Wr.push([Vr[zt][0],-Vr[zt][1]]);var Ta=Jo(Vr),ya=Jo(Wr),ri=ya[0]===Ta[0],ni=ya[ya.length-1]===Ta[Ta.length-1],Ma=[];for(zt=Ta.length-1;zt>=0;--zt)Ma.push(_t[Vr[Ta[zt]][2]]);for(zt=+ri;zt<ya.length-ni;++zt)Ma.push(_t[Vr[ya[zt]][2]]);return Ma}return vt.x=function(_t){return arguments.length?(De=_t,vt):De},vt.y=function(_t){return arguments.length?(et=_t,vt):et},vt};function Jo(de){for(var De=de.length,et=[0,1],vt=2,_t=2;_t<De;_t++){for(;vt>1&&Tt(de[et[vt-2]],de[et[vt-1]],de[_t])<=0;)--vt;et[vt++]=_t}return et.slice(0,vt)}function Xo(de,De){return de[0]-De[0]||de[1]-De[1]}d.geom.polygon=function(de){return G(de,Ts),de};var Ts=d.geom.polygon.prototype=[];Ts.area=function(){for(var de=-1,De=this.length,et,vt=this[De-1],_t=0;++de<De;)et=vt,vt=this[de],_t+=et[1]*vt[0]-et[0]*vt[1];return _t*.5},Ts.centroid=function(de){var De=-1,et=this.length,vt=0,_t=0,St,ar=this[et-1],zt;for(arguments.length||(de=-1/(6*this.area()));++De<et;)St=ar,ar=this[De],zt=St[0]*ar[1]-ar[0]*St[1],vt+=(St[0]+ar[0])*zt,_t+=(St[1]+ar[1])*zt;return[vt*de,_t*de]},Ts.clip=function(de){for(var De,et=Vn(de),vt=-1,_t=this.length-Vn(this),St,ar,zt=this[_t-1],gr,Vr,Wr;++vt<_t;){for(De=de.slice(),de.length=0,gr=this[vt],Vr=De[(ar=De.length-et)-1],St=-1;++St<ar;)Wr=De[St],Po(Wr,zt,gr)?(Po(Vr,zt,gr)||de.push(so(Vr,Wr,zt,gr)),de.push(Wr)):Po(Vr,zt,gr)&&de.push(so(Vr,Wr,zt,gr)),Vr=Wr;et&&de.push(de[0]),zt=gr}return de};function Po(de,De,et){return(et[0]-De[0])*(de[1]-De[1])<(et[1]-De[1])*(de[0]-De[0])}function so(de,De,et,vt){var _t=de[0],St=et[0],ar=De[0]-_t,zt=vt[0]-St,gr=de[1],Vr=et[1],Wr=De[1]-gr,Ta=vt[1]-Vr,ya=(zt*(gr-Vr)-Ta*(_t-St))/(Ta*ar-zt*Wr);return[_t+ya*ar,gr+ya*Wr]}function Vn(de){var De=de[0],et=de[de.length-1];return!(De[0]-et[0]||De[1]-et[1])}var To,qo,Oo,lo=[],Co,os,Ys=[];function Os(){Ns(this),this.edge=this.site=this.circle=null}function Yo(de){var De=lo.pop()||new Os;return De.site=de,De}function Ui(de){po(de),Oo.remove(de),lo.push(de),Ns(de)}function Cn(de){var De=de.circle,et=De.x,vt=De.cy,_t={x:et,y:vt},St=de.P,ar=de.N,zt=[de];Ui(de);for(var gr=St;gr.circle&&l(et-gr.circle.x)<Ke&&l(vt-gr.circle.cy)<Ke;)St=gr.P,zt.unshift(gr),Ui(gr),gr=St;zt.unshift(gr),po(gr);for(var Vr=ar;Vr.circle&&l(et-Vr.circle.x)<Ke&&l(vt-Vr.circle.cy)<Ke;)ar=Vr.N,zt.push(Vr),Ui(Vr),Vr=ar;zt.push(Vr),po(Vr);var Wr=zt.length,Ta;for(Ta=1;Ta<Wr;++Ta)Vr=zt[Ta],gr=zt[Ta-1],fl(Vr.edge,gr.site,Vr.site,_t);gr=zt[0],Vr=zt[Wr-1],Vr.edge=zs(gr.site,Vr.site,null,_t),Sn(gr),Sn(Vr)}function tl(de){for(var De=de.x,et=de.y,vt,_t,St,ar,zt=Oo._;zt;)if(St=Bs(zt,et)-De,St>Ke)zt=zt.L;else if(ar=De-uo(zt,et),ar>Ke){if(!zt.R){vt=zt;break}zt=zt.R}else{St>-Ke?(vt=zt.P,_t=zt):ar>-Ke?(vt=zt,_t=zt.N):vt=_t=zt;break}var gr=Yo(de);if(Oo.insert(vt,gr),!(!vt&&!_t)){if(vt===_t){po(vt),_t=Yo(vt.site),Oo.insert(gr,_t),gr.edge=_t.edge=zs(vt.site,gr.site),Sn(vt),Sn(_t);return}if(!_t){gr.edge=zs(vt.site,gr.site);return}po(vt),po(_t);var Vr=vt.site,Wr=Vr.x,Ta=Vr.y,ya=de.x-Wr,ri=de.y-Ta,ni=_t.site,Ma=ni.x-Wr,Na=ni.y-Ta,Ka=2*(ya*Na-ri*Ma),vi=ya*ya+ri*ri,ui=Ma*Ma+Na*Na,Pa={x:(Na*vi-ri*ui)/Ka+Wr,y:(ya*ui-Ma*vi)/Ka+Ta};fl(_t.edge,Vr,ni,Pa),gr.edge=zs(Vr,de,null,Pa),_t.edge=zs(de,ni,null,Pa),Sn(vt),Sn(_t)}}function Bs(de,De){var et=de.site,vt=et.x,_t=et.y,St=_t-De;if(!St)return vt;var ar=de.P;if(!ar)return-1/0;et=ar.site;var zt=et.x,gr=et.y,Vr=gr-De;if(!Vr)return zt;var Wr=zt-vt,Ta=1/St-1/Vr,ya=Wr/Vr;return Ta?(-ya+Math.sqrt(ya*ya-2*Ta*(Wr*Wr/(-2*Vr)-gr+Vr/2+_t-St/2)))/Ta+vt:(vt+zt)/2}function uo(de,De){var et=de.N;if(et)return Bs(et,De);var vt=de.site;return vt.y===De?vt.x:1/0}function $s(de){this.site=de,this.edges=[]}$s.prototype.prepare=function(){for(var de=this.edges,De=de.length,et;De--;)et=de[De].edge,(!et.b||!et.a)&&de.splice(De,1);return de.sort(Is),de.length};function ms(de){for(var De=de[0][0],et=de[1][0],vt=de[0][1],_t=de[1][1],St,ar,zt,gr,Vr=qo,Wr=Vr.length,Ta,ya,ri,ni,Ma,Na;Wr--;)if(Ta=Vr[Wr],!(!Ta||!Ta.prepare()))for(ri=Ta.edges,ni=ri.length,ya=0;ya<ni;)Na=ri[ya].end(),zt=Na.x,gr=Na.y,Ma=ri[++ya%ni].start(),St=Ma.x,ar=Ma.y,(l(zt-St)>Ke||l(gr-ar)>Ke)&&(ri.splice(ya,0,new xu(au(Ta.site,Na,l(zt-De)<Ke&&_t-gr>Ke?{x:De,y:l(St-De)<Ke?ar:_t}:l(gr-_t)<Ke&&et-zt>Ke?{x:l(ar-_t)<Ke?St:et,y:_t}:l(zt-et)<Ke&&gr-vt>Ke?{x:et,y:l(St-et)<Ke?ar:vt}:l(gr-vt)<Ke&&zt-De>Ke?{x:l(ar-vt)<Ke?St:De,y:vt}:null),Ta.site,null)),++ni)}function Is(de,De){return De.angle-de.angle}function rl(){Ns(this),this.x=this.y=this.arc=this.site=this.cy=null}function Sn(de){var De=de.P,et=de.N;if(!(!De||!et)){var vt=De.site,_t=de.site,St=et.site;if(vt!==St){var ar=_t.x,zt=_t.y,gr=vt.x-ar,Vr=vt.y-zt,Wr=St.x-ar,Na=St.y-zt,Ta=2*(gr*Na-Vr*Wr);if(!(Ta>=-Ue)){var ya=gr*gr+Vr*Vr,ri=Wr*Wr+Na*Na,ni=(Na*ya-Vr*ri)/Ta,Ma=(gr*ri-Wr*ya)/Ta,Na=Ma+zt,Ka=Ys.pop()||new rl;Ka.arc=de,Ka.site=_t,Ka.x=ni+ar,Ka.y=Na+Math.sqrt(ni*ni+Ma*Ma),Ka.cy=Na,de.circle=Ka;for(var vi=null,ui=os._;ui;)if(Ka.y<ui.y||Ka.y===ui.y&&Ka.x<=ui.x)if(ui.L)ui=ui.L;else{vi=ui.P;break}else if(ui.R)ui=ui.R;else{vi=ui;break}os.insert(vi,Ka),vi||(Co=Ka)}}}}function po(de){var De=de.circle;De&&(De.P||(Co=De.N),os.remove(De),Ys.push(De),Ns(De),de.circle=null)}function ro(de,De,et,vt){return function(_t){var St=_t.a,ar=_t.b,zt=St.x,gr=St.y,Vr=ar.x,Wr=ar.y,Ta=0,ya=1,ri=Vr-zt,ni=Wr-gr,Ma;if(Ma=de-zt,!(!ri&&Ma>0)){if(Ma/=ri,ri<0){if(Ma<Ta)return;Ma<ya&&(ya=Ma)}else if(ri>0){if(Ma>ya)return;Ma>Ta&&(Ta=Ma)}if(Ma=et-zt,!(!ri&&Ma<0)){if(Ma/=ri,ri<0){if(Ma>ya)return;Ma>Ta&&(Ta=Ma)}else if(ri>0){if(Ma<Ta)return;Ma<ya&&(ya=Ma)}if(Ma=De-gr,!(!ni&&Ma>0)){if(Ma/=ni,ni<0){if(Ma<Ta)return;Ma<ya&&(ya=Ma)}else if(ni>0){if(Ma>ya)return;Ma>Ta&&(Ta=Ma)}if(Ma=vt-gr,!(!ni&&Ma<0)){if(Ma/=ni,ni<0){if(Ma>ya)return;Ma>Ta&&(Ta=Ma)}else if(ni>0){if(Ma<Ta)return;Ma<ya&&(ya=Ma)}return Ta>0&&(_t.a={x:zt+Ta*ri,y:gr+Ta*ni}),ya<1&&(_t.b={x:zt+ya*ri,y:gr+ya*ni}),_t}}}}}}function As(de){for(var De=To,et=ro(de[0][0],de[0][1],de[1][0],de[1][1]),vt=De.length,_t;vt--;)_t=De[vt],(!al(_t,de)||!et(_t)||l(_t.a.x-_t.b.x)<Ke&&l(_t.a.y-_t.b.y)<Ke)&&(_t.a=_t.b=null,De.splice(vt,1))}function al(de,De){var et=de.b;if(et)return!0;var vt=de.a,_t=De[0][0],St=De[1][0],ar=De[0][1],zt=De[1][1],gr=de.l,Vr=de.r,Wr=gr.x,Ta=gr.y,ya=Vr.x,ri=Vr.y,ni=(Wr+ya)/2,Ma=(Ta+ri)/2,Na,Ka;if(ri===Ta){if(ni<_t||ni>=St)return;if(Wr>ya){if(!vt)vt={x:ni,y:ar};else if(vt.y>=zt)return;et={x:ni,y:zt}}else{if(!vt)vt={x:ni,y:zt};else if(vt.y<ar)return;et={x:ni,y:ar}}}else if(Na=(Wr-ya)/(ri-Ta),Ka=Ma-Na*ni,Na<-1||Na>1)if(Wr>ya){if(!vt)vt={x:(ar-Ka)/Na,y:ar};else if(vt.y>=zt)return;et={x:(zt-Ka)/Na,y:zt}}else{if(!vt)vt={x:(zt-Ka)/Na,y:zt};else if(vt.y<ar)return;et={x:(ar-Ka)/Na,y:ar}}else if(Ta<ri){if(!vt)vt={x:_t,y:Na*_t+Ka};else if(vt.x>=St)return;et={x:St,y:Na*St+Ka}}else{if(!vt)vt={x:St,y:Na*St+Ka};else if(vt.x<_t)return;et={x:_t,y:Na*_t+Ka}}return de.a=vt,de.b=et,!0}function $n(de,De){this.l=de,this.r=De,this.a=this.b=null}function zs(de,De,et,vt){var _t=new $n(de,De);return To.push(_t),et&&fl(_t,de,De,et),vt&&fl(_t,De,de,vt),qo[de.i].edges.push(new xu(_t,de,De)),qo[De.i].edges.push(new xu(_t,De,de)),_t}function au(de,De,et){var vt=new $n(de,null);return vt.a=De,vt.b=et,To.push(vt),vt}function fl(de,De,et,vt){!de.a&&!de.b?(de.a=vt,de.l=De,de.r=et):de.l===et?de.b=vt:de.a=vt}function xu(de,De,et){var vt=de.a,_t=de.b;this.edge=de,this.site=De,this.angle=et?Math.atan2(et.y-De.y,et.x-De.x):de.l===De?Math.atan2(_t.x-vt.x,vt.y-_t.y):Math.atan2(vt.x-_t.x,_t.y-vt.y)}xu.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 zl(){this._=null}function Ns(de){de.U=de.C=de.L=de.R=de.P=de.N=null}zl.prototype={insert:function(de,De){var et,vt,_t;if(de){if(De.P=de,De.N=de.N,de.N&&(de.N.P=De),de.N=De,de.R){for(de=de.R;de.L;)de=de.L;de.L=De}else de.R=De;et=de}else this._?(de=Bc(this._),De.P=null,De.N=de,de.P=de.L=De,et=de):(De.P=De.N=null,this._=De,et=null);for(De.L=De.R=null,De.U=et,De.C=!0,de=De;et&&et.C;)vt=et.U,et===vt.L?(_t=vt.R,_t&&_t.C?(et.C=_t.C=!1,vt.C=!0,de=vt):(de===et.R&&(iu(this,et),de=et,et=de.U),et.C=!1,vt.C=!0,Eu(this,vt))):(_t=vt.L,_t&&_t.C?(et.C=_t.C=!1,vt.C=!0,de=vt):(de===et.L&&(Eu(this,et),de=et,et=de.U),et.C=!1,vt.C=!0,iu(this,vt))),et=de.U;this._.C=!1},remove:function(de){de.N&&(de.N.P=de.P),de.P&&(de.P.N=de.N),de.N=de.P=null;var De=de.U,et,vt=de.L,_t=de.R,St,ar;if(vt?_t?St=Bc(_t):St=vt:St=_t,De?De.L===de?De.L=St:De.R=St:this._=St,vt&&_t?(ar=St.C,St.C=de.C,St.L=vt,vt.U=St,St!==_t?(De=St.U,St.U=de.U,de=St.R,De.L=de,St.R=_t,_t.U=St):(St.U=De,De=St,de=St.R)):(ar=de.C,de=St),de&&(de.U=De),!ar){if(de&&de.C){de.C=!1;return}do{if(de===this._)break;if(de===De.L){if(et=De.R,et.C&&(et.C=!1,De.C=!0,iu(this,De),et=De.R),et.L&&et.L.C||et.R&&et.R.C){(!et.R||!et.R.C)&&(et.L.C=!1,et.C=!0,Eu(this,et),et=De.R),et.C=De.C,De.C=et.R.C=!1,iu(this,De),de=this._;break}}else if(et=De.L,et.C&&(et.C=!1,De.C=!0,Eu(this,De),et=De.L),et.L&&et.L.C||et.R&&et.R.C){(!et.L||!et.L.C)&&(et.R.C=!1,et.C=!0,iu(this,et),et=De.L),et.C=De.C,De.C=et.L.C=!1,Eu(this,De),de=this._;break}et.C=!0,de=De,De=De.U}while(!de.C);de&&(de.C=!1)}}};function iu(de,De){var et=De,vt=De.R,_t=et.U;_t?_t.L===et?_t.L=vt:_t.R=vt:de._=vt,vt.U=_t,et.U=vt,et.R=vt.L,et.R&&(et.R.U=et),vt.L=et}function Eu(de,De){var et=De,vt=De.L,_t=et.U;_t?_t.L===et?_t.L=vt:_t.R=vt:de._=vt,vt.U=_t,et.U=vt,et.L=vt.R,et.L&&(et.L.U=et),vt.R=et}function Bc(de){for(;de.L;)de=de.L;return de}function Cu(de,De){var et=de.sort(Af).pop(),vt,_t,St;for(To=[],qo=new Array(de.length),Oo=new zl,os=new zl;;)if(St=Co,et&&(!St||et.y<St.y||et.y===St.y&&et.x<St.x))(et.x!==vt||et.y!==_t)&&(qo[et.i]=new $s(et),tl(et),vt=et.x,_t=et.y),et=de.pop();else if(St)Cn(St.arc);else break;De&&(As(De),ms(De));var ar={cells:qo,edges:To};return Oo=os=To=qo=null,ar}function Af(de,De){return De.y-de.y||De.x-de.x}d.geom.voronoi=function(de){var De=mo,et=pn,vt=De,_t=et,St=pf;if(de)return ar(de);function ar(gr){var Vr=new Array(gr.length),Wr=St[0][0],Ta=St[0][1],ya=St[1][0],ri=St[1][1];return Cu(zt(gr),St).cells.forEach(function(ni,Ma){var Na=ni.edges,Ka=ni.site,vi=Vr[Ma]=Na.length?Na.map(function(ui){var Pa=ui.start();return[Pa.x,Pa.y]}):Ka.x>=Wr&&Ka.x<=ya&&Ka.y>=Ta&&Ka.y<=ri?[[Wr,ri],[ya,ri],[ya,Ta],[Wr,Ta]]:[];vi.point=gr[Ma]}),Vr}function zt(gr){return gr.map(function(Vr,Wr){return{x:Math.round(vt(Vr,Wr)/Ke)*Ke,y:Math.round(_t(Vr,Wr)/Ke)*Ke,i:Wr}})}return ar.links=function(gr){return Cu(zt(gr)).edges.filter(function(Vr){return Vr.l&&Vr.r}).map(function(Vr){return{source:gr[Vr.l.i],target:gr[Vr.r.i]}})},ar.triangles=function(gr){var Vr=[];return Cu(zt(gr)).cells.forEach(function(Wr,Ta){for(var ya=Wr.site,ri=Wr.edges.sort(Is),ni=-1,Ma=ri.length,Na,Ka,vi=ri[Ma-1].edge,ui=vi.l===ya?vi.r:vi.l;++ni<Ma;)Na=vi,Ka=ui,vi=ri[ni].edge,ui=vi.l===ya?vi.r:vi.l,Ta<Ka.i&&Ta<ui.i&&Us(ya,Ka,ui)<0&&Vr.push([gr[Ta],gr[Ka.i],gr[ui.i]])}),Vr},ar.x=function(gr){return arguments.length?(vt=ia(De=gr),ar):De},ar.y=function(gr){return arguments.length?(_t=ia(et=gr),ar):et},ar.clipExtent=function(gr){return arguments.length?(St=gr??pf,ar):St===pf?null:St},ar.size=function(gr){return arguments.length?ar.clipExtent(gr&&[[0,0],gr]):St===pf?null:St&&St[1]},ar};var pf=[[-1e6,-1e6],[1e6,1e6]];function Us(de,De,et){return(de.x-et.x)*(De.y-de.y)-(de.x-De.x)*(et.y-de.y)}d.geom.delaunay=function(de){return d.geom.voronoi().triangles(de)},d.geom.quadtree=function(de,De,et,vt,_t){var St=mo,ar=pn,zt;if(zt=arguments.length)return St=Vc,ar=Sf,zt===3&&(_t=et,vt=De,et=De=0),gr(de);function gr(Vr){var Wr,Ta=ia(St),ya=ia(ar),ri,ni,Ma,Na,Ka,vi,ui,Pa;if(De!=null)Ka=De,vi=et,ui=vt,Pa=_t;else if(ui=Pa=-(Ka=vi=1/0),ri=[],ni=[],Na=Vr.length,zt)for(Ma=0;Ma<Na;++Ma)Wr=Vr[Ma],Wr.x<Ka&&(Ka=Wr.x),Wr.y<vi&&(vi=Wr.y),Wr.x>ui&&(ui=Wr.x),Wr.y>Pa&&(Pa=Wr.y),ri.push(Wr.x),ni.push(Wr.y);else for(Ma=0;Ma<Na;++Ma){var sn=+Ta(Wr=Vr[Ma],Ma),an=+ya(Wr,Ma);sn<Ka&&(Ka=sn),an<vi&&(vi=an),sn>ui&&(ui=sn),an>Pa&&(Pa=an),ri.push(sn),ni.push(an)}var vn=ui-Ka,Pn=Pa-vi;vn>Pn?Pa=vi+vn:ui=Ka+Pn;function Zn(io,Zo,ul,el,_l,gn,vo,cs){if(!(isNaN(ul)||isNaN(el)))if(io.leaf){var ps=io.x,Tl=io.y;if(ps!=null)if(l(ps-ul)+l(Tl-el)<.01)eo(io,Zo,ul,el,_l,gn,vo,cs);else{var Gl=io.point;io.x=io.y=io.point=null,eo(io,Gl,ps,Tl,_l,gn,vo,cs),eo(io,Zo,ul,el,_l,gn,vo,cs)}else io.x=ul,io.y=el,io.point=Zo}else eo(io,Zo,ul,el,_l,gn,vo,cs)}function eo(io,Zo,ul,el,_l,gn,vo,cs){var ps=(_l+vo)*.5,Tl=(gn+cs)*.5,Gl=ul>=ps,Tu=el>=Tl,Il=Tu<<1|Gl;io.leaf=!1,io=io.nodes[Il]||(io.nodes[Il]=nu()),Gl?_l=ps:vo=ps,Tu?gn=Tl:cs=Tl,Zn(io,Zo,ul,el,_l,gn,vo,cs)}var $o=nu();if($o.add=function(io){Zn($o,io,+Ta(io,++Ma),+ya(io,Ma),Ka,vi,ui,Pa)},$o.visit=function(io){Ll(io,$o,Ka,vi,ui,Pa)},$o.find=function(io){return ic($o,io[0],io[1],Ka,vi,ui,Pa)},Ma=-1,De==null){for(;++Ma<Na;)Zn($o,Vr[Ma],ri[Ma],ni[Ma],Ka,vi,ui,Pa);--Ma}else Vr.forEach($o.add);return ri=ni=Vr=Wr=null,$o}return gr.x=function(Vr){return arguments.length?(St=Vr,gr):St},gr.y=function(Vr){return arguments.length?(ar=Vr,gr):ar},gr.extent=function(Vr){return arguments.length?(Vr==null?De=et=vt=_t=null:(De=+Vr[0][0],et=+Vr[0][1],vt=+Vr[1][0],_t=+Vr[1][1]),gr):De==null?null:[[De,et],[vt,_t]]},gr.size=function(Vr){return arguments.length?(Vr==null?De=et=vt=_t=null:(De=et=0,vt=+Vr[0],_t=+Vr[1]),gr):De==null?null:[vt-De,_t-et]},gr};function Vc(de){return de.x}function Sf(de){return de.y}function nu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Ll(de,De,et,vt,_t,St){if(!de(De,et,vt,_t,St)){var ar=(et+_t)*.5,zt=(vt+St)*.5,gr=De.nodes;gr[0]&&Ll(de,gr[0],et,vt,ar,zt),gr[1]&&Ll(de,gr[1],ar,vt,_t,zt),gr[2]&&Ll(de,gr[2],et,zt,ar,St),gr[3]&&Ll(de,gr[3],ar,zt,_t,St)}}function ic(de,De,et,vt,_t,St,ar){var zt=1/0,gr;return function Vr(Wr,Ta,ya,ri,ni){if(!(Ta>St||ya>ar||ri<vt||ni<_t)){if(Ma=Wr.point){var Ma,Na=De-Wr.x,Ka=et-Wr.y,vi=Na*Na+Ka*Ka;if(vi<zt){var ui=Math.sqrt(zt=vi);vt=De-ui,_t=et-ui,St=De+ui,ar=et+ui,gr=Ma}}for(var Pa=Wr.nodes,sn=(Ta+ri)*.5,an=(ya+ni)*.5,vn=De>=sn,Pn=et>=an,Zn=Pn<<1|vn,eo=Zn+4;Zn<eo;++Zn)if(Wr=Pa[Zn&3])switch(Zn&3){case 0:Vr(Wr,Ta,ya,sn,an);break;case 1:Vr(Wr,sn,ya,ri,an);break;case 2:Vr(Wr,Ta,an,sn,ni);break;case 3:Vr(Wr,sn,an,ri,ni);break}}}(de,vt,_t,St,ar),gr}d.interpolateRgb=Ou;function Ou(de,De){de=d.rgb(de),De=d.rgb(De);var et=de.r,vt=de.g,_t=de.b,St=De.r-et,ar=De.g-vt,zt=De.b-_t;return function(gr){return"#"+Ur(Math.round(et+St*gr))+Ur(Math.round(vt+ar*gr))+Ur(Math.round(_t+zt*gr))}}d.interpolateObject=il;function il(de,De){var et={},vt={},_t;for(_t in de)_t in De?et[_t]=Nl(de[_t],De[_t]):vt[_t]=de[_t];for(_t in De)_t in de||(vt[_t]=De[_t]);return function(St){for(_t in et)vt[_t]=et[_t](St);return vt}}d.interpolateNumber=vl;function vl(de,De){return de=+de,De=+De,function(et){return de*(1-et)+De*et}}d.interpolateString=gs;function gs(de,De){var et=Vs.lastIndex=nc.lastIndex=0,vt,_t,St,ar=-1,zt=[],gr=[];for(de=de+"",De=De+"";(vt=Vs.exec(de))&&(_t=nc.exec(De));)(St=_t.index)>et&&(St=De.slice(et,St),zt[ar]?zt[ar]+=St:zt[++ar]=St),(vt=vt[0])===(_t=_t[0])?zt[ar]?zt[ar]+=_t:zt[++ar]=_t:(zt[++ar]=null,gr.push({i:ar,x:vl(vt,_t)})),et=nc.lastIndex;return et<De.length&&(St=De.slice(et),zt[ar]?zt[ar]+=St:zt[++ar]=St),zt.length<2?gr[0]?(De=gr[0].x,function(Vr){return De(Vr)+""}):function(){return De}:(De=gr.length,function(Vr){for(var Wr=0,Ta;Wr<De;++Wr)zt[(Ta=gr[Wr]).i]=Ta.x(Vr);return zt.join("")})}var Vs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(Vs.source,"g");d.interpolate=Nl;function Nl(de,De){for(var et=d.interpolators.length,vt;--et>=0&&!(vt=d.interpolators[et](de,De)););return vt}d.interpolators=[function(de,De){var et=typeof De;return(et==="string"?kr.has(De.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(De)?Ou:gs:De instanceof Ci?Ou:Array.isArray(De)?qu:et==="object"&&isNaN(De)?il:vl)(de,De)}],d.interpolateArray=qu;function qu(de,De){var et=[],vt=[],_t=de.length,St=De.length,ar=Math.min(de.length,De.length),zt;for(zt=0;zt<ar;++zt)et.push(Nl(de[zt],De[zt]));for(;zt<_t;++zt)vt[zt]=de[zt];for(;zt<St;++zt)vt[zt]=De[zt];return function(gr){for(zt=0;zt<ar;++zt)vt[zt]=et[zt](gr);return vt}}var cl=function(){return F},yh=d.map({linear:cl,poly:Mf,quad:function(){return Gc},cubic:function(){return Vu},sin:function(){return wc},exp:function(){return rf},circle:function(){return Kl},elastic:Yf,back:zf,bounce:function(){return af}}),ls=d.map({in:F,out:Ss,"in-out":Qn,"out-in":function(de){return Qn(Ss(de))}});d.ease=function(de){var De=de.indexOf("-"),et=De>=0?de.slice(0,De):de,vt=De>=0?de.slice(De+1):"in";return et=yh.get(et)||cl,vt=ls.get(vt)||F,_h(vt(et.apply(null,x.call(arguments,1))))};function _h(de){return function(De){return De<=0?0:De>=1?1:de(De)}}function Ss(de){return function(De){return 1-de(1-De)}}function Qn(de){return function(De){return .5*(De<.5?de(2*De):2-de(2-2*De))}}function Gc(de){return de*de}function Vu(de){return de*de*de}function Ul(de){if(de<=0)return 0;if(de>=1)return 1;var De=de*de,et=De*de;return 4*(de<.5?et:3*(de-De)+et-.75)}function Mf(de){return function(De){return Math.pow(De,de)}}function wc(de){return 1-Math.cos(de*Te)}function rf(de){return Math.pow(2,10*(de-1))}function Kl(de){return 1-Math.sqrt(1-de*de)}function Yf(de,De){var et;return arguments.length<2&&(De=.45),arguments.length?et=De/qe*Math.asin(1/de):(de=1,et=De/4),function(vt){return 1+de*Math.pow(2,-10*vt)*Math.sin((vt-et)*qe/De)}}function zf(de){return de||(de=1.70158),function(De){return De*De*((de+1)*De-de)}}function af(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}d.interpolateHcl=Nc;function Nc(de,De){de=d.hcl(de),De=d.hcl(De);var et=de.h,vt=de.c,_t=de.l,St=De.h-et,ar=De.c-vt,zt=De.l-_t;return isNaN(ar)&&(ar=0,vt=isNaN(vt)?De.c:vt),isNaN(St)?(St=0,et=isNaN(et)?De.h:et):St>180?St-=360:St<-180&&(St+=360),function(gr){return ta(et+St*gr,vt+ar*gr,_t+zt*gr)+""}}d.interpolateHsl=Ff;function Ff(de,De){de=d.hsl(de),De=d.hsl(De);var et=de.h,vt=de.s,_t=de.l,St=De.h-et,ar=De.s-vt,zt=De.l-_t;return isNaN(ar)&&(ar=0,vt=isNaN(vt)?De.s:vt),isNaN(St)?(St=0,et=isNaN(et)?De.h:et):St>180?St-=360:St<-180&&(St+=360),function(gr){return Kt(et+St*gr,vt+ar*gr,_t+zt*gr)+""}}d.interpolateLab=Of;function Of(de,De){de=d.lab(de),De=d.lab(De);var et=de.l,vt=de.a,_t=de.b,St=De.l-et,ar=De.a-vt,zt=De.b-_t;return function(gr){return mi(et+St*gr,vt+ar*gr,_t+zt*gr)+""}}d.interpolateRound=Gu;function Gu(de,De){return De-=de,function(et){return Math.round(de+De*et)}}d.transform=function(de){var De=M.createElementNS(d.ns.prefix.svg,"g");return(d.transform=function(et){if(et!=null){De.setAttribute("transform",et);var vt=De.transform.baseVal.consolidate()}return new Ef(vt?vt.matrix:Uc)})(de)};function Ef(de){var De=[de.a,de.b],et=[de.c,de.d],vt=Hc(De),_t=oc(De,et),St=Hc(Jl(et,De,-_t))||0;De[0]*et[1]<et[0]*De[1]&&(De[0]*=-1,De[1]*=-1,vt*=-1,_t*=-1),this.rotate=(vt?Math.atan2(De[1],De[0]):Math.atan2(-et[0],et[1]))*at,this.translate=[de.e,de.f],this.scale=[vt,St],this.skew=St?Math.atan2(_t,St)*at:0}Ef.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function oc(de,De){return de[0]*De[0]+de[1]*De[1]}function Hc(de){var De=Math.sqrt(oc(de,de));return De&&(de[0]/=De,de[1]/=De),De}function Jl(de,De,et){return de[0]+=et*De[0],de[1]+=et*De[1],de}var Uc={a:1,b:0,c:0,d:1,e:0,f:0};d.interpolateTransform=Wc;function Tc(de){return de.length?de.pop()+",":""}function Gs(de,De,et,vt){if(de[0]!==De[0]||de[1]!==De[1]){var _t=et.push("translate(",null,",",null,")");vt.push({i:_t-4,x:vl(de[0],De[0])},{i:_t-2,x:vl(de[1],De[1])})}else(De[0]||De[1])&&et.push("translate("+De+")")}function Cf(de,De,et,vt){de!==De?(de-De>180?De+=360:De-de>180&&(de+=360),vt.push({i:et.push(Tc(et)+"rotate(",null,")")-2,x:vl(de,De)})):De&&et.push(Tc(et)+"rotate("+De+")")}function lh(de,De,et,vt){de!==De?vt.push({i:et.push(Tc(et)+"skewX(",null,")")-2,x:vl(de,De)}):De&&et.push(Tc(et)+"skewX("+De+")")}function Bf(de,De,et,vt){if(de[0]!==De[0]||de[1]!==De[1]){var _t=et.push(Tc(et)+"scale(",null,",",null,")");vt.push({i:_t-4,x:vl(de[0],De[0])},{i:_t-2,x:vl(de[1],De[1])})}else(De[0]!==1||De[1]!==1)&&et.push(Tc(et)+"scale("+De+")")}function Wc(de,De){var et=[],vt=[];return de=d.transform(de),De=d.transform(De),Gs(de.translate,De.translate,et,vt),Cf(de.rotate,De.rotate,et,vt),lh(de.skew,De.skew,et,vt),Bf(de.scale,De.scale,et,vt),de=De=null,function(_t){for(var St=-1,ar=vt.length,zt;++St<ar;)et[(zt=vt[St]).i]=zt.x(_t);return et.join("")}}function Kf(de,De){return De=(De-=de=+de)||1/De,function(et){return(et-de)/De}}function ku(de,De){return De=(De-=de=+de)||1/De,function(et){return Math.max(0,Math.min(1,(et-de)/De))}}d.layout={},d.layout.bundle=function(){return function(de){for(var De=[],et=-1,vt=de.length;++et<vt;)De.push(Nf(de[et]));return De}};function Nf(de){for(var De=de.source,et=de.target,vt=Lu(De,et),_t=[De];De!==vt;)De=De.parent,_t.push(De);for(var St=_t.length;et!==vt;)_t.splice(St,0,et),et=et.parent;return _t}function ml(de){for(var De=[],et=de.parent;et!=null;)De.push(de),de=et,et=et.parent;return De.push(de),De}function Lu(de,De){if(de===De)return de;for(var et=ml(de),vt=ml(De),_t=et.pop(),St=vt.pop(),ar=null;_t===St;)ar=_t,_t=et.pop(),St=vt.pop();return ar}d.layout.chord=function(){var de={},De,et,vt,_t,St=0,ar,zt,gr;function Vr(){var Ta={},ya=[],ri=d.range(_t),ni=[],Ma,Na,Ka,vi,ui;for(De=[],et=[],Ma=0,vi=-1;++vi<_t;){for(Na=0,ui=-1;++ui<_t;)Na+=vt[vi][ui];ya.push(Na),ni.push(d.range(_t)),Ma+=Na}for(ar&&ri.sort(function($o,io){return ar(ya[$o],ya[io])}),zt&&ni.forEach(function($o,io){$o.sort(function(Zo,ul){return zt(vt[io][Zo],vt[io][ul])})}),Ma=(qe-St*_t)/Ma,Na=0,vi=-1;++vi<_t;){for(Ka=Na,ui=-1;++ui<_t;){var Pa=ri[vi],sn=ni[Pa][ui],an=vt[Pa][sn],vn=Na,Pn=Na+=an*Ma;Ta[Pa+"-"+sn]={index:Pa,subindex:sn,startAngle:vn,endAngle:Pn,value:an}}et[Pa]={index:Pa,startAngle:Ka,endAngle:Na,value:ya[Pa]},Na+=St}for(vi=-1;++vi<_t;)for(ui=vi-1;++ui<_t;){var Zn=Ta[vi+"-"+ui],eo=Ta[ui+"-"+vi];(Zn.value||eo.value)&&De.push(Zn.value<eo.value?{source:eo,target:Zn}:{source:Zn,target:eo})}gr&&Wr()}function Wr(){De.sort(function(Ta,ya){return gr((Ta.source.value+Ta.target.value)/2,(ya.source.value+ya.target.value)/2)})}return de.matrix=function(Ta){return arguments.length?(_t=(vt=Ta)&&vt.length,De=et=null,de):vt},de.padding=function(Ta){return arguments.length?(St=Ta,De=et=null,de):St},de.sortGroups=function(Ta){return arguments.length?(ar=Ta,De=et=null,de):ar},de.sortSubgroups=function(Ta){return arguments.length?(zt=Ta,De=null,de):zt},de.sortChords=function(Ta){return arguments.length?(gr=Ta,De&&Wr(),de):gr},de.chords=function(){return De||Vr(),De},de.groups=function(){return et||Vr(),et},de},d.layout.force=function(){var de={},De=d.dispatch("start","tick","end"),et,vt=[1,1],_t,St,ar=.9,zt=Ml,gr=Uf,Vr=-30,Wr=Jf,Ta=.1,ya=.64,ri=[],ni=[],Ma,Na,Ka;function vi(Pa){return function(sn,an,vn,Pn){if(sn.point!==Pa){var Zn=sn.cx-Pa.x,eo=sn.cy-Pa.y,$o=Pn-an,io=Zn*Zn+eo*eo;if($o*$o/ya<io){if(io<Wr){var Zo=sn.charge/io;Pa.px-=Zn*Zo,Pa.py-=eo*Zo}return!0}if(sn.point&&io&&io<Wr){var Zo=sn.pointCharge/io;Pa.px-=Zn*Zo,Pa.py-=eo*Zo}}return!sn.charge}}de.tick=function(){if((St*=.99)<.005)return et=null,De.end({type:"end",alpha:St=0}),!0;var Pa=ri.length,sn=ni.length,an,vn,Pn,Zn,eo,$o,io,Zo,ul;for(vn=0;vn<sn;++vn)Pn=ni[vn],Zn=Pn.source,eo=Pn.target,Zo=eo.x-Zn.x,ul=eo.y-Zn.y,($o=Zo*Zo+ul*ul)&&($o=St*Na[vn]*(($o=Math.sqrt($o))-Ma[vn])/$o,Zo*=$o,ul*=$o,eo.x-=Zo*(io=Zn.weight+eo.weight?Zn.weight/(Zn.weight+eo.weight):.5),eo.y-=ul*io,Zn.x+=Zo*(io=1-io),Zn.y+=ul*io);if((io=St*Ta)&&(Zo=vt[0]/2,ul=vt[1]/2,vn=-1,io))for(;++vn<Pa;)Pn=ri[vn],Pn.x+=(Zo-Pn.x)*io,Pn.y+=(ul-Pn.y)*io;if(Vr)for(bu(an=d.geom.quadtree(ri),St,Ka),vn=-1;++vn<Pa;)(Pn=ri[vn]).fixed||an.visit(vi(Pn));for(vn=-1;++vn<Pa;)Pn=ri[vn],Pn.fixed?(Pn.x=Pn.px,Pn.y=Pn.py):(Pn.x-=(Pn.px-(Pn.px=Pn.x))*ar,Pn.y-=(Pn.py-(Pn.py=Pn.y))*ar);De.tick({type:"tick",alpha:St})},de.nodes=function(Pa){return arguments.length?(ri=Pa,de):ri},de.links=function(Pa){return arguments.length?(ni=Pa,de):ni},de.size=function(Pa){return arguments.length?(vt=Pa,de):vt},de.linkDistance=function(Pa){return arguments.length?(zt=typeof Pa=="function"?Pa:+Pa,de):zt},de.distance=de.linkDistance,de.linkStrength=function(Pa){return arguments.length?(gr=typeof Pa=="function"?Pa:+Pa,de):gr},de.friction=function(Pa){return arguments.length?(ar=+Pa,de):ar},de.charge=function(Pa){return arguments.length?(Vr=typeof Pa=="function"?Pa:+Pa,de):Vr},de.chargeDistance=function(Pa){return arguments.length?(Wr=Pa*Pa,de):Math.sqrt(Wr)},de.gravity=function(Pa){return arguments.length?(Ta=+Pa,de):Ta},de.theta=function(Pa){return arguments.length?(ya=Pa*Pa,de):Math.sqrt(ya)},de.alpha=function(Pa){return arguments.length?(Pa=+Pa,St?Pa>0?St=Pa:(et.c=null,et.t=NaN,et=null,De.end({type:"end",alpha:St=0})):Pa>0&&(De.start({type:"start",alpha:St=Pa}),et=kn(de.tick)),de):St},de.start=function(){var Pa,sn=ri.length,an=ni.length,vn=vt[0],Pn=vt[1],Zn,eo;for(Pa=0;Pa<sn;++Pa)(eo=ri[Pa]).index=Pa,eo.weight=0;for(Pa=0;Pa<an;++Pa)eo=ni[Pa],typeof eo.source=="number"&&(eo.source=ri[eo.source]),typeof eo.target=="number"&&(eo.target=ri[eo.target]),++eo.source.weight,++eo.target.weight;for(Pa=0;Pa<sn;++Pa)eo=ri[Pa],isNaN(eo.x)&&(eo.x=$o("x",vn)),isNaN(eo.y)&&(eo.y=$o("y",Pn)),isNaN(eo.px)&&(eo.px=eo.x),isNaN(eo.py)&&(eo.py=eo.y);if(Ma=[],typeof zt=="function")for(Pa=0;Pa<an;++Pa)Ma[Pa]=+zt.call(this,ni[Pa],Pa);else for(Pa=0;Pa<an;++Pa)Ma[Pa]=zt;if(Na=[],typeof gr=="function")for(Pa=0;Pa<an;++Pa)Na[Pa]=+gr.call(this,ni[Pa],Pa);else for(Pa=0;Pa<an;++Pa)Na[Pa]=gr;if(Ka=[],typeof Vr=="function")for(Pa=0;Pa<sn;++Pa)Ka[Pa]=+Vr.call(this,ri[Pa],Pa);else for(Pa=0;Pa<sn;++Pa)Ka[Pa]=Vr;function $o(io,Zo){if(!Zn){for(Zn=new Array(sn),_l=0;_l<sn;++_l)Zn[_l]=[];for(_l=0;_l<an;++_l){var ul=ni[_l];Zn[ul.source.index].push(ul.target),Zn[ul.target.index].push(ul.source)}}for(var el=Zn[Pa],_l=-1,gn=el.length,vo;++_l<gn;)if(!isNaN(vo=el[_l][io]))return vo;return Math.random()*Zo}return de.resume()},de.resume=function(){return de.alpha(.1)},de.stop=function(){return de.alpha(0)},de.drag=function(){if(_t||(_t=d.behavior.drag().origin(F).on("dragstart.force",Ac).on("drag.force",ui).on("dragend.force",nl)),!arguments.length)return _t;this.on("mouseover.force",dc).on("mouseout.force",vu).call(_t)};function ui(Pa){Pa.px=d.event.x,Pa.py=d.event.y,de.resume()}return d.rebind(de,De,"on")};function Ac(de){de.fixed|=2}function nl(de){de.fixed&=-7}function dc(de){de.fixed|=4,de.px=de.x,de.py=de.y}function vu(de){de.fixed&=-5}function bu(de,De,et){var vt=0,_t=0;if(de.charge=0,!de.leaf)for(var St=de.nodes,ar=St.length,zt=-1,gr;++zt<ar;)gr=St[zt],gr!=null&&(bu(gr,De,et),de.charge+=gr.charge,vt+=gr.charge*gr.cx,_t+=gr.charge*gr.cy);if(de.point){de.leaf||(de.point.x+=Math.random()-.5,de.point.y+=Math.random()-.5);var Vr=De*et[de.point.index];de.charge+=de.pointCharge=Vr,vt+=Vr*de.point.x,_t+=Vr*de.point.y}de.cx=vt/de.charge,de.cy=_t/de.charge}var Ml=20,Uf=1,Jf=1/0;d.layout.hierarchy=function(){var de=df,De=Lh,et=nf;function vt(_t){var St=[_t],ar=[],zt;for(_t.depth=0;(zt=St.pop())!=null;)if(ar.push(zt),(Vr=De.call(vt,zt,zt.depth))&&(gr=Vr.length)){for(var gr,Vr,Wr;--gr>=0;)St.push(Wr=Vr[gr]),Wr.parent=zt,Wr.depth=zt.depth+1;et&&(zt.value=0),zt.children=Vr}else et&&(zt.value=+et.call(vt,zt,zt.depth)||0),delete zt.children;return vc(_t,function(Ta){var ya,ri;de&&(ya=Ta.children)&&ya.sort(de),et&&(ri=Ta.parent)&&(ri.value+=Ta.value)}),ar}return vt.sort=function(_t){return arguments.length?(de=_t,vt):de},vt.children=function(_t){return arguments.length?(De=_t,vt):De},vt.value=function(_t){return arguments.length?(et=_t,vt):et},vt.revalue=function(_t){return et&&(Sc(_t,function(St){St.children&&(St.value=0)}),vc(_t,function(St){var ar;St.children||(St.value=+et.call(vt,St,St.depth)||0),(ar=St.parent)&&(ar.value+=St.value)})),_t},vt};function Bu(de,De){return d.rebind(de,De,"sort","children","value"),de.nodes=de,de.links=Nu,de}function Sc(de,De){for(var et=[de];(de=et.pop())!=null;)if(De(de),(_t=de.children)&&(vt=_t.length))for(var vt,_t;--vt>=0;)et.push(_t[vt])}function vc(de,De){for(var et=[de],vt=[];(de=et.pop())!=null;)if(vt.push(de),(ar=de.children)&&(St=ar.length))for(var _t=-1,St,ar;++_t<St;)et.push(ar[_t]);for(;(de=vt.pop())!=null;)De(de)}function Lh(de){return de.children}function nf(de){return de.value}function df(de,De){return De.value-de.value}function Nu(de){return d.merge(de.map(function(De){return(De.children||[]).map(function(et){return{source:De,target:et}})}))}d.layout.partition=function(){var de=d.layout.hierarchy(),De=[1,1];function et(St,ar,zt,gr){var Vr=St.children;if(St.x=ar,St.y=St.depth*gr,St.dx=zt,St.dy=gr,Vr&&(Ta=Vr.length)){var Wr=-1,Ta,ya,ri;for(zt=St.value?zt/St.value:0;++Wr<Ta;)et(ya=Vr[Wr],ar,ri=ya.value*zt,gr),ar+=ri}}function vt(St){var ar=St.children,zt=0;if(ar&&(Vr=ar.length))for(var gr=-1,Vr;++gr<Vr;)zt=Math.max(zt,vt(ar[gr]));return 1+zt}function _t(St,ar){var zt=de.call(this,St,ar);return et(zt[0],0,De[0],De[1]/vt(zt[0])),zt}return _t.size=function(St){return arguments.length?(De=St,_t):De},Bu(_t,de)},d.layout.pie=function(){var de=Number,De=of,et=0,vt=qe,_t=0;function St(ar){var zt=ar.length,gr=ar.map(function(vi,ui){return+de.call(St,vi,ui)}),Vr=+(typeof et=="function"?et.apply(this,arguments):et),Wr=(typeof vt=="function"?vt.apply(this,arguments):vt)-Vr,Ta=Math.min(Math.abs(Wr)/zt,+(typeof _t=="function"?_t.apply(this,arguments):_t)),ya=Ta*(Wr<0?-1:1),ri=d.sum(gr),ni=ri?(Wr-zt*ya)/ri:0,Ma=d.range(zt),Na=[],Ka;return De!=null&&Ma.sort(De===of?function(vi,ui){return gr[ui]-gr[vi]}:function(vi,ui){return De(ar[vi],ar[ui])}),Ma.forEach(function(vi){Na[vi]={data:ar[vi],value:Ka=gr[vi],startAngle:Vr,endAngle:Vr+=Ka*ni+ya,padAngle:Ta}}),Na}return St.value=function(ar){return arguments.length?(de=ar,St):de},St.sort=function(ar){return arguments.length?(De=ar,St):De},St.startAngle=function(ar){return arguments.length?(et=ar,St):et},St.endAngle=function(ar){return arguments.length?(vt=ar,St):vt},St.padAngle=function(ar){return arguments.length?(_t=ar,St):_t},St};var of={};d.layout.stack=function(){var de=F,De=mu,et=Pu,vt=uh,_t=tu,St=Xc;function ar(zt,gr){if(!(ni=zt.length))return zt;var Vr=zt.map(function(vi,ui){return de.call(ar,vi,ui)}),Wr=Vr.map(function(vi){return vi.map(function(ui,Pa){return[_t.call(ar,ui,Pa),St.call(ar,ui,Pa)]})}),Ta=De.call(ar,Wr,gr);Vr=d.permute(Vr,Ta),Wr=d.permute(Wr,Ta);var ya=et.call(ar,Wr,gr),ri=Vr[0].length,ni,Ma,Na,Ka;for(Na=0;Na<ri;++Na)for(vt.call(ar,Vr[0][Na],Ka=ya[Na],Wr[0][Na][1]),Ma=1;Ma<ni;++Ma)vt.call(ar,Vr[Ma][Na],Ka+=Wr[Ma-1][Na][1],Wr[Ma][Na][1]);return zt}return ar.values=function(zt){return arguments.length?(de=zt,ar):de},ar.order=function(zt){return arguments.length?(De=typeof zt=="function"?zt:vf.get(zt)||mu,ar):De},ar.offset=function(zt){return arguments.length?(et=typeof zt=="function"?zt:ol.get(zt)||Pu,ar):et},ar.x=function(zt){return arguments.length?(_t=zt,ar):_t},ar.y=function(zt){return arguments.length?(St=zt,ar):St},ar.out=function(zt){return arguments.length?(vt=zt,ar):vt},ar};function tu(de){return de.x}function Xc(de){return de.y}function uh(de,De,et){de.y0=De,de.y=et}var vf=d.map({"inside-out":function(de){var De=de.length,et,vt,_t=de.map(kf),St=de.map(hl),ar=d.range(De).sort(function(Ta,ya){return _t[Ta]-_t[ya]}),zt=0,gr=0,Vr=[],Wr=[];for(et=0;et<De;++et)vt=ar[et],zt<gr?(zt+=St[vt],Vr.push(vt)):(gr+=St[vt],Wr.push(vt));return Wr.reverse().concat(Vr)},reverse:function(de){return d.range(de.length).reverse()},default:mu}),ol=d.map({silhouette:function(de){var De=de.length,et=de[0].length,vt=[],_t=0,St,ar,zt,gr=[];for(ar=0;ar<et;++ar){for(St=0,zt=0;St<De;St++)zt+=de[St][ar][1];zt>_t&&(_t=zt),vt.push(zt)}for(ar=0;ar<et;++ar)gr[ar]=(_t-vt[ar])/2;return gr},wiggle:function(de){var De=de.length,et=de[0],vt=et.length,_t,St,ar,zt,gr,Vr,Wr,Ta,ya,ri=[];for(ri[0]=Ta=ya=0,St=1;St<vt;++St){for(_t=0,zt=0;_t<De;++_t)zt+=de[_t][St][1];for(_t=0,gr=0,Wr=et[St][0]-et[St-1][0];_t<De;++_t){for(ar=0,Vr=(de[_t][St][1]-de[_t][St-1][1])/(2*Wr);ar<_t;++ar)Vr+=(de[ar][St][1]-de[ar][St-1][1])/Wr;gr+=Vr*de[_t][St][1]}ri[St]=Ta-=zt?gr/zt*Wr:0,Ta<ya&&(ya=Ta)}for(St=0;St<vt;++St)ri[St]-=ya;return ri},expand:function(de){var De=de.length,et=de[0].length,vt=1/De,_t,St,ar,zt=[];for(St=0;St<et;++St){for(_t=0,ar=0;_t<De;_t++)ar+=de[_t][St][1];if(ar)for(_t=0;_t<De;_t++)de[_t][St][1]/=ar;else for(_t=0;_t<De;_t++)de[_t][St][1]=vt}for(St=0;St<et;++St)zt[St]=0;return zt},zero:Pu});function mu(de){return d.range(de.length)}function Pu(de){for(var De=-1,et=de[0].length,vt=[];++De<et;)vt[De]=0;return vt}function kf(de){for(var De=1,et=0,vt=de[0][1],_t,St=de.length;De<St;++De)(_t=de[De][1])>vt&&(et=De,vt=_t);return et}function hl(de){return de.reduce(sf,0)}function sf(de,De){return de+De[1]}d.layout.histogram=function(){var de=!0,De=Number,et=mf,vt=Mc;function _t(St,ya){for(var zt=[],gr=St.map(De,this),Vr=et.call(this,gr,ya),Wr=vt.call(this,Vr,gr,ya),Ta,ya=-1,ri=gr.length,ni=Wr.length-1,Ma=de?1:1/ri,Na;++ya<ni;)Ta=zt[ya]=[],Ta.dx=Wr[ya+1]-(Ta.x=Wr[ya]),Ta.y=0;if(ni>0)for(ya=-1;++ya<ri;)Na=gr[ya],Na>=Vr[0]&&Na<=Vr[1]&&(Ta=zt[d.bisect(Wr,Na,1,ni)-1],Ta.y+=Ma,Ta.push(St[ya]));return zt}return _t.value=function(St){return arguments.length?(De=St,_t):De},_t.range=function(St){return arguments.length?(et=ia(St),_t):et},_t.bins=function(St){return arguments.length?(vt=typeof St=="number"?function(ar){return Hu(ar,St)}:ia(St),_t):vt},_t.frequency=function(St){return arguments.length?(de=!!St,_t):de},_t};function Mc(de,De){return Hu(de,Math.ceil(Math.log(De.length)/Math.LN2+1))}function Hu(de,De){for(var et=-1,vt=+de[0],_t=(de[1]-vt)/De,St=[];++et<=De;)St[et]=_t*et+vt;return St}function mf(de){return[d.min(de),d.max(de)]}d.layout.pack=function(){var de=d.layout.hierarchy().sort(Wu),De=0,et=[1,1],vt;function _t(St,ar){var zt=de.call(this,St,ar),gr=zt[0],Vr=et[0],Wr=et[1],Ta=vt==null?Math.sqrt:typeof vt=="function"?vt:function(){return vt};if(gr.x=gr.y=0,vc(gr,function(ri){ri.r=+Ta(ri.value)}),vc(gr,jf),De){var ya=De*(vt?1:Math.max(2*gr.r/Vr,2*gr.r/Wr))/2;vc(gr,function(ri){ri.r+=ya}),vc(gr,jf),vc(gr,function(ri){ri.r-=ya})}return mc(gr,Vr/2,Wr/2,vt?1:1/Math.max(2*gr.r/Vr,2*gr.r/Wr)),zt}return _t.size=function(St){return arguments.length?(et=St,_t):et},_t.radius=function(St){return arguments.length?(vt=St==null||typeof St=="function"?St:+St,_t):vt},_t.padding=function(St){return arguments.length?(De=+St,_t):De},Bu(_t,de)};function Wu(de,De){return de.value-De.value}function Zc(de,De){var et=de._pack_next;de._pack_next=De,De._pack_prev=de,De._pack_next=et,et._pack_prev=De}function Lf(de,De){de._pack_next=De,De._pack_prev=de}function ru(de,De){var et=De.x-de.x,vt=De.y-de.y,_t=de.r+De.r;return .999*_t*_t>et*et+vt*vt}function jf(de){if(!(De=de.children)||!(ya=De.length))return;var De,et=1/0,vt=-1/0,_t=1/0,St=-1/0,ar,zt,gr,Vr,Wr,Ta,ya;function ri(Pa){et=Math.min(Pa.x-Pa.r,et),vt=Math.max(Pa.x+Pa.r,vt),_t=Math.min(Pa.y-Pa.r,_t),St=Math.max(Pa.y+Pa.r,St)}if(De.forEach(Xu),ar=De[0],ar.x=-ar.r,ar.y=0,ri(ar),ya>1&&(zt=De[1],zt.x=zt.r,zt.y=0,ri(zt),ya>2))for(gr=De[2],jl(ar,zt,gr),ri(gr),Zc(ar,gr),ar._pack_prev=gr,Zc(gr,zt),zt=ar._pack_next,Vr=3;Vr<ya;Vr++){jl(ar,zt,gr=De[Vr]);var ni=0,Ma=1,Na=1;for(Wr=zt._pack_next;Wr!==zt;Wr=Wr._pack_next,Ma++)if(ru(Wr,gr)){ni=1;break}if(ni==1)for(Ta=ar._pack_prev;Ta!==Wr._pack_prev&&!ru(Ta,gr);Ta=Ta._pack_prev,Na++);ni?(Ma<Na||Ma==Na&&zt.r<ar.r?Lf(ar,zt=Wr):Lf(ar=Ta,zt),Vr--):(Zc(ar,gr),zt=gr,ri(gr))}var Ka=(et+vt)/2,vi=(_t+St)/2,ui=0;for(Vr=0;Vr<ya;Vr++)gr=De[Vr],gr.x-=Ka,gr.y-=vi,ui=Math.max(ui,gr.r+Math.sqrt(gr.x*gr.x+gr.y*gr.y));de.r=ui,De.forEach(Ec)}function Xu(de){de._pack_next=de._pack_prev=de}function Ec(de){delete de._pack_next,delete de._pack_prev}function mc(de,De,et,vt){var _t=de.children;if(de.x=De+=vt*de.x,de.y=et+=vt*de.y,de.r*=vt,_t)for(var St=-1,ar=_t.length;++St<ar;)mc(_t[St],De,et,vt)}function jl(de,De,et){var vt=de.r+et.r,_t=De.x-de.x,St=De.y-de.y;if(vt&&(_t||St)){var ar=De.r+et.r,zt=_t*_t+St*St;ar*=ar,vt*=vt;var gr=.5+(vt-ar)/(2*zt),Vr=Math.sqrt(Math.max(0,2*ar*(vt+zt)-(vt-=zt)*vt-ar*ar))/(2*zt);et.x=de.x+gr*_t+Vr*St,et.y=de.y+gr*St-Vr*_t}else et.x=de.x+vt,et.y=de.y}d.layout.tree=function(){var de=d.layout.hierarchy().sort(null).value(null),De=gu,et=[1,1],vt=null;function _t(Wr,Ta){var ya=de.call(this,Wr,Ta),ri=ya[0],ni=St(ri);if(vc(ni,ar),ni.parent.m=-ni.z,Sc(ni,zt),vt)Sc(ri,Vr);else{var Ma=ri,Na=ri,Ka=ri;Sc(ri,function(sn){sn.x<Ma.x&&(Ma=sn),sn.x>Na.x&&(Na=sn),sn.depth>Ka.depth&&(Ka=sn)});var vi=De(Ma,Na)/2-Ma.x,ui=et[0]/(Na.x+De(Na,Ma)/2+vi),Pa=et[1]/(Ka.depth||1);Sc(ri,function(sn){sn.x=(sn.x+vi)*ui,sn.y=sn.depth*Pa})}return ya}function St(Wr){for(var Ta={A:null,children:[Wr]},ya=[Ta],ri;(ri=ya.pop())!=null;)for(var ni=ri.children,Ma,Na=0,Ka=ni.length;Na<Ka;++Na)ya.push((ni[Na]=Ma={_:ni[Na],parent:ri,children:(Ma=ni[Na].children)&&Ma.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Na}).a=Ma);return Ta.children[0]}function ar(Wr){var Ta=Wr.children,ya=Wr.parent.children,ri=Wr.i?ya[Wr.i-1]:null;if(Ta.length){kc(Wr);var ni=(Ta[0].z+Ta[Ta.length-1].z)/2;ri?(Wr.z=ri.z+De(Wr._,ri._),Wr.m=Wr.z-ni):Wr.z=ni}else ri&&(Wr.z=ri.z+De(Wr._,ri._));Wr.parent.A=gr(Wr,ri,Wr.parent.A||ya[0])}function zt(Wr){Wr._.x=Wr.z+Wr.parent.m,Wr.m+=Wr.parent.m}function gr(Wr,Ta,ya){if(Ta){for(var ri=Wr,ni=Wr,Ma=Ta,Na=ri.parent.children[0],Ka=ri.m,vi=ni.m,ui=Ma.m,Pa=Na.m,sn;Ma=Yc(Ma),ri=Cc(ri),Ma&&ri;)Na=Cc(Na),ni=Yc(ni),ni.a=Wr,sn=Ma.z+ui-ri.z-Ka+De(Ma._,ri._),sn>0&&(sc(er(Ma,Wr,ya),Wr,sn),Ka+=sn,vi+=sn),ui+=Ma.m,Ka+=ri.m,Pa+=Na.m,vi+=ni.m;Ma&&!Yc(ni)&&(ni.t=Ma,ni.m+=ui-vi),ri&&!Cc(Na)&&(Na.t=ri,Na.m+=Ka-Pa,ya=Wr)}return ya}function Vr(Wr){Wr.x*=et[0],Wr.y=Wr.depth*et[1]}return _t.separation=function(Wr){return arguments.length?(De=Wr,_t):De},_t.size=function(Wr){return arguments.length?(vt=(et=Wr)==null?Vr:null,_t):vt?null:et},_t.nodeSize=function(Wr){return arguments.length?(vt=(et=Wr)==null?null:Vr,_t):vt?et:null},Bu(_t,de)};function gu(de,De){return de.parent==De.parent?1:2}function Cc(de){var De=de.children;return De.length?De[0]:de.t}function Yc(de){var De=de.children,et;return(et=De.length)?De[et-1]:de.t}function sc(de,De,et){var vt=et/(De.i-de.i);De.c-=vt,De.s+=et,de.c+=vt,De.z+=et,De.m+=et}function kc(de){for(var De=0,et=0,vt=de.children,_t=vt.length,St;--_t>=0;)St=vt[_t],St.z+=De,St.m+=De,De+=St.s+(et+=St.c)}function er(de,De,et){return de.a.parent===De.parent?de.a:et}d.layout.cluster=function(){var de=d.layout.hierarchy().sort(null).value(null),De=gu,et=[1,1],vt=!1;function _t(St,ar){var zt=de.call(this,St,ar),gr=zt[0],Vr,Wr=0;vc(gr,function(Ma){var Na=Ma.children;Na&&Na.length?(Ma.x=na(Na),Ma.y=yr(Na)):(Ma.x=Vr?Wr+=De(Ma,Vr):0,Ma.y=0,Vr=Ma)});var Ta=$r(gr),ya=La(gr),ri=Ta.x-De(Ta,ya)/2,ni=ya.x+De(ya,Ta)/2;return vc(gr,vt?function(Ma){Ma.x=(Ma.x-gr.x)*et[0],Ma.y=(gr.y-Ma.y)*et[1]}:function(Ma){Ma.x=(Ma.x-ri)/(ni-ri)*et[0],Ma.y=(1-(gr.y?Ma.y/gr.y:1))*et[1]}),zt}return _t.separation=function(St){return arguments.length?(De=St,_t):De},_t.size=function(St){return arguments.length?(vt=(et=St)==null,_t):vt?null:et},_t.nodeSize=function(St){return arguments.length?(vt=(et=St)!=null,_t):vt?et:null},Bu(_t,de)};function yr(de){return 1+d.max(de,function(De){return De.y})}function na(de){return de.reduce(function(De,et){return De+et.x},0)/de.length}function $r(de){var De=de.children;return De&&De.length?$r(De[0]):de}function La(de){var De=de.children,et;return De&&(et=De.length)?La(De[et-1]):de}d.layout.treemap=function(){var de=d.layout.hierarchy(),De=Math.round,et=[1,1],vt=null,_t=hi,St=!1,ar,zt="squarify",gr=.5*(1+Math.sqrt(5));function Vr(Ma,Na){for(var Ka=-1,vi=Ma.length,ui,Pa;++Ka<vi;)Pa=(ui=Ma[Ka]).value*(Na<0?0:Na),ui.area=isNaN(Pa)||Pa<=0?0:Pa}function Wr(Ma){var Na=Ma.children;if(Na&&Na.length){var Ka=_t(Ma),vi=[],ui=Na.slice(),Pa,sn=1/0,an,vn=zt==="slice"?Ka.dx:zt==="dice"?Ka.dy:zt==="slice-dice"?Ma.depth&1?Ka.dy:Ka.dx:Math.min(Ka.dx,Ka.dy),Pn;for(Vr(ui,Ka.dx*Ka.dy/Ma.value),vi.area=0;(Pn=ui.length)>0;)vi.push(Pa=ui[Pn-1]),vi.area+=Pa.area,zt!=="squarify"||(an=ya(vi,vn))<=sn?(ui.pop(),sn=an):(vi.area-=vi.pop().area,ri(vi,vn,Ka,!1),vn=Math.min(Ka.dx,Ka.dy),vi.length=vi.area=0,sn=1/0);vi.length&&(ri(vi,vn,Ka,!0),vi.length=vi.area=0),Na.forEach(Wr)}}function Ta(Ma){var Na=Ma.children;if(Na&&Na.length){var Ka=_t(Ma),vi=Na.slice(),ui,Pa=[];for(Vr(vi,Ka.dx*Ka.dy/Ma.value),Pa.area=0;ui=vi.pop();)Pa.push(ui),Pa.area+=ui.area,ui.z!=null&&(ri(Pa,ui.z?Ka.dx:Ka.dy,Ka,!vi.length),Pa.length=Pa.area=0);Na.forEach(Ta)}}function ya(Ma,Na){for(var Ka=Ma.area,vi,ui=0,Pa=1/0,sn=-1,an=Ma.length;++sn<an;)(vi=Ma[sn].area)&&(vi<Pa&&(Pa=vi),vi>ui&&(ui=vi));return Ka*=Ka,Na*=Na,Ka?Math.max(Na*ui*gr/Ka,Ka/(Na*Pa*gr)):1/0}function ri(Ma,Na,Ka,vi){var ui=-1,Pa=Ma.length,sn=Ka.x,an=Ka.y,vn=Na?De(Ma.area/Na):0,Pn;if(Na==Ka.dx){for((vi||vn>Ka.dy)&&(vn=Ka.dy);++ui<Pa;)Pn=Ma[ui],Pn.x=sn,Pn.y=an,Pn.dy=vn,sn+=Pn.dx=Math.min(Ka.x+Ka.dx-sn,vn?De(Pn.area/vn):0);Pn.z=!0,Pn.dx+=Ka.x+Ka.dx-sn,Ka.y+=vn,Ka.dy-=vn}else{for((vi||vn>Ka.dx)&&(vn=Ka.dx);++ui<Pa;)Pn=Ma[ui],Pn.x=sn,Pn.y=an,Pn.dx=vn,an+=Pn.dy=Math.min(Ka.y+Ka.dy-an,vn?De(Pn.area/vn):0);Pn.z=!1,Pn.dy+=Ka.y+Ka.dy-an,Ka.x+=vn,Ka.dx-=vn}}function ni(Ma){var Na=ar||de(Ma),Ka=Na[0];return Ka.x=Ka.y=0,Ka.value?(Ka.dx=et[0],Ka.dy=et[1]):Ka.dx=Ka.dy=0,ar&&de.revalue(Ka),Vr([Ka],Ka.dx*Ka.dy/Ka.value),(ar?Ta:Wr)(Ka),St&&(ar=Na),Na}return ni.size=function(Ma){return arguments.length?(et=Ma,ni):et},ni.padding=function(Ma){if(!arguments.length)return vt;function Na(ui){var Pa=Ma.call(ni,ui,ui.depth);return Pa==null?hi(ui):Pi(ui,typeof Pa=="number"?[Pa,Pa,Pa,Pa]:Pa)}function Ka(ui){return Pi(ui,Ma)}var vi;return _t=(vt=Ma)==null?hi:(vi=typeof Ma)=="function"?Na:(vi==="number"&&(Ma=[Ma,Ma,Ma,Ma]),Ka),ni},ni.round=function(Ma){return arguments.length?(De=Ma?Math.round:Number,ni):De!=Number},ni.sticky=function(Ma){return arguments.length?(St=Ma,ar=null,ni):St},ni.ratio=function(Ma){return arguments.length?(gr=Ma,ni):gr},ni.mode=function(Ma){return arguments.length?(zt=Ma+"",ni):zt},Bu(ni,de)};function hi(de){return{x:de.x,y:de.y,dx:de.dx,dy:de.dy}}function Pi(de,De){var et=de.x+De[3],vt=de.y+De[0],_t=de.dx-De[1]-De[3],St=de.dy-De[0]-De[2];return _t<0&&(et+=_t/2,_t=0),St<0&&(vt+=St/2,St=0),{x:et,y:vt,dx:_t,dy:St}}d.random={normal:function(de,De){var et=arguments.length;return et<2&&(De=1),et<1&&(de=0),function(){var vt,_t,St;do vt=Math.random()*2-1,_t=Math.random()*2-1,St=vt*vt+_t*_t;while(!St||St>1);return de+De*vt*Math.sqrt(-2*Math.log(St)/St)}},logNormal:function(){var de=d.random.normal.apply(d,arguments);return function(){return Math.exp(de())}},bates:function(de){var De=d.random.irwinHall(de);return function(){return De()/de}},irwinHall:function(de){return function(){for(var De=0,et=0;et<de;et++)De+=Math.random();return De}}},d.scale={};function Zi(de){var De=de[0],et=de[de.length-1];return De<et?[De,et]:[et,De]}function tn(de){return de.rangeExtent?de.rangeExtent():Zi(de.range())}function dn(de,De,et,vt){var _t=et(de[0],de[1]),St=vt(De[0],De[1]);return function(ar){return St(_t(ar))}}function Ri(de,De){var et=0,vt=de.length-1,_t=de[et],St=de[vt],ar;return St<_t&&(ar=et,et=vt,vt=ar,ar=_t,_t=St,St=ar),de[et]=De.floor(_t),de[vt]=De.ceil(St),de}function Fi(de){return de?{floor:function(De){return Math.floor(De/de)*de},ceil:function(De){return Math.ceil(De/de)*de}}:qi}var qi={floor:F,ceil:F};function _i(de,De,et,vt){var _t=[],St=[],ar=0,zt=Math.min(de.length,De.length)-1;for(de[zt]<de[0]&&(de=de.slice().reverse(),De=De.slice().reverse());++ar<=zt;)_t.push(et(de[ar-1],de[ar])),St.push(vt(De[ar-1],De[ar]));return function(gr){var Vr=d.bisect(de,gr,1,zt)-1;return St[Vr](_t[Vr](gr))}}d.scale.linear=function(){return Mn([0,1],[0,1],Nl,!1)};function Mn(de,De,et,vt){var _t,St;function ar(){var gr=Math.min(de.length,De.length)>2?_i:dn,Vr=vt?ku:Kf;return _t=gr(de,De,Vr,et),St=gr(De,de,Vr,Nl),zt}function zt(gr){return _t(gr)}return zt.invert=function(gr){return St(gr)},zt.domain=function(gr){return arguments.length?(de=gr.map(Number),ar()):de},zt.range=function(gr){return arguments.length?(De=gr,ar()):De},zt.rangeRound=function(gr){return zt.range(gr).interpolate(Gu)},zt.clamp=function(gr){return arguments.length?(vt=gr,ar()):vt},zt.interpolate=function(gr){return arguments.length?(et=gr,ar()):et},zt.ticks=function(gr){return co(de,gr)},zt.tickFormat=function(gr,Vr){return d3_scale_linearTickFormat(de,gr,Vr)},zt.nice=function(gr){return ao(de,gr),ar()},zt.copy=function(){return Mn(de,De,et,vt)},ar()}function Kn(de,De){return d.rebind(de,De,"range","rangeRound","interpolate","clamp")}function ao(de,De){return Ri(de,Fi(Jn(de,De)[2])),Ri(de,Fi(Jn(de,De)[2])),de}function Jn(de,De){De==null&&(De=10);var et=Zi(de),vt=et[1]-et[0],_t=Math.pow(10,Math.floor(Math.log(vt/De)/Math.LN10)),St=De/vt*_t;return St<=.15?_t*=10:St<=.35?_t*=5:St<=.75&&(_t*=2),et[0]=Math.ceil(et[0]/_t)*_t,et[1]=Math.floor(et[1]/_t)*_t+_t*.5,et[2]=_t,et}function co(de,De){return d.range.apply(d,Jn(de,De))}var wn={s:1,g:1,p:1,r:1,e:1};function un(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function _o(de,De){var et=un(De[2]);return de in wn?Math.abs(et-un(Math.max(l(De[0]),l(De[1]))))+ +(de!=="e"):et-(de==="%")*2}d.scale.log=function(){return Qo(d.scale.linear().domain([0,1]),10,!0,[1,10])};function Qo(de,De,et,vt){function _t(zt){return(et?Math.log(zt<0?0:zt):-Math.log(zt>0?0:-zt))/Math.log(De)}function St(zt){return et?Math.pow(De,zt):-Math.pow(De,-zt)}function ar(zt){return de(_t(zt))}return ar.invert=function(zt){return St(de.invert(zt))},ar.domain=function(zt){return arguments.length?(et=zt[0]>=0,de.domain((vt=zt.map(Number)).map(_t)),ar):vt},ar.base=function(zt){return arguments.length?(De=+zt,de.domain(vt.map(_t)),ar):De},ar.nice=function(){var zt=Ri(vt.map(_t),et?Math:xs);return de.domain(zt),vt=zt.map(St),ar},ar.ticks=function(){var zt=Zi(vt),gr=[],Vr=zt[0],Wr=zt[1],Ta=Math.floor(_t(Vr)),ya=Math.ceil(_t(Wr)),ri=De%1?2:De;if(isFinite(ya-Ta)){if(et){for(;Ta<ya;Ta++)for(var ni=1;ni<ri;ni++)gr.push(St(Ta)*ni);gr.push(St(Ta))}else for(gr.push(St(Ta));Ta++<ya;)for(var ni=ri-1;ni>0;ni--)gr.push(St(Ta)*ni);for(Ta=0;gr[Ta]<Vr;Ta++);for(ya=gr.length;gr[ya-1]>Wr;ya--);gr=gr.slice(Ta,ya)}return gr},ar.copy=function(){return Qo(de.copy(),De,et,vt)},Kn(ar,de)}var xs={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};d.scale.pow=function(){return Qs(d.scale.linear(),1,[0,1])};function Qs(de,De,et){var vt=Rs(De),_t=Rs(1/De);function St(ar){return de(vt(ar))}return St.invert=function(ar){return _t(de.invert(ar))},St.domain=function(ar){return arguments.length?(de.domain((et=ar.map(Number)).map(vt)),St):et},St.ticks=function(ar){return co(et,ar)},St.tickFormat=function(ar,zt){return d3_scale_linearTickFormat(et,ar,zt)},St.nice=function(ar){return St.domain(ao(et,ar))},St.exponent=function(ar){return arguments.length?(vt=Rs(De=ar),_t=Rs(1/De),de.domain(et.map(vt)),St):De},St.copy=function(){return Qs(de.copy(),De,et)},Kn(St,de)}function Rs(de){return function(De){return De<0?-Math.pow(-De,de):Math.pow(De,de)}}d.scale.sqrt=function(){return d.scale.pow().exponent(.5)},d.scale.ordinal=function(){return Ks([],{t:"range",a:[[]]})};function Ks(de,De){var et,vt,_t;function St(zt){return vt[((et.get(zt)||(De.t==="range"?et.set(zt,de.push(zt)):NaN))-1)%vt.length]}function ar(zt,gr){return d.range(de.length).map(function(Vr){return zt+gr*Vr})}return St.domain=function(zt){if(!arguments.length)return de;de=[],et=new S;for(var gr=-1,Vr=zt.length,Wr;++gr<Vr;)et.has(Wr=zt[gr])||et.set(Wr,de.push(Wr));return St[De.t].apply(St,De.a)},St.range=function(zt){return arguments.length?(vt=zt,_t=0,De={t:"range",a:arguments},St):vt},St.rangePoints=function(zt,gr){arguments.length<2&&(gr=0);var Vr=zt[0],Wr=zt[1],Ta=de.length<2?(Vr=(Vr+Wr)/2,0):(Wr-Vr)/(de.length-1+gr);return vt=ar(Vr+Ta*gr/2,Ta),_t=0,De={t:"rangePoints",a:arguments},St},St.rangeRoundPoints=function(zt,gr){arguments.length<2&&(gr=0);var Vr=zt[0],Wr=zt[1],Ta=de.length<2?(Vr=Wr=Math.round((Vr+Wr)/2),0):(Wr-Vr)/(de.length-1+gr)|0;return vt=ar(Vr+Math.round(Ta*gr/2+(Wr-Vr-(de.length-1+gr)*Ta)/2),Ta),_t=0,De={t:"rangeRoundPoints",a:arguments},St},St.rangeBands=function(zt,gr,Vr){arguments.length<2&&(gr=0),arguments.length<3&&(Vr=gr);var Wr=zt[1]<zt[0],Ta=zt[Wr-0],ya=zt[1-Wr],ri=(ya-Ta)/(de.length-gr+2*Vr);return vt=ar(Ta+ri*Vr,ri),Wr&&vt.reverse(),_t=ri*(1-gr),De={t:"rangeBands",a:arguments},St},St.rangeRoundBands=function(zt,gr,Vr){arguments.length<2&&(gr=0),arguments.length<3&&(Vr=gr);var Wr=zt[1]<zt[0],Ta=zt[Wr-0],ya=zt[1-Wr],ri=Math.floor((ya-Ta)/(de.length-gr+2*Vr));return vt=ar(Ta+Math.round((ya-Ta-(de.length-gr)*ri)/2),ri),Wr&&vt.reverse(),_t=Math.round(ri*(1-gr)),De={t:"rangeRoundBands",a:arguments},St},St.rangeBand=function(){return _t},St.rangeExtent=function(){return Zi(De.a[0])},St.copy=function(){return Ks(de,De)},St.domain(de)}d.scale.category10=function(){return d.scale.ordinal().range(ys)},d.scale.category20=function(){return d.scale.ordinal().range(Fl)},d.scale.category20b=function(){return d.scale.ordinal().range(yl)},d.scale.category20c=function(){return d.scale.ordinal().range(sl)};var ys=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Gr),Fl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Gr),yl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Gr),sl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Gr);d.scale.quantile=function(){return Un([],[])};function Un(de,De){var et;function vt(){var St=0,ar=De.length;for(et=[];++St<ar;)et[St-1]=d.quantile(de,St/ar);return _t}function _t(St){if(!isNaN(St=+St))return De[d.bisect(et,St)]}return _t.domain=function(St){return arguments.length?(de=St.map(c).filter(f).sort(s),vt()):de},_t.range=function(St){return arguments.length?(De=St,vt()):De},_t.quantiles=function(){return et},_t.invertExtent=function(St){return St=De.indexOf(St),St<0?[NaN,NaN]:[St>0?et[St-1]:de[0],St<et.length?et[St]:de[de.length-1]]},_t.copy=function(){return Un(de,De)},vt()}d.scale.quantize=function(){return Io(0,1,[0,1])};function Io(de,De,et){var vt,_t;function St(zt){return et[Math.max(0,Math.min(_t,Math.floor(vt*(zt-de))))]}function ar(){return vt=et.length/(De-de),_t=et.length-1,St}return St.domain=function(zt){return arguments.length?(de=+zt[0],De=+zt[zt.length-1],ar()):[de,De]},St.range=function(zt){return arguments.length?(et=zt,ar()):et},St.invertExtent=function(zt){return zt=et.indexOf(zt),zt=zt<0?NaN:zt/vt+de,[zt,zt+1/vt]},St.copy=function(){return Io(de,De,et)},ar()}d.scale.threshold=function(){return Xs([.5],[0,1])};function Xs(de,De){function et(vt){if(vt<=vt)return De[d.bisect(de,vt)]}return et.domain=function(vt){return arguments.length?(de=vt,et):de},et.range=function(vt){return arguments.length?(De=vt,et):De},et.invertExtent=function(vt){return vt=De.indexOf(vt),[de[vt-1],de[vt]]},et.copy=function(){return Xs(de,De)},et}d.scale.identity=function(){return Ls([0,1])};function Ls(de){function De(et){return+et}return De.invert=De,De.domain=De.range=function(et){return arguments.length?(de=et.map(De),De):de},De.ticks=function(et){return co(de,et)},De.tickFormat=function(et,vt){return d3_scale_linearTickFormat(de,et,vt)},De.copy=function(){return Ls(de)},De}d.svg={};function ou(){return 0}d.svg.arc=function(){var de=Zu,De=Lc,et=ou,vt=Iu,_t=yu,St=Pc,ar=wu;function zt(){var Vr=Math.max(0,+de.apply(this,arguments)),Wr=Math.max(0,+De.apply(this,arguments)),Ta=_t.apply(this,arguments)-Te,ya=St.apply(this,arguments)-Te,ri=Math.abs(ya-Ta),ni=Ta>ya?0:1;if(Wr<Vr&&(Ma=Wr,Wr=Vr,Vr=Ma),ri>=Ce)return gr(Wr,ni)+(Vr?gr(Vr,1-ni):"")+"Z";var Ma,Na,Ka,vi,ui=0,Pa=0,sn,an,vn,Pn,Zn,eo,$o,io,Zo=[];if((vi=(+ar.apply(this,arguments)||0)/2)&&(Ka=vt===Iu?Math.sqrt(Vr*Vr+Wr*Wr):+vt.apply(this,arguments),ni||(Pa*=-1),Wr&&(Pa=Gt(Ka/Wr*Math.sin(vi))),Vr&&(ui=Gt(Ka/Vr*Math.sin(vi)))),Wr){sn=Wr*Math.cos(Ta+Pa),an=Wr*Math.sin(Ta+Pa),vn=Wr*Math.cos(ya-Pa),Pn=Wr*Math.sin(ya-Pa);var ul=Math.abs(ya-Ta-2*Pa)<=Me?0:1;if(Pa&&gc(sn,an,vn,Pn)===ni^ul){var el=(Ta+ya)/2;sn=Wr*Math.cos(el),an=Wr*Math.sin(el),vn=Pn=null}}else sn=an=0;if(Vr){Zn=Vr*Math.cos(ya-ui),eo=Vr*Math.sin(ya-ui),$o=Vr*Math.cos(Ta+ui),io=Vr*Math.sin(Ta+ui);var _l=Math.abs(Ta-ya+2*ui)<=Me?0:1;if(ui&&gc(Zn,eo,$o,io)===1-ni^_l){var gn=(Ta+ya)/2;Zn=Vr*Math.cos(gn),eo=Vr*Math.sin(gn),$o=io=null}}else Zn=eo=0;if(ri>Ke&&(Ma=Math.min(Math.abs(Wr-Vr)/2,+et.apply(this,arguments)))>.001){Na=Vr<Wr^ni?0:1;var vo=Ma,cs=Ma;if(ri<Me){var ps=$o==null?[Zn,eo]:vn==null?[sn,an]:so([sn,an],[$o,io],[vn,Pn],[Zn,eo]),Tl=sn-ps[0],Gl=an-ps[1],Tu=vn-ps[0],Il=Pn-ps[1],yc=1/Math.sin(Math.acos((Tl*Tu+Gl*Il)/(Math.sqrt(Tl*Tl+Gl*Gl)*Math.sqrt(Tu*Tu+Il*Il)))/2),nt=Math.sqrt(ps[0]*ps[0]+ps[1]*ps[1]);cs=Math.min(Ma,(Vr-nt)/(yc-1)),vo=Math.min(Ma,(Wr-nt)/(yc+1))}if(vn!=null){var Yt=fo($o==null?[Zn,eo]:[$o,io],[sn,an],Wr,vo,ni),cr=fo([vn,Pn],[Zn,eo],Wr,vo,ni);Ma===vo?Zo.push("M",Yt[0],"A",vo,",",vo," 0 0,",Na," ",Yt[1],"A",Wr,",",Wr," 0 ",1-ni^gc(Yt[1][0],Yt[1][1],cr[1][0],cr[1][1]),",",ni," ",cr[1],"A",vo,",",vo," 0 0,",Na," ",cr[0]):Zo.push("M",Yt[0],"A",vo,",",vo," 0 1,",Na," ",cr[0])}else Zo.push("M",sn,",",an);if($o!=null){var ua=fo([sn,an],[$o,io],Vr,-cs,ni),Aa=fo([Zn,eo],vn==null?[sn,an]:[vn,Pn],Vr,-cs,ni);Ma===cs?Zo.push("L",Aa[0],"A",cs,",",cs," 0 0,",Na," ",Aa[1],"A",Vr,",",Vr," 0 ",ni^gc(Aa[1][0],Aa[1][1],ua[1][0],ua[1][1]),",",1-ni," ",ua[1],"A",cs,",",cs," 0 0,",Na," ",ua[0]):Zo.push("L",Aa[0],"A",cs,",",cs," 0 0,",Na," ",ua[0])}else Zo.push("L",Zn,",",eo)}else Zo.push("M",sn,",",an),vn!=null&&Zo.push("A",Wr,",",Wr," 0 ",ul,",",ni," ",vn,",",Pn),Zo.push("L",Zn,",",eo),$o!=null&&Zo.push("A",Vr,",",Vr," 0 ",_l,",",1-ni," ",$o,",",io);return Zo.push("Z"),Zo.join("")}function gr(Vr,Wr){return"M0,"+Vr+"A"+Vr+","+Vr+" 0 1,"+Wr+" 0,"+-Vr+"A"+Vr+","+Vr+" 0 1,"+Wr+" 0,"+Vr}return zt.innerRadius=function(Vr){return arguments.length?(de=ia(Vr),zt):de},zt.outerRadius=function(Vr){return arguments.length?(De=ia(Vr),zt):De},zt.cornerRadius=function(Vr){return arguments.length?(et=ia(Vr),zt):et},zt.padRadius=function(Vr){return arguments.length?(vt=Vr==Iu?Iu:ia(Vr),zt):vt},zt.startAngle=function(Vr){return arguments.length?(_t=ia(Vr),zt):_t},zt.endAngle=function(Vr){return arguments.length?(St=ia(Vr),zt):St},zt.padAngle=function(Vr){return arguments.length?(ar=ia(Vr),zt):ar},zt.centroid=function(){var Vr=(+de.apply(this,arguments)+ +De.apply(this,arguments))/2,Wr=(+_t.apply(this,arguments)+ +St.apply(this,arguments))/2-Te;return[Math.cos(Wr)*Vr,Math.sin(Wr)*Vr]},zt};var Iu="auto";function Zu(de){return de.innerRadius}function Lc(de){return de.outerRadius}function yu(de){return de.startAngle}function Pc(de){return de.endAngle}function wu(de){return de&&de.padAngle}function gc(de,De,et,vt){return(de-et)*De-(De-vt)*de>0?0:1}function fo(de,De,et,vt,_t){var St=de[0]-De[0],ar=de[1]-De[1],zt=(_t?vt:-vt)/Math.sqrt(St*St+ar*ar),gr=zt*ar,Vr=-zt*St,Wr=de[0]+gr,Ta=de[1]+Vr,ya=De[0]+gr,ri=De[1]+Vr,ni=(Wr+ya)/2,Ma=(Ta+ri)/2,Na=ya-Wr,Ka=ri-Ta,vi=Na*Na+Ka*Ka,ui=et-vt,Pa=Wr*ri-ya*Ta,sn=(Ka<0?-1:1)*Math.sqrt(Math.max(0,ui*ui*vi-Pa*Pa)),an=(Pa*Ka-Na*sn)/vi,vn=(-Pa*Na-Ka*sn)/vi,Pn=(Pa*Ka+Na*sn)/vi,Zn=(-Pa*Na+Ka*sn)/vi,eo=an-ni,$o=vn-Ma,io=Pn-ni,Zo=Zn-Ma;return eo*eo+$o*$o>io*io+Zo*Zo&&(an=Pn,vn=Zn),[[an-gr,vn-Vr],[an*et/ui,vn*et/ui]]}function zo(){return!0}function Ic(de){var De=mo,et=pn,vt=zo,_t=Yu,St=_t.key,ar=.7;function zt(gr){var Vr=[],Wr=[],Ta=-1,ya=gr.length,ri,ni=ia(De),Ma=ia(et);function Na(){Vr.push("M",_t(de(Wr),ar))}for(;++Ta<ya;)vt.call(this,ri=gr[Ta],Ta)?Wr.push([+ni.call(this,ri,Ta),+Ma.call(this,ri,Ta)]):Wr.length&&(Na(),Wr=[]);return Wr.length&&Na(),Vr.length?Vr.join(""):null}return zt.x=function(gr){return arguments.length?(De=gr,zt):De},zt.y=function(gr){return arguments.length?(et=gr,zt):et},zt.defined=function(gr){return arguments.length?(vt=gr,zt):vt},zt.interpolate=function(gr){return arguments.length?(typeof gr=="function"?St=_t=gr:St=(_t=lc.get(gr)||Yu).key,zt):St},zt.tension=function(gr){return arguments.length?(ar=gr,zt):ar},zt}d.svg.line=function(){return Ic(F)};var lc=d.map({linear:Yu,"linear-closed":Ne,step:R,"step-before":ae,"step-after":we,basis:$t,"basis-open":br,"basis-closed":Ar,bundle:Yr,cardinal:pt,"cardinal-open":Se,"cardinal-closed":Oe,monotone:ur});lc.forEach(function(de,De){De.key=de,De.closed=/-closed$/.test(de)});function Yu(de){return de.length>1?de.join("L"):de+"Z"}function Ne(de){return de.join("L")+"Z"}function R(de){for(var De=0,et=de.length,vt=de[0],_t=[vt[0],",",vt[1]];++De<et;)_t.push("H",(vt[0]+(vt=de[De])[0])/2,"V",vt[1]);return et>1&&_t.push("H",vt[0]),_t.join("")}function ae(de){for(var De=0,et=de.length,vt=de[0],_t=[vt[0],",",vt[1]];++De<et;)_t.push("V",(vt=de[De])[1],"H",vt[0]);return _t.join("")}function we(de){for(var De=0,et=de.length,vt=de[0],_t=[vt[0],",",vt[1]];++De<et;)_t.push("H",(vt=de[De])[0],"V",vt[1]);return _t.join("")}function Se(de,De){return de.length<4?Yu(de):de[1]+At(de.slice(1,-1),Bt(de,De))}function Oe(de,De){return de.length<3?Ne(de):de[0]+At((de.push(de[0]),de),Bt([de[de.length-2]].concat(de,[de[1]]),De))}function pt(de,De){return de.length<3?Yu(de):de[0]+At(de,Bt(de,De))}function At(de,De){if(De.length<1||de.length!=De.length&&de.length!=De.length+2)return Yu(de);var et=de.length!=De.length,vt="",_t=de[0],St=de[1],ar=De[0],zt=ar,gr=1;if(et&&(vt+="Q"+(St[0]-ar[0]*2/3)+","+(St[1]-ar[1]*2/3)+","+St[0]+","+St[1],_t=de[1],gr=2),De.length>1){zt=De[1],St=de[gr],gr++,vt+="C"+(_t[0]+ar[0])+","+(_t[1]+ar[1])+","+(St[0]-zt[0])+","+(St[1]-zt[1])+","+St[0]+","+St[1];for(var Vr=2;Vr<De.length;Vr++,gr++)St=de[gr],zt=De[Vr],vt+="S"+(St[0]-zt[0])+","+(St[1]-zt[1])+","+St[0]+","+St[1]}if(et){var Wr=de[gr];vt+="Q"+(St[0]+zt[0]*2/3)+","+(St[1]+zt[1]*2/3)+","+Wr[0]+","+Wr[1]}return vt}function Bt(de,De){for(var et=[],vt=(1-De)/2,_t,St=de[0],ar=de[1],zt=1,gr=de.length;++zt<gr;)_t=St,St=ar,ar=de[zt],et.push([vt*(ar[0]-_t[0]),vt*(ar[1]-_t[1])]);return et}function $t(de){if(de.length<3)return Yu(de);var De=1,et=de.length,vt=de[0],_t=vt[0],St=vt[1],ar=[_t,_t,_t,(vt=de[1])[0]],zt=[St,St,St,vt[1]],gr=[_t,",",St,"L",sa(ut,ar),",",sa(ut,zt)];for(de.push(de[et-1]);++De<=et;)vt=de[De],ar.shift(),ar.push(vt[0]),zt.shift(),zt.push(vt[1]),dt(gr,ar,zt);return de.pop(),gr.push("L",vt),gr.join("")}function br(de){if(de.length<4)return Yu(de);for(var De=[],et=-1,vt=de.length,_t,St=[0],ar=[0];++et<3;)_t=de[et],St.push(_t[0]),ar.push(_t[1]);for(De.push(sa(ut,St)+","+sa(ut,ar)),--et;++et<vt;)_t=de[et],St.shift(),St.push(_t[0]),ar.shift(),ar.push(_t[1]),dt(De,St,ar);return De.join("")}function Ar(de){for(var De,et=-1,vt=de.length,_t=vt+4,St,ar=[],zt=[];++et<4;)St=de[et%vt],ar.push(St[0]),zt.push(St[1]);for(De=[sa(ut,ar),",",sa(ut,zt)],--et;++et<_t;)St=de[et%vt],ar.shift(),ar.push(St[0]),zt.shift(),zt.push(St[1]),dt(De,ar,zt);return De.join("")}function Yr(de,De){var et=de.length-1;if(et)for(var vt=de[0][0],_t=de[0][1],St=de[et][0]-vt,ar=de[et][1]-_t,zt=-1,gr,Vr;++zt<=et;)gr=de[zt],Vr=zt/et,gr[0]=De*gr[0]+(1-De)*(vt+Vr*St),gr[1]=De*gr[1]+(1-De)*(_t+Vr*ar);return $t(de)}function sa(de,De){return de[0]*De[0]+de[1]*De[1]+de[2]*De[2]+de[3]*De[3]}var He=[0,2/3,1/3,0],Je=[0,1/3,2/3,0],ut=[0,1/6,2/3,1/6];function dt(de,De,et){de.push("C",sa(He,De),",",sa(He,et),",",sa(Je,De),",",sa(Je,et),",",sa(ut,De),",",sa(ut,et))}function Ct(de,De){return(De[1]-de[1])/(De[0]-de[0])}function wt(de){for(var De=0,et=de.length-1,vt=[],_t=de[0],St=de[1],ar=vt[0]=Ct(_t,St);++De<et;)vt[De]=(ar+(ar=Ct(_t=St,St=de[De+1])))/2;return vt[De]=ar,vt}function Dt(de){for(var De=[],et,vt,_t,St,ar=wt(de),zt=-1,gr=de.length-1;++zt<gr;)et=Ct(de[zt],de[zt+1]),l(et)<Ke?ar[zt]=ar[zt+1]=0:(vt=ar[zt]/et,_t=ar[zt+1]/et,St=vt*vt+_t*_t,St>9&&(St=et*3/Math.sqrt(St),ar[zt]=St*vt,ar[zt+1]=St*_t));for(zt=-1;++zt<=gr;)St=(de[Math.min(gr,zt+1)][0]-de[Math.max(0,zt-1)][0])/(6*(1+ar[zt]*ar[zt])),De.push([St||0,ar[zt]*St||0]);return De}function ur(de){return de.length<3?Yu(de):de[0]+At(de,Dt(de))}d.svg.line.radial=function(){var de=Ic(mr);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function mr(de){for(var De,et=-1,vt=de.length,_t,St;++et<vt;)De=de[et],_t=De[0],St=De[1]-Te,De[0]=_t*Math.cos(St),De[1]=_t*Math.sin(St);return de}function Er(de){var De=mo,et=mo,vt=0,_t=pn,St=zo,ar=Yu,zt=ar.key,gr=ar,Vr="L",Wr=.7;function Ta(ya){var ri=[],ni=[],Ma=[],Na=-1,Ka=ya.length,vi,ui=ia(De),Pa=ia(vt),sn=De===et?function(){return vn}:ia(et),an=vt===_t?function(){return Pn}:ia(_t),vn,Pn;function Zn(){ri.push("M",ar(de(Ma),Wr),Vr,gr(de(ni.reverse()),Wr),"Z")}for(;++Na<Ka;)St.call(this,vi=ya[Na],Na)?(ni.push([vn=+ui.call(this,vi,Na),Pn=+Pa.call(this,vi,Na)]),Ma.push([+sn.call(this,vi,Na),+an.call(this,vi,Na)])):ni.length&&(Zn(),ni=[],Ma=[]);return ni.length&&Zn(),ri.length?ri.join(""):null}return Ta.x=function(ya){return arguments.length?(De=et=ya,Ta):et},Ta.x0=function(ya){return arguments.length?(De=ya,Ta):De},Ta.x1=function(ya){return arguments.length?(et=ya,Ta):et},Ta.y=function(ya){return arguments.length?(vt=_t=ya,Ta):_t},Ta.y0=function(ya){return arguments.length?(vt=ya,Ta):vt},Ta.y1=function(ya){return arguments.length?(_t=ya,Ta):_t},Ta.defined=function(ya){return arguments.length?(St=ya,Ta):St},Ta.interpolate=function(ya){return arguments.length?(typeof ya=="function"?zt=ar=ya:zt=(ar=lc.get(ya)||Yu).key,gr=ar.reverse||ar,Vr=ar.closed?"M":"L",Ta):zt},Ta.tension=function(ya){return arguments.length?(Wr=ya,Ta):Wr},Ta}ae.reverse=we,we.reverse=ae,d.svg.area=function(){return Er(F)},d.svg.area.radial=function(){var de=Er(mr);return de.radius=de.x,delete de.x,de.innerRadius=de.x0,delete de.x0,de.outerRadius=de.x1,delete de.x1,de.angle=de.y,delete de.y,de.startAngle=de.y0,delete de.y0,de.endAngle=de.y1,delete de.y1,de};function Br(de){return de.source}function Qr(de){return de.target}d.svg.chord=function(){var de=Br,De=Qr,et=ga,vt=yu,_t=Pc;function St(Wr,Ta){var ya=ar(this,de,Wr,Ta),ri=ar(this,De,Wr,Ta);return"M"+ya.p0+gr(ya.r,ya.p1,ya.a1-ya.a0)+(zt(ya,ri)?Vr(ya.r,ya.p1,ya.r,ya.p0):Vr(ya.r,ya.p1,ri.r,ri.p0)+gr(ri.r,ri.p1,ri.a1-ri.a0)+Vr(ri.r,ri.p1,ya.r,ya.p0))+"Z"}function ar(Wr,Ta,ya,ri){var ni=Ta.call(Wr,ya,ri),Ma=et.call(Wr,ni,ri),Na=vt.call(Wr,ni,ri)-Te,Ka=_t.call(Wr,ni,ri)-Te;return{r:Ma,a0:Na,a1:Ka,p0:[Ma*Math.cos(Na),Ma*Math.sin(Na)],p1:[Ma*Math.cos(Ka),Ma*Math.sin(Ka)]}}function zt(Wr,Ta){return Wr.a0==Ta.a0&&Wr.a1==Ta.a1}function gr(Wr,Ta,ya){return"A"+Wr+","+Wr+" 0 "+ +(ya>Me)+",1 "+Ta}function Vr(Wr,Ta,ya,ri){return"Q 0,0 "+ri}return St.radius=function(Wr){return arguments.length?(et=ia(Wr),St):et},St.source=function(Wr){return arguments.length?(de=ia(Wr),St):de},St.target=function(Wr){return arguments.length?(De=ia(Wr),St):De},St.startAngle=function(Wr){return arguments.length?(vt=ia(Wr),St):vt},St.endAngle=function(Wr){return arguments.length?(_t=ia(Wr),St):_t},St};function ga(de){return de.radius}d.svg.diagonal=function(){var de=Br,De=Qr,et=Sa;function vt(_t,St){var ar=de.call(this,_t,St),zt=De.call(this,_t,St),gr=(ar.y+zt.y)/2,Vr=[ar,{x:ar.x,y:gr},{x:zt.x,y:gr},zt];return Vr=Vr.map(et),"M"+Vr[0]+"C"+Vr[1]+" "+Vr[2]+" "+Vr[3]}return vt.source=function(_t){return arguments.length?(de=ia(_t),vt):de},vt.target=function(_t){return arguments.length?(De=ia(_t),vt):De},vt.projection=function(_t){return arguments.length?(et=_t,vt):et},vt};function Sa(de){return[de.x,de.y]}d.svg.diagonal.radial=function(){var de=d.svg.diagonal(),De=Sa,et=de.projection;return de.projection=function(vt){return arguments.length?et(Oa(De=vt)):De},de};function Oa(de){return function(){var De=de.apply(this,arguments),et=De[0],vt=De[1]-Te;return[et*Math.cos(vt),et*Math.sin(vt)]}}d.svg.symbol=function(){var de=Wi,De=di;function et(vt,_t){return(on.get(de.call(this,vt,_t))||Gi)(De.call(this,vt,_t))}return et.type=function(vt){return arguments.length?(de=ia(vt),et):de},et.size=function(vt){return arguments.length?(De=ia(vt),et):De},et};function di(){return 64}function Wi(){return"circle"}function Gi(de){var De=Math.sqrt(de/Me);return"M0,"+De+"A"+De+","+De+" 0 1,1 0,"+-De+"A"+De+","+De+" 0 1,1 0,"+De+"Z"}var on=d.map({circle:Gi,cross:function(de){var De=Math.sqrt(de/5)/2;return"M"+-3*De+","+-De+"H"+-De+"V"+-3*De+"H"+De+"V"+-De+"H"+3*De+"V"+De+"H"+De+"V"+3*De+"H"+-De+"V"+De+"H"+-3*De+"Z"},diamond:function(de){var De=Math.sqrt(de/(2*Wn)),et=De*Wn;return"M0,"+-De+"L"+et+",0 0,"+De+" "+-et+",0Z"},square:function(de){var De=Math.sqrt(de)/2;return"M"+-De+","+-De+"L"+De+","+-De+" "+De+","+De+" "+-De+","+De+"Z"},"triangle-down":function(de){var De=Math.sqrt(de/Tn),et=De*Tn/2;return"M0,"+et+"L"+De+","+-et+" "+-De+","+-et+"Z"},"triangle-up":function(de){var De=Math.sqrt(de/Tn),et=De*Tn/2;return"M0,"+-et+"L"+De+","+et+" "+-De+","+et+"Z"}});d.svg.symbolTypes=on.keys();var Tn=Math.sqrt(3),Wn=Math.tan(30*Pe);ie.transition=function(de){for(var De=hs||++Ko,et=ts(de),vt=[],_t,St,ar=ll||{time:Date.now(),ease:Ul,delay:0,duration:250},zt=-1,gr=this.length;++zt<gr;){vt.push(_t=[]);for(var Vr=this[zt],Wr=-1,Ta=Vr.length;++Wr<Ta;)(St=Vr[Wr])&&Pl(St,Wr,et,De,ar),_t.push(St)}return ss(vt,et,De)},ie.interrupt=function(de){return this.each(de==null?Bn:Ao(ts(de)))};var Bn=Ao(ts());function Ao(de){return function(){var De,et,vt;(De=this[de])&&(vt=De[et=De.active])&&(vt.timer.c=null,vt.timer.t=NaN,--De.count?delete De[et]:delete this[de],De.active+=.5,vt.event&&vt.event.interrupt.call(this,this.__data__,vt.index))}}function ss(de,De,et){return G(de,So),de.namespace=De,de.id=et,de}var So=[],Ko=0,hs,ll;So.call=ie.call,So.empty=ie.empty,So.node=ie.node,So.size=ie.size,d.transition=function(de,De){return de&&de.transition?hs?de.transition(De):de:d.selection().transition(de)},d.transition.prototype=So,So.select=function(de){var De=this.id,et=this.namespace,vt=[],_t,St,ar;de=j(de);for(var zt=-1,gr=this.length;++zt<gr;){vt.push(_t=[]);for(var Vr=this[zt],Wr=-1,Ta=Vr.length;++Wr<Ta;)(ar=Vr[Wr])&&(St=de.call(ar,ar.__data__,Wr,zt))?("__data__"in ar&&(St.__data__=ar.__data__),Pl(St,Wr,et,De,ar[et][De]),_t.push(St)):_t.push(null)}return ss(vt,et,De)},So.selectAll=function(de){var De=this.id,et=this.namespace,vt=[],_t,St,ar,zt,gr;de=ee(de);for(var Vr=-1,Wr=this.length;++Vr<Wr;)for(var Ta=this[Vr],ya=-1,ri=Ta.length;++ya<ri;)if(ar=Ta[ya]){gr=ar[et][De],St=de.call(ar,ar.__data__,ya,Vr),vt.push(_t=[]);for(var ni=-1,Ma=St.length;++ni<Ma;)(zt=St[ni])&&Pl(zt,ni,et,De,gr),_t.push(zt)}return ss(vt,et,De)},So.filter=function(de){var De=[],et,vt,_t;typeof de!="function"&&(de=fe(de));for(var St=0,ar=this.length;St<ar;St++){De.push(et=[]);for(var vt=this[St],zt=0,gr=vt.length;zt<gr;zt++)(_t=vt[zt])&&de.call(_t,_t.__data__,zt,St)&&et.push(_t)}return ss(De,this.namespace,this.id)},So.tween=function(de,De){var et=this.id,vt=this.namespace;return arguments.length<2?this.node()[vt][et].tween.get(de):rt(this,De==null?function(_t){_t[vt][et].tween.remove(de)}:function(_t){_t[vt][et].tween.set(de,De)})};function Js(de,De,et,vt){var _t=de.id,St=de.namespace;return rt(de,typeof et=="function"?function(ar,zt,gr){ar[St][_t].tween.set(De,vt(et.call(ar,ar.__data__,zt,gr)))}:(et=vt(et),function(ar){ar[St][_t].tween.set(De,et)}))}So.attr=function(de,De){if(arguments.length<2){for(De in de)this.attr(De,de[De]);return this}var et=de=="transform"?Wc:Nl,vt=d.ns.qualify(de);function _t(){this.removeAttribute(vt)}function St(){this.removeAttributeNS(vt.space,vt.local)}function ar(gr){return gr==null?_t:(gr+="",function(){var Vr=this.getAttribute(vt),Wr;return Vr!==gr&&(Wr=et(Vr,gr),function(Ta){this.setAttribute(vt,Wr(Ta))})})}function zt(gr){return gr==null?St:(gr+="",function(){var Vr=this.getAttributeNS(vt.space,vt.local),Wr;return Vr!==gr&&(Wr=et(Vr,gr),function(Ta){this.setAttributeNS(vt.space,vt.local,Wr(Ta))})})}return Js(this,"attr."+de,De,vt.local?zt:ar)},So.attrTween=function(de,De){var et=d.ns.qualify(de);function vt(St,ar){var zt=De.call(this,St,ar,this.getAttribute(et));return zt&&function(gr){this.setAttribute(et,zt(gr))}}function _t(St,ar){var zt=De.call(this,St,ar,this.getAttributeNS(et.space,et.local));return zt&&function(gr){this.setAttributeNS(et.space,et.local,zt(gr))}}return this.tween("attr."+de,et.local?_t:vt)},So.style=function(de,De,et){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(De="");for(et in de)this.style(et,de[et],De);return this}et=""}function _t(){this.style.removeProperty(de)}function St(ar){return ar==null?_t:(ar+="",function(){var zt=t(this).getComputedStyle(this,null).getPropertyValue(de),gr;return zt!==ar&&(gr=Nl(zt,ar),function(Vr){this.style.setProperty(de,gr(Vr),et)})})}return Js(this,"style."+de,De,St)},So.styleTween=function(de,De,et){arguments.length<3&&(et="");function vt(_t,St){var ar=De.call(this,_t,St,t(this).getComputedStyle(this,null).getPropertyValue(de));return ar&&function(zt){this.style.setProperty(de,ar(zt),et)}}return this.tween("style."+de,vt)},So.text=function(de){return Js(this,"text",de,es)};function es(de){return de==null&&(de=""),function(){this.textContent=de}}So.remove=function(){var de=this.namespace;return this.each("end.transition",function(){var De;this[de].count<2&&(De=this.parentNode)&&De.removeChild(this)})},So.ease=function(de){var De=this.id,et=this.namespace;return arguments.length<1?this.node()[et][De].ease:(typeof de!="function"&&(de=d.ease.apply(d,arguments)),rt(this,function(vt){vt[et][De].ease=de}))},So.delay=function(de){var De=this.id,et=this.namespace;return arguments.length<1?this.node()[et][De].delay:rt(this,typeof de=="function"?function(vt,_t,St){vt[et][De].delay=+de.call(vt,vt.__data__,_t,St)}:(de=+de,function(vt){vt[et][De].delay=de}))},So.duration=function(de){var De=this.id,et=this.namespace;return arguments.length<1?this.node()[et][De].duration:rt(this,typeof de=="function"?function(vt,_t,St){vt[et][De].duration=Math.max(1,de.call(vt,vt.__data__,_t,St))}:(de=Math.max(1,de),function(vt){vt[et][De].duration=de}))},So.each=function(de,De){var et=this.id,vt=this.namespace;if(arguments.length<2){var _t=ll,St=hs;try{hs=et,rt(this,function(ar,zt,gr){ll=ar[vt][et],de.call(ar,ar.__data__,zt,gr)})}finally{ll=_t,hs=St}}else rt(this,function(ar){var zt=ar[vt][et];(zt.event||(zt.event=d.dispatch("start","end","interrupt"))).on(de,De)});return this},So.transition=function(){for(var de=this.id,De=++Ko,et=this.namespace,vt=[],_t,St,ar,zt,gr=0,Vr=this.length;gr<Vr;gr++){vt.push(_t=[]);for(var St=this[gr],Wr=0,Ta=St.length;Wr<Ta;Wr++)(ar=St[Wr])&&(zt=ar[et][de],Pl(ar,Wr,et,De,{time:zt.time,ease:zt.ease,delay:zt.delay+zt.duration,duration:zt.duration})),_t.push(ar)}return ss(vt,et,De)};function ts(de){return de==null?"__transition__":"__transition_"+de+"__"}function Pl(de,De,et,vt,_t){var St=de[et]||(de[et]={active:0,count:0}),ar=St[vt],zt,gr,Vr,Wr,Ta;function ya(Ma){var Na=ar.delay;if(gr.t=Na+zt,Na<=Ma)return ri(Ma-Na);gr.c=ri}function ri(Ma){var Na=St.active,Ka=St[Na];Ka&&(Ka.timer.c=null,Ka.timer.t=NaN,--St.count,delete St[Na],Ka.event&&Ka.event.interrupt.call(de,de.__data__,Ka.index));for(var vi in St)if(+vi<vt){var ui=St[vi];ui.timer.c=null,ui.timer.t=NaN,--St.count,delete St[vi]}gr.c=ni,kn(function(){return gr.c&&ni(Ma||1)&&(gr.c=null,gr.t=NaN),1},0,zt),St.active=vt,ar.event&&ar.event.start.call(de,de.__data__,De),Ta=[],ar.tween.forEach(function(Pa,sn){(sn=sn.call(de,de.__data__,De))&&Ta.push(sn)}),Wr=ar.ease,Vr=ar.duration}function ni(Ma){for(var Na=Ma/Vr,Ka=Wr(Na),vi=Ta.length;vi>0;)Ta[--vi].call(de,Ka);if(Na>=1)return ar.event&&ar.event.end.call(de,de.__data__,De),--St.count?delete St[vt]:delete de[et],1}ar||(zt=_t.time,gr=kn(ya,0,zt),ar=St[vt]={tween:new S,time:zt,timer:gr,delay:_t.delay,duration:_t.duration,ease:_t.ease,index:De},_t=null,++St.count)}d.svg.axis=function(){var de=d.scale.linear(),De=$l,et=6,vt=6,_t=3,St=[10],ar=null,zt;function gr(Vr){Vr.each(function(){var Wr=d.select(this),Ta=this.__chart__||de,ya=this.__chart__=de.copy(),ri=ar??(ya.ticks?ya.ticks.apply(ya,St):ya.domain()),ni=zt??(ya.tickFormat?ya.tickFormat.apply(ya,St):F),Ma=Wr.selectAll(".tick").data(ri,ya),Na=Ma.enter().insert("g",".domain").attr("class","tick").style("opacity",Ke),Ka=d.transition(Ma.exit()).style("opacity",Ke).remove(),vi=d.transition(Ma.order()).style("opacity",1),ui=Math.max(et,0)+_t,Pa,sn=tn(ya),an=Wr.selectAll(".domain").data([0]),vn=(an.enter().append("path").attr("class","domain"),d.transition(an));Na.append("line"),Na.append("text");var Pn=Na.select("line"),Zn=vi.select("line"),eo=Ma.select("text").text(ni),$o=Na.select("text"),io=vi.select("text"),Zo=De==="top"||De==="left"?-1:1,ul,el,_l,gn;if(De==="bottom"||De==="top"?(Pa=hu,ul="x",_l="y",el="x2",gn="y2",eo.attr("dy",Zo<0?"0em":".71em").style("text-anchor","middle"),vn.attr("d","M"+sn[0]+","+Zo*vt+"V0H"+sn[1]+"V"+Zo*vt)):(Pa=wl,ul="y",_l="x",el="y2",gn="x2",eo.attr("dy",".32em").style("text-anchor",Zo<0?"end":"start"),vn.attr("d","M"+Zo*vt+","+sn[0]+"H0V"+sn[1]+"H"+Zo*vt)),Pn.attr(gn,Zo*et),$o.attr(_l,Zo*ui),Zn.attr(el,0).attr(gn,Zo*et),io.attr(ul,0).attr(_l,Zo*ui),ya.rangeBand){var vo=ya,cs=vo.rangeBand()/2;Ta=ya=function(ps){return vo(ps)+cs}}else Ta.rangeBand?Ta=ya:Ka.call(Pa,ya,Ta);Na.call(Pa,Ta,ya),vi.call(Pa,ya,ya)})}return gr.scale=function(Vr){return arguments.length?(de=Vr,gr):de},gr.orient=function(Vr){return arguments.length?(De=Vr in Ru?Vr+"":$l,gr):De},gr.ticks=function(){return arguments.length?(St=A(arguments),gr):St},gr.tickValues=function(Vr){return arguments.length?(ar=Vr,gr):ar},gr.tickFormat=function(Vr){return arguments.length?(zt=Vr,gr):zt},gr.tickSize=function(Vr){var Wr=arguments.length;return Wr?(et=+Vr,vt=+arguments[Wr-1],gr):et},gr.innerTickSize=function(Vr){return arguments.length?(et=+Vr,gr):et},gr.outerTickSize=function(Vr){return arguments.length?(vt=+Vr,gr):vt},gr.tickPadding=function(Vr){return arguments.length?(_t=+Vr,gr):_t},gr.tickSubdivide=function(){return arguments.length&&gr},gr};var $l="bottom",Ru={top:1,right:1,bottom:1,left:1};function hu(de,De,et){de.attr("transform",function(vt){var _t=De(vt);return"translate("+(isFinite(_t)?_t:et(vt))+",0)"})}function wl(de,De,et){de.attr("transform",function(vt){var _t=De(vt);return"translate(0,"+(isFinite(_t)?_t:et(vt))+")"})}d.svg.brush=function(){var de=le(Wr,"brushstart","brush","brushend"),De=null,et=null,vt=[0,0],_t=[0,0],St,ar,zt=!0,gr=!0,Vr=uc[0];function Wr(Ma){Ma.each(function(){var Na=d.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ni).on("touchstart.brush",ni),Ka=Na.selectAll(".background").data([0]);Ka.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Na.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var vi=Na.selectAll(".resize").data(Vr,F);vi.exit().remove(),vi.enter().append("g").attr("class",function(an){return"resize "+an}).style("cursor",function(an){return su[an]}).append("rect").attr("x",function(an){return/[ew]$/.test(an)?-3:null}).attr("y",function(an){return/^[ns]/.test(an)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),vi.style("display",Wr.empty()?"none":null);var ui=d.transition(Na),Pa=d.transition(Ka),sn;De&&(sn=tn(De),Pa.attr("x",sn[0]).attr("width",sn[1]-sn[0]),ya(ui)),et&&(sn=tn(et),Pa.attr("y",sn[0]).attr("height",sn[1]-sn[0]),ri(ui)),Ta(ui)})}Wr.event=function(Ma){Ma.each(function(){var Na=de.of(this,arguments),Ka={x:vt,y:_t,i:St,j:ar},vi=this.__chart__||Ka;this.__chart__=Ka,hs?d.select(this).transition().each("start.brush",function(){St=vi.i,ar=vi.j,vt=vi.x,_t=vi.y,Na({type:"brushstart"})}).tween("brush:brush",function(){var ui=qu(vt,Ka.x),Pa=qu(_t,Ka.y);return St=ar=null,function(sn){vt=Ka.x=ui(sn),_t=Ka.y=Pa(sn),Na({type:"brush",mode:"resize"})}}).each("end.brush",function(){St=Ka.i,ar=Ka.j,Na({type:"brush",mode:"resize"}),Na({type:"brushend"})}):(Na({type:"brushstart"}),Na({type:"brush",mode:"resize"}),Na({type:"brushend"}))})};function Ta(Ma){Ma.selectAll(".resize").attr("transform",function(Na){return"translate("+vt[+/e$/.test(Na)]+","+_t[+/^s/.test(Na)]+")"})}function ya(Ma){Ma.select(".extent").attr("x",vt[0]),Ma.selectAll(".extent,.n>rect,.s>rect").attr("width",vt[1]-vt[0])}function ri(Ma){Ma.select(".extent").attr("y",_t[0]),Ma.selectAll(".extent,.e>rect,.w>rect").attr("height",_t[1]-_t[0])}function ni(){var Ma=this,Na=d.select(d.event.target),Ka=de.of(Ma,arguments),vi=d.select(Ma),ui=Na.datum(),Pa=!/^(n|s)$/.test(ui)&&De,sn=!/^(e|w)$/.test(ui)&&et,an=Na.classed("extent"),vn=wr(Ma),Pn,Zn=d.mouse(Ma),eo,$o=d.select(t(Ma)).on("keydown.brush",ul).on("keyup.brush",el);if(d.event.changedTouches?$o.on("touchmove.brush",_l).on("touchend.brush",vo):$o.on("mousemove.brush",_l).on("mouseup.brush",vo),vi.interrupt().selectAll("*").interrupt(),an)Zn[0]=vt[0]-Zn[0],Zn[1]=_t[0]-Zn[1];else if(ui){var io=+/w$/.test(ui),Zo=+/^n/.test(ui);eo=[vt[1-io]-Zn[0],_t[1-Zo]-Zn[1]],Zn[0]=vt[io],Zn[1]=_t[Zo]}else d.event.altKey&&(Pn=Zn.slice());vi.style("pointer-events","none").selectAll(".resize").style("display",null),d.select("body").style("cursor",Na.style("cursor")),Ka({type:"brushstart"}),_l();function ul(){d.event.keyCode==32&&(an||(Pn=null,Zn[0]-=vt[1],Zn[1]-=_t[1],an=2),Q())}function el(){d.event.keyCode==32&&an==2&&(Zn[0]+=vt[1],Zn[1]+=_t[1],an=0,Q())}function _l(){var cs=d.mouse(Ma),ps=!1;eo&&(cs[0]+=eo[0],cs[1]+=eo[1]),an||(d.event.altKey?(Pn||(Pn=[(vt[0]+vt[1])/2,(_t[0]+_t[1])/2]),Zn[0]=vt[+(cs[0]<Pn[0])],Zn[1]=_t[+(cs[1]<Pn[1])]):Pn=null),Pa&&gn(cs,De,0)&&(ya(vi),ps=!0),sn&&gn(cs,et,1)&&(ri(vi),ps=!0),ps&&(Ta(vi),Ka({type:"brush",mode:an?"move":"resize"}))}function gn(cs,ps,Tl){var Gl=tn(ps),Tu=Gl[0],Il=Gl[1],yc=Zn[Tl],nt=Tl?_t:vt,Yt=nt[1]-nt[0],cr,ua;if(an&&(Tu-=yc,Il-=Yt+yc),cr=(Tl?gr:zt)?Math.max(Tu,Math.min(Il,cs[Tl])):cs[Tl],an?ua=(cr+=yc)+Yt:(Pn&&(yc=Math.max(Tu,Math.min(Il,2*Pn[Tl]-cr))),yc<cr?(ua=cr,cr=yc):ua=yc),nt[0]!=cr||nt[1]!=ua)return Tl?ar=null:St=null,nt[0]=cr,nt[1]=ua,!0}function vo(){_l(),vi.style("pointer-events","all").selectAll(".resize").style("display",Wr.empty()?"none":null),d.select("body").style("cursor",null),$o.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),vn(),Ka({type:"brushend"})}}return Wr.x=function(Ma){return arguments.length?(De=Ma,Vr=uc[!De<<1|!et],Wr):De},Wr.y=function(Ma){return arguments.length?(et=Ma,Vr=uc[!De<<1|!et],Wr):et},Wr.clamp=function(Ma){return arguments.length?(De&&et?(zt=!!Ma[0],gr=!!Ma[1]):De?zt=!!Ma:et&&(gr=!!Ma),Wr):De&&et?[zt,gr]:De?zt:et?gr:null},Wr.extent=function(Ma){var Na,Ka,vi,ui,Pa;return arguments.length?(De&&(Na=Ma[0],Ka=Ma[1],et&&(Na=Na[0],Ka=Ka[0]),St=[Na,Ka],De.invert&&(Na=De(Na),Ka=De(Ka)),Ka<Na&&(Pa=Na,Na=Ka,Ka=Pa),(Na!=vt[0]||Ka!=vt[1])&&(vt=[Na,Ka])),et&&(vi=Ma[0],ui=Ma[1],De&&(vi=vi[1],ui=ui[1]),ar=[vi,ui],et.invert&&(vi=et(vi),ui=et(ui)),ui<vi&&(Pa=vi,vi=ui,ui=Pa),(vi!=_t[0]||ui!=_t[1])&&(_t=[vi,ui])),Wr):(De&&(St?(Na=St[0],Ka=St[1]):(Na=vt[0],Ka=vt[1],De.invert&&(Na=De.invert(Na),Ka=De.invert(Ka)),Ka<Na&&(Pa=Na,Na=Ka,Ka=Pa))),et&&(ar?(vi=ar[0],ui=ar[1]):(vi=_t[0],ui=_t[1],et.invert&&(vi=et.invert(vi),ui=et.invert(ui)),ui<vi&&(Pa=vi,vi=ui,ui=Pa))),De&&et?[[Na,vi],[Ka,ui]]:De?[Na,Ka]:et&&[vi,ui])},Wr.clear=function(){return Wr.empty()||(vt=[0,0],_t=[0,0],St=ar=null),Wr},Wr.empty=function(){return!!De&&vt[0]==vt[1]||!!et&&_t[0]==_t[1]},d.rebind(Wr,de,"on")};var su={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},uc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d.text=Ca(function(de){return de.responseText}),d.json=function(de,De){return Fa(de,"application/json",ql,De)};function ql(de){return JSON.parse(de.responseText)}d.html=function(de,De){return Fa(de,"text/html",Vl,De)};function Vl(de){var De=M.createRange();return De.selectNode(M.body),De.createContextualFragment(de.responseText)}d.xml=Ca(function(de){return de.responseXML}),typeof q=="object"&&q.exports?q.exports=d:this.d3=d}).apply(self)}}),$p=Ze({"node_modules/d3-time/dist/d3-time.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x=new Date,A=new Date;function M(fe,Fe,rt,st){function Qe(Lt){return fe(Lt=arguments.length===0?new Date:new Date(+Lt)),Lt}return Qe.floor=function(Lt){return fe(Lt=new Date(+Lt)),Lt},Qe.ceil=function(Lt){return fe(Lt=new Date(Lt-1)),Fe(Lt,1),fe(Lt),Lt},Qe.round=function(Lt){var kt=Qe(Lt),Vt=Qe.ceil(Lt);return Lt-kt<Vt-Lt?kt:Vt},Qe.offset=function(Lt,kt){return Fe(Lt=new Date(+Lt),kt==null?1:Math.floor(kt)),Lt},Qe.range=function(Lt,kt,Vt){var Zt=[],Sr;if(Lt=Qe.ceil(Lt),Vt=Vt==null?1:Math.floor(Vt),!(Lt<kt)||!(Vt>0))return Zt;do Zt.push(Sr=new Date(+Lt)),Fe(Lt,Vt),fe(Lt);while(Sr<Lt&&Lt<kt);return Zt},Qe.filter=function(Lt){return M(function(kt){if(kt>=kt)for(;fe(kt),!Lt(kt);)kt.setTime(kt-1)},function(kt,Vt){if(kt>=kt)if(Vt<0)for(;++Vt<=0;)for(;Fe(kt,-1),!Lt(kt););else for(;--Vt>=0;)for(;Fe(kt,1),!Lt(kt););})},rt&&(Qe.count=function(Lt,kt){return x.setTime(+Lt),A.setTime(+kt),fe(x),fe(A),Math.floor(rt(x,A))},Qe.every=function(Lt){return Lt=Math.floor(Lt),!isFinite(Lt)||!(Lt>0)?null:Lt>1?Qe.filter(st?function(kt){return st(kt)%Lt===0}:function(kt){return Qe.count(0,kt)%Lt===0}):Qe}),Qe}var e=M(function(){},function(fe,Fe){fe.setTime(+fe+Fe)},function(fe,Fe){return Fe-fe});e.every=function(fe){return fe=Math.floor(fe),!isFinite(fe)||!(fe>0)?null:fe>1?M(function(Fe){Fe.setTime(Math.floor(Fe/fe)*fe)},function(Fe,rt){Fe.setTime(+Fe+rt*fe)},function(Fe,rt){return(rt-Fe)/fe}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=M(function(fe){fe.setTime(fe-fe.getMilliseconds())},function(fe,Fe){fe.setTime(+fe+Fe*r)},function(fe,Fe){return(Fe-fe)/r},function(fe){return fe.getUTCSeconds()}),c=s.range,f=M(function(fe){fe.setTime(fe-fe.getMilliseconds()-fe.getSeconds()*r)},function(fe,Fe){fe.setTime(+fe+Fe*o)},function(fe,Fe){return(Fe-fe)/o},function(fe){return fe.getMinutes()}),g=f.range,v=M(function(fe){fe.setTime(fe-fe.getMilliseconds()-fe.getSeconds()*r-fe.getMinutes()*o)},function(fe,Fe){fe.setTime(+fe+Fe*a)},function(fe,Fe){return(Fe-fe)/a},function(fe){return fe.getHours()}),T=v.range,l=M(function(fe){fe.setHours(0,0,0,0)},function(fe,Fe){fe.setDate(fe.getDate()+Fe)},function(fe,Fe){return(Fe-fe-(Fe.getTimezoneOffset()-fe.getTimezoneOffset())*o)/i},function(fe){return fe.getDate()-1}),_=l.range;function w(fe){return M(function(Fe){Fe.setDate(Fe.getDate()-(Fe.getDay()+7-fe)%7),Fe.setHours(0,0,0,0)},function(Fe,rt){Fe.setDate(Fe.getDate()+rt*7)},function(Fe,rt){return(rt-Fe-(rt.getTimezoneOffset()-Fe.getTimezoneOffset())*o)/n})}var S=w(0),E=w(1),y=w(2),b=w(3),p=w(4),u=w(5),m=w(6),h=S.range,P=E.range,L=y.range,z=b.range,F=p.range,B=u.range,O=m.range,I=M(function(fe){fe.setDate(1),fe.setHours(0,0,0,0)},function(fe,Fe){fe.setMonth(fe.getMonth()+Fe)},function(fe,Fe){return Fe.getMonth()-fe.getMonth()+(Fe.getFullYear()-fe.getFullYear())*12},function(fe){return fe.getMonth()}),N=I.range,U=M(function(fe){fe.setMonth(0,1),fe.setHours(0,0,0,0)},function(fe,Fe){fe.setFullYear(fe.getFullYear()+Fe)},function(fe,Fe){return Fe.getFullYear()-fe.getFullYear()},function(fe){return fe.getFullYear()});U.every=function(fe){return!isFinite(fe=Math.floor(fe))||!(fe>0)?null:M(function(Fe){Fe.setFullYear(Math.floor(Fe.getFullYear()/fe)*fe),Fe.setMonth(0,1),Fe.setHours(0,0,0,0)},function(Fe,rt){Fe.setFullYear(Fe.getFullYear()+rt*fe)})};var W=U.range,Q=M(function(fe){fe.setUTCSeconds(0,0)},function(fe,Fe){fe.setTime(+fe+Fe*o)},function(fe,Fe){return(Fe-fe)/o},function(fe){return fe.getUTCMinutes()}),ue=Q.range,le=M(function(fe){fe.setUTCMinutes(0,0,0)},function(fe,Fe){fe.setTime(+fe+Fe*a)},function(fe,Fe){return(Fe-fe)/a},function(fe){return fe.getUTCHours()}),he=le.range,G=M(function(fe){fe.setUTCHours(0,0,0,0)},function(fe,Fe){fe.setUTCDate(fe.getUTCDate()+Fe)},function(fe,Fe){return(Fe-fe)/i},function(fe){return fe.getUTCDate()-1}),$=G.range;function J(fe){return M(function(Fe){Fe.setUTCDate(Fe.getUTCDate()-(Fe.getUTCDay()+7-fe)%7),Fe.setUTCHours(0,0,0,0)},function(Fe,rt){Fe.setUTCDate(Fe.getUTCDate()+rt*7)},function(Fe,rt){return(rt-Fe)/n})}var X=J(0),oe=J(1),ie=J(2),j=J(3),ee=J(4),re=J(5),ce=J(6),be=X.range,Ae=oe.range,ze=ie.range,Re=j.range,Xe=ee.range,it=re.range,ot=ce.range,tt=M(function(fe){fe.setUTCDate(1),fe.setUTCHours(0,0,0,0)},function(fe,Fe){fe.setUTCMonth(fe.getUTCMonth()+Fe)},function(fe,Fe){return Fe.getUTCMonth()-fe.getUTCMonth()+(Fe.getUTCFullYear()-fe.getUTCFullYear())*12},function(fe){return fe.getUTCMonth()}),lt=tt.range,Ee=M(function(fe){fe.setUTCMonth(0,1),fe.setUTCHours(0,0,0,0)},function(fe,Fe){fe.setUTCFullYear(fe.getUTCFullYear()+Fe)},function(fe,Fe){return Fe.getUTCFullYear()-fe.getUTCFullYear()},function(fe){return fe.getUTCFullYear()});Ee.every=function(fe){return!isFinite(fe=Math.floor(fe))||!(fe>0)?null:M(function(Fe){Fe.setUTCFullYear(Math.floor(Fe.getUTCFullYear()/fe)*fe),Fe.setUTCMonth(0,1),Fe.setUTCHours(0,0,0,0)},function(Fe,rt){Fe.setUTCFullYear(Fe.getUTCFullYear()+rt*fe)})};var _e=Ee.range;d.timeDay=l,d.timeDays=_,d.timeFriday=u,d.timeFridays=B,d.timeHour=v,d.timeHours=T,d.timeInterval=M,d.timeMillisecond=e,d.timeMilliseconds=t,d.timeMinute=f,d.timeMinutes=g,d.timeMonday=E,d.timeMondays=P,d.timeMonth=I,d.timeMonths=N,d.timeSaturday=m,d.timeSaturdays=O,d.timeSecond=s,d.timeSeconds=c,d.timeSunday=S,d.timeSundays=h,d.timeThursday=p,d.timeThursdays=F,d.timeTuesday=y,d.timeTuesdays=L,d.timeWednesday=b,d.timeWednesdays=z,d.timeWeek=S,d.timeWeeks=h,d.timeYear=U,d.timeYears=W,d.utcDay=G,d.utcDays=$,d.utcFriday=re,d.utcFridays=it,d.utcHour=le,d.utcHours=he,d.utcMillisecond=e,d.utcMilliseconds=t,d.utcMinute=Q,d.utcMinutes=ue,d.utcMonday=oe,d.utcMondays=Ae,d.utcMonth=tt,d.utcMonths=lt,d.utcSaturday=ce,d.utcSaturdays=ot,d.utcSecond=s,d.utcSeconds=c,d.utcSunday=X,d.utcSundays=be,d.utcThursday=ee,d.utcThursdays=Xe,d.utcTuesday=ie,d.utcTuesdays=ze,d.utcWednesday=j,d.utcWednesdays=Re,d.utcWeek=X,d.utcWeeks=be,d.utcYear=Ee,d.utcYears=_e,Object.defineProperty(d,"__esModule",{value:!0})})}}),jp=Ze({"node_modules/d3-time-format/dist/d3-time-format.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,$p()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function A(Be){if(0<=Be.y&&Be.y<100){var Ke=new Date(-1,Be.m,Be.d,Be.H,Be.M,Be.S,Be.L);return Ke.setFullYear(Be.y),Ke}return new Date(Be.y,Be.m,Be.d,Be.H,Be.M,Be.S,Be.L)}function M(Be){if(0<=Be.y&&Be.y<100){var Ke=new Date(Date.UTC(-1,Be.m,Be.d,Be.H,Be.M,Be.S,Be.L));return Ke.setUTCFullYear(Be.y),Ke}return new Date(Date.UTC(Be.y,Be.m,Be.d,Be.H,Be.M,Be.S,Be.L))}function e(Be,Ke,Ue){return{y:Be,m:Ke,d:Ue,H:0,M:0,S:0,L:0}}function t(Be){var Ke=Be.dateTime,Ue=Be.date,Me=Be.time,qe=Be.periods,Ce=Be.days,Te=Be.shortDays,Pe=Be.months,at=Be.shortMonths,yt=c(qe),Tt=f(qe),Ot=c(Ce),Gt=f(Ce),rr=c(Te),Qt=f(Te),Tr=c(Pe),la=f(Pe),Ua=c(at),Ba=f(at),Ra={a:Ha,A:$a,b:ai,B:mi,c:null,d:I,e:I,f:ue,H:N,I:U,j:W,L:Q,m:le,M:he,p:xt,q:ct,Q:kt,s:Vt,S:G,u:$,U:J,V:X,w:oe,W:ie,x:null,X:null,y:j,Y:ee,Z:re,"%":Lt},ei={a:Nr,A:Or,b:Rr,B:Lr,c:null,d:ce,e:ce,f:Xe,H:be,I:Ae,j:ze,L:Re,m:it,M:ot,p:Gr,q:Kr,Q:kt,s:Vt,S:tt,u:lt,U:Ee,V:_e,w:fe,W:Fe,x:null,X:null,y:rt,Y:st,Z:Qe,"%":Lt},za={a:Kt,A:Wt,b:Pr,B:ta,c:ma,d:p,e:p,f:z,H:m,I:m,j:u,L,m:b,M:h,p:Nt,q:y,Q:B,s:O,S:P,u:v,U:T,V:l,w:g,W:_,x:ra,X:Ia,y:S,Y:w,Z:E,"%":F};Ra.x=ti(Ue,Ra),Ra.X=ti(Me,Ra),Ra.c=ti(Ke,Ra),ei.x=ti(Ue,ei),ei.X=ti(Me,ei),ei.c=ti(Ke,ei);function ti(Ur,aa){return function(da){var fa=[],It=-1,dr=0,kr=Ur.length,ia,Ca,Fa;for(da instanceof Date||(da=new Date(+da));++It<kr;)Ur.charCodeAt(It)===37&&(fa.push(Ur.slice(dr,It)),(Ca=r[ia=Ur.charAt(++It)])!=null?ia=Ur.charAt(++It):Ca=ia==="e"?" ":"0",(Fa=aa[ia])&&(ia=Fa(da,Ca)),fa.push(ia),dr=It+1);return fa.push(Ur.slice(dr,It)),fa.join("")}}function Ci(Ur,aa){return function(da){var fa=e(1900,void 0,1),It=Jt(fa,Ur,da+="",0),dr,kr;if(It!=da.length)return null;if("Q"in fa)return new Date(fa.Q);if("s"in fa)return new Date(fa.s*1e3+("L"in fa?fa.L:0));if(aa&&!("Z"in fa)&&(fa.Z=0),"p"in fa&&(fa.H=fa.H%12+fa.p*12),fa.m===void 0&&(fa.m="q"in fa?fa.q:0),"V"in fa){if(fa.V<1||fa.V>53)return null;"w"in fa||(fa.w=1),"Z"in fa?(dr=M(e(fa.y,0,1)),kr=dr.getUTCDay(),dr=kr>4||kr===0?x.utcMonday.ceil(dr):x.utcMonday(dr),dr=x.utcDay.offset(dr,(fa.V-1)*7),fa.y=dr.getUTCFullYear(),fa.m=dr.getUTCMonth(),fa.d=dr.getUTCDate()+(fa.w+6)%7):(dr=A(e(fa.y,0,1)),kr=dr.getDay(),dr=kr>4||kr===0?x.timeMonday.ceil(dr):x.timeMonday(dr),dr=x.timeDay.offset(dr,(fa.V-1)*7),fa.y=dr.getFullYear(),fa.m=dr.getMonth(),fa.d=dr.getDate()+(fa.w+6)%7)}else("W"in fa||"U"in fa)&&("w"in fa||(fa.w="u"in fa?fa.u%7:"W"in fa?1:0),kr="Z"in fa?M(e(fa.y,0,1)).getUTCDay():A(e(fa.y,0,1)).getDay(),fa.m=0,fa.d="W"in fa?(fa.w+6)%7+fa.W*7-(kr+5)%7:fa.w+fa.U*7-(kr+6)%7);return"Z"in fa?(fa.H+=fa.Z/100|0,fa.M+=fa.Z%100,M(fa)):A(fa)}}function Jt(Ur,aa,da,fa){for(var It=0,dr=aa.length,kr=da.length,ia,Ca;It<dr;){if(fa>=kr)return-1;if(ia=aa.charCodeAt(It++),ia===37){if(ia=aa.charAt(It++),Ca=za[ia in r?aa.charAt(It++):ia],!Ca||(fa=Ca(Ur,da,fa))<0)return-1}else if(ia!=da.charCodeAt(fa++))return-1}return fa}function Nt(Ur,aa,da){var fa=yt.exec(aa.slice(da));return fa?(Ur.p=Tt[fa[0].toLowerCase()],da+fa[0].length):-1}function Kt(Ur,aa,da){var fa=rr.exec(aa.slice(da));return fa?(Ur.w=Qt[fa[0].toLowerCase()],da+fa[0].length):-1}function Wt(Ur,aa,da){var fa=Ot.exec(aa.slice(da));return fa?(Ur.w=Gt[fa[0].toLowerCase()],da+fa[0].length):-1}function Pr(Ur,aa,da){var fa=Ua.exec(aa.slice(da));return fa?(Ur.m=Ba[fa[0].toLowerCase()],da+fa[0].length):-1}function ta(Ur,aa,da){var fa=Tr.exec(aa.slice(da));return fa?(Ur.m=la[fa[0].toLowerCase()],da+fa[0].length):-1}function ma(Ur,aa,da){return Jt(Ur,Ke,aa,da)}function ra(Ur,aa,da){return Jt(Ur,Ue,aa,da)}function Ia(Ur,aa,da){return Jt(Ur,Me,aa,da)}function Ha(Ur){return Te[Ur.getDay()]}function $a(Ur){return Ce[Ur.getDay()]}function ai(Ur){return at[Ur.getMonth()]}function mi(Ur){return Pe[Ur.getMonth()]}function xt(Ur){return qe[+(Ur.getHours()>=12)]}function ct(Ur){return 1+~~(Ur.getMonth()/3)}function Nr(Ur){return Te[Ur.getUTCDay()]}function Or(Ur){return Ce[Ur.getUTCDay()]}function Rr(Ur){return at[Ur.getUTCMonth()]}function Lr(Ur){return Pe[Ur.getUTCMonth()]}function Gr(Ur){return qe[+(Ur.getUTCHours()>=12)]}function Kr(Ur){return 1+~~(Ur.getUTCMonth()/3)}return{format:function(Ur){var aa=ti(Ur+="",Ra);return aa.toString=function(){return Ur},aa},parse:function(Ur){var aa=Ci(Ur+="",!1);return aa.toString=function(){return Ur},aa},utcFormat:function(Ur){var aa=ti(Ur+="",ei);return aa.toString=function(){return Ur},aa},utcParse:function(Ur){var aa=Ci(Ur+="",!0);return aa.toString=function(){return Ur},aa}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Be,Ke,Ue){var Me=Be<0?"-":"",qe=(Me?-Be:Be)+"",Ce=qe.length;return Me+(Ce<Ue?new Array(Ue-Ce+1).join(Ke)+qe:qe)}function s(Be){return Be.replace(i,"\\$&")}function c(Be){return new RegExp("^(?:"+Be.map(s).join("|")+")","i")}function f(Be){for(var Ke={},Ue=-1,Me=Be.length;++Ue<Me;)Ke[Be[Ue].toLowerCase()]=Ue;return Ke}function g(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+1));return Me?(Be.w=+Me[0],Ue+Me[0].length):-1}function v(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+1));return Me?(Be.u=+Me[0],Ue+Me[0].length):-1}function T(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.U=+Me[0],Ue+Me[0].length):-1}function l(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.V=+Me[0],Ue+Me[0].length):-1}function _(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.W=+Me[0],Ue+Me[0].length):-1}function w(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+4));return Me?(Be.y=+Me[0],Ue+Me[0].length):-1}function S(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.y=+Me[0]+(+Me[0]>68?1900:2e3),Ue+Me[0].length):-1}function E(Be,Ke,Ue){var Me=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ke.slice(Ue,Ue+6));return Me?(Be.Z=Me[1]?0:-(Me[2]+(Me[3]||"00")),Ue+Me[0].length):-1}function y(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+1));return Me?(Be.q=Me[0]*3-3,Ue+Me[0].length):-1}function b(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.m=Me[0]-1,Ue+Me[0].length):-1}function p(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.d=+Me[0],Ue+Me[0].length):-1}function u(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+3));return Me?(Be.m=0,Be.d=+Me[0],Ue+Me[0].length):-1}function m(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.H=+Me[0],Ue+Me[0].length):-1}function h(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.M=+Me[0],Ue+Me[0].length):-1}function P(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+2));return Me?(Be.S=+Me[0],Ue+Me[0].length):-1}function L(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+3));return Me?(Be.L=+Me[0],Ue+Me[0].length):-1}function z(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue,Ue+6));return Me?(Be.L=Math.floor(Me[0]/1e3),Ue+Me[0].length):-1}function F(Be,Ke,Ue){var Me=a.exec(Ke.slice(Ue,Ue+1));return Me?Ue+Me[0].length:-1}function B(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue));return Me?(Be.Q=+Me[0],Ue+Me[0].length):-1}function O(Be,Ke,Ue){var Me=o.exec(Ke.slice(Ue));return Me?(Be.s=+Me[0],Ue+Me[0].length):-1}function I(Be,Ke){return n(Be.getDate(),Ke,2)}function N(Be,Ke){return n(Be.getHours(),Ke,2)}function U(Be,Ke){return n(Be.getHours()%12||12,Ke,2)}function W(Be,Ke){return n(1+x.timeDay.count(x.timeYear(Be),Be),Ke,3)}function Q(Be,Ke){return n(Be.getMilliseconds(),Ke,3)}function ue(Be,Ke){return Q(Be,Ke)+"000"}function le(Be,Ke){return n(Be.getMonth()+1,Ke,2)}function he(Be,Ke){return n(Be.getMinutes(),Ke,2)}function G(Be,Ke){return n(Be.getSeconds(),Ke,2)}function $(Be){var Ke=Be.getDay();return Ke===0?7:Ke}function J(Be,Ke){return n(x.timeSunday.count(x.timeYear(Be)-1,Be),Ke,2)}function X(Be,Ke){var Ue=Be.getDay();return Be=Ue>=4||Ue===0?x.timeThursday(Be):x.timeThursday.ceil(Be),n(x.timeThursday.count(x.timeYear(Be),Be)+(x.timeYear(Be).getDay()===4),Ke,2)}function oe(Be){return Be.getDay()}function ie(Be,Ke){return n(x.timeMonday.count(x.timeYear(Be)-1,Be),Ke,2)}function j(Be,Ke){return n(Be.getFullYear()%100,Ke,2)}function ee(Be,Ke){return n(Be.getFullYear()%1e4,Ke,4)}function re(Be){var Ke=Be.getTimezoneOffset();return(Ke>0?"-":(Ke*=-1,"+"))+n(Ke/60|0,"0",2)+n(Ke%60,"0",2)}function ce(Be,Ke){return n(Be.getUTCDate(),Ke,2)}function be(Be,Ke){return n(Be.getUTCHours(),Ke,2)}function Ae(Be,Ke){return n(Be.getUTCHours()%12||12,Ke,2)}function ze(Be,Ke){return n(1+x.utcDay.count(x.utcYear(Be),Be),Ke,3)}function Re(Be,Ke){return n(Be.getUTCMilliseconds(),Ke,3)}function Xe(Be,Ke){return Re(Be,Ke)+"000"}function it(Be,Ke){return n(Be.getUTCMonth()+1,Ke,2)}function ot(Be,Ke){return n(Be.getUTCMinutes(),Ke,2)}function tt(Be,Ke){return n(Be.getUTCSeconds(),Ke,2)}function lt(Be){var Ke=Be.getUTCDay();return Ke===0?7:Ke}function Ee(Be,Ke){return n(x.utcSunday.count(x.utcYear(Be)-1,Be),Ke,2)}function _e(Be,Ke){var Ue=Be.getUTCDay();return Be=Ue>=4||Ue===0?x.utcThursday(Be):x.utcThursday.ceil(Be),n(x.utcThursday.count(x.utcYear(Be),Be)+(x.utcYear(Be).getUTCDay()===4),Ke,2)}function fe(Be){return Be.getUTCDay()}function Fe(Be,Ke){return n(x.utcMonday.count(x.utcYear(Be)-1,Be),Ke,2)}function rt(Be,Ke){return n(Be.getUTCFullYear()%100,Ke,2)}function st(Be,Ke){return n(Be.getUTCFullYear()%1e4,Ke,4)}function Qe(){return"+0000"}function Lt(){return"%"}function kt(Be){return+Be}function Vt(Be){return Math.floor(+Be/1e3)}var Zt;Sr({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 Sr(Be){return Zt=t(Be),d.timeFormat=Zt.format,d.timeParse=Zt.parse,d.utcFormat=Zt.utcFormat,d.utcParse=Zt.utcParse,Zt}var xr="%Y-%m-%dT%H:%M:%S.%LZ";function jr(Be){return Be.toISOString()}var wr=Date.prototype.toISOString?jr:d.utcFormat(xr);function Ir(Be){var Ke=new Date(Be);return isNaN(Ke)?null:Ke}var bt=+new Date("2000-01-01T00:00:00.000Z")?Ir:d.utcParse(xr);d.isoFormat=wr,d.isoParse=bt,d.timeFormatDefaultLocale=Sr,d.timeFormatLocale=t,Object.defineProperty(d,"__esModule",{value:!0})})}}),Zy=Ze({"node_modules/d3-format/dist/d3-format.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=typeof globalThis<"u"?globalThis:d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function A(b,p){if((u=(b=p?b.toExponential(p-1):b.toExponential()).indexOf("e"))<0)return null;var u,m=b.slice(0,u);return[m.length>1?m[0]+m.slice(2):m,+b.slice(u+1)]}function M(b){return b=A(Math.abs(b)),b?b[1]:NaN}function e(b,p){return function(u,m){for(var h=u.length,P=[],L=0,z=b[0],F=0;h>0&&z>0&&(F+z+1>m&&(z=Math.max(1,m-F)),P.push(u.substring(h-=z,h+z)),!((F+=z+1)>m));)z=b[L=(L+1)%b.length];return P.reverse().join(p)}}function t(b){return function(p){return p.replace(/[0-9]/g,function(u){return b[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(b){if(!(p=r.exec(b)))throw new Error("invalid format: "+b);var p;return new a({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}o.prototype=a.prototype;function a(b){this.fill=b.fill===void 0?" ":b.fill+"",this.align=b.align===void 0?">":b.align+"",this.sign=b.sign===void 0?"-":b.sign+"",this.symbol=b.symbol===void 0?"":b.symbol+"",this.zero=!!b.zero,this.width=b.width===void 0?void 0:+b.width,this.comma=!!b.comma,this.precision=b.precision===void 0?void 0:+b.precision,this.trim=!!b.trim,this.type=b.type===void 0?"":b.type+""}a.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 i(b){e:for(var p=b.length,u=1,m=-1,h;u<p;++u)switch(b[u]){case".":m=h=u;break;case"0":m===0&&(m=u),h=u;break;default:if(!+b[u])break e;m>0&&(m=0);break}return m>0?b.slice(0,m)+b.slice(h+1):b}var n;function s(b,p){var u=A(b,p);if(!u)return b+"";var m=u[0],h=u[1],P=h-(n=Math.max(-8,Math.min(8,Math.floor(h/3)))*3)+1,L=m.length;return P===L?m:P>L?m+new Array(P-L+1).join("0"):P>0?m.slice(0,P)+"."+m.slice(P):"0."+new Array(1-P).join("0")+A(b,Math.max(0,p+P-1))[0]}function c(b,p){var u=A(b,p);if(!u)return b+"";var m=u[0],h=u[1];return h<0?"0."+new Array(-h).join("0")+m:m.length>h+1?m.slice(0,h+1)+"."+m.slice(h+1):m+new Array(h-m.length+2).join("0")}var f={"%":function(b,p){return(b*100).toFixed(p)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:x,e:function(b,p){return b.toExponential(p)},f:function(b,p){return b.toFixed(p)},g:function(b,p){return b.toPrecision(p)},o:function(b){return Math.round(b).toString(8)},p:function(b,p){return c(b*100,p)},r:c,s,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function g(b){return b}var v=Array.prototype.map,T=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function l(b){var p=b.grouping===void 0||b.thousands===void 0?g:e(v.call(b.grouping,Number),b.thousands+""),u=b.currency===void 0?"":b.currency[0]+"",m=b.currency===void 0?"":b.currency[1]+"",h=b.decimal===void 0?".":b.decimal+"",P=b.numerals===void 0?g:t(v.call(b.numerals,String)),L=b.percent===void 0?"%":b.percent+"",z=b.minus===void 0?"-":b.minus+"",F=b.nan===void 0?"NaN":b.nan+"";function B(I){I=o(I);var N=I.fill,U=I.align,W=I.sign,Q=I.symbol,ue=I.zero,le=I.width,he=I.comma,G=I.precision,$=I.trim,J=I.type;J==="n"?(he=!0,J="g"):f[J]||(G===void 0&&(G=12),$=!0,J="g"),(ue||N==="0"&&U==="=")&&(ue=!0,N="0",U="=");var X=Q==="$"?u:Q==="#"&&/[boxX]/.test(J)?"0"+J.toLowerCase():"",oe=Q==="$"?m:/[%p]/.test(J)?L:"",ie=f[J],j=/[defgprs%]/.test(J);G=G===void 0?6:/[gprs]/.test(J)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(re){var ce=X,be=oe,Ae,ze,Re;if(J==="c")be=ie(re)+be,re="";else{re=+re;var Xe=re<0||1/re<0;if(re=isNaN(re)?F:ie(Math.abs(re),G),$&&(re=i(re)),Xe&&+re==0&&W!=="+"&&(Xe=!1),ce=(Xe?W==="("?W:z:W==="-"||W==="("?"":W)+ce,be=(J==="s"?T[8+n/3]:"")+be+(Xe&&W==="("?")":""),j){for(Ae=-1,ze=re.length;++Ae<ze;)if(Re=re.charCodeAt(Ae),48>Re||Re>57){be=(Re===46?h+re.slice(Ae+1):re.slice(Ae))+be,re=re.slice(0,Ae);break}}}he&&!ue&&(re=p(re,1/0));var it=ce.length+re.length+be.length,ot=it<le?new Array(le-it+1).join(N):"";switch(he&&ue&&(re=p(ot+re,ot.length?le-be.length:1/0),ot=""),U){case"<":re=ce+re+be+ot;break;case"=":re=ce+ot+re+be;break;case"^":re=ot.slice(0,it=ot.length>>1)+ce+re+be+ot.slice(it);break;default:re=ot+ce+re+be;break}return P(re)}return ee.toString=function(){return I+""},ee}function O(I,N){var U=B((I=o(I),I.type="f",I)),W=Math.max(-8,Math.min(8,Math.floor(M(N)/3)))*3,Q=Math.pow(10,-W),ue=T[8+W/3];return function(le){return U(Q*le)+ue}}return{format:B,formatPrefix:O}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(b){return _=l(b),d.format=_.format,d.formatPrefix=_.formatPrefix,_}function S(b){return Math.max(0,-M(Math.abs(b)))}function E(b,p){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(p)/3)))*3-M(Math.abs(b)))}function y(b,p){return b=Math.abs(b),p=Math.abs(p)-b,Math.max(0,M(p)-M(b))+1}d.FormatSpecifier=a,d.formatDefaultLocale=w,d.formatLocale=l,d.formatSpecifier=o,d.precisionFixed=S,d.precisionPrefix=E,d.precisionRound=y,Object.defineProperty(d,"__esModule",{value:!0})})}}),s7=Ze({"node_modules/is-string-blank/index.js"(Z,q){"use strict";q.exports=function(d){for(var x=d.length,A,M=0;M<x;M++)if(A=d.charCodeAt(M),(A<9||A>13)&&A!==32&&A!==133&&A!==160&&A!==5760&&A!==6158&&(A<8192||A>8205)&&A!==8232&&A!==8233&&A!==8239&&A!==8287&&A!==8288&&A!==12288&&A!==65279)return!1;return!0}}}),ns=Ze({"node_modules/fast-isnumeric/index.js"(Z,q){"use strict";var d=s7();q.exports=function(x){var A=typeof x;if(A==="string"){var M=x;if(x=+x,x===0&&d(M))return!1}else if(A!=="number")return!1;return x-x<1}}}),qs=Ze({"src/constants/numerical.js"(Z,q){"use strict";q.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"}}}),YA=Ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=typeof globalThis<"u"?globalThis:d||self,x(d["base64-arraybuffer"]={}))})(Z,function(d){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array>"u"?[]:new Uint8Array(256),M=0;M<x.length;M++)A[x.charCodeAt(M)]=M;var e=function(r){var o=new Uint8Array(r),a,i=o.length,n="";for(a=0;a<i;a+=3)n+=x[o[a]>>2],n+=x[(o[a]&3)<<4|o[a+1]>>4],n+=x[(o[a+1]&15)<<2|o[a+2]>>6],n+=x[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,c,f,g;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var v=new ArrayBuffer(o),T=new Uint8Array(v);for(i=0;i<a;i+=4)s=A[r.charCodeAt(i)],c=A[r.charCodeAt(i+1)],f=A[r.charCodeAt(i+2)],g=A[r.charCodeAt(i+3)],T[n++]=s<<2|c>>4,T[n++]=(c&15)<<4|f>>2,T[n++]=(f&3)<<6|g&63;return v};d.decode=t,d.encode=e,Object.defineProperty(d,"__esModule",{value:!0})})}}),Xv=Ze({"src/lib/is_plain_object.js"(Z,q){"use strict";q.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),xp=Ze({"src/lib/array.js"(Z){"use strict";var q=YA().decode,d=Xv(),x=Array.isArray,A=ArrayBuffer,M=DataView;function e(s){return A.isView(s)&&!(s instanceof M)}Z.isTypedArray=e;function t(s){return x(s)||e(s)}Z.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Z.isArray1D=r,Z.ensureArray=function(s,c){return x(s)||(s=[]),s.length=c,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Z.isArrayBuffer=a,Z.decodeTypedArraySpec=function(s){var c=[],f=i(s),g=f.dtype,v=o[g];if(!v)throw new Error('Error in dtype: "'+g+'"');var T=v.BYTES_PER_ELEMENT,l=f.bdata;a(l)||(l=q(l));var _=f.shape===void 0?[l.byteLength/T]:(""+f.shape).split(",");_.reverse();var w=_.length,S,E,y=+_[0],b=T*y,p=0;if(w===1)c=new v(l);else if(w===2)for(S=+_[1],E=0;E<S;E++)c[E]=new v(l,p,y),p+=b;else if(w===3){S=+_[1];for(var u=+_[2],m=0;m<u;m++)for(c[m]=[],E=0;E<S;E++)c[m][E]=new v(l,p,y),p+=b}else throw new Error("ndim: "+w+'is not supported with the shape:"'+f.shape+'"');return c.bdata=f.bdata,c.dtype=f.dtype,c.shape=_.reverse().join(","),s._inputArray=c,c},Z.isTypedArraySpec=function(s){return d(s)&&s.hasOwnProperty("dtype")&&typeof s.dtype=="string"&&s.hasOwnProperty("bdata")&&(typeof s.bdata=="string"||a(s.bdata))&&(s.shape===void 0||s.hasOwnProperty("shape")&&(typeof s.shape=="string"||typeof s.shape=="number"))};function i(s){return{bdata:s.bdata,dtype:s.dtype,shape:s.shape}}Z.concat=function(){var s=[],c=!0,f=0,g,v,T,l,_,w,S,E;for(T=0;T<arguments.length;T++)l=arguments[T],w=l.length,w&&(v?s.push(l):(v=l,_=w),x(l)?g=!1:(c=!1,f?g!==l.constructor&&(g=!1):g=l.constructor),f+=w);if(!f)return[];if(!s.length)return v;if(c)return v.concat.apply(v,s);if(g){for(S=new g(f),S.set(v),T=0;T<s.length;T++)l=s[T],S.set(l,_),_+=l.length;return S}for(S=new Array(f),E=0;E<v.length;E++)S[E]=v[E];for(T=0;T<s.length;T++){for(l=s[T],E=0;E<l.length;E++)S[_+E]=l[E];_+=E}return S},Z.maxRowLength=function(s){return n(s,Math.max,0)},Z.minRowLength=function(s){return n(s,Math.min,1/0)};function n(s,c,f){if(t(s))if(t(s[0])){for(var g=f,v=0;v<s.length;v++)g=c(g,s[v].length);return g}else return s.length;return 0}}}),b_=Ze({"src/lib/nested_property.js"(Z,q){"use strict";var d=ns(),x=xp().isArrayOrTypedArray;q.exports=function(s,c){if(d(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";var f=c.split("."),g,v,T,l;for(l=0;l<f.length;l++)if(String(f[l]).slice(0,2)==="__")throw"bad property string";for(l=0;l<f.length;){if(g=String(f[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),g){if(g[1])f[l]=g[1];else if(l===0)f.splice(0,1);else throw"bad property string";for(v=g[2].substr(1,g[2].length-2).split("]["),T=0;T<v.length;T++)l++,f.splice(l,0,Number(v[T]))}l++}return typeof s!="object"?i(s,c,f):{set:t(s,f,c),get:A(s,f),astr:c,parts:f,obj:s}};function A(n,s){return function(c){var f=n,g,v,T,l,_;for(l=0;l<s.length-1;l++){if(g=s[l],g===-1){for(v=!0,T=[],_=0;_<f.length;_++)T[_]=A(f[_],s.slice(l+1))(c),T[_]!==T[0]&&(v=!1);return v?T[0]:T}if(typeof g=="number"&&!x(f)||(f=f[g],typeof f!="object"||f===null))return}if(!(typeof f!="object"||f===null)&&(T=f[s[l]],!(!c&&T===null)))return T}}var M=/(^|\.)args\[/;function e(n,s){return n===void 0||n===null&&!s.match(M)}function t(n,s,c){return function(f){var g=n,v="",T=[[n,v]],l=e(f,c),_,w;for(w=0;w<s.length-1;w++){if(_=s[w],typeof _=="number"&&!x(g))throw"array index but container is not an array";if(_===-1){if(l=!o(g,s.slice(w+1),f,c),l)break;return}if(!a(g,_,s[w+1],l))break;if(g=g[_],typeof g!="object"||g===null)throw"container is not an object";v=r(v,_),T.push([g,v])}if(l){if(w===s.length-1&&(delete g[s[w]],Array.isArray(g)&&+s[w]===g.length-1))for(;g.length&&g[g.length-1]===void 0;)g.pop()}else g[s[w]]=f}}function r(n,s){var c=s;return d(s)?c="["+s+"]":n&&(c="."+s),n+c}function o(n,s,c,f){var g=x(c),v=!0,T=c,l=f.replace("-1",0),_=g?!1:e(c,l),w=s[0],S;for(S=0;S<n.length;S++)l=f.replace("-1",S),g&&(T=c[S%c.length],_=e(T,l)),_&&(v=!1),a(n,S,w,_)&&t(n[S],s,f.replace("-1",S))(T);return v}function a(n,s,c,f){if(n[s]===void 0){if(f)return!1;typeof c=="number"?n[s]=[]:n[s]={}}return!0}function i(n,s,c){return{set:function(){throw"bad container"},get:function(){},astr:s,parts:c,obj:n}}}}),l7=Ze({"src/lib/keyed_container.js"(Z,q){"use strict";var d=b_(),x=/^\w*$/,A=0,M=1,e=2,t=3,r=4;q.exports=function(a,i,n,s){n=n||"name",s=s||"value";var c,f,g,v={};i&&i.length?(g=d(a,i),f=g.get()):f=a,i=i||"";var T={};if(f)for(c=0;c<f.length;c++)T[f[c][n]]=c;var l=x.test(s),_={set:function(w,S){var E=S===null?r:A;if(!f){if(!g||E===r)return;f=[],g.set(f)}var y=T[w];if(y===void 0){if(E===r)return;E=E|t,y=f.length,T[w]=y}else S!==(l?f[y][s]:d(f[y],s).get())&&(E=E|e);var b=f[y]=f[y]||{};return b[n]=w,l?b[s]=S:d(b,s).set(S),S!==null&&(E=E&~r),v[y]=v[y]|E,_},get:function(w){if(f){var S=T[w];if(S!==void 0)return l?f[S][s]:d(f[S],s).get()}},rename:function(w,S){var E=T[w];return E===void 0||(v[E]=v[E]|M,T[S]=E,delete T[w],f[E][n]=S),_},remove:function(w){var S=T[w];if(S===void 0)return _;var E=f[S];if(Object.keys(E).length>2)return v[S]=v[S]|e,_.set(w,null);if(l){for(c=S;c<f.length;c++)v[c]=v[c]|t;for(c=S;c<f.length;c++)T[f[c][n]]--;f.splice(S,1),delete T[w]}else d(E,s).set(null),v[S]=v[S]|e|r;return _},constructUpdate:function(){for(var w,S,E={},y=Object.keys(v),b=0;b<y.length;b++)S=y[b],w=i+"["+S+"]",f[S]?(v[S]&M&&(E[w+"."+n]=f[S][n]),v[S]&e&&(l?E[w+"."+s]=v[S]&r?null:f[S][s]:E[w+"."+s]=v[S]&r?null:d(f[S],s).get())):E[w]=null;return E}};return _}}}),u7=Ze({"src/lib/relative_attr.js"(Z,q){"use strict";var d=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,x=/^[^\.\[\]]+$/;q.exports=function(A,M){for(;M;){var e=A.match(d);if(e)A=e[1];else if(A.match(x))A="";else throw new Error("bad relativeAttr call:"+[A,M]);if(M.charAt(0)==="^")M=M.slice(1);else break}return A&&M.charAt(0)!=="["?A+"."+M:A+M}}}),f2=Ze({"src/lib/to_log_range.js"(Z,q){"use strict";var d=ns();q.exports=function(A,M){if(A>0)return Math.log(A)/Math.LN10;var e=Math.log(Math.min(M[0],M[1]))/Math.LN10;return d(e)||(e=Math.log(Math.max(M[0],M[1]))/Math.LN10-6),e}}}),c7=Ze({"src/lib/relink_private.js"(Z,q){"use strict";var d=xp().isArrayOrTypedArray,x=Xv();q.exports=function A(M,e){for(var t in e){var r=e[t],o=M[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in M)continue;M[t]=r}else if(d(r)&&d(o)&&x(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;i<a;i++)o[i]!==r[i]&&x(r[i])&&x(o[i])&&A(o[i],r[i])}else x(r)&&x(o)&&(A(o,r),Object.keys(o).length||delete M[t])}}}}),Yy=Ze({"src/lib/mod.js"(Z,q){"use strict";function d(A,M){var e=A%M;return e<0?e+M:e}function x(A,M){return Math.abs(A)>M/2?A-Math.round(A/M)*M:A}q.exports={mod:d,modHalf:x}}}),Ch=Ze({"node_modules/tinycolor2/tinycolor.js"(Z,q){(function(d){var x=/^\s+/,A=/\s+$/,M=0,e=d.round,t=d.min,r=d.max,o=d.random;function a(j,ee){if(j=j||"",ee=ee||{},j instanceof a)return j;if(!(this instanceof a))return new a(j,ee);var re=i(j);this._originalInput=j,this._r=re.r,this._g=re.g,this._b=re.b,this._a=re.a,this._roundA=e(100*this._a)/100,this._format=ee.format||re.format,this._gradientType=ee.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=re.ok,this._tc_id=M++}a.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 j=this.toRgb();return(j.r*299+j.g*587+j.b*114)/1e3},getLuminance:function(){var j=this.toRgb(),ee,re,ce,be,Ae,ze;return ee=j.r/255,re=j.g/255,ce=j.b/255,ee<=.03928?be=ee/12.92:be=d.pow((ee+.055)/1.055,2.4),re<=.03928?Ae=re/12.92:Ae=d.pow((re+.055)/1.055,2.4),ce<=.03928?ze=ce/12.92:ze=d.pow((ce+.055)/1.055,2.4),.2126*be+.7152*Ae+.0722*ze},setAlpha:function(j){return this._a=I(j),this._roundA=e(100*this._a)/100,this},toHsv:function(){var j=f(this._r,this._g,this._b);return{h:j.h*360,s:j.s,v:j.v,a:this._a}},toHsvString:function(){var j=f(this._r,this._g,this._b),ee=e(j.h*360),re=e(j.s*100),ce=e(j.v*100);return this._a==1?"hsv("+ee+", "+re+"%, "+ce+"%)":"hsva("+ee+", "+re+"%, "+ce+"%, "+this._roundA+")"},toHsl:function(){var j=s(this._r,this._g,this._b);return{h:j.h*360,s:j.s,l:j.l,a:this._a}},toHslString:function(){var j=s(this._r,this._g,this._b),ee=e(j.h*360),re=e(j.s*100),ce=e(j.l*100);return this._a==1?"hsl("+ee+", "+re+"%, "+ce+"%)":"hsla("+ee+", "+re+"%, "+ce+"%, "+this._roundA+")"},toHex:function(j){return v(this._r,this._g,this._b,j)},toHexString:function(j){return"#"+this.toHex(j)},toHex8:function(j){return T(this._r,this._g,this._b,this._a,j)},toHex8String:function(j){return"#"+this.toHex8(j)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(N(this._r,255)*100)+"%",g:e(N(this._g,255)*100)+"%",b:e(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%)":"rgba("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:B[v(this._r,this._g,this._b,!0)]||!1},toFilter:function(j){var ee="#"+l(this._r,this._g,this._b,this._a),re=ee,ce=this._gradientType?"GradientType = 1, ":"";if(j){var be=a(j);re="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+ce+"startColorstr="+ee+",endColorstr="+re+")"},toString:function(j){var ee=!!j;j=j||this._format;var re=!1,ce=this._a<1&&this._a>=0,be=!ee&&ce&&(j==="hex"||j==="hex6"||j==="hex3"||j==="hex4"||j==="hex8"||j==="name");return be?j==="name"&&this._a===0?this.toName():this.toRgbString():(j==="rgb"&&(re=this.toRgbString()),j==="prgb"&&(re=this.toPercentageRgbString()),(j==="hex"||j==="hex6")&&(re=this.toHexString()),j==="hex3"&&(re=this.toHexString(!0)),j==="hex4"&&(re=this.toHex8String(!0)),j==="hex8"&&(re=this.toHex8String()),j==="name"&&(re=this.toName()),j==="hsl"&&(re=this.toHslString()),j==="hsv"&&(re=this.toHsvString()),re||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(j,ee){var re=j.apply(null,[this].concat([].slice.call(ee)));return this._r=re._r,this._g=re._g,this._b=re._b,this.setAlpha(re._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(j,ee){return j.apply(null,[this].concat([].slice.call(ee)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(P,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},a.fromRatio=function(j,ee){if(typeof j=="object"){var re={};for(var ce in j)j.hasOwnProperty(ce)&&(ce==="a"?re[ce]=j[ce]:re[ce]=he(j[ce]));j=re}return a(j,ee)};function i(j){var ee={r:0,g:0,b:0},re=1,ce=null,be=null,Ae=null,ze=!1,Re=!1;return typeof j=="string"&&(j=oe(j)),typeof j=="object"&&(X(j.r)&&X(j.g)&&X(j.b)?(ee=n(j.r,j.g,j.b),ze=!0,Re=String(j.r).substr(-1)==="%"?"prgb":"rgb"):X(j.h)&&X(j.s)&&X(j.v)?(ce=he(j.s),be=he(j.v),ee=g(j.h,ce,be),ze=!0,Re="hsv"):X(j.h)&&X(j.s)&&X(j.l)&&(ce=he(j.s),Ae=he(j.l),ee=c(j.h,ce,Ae),ze=!0,Re="hsl"),j.hasOwnProperty("a")&&(re=j.a)),re=I(re),{ok:ze,format:j.format||Re,r:t(255,r(ee.r,0)),g:t(255,r(ee.g,0)),b:t(255,r(ee.b,0)),a:re}}function n(j,ee,re){return{r:N(j,255)*255,g:N(ee,255)*255,b:N(re,255)*255}}function s(j,ee,re){j=N(j,255),ee=N(ee,255),re=N(re,255);var ce=r(j,ee,re),be=t(j,ee,re),Ae,ze,Re=(ce+be)/2;if(ce==be)Ae=ze=0;else{var Xe=ce-be;switch(ze=Re>.5?Xe/(2-ce-be):Xe/(ce+be),ce){case j:Ae=(ee-re)/Xe+(ee<re?6:0);break;case ee:Ae=(re-j)/Xe+2;break;case re:Ae=(j-ee)/Xe+4;break}Ae/=6}return{h:Ae,s:ze,l:Re}}function c(j,ee,re){var ce,be,Ae;j=N(j,360),ee=N(ee,100),re=N(re,100);function ze(it,ot,tt){return tt<0&&(tt+=1),tt>1&&(tt-=1),tt<1/6?it+(ot-it)*6*tt:tt<1/2?ot:tt<2/3?it+(ot-it)*(2/3-tt)*6:it}if(ee===0)ce=be=Ae=re;else{var Re=re<.5?re*(1+ee):re+ee-re*ee,Xe=2*re-Re;ce=ze(Xe,Re,j+1/3),be=ze(Xe,Re,j),Ae=ze(Xe,Re,j-1/3)}return{r:ce*255,g:be*255,b:Ae*255}}function f(j,ee,re){j=N(j,255),ee=N(ee,255),re=N(re,255);var ce=r(j,ee,re),be=t(j,ee,re),Ae,ze,Re=ce,Xe=ce-be;if(ze=ce===0?0:Xe/ce,ce==be)Ae=0;else{switch(ce){case j:Ae=(ee-re)/Xe+(ee<re?6:0);break;case ee:Ae=(re-j)/Xe+2;break;case re:Ae=(j-ee)/Xe+4;break}Ae/=6}return{h:Ae,s:ze,v:Re}}function g(j,ee,re){j=N(j,360)*6,ee=N(ee,100),re=N(re,100);var ce=d.floor(j),be=j-ce,Ae=re*(1-ee),ze=re*(1-be*ee),Re=re*(1-(1-be)*ee),Xe=ce%6,it=[re,ze,Ae,Ae,Re,re][Xe],ot=[Re,re,re,ze,Ae,Ae][Xe],tt=[Ae,Ae,Re,re,re,ze][Xe];return{r:it*255,g:ot*255,b:tt*255}}function v(j,ee,re,ce){var be=[le(e(j).toString(16)),le(e(ee).toString(16)),le(e(re).toString(16))];return ce&&be[0].charAt(0)==be[0].charAt(1)&&be[1].charAt(0)==be[1].charAt(1)&&be[2].charAt(0)==be[2].charAt(1)?be[0].charAt(0)+be[1].charAt(0)+be[2].charAt(0):be.join("")}function T(j,ee,re,ce,be){var Ae=[le(e(j).toString(16)),le(e(ee).toString(16)),le(e(re).toString(16)),le(G(ce))];return be&&Ae[0].charAt(0)==Ae[0].charAt(1)&&Ae[1].charAt(0)==Ae[1].charAt(1)&&Ae[2].charAt(0)==Ae[2].charAt(1)&&Ae[3].charAt(0)==Ae[3].charAt(1)?Ae[0].charAt(0)+Ae[1].charAt(0)+Ae[2].charAt(0)+Ae[3].charAt(0):Ae.join("")}function l(j,ee,re,ce){var be=[le(G(ce)),le(e(j).toString(16)),le(e(ee).toString(16)),le(e(re).toString(16))];return be.join("")}a.equals=function(j,ee){return!j||!ee?!1:a(j).toRgbString()==a(ee).toRgbString()},a.random=function(){return a.fromRatio({r:o(),g:o(),b:o()})};function _(j,ee){ee=ee===0?0:ee||10;var re=a(j).toHsl();return re.s-=ee/100,re.s=U(re.s),a(re)}function w(j,ee){ee=ee===0?0:ee||10;var re=a(j).toHsl();return re.s+=ee/100,re.s=U(re.s),a(re)}function S(j){return a(j).desaturate(100)}function E(j,ee){ee=ee===0?0:ee||10;var re=a(j).toHsl();return re.l+=ee/100,re.l=U(re.l),a(re)}function y(j,ee){ee=ee===0?0:ee||10;var re=a(j).toRgb();return re.r=r(0,t(255,re.r-e(255*-(ee/100)))),re.g=r(0,t(255,re.g-e(255*-(ee/100)))),re.b=r(0,t(255,re.b-e(255*-(ee/100)))),a(re)}function b(j,ee){ee=ee===0?0:ee||10;var re=a(j).toHsl();return re.l-=ee/100,re.l=U(re.l),a(re)}function p(j,ee){var re=a(j).toHsl(),ce=(re.h+ee)%360;return re.h=ce<0?360+ce:ce,a(re)}function u(j){var ee=a(j).toHsl();return ee.h=(ee.h+180)%360,a(ee)}function m(j){var ee=a(j).toHsl(),re=ee.h;return[a(j),a({h:(re+120)%360,s:ee.s,l:ee.l}),a({h:(re+240)%360,s:ee.s,l:ee.l})]}function h(j){var ee=a(j).toHsl(),re=ee.h;return[a(j),a({h:(re+90)%360,s:ee.s,l:ee.l}),a({h:(re+180)%360,s:ee.s,l:ee.l}),a({h:(re+270)%360,s:ee.s,l:ee.l})]}function P(j){var ee=a(j).toHsl(),re=ee.h;return[a(j),a({h:(re+72)%360,s:ee.s,l:ee.l}),a({h:(re+216)%360,s:ee.s,l:ee.l})]}function L(j,ee,re){ee=ee||6,re=re||30;var ce=a(j).toHsl(),be=360/re,Ae=[a(j)];for(ce.h=(ce.h-(be*ee>>1)+720)%360;--ee;)ce.h=(ce.h+be)%360,Ae.push(a(ce));return Ae}function z(j,ee){ee=ee||6;for(var re=a(j).toHsv(),ce=re.h,be=re.s,Ae=re.v,ze=[],Re=1/ee;ee--;)ze.push(a({h:ce,s:be,v:Ae})),Ae=(Ae+Re)%1;return ze}a.mix=function(j,ee,re){re=re===0?0:re||50;var ce=a(j).toRgb(),be=a(ee).toRgb(),Ae=re/100,ze={r:(be.r-ce.r)*Ae+ce.r,g:(be.g-ce.g)*Ae+ce.g,b:(be.b-ce.b)*Ae+ce.b,a:(be.a-ce.a)*Ae+ce.a};return a(ze)},a.readability=function(j,ee){var re=a(j),ce=a(ee);return(d.max(re.getLuminance(),ce.getLuminance())+.05)/(d.min(re.getLuminance(),ce.getLuminance())+.05)},a.isReadable=function(j,ee,re){var ce=a.readability(j,ee),be,Ae;switch(Ae=!1,be=ie(re),be.level+be.size){case"AAsmall":case"AAAlarge":Ae=ce>=4.5;break;case"AAlarge":Ae=ce>=3;break;case"AAAsmall":Ae=ce>=7;break}return Ae},a.mostReadable=function(j,ee,re){var ce=null,be=0,Ae,ze,Re,Xe;re=re||{},ze=re.includeFallbackColors,Re=re.level,Xe=re.size;for(var it=0;it<ee.length;it++)Ae=a.readability(j,ee[it]),Ae>be&&(be=Ae,ce=a(ee[it]));return a.isReadable(j,ce,{level:Re,size:Xe})||!ze?ce:(re.includeFallbackColors=!1,a.mostReadable(j,["#fff","#000"],re))};var F=a.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"},B=a.hexNames=O(F);function O(j){var ee={};for(var re in j)j.hasOwnProperty(re)&&(ee[j[re]]=re);return ee}function I(j){return j=parseFloat(j),(isNaN(j)||j<0||j>1)&&(j=1),j}function N(j,ee){Q(j)&&(j="100%");var re=ue(j);return j=t(ee,r(0,parseFloat(j))),re&&(j=parseInt(j*ee,10)/100),d.abs(j-ee)<1e-6?1:j%ee/parseFloat(ee)}function U(j){return t(1,r(0,j))}function W(j){return parseInt(j,16)}function Q(j){return typeof j=="string"&&j.indexOf(".")!=-1&&parseFloat(j)===1}function ue(j){return typeof j=="string"&&j.indexOf("%")!=-1}function le(j){return j.length==1?"0"+j:""+j}function he(j){return j<=1&&(j=j*100+"%"),j}function G(j){return d.round(parseFloat(j)*255).toString(16)}function $(j){return W(j)/255}var J=function(){var j="[-\\+]?\\d+%?",ee="[-\\+]?\\d*\\.\\d+%?",re="(?:"+ee+")|(?:"+j+")",ce="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?",be="[\\s|\\(]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")[,|\\s]+("+re+")\\s*\\)?";return{CSS_UNIT:new RegExp(re),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+be),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 X(j){return!!J.CSS_UNIT.exec(j)}function oe(j){j=j.replace(x,"").replace(A,"").toLowerCase();var ee=!1;if(F[j])j=F[j],ee=!0;else if(j=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var re;return(re=J.rgb.exec(j))?{r:re[1],g:re[2],b:re[3]}:(re=J.rgba.exec(j))?{r:re[1],g:re[2],b:re[3],a:re[4]}:(re=J.hsl.exec(j))?{h:re[1],s:re[2],l:re[3]}:(re=J.hsla.exec(j))?{h:re[1],s:re[2],l:re[3],a:re[4]}:(re=J.hsv.exec(j))?{h:re[1],s:re[2],v:re[3]}:(re=J.hsva.exec(j))?{h:re[1],s:re[2],v:re[3],a:re[4]}:(re=J.hex8.exec(j))?{r:W(re[1]),g:W(re[2]),b:W(re[3]),a:$(re[4]),format:ee?"name":"hex8"}:(re=J.hex6.exec(j))?{r:W(re[1]),g:W(re[2]),b:W(re[3]),format:ee?"name":"hex"}:(re=J.hex4.exec(j))?{r:W(re[1]+""+re[1]),g:W(re[2]+""+re[2]),b:W(re[3]+""+re[3]),a:$(re[4]+""+re[4]),format:ee?"name":"hex8"}:(re=J.hex3.exec(j))?{r:W(re[1]+""+re[1]),g:W(re[2]+""+re[2]),b:W(re[3]+""+re[3]),format:ee?"name":"hex"}:!1}function ie(j){var ee,re;return j=j||{level:"AA",size:"small"},ee=(j.level||"AA").toUpperCase(),re=(j.size||"small").toLowerCase(),ee!=="AA"&&ee!=="AAA"&&(ee="AA"),re!=="small"&&re!=="large"&&(re="small"),{level:ee,size:re}}typeof q<"u"&&q.exports?q.exports=a:window.tinycolor=a})(Math)}}),rs=Ze({"src/lib/extend.js"(Z){"use strict";var q=Xv(),d=Array.isArray;function x(M,e){var t,r;for(t=0;t<M.length;t++){if(r=M[t],r!==null&&typeof r=="object")return!1;r!==void 0&&(e[t]=r)}return!0}Z.extendFlat=function(){return A(arguments,!1,!1,!1)},Z.extendDeep=function(){return A(arguments,!0,!1,!1)},Z.extendDeepAll=function(){return A(arguments,!0,!0,!1)},Z.extendDeepNoArrays=function(){return A(arguments,!0,!1,!0)};function A(M,e,t,r){var o=M[0],a=M.length,i,n,s,c,f,g,v;if(a===2&&d(o)&&d(M[1])&&o.length===0){if(v=x(M[1],o),v)return o;o.splice(0,o.length)}for(var T=1;T<a;T++){i=M[T];for(n in i)s=o[n],c=i[n],r&&d(c)?o[n]=c:e&&c&&(q(c)||(f=d(c)))?(f?(f=!1,g=s&&d(s)?s:[]):g=s&&q(s)?s:{},o[n]=A([g,c],e,t,r)):(typeof c<"u"||t)&&(o[n]=c)}return o}}}),tc=Ze({"src/plots/font_attributes.js"(Z,q){"use strict";q.exports=function(d){var x=d.variantValues,A=d.editType,M=d.colorEditType;M===void 0&&(M=A);var e={editType:A,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};d.noNumericWeightValues&&(e.valType="enumerated",e.values=e.extras,e.extras=void 0,e.min=void 0,e.max=void 0);var t={family:{valType:"string",noBlank:!0,strict:!0,editType:A},size:{valType:"number",min:1,editType:A},color:{valType:"color",editType:M},weight:e,style:{editType:A,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:d.noFontVariant?void 0:{editType:A,valType:"enumerated",values:x||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:d.noFontTextcase?void 0:{editType:A,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:d.noFontLineposition?void 0:{editType:A,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:d.noFontShadow?void 0:{editType:A,valType:"string",dflt:d.autoShadowDflt?"auto":"none"},editType:A};return d.autoSize&&(t.size.dflt="auto"),d.autoColor&&(t.color.dflt="auto"),d.arrayOk&&(t.family.arrayOk=!0,t.weight.arrayOk=!0,t.style.arrayOk=!0,d.noFontVariant||(t.variant.arrayOk=!0),d.noFontTextcase||(t.textcase.arrayOk=!0),d.noFontLineposition||(t.lineposition.arrayOk=!0),d.noFontShadow||(t.shadow.arrayOk=!0),t.size.arrayOk=!0,t.color.arrayOk=!0),t}}}),w_=Ze({"src/components/fx/constants.js"(Z,q){"use strict";q.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Xm=Ze({"src/components/fx/layout_attributes.js"(Z,q){"use strict";var d=w_(),x=tc(),A=x({editType:"none"});A.family.dflt=d.HOVERFONT,A.size.dflt=d.HOVERFONTSIZE,q.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:A,grouptitlefont:x({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"}}}}),Ky=Ze({"src/components/fx/attributes.js"(Z,q){"use strict";var d=tc(),x=Xm().hoverlabel,A=rs().extendFlat;q.exports={hoverlabel:{bgcolor:A({},x.bgcolor,{arrayOk:!0}),bordercolor:A({},x.bordercolor,{arrayOk:!0}),font:d({arrayOk:!0,editType:"none"}),align:A({},x.align,{arrayOk:!0}),namelength:A({},x.namelength,{arrayOk:!0}),showarrow:A({},x.showarrow),editType:"none"}}}}),eu=Ze({"src/plots/attributes.js"(Z,q){"use strict";var d=tc(),x=Ky();q.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:d({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:x.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"}}}}),G0=Ze({"src/components/colorscale/scales.js"(Z,q){"use strict";var d=Ch(),x={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)"]]},A=x.RdBu;function M(r,o){if(o||(o=A),!r)return o;function a(){try{r=x[r]||JSON.parse(r)}catch{r=o}}return typeof r=="string"&&(a(),typeof r=="string"&&a()),e(r)?r:o}function e(r){var o=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var a=0;a<r.length;a++){var i=r[a];if(i.length!==2||+i[0]<o||!d(i[1]).isValid())return!1;o=+i[0]}return!0}function t(r){return x[r]!==void 0?!0:e(r)}q.exports={scales:x,defaultScale:A,get:M,isValid:t}}}),oh=Ze({"src/components/color/attributes.js"(Z){"use strict";Z.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Z.defaultLine="#444",Z.lightLine="#eee",Z.background="#fff",Z.borderLine="#BEC8D9",Z.lightFraction=100*10/11}}),Yn=Ze({"src/components/color/index.js"(Z,q){"use strict";var d=Ch(),x=ns(),A=xp().isTypedArray,M=q.exports={},e=oh();M.defaults=e.defaults;var t=M.defaultLine=e.defaultLine;M.lightLine=e.lightLine;var r=M.background=e.background;M.tinyRGB=function(a){var i=a.toRgb();return"rgb("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+")"},M.rgb=function(a){return M.tinyRGB(d(a))},M.opacity=function(a){return a?d(a).getAlpha():0},M.addOpacity=function(a,i){var n=d(a).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+i+")"},M.combine=function(a,i){var n=d(a).toRgb();if(n.a===1)return d(a).toRgbString();var s=d(i||r).toRgb(),c=s.a===1?s:{r:255*(1-s.a)+s.r*s.a,g:255*(1-s.a)+s.g*s.a,b:255*(1-s.a)+s.b*s.a},f={r:c.r*(1-n.a)+n.r*n.a,g:c.g*(1-n.a)+n.g*n.a,b:c.b*(1-n.a)+n.b*n.a};return d(f).toRgbString()},M.interpolate=function(a,i,n){var s=d(a).toRgb(),c=d(i).toRgb(),f={r:n*s.r+(1-n)*c.r,g:n*s.g+(1-n)*c.g,b:n*s.b+(1-n)*c.b};return d(f).toRgbString()},M.contrast=function(a,i,n){var s=d(a);s.getAlpha()!==1&&(s=d(M.combine(a,r)));var c=s.isDark()?i?s.lighten(i):r:n?s.darken(n):t;return c.toString()},M.stroke=function(a,i){var n=d(i);a.style({stroke:M.tinyRGB(n),"stroke-opacity":n.getAlpha()})},M.fill=function(a,i){var n=d(i);a.style({fill:M.tinyRGB(n),"fill-opacity":n.getAlpha()})},M.clean=function(a){if(!(!a||typeof a!="object")){var i=Object.keys(a),n,s,c,f;for(n=0;n<i.length;n++)if(c=i[n],f=a[c],c.substr(c.length-5)==="color")if(Array.isArray(f))for(s=0;s<f.length;s++)f[s]=o(f[s]);else a[c]=o(f);else if(c.substr(c.length-10)==="colorscale"&&Array.isArray(f))for(s=0;s<f.length;s++)Array.isArray(f[s])&&(f[s][1]=o(f[s][1]));else if(Array.isArray(f)){var g=f[0];if(!Array.isArray(g)&&g&&typeof g=="object")for(s=0;s<f.length;s++)M.clean(f[s])}else f&&typeof f=="object"&&!A(f)&&M.clean(f)}};function o(a){if(x(a)||typeof a!="string")return a;var i=a.trim();if(i.substr(0,3)!=="rgb")return a;var n=i.match(/^rgba?\s*\(([^()]*)\)$/);if(!n)return a;var s=n[1].trim().split(/\s*[\s,]\s*/),c=i.charAt(3)==="a"&&s.length===4;if(!c&&s.length!==3)return a;for(var f=0;f<s.length;f++){if(!s[f].length||(s[f]=Number(s[f]),!(s[f]>=0)))return a;if(f===3)s[f]>1&&(s[f]=1);else if(s[f]>=1)return a}var g=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return c?"rgba("+g+", "+s[3]+")":"rgb("+g+")"}}}),Zm=Ze({"src/constants/interactions.js"(Z,q){"use strict";q.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),Jy=Ze({"src/lib/regex.js"(Z){"use strict";Z.counter=function(q,d,x,A){var M=(d||"")+(x?"":"$"),e=A===!1?"":"^";return q==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+M):new RegExp(e+q+"([2-9]|[1-9][0-9]+)?"+M)}}}),f7=Ze({"src/lib/coerce.js"(Z){"use strict";var q=ns(),d=Ch(),x=rs().extendFlat,A=eu(),M=G0(),e=Yn(),t=Zm().DESELECTDIM,r=b_(),o=Jy().counter,a=Yy().modHalf,i=xp().isArrayOrTypedArray,n=xp().isTypedArraySpec,s=xp().decodeTypedArraySpec;Z.valObjectMeta={data_array:{coerceFunction:function(f,g,v){g.set(i(f)?f:n(f)?s(f):v)}},enumerated:{coerceFunction:function(f,g,v,T){T.coerceNumber&&(f=+f),T.values.indexOf(f)===-1?g.set(v):g.set(f)},validateFunction:function(f,g){g.coerceNumber&&(f=+f);for(var v=g.values,T=0;T<v.length;T++){var l=String(v[T]);if(l.charAt(0)==="/"&&l.charAt(l.length-1)==="/"){var _=new RegExp(l.substr(1,l.length-2));if(_.test(f))return!0}else if(f===v[T])return!0}return!1}},boolean:{coerceFunction:function(f,g,v){f===!0||f===!1?g.set(f):g.set(v)}},number:{coerceFunction:function(f,g,v,T){n(f)&&(f=s(f)),!q(f)||T.min!==void 0&&f<T.min||T.max!==void 0&&f>T.max?g.set(v):g.set(+f)}},integer:{coerceFunction:function(f,g,v,T){if((T.extras||[]).indexOf(f)!==-1){g.set(f);return}n(f)&&(f=s(f)),f%1||!q(f)||T.min!==void 0&&f<T.min||T.max!==void 0&&f>T.max?g.set(v):g.set(+f)}},string:{coerceFunction:function(f,g,v,T){if(typeof f!="string"){var l=typeof f=="number";T.strict===!0||!l?g.set(v):g.set(String(f))}else T.noBlank&&!f?g.set(v):g.set(f)}},color:{coerceFunction:function(f,g,v){n(f)&&(f=s(f)),d(f).isValid()?g.set(f):g.set(v)}},colorlist:{coerceFunction:function(f,g,v){function T(l){return d(l).isValid()}!Array.isArray(f)||!f.length?g.set(v):f.every(T)?g.set(f):g.set(v)}},colorscale:{coerceFunction:function(f,g,v){g.set(M.get(f,v))}},angle:{coerceFunction:function(f,g,v){n(f)&&(f=s(f)),f==="auto"?g.set("auto"):q(f)?g.set(a(+f,360)):g.set(v)}},subplotid:{coerceFunction:function(f,g,v,T){var l=T.regex||o(v);if(typeof f=="string"&&l.test(f)){g.set(f);return}g.set(v)},validateFunction:function(f,g){var v=g.dflt;return f===v?!0:typeof f!="string"?!1:!!o(v).test(f)}},flaglist:{coerceFunction:function(f,g,v,T){if((T.extras||[]).indexOf(f)!==-1){g.set(f);return}if(typeof f!="string"){g.set(v);return}for(var l=f.split("+"),_=0;_<l.length;){var w=l[_];T.flags.indexOf(w)===-1||l.indexOf(w)<_?l.splice(_,1):_++}l.length?g.set(l.join("+")):g.set(v)}},any:{coerceFunction:function(f,g,v){f===void 0?g.set(v):g.set(n(f)?s(f):f)}},info_array:{coerceFunction:function(f,g,v,T){function l(F,B,O){var I,N={set:function(U){I=U}};return O===void 0&&(O=B.dflt),Z.valObjectMeta[B.valType].coerceFunction(F,N,O,B),I}if(n(f)&&(f=s(f)),!i(f)){g.set(v);return}var _=T.dimensions===2||T.dimensions==="1-2"&&Array.isArray(f)&&i(f[0]),w=T.items,S=[],E=Array.isArray(w),y=E&&_&&i(w[0]),b=_&&E&&!y,p=E&&!b?w.length:f.length,u,m,h,P,L,z;if(v=Array.isArray(v)?v:[],_)for(u=0;u<p;u++)for(S[u]=[],h=i(f[u])?f[u]:[],b?L=w.length:E?L=w[u].length:L=h.length,m=0;m<L;m++)b?P=w[m]:E?P=w[u][m]:P=w,z=l(h[m],P,(v[u]||[])[m]),z!==void 0&&(S[u][m]=z);else for(u=0;u<p;u++)z=l(f[u],E?w[u]:w,v[u]),z!==void 0&&(S[u]=z);g.set(S)},validateFunction:function(f,g){if(!i(f))return!1;var v=g.items,T=Array.isArray(v),l=g.dimensions===2;if(!g.freeLength&&f.length!==v.length)return!1;for(var _=0;_<f.length;_++)if(l){if(!i(f[_])||!g.freeLength&&f[_].length!==v[_].length)return!1;for(var w=0;w<f[_].length;w++)if(!c(f[_][w],T?v[_][w]:v))return!1}else if(!c(f[_],T?v[_]:v))return!1;return!0}}},Z.coerce=function(f,g,v,T,l){var _=r(v,T).get(),w=r(f,T),S=r(g,T),E=w.get(),y=g._template;if(E===void 0&&y&&(E=r(y,T).get(),y=0),l===void 0&&(l=_.dflt),_.arrayOk){if(i(E))return S.set(E),E;if(n(E))return E=s(E),S.set(E),E}var b=Z.valObjectMeta[_.valType].coerceFunction;b(E,S,l,_);var p=S.get();return y&&p===l&&!c(E,_)&&(E=r(y,T).get(),b(E,S,l,_),p=S.get()),p},Z.coerce2=function(f,g,v,T,l){var _=r(f,T),w=Z.coerce(f,g,v,T,l),S=_.get();return S!=null?w:!1},Z.coerceFont=function(f,g,v,T){T||(T={}),v=x({},v),v=x(v,T.overrideDflt||{});var l={family:f(g+".family",v.family),size:f(g+".size",v.size),color:f(g+".color",v.color),weight:f(g+".weight",v.weight),style:f(g+".style",v.style)};if(T.noFontVariant||(l.variant=f(g+".variant",v.variant)),T.noFontLineposition||(l.lineposition=f(g+".lineposition",v.lineposition)),T.noFontTextcase||(l.textcase=f(g+".textcase",v.textcase)),!T.noFontShadow){var _=v.shadow;_==="none"&&T.autoShadowDflt&&(_="auto"),l.shadow=f(g+".shadow",_)}return l},Z.coercePattern=function(f,g,v,T){var l=f(g+".shape"),_;if(l||(_=f(g+".path")),l||_){l&&f(g+".solidity"),f(g+".size");var w=f(g+".fillmode"),S=w==="overlay";if(!T){var E=f(g+".bgcolor",S?v:void 0);f(g+".fgcolor",S?e.contrast(E):v)}f(g+".fgopacity",S?.5:1)}},Z.coerceHoverinfo=function(f,g,v){var T=g._module.attributes,l=T.hoverinfo?T:A,_=l.hoverinfo,w;if(v._dataLength===1){var S=_.dflt==="all"?_.flags.slice():_.dflt.split("+");S.splice(S.indexOf("name"),1),w=S.join("+")}return Z.coerce(f,g,l,"hoverinfo",w)},Z.coerceSelectionMarkerOpacity=function(f,g){if(f.marker){var v=f.marker.opacity;if(v!==void 0){var T,l;!i(v)&&!f.selected&&!f.unselected&&(T=v,l=t*v),g("selected.marker.opacity",T),g("unselected.marker.opacity",l)}}};function c(f,g){var v=Z.valObjectMeta[g.valType];if(g.arrayOk&&i(f))return!0;if(v.validateFunction)return v.validateFunction(f,g);var T={},l=T,_={set:function(w){l=w}};return v.coerceFunction(f,_,T,g),l!==T}Z.validate=c}}),H0=Ze({"src/plot_api/plot_config.js"(Z,q){"use strict";var d={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},x={};function A(M,e){for(var t in M){var r=M[t];r.valType?e[t]=r.dflt:(e[t]||(e[t]={}),A(r,e[t]))}}A(d,x),q.exports={configAttributes:d,dfltConfig:x}}}),KA=Ze({"src/lib/notifier.js"(Z,q){"use strict";var d=On(),x=ns(),A=[];q.exports=function(M,e){if(A.indexOf(M)!==-1)return;A.push(M);var t=1e3;x(e)?t=e:e==="long"&&(t=3e3);var r=d.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var o=r.selectAll(".notifier-note").data(A);function a(i){i.duration(700).style("opacity",0).each("end",function(n){var s=A.indexOf(n);s!==-1&&A.splice(s,1),d.select(this).remove()})}o.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(i){var n=d.select(this);n.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){n.transition().call(a)});for(var s=n.append("p"),c=i.split(/<br\s*\/?>/g),f=0;f<c.length;f++)f&&s.append("br"),s.append("span").text(c[f]);e==="stick"?n.transition().duration(350).style("opacity",1):n.transition().duration(700).style("opacity",1).transition().delay(t).call(a)})}}}),Ym=Ze({"src/lib/loggers.js"(Z,q){"use strict";var d=H0().dfltConfig,x=KA(),A=q.exports={};A.log=function(){var M;if(d.logging>1){var e=["LOG:"];for(M=0;M<arguments.length;M++)e.push(arguments[M]);console.trace.apply(console,e)}if(d.notifyOnLogging>1){var t=[];for(M=0;M<arguments.length;M++)t.push(arguments[M]);x(t.join("<br>"),"long")}},A.warn=function(){var M;if(d.logging>0){var e=["WARN:"];for(M=0;M<arguments.length;M++)e.push(arguments[M]);console.trace.apply(console,e)}if(d.notifyOnLogging>0){var t=[];for(M=0;M<arguments.length;M++)t.push(arguments[M]);x(t.join("<br>"),"stick")}},A.error=function(){var M;if(d.logging>0){var e=["ERROR:"];for(M=0;M<arguments.length;M++)e.push(arguments[M]);console.error.apply(console,e)}if(d.notifyOnLogging>0){var t=[];for(M=0;M<arguments.length;M++)t.push(arguments[M]);x(t.join("<br>"),"stick")}}}}),h2=Ze({"src/lib/noop.js"(Z,q){"use strict";q.exports=function(){}}}),JA=Ze({"src/lib/push_unique.js"(Z,q){"use strict";q.exports=function(x,A){if(A instanceof RegExp){for(var M=A.toString(),e=0;e<x.length;e++)if(x[e]instanceof RegExp&&x[e].toString()===M)return x;x.push(A)}else(A||A===0)&&x.indexOf(A)===-1&&x.push(A);return x}}}),h7=Ze({"node_modules/gl-mat4/create.js"(Z,q){q.exports=d;function d(){var x=new Float32Array(16);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),p7=Ze({"node_modules/gl-mat4/clone.js"(Z,q){q.exports=d;function d(x){var A=new Float32Array(16);return A[0]=x[0],A[1]=x[1],A[2]=x[2],A[3]=x[3],A[4]=x[4],A[5]=x[5],A[6]=x[6],A[7]=x[7],A[8]=x[8],A[9]=x[9],A[10]=x[10],A[11]=x[11],A[12]=x[12],A[13]=x[13],A[14]=x[14],A[15]=x[15],A}}}),d7=Ze({"node_modules/gl-mat4/copy.js"(Z,q){q.exports=d;function d(x,A){return x[0]=A[0],x[1]=A[1],x[2]=A[2],x[3]=A[3],x[4]=A[4],x[5]=A[5],x[6]=A[6],x[7]=A[7],x[8]=A[8],x[9]=A[9],x[10]=A[10],x[11]=A[11],x[12]=A[12],x[13]=A[13],x[14]=A[14],x[15]=A[15],x}}}),$A=Ze({"node_modules/gl-mat4/identity.js"(Z,q){q.exports=d;function d(x){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),v7=Ze({"node_modules/gl-mat4/transpose.js"(Z,q){q.exports=d;function d(x,A){if(x===A){var M=A[1],e=A[2],t=A[3],r=A[6],o=A[7],a=A[11];x[1]=A[4],x[2]=A[8],x[3]=A[12],x[4]=M,x[6]=A[9],x[7]=A[13],x[8]=e,x[9]=r,x[11]=A[14],x[12]=t,x[13]=o,x[14]=a}else x[0]=A[0],x[1]=A[4],x[2]=A[8],x[3]=A[12],x[4]=A[1],x[5]=A[5],x[6]=A[9],x[7]=A[13],x[8]=A[2],x[9]=A[6],x[10]=A[10],x[11]=A[14],x[12]=A[3],x[13]=A[7],x[14]=A[11],x[15]=A[15];return x}}}),m7=Ze({"node_modules/gl-mat4/invert.js"(Z,q){q.exports=d;function d(x,A){var M=A[0],e=A[1],t=A[2],r=A[3],o=A[4],a=A[5],i=A[6],n=A[7],s=A[8],c=A[9],f=A[10],g=A[11],v=A[12],T=A[13],l=A[14],_=A[15],w=M*a-e*o,S=M*i-t*o,E=M*n-r*o,y=e*i-t*a,b=e*n-r*a,p=t*n-r*i,u=s*T-c*v,m=s*l-f*v,h=s*_-g*v,P=c*l-f*T,L=c*_-g*T,z=f*_-g*l,F=w*z-S*L+E*P+y*h-b*m+p*u;return F?(F=1/F,x[0]=(a*z-i*L+n*P)*F,x[1]=(t*L-e*z-r*P)*F,x[2]=(T*p-l*b+_*y)*F,x[3]=(f*b-c*p-g*y)*F,x[4]=(i*h-o*z-n*m)*F,x[5]=(M*z-t*h+r*m)*F,x[6]=(l*E-v*p-_*S)*F,x[7]=(s*p-f*E+g*S)*F,x[8]=(o*L-a*h+n*u)*F,x[9]=(e*h-M*L-r*u)*F,x[10]=(v*b-T*E+_*w)*F,x[11]=(c*E-s*b-g*w)*F,x[12]=(a*m-o*P-i*u)*F,x[13]=(M*P-e*m+t*u)*F,x[14]=(T*S-v*y-l*w)*F,x[15]=(s*y-c*S+f*w)*F,x):null}}}),g7=Ze({"node_modules/gl-mat4/adjoint.js"(Z,q){q.exports=d;function d(x,A){var M=A[0],e=A[1],t=A[2],r=A[3],o=A[4],a=A[5],i=A[6],n=A[7],s=A[8],c=A[9],f=A[10],g=A[11],v=A[12],T=A[13],l=A[14],_=A[15];return x[0]=a*(f*_-g*l)-c*(i*_-n*l)+T*(i*g-n*f),x[1]=-(e*(f*_-g*l)-c*(t*_-r*l)+T*(t*g-r*f)),x[2]=e*(i*_-n*l)-a*(t*_-r*l)+T*(t*n-r*i),x[3]=-(e*(i*g-n*f)-a*(t*g-r*f)+c*(t*n-r*i)),x[4]=-(o*(f*_-g*l)-s*(i*_-n*l)+v*(i*g-n*f)),x[5]=M*(f*_-g*l)-s*(t*_-r*l)+v*(t*g-r*f),x[6]=-(M*(i*_-n*l)-o*(t*_-r*l)+v*(t*n-r*i)),x[7]=M*(i*g-n*f)-o*(t*g-r*f)+s*(t*n-r*i),x[8]=o*(c*_-g*T)-s*(a*_-n*T)+v*(a*g-n*c),x[9]=-(M*(c*_-g*T)-s*(e*_-r*T)+v*(e*g-r*c)),x[10]=M*(a*_-n*T)-o*(e*_-r*T)+v*(e*n-r*a),x[11]=-(M*(a*g-n*c)-o*(e*g-r*c)+s*(e*n-r*a)),x[12]=-(o*(c*l-f*T)-s*(a*l-i*T)+v*(a*f-i*c)),x[13]=M*(c*l-f*T)-s*(e*l-t*T)+v*(e*f-t*c),x[14]=-(M*(a*l-i*T)-o*(e*l-t*T)+v*(e*i-t*a)),x[15]=M*(a*f-i*c)-o*(e*f-t*c)+s*(e*i-t*a),x}}}),y7=Ze({"node_modules/gl-mat4/determinant.js"(Z,q){q.exports=d;function d(x){var A=x[0],M=x[1],e=x[2],t=x[3],r=x[4],o=x[5],a=x[6],i=x[7],n=x[8],s=x[9],c=x[10],f=x[11],g=x[12],v=x[13],T=x[14],l=x[15],_=A*o-M*r,w=A*a-e*r,S=A*i-t*r,E=M*a-e*o,y=M*i-t*o,b=e*i-t*a,p=n*v-s*g,u=n*T-c*g,m=n*l-f*g,h=s*T-c*v,P=s*l-f*v,L=c*l-f*T;return _*L-w*P+S*h+E*m-y*u+b*p}}}),_7=Ze({"node_modules/gl-mat4/multiply.js"(Z,q){q.exports=d;function d(x,A,M){var e=A[0],t=A[1],r=A[2],o=A[3],a=A[4],i=A[5],n=A[6],s=A[7],c=A[8],f=A[9],g=A[10],v=A[11],T=A[12],l=A[13],_=A[14],w=A[15],S=M[0],E=M[1],y=M[2],b=M[3];return x[0]=S*e+E*a+y*c+b*T,x[1]=S*t+E*i+y*f+b*l,x[2]=S*r+E*n+y*g+b*_,x[3]=S*o+E*s+y*v+b*w,S=M[4],E=M[5],y=M[6],b=M[7],x[4]=S*e+E*a+y*c+b*T,x[5]=S*t+E*i+y*f+b*l,x[6]=S*r+E*n+y*g+b*_,x[7]=S*o+E*s+y*v+b*w,S=M[8],E=M[9],y=M[10],b=M[11],x[8]=S*e+E*a+y*c+b*T,x[9]=S*t+E*i+y*f+b*l,x[10]=S*r+E*n+y*g+b*_,x[11]=S*o+E*s+y*v+b*w,S=M[12],E=M[13],y=M[14],b=M[15],x[12]=S*e+E*a+y*c+b*T,x[13]=S*t+E*i+y*f+b*l,x[14]=S*r+E*n+y*g+b*_,x[15]=S*o+E*s+y*v+b*w,x}}}),x7=Ze({"node_modules/gl-mat4/translate.js"(Z,q){q.exports=d;function d(x,A,M){var e=M[0],t=M[1],r=M[2],o,a,i,n,s,c,f,g,v,T,l,_;return A===x?(x[12]=A[0]*e+A[4]*t+A[8]*r+A[12],x[13]=A[1]*e+A[5]*t+A[9]*r+A[13],x[14]=A[2]*e+A[6]*t+A[10]*r+A[14],x[15]=A[3]*e+A[7]*t+A[11]*r+A[15]):(o=A[0],a=A[1],i=A[2],n=A[3],s=A[4],c=A[5],f=A[6],g=A[7],v=A[8],T=A[9],l=A[10],_=A[11],x[0]=o,x[1]=a,x[2]=i,x[3]=n,x[4]=s,x[5]=c,x[6]=f,x[7]=g,x[8]=v,x[9]=T,x[10]=l,x[11]=_,x[12]=o*e+s*t+v*r+A[12],x[13]=a*e+c*t+T*r+A[13],x[14]=i*e+f*t+l*r+A[14],x[15]=n*e+g*t+_*r+A[15]),x}}}),b7=Ze({"node_modules/gl-mat4/scale.js"(Z,q){q.exports=d;function d(x,A,M){var e=M[0],t=M[1],r=M[2];return x[0]=A[0]*e,x[1]=A[1]*e,x[2]=A[2]*e,x[3]=A[3]*e,x[4]=A[4]*t,x[5]=A[5]*t,x[6]=A[6]*t,x[7]=A[7]*t,x[8]=A[8]*r,x[9]=A[9]*r,x[10]=A[10]*r,x[11]=A[11]*r,x[12]=A[12],x[13]=A[13],x[14]=A[14],x[15]=A[15],x}}}),w7=Ze({"node_modules/gl-mat4/rotate.js"(Z,q){q.exports=d;function d(x,A,M,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),i,n,s,c,f,g,v,T,l,_,w,S,E,y,b,p,u,m,h,P,L,z,F,B;return Math.abs(a)<1e-6?null:(a=1/a,t*=a,r*=a,o*=a,i=Math.sin(M),n=Math.cos(M),s=1-n,c=A[0],f=A[1],g=A[2],v=A[3],T=A[4],l=A[5],_=A[6],w=A[7],S=A[8],E=A[9],y=A[10],b=A[11],p=t*t*s+n,u=r*t*s+o*i,m=o*t*s-r*i,h=t*r*s-o*i,P=r*r*s+n,L=o*r*s+t*i,z=t*o*s+r*i,F=r*o*s-t*i,B=o*o*s+n,x[0]=c*p+T*u+S*m,x[1]=f*p+l*u+E*m,x[2]=g*p+_*u+y*m,x[3]=v*p+w*u+b*m,x[4]=c*h+T*P+S*L,x[5]=f*h+l*P+E*L,x[6]=g*h+_*P+y*L,x[7]=v*h+w*P+b*L,x[8]=c*z+T*F+S*B,x[9]=f*z+l*F+E*B,x[10]=g*z+_*F+y*B,x[11]=v*z+w*F+b*B,A!==x&&(x[12]=A[12],x[13]=A[13],x[14]=A[14],x[15]=A[15]),x)}}}),T7=Ze({"node_modules/gl-mat4/rotateX.js"(Z,q){q.exports=d;function d(x,A,M){var e=Math.sin(M),t=Math.cos(M),r=A[4],o=A[5],a=A[6],i=A[7],n=A[8],s=A[9],c=A[10],f=A[11];return A!==x&&(x[0]=A[0],x[1]=A[1],x[2]=A[2],x[3]=A[3],x[12]=A[12],x[13]=A[13],x[14]=A[14],x[15]=A[15]),x[4]=r*t+n*e,x[5]=o*t+s*e,x[6]=a*t+c*e,x[7]=i*t+f*e,x[8]=n*t-r*e,x[9]=s*t-o*e,x[10]=c*t-a*e,x[11]=f*t-i*e,x}}}),A7=Ze({"node_modules/gl-mat4/rotateY.js"(Z,q){q.exports=d;function d(x,A,M){var e=Math.sin(M),t=Math.cos(M),r=A[0],o=A[1],a=A[2],i=A[3],n=A[8],s=A[9],c=A[10],f=A[11];return A!==x&&(x[4]=A[4],x[5]=A[5],x[6]=A[6],x[7]=A[7],x[12]=A[12],x[13]=A[13],x[14]=A[14],x[15]=A[15]),x[0]=r*t-n*e,x[1]=o*t-s*e,x[2]=a*t-c*e,x[3]=i*t-f*e,x[8]=r*e+n*t,x[9]=o*e+s*t,x[10]=a*e+c*t,x[11]=i*e+f*t,x}}}),S7=Ze({"node_modules/gl-mat4/rotateZ.js"(Z,q){q.exports=d;function d(x,A,M){var e=Math.sin(M),t=Math.cos(M),r=A[0],o=A[1],a=A[2],i=A[3],n=A[4],s=A[5],c=A[6],f=A[7];return A!==x&&(x[8]=A[8],x[9]=A[9],x[10]=A[10],x[11]=A[11],x[12]=A[12],x[13]=A[13],x[14]=A[14],x[15]=A[15]),x[0]=r*t+n*e,x[1]=o*t+s*e,x[2]=a*t+c*e,x[3]=i*t+f*e,x[4]=n*t-r*e,x[5]=s*t-o*e,x[6]=c*t-a*e,x[7]=f*t-i*e,x}}}),M7=Ze({"node_modules/gl-mat4/fromRotation.js"(Z,q){q.exports=d;function d(x,A,M){var e,t,r,o=M[0],a=M[1],i=M[2],n=Math.sqrt(o*o+a*a+i*i);return Math.abs(n)<1e-6?null:(n=1/n,o*=n,a*=n,i*=n,e=Math.sin(A),t=Math.cos(A),r=1-t,x[0]=o*o*r+t,x[1]=a*o*r+i*e,x[2]=i*o*r-a*e,x[3]=0,x[4]=o*a*r-i*e,x[5]=a*a*r+t,x[6]=i*a*r+o*e,x[7]=0,x[8]=o*i*r+a*e,x[9]=a*i*r-o*e,x[10]=i*i*r+t,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x)}}}),E7=Ze({"node_modules/gl-mat4/fromRotationTranslation.js"(Z,q){q.exports=d;function d(x,A,M){var e=A[0],t=A[1],r=A[2],o=A[3],a=e+e,i=t+t,n=r+r,s=e*a,c=e*i,f=e*n,g=t*i,v=t*n,T=r*n,l=o*a,_=o*i,w=o*n;return x[0]=1-(g+T),x[1]=c+w,x[2]=f-_,x[3]=0,x[4]=c-w,x[5]=1-(s+T),x[6]=v+l,x[7]=0,x[8]=f+_,x[9]=v-l,x[10]=1-(s+g),x[11]=0,x[12]=M[0],x[13]=M[1],x[14]=M[2],x[15]=1,x}}}),C7=Ze({"node_modules/gl-mat4/fromScaling.js"(Z,q){q.exports=d;function d(x,A){return x[0]=A[0],x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=A[1],x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=A[2],x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),k7=Ze({"node_modules/gl-mat4/fromTranslation.js"(Z,q){q.exports=d;function d(x,A){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=A[0],x[13]=A[1],x[14]=A[2],x[15]=1,x}}}),L7=Ze({"node_modules/gl-mat4/fromXRotation.js"(Z,q){q.exports=d;function d(x,A){var M=Math.sin(A),e=Math.cos(A);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=e,x[6]=M,x[7]=0,x[8]=0,x[9]=-M,x[10]=e,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),P7=Ze({"node_modules/gl-mat4/fromYRotation.js"(Z,q){q.exports=d;function d(x,A){var M=Math.sin(A),e=Math.cos(A);return x[0]=e,x[1]=0,x[2]=-M,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=M,x[9]=0,x[10]=e,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),I7=Ze({"node_modules/gl-mat4/fromZRotation.js"(Z,q){q.exports=d;function d(x,A){var M=Math.sin(A),e=Math.cos(A);return x[0]=e,x[1]=M,x[2]=0,x[3]=0,x[4]=-M,x[5]=e,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),QA=Ze({"node_modules/gl-mat4/fromQuat.js"(Z,q){q.exports=d;function d(x,A){var M=A[0],e=A[1],t=A[2],r=A[3],o=M+M,a=e+e,i=t+t,n=M*o,s=e*o,c=e*a,f=t*o,g=t*a,v=t*i,T=r*o,l=r*a,_=r*i;return x[0]=1-c-v,x[1]=s+_,x[2]=f-l,x[3]=0,x[4]=s-_,x[5]=1-n-v,x[6]=g+T,x[7]=0,x[8]=f+l,x[9]=g-T,x[10]=1-n-c,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}}}),R7=Ze({"node_modules/gl-mat4/frustum.js"(Z,q){q.exports=d;function d(x,A,M,e,t,r,o){var a=1/(M-A),i=1/(t-e),n=1/(r-o);return x[0]=r*2*a,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=r*2*i,x[6]=0,x[7]=0,x[8]=(M+A)*a,x[9]=(t+e)*i,x[10]=(o+r)*n,x[11]=-1,x[12]=0,x[13]=0,x[14]=o*r*2*n,x[15]=0,x}}}),D7=Ze({"node_modules/gl-mat4/perspective.js"(Z,q){q.exports=d;function d(x,A,M,e,t){var r=1/Math.tan(A/2),o=1/(e-t);return x[0]=r/M,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=r,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=(t+e)*o,x[11]=-1,x[12]=0,x[13]=0,x[14]=2*t*e*o,x[15]=0,x}}}),z7=Ze({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Z,q){q.exports=d;function d(x,A,M,e){var t=Math.tan(A.upDegrees*Math.PI/180),r=Math.tan(A.downDegrees*Math.PI/180),o=Math.tan(A.leftDegrees*Math.PI/180),a=Math.tan(A.rightDegrees*Math.PI/180),i=2/(o+a),n=2/(t+r);return x[0]=i,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=n,x[6]=0,x[7]=0,x[8]=-((o-a)*i*.5),x[9]=(t-r)*n*.5,x[10]=e/(M-e),x[11]=-1,x[12]=0,x[13]=0,x[14]=e*M/(M-e),x[15]=0,x}}}),F7=Ze({"node_modules/gl-mat4/ortho.js"(Z,q){q.exports=d;function d(x,A,M,e,t,r,o){var a=1/(A-M),i=1/(e-t),n=1/(r-o);return x[0]=-2*a,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*i,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=2*n,x[11]=0,x[12]=(A+M)*a,x[13]=(t+e)*i,x[14]=(o+r)*n,x[15]=1,x}}}),O7=Ze({"node_modules/gl-mat4/lookAt.js"(Z,q){var d=$A();q.exports=x;function x(A,M,e,t){var r,o,a,i,n,s,c,f,g,v,T=M[0],l=M[1],_=M[2],w=t[0],S=t[1],E=t[2],y=e[0],b=e[1],p=e[2];return Math.abs(T-y)<1e-6&&Math.abs(l-b)<1e-6&&Math.abs(_-p)<1e-6?d(A):(c=T-y,f=l-b,g=_-p,v=1/Math.sqrt(c*c+f*f+g*g),c*=v,f*=v,g*=v,r=S*g-E*f,o=E*c-w*g,a=w*f-S*c,v=Math.sqrt(r*r+o*o+a*a),v?(v=1/v,r*=v,o*=v,a*=v):(r=0,o=0,a=0),i=f*a-g*o,n=g*r-c*a,s=c*o-f*r,v=Math.sqrt(i*i+n*n+s*s),v?(v=1/v,i*=v,n*=v,s*=v):(i=0,n=0,s=0),A[0]=r,A[1]=i,A[2]=c,A[3]=0,A[4]=o,A[5]=n,A[6]=f,A[7]=0,A[8]=a,A[9]=s,A[10]=g,A[11]=0,A[12]=-(r*T+o*l+a*_),A[13]=-(i*T+n*l+s*_),A[14]=-(c*T+f*l+g*_),A[15]=1,A)}}}),B7=Ze({"node_modules/gl-mat4/str.js"(Z,q){q.exports=d;function d(x){return"mat4("+x[0]+", "+x[1]+", "+x[2]+", "+x[3]+", "+x[4]+", "+x[5]+", "+x[6]+", "+x[7]+", "+x[8]+", "+x[9]+", "+x[10]+", "+x[11]+", "+x[12]+", "+x[13]+", "+x[14]+", "+x[15]+")"}}}),e5=Ze({"node_modules/gl-mat4/index.js"(Z,q){q.exports={create:h7(),clone:p7(),copy:d7(),identity:$A(),transpose:v7(),invert:m7(),adjoint:g7(),determinant:y7(),multiply:_7(),translate:x7(),scale:b7(),rotate:w7(),rotateX:T7(),rotateY:A7(),rotateZ:S7(),fromRotation:M7(),fromRotationTranslation:E7(),fromScaling:C7(),fromTranslation:k7(),fromXRotation:L7(),fromYRotation:P7(),fromZRotation:I7(),fromQuat:QA(),frustum:R7(),perspective:D7(),perspectiveFromFieldOfView:z7(),ortho:F7(),lookAt:O7(),str:B7()}}}),p2=Ze({"src/lib/matrix.js"(Z){"use strict";var q=e5();Z.init2dArray=function(d,x){for(var A=new Array(d),M=0;M<d;M++)A[M]=new Array(x);return A},Z.transposeRagged=function(d){var x=0,A=d.length,M,e;for(M=0;M<A;M++)x=Math.max(x,d[M].length);var t=new Array(x);for(M=0;M<x;M++)for(t[M]=new Array(A),e=0;e<A;e++)t[M][e]=d[e][M];return t},Z.dot=function(d,x){if(!(d.length&&x.length)||d.length!==x.length)return null;var A=d.length,M,e;if(d[0].length)for(M=new Array(A),e=0;e<A;e++)M[e]=Z.dot(d[e],x);else if(x[0].length){var t=Z.transposeRagged(x);for(M=new Array(t.length),e=0;e<t.length;e++)M[e]=Z.dot(d,t[e])}else for(M=0,e=0;e<A;e++)M+=d[e]*x[e];return M},Z.translationMatrix=function(d,x){return[[1,0,d],[0,1,x],[0,0,1]]},Z.rotationMatrix=function(d){var x=d*Math.PI/180;return[[Math.cos(x),-Math.sin(x),0],[Math.sin(x),Math.cos(x),0],[0,0,1]]},Z.rotationXYMatrix=function(d,x,A){return Z.dot(Z.dot(Z.translationMatrix(x,A),Z.rotationMatrix(d)),Z.translationMatrix(-x,-A))},Z.apply3DTransform=function(d){return function(){var x=arguments,A=arguments.length===1?x[0]:[x[0],x[1],x[2]||0];return Z.dot(d,[A[0],A[1],A[2],1]).slice(0,3)}},Z.apply2DTransform=function(d){return function(){var x=arguments;x.length===3&&(x=x[0]);var A=arguments.length===1?x[0]:[x[0],x[1]];return Z.dot(d,[A[0],A[1],1]).slice(0,2)}},Z.apply2DTransform2=function(d){var x=Z.apply2DTransform(d);return function(A){return x(A.slice(0,2)).concat(x(A.slice(2,4)))}},Z.convertCssMatrix=function(d){if(d){var x=d.length;if(x===16)return d;if(x===6)return[d[0],d[1],0,0,d[2],d[3],0,0,0,0,1,0,d[4],d[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},Z.inverseTransformMatrix=function(d){var x=[];return q.invert(x,d),[[x[0],x[1],x[2],x[3]],[x[4],x[5],x[6],x[7]],[x[8],x[9],x[10],x[11]],[x[12],x[13],x[14],x[15]]]}}}),T_=Ze({"src/lib/dom.js"(Z,q){"use strict";var d=On(),x=Ym(),A=p2(),M=e5();function e(T){var l;if(typeof T=="string"){if(l=document.getElementById(T),l===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return l}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function t(T){var l=d.select(T);return l.node()instanceof HTMLElement&&l.size()&&l.classed("js-plotly-plot")}function r(T){var l=T&&T.parentNode;l&&l.removeChild(T)}function o(T,l){a("global",T,l)}function a(T,l,_){var w="plotly.js-style-"+T,S=document.getElementById(w);if(!(S&&S.matches(".no-inline-styles"))){S||(S=document.createElement("style"),S.setAttribute("id",w),S.appendChild(document.createTextNode("")),document.head.appendChild(S));var E=S.sheet;E?E.insertRule?E.insertRule(l+"{"+_+"}",0):E.addRule?E.addRule(l,_,0):x.warn("addStyleRule failed"):x.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function i(T){var l="plotly.js-style-"+T,_=document.getElementById(l);_&&r(_)}function n(T,l,_,w,S,E){var y=w.split(":"),b=S.split(":"),p="data-btn-style-event-added";E||(E=document),E.querySelectorAll(T).forEach(function(u){u.getAttribute(p)||(u.addEventListener("mouseenter",function(){var m=this.querySelector(_);m&&(m.style[y[0]]=y[1])}),u.addEventListener("mouseleave",function(){var m=this.querySelector(_);m&&(l&&this.matches(l)?m.style[y[0]]=y[1]:m.style[b[0]]=b[1])}),u.setAttribute(p,!0))})}function s(T){var l=f(T),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.forEach(function(w){var S=c(w);if(S){var E=A.convertCssMatrix(S);_=M.multiply(_,_,E)}}),_}function c(T){var l=window.getComputedStyle(T,null),_=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("-moz-transform")||l.getPropertyValue("-ms-transform")||l.getPropertyValue("-o-transform")||l.getPropertyValue("transform");return _==="none"?null:_.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(w){return+w})}function f(T){for(var l=[];g(T);)l.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return l}function g(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function v(T,l){return T&&l&&T.top===l.top&&T.left===l.left&&T.right===l.right&&T.bottom===l.bottom}q.exports={getGraphDiv:e,isPlotDiv:t,removeElement:r,addStyleRule:o,addRelatedStyleRule:a,deleteRelatedStyleRule:i,setStyleOnHover:n,getFullTransformMatrix:s,getElementTransformMatrix:c,getElementAndAncestors:f,equalDomRects:v}}}),A_=Ze({"src/plots/animation_attributes.js"(Z,q){"use strict";q.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"}}}}}),pc=Ze({"src/plot_api/edit_types.js"(Z,q){"use strict";var d=rs().extendFlat,x=Xv(),A={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},M={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},e=A.flags.slice().concat(["fullReplot"]),t=M.flags.slice().concat("layoutReplot");q.exports={traces:A,layout:M,traceFlags:function(){return r(e)},layoutFlags:function(){return r(t)},update:function(i,n){var s=n.editType;if(s&&s!=="none")for(var c=s.split("+"),f=0;f<c.length;f++)i[c[f]]=!0},overrideAll:o};function r(i){for(var n={},s=0;s<i.length;s++)n[i[s]]=!1;return n}function o(i,n,s){var c=d({},i);for(var f in c){var g=c[f];x(g)&&(c[f]=a(g,n,s,f))}return s==="from-root"&&(c.editType=n),c}function a(i,n,s,c){if(i.valType){var f=d({},i);if(f.editType=n,Array.isArray(i.items)){f.items=new Array(i.items.length);for(var g=0;g<i.items.length;g++)f.items[g]=a(i.items[g],n,"from-root")}return f}else return o(i,n,c.charAt(0)==="_"?"nested":"from-root")}}}),Gh=Ze({"src/components/drawing/attributes.js"(Z){"use strict";Z.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Z.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"}}}),t5=Ze({"src/constants/docs.js"(Z,q){"use strict";q.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"}}}),Cs=Ze({"src/plots/template_attributes.js"(Z){"use strict";var q=t5(),d=q.FORMAT_LINK,x=q.DATE_FORMAT_LINK;function A(e){var t=e&&e.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(t?" 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}".`,d,"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}".`,x,"for details on the date formatting syntax."].join(" ")}Z.templateFormatStringDescription=A;function M(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var o=[],a=0;a<r.length;a++)o[a]="`"+r[a]+"`";t=t+"Finally, the template string has access to ",r.length===1?t=t+"variable "+o[0]:t=t+"variables "+o.slice(0,-1).join(", ")+" and "+o.slice(-1)+"."}return t}Z.hovertemplateAttrs=function(e,t){e=e||{},t=t||{};var r=M(t),o={valType:"string",dflt:"",editType:e.editType||"none"};return e.arrayOk!==!1&&(o.arrayOk=!0),o},Z.texttemplateAttrs=function(e,t){e=e||{},t=t||{};var r=M(t),o={valType:"string",dflt:"",editType:e.editType||"calc"};return e.arrayOk!==!1&&(o.arrayOk=!0),o},Z.shapeTexttemplateAttrs=function(e,t){e=e||{},t=t||{};var r=e.newshape?"new ":"",o=M(t),a={valType:"string",dflt:"",editType:e.editType||"arraydraw"};return a}}}),d2=Ze({"src/components/shapes/label_texttemplate.js"(Z,q){"use strict";function d(_,w){return w?w.d2l(_):_}function x(_,w){return w?w.l2d(_):_}function A(_){return _.x0}function M(_){return _.x1}function e(_){return _.y0}function t(_){return _.y1}function r(_){return _.x0shift||0}function o(_){return _.x1shift||0}function a(_){return _.y0shift||0}function i(_){return _.y1shift||0}function n(_,w){return d(_.x1,w)+o(_)-d(_.x0,w)-r(_)}function s(_,w,S){return d(_.y1,S)+i(_)-d(_.y0,S)-a(_)}function c(_,w){return Math.abs(n(_,w))}function f(_,w,S){return Math.abs(s(_,w,S))}function g(_,w,S){return _.type!=="line"?void 0:Math.sqrt(Math.pow(n(_,w),2)+Math.pow(s(_,w,S),2))}function v(_,w){return x((d(_.x1,w)+o(_)+d(_.x0,w)+r(_))/2,w)}function T(_,w,S){return x((d(_.y1,S)+i(_)+d(_.y0,S)+a(_))/2,S)}function l(_,w,S){return _.type!=="line"?void 0:s(_,w,S)/n(_,w)}q.exports={x0:A,x1:M,y0:e,y1:t,slope:l,dx:n,dy:s,width:c,height:f,length:g,xcenter:v,ycenter:T}}}),N7=Ze({"src/components/shapes/draw_newshape/attributes.js"(Z,q){"use strict";var d=pc().overrideAll,x=eu(),A=tc(),M=Gh().dash,e=rs().extendFlat,t=Cs().shapeTexttemplateAttrs,r=d2();q.exports=d({newshape:{visible:e({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},x.legend,{}),legendgroup:e({},x.legendgroup,{}),legendgrouptitle:{text:e({},x.legendgrouptitle.text,{}),font:A({})},legendrank:e({},x.legendrank,{}),legendwidth:e({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},M,{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:e({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(r)}),font:A({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),U7=Ze({"src/components/selections/draw_newselection/attributes.js"(Z,q){"use strict";var d=Gh().dash,x=rs().extendFlat;q.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:x({},d,{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"}}}}),v2=Ze({"src/plots/pad_attributes.js"(Z,q){"use strict";q.exports=function(d){var x=d.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),$y=Ze({"src/plots/layout_attributes.js"(Z,q){"use strict";var d=tc(),x=A_(),A=oh(),M=N7(),e=U7(),t=v2(),r=rs().extendFlat,o=d({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=A.defaultLine,q.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:d({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:d({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:r(t({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:A.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:A.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:A.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:M.newshape,activeshape:M.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},x.transition,{editType:"none"})}}}),j7=Ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var Z=document.createElement("style");Z.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",Z.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(Z)}})()}}),oo=Ze({"src/registry.js"(Z){"use strict";var q=Ym(),d=h2(),x=JA(),A=Xv(),M=T_().addStyleRule,e=rs(),t=eu(),r=$y(),o=e.extendFlat,a=e.extendDeepAll;Z.modules={},Z.allCategories={},Z.allTypes=[],Z.subplotsRegistry={},Z.componentsRegistry={},Z.layoutArrayContainers=[],Z.layoutArrayRegexes=[],Z.traceLayoutAttributes={},Z.localeRegistry={},Z.apiMethodRegistry={},Z.collectableSubplotTypes=null,Z.register=function(w){if(Z.collectableSubplotTypes=null,w)w&&!Array.isArray(w)&&(w=[w]);else throw new Error("No argument passed to Plotly.register.");for(var S=0;S<w.length;S++){var E=w[S];if(!E)throw new Error("Invalid module was attempted to be registered!");switch(E.moduleType){case"trace":i(E);break;case"transform":c(E);break;case"component":s(E);break;case"locale":f(E);break;case"apiMethod":var y=E.name;Z.apiMethodRegistry[y]=E.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},Z.getModule=function(_){var w=Z.modules[l(_)];return w?w._module:!1},Z.traceIs=function(_,w){if(_=l(_),_==="various")return!1;var S=Z.modules[_];return S||(_&&q.log("Unrecognized trace type "+_+"."),S=Z.modules[t.type.dflt]),!!S.categories[w]},Z.getComponentMethod=function(_,w){var S=Z.componentsRegistry[_];return S&&S[w]||d},Z.call=function(){var _=arguments[0],w=[].slice.call(arguments,1);return Z.apiMethodRegistry[_].apply(null,w)};function i(_){var w=_.name,S=_.categories,E=_.meta;if(Z.modules[w]){q.log("Type "+w+" already registered");return}Z.subplotsRegistry[_.basePlotModule.name]||n(_.basePlotModule);for(var y={},b=0;b<S.length;b++)y[S[b]]=!0,Z.allCategories[S[b]]=!0;Z.modules[w]={_module:_,categories:y},E&&Object.keys(E).length&&(Z.modules[w].meta=E),Z.allTypes.push(w);for(var p in Z.componentsRegistry)v(p,w);_.layoutAttributes&&o(Z.traceLayoutAttributes,_.layoutAttributes);var u=_.basePlotModule,m=u.name;if(m==="mapbox"){var h=u.constants.styleRules;for(var P in h)M(".js-plotly-plot .plotly .mapboxgl-"+P,h[P])}m==="map"&&j7(),(m==="geo"||m==="mapbox"||m==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function n(_){var w=_.name;if(Z.subplotsRegistry[w]){q.log("Plot type "+w+" already registered.");return}g(_),Z.subplotsRegistry[w]=_;for(var S in Z.componentsRegistry)T(S,_.name)}function s(_){if(typeof _.name!="string")throw new Error("Component module *name* must be a string.");var w=_.name;Z.componentsRegistry[w]=_,_.layoutAttributes&&(_.layoutAttributes._isLinkedToArray&&x(Z.layoutArrayContainers,w),g(_));for(var S in Z.modules)v(w,S);for(var E in Z.subplotsRegistry)T(w,E);_.schema&&_.schema.layout&&a(r,_.schema.layout)}function c(_){if(typeof _.name!="string")throw new Error("Transform module *name* must be a string.");var w="Transform module "+_.name,S=typeof _.transform=="function",E=typeof _.calcTransform=="function";if(!S&&!E)throw new Error(w+" is missing a *transform* or *calcTransform* method.");S&&E&&q.log([w+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),A(_.attributes)||q.log(w+" registered without an *attributes* object."),typeof _.supplyDefaults!="function"&&q.log(w+" registered without a *supplyDefaults* method.")}function f(_){var w=_.name,S=w.split("-")[0],E=_.dictionary,y=_.format,b=E&&Object.keys(E).length,p=y&&Object.keys(y).length,u=Z.localeRegistry,m=u[w];if(m||(u[w]=m={}),S!==w){var h=u[S];h||(u[S]=h={}),b&&h.dictionary===m.dictionary&&(h.dictionary=E),p&&h.format===m.format&&(h.format=y)}b&&(m.dictionary=E),p&&(m.format=y)}function g(_){if(_.layoutAttributes){var w=_.layoutAttributes._arrayAttrRegexps;if(w)for(var S=0;S<w.length;S++)x(Z.layoutArrayRegexes,w[S])}}function v(_,w){var S=Z.componentsRegistry[_].schema;if(!(!S||!S.traces)){var E=S.traces[w];E&&a(Z.modules[w]._module.attributes,E)}}function T(_,w){var S=Z.componentsRegistry[_].schema;if(!(!S||!S.subplots)){var E=Z.subplotsRegistry[w],y=E.layoutAttributes,b=E.attr==="subplot"?E.name:E.attr;Array.isArray(b)&&(b=b[0]);var p=S.subplots[b];y&&p&&a(y,p)}}function l(_){return typeof _=="object"&&(_=_.type),_}}}),q7=Ze({"src/lib/dates.js"(Z){"use strict";var q=jp().timeFormat,d=ns(),x=Ym(),A=Yy().mod,M=qs(),e=M.BADNUM,t=M.ONEDAY,r=M.ONEHOUR,o=M.ONEMIN,a=M.ONESEC,i=M.EPOCHJD,n=oo(),s=jp().utcFormat,c=/^\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,f=/^\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,g=new Date().getFullYear()-70;function v(F){return F&&n.componentsRegistry.calendars&&typeof F=="string"&&F!=="gregorian"}Z.dateTick0=function(F,B){var O=T(F,!!B);if(B<2)return O;var I=Z.dateTime2ms(O,F);return I+=t*(B-1),Z.ms2DateTime(I,0,F)};function T(F,B){return v(F)?B?n.getComponentMethod("calendars","CANONICAL_SUNDAY")[F]:n.getComponentMethod("calendars","CANONICAL_TICK")[F]:B?"2000-01-02":"2000-01-01"}Z.dfltRange=function(F){return v(F)?n.getComponentMethod("calendars","DFLTRANGE")[F]:["2000-01-01","2001-01-01"]},Z.isJSDate=function(F){return typeof F=="object"&&F!==null&&typeof F.getTime=="function"};var l,_;Z.dateTime2ms=function(F,B){if(Z.isJSDate(F)){var O=F.getTimezoneOffset()*o,I=(F.getUTCMinutes()-F.getMinutes())*o+(F.getUTCSeconds()-F.getSeconds())*a+(F.getUTCMilliseconds()-F.getMilliseconds());if(I){var N=3*o;O=O-N/2+A(I-O+N/2,N)}return F=Number(F)-O,F>=l&&F<=_?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var U=v(B),W=F.charAt(0);U&&(W==="G"||W==="g")&&(F=F.substr(1),B="");var Q=U&&B.substr(0,7)==="chinese",ue=F.match(Q?f:c);if(!ue)return e;var le=ue[1],he=ue[3]||"1",G=Number(ue[5]||1),$=Number(ue[7]||0),J=Number(ue[9]||0),X=Number(ue[11]||0);if(U){if(le.length===2)return e;le=Number(le);var oe;try{var ie=n.getComponentMethod("calendars","getCal")(B);if(Q){var j=he.charAt(he.length-1)==="i";he=parseInt(he,10),oe=ie.newDate(le,ie.toMonthIndex(le,he,j),G)}else oe=ie.newDate(le,Number(he),G)}catch{return e}return oe?(oe.toJD()-i)*t+$*r+J*o+X*a:e}le.length===2?le=(Number(le)+2e3-g)%100+g:le=Number(le),he-=1;var ee=new Date(Date.UTC(2e3,he,G,$,J));return ee.setUTCFullYear(le),ee.getUTCMonth()!==he||ee.getUTCDate()!==G?e:ee.getTime()+X*a},l=Z.MIN_MS=Z.dateTime2ms("-9999"),_=Z.MAX_MS=Z.dateTime2ms("9999-12-31 23:59:59.9999"),Z.isDateTime=function(F,B){return Z.dateTime2ms(F,B)!==e};function w(F,B){return String(F+Math.pow(10,B)).substr(1)}var S=90*t,E=3*r,y=5*o;Z.ms2DateTime=function(F,B,O){if(typeof F!="number"||!(F>=l&&F<=_))return e;B||(B=0);var I=Math.floor(A(F+.05,1)*10),N=Math.round(F-I/10),U,W,Q,ue,le,he;if(v(O)){var G=Math.floor(N/t)+i,$=Math.floor(A(F,t));try{U=n.getComponentMethod("calendars","getCal")(O).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(N))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.substr(1);else for(;U.length<10;)U="0"+U;W=B<S?Math.floor($/r):0,Q=B<S?Math.floor($%r/o):0,ue=B<E?Math.floor($%o/a):0,le=B<y?$%a*10+I:0}else he=new Date(N),U=s("%Y-%m-%d")(he),W=B<S?he.getUTCHours():0,Q=B<S?he.getUTCMinutes():0,ue=B<E?he.getUTCSeconds():0,le=B<y?he.getUTCMilliseconds()*10+I:0;return b(U,W,Q,ue,le)},Z.ms2DateTimeLocal=function(F){if(!(F>=l+t&&F<=_-t))return e;var B=Math.floor(A(F+.05,1)*10),O=new Date(Math.round(F-B/10)),I=q("%Y-%m-%d")(O),N=O.getHours(),U=O.getMinutes(),W=O.getSeconds(),Q=O.getUTCMilliseconds()*10+B;return b(I,N,U,W,Q)};function b(F,B,O,I,N){if((B||O||I||N)&&(F+=" "+w(B,2)+":"+w(O,2),(I||N)&&(F+=":"+w(I,2),N))){for(var U=4;N%10===0;)U-=1,N/=10;F+="."+w(N,U)}return F}Z.cleanDate=function(F,B,O){if(F===e)return B;if(Z.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(v(O))return x.error("JS Dates and milliseconds are incompatible with world calendars",F),B;if(F=Z.ms2DateTimeLocal(+F),!F&&B!==void 0)return B}else if(!Z.isDateTime(F,O))return x.error("unrecognized date",F),B;return F};var p=/%\d?f/g,u=/%h/g,m={1:"1",2:"1",3:"2",4:"2"};function h(F,B,O,I){F=F.replace(p,function(U){var W=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed(W).substr(2).replace(/0+$/,"")||"0";return Q});var N=new Date(Math.floor(B+.05));if(F=F.replace(u,function(){return m[O("%q")(N)]}),v(I))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,B,I)}catch{return"Invalid"}return O(F)(N)}var P=[59,59.9,59.99,59.999,59.9999];function L(F,B){var O=A(F+.05,t),I=w(Math.floor(O/r),2)+":"+w(A(Math.floor(O/o),60),2);if(B!=="M"){d(B)||(B=0);var N=Math.min(A(F/a,60),P[B]),U=(100+N).toFixed(B).substr(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),I+=":"+U}return I}Z.formatDate=function(F,B,O,I,N,U){if(N=v(N)&&N,!B)if(O==="y")B=U.year;else if(O==="m")B=U.month;else if(O==="d")B=U.dayMonth+`
`+U.year;else return L(F,O)+`
`+h(U.dayMonthYear,F,I,N);return h(B,F,I,N)};var z=3*t;Z.incrementMonth=function(F,B,O){O=v(O)&&O;var I=A(F,t);if(F=Math.round(F-I),O)try{var N=Math.round(F/t)+i,U=n.getComponentMethod("calendars","getCal")(O),W=U.fromJD(N);return B%12?U.add(W,B,"m"):U.add(W,B/12,"y"),(W.toJD()-i)*t+I}catch{x.error("invalid ms "+F+" in calendar "+O)}var Q=new Date(F+z);return Q.setUTCMonth(Q.getUTCMonth()+B)+I-z},Z.findExactDates=function(F,B){for(var O=0,I=0,N=0,U=0,W,Q,ue=v(B)&&n.getComponentMethod("calendars","getCal")(B),le=0;le<F.length;le++){if(Q=F[le],!d(Q)){U++;continue}if(!(Q%t))if(ue)try{W=ue.fromJD(Q/t+i),W.day()===1?W.month()===1?O++:I++:N++}catch{}else W=new Date(Q),W.getUTCDate()===1?W.getUTCMonth()===0?O++:I++:N++}I+=O,N+=I;var he=F.length-U;return{exactYears:O/he,exactMonths:I/he,exactDays:N/he}}}}),S_=Ze({"src/lib/identity.js"(Z,q){"use strict";q.exports=function(x){return x}}}),m2=Ze({"src/lib/search.js"(Z){"use strict";var q=ns(),d=Ym(),x=S_(),A=qs().BADNUM,M=1e-9;Z.findBin=function(a,i,n){if(q(i.start))return n?Math.ceil((a-i.start)/i.size-M)-1:Math.floor((a-i.start)/i.size+M);var s=0,c=i.length,f=0,g=c>1?(i[c-1]-i[0])/(c-1):1,v,T;for(g>=0?T=n?e:t:T=n?o:r,a+=g*M*(n?-1:1)*(g>=0?1:-1);s<c&&f++<100;)v=Math.floor((s+c)/2),T(i[v],a)?s=v+1:c=v;return f>90&&d.log("Long binary search..."),s-1};function e(a,i){return a<i}function t(a,i){return a<=i}function r(a,i){return a>i}function o(a,i){return a>=i}Z.sorterAsc=function(a,i){return a-i},Z.sorterDes=function(a,i){return i-a},Z.distinctVals=function(a){var i=a.slice();i.sort(Z.sorterAsc);var n;for(n=i.length-1;n>-1&&i[n]===A;n--);for(var s=i[n]-i[0]||1,c=s/(n||1)/1e4,f=[],g,v=0;v<=n;v++){var T=i[v],l=T-g;g===void 0?(f.push(T),g=T):l>c&&(s=Math.min(s,l),f.push(T),g=T)}return{vals:f,minDiff:s}},Z.roundUp=function(a,i,n){for(var s=0,c=i.length-1,f,g=0,v=n?0:1,T=n?1:0,l=n?Math.ceil:Math.floor;s<c&&g++<100;)f=l((s+c)/2),i[f]<=a?s=f+v:c=f-T;return i[s]},Z.sort=function(a,i){for(var n=0,s=0,c=1;c<a.length;c++){var f=i(a[c],a[c-1]);if(f<0?n=1:f>0&&(s=1),n&&s)return a.sort(i)}return s?a:a.reverse()},Z.findIndexOfMin=function(a,i){i=i||x;for(var n=1/0,s,c=0;c<a.length;c++){var f=i(a[c]);f<n&&(n=f,s=c)}return s}}}),Km=Ze({"src/lib/sort_object_keys.js"(Z,q){"use strict";q.exports=function(x){return Object.keys(x).sort()}}}),V7=Ze({"src/lib/stats.js"(Z){"use strict";var q=ns(),d=xp().isArrayOrTypedArray;Z.aggNums=function(x,A,M,e){var t,r;if((!e||e>M.length)&&(e=M.length),q(A)||(A=!1),d(M[0])){for(r=new Array(e),t=0;t<e;t++)r[t]=Z.aggNums(x,A,M[t]);M=r}for(t=0;t<e;t++)q(A)?q(M[t])&&(A=x(+A,+M[t])):A=M[t];return A},Z.len=function(x){return Z.aggNums(function(A){return A+1},0,x)},Z.mean=function(x,A){return A||(A=Z.len(x)),Z.aggNums(function(M,e){return M+e},0,x)/A},Z.geometricMean=function(x,A){return A||(A=Z.len(x)),Math.pow(Z.aggNums(function(M,e){return M*e},1,x),1/A)},Z.midRange=function(x){if(!(x===void 0||x.length===0))return(Z.aggNums(Math.max,null,x)+Z.aggNums(Math.min,null,x))/2},Z.variance=function(x,A,M){return A||(A=Z.len(x)),q(M)||(M=Z.mean(x,A)),Z.aggNums(function(e,t){return e+Math.pow(t-M,2)},0,x)/A},Z.stdev=function(x,A,M){return Math.sqrt(Z.variance(x,A,M))},Z.median=function(x){var A=x.slice().sort();return Z.interp(A,.5)},Z.interp=function(x,A){if(!q(A))throw"n should be a finite number";if(A=A*x.length-.5,A<0)return x[0];if(A>x.length-1)return x[x.length-1];var M=A%1;return M*x[Math.ceil(A)]+(1-M)*x[Math.floor(A)]}}}),G7=Ze({"src/lib/angles.js"(Z,q){"use strict";var d=Yy(),x=d.mod,A=d.modHalf,M=Math.PI,e=2*M;function t(T){return T/180*M}function r(T){return T/M*180}function o(T){return Math.abs(T[1]-T[0])>e-1e-14}function a(T,l){return A(l-T,e)}function i(T,l){return Math.abs(a(T,l))}function n(T,l){if(o(l))return!0;var _,w;l[0]<l[1]?(_=l[0],w=l[1]):(_=l[1],w=l[0]),_=x(_,e),w=x(w,e),_>w&&(w+=e);var S=x(T,e),E=S+e;return S>=_&&S<=w||E>=_&&E<=w}function s(T,l,_,w){if(!n(l,w))return!1;var S,E;return _[0]<_[1]?(S=_[0],E=_[1]):(S=_[1],E=_[0]),T>=S&&T<=E}function c(T,l,_,w,S,E,y){S=S||0,E=E||0;var b=o([_,w]),p,u,m,h,P;b?(p=0,u=M,m=e):_<w?(p=_,m=w):(p=w,m=_),T<l?(h=T,P=l):(h=l,P=T);function L(O,I){return[O*Math.cos(I)+S,E-O*Math.sin(I)]}var z=Math.abs(m-p)<=M?0:1;function F(O,I,N){return"A"+[O,O]+" "+[0,z,N]+" "+L(O,I)}var B;return b?h===null?B="M"+L(P,p)+F(P,u,0)+F(P,m,0)+"Z":B="M"+L(h,p)+F(h,u,0)+F(h,m,0)+"ZM"+L(P,p)+F(P,u,1)+F(P,m,1)+"Z":h===null?(B="M"+L(P,p)+F(P,m,0),y&&(B+="L0,0Z")):B="M"+L(h,p)+"L"+L(P,p)+F(P,m,0)+"L"+L(h,m)+F(h,p,1)+"Z",B}function f(T,l,_,w,S){return c(null,T,l,_,w,S,0)}function g(T,l,_,w,S){return c(null,T,l,_,w,S,1)}function v(T,l,_,w,S,E){return c(T,l,_,w,S,E,1)}q.exports={deg2rad:t,rad2deg:r,angleDelta:a,angleDist:i,isFullCircle:o,isAngleInsideSector:n,isPtInsideSector:s,pathArc:f,pathSector:g,pathAnnulus:v}}}),H7=Ze({"src/lib/anchor_utils.js"(Z){"use strict";Z.isLeftAnchor=function(d){return d.xanchor==="left"||d.xanchor==="auto"&&d.x<=1/3},Z.isCenterAnchor=function(d){return d.xanchor==="center"||d.xanchor==="auto"&&d.x>1/3&&d.x<2/3},Z.isRightAnchor=function(d){return d.xanchor==="right"||d.xanchor==="auto"&&d.x>=2/3},Z.isTopAnchor=function(d){return d.yanchor==="top"||d.yanchor==="auto"&&d.y>=2/3},Z.isMiddleAnchor=function(d){return d.yanchor==="middle"||d.yanchor==="auto"&&d.y>1/3&&d.y<2/3},Z.isBottomAnchor=function(d){return d.yanchor==="bottom"||d.yanchor==="auto"&&d.y<=1/3}}}),W7=Ze({"src/lib/geometry2d.js"(Z){"use strict";var q=Yy().mod;Z.segmentsIntersect=d;function d(t,r,o,a,i,n,s,c){var f=o-t,g=i-t,v=s-i,T=a-r,l=n-r,_=c-n,w=f*_-v*T;if(w===0)return null;var S=(g*_-v*l)/w,E=(g*T-f*l)/w;return E<0||E>1||S<0||S>1?null:{x:t+f*S,y:r+T*S}}Z.segmentDistance=function(r,o,a,i,n,s,c,f){if(d(r,o,a,i,n,s,c,f))return 0;var g=a-r,v=i-o,T=c-n,l=f-s,_=g*g+v*v,w=T*T+l*l,S=Math.min(x(g,v,_,n-r,s-o),x(g,v,_,c-r,f-o),x(T,l,w,r-n,o-s),x(T,l,w,a-n,i-s));return Math.sqrt(S)};function x(t,r,o,a,i){var n=a*t+i*r;if(n<0)return a*a+i*i;if(n>o){var s=a-t,c=i-r;return s*s+c*c}else{var f=a*r-i*t;return f*f/o}}var A,M,e;Z.getTextLocation=function(r,o,a,i){if((r!==M||i!==e)&&(A={},M=r,e=i),A[a])return A[a];var n=r.getPointAtLength(q(a-i/2,o)),s=r.getPointAtLength(q(a+i/2,o)),c=Math.atan((s.y-n.y)/(s.x-n.x)),f=r.getPointAtLength(q(a,o)),g=(f.x*4+n.x+s.x)/6,v=(f.y*4+n.y+s.y)/6,T={x:g,y:v,theta:c};return A[a]=T,T},Z.clearLocationCache=function(){M=null},Z.getVisibleSegment=function(r,o,a){var i=o.left,n=o.right,s=o.top,c=o.bottom,f=0,g=r.getTotalLength(),v=g,T,l;function _(S){var E=r.getPointAtLength(S);S===0?T=E:S===g&&(l=E);var y=E.x<i?i-E.x:E.x>n?E.x-n:0,b=E.y<s?s-E.y:E.y>c?E.y-c:0;return Math.sqrt(y*y+b*b)}for(var w=_(f);w;){if(f+=w+a,f>v)return;w=_(f)}for(w=_(v);w;){if(v-=w+a,f>v)return;w=_(v)}return{min:f,max:v,len:v-f,total:g,isClosed:f===0&&v===g&&Math.abs(T.x-l.x)<.1&&Math.abs(T.y-l.y)<.1}},Z.findPointOnPath=function(r,o,a,i){i=i||{};for(var n=i.pathLength||r.getTotalLength(),s=i.tolerance||.001,c=i.iterationLimit||30,f=r.getPointAtLength(0)[a]>r.getPointAtLength(n)[a]?-1:1,g=0,v=0,T=n,l,_,w;g<c;){if(l=(v+T)/2,_=r.getPointAtLength(l),w=_[a]-o,Math.abs(w)<s)return _;f*w>0?T=l:v=l,g++}return _}}}),g2=Ze({"src/lib/throttle.js"(Z){"use strict";var q={};Z.throttle=function(A,M,e){var t=q[A],r=Date.now();if(!t){for(var o in q)q[o].ts<r-6e4&&delete q[o];t=q[A]={ts:0,timer:null}}d(t);function a(){e(),t.ts=Date.now(),t.onDone&&(t.onDone(),t.onDone=null)}if(r>t.ts+M){a();return}t.timer=setTimeout(function(){a(),t.timer=null},M)},Z.done=function(x){var A=q[x];return!A||!A.timer?Promise.resolve():new Promise(function(M){var e=A.onDone;A.onDone=function(){e&&e(),M(),A.onDone=null}})},Z.clear=function(x){if(x)d(q[x]),delete q[x];else for(var A in q)Z.clear(A)};function d(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),X7=Ze({"src/lib/clear_responsive.js"(Z,q){"use strict";q.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),Z7=Ze({"node_modules/is-mobile/index.js"(Z,q){"use strict";q.exports=M,q.exports.isMobile=M,q.exports.default=M;var d=/(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,x=/CrOS/,A=/android|ipad|playbook|silk/i;function M(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=d.test(t)&&!x.test(t)||!!e.tablet&&A.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}}}),Y7=Ze({"src/lib/preserve_drawing_buffer.js"(Z,q){"use strict";var d=ns(),x=Z7();q.exports=function(e){var t;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:t=A(),typeof t!="string")return!0;var r=x({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a<o.length;a++){var i=o[a];if(i.indexOf("Safari")!==-1)for(var n=a-1;n>-1;n--){var s=o[n];if(s.substr(0,8)==="Version/"){var c=s.substr(8).split(".")[0];if(d(c)&&(c=+c),c>=13)return!0}}}return r};function A(){var M;return typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&typeof M.headers["user-agent"]=="string"&&(M=M.headers["user-agent"]),M}}}),K7=Ze({"src/lib/make_trace_groups.js"(Z,q){"use strict";var d=On();q.exports=function(A,M,e){var t=A.selectAll("g."+e.replace(/\s/g,".")).data(M,function(o){return o[0].trace.uid});t.exit().remove(),t.enter().append("g").attr("class",e),t.order();var r=A.classed("rangeplot")?"nodeRangePlot3":"node3";return t.each(function(o){o[0][r]=d.select(this)}),t}}}),J7=Ze({"src/lib/localize.js"(Z,q){"use strict";var d=oo();q.exports=function(A,M){for(var e=A._context.locale,t=0;t<2;t++){for(var r=A._context.locales,o=0;o<2;o++){var a=(r[e]||{}).dictionary;if(a){var i=a[M];if(i)return i}r=d.localeRegistry}var n=e.split("-")[0];if(n===e)break;e=n}return M}}}),r5=Ze({"src/lib/filter_unique.js"(Z,q){"use strict";q.exports=function(x){for(var A={},M=[],e=0,t=0;t<x.length;t++){var r=x[t];A[r]!==1&&(A[r]=1,M[e++]=r)}return M}}}),$7=Ze({"src/lib/filter_visible.js"(Z,q){"use strict";q.exports=function(e){for(var t=A(e)?x:d,r=[],o=0;o<e.length;o++){var a=e[o];t(a)&&r.push(a)}return r};function d(M){return M.visible===!0}function x(M){var e=M[0].trace;return e.visible===!0&&e._length!==0}function A(M){return Array.isArray(M)&&Array.isArray(M[0])&&M[0][0]&&M[0][0].trace}}}),Q7=Ze({"src/lib/increment.js"(Z,q){"use strict";q.exports=function(x,A){if(!A)return x;var M=1/Math.abs(A),e=M>1?(M*x+M*A)/M:x+A,t=String(e).length;if(t>16){var r=String(A).length,o=String(x).length;if(t>=o+r){var a=parseFloat(e).toPrecision(12);a.indexOf("e+")===-1&&(e=+a)}}return e}}}),ez=Ze({"src/lib/clean_number.js"(Z,q){"use strict";var d=ns(),x=qs().BADNUM,A=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q.exports=function(e){return typeof e=="string"&&(e=e.replace(A,"")),d(e)?Number(e):x}}}),ca=Ze({"src/lib/index.js"(Z,q){"use strict";var d=On(),x=jp().utcFormat,A=Zy().format,M=ns(),e=qs(),t=e.FP_SAFE,r=-t,o=e.BADNUM,a=q.exports={};a.adjustFormat=function(j){return!j||/^\d[.]\df/.test(j)||/[.]\d%/.test(j)?j:j==="0.f"?"~f":/^\d%/.test(j)?"~%":/^\ds/.test(j)?"~s":!/^[~,.0$]/.test(j)&&/[&fps]/.test(j)?"~"+j:j};var i={};a.warnBadFormat=function(ie){var j=String(ie);i[j]||(i[j]=1,a.warn('encountered bad format: "'+j+'"'))},a.noFormat=function(ie){return String(ie)},a.numberFormat=function(ie){var j;try{j=A(a.adjustFormat(ie))}catch{return a.warnBadFormat(ie),a.noFormat}return j},a.nestedProperty=b_(),a.keyedContainer=l7(),a.relativeAttr=u7(),a.isPlainObject=Xv(),a.toLogRange=f2(),a.relinkPrivateKeys=c7();var n=xp();a.isArrayBuffer=n.isArrayBuffer,a.isTypedArray=n.isTypedArray,a.isArrayOrTypedArray=n.isArrayOrTypedArray,a.isArray1D=n.isArray1D,a.ensureArray=n.ensureArray,a.concat=n.concat,a.maxRowLength=n.maxRowLength,a.minRowLength=n.minRowLength;var s=Yy();a.mod=s.mod,a.modHalf=s.modHalf;var c=f7();a.valObjectMeta=c.valObjectMeta,a.coerce=c.coerce,a.coerce2=c.coerce2,a.coerceFont=c.coerceFont,a.coercePattern=c.coercePattern,a.coerceHoverinfo=c.coerceHoverinfo,a.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,a.validate=c.validate;var f=q7();a.dateTime2ms=f.dateTime2ms,a.isDateTime=f.isDateTime,a.ms2DateTime=f.ms2DateTime,a.ms2DateTimeLocal=f.ms2DateTimeLocal,a.cleanDate=f.cleanDate,a.isJSDate=f.isJSDate,a.formatDate=f.formatDate,a.incrementMonth=f.incrementMonth,a.dateTick0=f.dateTick0,a.dfltRange=f.dfltRange,a.findExactDates=f.findExactDates,a.MIN_MS=f.MIN_MS,a.MAX_MS=f.MAX_MS;var g=m2();a.findBin=g.findBin,a.sorterAsc=g.sorterAsc,a.sorterDes=g.sorterDes,a.distinctVals=g.distinctVals,a.roundUp=g.roundUp,a.sort=g.sort,a.findIndexOfMin=g.findIndexOfMin,a.sortObjectKeys=Km();var v=V7();a.aggNums=v.aggNums,a.len=v.len,a.mean=v.mean,a.geometricMean=v.geometricMean,a.median=v.median,a.midRange=v.midRange,a.variance=v.variance,a.stdev=v.stdev,a.interp=v.interp;var T=p2();a.init2dArray=T.init2dArray,a.transposeRagged=T.transposeRagged,a.dot=T.dot,a.translationMatrix=T.translationMatrix,a.rotationMatrix=T.rotationMatrix,a.rotationXYMatrix=T.rotationXYMatrix,a.apply3DTransform=T.apply3DTransform,a.apply2DTransform=T.apply2DTransform,a.apply2DTransform2=T.apply2DTransform2,a.convertCssMatrix=T.convertCssMatrix,a.inverseTransformMatrix=T.inverseTransformMatrix;var l=G7();a.deg2rad=l.deg2rad,a.rad2deg=l.rad2deg,a.angleDelta=l.angleDelta,a.angleDist=l.angleDist,a.isFullCircle=l.isFullCircle,a.isAngleInsideSector=l.isAngleInsideSector,a.isPtInsideSector=l.isPtInsideSector,a.pathArc=l.pathArc,a.pathSector=l.pathSector,a.pathAnnulus=l.pathAnnulus;var _=H7();a.isLeftAnchor=_.isLeftAnchor,a.isCenterAnchor=_.isCenterAnchor,a.isRightAnchor=_.isRightAnchor,a.isTopAnchor=_.isTopAnchor,a.isMiddleAnchor=_.isMiddleAnchor,a.isBottomAnchor=_.isBottomAnchor;var w=W7();a.segmentsIntersect=w.segmentsIntersect,a.segmentDistance=w.segmentDistance,a.getTextLocation=w.getTextLocation,a.clearLocationCache=w.clearLocationCache,a.getVisibleSegment=w.getVisibleSegment,a.findPointOnPath=w.findPointOnPath;var S=rs();a.extendFlat=S.extendFlat,a.extendDeep=S.extendDeep,a.extendDeepAll=S.extendDeepAll,a.extendDeepNoArrays=S.extendDeepNoArrays;var E=Ym();a.log=E.log,a.warn=E.warn,a.error=E.error;var y=Jy();a.counterRegex=y.counter;var b=g2();a.throttle=b.throttle,a.throttleDone=b.done,a.clearThrottle=b.clear;var p=T_();a.getGraphDiv=p.getGraphDiv,a.isPlotDiv=p.isPlotDiv,a.removeElement=p.removeElement,a.addStyleRule=p.addStyleRule,a.addRelatedStyleRule=p.addRelatedStyleRule,a.deleteRelatedStyleRule=p.deleteRelatedStyleRule,a.setStyleOnHover=p.setStyleOnHover,a.getFullTransformMatrix=p.getFullTransformMatrix,a.getElementTransformMatrix=p.getElementTransformMatrix,a.getElementAndAncestors=p.getElementAndAncestors,a.equalDomRects=p.equalDomRects,a.clearResponsive=X7(),a.preserveDrawingBuffer=Y7(),a.makeTraceGroups=K7(),a._=J7(),a.notifier=KA(),a.filterUnique=r5(),a.filterVisible=$7(),a.pushUnique=JA(),a.increment=Q7(),a.cleanNumber=ez(),a.ensureNumber=function(j){return M(j)?(j=Number(j),j>t||j<r?o:j):o},a.isIndex=function(ie,j){return j!==void 0&&ie>=j?!1:M(ie)&&ie>=0&&ie%1===0},a.noop=h2(),a.identity=S_(),a.repeat=function(ie,j){for(var ee=new Array(j),re=0;re<j;re++)ee[re]=ie;return ee},a.swapAttrs=function(ie,j,ee,re){ee||(ee="x"),re||(re="y");for(var ce=0;ce<j.length;ce++){var be=j[ce],Ae=a.nestedProperty(ie,be.replace("?",ee)),ze=a.nestedProperty(ie,be.replace("?",re)),Re=Ae.get();Ae.set(ze.get()),ze.set(Re)}},a.raiseToTop=function(j){j.parentNode.appendChild(j)},a.cancelTransition=function(ie){return ie.transition().duration(0)},a.constrain=function(ie,j,ee){return j>ee?Math.max(ee,Math.min(j,ie)):Math.max(j,Math.min(ee,ie))},a.bBoxIntersect=function(ie,j,ee){return ee=ee||0,ie.left<=j.right+ee&&j.left<=ie.right+ee&&ie.top<=j.bottom+ee&&j.top<=ie.bottom+ee},a.simpleMap=function(ie,j,ee,re,ce){for(var be=ie.length,Ae=new Array(be),ze=0;ze<be;ze++)Ae[ze]=j(ie[ze],ee,re,ce);return Ae},a.randstr=function ie(j,ee,re,ce){if(re||(re=16),ee===void 0&&(ee=24),ee<=0)return"0";var be=Math.log(Math.pow(2,ee))/Math.log(re),Ae="",ze,Re,Xe;for(ze=2;be===1/0;ze*=2)be=Math.log(Math.pow(2,ee/ze))/Math.log(re)*ze;var it=be-Math.floor(be);for(ze=0;ze<Math.floor(be);ze++)Xe=Math.floor(Math.random()*re).toString(re),Ae=Xe+Ae;it&&(Re=Math.pow(re,it),Xe=Math.floor(Math.random()*Re).toString(re),Ae=Xe+Ae);var ot=parseInt(Ae,re);return j&&j[Ae]||ot!==1/0&&ot>=Math.pow(2,ee)?ce>10?(a.warn("randstr failed uniqueness"),Ae):ie(j,ee,re,(ce||0)+1):Ae},a.OptionControl=function(ie,j){ie||(ie={}),j||(j="opt");var ee={};return ee.optionList=[],ee._newoption=function(re){re[j]=ie,ee[re.name]=re,ee.optionList.push(re)},ee["_"+j]=ie,ee},a.smooth=function(ie,j){if(j=Math.round(j)||0,j<2)return ie;var ee=ie.length,re=2*ee,ce=2*j-1,be=new Array(ce),Ae=new Array(ee),ze,Re,Xe,it;for(ze=0;ze<ce;ze++)be[ze]=(1-Math.cos(Math.PI*(ze+1)/j))/(2*j);for(ze=0;ze<ee;ze++){for(it=0,Re=0;Re<ce;Re++)Xe=ze+Re+1-j,Xe<-ee?Xe-=re*Math.round(Xe/re):Xe>=re&&(Xe-=re*Math.floor(Xe/re)),Xe<0?Xe=-1-Xe:Xe>=ee&&(Xe=re-1-Xe),it+=ie[Xe]*be[Re];Ae[ze]=it}return Ae},a.syncOrAsync=function(ie,j,ee){var re,ce;function be(){return a.syncOrAsync(ie,j,ee)}for(;ie.length;)if(ce=ie.splice(0,1)[0],re=ce(j),re&&re.then)return re.then(be);return ee&&ee(j)},a.stripTrailingSlash=function(ie){return ie.substr(-1)==="/"?ie.substr(0,ie.length-1):ie},a.noneOrAll=function(ie,j,ee){if(ie){var re=!1,ce=!0,be,Ae;for(be=0;be<ee.length;be++)Ae=ie[ee[be]],Ae!=null?re=!0:ce=!1;if(re&&!ce)for(be=0;be<ee.length;be++)ie[ee[be]]=j[ee[be]]}},a.mergeArray=function(ie,j,ee,re){var ce=typeof re=="function";if(a.isArrayOrTypedArray(ie))for(var be=Math.min(ie.length,j.length),Ae=0;Ae<be;Ae++){var ze=ie[Ae];j[Ae][ee]=ce?re(ze):ze}},a.mergeArrayCastPositive=function(ie,j,ee){return a.mergeArray(ie,j,ee,function(re){var ce=+re;return isFinite(ce)&&ce>0?ce:0})},a.fillArray=function(ie,j,ee,re){if(re=re||a.identity,a.isArrayOrTypedArray(ie))for(var ce=0;ce<j.length;ce++)j[ce][ee]=re(ie[ce])},a.castOption=function(ie,j,ee,re){re=re||a.identity;var ce=a.nestedProperty(ie,ee).get();return a.isArrayOrTypedArray(ce)?Array.isArray(j)&&a.isArrayOrTypedArray(ce[j[0]])?re(ce[j[0]][j[1]]):re(ce[j]):ce},a.extractOption=function(ie,j,ee,re){if(ee in ie)return ie[ee];var ce=a.nestedProperty(j,re).get();if(!Array.isArray(ce))return ce};function u(ie){var j={};for(var ee in ie)for(var re=ie[ee],ce=0;ce<re.length;ce++)j[re[ce]]=+ee;return j}a.tagSelected=function(ie,j,ee){var re=j.selectedpoints,ce=j._indexToPoints,be;ce&&(be=u(ce));function Ae(ot){return ot!==void 0&&ot<ie.length}for(var ze=0;ze<re.length;ze++){var Re=re[ze];if(a.isIndex(Re)||a.isArrayOrTypedArray(Re)&&a.isIndex(Re[0])&&a.isIndex(Re[1])){var Xe=be?be[Re]:Re,it=ee?ee[Xe]:Xe;Ae(it)&&(ie[it].selected=1)}}},a.selIndices2selPoints=function(ie){var j=ie.selectedpoints,ee=ie._indexToPoints;if(ee){for(var re=u(ee),ce=[],be=0;be<j.length;be++){var Ae=j[be];if(a.isIndex(Ae)){var ze=re[Ae];a.isIndex(ze)&&ce.push(ze)}}return ce}else return j},a.getTargetArray=function(ie,j){var ee=j.target;if(typeof ee=="string"&&ee){var re=a.nestedProperty(ie,ee).get();return a.isArrayOrTypedArray(re)?re:!1}else if(a.isArrayOrTypedArray(ee))return ee;return!1};function m(ie,j,ee){var re={};typeof j!="object"&&(j={});var ce=ee==="pieLike"?-1:3,be=Object.keys(ie),Ae,ze,Re;for(Ae=0;Ae<be.length;Ae++)ze=be[Ae],Re=ie[ze],!(ze.charAt(0)==="_"||typeof Re=="function")&&(ze==="module"?re[ze]=Re:Array.isArray(Re)?ze==="colorscale"||ce===-1?re[ze]=Re.slice():re[ze]=Re.slice(0,ce):a.isTypedArray(Re)?ce===-1?re[ze]=Re.subarray():re[ze]=Re.subarray(0,ce):Re&&typeof Re=="object"?re[ze]=m(ie[ze],j[ze],ee):re[ze]=Re);for(be=Object.keys(j),Ae=0;Ae<be.length;Ae++)ze=be[Ae],Re=j[ze],(typeof Re!="object"||!(ze in re)||typeof re[ze]!="object")&&(re[ze]=Re);return re}a.minExtend=m,a.titleCase=function(ie){return ie.charAt(0).toUpperCase()+ie.substr(1)},a.containsAny=function(ie,j){for(var ee=0;ee<j.length;ee++)if(ie.indexOf(j[ee])!==-1)return!0;return!1};var h=/Version\/[\d\.]+.*Safari/;a.isSafari=function(){return h.test(window.navigator.userAgent)};var P=/iPad|iPhone|iPod/;a.isIOS=function(){return P.test(window.navigator.userAgent)};var L=/Macintosh.+AppleWebKit.+Gecko\)$/;a.isMacWKWebView=()=>L.test(window.navigator.userAgent);var z=/Firefox\/(\d+)\.\d+/;a.getFirefoxVersion=function(){var ie=z.exec(window.navigator.userAgent);if(ie&&ie.length===2){var j=parseInt(ie[1]);if(!isNaN(j))return j}return null},a.isD3Selection=function(ie){return ie instanceof d.selection},a.ensureSingle=function(ie,j,ee,re){var ce=ie.select(j+(ee?"."+ee:""));if(ce.size())return ce;var be=ie.append(j);return ee&&be.classed(ee,!0),re&&be.call(re),be},a.ensureSingleById=function(ie,j,ee,re){var ce=ie.select(j+"#"+ee);if(ce.size())return ce;var be=ie.append(j).attr("id",ee);return re&&be.call(re),be},a.objectFromPath=function(ie,j){for(var ee=ie.split("."),re,ce=re={},be=0;be<ee.length;be++){var Ae=ee[be],ze=null,Re=ee[be].match(/(.*)\[([0-9]+)\]/);Re?(Ae=Re[1],ze=Re[2],re=re[Ae]=[],be===ee.length-1?re[ze]=j:re[ze]={},re=re[ze]):(be===ee.length-1?re[Ae]=j:re[Ae]={},re=re[Ae])}return ce};var F=/^([^\[\.]+)\.(.+)?/,B=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function O(ie){return ie.slice(0,2)==="__"}a.expandObjectPaths=function(ie){var j,ee,re,ce,be,Ae,ze;if(typeof ie=="object"&&!Array.isArray(ie)){for(ee in ie)if(ie.hasOwnProperty(ee))if(j=ee.match(F)){if(ce=ie[ee],re=j[1],O(re))continue;delete ie[ee],ie[re]=a.extendDeepNoArrays(ie[re]||{},a.objectFromPath(ee,a.expandObjectPaths(ce))[re])}else if(j=ee.match(B)){if(ce=ie[ee],re=j[1],O(re))continue;if(be=parseInt(j[2]),delete ie[ee],ie[re]=ie[re]||[],j[3]===".")ze=j[4],Ae=ie[re][be]=ie[re][be]||{},a.extendDeepNoArrays(Ae,a.objectFromPath(ze,a.expandObjectPaths(ce)));else{if(O(re))continue;ie[re][be]=a.expandObjectPaths(ce)}}else{if(O(ee))continue;ie[ee]=a.expandObjectPaths(ie[ee])}}return ie},a.numSeparate=function(ie,j,ee){if(ee||(ee=!1),typeof j!="string"||j.length===0)throw new Error("Separator string required for formatting!");typeof ie=="number"&&(ie=String(ie));var re=/(\d+)(\d{3})/,ce=j.charAt(0),be=j.charAt(1),Ae=ie.split("."),ze=Ae[0],Re=Ae.length>1?ce+Ae[1]:"";if(be&&(Ae.length>1||ze.length>4||ee))for(;re.test(ze);)ze=ze.replace(re,"$1"+be+"$2");return ze+Re},a.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var I=/^\w*$/;a.templateString=function(ie,j){var ee={};return ie.replace(a.TEMPLATE_STRING_REGEX,function(re,ce){var be;return I.test(ce)?be=j[ce]:(ee[ce]=ee[ce]||a.nestedProperty(j,ce).get,be=ee[ce](!0)),be!==void 0?be:""})};var N={max:10,count:0,name:"hovertemplate"};a.hovertemplateString=function(){return he.apply(N,arguments)};var U={max:10,count:0,name:"texttemplate"};a.texttemplateString=function(){return he.apply(U,arguments)};var W=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Q(ie){var j=ie.match(W);return j?{key:j[1],op:j[2],number:Number(j[3])}:{key:ie,op:null,number:null}}var ue={max:10,count:0,name:"texttemplate",parseMultDiv:!0};a.texttemplateStringForShapes=function(){return he.apply(ue,arguments)};var le=/^[:|\|]/;function he(ie,j,ee){var re=this,ce=arguments;return j||(j={}),ie.replace(a.TEMPLATE_STRING_REGEX,function(be,Ae,ze){var Re=Ae==="xother"||Ae==="yother",Xe=Ae==="_xother"||Ae==="_yother",it=Ae==="_xother_"||Ae==="_yother_",ot=Ae==="xother_"||Ae==="yother_",tt=Re||Xe||ot||it,lt=Ae;(Xe||it)&&(lt=lt.substring(1)),(ot||it)&&(lt=lt.substring(0,lt.length-1));var Ee=null,_e=null;if(re.parseMultDiv){var fe=Q(lt);lt=fe.key,Ee=fe.op,_e=fe.number}var Fe;if(tt){if(Fe=j[lt],Fe===void 0)return""}else{var rt,st;for(st=3;st<ce.length;st++)if(rt=ce[st],!!rt){if(rt.hasOwnProperty(lt)){Fe=rt[lt];break}if(I.test(lt)||(Fe=a.nestedProperty(rt,lt).get(!0)),Fe!==void 0)break}}if(Fe!==void 0&&(Ee==="*"&&(Fe*=_e),Ee==="/"&&(Fe/=_e)),Fe===void 0&&re)return re.count<re.max&&(a.warn("Variable '"+lt+"' in "+re.name+" could not be found!"),Fe=be),re.count===re.max&&a.warn("Too many "+re.name+" warnings - additional warnings will be suppressed"),re.count++,be;if(ze){var Qe;if(ze[0]===":"&&(Qe=ee?ee.numberFormat:a.numberFormat,Fe!==""&&(Fe=Qe(ze.replace(le,""))(Fe))),ze[0]==="|"){Qe=ee?ee.timeFormat:x;var Lt=a.dateTime2ms(Fe);Fe=a.formatDate(Lt,ze.replace(le,""),!1,Qe)}}else{var kt=lt+"Label";j.hasOwnProperty(kt)&&(Fe=j[kt])}return tt&&(Fe="("+Fe+")",(Xe||it)&&(Fe=" "+Fe),(ot||it)&&(Fe=Fe+" ")),Fe})}var G=48,$=57;a.subplotSort=function(ie,j){for(var ee=Math.min(ie.length,j.length)+1,re=0,ce=0,be=0;be<ee;be++){var Ae=ie.charCodeAt(be)||0,ze=j.charCodeAt(be)||0,Re=Ae>=G&&Ae<=$,Xe=ze>=G&&ze<=$;if(Re&&(re=10*re+Ae-G),Xe&&(ce=10*ce+ze-G),!Re||!Xe){if(re!==ce)return re-ce;if(Ae!==ze)return Ae-ze}}return ce-re};var J=2e9;a.seedPseudoRandom=function(){J=2e9},a.pseudoRandom=function(){var ie=J;return J=(69069*J+1)%4294967296,Math.abs(J-ie)<429496729?a.pseudoRandom():J/4294967296},a.fillText=function(ie,j,ee){var re=Array.isArray(ee)?function(Ae){ee.push(Ae)}:function(Ae){ee.text=Ae},ce=a.extractOption(ie,j,"htx","hovertext");if(a.isValidTextValue(ce))return re(ce);var be=a.extractOption(ie,j,"tx","text");if(a.isValidTextValue(be))return re(be)},a.isValidTextValue=function(ie){return ie||ie===0},a.formatPercent=function(ie,j){j=j||0;for(var ee=(Math.round(100*ie*Math.pow(10,j))*Math.pow(.1,j)).toFixed(j)+"%",re=0;re<j;re++)ee.indexOf(".")!==-1&&(ee=ee.replace("0%","%"),ee=ee.replace(".%","%"));return ee},a.isHidden=function(ie){var j=window.getComputedStyle(ie).display;return!j||j==="none"},a.strTranslate=function(ie,j){return ie||j?"translate("+ie+","+j+")":""},a.strRotate=function(ie){return ie?"rotate("+ie+")":""},a.strScale=function(ie){return ie!==1?"scale("+ie+")":""},a.getTextTransform=function(ie){var j=ie.noCenter,ee=ie.textX,re=ie.textY,ce=ie.targetX,be=ie.targetY,Ae=ie.anchorX||0,ze=ie.anchorY||0,Re=ie.rotate,Xe=ie.scale;return Xe?Xe>1&&(Xe=1):Xe=0,a.strTranslate(ce-Xe*(ee+Ae),be-Xe*(re+ze))+a.strScale(Xe)+(Re?"rotate("+Re+(j?"":" "+ee+" "+re)+")":"")},a.setTransormAndDisplay=function(ie,j){ie.attr("transform",a.getTextTransform(j)),ie.style("display",j.scale?null:"none")},a.ensureUniformFontSize=function(ie,j){var ee=a.extendFlat({},j);return ee.size=Math.max(j.size,ie._fullLayout.uniformtext.minsize||0),ee},a.join2=function(ie,j,ee){var re=ie.length;return re>1?ie.slice(0,-1).join(j)+ee+ie[re-1]:ie.join(j)},a.bigFont=function(ie){return Math.round(1.2*ie)};var X=a.getFirefoxVersion(),oe=X!==null&&X<86;a.getPositionFromD3Event=function(){return oe?[d.event.layerX,d.event.layerY]:[d.event.offsetX,d.event.offsetY]}}}),tz=Ze({"build/plotcss.js"(){"use strict";var Z=ca(),q={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X: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(x in q)d=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Z.addStyleRule(d,q[x]);var d,x}}),a5=Ze({"node_modules/is-browser/client.js"(Z,q){q.exports=!0}}),i5=Ze({"node_modules/has-hover/index.js"(Z,q){"use strict";var d=a5(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=d,q.exports=x}}),W0=Ze({"node_modules/events/events.js"(Z,q){"use strict";var d=typeof Reflect=="object"?Reflect:null,x=d&&typeof d.apply=="function"?d.apply:function(E,y,b){return Function.prototype.apply.call(E,y,b)},A;d&&typeof d.ownKeys=="function"?A=d.ownKeys:Object.getOwnPropertySymbols?A=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:A=function(E){return Object.getOwnPropertyNames(E)};function M(S){console&&console.warn&&console.warn(S)}var e=Number.isNaN||function(E){return E!==E};function t(){t.init.call(this)}q.exports=t,q.exports.once=l,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var r=10;function o(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(S){if(typeof S!="number"||S<0||e(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");r=S}}),t.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},t.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||e(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function a(S){return S._maxListeners===void 0?t.defaultMaxListeners:S._maxListeners}t.prototype.getMaxListeners=function(){return a(this)},t.prototype.emit=function(E){for(var y=[],b=1;b<arguments.length;b++)y.push(arguments[b]);var p=E==="error",u=this._events;if(u!==void 0)p=p&&u.error===void 0;else if(!p)return!1;if(p){var m;if(y.length>0&&(m=y[0]),m instanceof Error)throw m;var h=new Error("Unhandled error."+(m?" ("+m.message+")":""));throw h.context=m,h}var P=u[E];if(P===void 0)return!1;if(typeof P=="function")x(P,this,y);else for(var L=P.length,z=g(P,L),b=0;b<L;++b)x(z[b],this,y);return!0};function i(S,E,y,b){var p,u,m;if(o(y),u=S._events,u===void 0?(u=S._events=Object.create(null),S._eventsCount=0):(u.newListener!==void 0&&(S.emit("newListener",E,y.listener?y.listener:y),u=S._events),m=u[E]),m===void 0)m=u[E]=y,++S._eventsCount;else if(typeof m=="function"?m=u[E]=b?[y,m]:[m,y]:b?m.unshift(y):m.push(y),p=a(S),p>0&&m.length>p&&!m.warned){m.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+m.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=S,h.type=E,h.count=m.length,M(h)}return S}t.prototype.addListener=function(E,y){return i(this,E,y,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(E,y){return i(this,E,y,!0)};function n(){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 s(S,E,y){var b={fired:!1,wrapFn:void 0,target:S,type:E,listener:y},p=n.bind(b);return p.listener=y,b.wrapFn=p,p}t.prototype.once=function(E,y){return o(y),this.on(E,s(this,E,y)),this},t.prototype.prependOnceListener=function(E,y){return o(y),this.prependListener(E,s(this,E,y)),this},t.prototype.removeListener=function(E,y){var b,p,u,m,h;if(o(y),p=this._events,p===void 0)return this;if(b=p[E],b===void 0)return this;if(b===y||b.listener===y)--this._eventsCount===0?this._events=Object.create(null):(delete p[E],p.removeListener&&this.emit("removeListener",E,b.listener||y));else if(typeof b!="function"){for(u=-1,m=b.length-1;m>=0;m--)if(b[m]===y||b[m].listener===y){h=b[m].listener,u=m;break}if(u<0)return this;u===0?b.shift():v(b,u),b.length===1&&(p[E]=b[0]),p.removeListener!==void 0&&this.emit("removeListener",E,h||y)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(E){var y,b,p;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[E]),this;if(arguments.length===0){var u=Object.keys(b),m;for(p=0;p<u.length;++p)m=u[p],m!=="removeListener"&&this.removeAllListeners(m);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(y=b[E],typeof y=="function")this.removeListener(E,y);else if(y!==void 0)for(p=y.length-1;p>=0;p--)this.removeListener(E,y[p]);return this};function c(S,E,y){var b=S._events;if(b===void 0)return[];var p=b[E];return p===void 0?[]:typeof p=="function"?y?[p.listener||p]:[p]:y?T(p):g(p,p.length)}t.prototype.listeners=function(E){return c(this,E,!0)},t.prototype.rawListeners=function(E){return c(this,E,!1)},t.listenerCount=function(S,E){return typeof S.listenerCount=="function"?S.listenerCount(E):f.call(S,E)},t.prototype.listenerCount=f;function f(S){var E=this._events;if(E!==void 0){var y=E[S];if(typeof y=="function")return 1;if(y!==void 0)return y.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?A(this._events):[]};function g(S,E){for(var y=new Array(E),b=0;b<E;++b)y[b]=S[b];return y}function v(S,E){for(;E+1<S.length;E++)S[E]=S[E+1];S.pop()}function T(S){for(var E=new Array(S.length),y=0;y<E.length;++y)E[y]=S[y].listener||S[y];return E}function l(S,E){return new Promise(function(y,b){function p(m){S.removeListener(E,u),b(m)}function u(){typeof S.removeListener=="function"&&S.removeListener("error",p),y([].slice.call(arguments))}w(S,E,u,{once:!0}),E!=="error"&&_(S,p,{once:!0})})}function _(S,E,y){typeof S.on=="function"&&w(S,"error",E,y)}function w(S,E,y,b){if(typeof S.on=="function")b.once?S.once(E,y):S.on(E,y);else if(typeof S.addEventListener=="function")S.addEventListener(E,function p(u){b.once&&S.removeEventListener(E,p),y(u)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}}}),Qy=Ze({"src/lib/events.js"(Z,q){"use strict";var d=W0().EventEmitter,x={init:function(A){if(A._ev instanceof d)return A;var M=new d,e=new d;return A._ev=M,A._internalEv=e,A.on=M.on.bind(M),A.once=M.once.bind(M),A.removeListener=M.removeListener.bind(M),A.removeAllListeners=M.removeAllListeners.bind(M),A._internalOn=e.on.bind(e),A._internalOnce=e.once.bind(e),A._removeInternalListener=e.removeListener.bind(e),A._removeAllInternalListeners=e.removeAllListeners.bind(e),A.emit=function(t,r){M.emit(t,r),e.emit(t,r)},typeof A.addEventListener=="function"&&A.addEventListener("wheel",()=>{},{passive:!0}),A},triggerHandler:function(A,M,e){var t,r=A._ev;if(!r)return;var o=r._events[M];if(!o)return;function a(n){if(n.listener){if(r.removeListener(M,n.listener),!n.fired)return n.fired=!0,n.listener.apply(r,[e])}else return n.apply(r,[e])}o=Array.isArray(o)?o:[o];var i;for(i=0;i<o.length-1;i++)a(o[i]);return t=a(o[i]),t},purge:function(A){return delete A._ev,delete A.on,delete A.once,delete A.removeListener,delete A.removeAllListeners,delete A.emit,delete A._ev,delete A._internalEv,delete A._internalOn,delete A._internalOnce,delete A._removeInternalListener,delete A._removeAllInternalListeners,A}};q.exports=x}}),rz=Ze({"src/lib/queue.js"(Z,q){"use strict";var d=ca(),x=H0().dfltConfig;function A(e,t){for(var r=[],o,a=0;a<t.length;a++)o=t[a],o===e?r[a]=o:typeof o=="object"?r[a]=Array.isArray(o)?d.extendDeep([],o):d.extendDeepAll({},o):r[a]=o;return r}var M={};M.add=function(e,t,r,o,a){var i,n;if(e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},n=e.undoQueue.index,e.autoplay){e.undoQueue.inSequence||(e.autoplay=!1);return}!e.undoQueue.sequence||e.undoQueue.beginSequence?(i={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(n,e.undoQueue.queue.length-n,i),e.undoQueue.index+=1):i=e.undoQueue.queue[n-1],e.undoQueue.beginSequence=!1,i&&(i.undo.calls.unshift(t),i.undo.args.unshift(r),i.redo.calls.push(o),i.redo.args.push(a)),e.undoQueue.queue.length>x.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},M.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},M.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},M.undo=function(t){var r,o;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,o=0;o<r.undo.calls.length;o++)M.plotDo(t,r.undo.calls[o],r.undo.args[o]);t.undoQueue.inSequence=!1,t.autoplay=!1}},M.redo=function(t){var r,o;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,o=0;o<r.redo.calls.length;o++)M.plotDo(t,r.redo.calls[o],r.redo.args[o]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},M.plotDo=function(e,t,r){e.autoplay=!0,r=A(e,r),t.apply(null,r)},q.exports=M}}),n5=Ze({"src/plots/frame_attributes.js"(Z,q){"use strict";q.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}}),e1=Ze({"src/plot_api/plot_schema.js"(Z){"use strict";var q=oo(),d=ca(),x=eu(),A=$y(),M=n5(),e=A_(),t=H0().configAttributes,r=pc(),o=d.extendDeepAll,a=d.isPlainObject,i=d.isArrayOrTypedArray,n=d.nestedProperty,s=d.valObjectMeta,c="_isSubplotObj",f="_isLinkedToArray",g="_arrayAttrRegexps",v="_deprecated",T=[c,f,g,v];Z.IS_SUBPLOT_OBJ=c,Z.IS_LINKED_TO_ARRAY=f,Z.DEPRECATED=v,Z.UNDERSCORE_ATTRS=T,Z.get=function(){var L={};return q.allTypes.forEach(function(z){L[z]=S(z)}),{defs:{valObjects:s,metaKeys:T.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:L,layout:E(),frames:y(),animation:b(e),config:b(t)}},Z.crawl=function(L,z,F,B){var O=F||0;B=B||"",Object.keys(L).forEach(function(I){var N=L[I];if(T.indexOf(I)===-1){var U=(B?B+".":"")+I;z(N,I,L,O,U),!Z.isValObject(N)&&a(N)&&I!=="impliedEdits"&&Z.crawl(N,z,O+1,U)}})},Z.isValObject=function(L){return L&&L.valType!==void 0},Z.findArrayAttributes=function(L){var z=[],F=[],B=[],O,I;function N(W,Q,ue,le){F=F.slice(0,le).concat([Q]),B=B.slice(0,le).concat([W&&W._isLinkedToArray]);var he=W&&(W.valType==="data_array"||W.arrayOk===!0)&&!(F[le-1]==="colorbar"&&(Q==="ticktext"||Q==="tickvals"));he&&U(O,0,"")}function U(W,Q,ue){var le=W[F[Q]],he=ue+F[Q];if(Q===F.length-1)i(le)&&z.push(I+he);else if(B[Q]){if(Array.isArray(le))for(var G=0;G<le.length;G++)a(le[G])&&U(le[G],Q+1,he+"["+G+"].")}else a(le)&&U(le,Q+1,he+".")}return O=L,I="",Z.crawl(x,N),L._module&&L._module.attributes&&Z.crawl(L._module.attributes,N),z},Z.getTraceValObject=function(L,z){var F=z[0],B=1,O,I,N=L._module;if(N||(N=(q.modules[L.type||x.type.dflt]||{})._module),!N)return!1;if(O=N.attributes,I=O&&O[F],!I){var U=N.basePlotModule;U&&U.attributes&&(I=U.attributes[F])}return I||(I=x[F]),_(I,z,B)},Z.getLayoutValObject=function(L,z){var F=l(L,z[0]);return _(F,z,1)};function l(L,z){var F,B,O,I,N=L._basePlotModules;if(N){var U;for(F=0;F<N.length;F++){if(O=N[F],O.attrRegex&&O.attrRegex.test(z)){if(O.layoutAttrOverrides)return O.layoutAttrOverrides;!U&&O.layoutAttributes&&(U=O.layoutAttributes)}var W=O.baseLayoutAttrOverrides;if(W&&z in W)return W[z]}if(U)return U}var Q=L._modules;if(Q){for(F=0;F<Q.length;F++)if(I=Q[F].layoutAttributes,I&&z in I)return I[z]}for(B in q.componentsRegistry){if(O=q.componentsRegistry[B],O.name==="colorscale"&&z.indexOf("coloraxis")===0)return O.layoutAttributes[z];if(!O.schema&&z===O.name)return O.layoutAttributes}return z in A?A[z]:!1}function _(L,z,F){if(!L)return!1;if(L._isLinkedToArray){if(w(z[F]))F++;else if(F<z.length)return!1}for(;F<z.length;F++){var B=L[z[F]];if(a(B))L=B;else break;if(F===z.length-1)break;if(L._isLinkedToArray){if(F++,!w(z[F]))return!1}else if(L.valType==="info_array"){F++;var O=z[F];if(!w(O))return!1;var I=L.items;if(Array.isArray(I)){if(O>=I.length)return!1;if(L.dimensions===2){if(F++,z.length===F)return L;var N=z[F];if(!w(N))return!1;L=I[O][N]}else L=I[O]}else L=I}}return L}function w(L){return L===Math.round(L)&&L>=0}function S(L){var z,F;z=q.modules[L]._module,F=z.basePlotModule;var B={};B.type=null;var O=o({},x),I=o({},z.attributes);Z.crawl(I,function(W,Q,ue,le,he){n(O,he).set(void 0),W===void 0&&n(I,he).set(void 0)}),o(B,O),q.traceIs(L,"noOpacity")&&delete B.opacity,q.traceIs(L,"showLegend")||(delete B.showlegend,delete B.legendgroup),q.traceIs(L,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),z.selectPoints||delete B.selectedpoints,o(B,I),F.attributes&&o(B,F.attributes),B.type=L;var N={meta:z.meta||{},categories:z.categories||{},animatable:!!z.animatable,type:L,attributes:b(B)};if(z.layoutAttributes){var U={};o(U,z.layoutAttributes),N.layoutAttributes=b(U)}return z.animatable||Z.crawl(N,function(W){Z.isValObject(W)&&"anim"in W&&delete W.anim}),N}function E(){var L={},z,F;o(L,A);for(z in q.subplotsRegistry)if(F=q.subplotsRegistry[z],!!F.layoutAttributes)if(Array.isArray(F.attr))for(var B=0;B<F.attr.length;B++)h(L,F,F.attr[B]);else{var O=F.attr==="subplot"?F.name:F.attr;h(L,F,O)}for(z in q.componentsRegistry){F=q.componentsRegistry[z];var I=F.schema;if(I&&(I.subplots||I.layout)){var N=I.subplots;if(N&&N.xaxis&&!N.yaxis)for(var U in N.xaxis)delete L.yaxis[U];delete L.xaxis.shift,delete L.xaxis.autoshift}else F.name==="colorscale"?o(L,F.layoutAttributes):F.layoutAttributes&&P(L,F.layoutAttributes,F.name)}return{layoutAttributes:b(L)}}function y(){var L={frames:o({},M)};return b(L),L.frames}function b(L){return p(L),u(L),m(L),L}function p(L){function z(B){return{valType:"string",editType:"none"}}function F(B,O,I){Z.isValObject(B)?(B.arrayOk===!0||B.valType==="data_array")&&(I[O+"src"]=z(O)):a(B)&&(B.role="object")}Z.crawl(L,F)}function u(L){function z(F,B,O){if(F){var I=F[f];I&&(delete F[f],O[B]={items:{}},O[B].items[I]=F,O[B].role="object")}}Z.crawl(L,z)}function m(L){function z(F){for(var B in F)if(a(F[B]))z(F[B]);else if(Array.isArray(F[B]))for(var O=0;O<F[B].length;O++)z(F[B][O]);else F[B]instanceof RegExp&&(F[B]=F[B].toString())}z(L)}function h(L,z,F){var B=n(L,F),O=o({},z.layoutAttributes);O[c]=!0,B.set(O)}function P(L,z,F){var B=n(L,F);B.set(o(B.get()||{},z))}}}),Dl=Ze({"src/plot_api/plot_template.js"(Z){"use strict";var q=ca(),d=eu(),x="templateitemname",A={name:{valType:"string",editType:"none"}};A[x]={valType:"string",editType:"calc"},Z.templatedArray=function(t,r){return r._isLinkedToArray=t,r.name=A.name,r[x]=A[x],r},Z.traceTemplater=function(t){var r={},o,a;for(o in t)a=t[o],Array.isArray(a)&&a.length&&(r[o]=0);function i(n){o=q.coerce(n,{},d,"type");var s={type:o,_template:null};if(o in r){a=t[o];var c=r[o]%a.length;r[o]++,s._template=a[c]}return s}return{newTrace:i}},Z.newContainer=function(t,r,o){var a=t._template,i=a&&(a[r]||o&&a[o]);q.isPlainObject(i)||(i=null);var n=t[r]={_template:i};return n},Z.arrayTemplater=function(t,r,o){var a=t._template,i=a&&a[e(r)],n=a&&a[r];(!Array.isArray(n)||!n.length)&&(n=[]);var s={};function c(g){var v={name:g.name,_input:g},T=v[x]=g[x];if(!M(T))return v._template=i,v;for(var l=0;l<n.length;l++){var _=n[l];if(_.name===T)return s[T]=1,v._template=_,v}return v[o]=g[o]||!1,v._template=!1,v}function f(){for(var g=[],v=0;v<n.length;v++){var T=n[v],l=T.name;if(M(l)&&!s[l]){var _={_template:T,name:l,_input:{_templateitemname:l}};_[x]=T[x],g.push(_),s[l]=1}}return g}return{newItem:c,defaultItems:f}};function M(t){return t&&typeof t=="string"}function e(t){var r=t.length-1;return t.charAt(r)!=="s"&&q.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Z.arrayDefaultKey=e,Z.arrayEditor=function(t,r,o){var a=(q.nestedProperty(t,r).get()||[]).length,i=o._index,n=i>=a&&(o._input||{})._templateitemname;n&&(i=a);var s=r+"["+i+"]",c;function f(){c={},n&&(c[s]={},c[s][x]=n)}f();function g(_,w){c[_]=w}function v(_,w){n?q.nestedProperty(c[s],_).set(w):c[s+"."+_]=w}function T(){var _=c;return f(),_}function l(_,w){_&&v(_,w);var S=T();for(var E in S)q.nestedProperty(t,E).set(S[E])}return{modifyBase:g,modifyItem:v,getUpdateObj:T,applyUpdate:l}}}}),kh=Ze({"src/plots/cartesian/constants.js"(Z,q){"use strict";var d=Jy().counter;q.exports={idRegex:{x:d("x","( domain)?"),y:d("y","( domain)?")},attrRegex:d("[xy]axis"),xAxisMatch:d("xaxis"),yAxisMatch:d("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"}}}),$c=Ze({"src/plots/cartesian/axis_ids.js"(Z){"use strict";var q=oo(),d=kh();Z.id2name=function(M){if(!(typeof M!="string"||!M.match(d.AX_ID_PATTERN))){var e=M.split(" ")[0].substr(1);return e==="1"&&(e=""),M.charAt(0)+"axis"+e}},Z.name2id=function(M){if(M.match(d.AX_NAME_PATTERN)){var e=M.substr(5);return e==="1"&&(e=""),M.charAt(0)+e}},Z.cleanId=function(M,e,t){var r=/( domain)$/.test(M);if(!(typeof M!="string"||!M.match(d.AX_ID_PATTERN))&&!(e&&M.charAt(0)!==e)&&!(r&&!t)){var o=M.split(" ")[0].substr(1).replace(/^0+/,"");return o==="1"&&(o=""),M.charAt(0)+o+(r&&t?" domain":"")}},Z.list=function(A,M,e){var t=A._fullLayout;if(!t)return[];var r=Z.listIds(A,M),o=new Array(r.length),a;for(a=0;a<r.length;a++){var i=r[a];o[a]=t[i.charAt(0)+"axis"+i.substr(1)]}if(!e){var n=t._subplots.gl3d||[];for(a=0;a<n.length;a++){var s=t[n[a]];M?o.push(s[M+"axis"]):o.push(s.xaxis,s.yaxis,s.zaxis)}}return o},Z.listIds=function(A,M){var e=A._fullLayout;if(!e)return[];var t=e._subplots;return M?t[M+"axis"]:t.xaxis.concat(t.yaxis)},Z.getFromId=function(A,M,e){var t=A._fullLayout;return M=M===void 0||typeof M!="string"?M:M.replace(" domain",""),e==="x"?M=M.replace(/y[0-9]*/,""):e==="y"&&(M=M.replace(/x[0-9]*/,"")),t[Z.id2name(M)]},Z.getFromTrace=function(A,M,e){var t=A._fullLayout,r=null;if(q.traceIs(M,"gl3d")){var o=M.scene;o.substr(0,5)==="scene"&&(r=t[o][e+"axis"])}else r=Z.getFromId(A,M[e+"axis"]||e);return r},Z.idSort=function(A,M){var e=A.charAt(0),t=M.charAt(0);return e!==t?e>t?1:-1:+(A.substr(1)||1)-+(M.substr(1)||1)},Z.ref2id=function(A){return/^[xyz]/.test(A)?A.split(" ")[0]:!1};function x(A,M){if(M&&M.length){for(var e=0;e<M.length;e++)if(M[e][A])return!0}return!1}Z.isLinked=function(A,M){return x(M,A._axisMatchGroups)||x(M,A._axisConstraintGroups)}}}),Jm=Ze({"src/components/shapes/handle_outline.js"(Z,q){"use strict";function d(A){var M=A._fullLayout._zoomlayer;M&&M.selectAll(".outline-controllers").remove()}function x(A){var M=A._fullLayout._zoomlayer;M&&M.selectAll(".select-outline").remove(),A._fullLayout._outlining=!1}q.exports={clearOutlineControllers:d,clearOutline:x}}}),y2=Ze({"src/traces/scatter/layout_attributes.js"(Z,q){"use strict";q.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),Hh=Ze({"src/plots/get_data.js"(Z){"use strict";var q=oo(),d=kh().SUBPLOT_PATTERN;Z.getSubplotCalcData=function(x,A,M){var e=q.subplotsRegistry[A];if(!e)return[];for(var t=e.attr,r=[],o=0;o<x.length;o++){var a=x[o],i=a[0].trace;i[t]===M&&r.push(a)}return r},Z.getModuleCalcData=function(x,A,M){var e=[],t=[],r;if(typeof A=="string"?r=q.getModule(A).plot:typeof A=="function"?r=A:r=A.plot,!r)return[e,x];for(var o=M,a=0;a<x.length;a++){var i=x[a],n=i[0].trace,s=n.zorder!==void 0;n.visible!==!0||n._length===0||(n._module&&n._module.plot===r&&(!s||n.zorder===o)?e.push(i):t.push(i))}return[e,t]},Z.getSubplotData=function(A,M,e){if(!q.subplotsRegistry[M])return[];for(var t=q.subplotsRegistry[M].attr,r=[],o,a,i,n=0;n<A.length;n++)o=A[n],o[t]===e&&r.push(o);return r}}}),az=Ze({"src/plots/command.js"(Z){"use strict";var q=oo(),d=ca();Z.manageCommandObserver=function(r,o,a,i){var n={},s=!0;o&&o._commandObserver&&(n=o._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var c=Z.hasSimpleAPICommandBindings(r,a,n.lookupTable);if(o&&o._commandObserver){if(c)return n;if(o._commandObserver.remove)return o._commandObserver.remove(),o._commandObserver=null,n}if(c){x(r,c,n.cache),n.check=function(){if(s){var T=x(r,c,n.cache);return T.changed&&i&&n.lookupTable[T.value]!==void 0&&(n.disable(),Promise.resolve(i({value:T.value,type:c.type,prop:c.prop,traces:c.traces,index:n.lookupTable[T.value]})).then(n.enable,n.enable)),T.changed}};for(var f=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],g=0;g<f.length;g++)r._internalOn(f[g],n.check);n.remove=function(){for(var v=0;v<f.length;v++)r._removeInternalListener(f[v],n.check)}}else d.log("Unable to automatically bind plot updates to API command"),n.lookupTable={},n.remove=function(){};return n.disable=function(){s=!1},n.enable=function(){s=!0},o&&(o._commandObserver=n),n},Z.hasSimpleAPICommandBindings=function(r,o,a){var i,n=o.length,s;for(i=0;i<n;i++){var c,f=o[i],g=f.method,v=f.args;if(Array.isArray(v)||(v=[]),!g)return!1;var T=Z.computeAPICommandBindings(r,g,v);if(T.length!==1)return!1;if(!s)s=T[0],Array.isArray(s.traces)&&s.traces.sort();else{if(c=T[0],c.type!==s.type||c.prop!==s.prop)return!1;if(Array.isArray(s.traces))if(Array.isArray(c.traces)){c.traces.sort();for(var l=0;l<s.traces.length;l++)if(s.traces[l]!==c.traces[l])return!1}else return!1;else if(c.prop!==s.prop)return!1}c=T[0];var _=c.value;if(Array.isArray(_))if(_.length===1)_=_[0];else return!1;a&&(a[_]=i)}return s};function x(r,o,a){var i,n,s,c=!1;if(o.type==="data")i=r._fullData[o.traces!==null?o.traces[0]:0];else if(o.type==="layout")i=r._fullLayout;else return!1;return n=d.nestedProperty(i,o.prop).get(),s=a[o.type]=a[o.type]||{},s.hasOwnProperty(o.prop)&&s[o.prop]!==n&&(c=!0),s[o.prop]=n,{changed:c,value:n}}Z.executeAPICommand=function(r,o,a){if(o==="skip")return Promise.resolve();var i=q.apiMethodRegistry[o],n=[r];Array.isArray(a)||(a=[]);for(var s=0;s<a.length;s++)n.push(a[s]);return i.apply(null,n).catch(function(c){return d.warn("API call to Plotly."+o+" rejected.",c),Promise.reject(c)})},Z.computeAPICommandBindings=function(r,o,a){var i;switch(Array.isArray(a)||(a=[]),o){case"restyle":i=e(r,a);break;case"relayout":i=M(r,a);break;case"update":i=e(r,[a[0],a[2]]).concat(M(r,[a[1]]));break;case"animate":i=A(r,a);break;default:i=[]}return i};function A(r,o){return Array.isArray(o[0])&&o[0].length===1&&["string","number"].indexOf(typeof o[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:o[0][0].toString()}]:[]}function M(r,o){var a=[],i=o[0],n={};if(typeof i=="string")n[i]=o[1];else if(d.isPlainObject(i))n=i;else return a;return t(n,function(s,c,f){a.push({type:"layout",prop:s,value:f})},"",0),a}function e(r,o){var a,i,n,s,c=[];if(i=o[0],n=o[1],a=o[2],s={},typeof i=="string")s[i]=n;else if(d.isPlainObject(i))s=i,a===void 0&&(a=n);else return c;return a===void 0&&(a=null),t(s,function(f,g,v){var T,l;if(Array.isArray(v)){l=v.slice();var _=Math.min(l.length,r.data.length);a&&(_=Math.min(_,a.length)),T=[];for(var w=0;w<_;w++)T[w]=a?a[w]:w}else l=v,T=a?a.slice():null;if(T===null)Array.isArray(l)&&(l=l[0]);else if(Array.isArray(T)){if(!Array.isArray(l)){var S=l;l=[];for(var E=0;E<T.length;E++)l[E]=S}l.length=Math.min(T.length,l.length)}c.push({type:"data",prop:f,traces:T,value:l})},"",0),c}function t(r,o,a,i){Object.keys(r).forEach(function(n){var s=r[n];if(n[0]!=="_"){var c=a+(i>0?".":"")+n;d.isPlainObject(s)?t(s,o,c,i+1):o(c,n,s)}})}}}),xc=Ze({"src/plots/plots.js"(Z,q){"use strict";var d=On(),x=jp().timeFormatLocale,A=Zy().formatLocale,M=ns(),e=YA(),t=oo(),r=e1(),o=Dl(),a=ca(),i=Yn(),n=qs().BADNUM,s=$c(),c=Jm().clearOutline,f=y2(),g=A_(),v=n5(),T=Hh().getModuleCalcData,l=a.relinkPrivateKeys,_=a._,w=q.exports={};a.extendFlat(w,t),w.attributes=eu(),w.attributes.type.values=w.allTypes,w.fontAttrs=tc(),w.layoutAttributes=$y();var S=az();w.executeAPICommand=S.executeAPICommand,w.computeAPICommandBindings=S.computeAPICommandBindings,w.manageCommandObserver=S.manageCommandObserver,w.hasSimpleAPICommandBindings=S.hasSimpleAPICommandBindings,w.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function($){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),$(w.previousPromises(G)))},300)})},w.resize=function(G){G=a.getGraphDiv(G);var $,J=new Promise(function(X,oe){(!G||a.isHidden(G))&&oe(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&($=G._resolveResize),G._resolveResize=X,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){X(G);return}delete G.layout.width,delete G.layout.height;var ie=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=ie,G._resolveResize===X&&(delete G._resolveResize,X(G))})},100)});return $&&$(J),J},w.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},w.addLinks=function(G){if(!(!G._context.showLink&&!G._context.showSources)){var $=G._fullLayout,J=a.ensureSingle($._paper,"text","js-plot-link-container",function(re){re.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:i.defaultLine,"pointer-events":"all"}).each(function(){var ce=d.select(this);ce.append("tspan").classed("js-link-to-tool",!0),ce.append("tspan").classed("js-link-spacer",!0),ce.append("tspan").classed("js-sourcelinks",!0)})}),X=J.node(),oe={y:$._paper.attr("height")-9};document.body.contains(X)&&X.getComputedTextLength()>=$.width-20?(oe["text-anchor"]="start",oe.x=5):(oe["text-anchor"]="end",oe.x=$._paper.attr("width")-7),J.attr(oe);var ie=J.select(".js-link-to-tool"),j=J.select(".js-link-spacer"),ee=J.select(".js-sourcelinks");G._context.showSources&&G._context.showSources(G),G._context.showLink&&E(G,ie),j.text(ie.text()&&ee.text()?" - ":"")}};function E(G,$){$.text("");var J=$.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(G._context.linkText+" \xBB");if(G._context.sendData)J.on("click",function(){w.sendDataToCloud(G)});else{var X=window.location.pathname.split("/"),oe=window.location.search;J.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+X[2].split(".")[0]+"/"+X[1]+oe})}}w.sendDataToCloud=function(G){var $=(window.PLOTLYENV||{}).BASE_URL||G._context.plotlyServerURL;if($){G.emit("plotly_beforeexport");var J=d.select(G).append("div").attr("id","hiddenform").style("display","none"),X=J.append("form").attr({action:$+"/external",method:"post",target:"_blank"}),oe=X.append("input").attr({type:"text",name:"data"});return oe.node().value=w.graphJson(G,!1,"keepdata"),X.node().submit(),J.remove(),G.emit("plotly_afterexport"),!1}};var y=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],b=["year","month","dayMonth","dayMonthYear"];w.supplyDefaults=function(G,$){var J=$&&$.skipUpdateCalc,X=G._fullLayout||{};if(X._skipDefaults){delete X._skipDefaults;return}var oe=G._fullLayout={},ie=G.layout||{},j=G._fullData||[],ee=G._fullData=[],re=G.data||[],ce=G.calcdata||[],be=G._context||{},Ae;G._transitionData||w.createTransitionData(G),oe._dfltTitle={plot:_(G,"Click to enter Plot title"),subtitle:_(G,"Click to enter Plot subtitle"),x:_(G,"Click to enter X axis title"),y:_(G,"Click to enter Y axis title"),colorbar:_(G,"Click to enter Colorscale title"),annotation:_(G,"new text")},oe._traceWord=_(G,"trace");var ze=m(G,y);if(oe._mapboxAccessToken=be.mapboxAccessToken,X._initialAutoSizeIsDone){var Re=X.width,Xe=X.height;w.supplyLayoutGlobalDefaults(ie,oe,ze),ie.width||(oe.width=Re),ie.height||(oe.height=Xe),w.sanitizeMargins(oe)}else{w.supplyLayoutGlobalDefaults(ie,oe,ze);var it=!ie.width||!ie.height,ot=oe.autosize,tt=be.autosizable,lt=it&&(ot||tt);lt?w.plotAutoSize(G,ie,oe):it&&w.sanitizeMargins(oe),!ot&&it&&(ie.width=oe.width,ie.height=oe.height)}oe._d3locale=h(ze,oe.separators),oe._extraFormat=m(G,b),oe._initialAutoSizeIsDone=!0,oe._dataLength=re.length,oe._modules=[],oe._visibleModules=[],oe._basePlotModules=[];var Ee=oe._subplots=u(),_e=oe._splomAxes={x:{},y:{}},fe=oe._splomSubplots={};oe._splomGridDflt={},oe._scatterStackOpts={},oe._firstScatter={},oe._alignmentOpts={},oe._colorAxes={},oe._requestRangeslider={},oe._traceUids=p(j,re),w.supplyDataDefaults(re,ee,ie,oe);var Fe=Object.keys(_e.x),rt=Object.keys(_e.y);if(Fe.length>1&&rt.length>1){for(t.getComponentMethod("grid","sizeDefaults")(ie,oe),Ae=0;Ae<Fe.length;Ae++)a.pushUnique(Ee.xaxis,Fe[Ae]);for(Ae=0;Ae<rt.length;Ae++)a.pushUnique(Ee.yaxis,rt[Ae]);for(var st in fe)a.pushUnique(Ee.cartesian,st)}if(oe._has=w._hasPlotType.bind(oe),j.length===ee.length)for(Ae=0;Ae<ee.length;Ae++)l(ee[Ae],j[Ae]);w.supplyLayoutModuleDefaults(ie,oe,ee,G._transitionData);var Qe=oe._visibleModules,Lt=[];for(Ae=0;Ae<Qe.length;Ae++){var kt=Qe[Ae].crossTraceDefaults;kt&&a.pushUnique(Lt,kt)}for(Ae=0;Ae<Lt.length;Ae++)Lt[Ae](ee,oe);oe._hasOnlyLargeSploms=oe._basePlotModules.length===1&&oe._basePlotModules[0].name==="splom"&&Fe.length>15&&rt.length>15&&oe.shapes.length===0&&oe.images.length===0,w.linkSubplots(ee,oe,j,X),w.cleanPlot(ee,oe,j,X);var Vt=!!(X._has&&X._has("cartesian")),Zt=!!(oe._has&&oe._has("cartesian")),Sr=Vt,xr=Zt;Sr&&!xr?X._bgLayer.remove():xr&&!Sr&&(oe._shouldCreateBgLayer=!0),X._zoomlayer&&!G._dragging&&c({_fullLayout:X}),P(ee,oe),l(oe,X),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,oe),oe._preGUI||(oe._preGUI={}),oe._tracePreGUI||(oe._tracePreGUI={});var jr=oe._tracePreGUI,wr={},Ir;for(Ir in jr)wr[Ir]="old";for(Ae=0;Ae<ee.length;Ae++)Ir=ee[Ae]._fullInput.uid,wr[Ir]||(jr[Ir]={}),wr[Ir]="new";for(Ir in wr)wr[Ir]==="old"&&delete jr[Ir];F(oe),t.getComponentMethod("rangeslider","makeData")(oe),!J&&ce.length===ee.length&&w.supplyDefaultsUpdateCalc(ce,ee)},w.supplyDefaultsUpdateCalc=function(G,$){for(var J=0;J<$.length;J++){var X=$[J],oe=(G[J]||[])[0];if(oe&&oe.trace){var ie=oe.trace;if(ie._hasCalcTransform){var j=ie._arrayAttrs,ee,re,ce;for(ee=0;ee<j.length;ee++)re=j[ee],ce=a.nestedProperty(ie,re).get().slice(),a.nestedProperty(X,re).set(ce)}oe.trace=X}}};function p(G,$){var J=$.length,X=[],oe,ie;for(oe=0;oe<G.length;oe++){var j=G[oe]._fullInput;j!==ie&&X.push(j),ie=j}var ee=X.length,re=new Array(J),ce={};function be(Re,Xe){re[Xe]=Re,ce[Re]=1}function Ae(Re,Xe){if(Re&&typeof Re=="string"&&!ce[Re])return be(Re,Xe),!0}for(oe=0;oe<J;oe++){var ze=$[oe].uid;typeof ze=="number"&&(ze=String(ze)),!Ae(ze,oe)&&(oe<ee&&Ae(X[oe].uid,oe)||be(a.randstr(ce),oe))}return re}function u(){var G=t.collectableSubplotTypes,$={},J,X;if(!G){G=[];var oe=t.subplotsRegistry;for(var ie in oe){var j=oe[ie],ee=j.attr;if(ee&&(G.push(ie),Array.isArray(ee)))for(X=0;X<ee.length;X++)a.pushUnique(G,ee[X])}}for(J=0;J<G.length;J++)$[G[J]]=[];return $}function m(G,$){var J=G._context.locale;J||(J="en-US");var X=!1,oe={};function ie(Ae){for(var ze=!0,Re=0;Re<$.length;Re++){var Xe=$[Re];oe[Xe]||(Ae[Xe]?oe[Xe]=Ae[Xe]:ze=!1)}ze&&(X=!0)}for(var j=0;j<2;j++){for(var ee=G._context.locales,re=0;re<2;re++){var ce=(ee[J]||{}).format;if(ce&&(ie(ce),X))break;ee=t.localeRegistry}var be=J.split("-")[0];if(X||be===J)break;J=be}return X||ie(t.localeRegistry.en.format),oe}function h(G,$){return G.decimal=$.charAt(0),G.thousands=$.charAt(1),{numberFormat:function(J){try{J=A(G).format(a.adjustFormat(J))}catch{return a.warnBadFormat(J),a.noFormat}return J},timeFormat:x(G).utcFormat}}function P(G,$){var J,X=[];$.meta&&(J=$._meta={meta:$.meta,layout:{meta:$.meta}});for(var oe=0;oe<G.length;oe++){var ie=G[oe];ie.meta?X[ie.index]=ie._meta={meta:ie.meta}:$.meta&&(ie._meta={meta:$.meta}),$.meta&&(ie._meta.layout={meta:$.meta})}X.length&&(J||(J=$._meta={}),J.data=X)}w.createTransitionData=function(G){G._transitionData||(G._transitionData={}),G._transitionData._frames||(G._transitionData._frames=[]),G._transitionData._frameHash||(G._transitionData._frameHash={}),G._transitionData._counter||(G._transitionData._counter=0),G._transitionData._interruptCallbacks||(G._transitionData._interruptCallbacks=[])},w._hasPlotType=function(G){var $,J=this._basePlotModules||[];for($=0;$<J.length;$++)if(J[$].name===G)return!0;var X=this._modules||[];for($=0;$<X.length;$++){var oe=X[$].name;if(oe===G)return!0;var ie=t.modules[oe];if(ie&&ie.categories[G])return!0}return!1},w.cleanPlot=function(G,$,J,X){var oe,ie,j=X._basePlotModules||[];for(oe=0;oe<j.length;oe++){var ee=j[oe];ee.clean&&ee.clean(G,$,J,X)}var re=X._has&&X._has("gl"),ce=$._has&&$._has("gl");re&&!ce&&X._glcontainer!==void 0&&(X._glcontainer.selectAll(".gl-canvas").remove(),X._glcontainer.selectAll(".no-webgl").remove(),X._glcanvas=null);var be=!!X._infolayer;e:for(oe=0;oe<J.length;oe++){var Ae=J[oe],ze=Ae.uid;for(ie=0;ie<G.length;ie++){var Re=G[ie];if(ze===Re.uid)continue e}be&&X._infolayer.select(".cb"+ze).remove()}},w.linkSubplots=function(G,$,J,X){var oe,ie,j=X._plots||{},ee=$._plots={},re=$._subplots,ce={_fullData:G,_fullLayout:$},be=re.cartesian||[];for(oe=0;oe<be.length;oe++){var Ae=be[oe],ze=j[Ae],Re=s.getFromId(ce,Ae,"x"),Xe=s.getFromId(ce,Ae,"y"),it;for(ze?it=ee[Ae]=ze:(it=ee[Ae]={},it.id=Ae),Re._counterAxes.push(Xe._id),Xe._counterAxes.push(Re._id),Re._subplotsWith.push(Ae),Xe._subplotsWith.push(Ae),it.xaxis=Re,it.yaxis=Xe,it._hasClipOnAxisFalse=!1,ie=0;ie<G.length;ie++){var ot=G[ie];if(ot.xaxis===it.xaxis._id&&ot.yaxis===it.yaxis._id&&ot.cliponaxis===!1){it._hasClipOnAxisFalse=!0;break}}}var tt=s.list(ce,null,!0),lt;for(oe=0;oe<tt.length;oe++){lt=tt[oe];var Ee=null;lt.overlaying&&(Ee=s.getFromId(ce,lt.overlaying),Ee&&Ee.overlaying&&(lt.overlaying=!1,Ee=null)),lt._mainAxis=Ee||lt,Ee&&(lt.domain=Ee.domain.slice()),lt._anchorAxis=lt.anchor==="free"?null:s.getFromId(ce,lt.anchor)}for(oe=0;oe<tt.length;oe++)if(lt=tt[oe],lt._counterAxes.sort(s.idSort),lt._subplotsWith.sort(a.subplotSort),lt._mainSubplot=L(lt,$),lt._counterAxes.length&&(lt.spikemode&&lt.spikemode.indexOf("across")!==-1||lt.automargin&&lt.mirror&&lt.anchor!=="free"||t.getComponentMethod("rangeslider","isVisible")(lt))){var _e=1,fe=0;for(ie=0;ie<lt._counterAxes.length;ie++){var Fe=s.getFromId(ce,lt._counterAxes[ie]);_e=Math.min(_e,Fe.domain[0]),fe=Math.max(fe,Fe.domain[1])}_e<fe&&(lt._counterDomainMin=_e,lt._counterDomainMax=fe)}};function L(G,$){var J={_fullLayout:$},X=G._id.charAt(0)==="x",oe=G._mainAxis._anchorAxis,ie="",j="",ee="";if(oe&&(ee=oe._mainAxis._id,ie=X?G._id+ee:ee+G._id),!ie||!$._plots[ie]){ie="";for(var re=G._counterAxes,ce=0;ce<re.length;ce++){var be=re[ce],Ae=X?G._id+be:be+G._id;j||(j=Ae);var ze=s.getFromId(J,be);if(ee&&ze.overlaying===ee){ie=Ae;break}}}return ie||j}w.clearExpandedTraceDefaultColors=function(G){var $,J,X;function oe(j,ee,re,ce){J[ce]=ee,J.length=ce+1,j.valType==="color"&&j.dflt===void 0&&$.push(J.join("."))}for(J=[],$=G._module._colorAttrs,$||(G._module._colorAttrs=$=[],r.crawl(G._module.attributes,oe)),X=0;X<$.length;X++){var ie=a.nestedProperty(G,"_input."+$[X]);ie.get()||a.nestedProperty(G,$[X]).set(null)}},w.supplyDataDefaults=function(G,$,J,X){var oe=X._modules,ie=X._visibleModules,j=X._basePlotModules,ee=0,re=0,ce,be,Ae;X._transformModules=[];function ze(lt){$.push(lt);var Ee=lt._module;Ee&&(a.pushUnique(oe,Ee),lt.visible===!0&&a.pushUnique(ie,Ee),a.pushUnique(j,lt._module.basePlotModule),ee++,lt._input.visible!==!1&&re++)}var Re={},Xe=[],it=(J.template||{}).data||{},ot=o.traceTemplater(it);for(ce=0;ce<G.length;ce++)Ae=G[ce],be=ot.newTrace(Ae),be.uid=X._traceUids[ce],w.supplyTraceDefaults(Ae,be,re,X,ce),be.index=ce,be._input=Ae,be._fullInput=be,ze(be),t.traceIs(be,"carpetAxis")&&(Re[be.carpet]=be),t.traceIs(be,"carpetDependent")&&Xe.push(ce);for(ce=0;ce<Xe.length;ce++)if(be=$[Xe[ce]],!!be.visible){var tt=Re[be.carpet];if(be._carpet=tt,!tt||!tt.visible){be.visible=!1;continue}be.xaxis=tt.xaxis,be.yaxis=tt.yaxis}},w.supplyAnimationDefaults=function(G){G=G||{};var $,J={};function X(oe,ie){return a.coerce(G||{},J,g,oe,ie)}if(X("mode"),X("direction"),X("fromcurrent"),Array.isArray(G.frame))for(J.frame=[],$=0;$<G.frame.length;$++)J.frame[$]=w.supplyAnimationFrameDefaults(G.frame[$]||{});else J.frame=w.supplyAnimationFrameDefaults(G.frame||{});if(Array.isArray(G.transition))for(J.transition=[],$=0;$<G.transition.length;$++)J.transition[$]=w.supplyAnimationTransitionDefaults(G.transition[$]||{});else J.transition=w.supplyAnimationTransitionDefaults(G.transition||{});return J},w.supplyAnimationFrameDefaults=function(G){var $={};function J(X,oe){return a.coerce(G||{},$,g.frame,X,oe)}return J("duration"),J("redraw"),$},w.supplyAnimationTransitionDefaults=function(G){var $={};function J(X,oe){return a.coerce(G||{},$,g.transition,X,oe)}return J("duration"),J("easing"),$},w.supplyFrameDefaults=function(G){var $={};function J(X,oe){return a.coerce(G,$,v,X,oe)}return J("group"),J("name"),J("traces"),J("baseframe"),J("data"),J("layout"),$},w.supplyTraceDefaults=function(G,$,J,X,oe){var ie=X.colorway||i.defaults,j=ie[J%ie.length],ee;function re(Ee,_e){return a.coerce(G,$,w.attributes,Ee,_e)}var ce=re("visible");re("type"),re("name",X._traceWord+" "+oe),re("uirevision",X.uirevision);var be=w.getModule($);if($._module=be,be){var Ae=be.basePlotModule,ze=Ae.attr,Re=Ae.attributes;if(ze&&Re){var Xe=X._subplots,it="";if(Array.isArray(ze))for(ee=0;ee<ze.length;ee++){var ot=ze[ee],tt=a.coerce(G,$,Re,ot);Xe[ot]&&a.pushUnique(Xe[ot],tt),it+=tt}else it=a.coerce(G,$,Re,ze);Xe[Ae.name]&&a.pushUnique(Xe[Ae.name],it)}}if(ce&&(re("customdata"),re("ids"),re("meta"),t.traceIs($,"showLegend")?(a.coerce(G,$,be.attributes.showlegend?be.attributes:w.attributes,"showlegend"),re("legend"),re("legendwidth"),re("legendgroup"),re("legendgrouptitle.text"),re("legendrank"),$._dfltShowLegend=!0):$._dfltShowLegend=!1,be&&be.supplyDefaults(G,$,j,X),t.traceIs($,"noOpacity")||re("opacity"),t.traceIs($,"notLegendIsolatable")&&($.visible=!!$.visible),t.traceIs($,"noHover")||($.hovertemplate||a.coerceHoverinfo(G,$,X),$.type!=="parcats"&&t.getComponentMethod("fx","supplyDefaults")(G,$,j,X)),be&&be.selectPoints)){var lt=re("selectedpoints");a.isTypedArray(lt)&&($.selectedpoints=Array.from(lt))}return $},w.supplyLayoutGlobalDefaults=function(G,$,J){function X(Ae,ze){return a.coerce(G,$,w.layoutAttributes,Ae,ze)}var oe=G.template;a.isPlainObject(oe)&&($.template=oe,$._template=oe.layout,$._dataTemplate=oe.data),X("autotypenumbers");var ie=a.coerceFont(X,"font"),j=ie.size;a.coerceFont(X,"title.font",ie,{overrideDflt:{size:Math.round(j*1.4)}}),X("title.text",$._dfltTitle.plot),X("title.xref");var ee=X("title.yref");X("title.pad.t"),X("title.pad.r"),X("title.pad.b"),X("title.pad.l");var re=X("title.automargin");X("title.x"),X("title.xanchor"),X("title.y"),X("title.yanchor"),X("title.subtitle.text",$._dfltTitle.subtitle),a.coerceFont(X,"title.subtitle.font",ie,{overrideDflt:{size:Math.round($.title.font.size*.7)}}),re&&(ee==="paper"&&($.title.y!==0&&($.title.y=1),$.title.yanchor==="auto"&&($.title.yanchor=$.title.y===0?"top":"bottom")),ee==="container"&&($.title.y==="auto"&&($.title.y=1),$.title.yanchor==="auto"&&($.title.yanchor=$.title.y<.5?"bottom":"top")));var ce=X("uniformtext.mode");ce&&X("uniformtext.minsize"),X("autosize",!(G.width&&G.height)),X("width"),X("height"),X("minreducedwidth"),X("minreducedheight"),X("margin.l"),X("margin.r"),X("margin.t"),X("margin.b"),X("margin.pad"),X("margin.autoexpand"),G.width&&G.height&&w.sanitizeMargins($),t.getComponentMethod("grid","sizeDefaults")(G,$),X("paper_bgcolor"),X("separators",J.decimal+J.thousands),X("hidesources"),X("colorway"),X("datarevision");var be=X("uirevision");X("editrevision",be),X("selectionrevision",be),t.getComponentMethod("modebar","supplyLayoutDefaults")(G,$),t.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(G,$,X),t.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(G,$,X),X("meta"),a.isPlainObject(G.transition)&&(X("transition.duration"),X("transition.easing"),X("transition.ordering")),t.getComponentMethod("calendars","handleDefaults")(G,$,"calendar"),t.getComponentMethod("fx","supplyLayoutGlobalDefaults")(G,$,X),a.coerce(G,$,f,"scattermode")};function z(G){return typeof G=="string"&&G.substr(G.length-2)==="px"&&parseFloat(G)}w.plotAutoSize=function($,J,X){var oe=$._context||{},ie=oe.frameMargins,j,ee,re=a.isPlotDiv($);if(re&&$.emit("plotly_autosize"),oe.fillFrame)j=window.innerWidth,ee=window.innerHeight,document.body.style.overflow="hidden";else{var ce=re?window.getComputedStyle($):{};if(j=z(ce.width)||z(ce.maxWidth)||X.width,ee=z(ce.height)||z(ce.maxHeight)||X.height,M(ie)&&ie>0){var be=1-2*ie;j=Math.round(be*j),ee=Math.round(be*ee)}}var Ae=w.layoutAttributes.width.min,ze=w.layoutAttributes.height.min;j<Ae&&(j=Ae),ee<ze&&(ee=ze);var Re=!J.width&&Math.abs(X.width-j)>1,Xe=!J.height&&Math.abs(X.height-ee)>1;(Xe||Re)&&(Re&&(X.width=j),Xe&&(X.height=ee)),$._initialAutoSize||($._initialAutoSize={width:j,height:ee}),w.sanitizeMargins(X)},w.supplyLayoutModuleDefaults=function(G,$,J,X){var oe=t.componentsRegistry,ie=$._basePlotModules,j,ee,re,ce=t.subplotsRegistry.cartesian;for(j in oe)re=oe[j],re.includeBasePlot&&re.includeBasePlot(G,$);ie.length||ie.push(ce),$._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,$),ce.finalizeSubplots(G,$));for(var be in $._subplots)$._subplots[be].sort(a.subplotSort);for(ee=0;ee<ie.length;ee++)re=ie[ee],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,$,J);var Ae=$._modules;for(ee=0;ee<Ae.length;ee++)re=Ae[ee],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,$,J);var ze=$._transformModules;for(ee=0;ee<ze.length;ee++)re=ze[ee],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,$,J,X);for(j in oe)re=oe[j],re.supplyLayoutDefaults&&re.supplyLayoutDefaults(G,$,J)},w.purge=function(G){var $=G._fullLayout||{};$._glcontainer!==void 0&&($._glcontainer.selectAll(".gl-canvas").remove(),$._glcontainer.remove(),$._glcanvas=null),$._modeBar&&$._modeBar.destroy(),G._transitionData&&(G._transitionData._interruptCallbacks&&(G._transitionData._interruptCallbacks.length=0),G._transitionData._animationRaf&&window.cancelAnimationFrame(G._transitionData._animationRaf)),a.clearThrottle(),a.clearResponsive(G),delete G.data,delete G.layout,delete G._fullData,delete G._fullLayout,delete G.calcdata,delete G.empty,delete G.fid,delete G.undoqueue,delete G.undonum,delete G.autoplay,delete G.changed,delete G._promises,delete G._redrawTimer,delete G._hmlumcount,delete G._hmpixcount,delete G._transitionData,delete G._transitioning,delete G._initialAutoSize,delete G._transitioningWithDuration,delete G._dragging,delete G._dragged,delete G._dragdata,delete G._hoverdata,delete G._snapshotInProgress,delete G._editing,delete G._mouseDownTime,delete G._legendMouseDownTime,G.removeAllListeners&&G.removeAllListeners()},w.style=function(G){var $=G._fullLayout._visibleModules,J=[],X;for(X=0;X<$.length;X++){var oe=$[X];oe.style&&a.pushUnique(J,oe.style)}for(X=0;X<J.length;X++)J[X](G)},w.sanitizeMargins=function(G){if(!(!G||!G.margin)){var $=G.width,J=G.height,X=G.margin,oe=$-(X.l+X.r),ie=J-(X.t+X.b),j;oe<0&&(j=($-1)/(X.l+X.r),X.l=Math.floor(j*X.l),X.r=Math.floor(j*X.r)),ie<0&&(j=(J-1)/(X.t+X.b),X.t=Math.floor(j*X.t),X.b=Math.floor(j*X.b))}},w.clearAutoMarginIds=function(G){G._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(G,$){G._fullLayout._pushmarginIds[$]=1};function F(G){var $=G.margin;if(!G._size){var J=G._size={l:Math.round($.l),r:Math.round($.r),t:Math.round($.t),b:Math.round($.b),p:Math.round($.pad)};J.w=Math.round(G.width)-J.l-J.r,J.h=Math.round(G.height)-J.t-J.b}G._pushmargin||(G._pushmargin={}),G._pushmarginIds||(G._pushmarginIds={}),G._reservedMargin||(G._reservedMargin={})}var B=2,O=2;w.autoMargin=function(G,$,J){var X=G._fullLayout,oe=X.width,ie=X.height,j=X.margin,ee=X.minreducedwidth,re=X.minreducedheight,ce=a.constrain(oe-j.l-j.r,B,ee),be=a.constrain(ie-j.t-j.b,O,re),Ae=Math.max(0,oe-ce),ze=Math.max(0,ie-be),Re=X._pushmargin,Xe=X._pushmarginIds;if(j.autoexpand!==!1){if(!J)delete Re[$],delete Xe[$];else{var it=J.pad;if(it===void 0&&(it=Math.min(12,j.l,j.r,j.t,j.b)),Ae){var ot=(J.l+J.r)/Ae;ot>1&&(J.l/=ot,J.r/=ot)}if(ze){var tt=(J.t+J.b)/ze;tt>1&&(J.t/=tt,J.b/=tt)}var lt=J.xl!==void 0?J.xl:J.x,Ee=J.xr!==void 0?J.xr:J.x,_e=J.yt!==void 0?J.yt:J.y,fe=J.yb!==void 0?J.yb:J.y;Re[$]={l:{val:lt,size:J.l+it},r:{val:Ee,size:J.r+it},b:{val:fe,size:J.b+it},t:{val:_e,size:J.t+it}},Xe[$]=1}if(!X._replotting)return w.doAutoMargin(G)}};function I(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var $=s.list(G,"",!0);for(var J in $)if($[J].autoshift||$[J].shift)return!0;return!1}w.doAutoMargin=function(G){var $=G._fullLayout,J=$.width,X=$.height;$._size||($._size={}),F($);var oe=$._size,ie=$.margin,j={t:0,b:0,l:0,r:0},ee=a.extendFlat({},oe),re=ie.l,ce=ie.r,be=ie.t,Ae=ie.b,ze=$._pushmargin,Re=$._pushmarginIds,Xe=$.minreducedwidth,it=$.minreducedheight;if(ie.autoexpand!==!1){for(var ot in ze)Re[ot]||delete ze[ot];var tt=G._fullLayout._reservedMargin;for(var lt in tt)for(var Ee in tt[lt]){var _e=tt[lt][Ee];j[Ee]=Math.max(j[Ee],_e)}ze.base={l:{val:0,size:re},r:{val:1,size:ce},t:{val:1,size:be},b:{val:0,size:Ae}};for(var fe in j){var Fe=0;for(var rt in ze)rt!=="base"&&M(ze[rt][fe].size)&&(Fe=ze[rt][fe].size>Fe?ze[rt][fe].size:Fe);var st=Math.max(0,ie[fe]-Fe);j[fe]=Math.max(0,j[fe]-st)}for(var Qe in ze){var Lt=ze[Qe].l||{},kt=ze[Qe].b||{},Vt=Lt.val,Zt=Lt.size,Sr=kt.val,xr=kt.size,jr=J-j.r-j.l,wr=X-j.t-j.b;for(var Ir in ze){if(M(Zt)&&ze[Ir].r){var bt=ze[Ir].r.val,Be=ze[Ir].r.size;if(bt>Vt){var Ke=(Zt*bt+(Be-jr)*Vt)/(bt-Vt),Ue=(Be*(1-Vt)+(Zt-jr)*(1-bt))/(bt-Vt);Ke+Ue>re+ce&&(re=Ke,ce=Ue)}}if(M(xr)&&ze[Ir].t){var Me=ze[Ir].t.val,qe=ze[Ir].t.size;if(Me>Sr){var Ce=(xr*Me+(qe-wr)*Sr)/(Me-Sr),Te=(qe*(1-Sr)+(xr-wr)*(1-Me))/(Me-Sr);Ce+Te>Ae+be&&(Ae=Ce,be=Te)}}}}}var Pe=a.constrain(J-ie.l-ie.r,B,Xe),at=a.constrain(X-ie.t-ie.b,O,it),yt=Math.max(0,J-Pe),Tt=Math.max(0,X-at);if(yt){var Ot=(re+ce)/yt;Ot>1&&(re/=Ot,ce/=Ot)}if(Tt){var Gt=(Ae+be)/Tt;Gt>1&&(Ae/=Gt,be/=Gt)}if(oe.l=Math.round(re)+j.l,oe.r=Math.round(ce)+j.r,oe.t=Math.round(be)+j.t,oe.b=Math.round(Ae)+j.b,oe.p=Math.round(ie.pad),oe.w=Math.round(J)-oe.l-oe.r,oe.h=Math.round(X)-oe.t-oe.b,!$._replotting&&(w.didMarginChange(ee,oe)||I(G))){"_redrawFromAutoMarginCount"in $?$._redrawFromAutoMarginCount++:$._redrawFromAutoMarginCount=1;var rr=3*(1+Object.keys(Re).length);if($._redrawFromAutoMarginCount<rr)return t.call("_doPlot",G);$._size=ee,a.warn("Too many auto-margin redraws.")}N(G)};function N(G){var $=s.list(G,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(J){for(var X=0;X<$.length;X++){var oe=$[X][J];oe&&oe()}})}var U=["l","r","t","b","p","w","h"];w.didMarginChange=function(G,$){for(var J=0;J<U.length;J++){var X=U[J],oe=G[X],ie=$[X];if(!M(oe)||Math.abs(ie-oe)>1)return!0}return!1},w.graphJson=function(G,$,J,X,oe,ie){(oe&&$&&!G._fullData||oe&&!$&&!G._fullLayout)&&w.supplyDefaults(G);var j=oe?G._fullData:G.data,ee=oe?G._fullLayout:G.layout,re=(G._transitionData||{})._frames;function ce(ze,Re){if(typeof ze=="function")return Re?"_function_":null;if(a.isPlainObject(ze)){var Xe={},it;return Object.keys(ze).sort().forEach(function(Ee){if(["_","["].indexOf(Ee.charAt(0))===-1){if(typeof ze[Ee]=="function"){Re&&(Xe[Ee]="_function");return}if(J==="keepdata"){if(Ee.substr(Ee.length-3)==="src")return}else if(J==="keepstream"){if(it=ze[Ee+"src"],typeof it=="string"&&it.indexOf(":")>0&&!a.isPlainObject(ze.stream))return}else if(J!=="keepall"&&(it=ze[Ee+"src"],typeof it=="string"&&it.indexOf(":")>0))return;Xe[Ee]=ce(ze[Ee],Re)}}),Xe}var ot=Array.isArray(ze),tt=a.isTypedArray(ze);if((ot||tt)&&ze.dtype&&ze.shape){var lt=ze.bdata;return ce({dtype:ze.dtype,shape:ze.shape,bdata:a.isArrayBuffer(lt)?e.encode(lt):lt},Re)}return ot?ze.map(function(Ee){return ce(Ee,Re)}):tt?a.simpleMap(ze,a.identity):a.isJSDate(ze)?a.ms2DateTimeLocal(+ze):ze}var be={data:(j||[]).map(function(ze){var Re=ce(ze);return $&&delete Re.fit,Re})};if(!$&&(be.layout=ce(ee),oe)){var Ae=ee._size;be.layout.computed={margin:{b:Ae.b,l:Ae.l,r:Ae.r,t:Ae.t}}}return re&&(be.frames=ce(re)),ie&&(be.config=ce(G._context,!0)),X==="object"?be:JSON.stringify(be)},w.modifyFrames=function(G,$){var J,X,oe,ie=G._transitionData._frames,j=G._transitionData._frameHash;for(J=0;J<$.length;J++)switch(X=$[J],X.type){case"replace":oe=X.value;var ee=(ie[X.index]||{}).name,re=oe.name;ie[X.index]=j[re]=oe,re!==ee&&(delete j[ee],j[re]=oe);break;case"insert":oe=X.value,j[oe.name]=oe,ie.splice(X.index,0,oe);break;case"delete":oe=ie[X.index],delete j[oe.name],ie.splice(X.index,1);break}return Promise.resolve()},w.computeFrame=function(G,$){var J=G._transitionData._frameHash,X,oe,ie,j;if(!$)throw new Error("computeFrame must be given a string frame name");var ee=J[$.toString()];if(!ee)return!1;for(var re=[ee],ce=[ee.name];ee.baseframe&&(ee=J[ee.baseframe.toString()])&&ce.indexOf(ee.name)===-1;)re.push(ee),ce.push(ee.name);for(var be={};ee=re.pop();)if(ee.layout&&(be.layout=w.extendLayout(be.layout,ee.layout)),ee.data){if(be.data||(be.data=[]),oe=ee.traces,!oe)for(oe=[],X=0;X<ee.data.length;X++)oe[X]=X;for(be.traces||(be.traces=[]),X=0;X<ee.data.length;X++)ie=oe[X],ie!=null&&(j=be.traces.indexOf(ie),j===-1&&(j=be.data.length,be.traces[j]=ie),be.data[j]=w.extendTrace(be.data[j],ee.data[X]))}return be},w.recomputeFrameHash=function(G){for(var $=G._transitionData._frameHash={},J=G._transitionData._frames,X=0;X<J.length;X++){var oe=J[X];oe&&oe.name&&($[oe.name]=oe)}},w.extendObjectWithContainers=function(G,$,J){var X,oe,ie,j,ee,re,ce,be,Ae=a.extendDeepNoArrays({},$||{}),ze=a.expandObjectPaths(Ae),Re={};if(J&&J.length)for(ie=0;ie<J.length;ie++)X=a.nestedProperty(ze,J[ie]),oe=X.get(),oe===void 0?a.nestedProperty(Re,J[ie]).set(null):(X.set(null),a.nestedProperty(Re,J[ie]).set(oe));if(G=a.extendDeepNoArrays(G||{},ze),J&&J.length){for(ie=0;ie<J.length;ie++)if(ee=a.nestedProperty(Re,J[ie]),ce=ee.get(),!!ce){for(re=a.nestedProperty(G,J[ie]),be=re.get(),Array.isArray(be)||(be=[],re.set(be)),j=0;j<ce.length;j++){var Xe=ce[j];Xe===null?be[j]=null:be[j]=w.extendObjectWithContainers(be[j],Xe)}re.set(be)}}return G},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=t.layoutArrayContainers,w.extendTrace=function(G,$){return w.extendObjectWithContainers(G,$,w.dataArrayContainers)},w.extendLayout=function(G,$){return w.extendObjectWithContainers(G,$,w.layoutArrayContainers)},w.transition=function(G,$,J,X,oe,ie){var j={redraw:oe.redraw},ee={},re=[];return j.prepareFn=function(){for(var ce=Array.isArray($)?$.length:0,be=X.slice(0,ce),Ae=0;Ae<be.length;Ae++){var ze=be[Ae],Re=G._fullData[ze],Xe=Re._module;if(Xe){if(Xe.animatable){var it=Xe.basePlotModule.name;ee[it]||(ee[it]=[]),ee[it].push(ze)}G.data[be[Ae]]=w.extendTrace(G.data[be[Ae]],$[Ae])}}var ot=a.expandObjectPaths(a.extendDeepNoArrays({},J)),tt=/^[xy]axis[0-9]*$/;for(var lt in ot)tt.test(lt)&&delete ot[lt].range;w.extendLayout(G.layout,ot),delete G.calcdata,w.supplyDefaults(G),w.doCalcdata(G);var Ee=a.expandObjectPaths(J);if(Ee){var _e=G._fullLayout._plots;for(var fe in _e){var Fe=_e[fe],rt=Fe.xaxis,st=Fe.yaxis,Qe=rt.range.slice(),Lt=st.range.slice(),kt=null,Vt=null,Zt=null,Sr=null;Array.isArray(Ee[rt._name+".range"])?kt=Ee[rt._name+".range"].slice():Array.isArray((Ee[rt._name]||{}).range)&&(kt=Ee[rt._name].range.slice()),Array.isArray(Ee[st._name+".range"])?Vt=Ee[st._name+".range"].slice():Array.isArray((Ee[st._name]||{}).range)&&(Vt=Ee[st._name].range.slice()),Qe&&kt&&(rt.r2l(Qe[0])!==rt.r2l(kt[0])||rt.r2l(Qe[1])!==rt.r2l(kt[1]))&&(Zt={xr0:Qe,xr1:kt}),Lt&&Vt&&(st.r2l(Lt[0])!==st.r2l(Vt[0])||st.r2l(Lt[1])!==st.r2l(Vt[1]))&&(Sr={yr0:Lt,yr1:Vt}),(Zt||Sr)&&re.push(a.extendFlat({plotinfo:Fe},Zt,Sr))}}return Promise.resolve()},j.runFn=function(ce){var be,Ae=G._fullLayout._basePlotModules,ze=re.length,Re;if(J)for(Re=0;Re<Ae.length;Re++)Ae[Re].transitionAxes&&Ae[Re].transitionAxes(G,re,ie,ce);ze?(be=a.extendFlat({},ie),be.duration=0,delete ee.cartesian):be=ie;for(var Xe in ee){var it=ee[Xe],ot=G._fullData[it[0]]._module;ot.basePlotModule.plot(G,it,be,ce)}},W(G,ie,j)},w.transitionFromReact=function(G,$,J,X){var oe=G._fullLayout,ie=oe.transition,j={},ee=[];return j.prepareFn=function(){var re=oe._plots;j.redraw=!1,$.anim==="some"&&(j.redraw=!0),J.anim==="some"&&(j.redraw=!0);for(var ce in re){var be=re[ce],Ae=be.xaxis,ze=be.yaxis,Re=X[Ae._name].range.slice(),Xe=X[ze._name].range.slice(),it=Ae.range.slice(),ot=ze.range.slice();Ae.setScale(),ze.setScale();var tt=null,lt=null;(Ae.r2l(Re[0])!==Ae.r2l(it[0])||Ae.r2l(Re[1])!==Ae.r2l(it[1]))&&(tt={xr0:Re,xr1:it}),(ze.r2l(Xe[0])!==ze.r2l(ot[0])||ze.r2l(Xe[1])!==ze.r2l(ot[1]))&&(lt={yr0:Xe,yr1:ot}),(tt||lt)&&ee.push(a.extendFlat({plotinfo:be},tt,lt))}return Promise.resolve()},j.runFn=function(re){for(var ce=G._fullData,be=G._fullLayout,Ae=be._basePlotModules,ze,Re,Xe,it=[],ot=0;ot<ce.length;ot++)it.push(ot);function tt(){if(G._fullLayout)for(var Ee=0;Ee<Ae.length;Ee++)Ae[Ee].transitionAxes&&Ae[Ee].transitionAxes(G,ee,ze,re)}function lt(){if(G._fullLayout)for(var Ee=0;Ee<Ae.length;Ee++)Ae[Ee].plot(G,Xe,Re,re)}ee.length&&$.anim?ie.ordering==="traces first"?(ze=a.extendFlat({},ie,{duration:0}),Xe=it,Re=ie,setTimeout(tt,ie.duration),lt()):(ze=ie,Xe=null,Re=a.extendFlat({},ie,{duration:0}),setTimeout(lt,ze.duration),tt()):ee.length?(ze=ie,tt()):$.anim&&(Xe=it,Re=ie,lt())},W(G,ie,j)};function W(G,$,J){var X=!1;function oe(Ae){var ze=Promise.resolve();if(!Ae)return ze;for(;Ae.length;)ze=ze.then(Ae.shift());return ze}function ie(Ae){if(Ae)for(;Ae.length;)Ae.shift()}function j(){return G.emit("plotly_transitioning",[]),new Promise(function(Ae){G._transitioning=!0,$.duration>0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){X=!0}),J.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var ze=0,Re=0;function Xe(){return ze++,function(){Re++,!X&&Re===ze&&ee(Ae)}}J.runFn(Xe),setTimeout(Xe())})}function ee(Ae){if(G._transitionData)return ie(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(J.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(Ae)}function re(){if(G._transitionData)return G._transitioning=!1,oe(G._transitionData._interruptCallbacks)}var ce=[w.previousPromises,re,J.prepareFn,w.rehover,w.reselect,j],be=a.syncOrAsync(ce,G);return(!be||!be.then)&&(be=Promise.resolve()),be.then(function(){return G})}w.doCalcdata=function(G,$){var J=s.list(G),X=G._fullData,oe=G._fullLayout,ie,j,ee,re,ce=new Array(X.length),be=(G.calcdata||[]).slice();for(G.calcdata=ce,oe._numBoxes=0,oe._numViolins=0,oe._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,oe._piecolormap={},oe._sunburstcolormap={},oe._treemapcolormap={},oe._iciclecolormap={},oe._funnelareacolormap={},ee=0;ee<X.length;ee++)if(Array.isArray($)&&$.indexOf(ee)===-1){ce[ee]=be[ee];continue}for(ee=0;ee<X.length;ee++)ie=X[ee],ie._arrayAttrs=r.findArrayAttributes(ie),ie._extremes={};var Ae=oe._subplots.polar||[];for(ee=0;ee<Ae.length;ee++)J.push(oe[Ae[ee]].radialaxis,oe[Ae[ee]].angularaxis);for(var ze in oe._colorAxes){var Re=oe[ze];Re.cauto!==!1&&(delete Re.cmin,delete Re.cmax)}var Xe=!1;function it(lt){if(ie=X[lt],j=ie._module,ie.visible===!0&&ie.transforms){if(j&&j.calc){var Ee=j.calc(G,ie);Ee[0]&&Ee[0].t&&Ee[0].t._scene&&delete Ee[0].t._scene.dirty}for(re=0;re<ie.transforms.length;re++){var _e=ie.transforms[re];j=transformsRegistry[_e.type],j&&j.calcTransform&&(ie._hasCalcTransform=!0,Xe=!0,j.calcTransform(G,ie,_e))}}}function ot(lt,Ee){if(ie=X[lt],j=ie._module,!!j.isContainer===Ee){var _e=[];if(ie.visible===!0&&ie._length!==0){delete ie._indexToPoints;var fe=ie.transforms||[];for(re=fe.length-1;re>=0;re--)if(fe[re].enabled){ie._indexToPoints=fe[re]._indexToPoints;break}j&&j.calc&&(_e=j.calc(G,ie))}(!Array.isArray(_e)||!_e[0])&&(_e=[{x:n,y:n}]),_e[0].t||(_e[0].t={}),_e[0].trace=ie,ce[lt]=_e}}for(le(J,X,oe),ee=0;ee<X.length;ee++)ot(ee,!0);for(ee=0;ee<X.length;ee++)it(ee);for(Xe&&le(J,X,oe),ee=0;ee<X.length;ee++)ot(ee,!0);for(ee=0;ee<X.length;ee++)ot(ee,!1);he(G);var tt=ue(J,G);if(tt.length){for(oe._numBoxes=0,oe._numViolins=0,ee=0;ee<tt.length;ee++)ot(tt[ee],!0);for(ee=0;ee<tt.length;ee++)ot(tt[ee],!1);he(G)}t.getComponentMethod("fx","calc")(G),t.getComponentMethod("errorbars","calc")(G)};var Q=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function ue(G,$){var J=[],X,oe,ie,j,ee;function re(Ir,bt,Be){var Ke=bt._id.charAt(0);if(Ir==="histogram2dcontour"){var Ue=bt._counterAxes[0],Me=s.getFromId($,Ue),qe=Ke==="x"||Ue==="x"&&Me.type==="category",Ce=Ke==="y"||Ue==="y"&&Me.type==="category";return function(Te,Pe){return Te===0||Pe===0||qe&&Te===Be[Pe].length-1||Ce&&Pe===Be.length-1?-1:(Ke==="y"?Pe:Te)-1}}else return function(Te,Pe){return Ke==="y"?Pe:Te}}var ce={min:function(Ir){return a.aggNums(Math.min,null,Ir)},max:function(Ir){return a.aggNums(Math.max,null,Ir)},sum:function(Ir){return a.aggNums(function(bt,Be){return bt+Be},null,Ir)},total:function(Ir){return a.aggNums(function(bt,Be){return bt+Be},null,Ir)},mean:function(Ir){return a.mean(Ir)},"geometric mean":function(Ir){return a.geometricMean(Ir)},median:function(Ir){return a.median(Ir)}};function be(Ir,bt){return Ir[1]-bt[1]}function Ae(Ir,bt){return bt[1]-Ir[1]}for(X=0;X<G.length;X++){var ze=G[X];if(ze.type==="category"){var Re=ze.categoryorder.match(Q);if(Re){var Xe=Re[1],it=Re[2],ot=ze._id.charAt(0),tt=ot==="x",lt=[];for(oe=0;oe<ze._categories.length;oe++)lt.push([ze._categories[oe],[]]);for(oe=0;oe<ze._traceIndices.length;oe++){var Ee=ze._traceIndices[oe],_e=$._fullData[Ee];if(_e.visible===!0){var fe=_e.type;t.traceIs(_e,"histogram")&&(delete _e._xautoBinFinished,delete _e._yautoBinFinished);var Fe=fe==="splom",rt=fe==="scattergl",st=$.calcdata[Ee];for(ie=0;ie<st.length;ie++){var Qe=st[ie],Lt,kt;if(Fe){var Vt=_e._axesDim[ze._id];if(!tt){var Zt=_e._diag[Vt][0];Zt&&(ze=$._fullLayout[s.id2name(Zt)])}var Sr=Qe.trace.dimensions[Vt].values;for(j=0;j<Sr.length;j++)for(Lt=ze._categoriesMap[Sr[j]],ee=0;ee<Qe.trace.dimensions.length;ee++)if(ee!==Vt){var xr=Qe.trace.dimensions[ee];lt[Lt][1].push(xr.values[j])}}else if(rt){for(j=0;j<Qe.t.x.length;j++)tt?(Lt=Qe.t.x[j],kt=Qe.t.y[j]):(Lt=Qe.t.y[j],kt=Qe.t.x[j]),lt[Lt][1].push(kt);Qe.t&&Qe.t._scene&&delete Qe.t._scene.dirty}else if(Qe.hasOwnProperty("z")){kt=Qe.z;var jr=re(_e.type,ze,kt);for(j=0;j<kt.length;j++)for(ee=0;ee<kt[j].length;ee++)Lt=jr(ee,j),Lt+1&&lt[Lt][1].push(kt[j][ee])}else for(Lt=Qe.p,Lt===void 0&&(Lt=Qe[ot]),kt=Qe.s,kt===void 0&&(kt=Qe.v),kt===void 0&&(kt=tt?Qe.y:Qe.x),Array.isArray(kt)||(kt===void 0?kt=[]:kt=[kt]),j=0;j<kt.length;j++)lt[Lt][1].push(kt[j])}}}ze._categoriesValue=lt;var wr=[];for(oe=0;oe<lt.length;oe++)wr.push([lt[oe][0],ce[Xe](lt[oe][1])]);wr.sort(it==="descending"?Ae:be),ze._categoriesAggregatedValue=wr,ze._initialCategories=wr.map(function(Ir){return Ir[0]}),J=J.concat(ze.sortByInitialCategories())}}}return J}function le(G,$,J){var X={};function oe(re){re.clearCalc(),re.type==="multicategory"&&re.setupMultiCategory($),X[re._id]=1}a.simpleMap(G,oe);for(var ie=J._axisMatchGroups||[],j=0;j<ie.length;j++)for(var ee in ie[j])X[ee]||oe(J[s.id2name(ee)])}function he(G){var $=G._fullLayout,J=$._visibleModules,X={},oe,ie,j;for(ie=0;ie<J.length;ie++){var ee=J[ie],re=ee.crossTraceCalc;if(re){var ce=ee.basePlotModule.name;X[ce]?a.pushUnique(X[ce],re):X[ce]=[re]}}for(j in X){var be=X[j],Ae=$._subplots[j];if(Array.isArray(Ae))for(oe=0;oe<Ae.length;oe++){var ze=Ae[oe],Re=j==="cartesian"?$._plots[ze]:$[ze];for(ie=0;ie<be.length;ie++)be[ie](G,Re,ze)}else for(ie=0;ie<be.length;ie++)be[ie](G)}}w.rehover=function(G){G._fullLayout._rehover&&G._fullLayout._rehover()},w.redrag=function(G){G._fullLayout._redrag&&G._fullLayout._redrag()},w.reselect=function(G){var $=G._fullLayout,J=(G.layout||{}).selections,X=$._previousSelections;$._previousSelections=J;var oe=$._reselect||JSON.stringify(J)!==JSON.stringify(X);t.getComponentMethod("selections","reselect")(G,oe)},w.generalUpdatePerTraceModule=function(G,$,J,X){var oe=$.traceHash,ie={},j;for(j=0;j<J.length;j++){var ee=J[j],re=ee[0].trace;re.visible&&(ie[re.type]=ie[re.type]||[],ie[re.type].push(ee))}for(var ce in oe)if(!ie[ce]){var be=oe[ce][0],Ae=be[0].trace;Ae.visible=!1,ie[ce]=[be]}for(var ze in ie){var Re=ie[ze],Xe=Re[0][0].trace._module;Xe.plot(G,$,a.filterVisible(Re),X)}$.traceHash=ie},w.plotBasePlot=function(G,$,J,X,oe){var ie=t.getModule(G),j=T($.calcdata,ie)[0];ie.plot($,j,X,oe)},w.cleanBasePlot=function(G,$,J,X,oe){var ie=oe._has&&oe._has(G),j=J._has&&J._has(G);ie&&!j&&oe["_"+G+"layer"].selectAll("g.trace").remove()}}}),vd=Ze({"src/constants/xmlns_namespaces.js"(Z){"use strict";Z.xmlns="http://www.w3.org/2000/xmlns/",Z.svg="http://www.w3.org/2000/svg",Z.xlink="http://www.w3.org/1999/xlink",Z.svgAttrs={xmlns:Z.svg,"xmlns:xlink":Z.xlink}}}),mh=Ze({"src/constants/alignment.js"(Z,q){"use strict";q.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"}}}}),fu=Ze({"src/lib/svg_text_utils.js"(Z){"use strict";var q=On(),d=ca(),x=d.strTranslate,A=vd(),M=mh().LINE_SPACING,e=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Z.convertToTspans=function(O,I,N){var U=O.text(),W=!O.attr("data-notex")&&I&&I._context.typesetMath&&typeof MathJax<"u"&&U.match(e),Q=q.select(O.node().parentNode);if(Q.empty())return;var ue=O.attr("class")?O.attr("class").split(" ")[0]:"text";ue+="-math",Q.selectAll("svg."+ue).remove(),Q.selectAll("g."+ue+"-group").remove(),O.style("display",null).attr({"data-unformatted":U,"data-math":"N"});function le(){Q.empty()||(ue=O.attr("class")+"-math",Q.select("svg."+ue).remove()),O.text("").style("white-space","pre");var he=L(O.node(),U);he&&O.style("pointer-events","all"),Z.positionText(O),N&&N.call(O)}return W?(I&&I._promises||[]).push(new Promise(function(he){O.style("display","none");var G=parseInt(O.node().style.fontSize,10),$={fontSize:G};i(W[2],$,function(J,X,oe){Q.selectAll("svg."+ue).remove(),Q.selectAll("g."+ue+"-group").remove();var ie=J&&J.select("svg");if(!ie||!ie.node()){le(),he();return}var j=Q.append("g").classed(ue+"-group",!0).attr({"pointer-events":"none","data-unformatted":U,"data-math":"Y"});j.node().appendChild(ie.node()),X&&X.node()&&ie.node().insertBefore(X.node().cloneNode(!0),ie.node().firstChild);var ee=oe.width,re=oe.height;ie.attr({class:ue,height:re,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ce=O.node().style.fill||"black",be=ie.select("g");be.attr({fill:ce,stroke:ce});var Ae=be.node().getBoundingClientRect(),ze=Ae.width,Re=Ae.height;(ze>ee||Re>re)&&(ie.style("overflow","hidden"),Ae=ie.node().getBoundingClientRect(),ze=Ae.width,Re=Ae.height);var Xe=+O.attr("x"),it=+O.attr("y"),ot=G||O.node().getBoundingClientRect().height,tt=-ot/4;if(ue[0]==="y")j.attr({transform:"rotate("+[-90,Xe,it]+")"+x(-ze/2,tt-Re/2)});else if(ue[0]==="l")it=tt-Re/2;else if(ue[0]==="a"&&ue.indexOf("atitle")!==0)Xe=0,it=tt;else{var lt=O.attr("text-anchor");Xe=Xe-ze*(lt==="middle"?.5:lt==="end"?1:0),it=it+tt-Re/2}ie.attr({x:Xe,y:it}),N&&N.call(O,j),he(j)})})):le(),O};var t=/(<|&lt;|&#60;)/g,r=/(>|&gt;|&#62;)/g;function o(O){return O.replace(t,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function i(O,I,N){var U=parseInt((MathJax.version||"").split(".")[0]);if(U!==2&&U!==3){d.warn("No MathJax version:",MathJax.version);return}var W,Q,ue,le,he=function(){return Q=d.extendDeepAll({},MathJax.Hub.config),ue=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},G=function(){Q=d.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},$=function(){if(W=MathJax.Hub.config.menuSettings.renderer,W!=="SVG")return MathJax.Hub.setRenderer("SVG")},J=function(){W=MathJax.config.startup.output,W!=="svg"&&(MathJax.config.startup.output="svg")},X=function(){var ce="math-output-"+d.randstr({},64);le=q.select("body").append("div").attr({id:ce}).style({visibility:"hidden",position:"absolute","font-size":I.fontSize+"px"}).text(o(O));var be=le.node();return U===2?MathJax.Hub.Typeset(be):MathJax.typeset([be])},oe=function(){var ce=le.select(U===2?".MathJax_SVG":".MathJax"),be=!ce.empty()&&le.select("svg").node();if(!be)d.log("There was an error in the tex syntax.",O),N();else{var Ae=be.getBoundingClientRect(),ze;U===2?ze=q.select("body").select("#MathJax_SVG_glyphs"):ze=ce.select("defs"),N(ce,ze,Ae)}le.remove()},ie=function(){if(W!=="SVG")return MathJax.Hub.setRenderer(W)},j=function(){W!=="svg"&&(MathJax.config.startup.output=W)},ee=function(){return ue!==void 0&&(MathJax.Hub.processSectionDelay=ue),MathJax.Hub.Config(Q)},re=function(){MathJax.config=Q};U===2?MathJax.Hub.Queue(he,$,X,oe,ie,ee):U===3&&(G(),J(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){X(),oe(),j(),re()}))}var n={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"},s={sub:"0.3em",sup:"-0.6em"},c={sub:"-0.21em",sup:"0.42em"},f="\u200B",g=["http:","https:","mailto:","",void 0,":"],v=Z.NEWLINES=/(\r\n?|\n)/g,T=/(<[^<>]*>)/,l=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=/<br(\s+.*)?>/i;Z.BR_TAG_ALL=/<br(\s+.*)?>/gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,S=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function b(O,I){if(!O)return null;var N=O.match(I),U=N&&(N[3]||N[4]);return U&&h(U)}var p=/(^|;)\s*color:/;Z.plainText=function(O,I){I=I||{};for(var N=I.len!==void 0&&I.len!==-1?I.len:1/0,U=I.allowedTags!==void 0?I.allowedTags:["br"],W="...",Q=W.length,ue=O.split(T),le=[],he="",G=0,$=0;$<ue.length;$++){var J=ue[$],X=J.match(l),oe=X&&X[2].toLowerCase();if(oe)U.indexOf(oe)!==-1&&(le.push(J),he=oe);else{var ie=J.length;if(G+ie<N)le.push(J),G+=ie;else if(G<N){var j=N-G;he&&(he!=="br"||j<=Q||ie<=Q)&&le.pop(),N>Q?le.push(J.substr(0,j-Q)+W):le.push(J.substr(0,j));break}he=""}}return le.join("")};var u={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},m=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function h(O){return O.replace(m,function(I,N){var U;return N.charAt(0)==="#"?U=P(N.charAt(1)==="x"?parseInt(N.substr(2),16):parseInt(N.substr(1),10)):U=u[N],U||I})}Z.convertEntities=h;function P(O){if(!(O>1114111)){var I=String.fromCodePoint;if(I)return I(O);var N=String.fromCharCode;return O<=65535?N(O):N((O>>10)+55232,O%1024+56320)}}function L(O,I){I=I.replace(v," ");var N=!1,U=[],W,Q=-1;function ue(){Q++;var Re=document.createElementNS(A.svg,"tspan");q.select(Re).attr({class:"line",dy:Q*M+"em"}),O.appendChild(Re),W=Re;var Xe=U;if(U=[{node:Re}],Xe.length>1)for(var it=1;it<Xe.length;it++)le(Xe[it])}function le(Re){var Xe=Re.type,it={},ot;if(Xe==="a"){ot="a";var tt=Re.target,lt=Re.href,Ee=Re.popup;lt&&(it={"xlink:xlink:show":tt==="_blank"||tt.charAt(0)!=="_"?"new":"replace",target:tt,"xlink:xlink:href":lt},Ee&&(it.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Ee+'");return false;'))}else ot="tspan";Re.style&&(it.style=Re.style);var _e=document.createElementNS(A.svg,ot);if(Xe==="sup"||Xe==="sub"){he(W,f),W.appendChild(_e);var fe=document.createElementNS(A.svg,"tspan");he(fe,f),q.select(fe).attr("dy",c[Xe]),it.dy=s[Xe],W.appendChild(_e),W.appendChild(fe)}else W.appendChild(_e);q.select(_e).attr(it),W=Re.node=_e,U.push(Re)}function he(Re,Xe){Re.appendChild(document.createTextNode(Xe))}function G(Re){if(U.length===1){d.log("Ignoring unexpected end tag </"+Re+">.",I);return}var Xe=U.pop();Re!==Xe.type&&d.log("Start tag <"+Xe.type+"> doesnt match end tag <"+Re+">. Pretending it did match.",I),W=U[U.length-1].node}var $=_.test(I);$?ue():(W=O,U=[{node:O}]);for(var J=I.split(T),X=0;X<J.length;X++){var oe=J[X],ie=oe.match(l),j=ie&&ie[2].toLowerCase(),ee=n[j];if(j==="br")ue();else if(ee===void 0)he(W,h(oe));else if(ie[1])G(j);else{var re=ie[4],ce={type:j},be=b(re,w);if(be?(be=be.replace(p,"$1 fill:"),ee&&(be+=";"+ee)):ee&&(be=ee),be&&(ce.style=be),j==="a"){N=!0;var Ae=b(re,S);if(Ae){var ze=z(Ae);ze&&(ce.href=ze,ce.target=b(re,E)||"_blank",ce.popup=b(re,y))}}le(ce)}}return N}function z(O){var I=encodeURI(decodeURI(O)),N=document.createElement("a"),U=document.createElement("a");N.href=O,U.href=I;var W=N.protocol,Q=U.protocol;return g.indexOf(W)!==-1&&g.indexOf(Q)!==-1?I:""}Z.sanitizeHTML=function(I){I=I.replace(v," ");for(var N=document.createElement("p"),U=N,W=[],Q=I.split(T),ue=0;ue<Q.length;ue++){var le=Q[ue],he=le.match(l),G=he&&he[2].toLowerCase();if(G in n)if(he[1])W.length&&(U=W.pop());else{var $=he[4],J=b($,w),X=J?{style:J}:{};if(G==="a"){var oe=b($,S);if(oe){var ie=z(oe);if(ie){X.href=ie;var j=b($,E);j&&(X.target=j)}}}var ee=document.createElement(G);U.appendChild(ee),q.select(ee).attr(X),U=ee,W.push(ee)}else U.appendChild(document.createTextNode(h(le)))}var re="innerHTML";return N[re]},Z.lineCount=function(I){return I.selectAll("tspan.line").size()||1},Z.positionText=function(I,N,U){return I.each(function(){var W=q.select(this);function Q(he,G){return G===void 0?(G=W.attr(he),G===null&&(W.attr(he,0),G=0)):W.attr(he,G),G}var ue=Q("x",N),le=Q("y",U);this.nodeName==="text"&&W.selectAll("tspan.line").attr({x:ue,y:le})})};function F(O,I,N){var U=N.horizontalAlign,W=N.verticalAlign||"top",Q=O.node().getBoundingClientRect(),ue=I.node().getBoundingClientRect(),le,he,G;return W==="bottom"?he=function(){return Q.bottom-le.height}:W==="middle"?he=function(){return Q.top+(Q.height-le.height)/2}:he=function(){return Q.top},U==="right"?G=function(){return Q.right-le.width}:U==="center"?G=function(){return Q.left+(Q.width-le.width)/2}:G=function(){return Q.left},function(){le=this.node().getBoundingClientRect();var $=G()-ue.left,J=he()-ue.top,X=N.gd||{};if(N.gd){X._fullLayout._calcInverseTransform(X);var oe=d.apply3DTransform(X._fullLayout._invTransform)($,J);$=oe[0],J=oe[1]}return this.style({top:J+"px",left:$+"px","z-index":1e3}),this}}var B="1px ";Z.makeTextShadow=function(O){var I=B,N=B,U=B;return I+N+U+O+", -"+I+"-"+N+U+O+", "+I+"-"+N+U+O+", -"+I+N+U+O},Z.makeEditable=function(O,I){var N=I.gd,U=I.delegate,W=q.dispatch("edit","input","cancel"),Q=U||O;if(O.style({"pointer-events":U?"none":"all"}),O.size()!==1)throw new Error("boo");function ue(){he(),O.style({opacity:0});var G=Q.attr("class"),$;G?$="."+G.split(" ")[0]+"-math-group":$="[class*=-math-group]",$&&q.select(O.node().parentNode).select($).style({opacity:0})}function le(G){var $=G.node(),J=document.createRange();J.selectNodeContents($);var X=window.getSelection();X.removeAllRanges(),X.addRange(J),$.focus()}function he(){var G=q.select(N),$=G.select(".svg-container"),J=$.append("div"),X=O.node().style,oe=parseFloat(X.fontSize||12),ie=I.text;ie===void 0&&(ie=O.attr("data-unformatted")),J.classed("plugin-editable editable",!0).style({position:"absolute","font-family":X.fontFamily||"Arial","font-size":oe,color:I.fill||X.fill||"black",opacity:1,"background-color":I.background||"transparent",outline:"#ffffff33 1px solid",margin:[-oe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(ie).call(F(O,$,I)).on("blur",function(){N._editing=!1,O.text(this.textContent).style({opacity:1});var j=q.select(this).attr("class"),ee;j?ee="."+j.split(" ")[0]+"-math-group":ee="[class*=-math-group]",ee&&q.select(O.node().parentNode).select(ee).style({opacity:0});var re=this.textContent;q.select(this).transition().duration(0).remove(),q.select(document).on("mouseup",null),W.edit.call(O,re)}).on("focus",function(){var j=this;N._editing=!0,q.select(document).on("mouseup",function(){if(q.event.target===j)return!1;document.activeElement===J.node()&&J.node().blur()})}).on("keyup",function(){q.event.which===27?(N._editing=!1,O.style({opacity:1}),q.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),W.cancel.call(O,this.textContent)):(W.input.call(O,this.textContent),q.select(this).call(F(O,$,I)))}).on("keydown",function(){q.event.which===13&&this.blur()}).call(le)}return I.immediate?ue():Q.on("click",ue),q.rebind(O,W,"on")}}}),bp=Ze({"src/components/colorscale/helpers.js"(Z,q){"use strict";var d=On(),x=Ch(),A=ns(),M=ca(),e=Yn(),t=G0().isValid;function r(v,T,l){var _=T?M.nestedProperty(v,T).get()||{}:v,w=_[l||"color"];w&&w._inputArray&&(w=w._inputArray);var S=!1;if(M.isArrayOrTypedArray(w)){for(var E=0;E<w.length;E++)if(A(w[E])){S=!0;break}}return M.isPlainObject(_)&&(S||_.showscale===!0||A(_.cmin)&&A(_.cmax)||t(_.colorscale)||M.isPlainObject(_.colorbar))}var o=["showscale","autocolorscale","colorscale","reversescale","colorbar"],a=["min","max","mid","auto"];function i(v){var T=v._colorAx,l=T||v,_={},w,S,E;for(S=0;S<o.length;S++)E=o[S],_[E]=l[E];if(T)for(w="c",S=0;S<a.length;S++)E=a[S],_[E]=l["c"+E];else{var y;for(S=0;S<a.length;S++){if(E=a[S],y="c"+E,y in l){_[E]=l[y];continue}y="z"+E,y in l&&(_[E]=l[y])}w=y.charAt(0)}return _._sync=function(b,p){var u=a.indexOf(b)!==-1?w+b:b;l[u]=l["_"+u]=p},_}function n(v){for(var T=i(v),l=T.min,_=T.max,w=T.reversescale?s(T.colorscale):T.colorscale,S=w.length,E=new Array(S),y=new Array(S),b=0;b<S;b++){var p=w[b];E[b]=l+p[0]*(_-l),y[b]=p[1]}return{domain:E,range:y}}function s(v){for(var T=v.length,l=new Array(T),_=T-1,w=0;_>=0;_--,w++){var S=v[_];l[w]=[1-S[0],S[1]]}return l}function c(v,T){T=T||{};for(var l=v.domain,_=v.range,w=_.length,S=new Array(w),E=0;E<w;E++){var y=x(_[E]).toRgb();S[E]=[y.r,y.g,y.b,y.a]}var b=d.scale.linear().domain(l).range(S).clamp(!0),p=T.noNumericCheck,u=T.returnArray,m;return p&&u?m=b:p?m=function(h){return g(b(h))}:u?m=function(h){return A(h)?b(h):x(h).isValid()?h:e.defaultLine}:m=function(h){return A(h)?g(b(h)):x(h).isValid()?h:e.defaultLine},m.domain=b.domain,m.range=function(){return _},m}function f(v,T){return c(n(v),T)}function g(v){var T={r:v[0],g:v[1],b:v[2],a:v[3]};return x(T).toRgbString()}q.exports={hasColorscale:r,extractOpts:i,extractScale:n,flipScale:s,makeColorScaleFunc:c,makeColorScaleFuncFromTrace:f}}}),Qc=Ze({"src/plots/cartesian/axis_format_attributes.js"(Z,q){"use strict";var d=t5(),x=d.FORMAT_LINK,A=d.DATE_FORMAT_LINK;function M(r,o){return{valType:"string",dflt:"",editType:"none",description:(o?e:t)("hover text",r)+["By default the values are formatted using "+(o?"generic number format":"`"+r+"axis.hoverformat`")+"."].join(" ")}}function e(r,o){return["Sets the "+r+" formatting rule"+(o?"for `"+o+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+x+"."].join(" ")}function t(r,o){return e(r,o)+[" And for dates see: "+A+".","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(" ")}q.exports={axisHoverFormat:M,descriptionOnlyNumbers:e,descriptionWithDates:t}}}),Wh=Ze({"src/plots/cartesian/layout_attributes.js"(Z,q){"use strict";var d=tc(),x=oh(),A=Gh().dash,M=rs().extendFlat,e=Dl().templatedArray,t=Cs().templateFormatStringDescription,r=Qc().descriptionWithDates,o=qs().ONEDAY,a=kh(),i=a.HOUR_PATTERN,n=a.WEEKDAY_PATTERN,s={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},c=M({},s,{values:s.values.slice().concat(["sync"])});function f(u){return{valType:"integer",min:0,dflt:u?5:0,editType:"ticks"}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},T={valType:"data_array",editType:"ticks"},l={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function _(u){var m={valType:"number",min:0,editType:"ticks"};return u||(m.dflt=5),m}function w(u){var m={valType:"number",min:0,editType:"ticks"};return u||(m.dflt=1),m}var S={valType:"color",dflt:x.defaultLine,editType:"ticks"},E={valType:"color",dflt:x.lightLine,editType:"ticks"};function y(u){var m={valType:"number",min:0,editType:"ticks"};return u||(m.dflt=1),m}var b=M({},A,{editType:"ticks"}),p={valType:"boolean",editType:"ticks"};q.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:x.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:d({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:[a.idRegex.x.toString(),a.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:[a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"calc"},rangebreaks:e("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:[n,i,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:o},editType:"calc"}),tickmode:c,nticks:f(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:T,ticktext:{valType:"data_array",editType:"ticks"},ticks:l,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:_(),tickwidth:w(),tickcolor:S,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:M({},A,{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:d({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:r("tick label")},tickformatstops:e("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:r("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:x.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:p,gridcolor:E,gridwidth:y(),griddash:b,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:x.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:x.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",a.idRegex.x.toString(),a.idRegex.y.toString()],editType:"plot"},minor:{tickmode:s,nticks:f("minor"),tick0:g,dtick:v,tickvals:T,ticks:l,ticklen:_("minor"),tickwidth:w("minor"),tickcolor:S,gridcolor:E,gridwidth:y("minor"),griddash:b,showgrid:p,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"}}}),_2=Ze({"src/components/colorbar/attributes.js"(Z,q){"use strict";var d=Wh(),x=tc(),A=rs().extendFlat,M=pc().overrideAll;q.exports=M({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:d.linecolor,outlinewidth:d.linewidth,bordercolor:d.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:d.minor.tickmode,nticks:d.nticks,tick0:d.tick0,dtick:d.dtick,tickvals:d.tickvals,ticktext:d.ticktext,ticks:A({},d.ticks,{dflt:""}),ticklabeloverflow:A({},d.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:d.ticklen,tickwidth:d.tickwidth,tickcolor:d.tickcolor,ticklabelstep:d.ticklabelstep,showticklabels:d.showticklabels,labelalias:d.labelalias,tickfont:x({}),tickangle:d.tickangle,tickformat:d.tickformat,tickformatstops:d.tickformatstops,tickprefix:d.tickprefix,showtickprefix:d.showtickprefix,ticksuffix:d.ticksuffix,showticksuffix:d.showticksuffix,separatethousands:d.separatethousands,exponentformat:d.exponentformat,minexponent:d.minexponent,showexponent:d.showexponent,title:{text:{valType:"string"},font:x({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}}),Mu=Ze({"src/components/colorscale/attributes.js"(Z,q){"use strict";var d=_2(),x=Jy().counter,A=Km(),M=G0().scales,e=A(M);function t(r){return"`"+r+"`"}q.exports=function(o,a){o=o||"",a=a||{};var i=a.cLetter||"c",n="onlyIfNumerical"in a?a.onlyIfNumerical:!!o,s="noScale"in a?a.noScale:o==="marker.line",c="showScaleDflt"in a?a.showScaleDflt:i==="z",f=typeof a.colorscaleDflt=="string"?M[a.colorscaleDflt]:null,g=a.editTypeOverride||"",v=o?o+".":"",T,l;"colorAttr"in a?(T=a.colorAttr,l=a.colorAttr):(T={z:"z",c:"color"}[i],l="in "+t(v+T));var _=n?" Has an effect only if "+l+" is set to a numerical array.":"",w=i+"auto",S=i+"min",E=i+"max",y=i+"mid",b=t(v+w),p=t(v+S),u=t(v+E),m=p+" and "+u,h={};h[S]=h[E]=void 0;var P={};P[w]=!1;var L={};return T==="color"&&(L.color={valType:"color",arrayOk:!0,editType:g||"style"},a.anim&&(L.color.anim=!0)),L[w]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:h},L[S]={valType:"number",dflt:null,editType:g||"plot",impliedEdits:P},L[E]={valType:"number",dflt:null,editType:g||"plot",impliedEdits:P},L[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:h},L.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1}},L.autocolorscale={valType:"boolean",dflt:a.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},L.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(L.showscale={valType:"boolean",dflt:c,editType:"calc"},L.colorbar=d),a.noColorAxis||(L.coloraxis={valType:"subplotid",regex:x("coloraxis"),dflt:null,editType:"calc"}),L}}}),o5=Ze({"src/components/colorscale/layout_attributes.js"(Z,q){"use strict";var d=rs().extendFlat,x=Mu(),A=G0().scales;q.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:A.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:A.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:A.RdBu,editType:"calc"}},coloraxis:d({_isSubplotObj:!0,editType:"calc"},x("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}}),s5=Ze({"src/components/colorbar/has_colorbar.js"(Z,q){"use strict";var d=ca();q.exports=function(A){return d.isPlainObject(A.colorbar)}}}),l5=Ze({"src/plots/cartesian/clean_ticks.js"(Z){"use strict";var q=ns(),d=ca(),x=qs(),A=x.ONEDAY,M=x.ONEWEEK;Z.dtick=function(e,t){var r=t==="log",o=t==="date",a=t==="category",i=o?A:1;if(!e)return i;if(q(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):o?Math.max(.1,e):e;if(typeof e!="string"||!(o||r))return i;var n=e.charAt(0),s=e.substr(1);return s=q(s)?Number(s):0,s<=0||!(o&&n==="M"&&s===Math.round(s)||r&&n==="L"||r&&n==="D"&&(s===1||s===2))?i:e},Z.tick0=function(e,t,r,o){if(t==="date")return d.cleanDate(e,d.dateTick0(r,o%M===0?1:0));if(!(o==="D1"||o==="D2"))return q(e)?Number(e):0}}}),X0=Ze({"src/plots/cartesian/tick_value_defaults.js"(Z,q){"use strict";var d=l5(),x=ca().isArrayOrTypedArray,A=xp().isTypedArraySpec,M=xp().decodeTypedArraySpec;q.exports=function(t,r,o,a,i){i||(i={});var n=i.isMinor,s=n?t.minor||{}:t,c=n?r.minor:r,f=n?"minor.":"";function g(y){var b=s[y];return A(b)&&(b=M(b)),b!==void 0?b:(c._template||{})[y]}var v=g("tick0"),T=g("dtick"),l=g("tickvals"),_=x(l)?"array":T?"linear":"auto",w=o(f+"tickmode",_);if(w==="auto"||w==="sync")o(f+"nticks");else if(w==="linear"){var S=c.dtick=d.dtick(T,a);c.tick0=d.tick0(v,a,r.calendar,S)}else if(a!=="multicategory"){var E=o(f+"tickvals");E===void 0?c.tickmode="auto":n||o("ticktext")}}}}),t1=Ze({"src/plots/cartesian/tick_mark_defaults.js"(Z,q){"use strict";var d=ca(),x=Wh();q.exports=function(M,e,t,r){var o=r.isMinor,a=o?M.minor||{}:M,i=o?e.minor:e,n=o?x.minor:x,s=o?"minor.":"",c=d.coerce2(a,i,n,"ticklen",o?(e.ticklen||5)*.6:void 0),f=d.coerce2(a,i,n,"tickwidth",o?e.tickwidth||1:void 0),g=d.coerce2(a,i,n,"tickcolor",(o?e.tickcolor:void 0)||i.color),v=t(s+"ticks",!o&&r.outerTicks||c||f||g?"outside":"");v||(delete i.ticklen,delete i.tickwidth,delete i.tickcolor)}}}),u5=Ze({"src/plots/cartesian/show_dflt.js"(Z,q){"use strict";q.exports=function(x){var A=["showexponent","showtickprefix","showticksuffix"],M=A.filter(function(t){return x[t]!==void 0}),e=function(t){return x[t]===x[M[0]]};if(M.every(e)||M.length===1)return x[M[0]]}}}),fp=Ze({"src/plots/array_container_defaults.js"(Z,q){"use strict";var d=ca(),x=Dl();q.exports=function(M,e,t){var r=t.name,o=t.inclusionAttr||"visible",a=e[r],i=d.isArrayOrTypedArray(M[r])?M[r]:[],n=e[r]=[],s=x.arrayTemplater(e,r,o),c,f;for(c=0;c<i.length;c++){var g=i[c];d.isPlainObject(g)?f=s.newItem(g):(f=s.newItem({}),f[o]=!1),f._index=c,f[o]!==!1&&t.handleItemDefaults(g,f,e,t),n.push(f)}var v=s.defaultItems();for(c=0;c<v.length;c++)f=v[c],f._index=n.length,t.handleItemDefaults({},f,e,t,{}),n.push(f);if(d.isArrayOrTypedArray(a)){var T=Math.min(a.length,n.length);for(c=0;c<T;c++)d.relinkPrivateKeys(n[c],a[c])}return n}}}),$m=Ze({"src/plots/cartesian/tick_label_defaults.js"(Z,q){"use strict";var d=ca(),x=Yn().contrast,A=Wh(),M=u5(),e=fp();q.exports=function(o,a,i,n,s){s||(s={});var c=i("labelalias");d.isPlainObject(c)||delete a.labelalias;var f=M(o),g=i("showticklabels");if(g){s.noTicklabelshift||i("ticklabelshift"),s.noTicklabelstandoff||i("ticklabelstandoff");var v=s.font||{},T=a.color,l=a.ticklabelposition||"",_=l.indexOf("inside")!==-1?x(s.bgColor):T&&T!==A.color.dflt?T:v.color;if(d.coerceFont(i,"tickfont",v,{overrideDflt:{color:_}}),!s.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&i("ticklabelstep"),!s.noAng){var w=i("tickangle");!s.noAutotickangles&&w==="auto"&&i("autotickangles")}if(n!=="category"){var S=i("tickformat");e(o,a,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:t}),a.tickformatstops.length||delete a.tickformatstops,!s.noExp&&!S&&n!=="date"&&(i("showexponent",f),i("exponentformat"),i("minexponent"),i("separatethousands"))}!s.noMinorloglabels&&n==="log"&&i("minorloglabels")}};function t(r,o){function a(n,s){return d.coerce(r,o,A.tickformatstops,n,s)}var i=a("enabled");i&&(a("dtickrange"),a("value"))}}}),Qm=Ze({"src/plots/cartesian/prefix_suffix_defaults.js"(Z,q){"use strict";var d=u5();q.exports=function(A,M,e,t,r){r||(r={});var o=r.tickSuffixDflt,a=d(A),i=e("tickprefix");i&&e("showtickprefix",a);var n=e("ticksuffix",o);n&&e("showticksuffix",a)}}}),c5=Ze({"src/components/colorbar/defaults.js"(Z,q){"use strict";var d=ca(),x=Dl(),A=X0(),M=t1(),e=$m(),t=Qm(),r=_2();q.exports=function(a,i,n){var s=x.newContainer(i,"colorbar"),c=a.colorbar||{};function f(I,N){return d.coerce(c,s,r,I,N)}var g=n.margin||{t:0,b:0,l:0,r:0},v=n.width-g.l-g.r,T=n.height-g.t-g.b,l=f("orientation"),_=l==="v",w=f("thicknessmode");f("thickness",w==="fraction"?30/(_?v:T):30);var S=f("lenmode");f("len",S==="fraction"?1:_?T:v);var E=f("yref"),y=f("xref"),b=E==="paper",p=y==="paper",u,m,h,P="left";_?(h="middle",P=p?"left":"right",u=p?1.02:1,m=.5):(h=b?"bottom":"top",P="center",u=.5,m=b?1.02:1),d.coerce(c,s,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:u}},"x"),d.coerce(c,s,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:m}},"y"),f("xanchor",P),f("xpad"),f("yanchor",h),f("ypad"),d.noneOrAll(c,s,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var L=d.coerce(c,s,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:_?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",L.indexOf("inside")!==-1?"hide past domain":"hide past div"),A(c,s,f,"linear");var z=n.font,F={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:z};L.indexOf("inside")!==-1&&(F.bgColor="black"),t(c,s,f,"linear",F),e(c,s,f,"linear",F),M(c,s,f,"linear",F),f("title.text",n._dfltTitle.colorbar);var B=s.showticklabels?s.tickfont:z,O=d.extendFlat({},z,{family:B.family,size:d.bigFont(B.size)});d.coerceFont(f,"title.font",O),f("title.side",_?"top":"right")}}}),gh=Ze({"src/components/colorscale/defaults.js"(Z,q){"use strict";var d=ns(),x=ca(),A=s5(),M=c5(),e=G0().isValid,t=oo().traceIs;function r(o,a){var i=a.slice(0,a.length-1);return a?x.nestedProperty(o,i).get()||{}:o}q.exports=function o(a,i,n,s,c){var f=c.prefix,g=c.cLetter,v="_module"in i,T=r(a,f),l=r(i,f),_=r(i._template||{},f)||{},w=function(){return delete a.coloraxis,delete i.coloraxis,o(a,i,n,s,c)};if(v){var S=n._colorAxes||{},E=s(f+"coloraxis");if(E){var y=t(i,"contour")&&x.nestedProperty(i,"contours.coloring").get()||"heatmap",b=S[E];b?(b[2].push(w),b[0]!==y&&(b[0]=!1,x.warn(["Ignoring coloraxis:",E,"setting","as it is linked to incompatible colorscales."].join(" ")))):S[E]=[y,i,[w]];return}}var p=T[g+"min"],u=T[g+"max"],m=d(p)&&d(u)&&p<u,h=s(f+g+"auto",!m);h?s(f+g+"mid"):(s(f+g+"min"),s(f+g+"max"));var P=T.colorscale,L=_.colorscale,z;if(P!==void 0&&(z=!e(P)),L!==void 0&&(z=!e(L)),s(f+"autocolorscale",z),s(f+"colorscale"),s(f+"reversescale"),f!=="marker.line."){var F;f&&v&&(F=A(T));var B=s(f+"showscale",F);B&&(f&&_&&(l._template=_),M(T,l,n))}}}}),iz=Ze({"src/components/colorscale/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=Dl(),A=o5(),M=gh();q.exports=function(t,r){function o(v,T){return d.coerce(t,r,A,v,T)}o("colorscale.sequential"),o("colorscale.sequentialminus"),o("colorscale.diverging");var a=r._colorAxes,i,n;function s(v,T){return d.coerce(i,n,A.coloraxis,v,T)}for(var c in a){var f=a[c];if(f[0])i=t[c]||{},n=x.newContainer(r,c,"coloraxis"),n._name=c,M(i,n,r,s,{prefix:"",cLetter:"c"});else{for(var g=0;g<f[2].length;g++)f[2][g]();delete r._colorAxes[c]}}}}}),nz=Ze({"src/components/colorscale/cross_trace_defaults.js"(Z,q){"use strict";var d=ca(),x=bp().hasColorscale,A=bp().extractOpts;q.exports=function(e,t){function r(f,g){var v=f["_"+g];v!==void 0&&(f[g]=v)}function o(f,g){var v=g.container?d.nestedProperty(f,g.container).get():f;if(v)if(v.coloraxis)v._colorAx=t[v.coloraxis];else{var T=A(v),l=T.auto;(l||T.min===void 0)&&r(v,g.min),(l||T.max===void 0)&&r(v,g.max),T.autocolorscale&&r(v,"colorscale")}}for(var a=0;a<e.length;a++){var i=e[a],n=i._module.colorbar;if(n)if(Array.isArray(n))for(var s=0;s<n.length;s++)o(i,n[s]);else o(i,n);x(i,"marker.line")&&o(i,{container:"marker.line",min:"cmin",max:"cmax"})}for(var c in t._colorAxes)o(t[c],{min:"cmin",max:"cmax"})}}}),wp=Ze({"src/components/colorscale/calc.js"(Z,q){"use strict";var d=ns(),x=ca(),A=bp().extractOpts;q.exports=function(e,t,r){var o=e._fullLayout,a=r.vals,i=r.containerStr,n=i?x.nestedProperty(t,i).get():t,s=A(n),c=s.auto!==!1,f=s.min,g=s.max,v=s.mid,T=function(){return x.aggNums(Math.min,null,a)},l=function(){return x.aggNums(Math.max,null,a)};if(f===void 0?f=T():c&&(n._colorAx&&d(f)?f=Math.min(f,T()):f=T()),g===void 0?g=l():c&&(n._colorAx&&d(g)?g=Math.max(g,l()):g=l()),c&&v!==void 0&&(g-v>v-f?f=v-(g-v):g-v<v-f&&(g=v+(v-f))),f===g&&(f-=.5,g+=.5),s._sync("min",f),s._sync("max",g),s.autocolorscale){var _;f*g<0?_=o.colorscale.diverging:f>=0?_=o.colorscale.sequential:_=o.colorscale.sequentialminus,s._sync("colorscale",_)}}}}),rc=Ze({"src/components/colorscale/index.js"(Z,q){"use strict";var d=G0(),x=bp();q.exports={moduleType:"component",name:"colorscale",attributes:Mu(),layoutAttributes:o5(),supplyLayoutDefaults:iz(),handleDefaults:gh(),crossTraceDefaults:nz(),calc:wp(),scales:d.scales,defaultScale:d.defaultScale,getScale:d.get,isValidScale:d.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),Fu=Ze({"src/traces/scatter/subtypes.js"(Z,q){"use strict";var d=ca(),x=xp().isTypedArraySpec;q.exports={hasLines:function(A){return A.visible&&A.mode&&A.mode.indexOf("lines")!==-1},hasMarkers:function(A){return A.visible&&(A.mode&&A.mode.indexOf("markers")!==-1||A.type==="splom")},hasText:function(A){return A.visible&&A.mode&&A.mode.indexOf("text")!==-1},isBubble:function(A){var M=A.marker;return d.isPlainObject(M)&&(d.isArrayOrTypedArray(M.size)||x(M.size))}}}}),r1=Ze({"src/traces/scatter/make_bubble_size_func.js"(Z,q){"use strict";var d=ns();q.exports=function(A,M){M||(M=2);var e=A.marker,t=e.sizeref||1,r=e.sizemin||0,o=e.sizemode==="area"?function(a){return Math.sqrt(a/t)}:function(a){return a/t};return function(a){var i=o(a/M);return d(i)&&i>0?Math.max(i,r):0}}}}),Qp=Ze({"src/components/fx/helpers.js"(Z){"use strict";var q=ca();Z.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},Z.isTraceInSubplots=function(t,r){if(t.type==="splom"){for(var o=t.xaxes||[],a=t.yaxes||[],i=0;i<o.length;i++)for(var n=0;n<a.length;n++)if(r.indexOf(o[i]+a[n])!==-1)return!0;return!1}return r.indexOf(Z.getSubplot(t))!==-1},Z.flat=function(t,r){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=r;return o},Z.p2c=function(t,r){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=t[a].p2c(r);return o},Z.getDistanceFunction=function(t,r,o,a){return t==="closest"?a||Z.quadrature(r,o):t.charAt(0)==="x"?r:o},Z.getClosest=function(t,r,o){if(o.index!==!1)o.index>=0&&o.index<t.length?o.distance=0:o.index=!1;else for(var a=1/0,i=t.length,n=0;n<i;n++)a=r(t[n]),a<=o.distance&&(o.index=n,o.distance=a);return o},Z.inbox=function(t,r,o){return t*r<0||t===0?o:1/0},Z.quadrature=function(t,r){return function(o){var a=t(o),i=r(o);return Math.sqrt(a*a+i*i)}},Z.makeEventData=function(t,r,o){var a="index"in t?t.index:t.pointNumber,i={data:r._input,fullData:r,curveNumber:r.index,pointNumber:a};if(r._indexToPoints){var n=r._indexToPoints[a];n.length===1?i.pointIndex=n[0]:i.pointIndices=n}else i.pointIndex=a;return r._module.eventData?i=r._module.eventData(i,t,r,o,a):("xVal"in t?i.x=t.xVal:"x"in t&&(i.x=t.x),"yVal"in t?i.y=t.yVal:"y"in t&&(i.y=t.y),t.xa&&(i.xaxis=t.xa),t.ya&&(i.yaxis=t.ya),t.zLabelVal!==void 0&&(i.z=t.zLabelVal)),Z.appendArrayPointValue(i,r,a),i},Z.appendArrayPointValue=function(t,r,o){var a=r._arrayAttrs;if(a)for(var i=0;i<a.length;i++){var n=a[i],s=x(n);if(t[s]===void 0){var c=q.nestedProperty(r,n).get(),f=A(c,o);f!==void 0&&(t[s]=f)}}},Z.appendArrayMultiPointValues=function(t,r,o){var a=r._arrayAttrs;if(a)for(var i=0;i<a.length;i++){var n=a[i],s=x(n);if(t[s]===void 0){for(var c=q.nestedProperty(r,n).get(),f=new Array(o.length),g=0;g<o.length;g++)f[g]=A(c,o[g]);t[s]=f}}};var d={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function x(t){return d[t]||t}function A(t,r){if(Array.isArray(r)){if(Array.isArray(t)&&Array.isArray(t[r[0]]))return t[r[0]][r[1]]}else return t[r]}var M={x:!0,y:!0},e={"x unified":!0,"y unified":!0};Z.isUnifiedHover=function(t){return typeof t!="string"?!1:!!e[t]},Z.isXYhover=function(t){return typeof t!="string"?!1:!!M[t]}}}),M_=Ze({"node_modules/parse-svg-path/index.js"(Z,q){q.exports=A;var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},x=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function A(t){var r=[];return t.replace(x,function(o,a,i){var n=a.toLowerCase();for(i=e(i),n=="m"&&i.length>2&&(r.push([a].concat(i.splice(0,2))),n="l",a=a=="m"?"l":"L");;){if(i.length==d[n])return i.unshift(a),r.push(i);if(i.length<d[n])throw new Error("malformed path data");r.push([a].concat(i.splice(0,d[n])))}}),r}var M=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function e(t){var r=t.match(M);return r?r.map(Number):[]}}}),oz=Ze({"src/components/drawing/symbol_defs.js"(Z,q){"use strict";var d=M_(),x=function(g,v){return v?Math.round(g*(v=Math.pow(10,v)))/v:Math.round(g)},A="M0,0Z",M=Math.sqrt(2),e=Math.sqrt(3),t=Math.PI,r=Math.cos,o=Math.sin;q.exports={circle:{n:0,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_="M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z";return T?f(v,T,_):_}},square:{n:1,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")}},diamond:{n:2,f:function(g,v,T){if(a(v))return A;var l=x(g*1.3,2);return f(v,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"Z")}},cross:{n:3,f:function(g,v,T){if(a(v))return A;var l=x(g*.4,2),_=x(g*1.2,2);return f(v,T,"M"+_+","+l+"H"+l+"V"+_+"H-"+l+"V"+l+"H-"+_+"V-"+l+"H-"+l+"V-"+_+"H"+l+"V-"+l+"H"+_+"Z")}},x:{n:4,f:function(g,v,T){if(a(v))return A;var l=x(g*.8/M,2),_="l"+l+","+l,w="l"+l+",-"+l,S="l-"+l+",-"+l,E="l-"+l+","+l;return f(v,T,"M0,"+l+_+w+S+w+S+E+S+E+_+E+_+"Z")}},"triangle-up":{n:5,f:function(g,v,T){if(a(v))return A;var l=x(g*2/e,2),_=x(g/2,2),w=x(g,2);return f(v,T,"M-"+l+","+_+"H"+l+"L0,-"+w+"Z")}},"triangle-down":{n:6,f:function(g,v,T){if(a(v))return A;var l=x(g*2/e,2),_=x(g/2,2),w=x(g,2);return f(v,T,"M-"+l+",-"+_+"H"+l+"L0,"+w+"Z")}},"triangle-left":{n:7,f:function(g,v,T){if(a(v))return A;var l=x(g*2/e,2),_=x(g/2,2),w=x(g,2);return f(v,T,"M"+_+",-"+l+"V"+l+"L-"+w+",0Z")}},"triangle-right":{n:8,f:function(g,v,T){if(a(v))return A;var l=x(g*2/e,2),_=x(g/2,2),w=x(g,2);return f(v,T,"M-"+_+",-"+l+"V"+l+"L"+w+",0Z")}},"triangle-ne":{n:9,f:function(g,v,T){if(a(v))return A;var l=x(g*.6,2),_=x(g*1.2,2);return f(v,T,"M-"+_+",-"+l+"H"+l+"V"+_+"Z")}},"triangle-se":{n:10,f:function(g,v,T){if(a(v))return A;var l=x(g*.6,2),_=x(g*1.2,2);return f(v,T,"M"+l+",-"+_+"V"+l+"H-"+_+"Z")}},"triangle-sw":{n:11,f:function(g,v,T){if(a(v))return A;var l=x(g*.6,2),_=x(g*1.2,2);return f(v,T,"M"+_+","+l+"H-"+l+"V-"+_+"Z")}},"triangle-nw":{n:12,f:function(g,v,T){if(a(v))return A;var l=x(g*.6,2),_=x(g*1.2,2);return f(v,T,"M-"+l+","+_+"V-"+l+"H"+_+"Z")}},pentagon:{n:13,f:function(g,v,T){if(a(v))return A;var l=x(g*.951,2),_=x(g*.588,2),w=x(-g,2),S=x(g*-.309,2),E=x(g*.809,2);return f(v,T,"M"+l+","+S+"L"+_+","+E+"H-"+_+"L-"+l+","+S+"L0,"+w+"Z")}},hexagon:{n:14,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g/2,2),w=x(g*e/2,2);return f(v,T,"M"+w+",-"+_+"V"+_+"L0,"+l+"L-"+w+","+_+"V-"+_+"L0,-"+l+"Z")}},hexagon2:{n:15,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g/2,2),w=x(g*e/2,2);return f(v,T,"M-"+_+","+w+"H"+_+"L"+l+",0L"+_+",-"+w+"H-"+_+"L-"+l+",0Z")}},octagon:{n:16,f:function(g,v,T){if(a(v))return A;var l=x(g*.924,2),_=x(g*.383,2);return f(v,T,"M-"+_+",-"+l+"H"+_+"L"+l+",-"+_+"V"+_+"L"+_+","+l+"H-"+_+"L-"+l+","+_+"V-"+_+"Z")}},star:{n:17,f:function(g,v,T){if(a(v))return A;var l=g*1.4,_=x(l*.225,2),w=x(l*.951,2),S=x(l*.363,2),E=x(l*.588,2),y=x(-l,2),b=x(l*-.309,2),p=x(l*.118,2),u=x(l*.809,2),m=x(l*.382,2);return f(v,T,"M"+_+","+b+"H"+w+"L"+S+","+p+"L"+E+","+u+"L0,"+m+"L-"+E+","+u+"L-"+S+","+p+"L-"+w+","+b+"H-"+_+"L0,"+y+"Z")}},hexagram:{n:18,f:function(g,v,T){if(a(v))return A;var l=x(g*.66,2),_=x(g*.38,2),w=x(g*.76,2);return f(v,T,"M-"+w+",0l-"+_+",-"+l+"h"+w+"l"+_+",-"+l+"l"+_+","+l+"h"+w+"l-"+_+","+l+"l"+_+","+l+"h-"+w+"l-"+_+","+l+"l-"+_+",-"+l+"h-"+w+"Z")}},"star-triangle-up":{n:19,f:function(g,v,T){if(a(v))return A;var l=x(g*e*.8,2),_=x(g*.8,2),w=x(g*1.6,2),S=x(g*4,2),E="A "+S+","+S+" 0 0 1 ";return f(v,T,"M-"+l+","+_+E+l+","+_+E+"0,-"+w+E+"-"+l+","+_+"Z")}},"star-triangle-down":{n:20,f:function(g,v,T){if(a(v))return A;var l=x(g*e*.8,2),_=x(g*.8,2),w=x(g*1.6,2),S=x(g*4,2),E="A "+S+","+S+" 0 0 1 ";return f(v,T,"M"+l+",-"+_+E+"-"+l+",-"+_+E+"0,"+w+E+l+",-"+_+"Z")}},"star-square":{n:21,f:function(g,v,T){if(a(v))return A;var l=x(g*1.1,2),_=x(g*2,2),w="A "+_+","+_+" 0 0 1 ";return f(v,T,"M-"+l+",-"+l+w+"-"+l+","+l+w+l+","+l+w+l+",-"+l+w+"-"+l+",-"+l+"Z")}},"star-diamond":{n:22,f:function(g,v,T){if(a(v))return A;var l=x(g*1.4,2),_=x(g*1.9,2),w="A "+_+","+_+" 0 0 1 ";return f(v,T,"M-"+l+",0"+w+"0,"+l+w+l+",0"+w+"0,-"+l+w+"-"+l+",0Z")}},"diamond-tall":{n:23,f:function(g,v,T){if(a(v))return A;var l=x(g*.7,2),_=x(g*1.4,2);return f(v,T,"M0,"+_+"L"+l+",0L0,-"+_+"L-"+l+",0Z")}},"diamond-wide":{n:24,f:function(g,v,T){if(a(v))return A;var l=x(g*1.4,2),_=x(g*.7,2);return f(v,T,"M0,"+_+"L"+l+",0L0,-"+_+"L-"+l+",0Z")}},hourglass:{n:25,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+","+l+"H-"+l+"L"+l+",-"+l+"H-"+l+"Z")},noDot:!0},bowtie:{n:26,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+","+l+"V-"+l+"L-"+l+","+l+"V-"+l+"Z")},noDot:!0},"circle-cross":{n:27,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g/M,2);return f(v,T,"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_+"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l+"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(g,v,T){if(a(v))return A;var l=x(g*1.3,2);return f(v,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM0,-"+l+"V"+l+"M-"+l+",0H"+l)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(g,v,T){if(a(v))return A;var l=x(g*1.3,2),_=x(g*.65,2);return f(v,T,"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM-"+_+",-"+_+"L"+_+","+_+"M-"+_+","+_+"L"+_+",-"+_)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(g,v,T){if(a(v))return A;var l=x(g*1.4,2);return f(v,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(g,v,T){if(a(v))return A;var l=x(g*1.2,2),_=x(g*.85,2);return f(v,T,"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(g,v,T){if(a(v))return A;var l=x(g/2,2),_=x(g,2);return f(v,T,"M"+l+","+_+"V-"+_+"M"+(l-_)+",-"+_+"V"+_+"M"+_+","+l+"H-"+_+"M-"+_+","+(l-_)+"H"+_)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(g,v,T){if(a(v))return A;var l=x(g*1.2,2),_=x(g*1.6,2),w=x(g*.8,2);return f(v,T,"M-"+l+","+w+"L0,0M"+l+","+w+"L0,0M0,-"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(g,v,T){if(a(v))return A;var l=x(g*1.2,2),_=x(g*1.6,2),w=x(g*.8,2);return f(v,T,"M-"+l+",-"+w+"L0,0M"+l+",-"+w+"L0,0M0,"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(g,v,T){if(a(v))return A;var l=x(g*1.2,2),_=x(g*1.6,2),w=x(g*.8,2);return f(v,T,"M"+w+","+l+"L0,0M"+w+",-"+l+"L0,0M-"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(g,v,T){if(a(v))return A;var l=x(g*1.2,2),_=x(g*1.6,2),w=x(g*.8,2);return f(v,T,"M-"+w+","+l+"L0,0M-"+w+",-"+l+"L0,0M"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(g,v,T){if(a(v))return A;var l=x(g*1.4,2);return f(v,T,"M"+l+",0H-"+l)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(g,v,T){if(a(v))return A;var l=x(g*1.4,2);return f(v,T,"M0,"+l+"V-"+l)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+",-"+l+"L-"+l+","+l)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(g,v,T){if(a(v))return A;var l=x(g,2);return f(v,T,"M"+l+","+l+"L-"+l+",-"+l)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g*2,2);return f(v,T,"M0,0L-"+l+","+_+"H"+l+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g*2,2);return f(v,T,"M0,0L-"+l+",-"+_+"H"+l+"Z")},noDot:!0},"arrow-left":{n:47,f:function(g,v,T){if(a(v))return A;var l=x(g*2,2),_=x(g,2);return f(v,T,"M0,0L"+l+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-right":{n:48,f:function(g,v,T){if(a(v))return A;var l=x(g*2,2),_=x(g,2);return f(v,T,"M0,0L-"+l+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g*2,2);return f(v,T,"M-"+l+",0H"+l+"M0,0L-"+l+","+_+"H"+l+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(g,v,T){if(a(v))return A;var l=x(g,2),_=x(g*2,2);return f(v,T,"M-"+l+",0H"+l+"M0,0L-"+l+",-"+_+"H"+l+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(g,v,T){if(a(v))return A;var l=x(g*2,2),_=x(g,2);return f(v,T,"M0,-"+_+"V"+_+"M0,0L"+l+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(g,v,T){if(a(v))return A;var l=x(g*2,2),_=x(g,2);return f(v,T,"M0,-"+_+"V"+_+"M0,0L-"+l+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(g,v,T){if(a(v))return A;var l=t/2.5,_=2*g*r(l),w=2*g*o(l);return f(v,T,"M0,0L"+-_+","+w+"L"+_+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(g,v,T){if(a(v))return A;var l=t/4,_=2*g*r(l),w=2*g*o(l);return f(v,T,"M0,0L"+-_+","+w+"A "+2*g+","+2*g+" 0 0 1 "+_+","+w+"Z")},backoff:.4,noDot:!0}};function a(g){return g===null}var i,n,s,c;function f(g,v,T){if((!g||g%360===0)&&!v)return T;if(s===g&&c===v&&i===T)return n;s=g,c=v,i=T;function l(z,F){var B=r(z),O=o(z),I=F[0],N=F[1]+(v||0);return[I*B-N*O,I*O+N*B]}for(var _=g/180*t,w=0,S=0,E=d(T),y="",b=0;b<E.length;b++){var p=E[b],u=p[0],m=w,h=S;if(u==="M"||u==="L")w=+p[1],S=+p[2];else if(u==="m"||u==="l")w+=+p[1],S+=+p[2];else if(u==="H")w=+p[1];else if(u==="h")w+=+p[1];else if(u==="V")S=+p[1];else if(u==="v")S+=+p[1];else if(u==="A"){w=+p[1],S=+p[2];var P=l(_,[+p[6],+p[7]]);p[6]=P[0],p[7]=P[1],p[3]=+p[3]+g}(u==="H"||u==="V")&&(u="L"),(u==="h"||u==="v")&&(u="l"),(u==="m"||u==="l")&&(w-=m,S-=h);var L=l(_,[w,S]);(u==="H"||u==="V")&&(u="L"),(u==="M"||u==="L"||u==="m"||u==="l")&&(p[1]=L[0],p[2]=L[1]),p[0]=u,y+=p[0]+p.slice(1).join(",")}return n=y,y}}}),as=Ze({"src/components/drawing/index.js"(Z,q){"use strict";var d=On(),x=ca(),A=x.numberFormat,M=ns(),e=Ch(),t=oo(),r=Yn(),o=rc(),a=x.strTranslate,i=fu(),n=vd(),s=mh(),c=s.LINE_SPACING,f=Zm().DESELECTDIM,g=Fu(),v=r1(),T=Qp().appendArrayPointValue,l=q.exports={};l.font=function(Ee,_e){var fe=_e.variant,Fe=_e.style,rt=_e.weight,st=_e.color,Qe=_e.size,Lt=_e.family,kt=_e.shadow,Vt=_e.lineposition,Zt=_e.textcase;Lt&&Ee.style("font-family",Lt),Qe+1&&Ee.style("font-size",Qe+"px"),st&&Ee.call(r.fill,st),rt&&Ee.style("font-weight",rt),Fe&&Ee.style("font-style",Fe),fe&&Ee.style("font-variant",fe),Zt&&Ee.style("text-transform",_(S(Zt))),kt&&Ee.style("text-shadow",kt==="auto"?i.makeTextShadow(r.contrast(st)):_(kt)),Vt&&Ee.style("text-decoration-line",_(E(Vt)))};function _(Ee){return Ee==="none"?void 0:Ee}var w={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function S(Ee){return w[Ee]}function E(Ee){return Ee.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}l.setPosition=function(Ee,_e,fe){Ee.attr("x",_e).attr("y",fe)},l.setSize=function(Ee,_e,fe){Ee.attr("width",_e).attr("height",fe)},l.setRect=function(Ee,_e,fe,Fe,rt){Ee.call(l.setPosition,_e,fe).call(l.setSize,Fe,rt)},l.translatePoint=function(Ee,_e,fe,Fe){var rt=fe.c2p(Ee.x),st=Fe.c2p(Ee.y);if(M(rt)&&M(st)&&_e.node())_e.node().nodeName==="text"?_e.attr("x",rt).attr("y",st):_e.attr("transform",a(rt,st));else return!1;return!0},l.translatePoints=function(Ee,_e,fe){Ee.each(function(Fe){var rt=d.select(this);l.translatePoint(Fe,rt,_e,fe)})},l.hideOutsideRangePoint=function(Ee,_e,fe,Fe,rt,st){_e.attr("display",fe.isPtWithinRange(Ee,rt)&&Fe.isPtWithinRange(Ee,st)?null:"none")},l.hideOutsideRangePoints=function(Ee,_e){if(_e._hasClipOnAxisFalse){var fe=_e.xaxis,Fe=_e.yaxis;Ee.each(function(rt){var st=rt[0].trace,Qe=st.xcalendar,Lt=st.ycalendar,kt=t.traceIs(st,"bar-like")?".bartext":".point,.textpoint";Ee.selectAll(kt).each(function(Vt){l.hideOutsideRangePoint(Vt,d.select(this),fe,Fe,Qe,Lt)})})}},l.crispRound=function(Ee,_e,fe){return!_e||!M(_e)?fe||0:Ee._context.staticPlot?_e:_e<1?1:Math.round(_e)},l.singleLineStyle=function(Ee,_e,fe,Fe,rt){_e.style("fill","none");var st=(((Ee||[])[0]||{}).trace||{}).line||{},Qe=fe||st.width||0,Lt=rt||st.dash||"";r.stroke(_e,Fe||st.color),l.dashLine(_e,Lt,Qe)},l.lineGroupStyle=function(Ee,_e,fe,Fe){Ee.style("fill","none").each(function(rt){var st=(((rt||[])[0]||{}).trace||{}).line||{},Qe=_e||st.width||0,Lt=Fe||st.dash||"";d.select(this).call(r.stroke,fe||st.color).call(l.dashLine,Lt,Qe)})},l.dashLine=function(Ee,_e,fe){fe=+fe||0,_e=l.dashStyle(_e,fe),Ee.style({"stroke-dasharray":_e,"stroke-width":fe+"px"})},l.dashStyle=function(Ee,_e){_e=+_e||1;var fe=Math.max(_e,3);return Ee==="solid"?Ee="":Ee==="dot"?Ee=fe+"px,"+fe+"px":Ee==="dash"?Ee=3*fe+"px,"+3*fe+"px":Ee==="longdash"?Ee=5*fe+"px,"+5*fe+"px":Ee==="dashdot"?Ee=3*fe+"px,"+fe+"px,"+fe+"px,"+fe+"px":Ee==="longdashdot"&&(Ee=5*fe+"px,"+2*fe+"px,"+fe+"px,"+2*fe+"px"),Ee};function y(Ee,_e,fe,Fe){var rt=_e.fillpattern,st=_e.fillgradient,Qe=l.getPatternAttr,Lt=rt&&(Qe(rt.shape,0,"")||Qe(rt.path,0,""));if(Lt){var kt=Qe(rt.bgcolor,0,null),Vt=Qe(rt.fgcolor,0,null),Zt=rt.fgopacity,Sr=Qe(rt.size,0,8),xr=Qe(rt.solidity,0,.3),jr=_e.uid;l.pattern(Ee,"point",fe,jr,Lt,Sr,xr,void 0,rt.fillmode,kt,Vt,Zt)}else if(st&&st.type!=="none"){var wr=st.type,Ir="scatterfill-"+_e.uid;if(Fe&&(Ir="legendfill-"+_e.uid),!Fe&&(st.start!==void 0||st.stop!==void 0)){var bt,Be;wr==="horizontal"?(bt={x:st.start,y:0},Be={x:st.stop,y:0}):wr==="vertical"&&(bt={x:0,y:st.start},Be={x:0,y:st.stop}),bt.x=_e._xA.c2p(bt.x===void 0?_e._extremes.x.min[0].val:bt.x,!0),bt.y=_e._yA.c2p(bt.y===void 0?_e._extremes.y.min[0].val:bt.y,!0),Be.x=_e._xA.c2p(Be.x===void 0?_e._extremes.x.max[0].val:Be.x,!0),Be.y=_e._yA.c2p(Be.y===void 0?_e._extremes.y.max[0].val:Be.y,!0),Ee.call(L,fe,Ir,"linear",st.colorscale,"fill",bt,Be,!0,!1)}else wr==="horizontal"&&(wr=wr+"reversed"),Ee.call(l.gradient,fe,Ir,wr,st.colorscale,"fill")}else _e.fillcolor&&Ee.call(r.fill,_e.fillcolor)}l.singleFillStyle=function(Ee,_e){var fe=d.select(Ee.node()),Fe=fe.data(),rt=((Fe[0]||[])[0]||{}).trace||{};y(Ee,rt,_e,!1)},l.fillGroupStyle=function(Ee,_e,fe){Ee.style("stroke-width",0).each(function(Fe){var rt=d.select(this);Fe[0].trace&&y(rt,Fe[0].trace,_e,fe)})};var b=oz();l.symbolNames=[],l.symbolFuncs=[],l.symbolBackOffs=[],l.symbolNeedLines={},l.symbolNoDot={},l.symbolNoFill={},l.symbolList=[],Object.keys(b).forEach(function(Ee){var _e=b[Ee],fe=_e.n;l.symbolList.push(fe,String(fe),Ee,fe+100,String(fe+100),Ee+"-open"),l.symbolNames[fe]=Ee,l.symbolFuncs[fe]=_e.f,l.symbolBackOffs[fe]=_e.backoff||0,_e.needLine&&(l.symbolNeedLines[fe]=!0),_e.noDot?l.symbolNoDot[fe]=!0:l.symbolList.push(fe+200,String(fe+200),Ee+"-dot",fe+300,String(fe+300),Ee+"-open-dot"),_e.noFill&&(l.symbolNoFill[fe]=!0)});var p=l.symbolNames.length,u="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";l.symbolNumber=function(Ee){if(M(Ee))Ee=+Ee;else if(typeof Ee=="string"){var _e=0;Ee.indexOf("-open")>0&&(_e=100,Ee=Ee.replace("-open","")),Ee.indexOf("-dot")>0&&(_e+=200,Ee=Ee.replace("-dot","")),Ee=l.symbolNames.indexOf(Ee),Ee>=0&&(Ee+=_e)}return Ee%100>=p||Ee>=400?0:Math.floor(Math.max(Ee,0))};function m(Ee,_e,fe,Fe){var rt=Ee%100;return l.symbolFuncs[rt](_e,fe,Fe)+(Ee>=200?u:"")}var h=A("~f"),P={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}};l.gradient=function(Ee,_e,fe,Fe,rt,st){var Qe=P[Fe];return L(Ee,_e,fe,Qe.type,rt,st,Qe.start,Qe.stop,!1,Qe.reversed)};function L(Ee,_e,fe,Fe,rt,st,Qe,Lt,kt,Vt){var Zt=rt.length,Sr;Fe==="linear"?Sr={node:"linearGradient",attrs:{x1:Qe.x,y1:Qe.y,x2:Lt.x,y2:Lt.y,gradientUnits:kt?"userSpaceOnUse":"objectBoundingBox"},reversed:Vt}:Fe==="radial"&&(Sr={node:"radialGradient",reversed:Vt});for(var xr=new Array(Zt),jr=0;jr<Zt;jr++)Sr.reversed?xr[Zt-1-jr]=[h((1-rt[jr][0])*100),rt[jr][1]]:xr[jr]=[h(rt[jr][0]*100),rt[jr][1]];var wr=_e._fullLayout,Ir="g"+wr._uid+"-"+fe,bt=wr._defs.select(".gradients").selectAll("#"+Ir).data([Fe+xr.join(";")],x.identity);bt.exit().remove(),bt.enter().append(Sr.node).each(function(){var Be=d.select(this);Sr.attrs&&Be.attr(Sr.attrs),Be.attr("id",Ir);var Ke=Be.selectAll("stop").data(xr);Ke.exit().remove(),Ke.enter().append("stop"),Ke.each(function(Ue){var Me=e(Ue[1]);d.select(this).attr({offset:Ue[0]+"%","stop-color":r.tinyRGB(Me),"stop-opacity":Me.getAlpha()})})}),Ee.style(st,oe(Ir,_e)).style(st+"-opacity",null),Ee.classed("gradient_filled",!0)}l.pattern=function(Ee,_e,fe,Fe,rt,st,Qe,Lt,kt,Vt,Zt,Sr){var xr=_e==="legend";Lt&&(kt==="overlay"?(Vt=Lt,Zt=r.contrast(Vt)):(Vt=void 0,Zt=Lt));var jr=fe._fullLayout,wr="p"+jr._uid+"-"+Fe,Ir,bt,Be=function(Gt,rr,Qt,Tr,la){return Tr+(la-Tr)*(Gt-rr)/(Qt-rr)},Ke,Ue,Me,qe,Ce={},Te=e(Zt),Pe=r.tinyRGB(Te),at=Te.getAlpha(),yt=Sr*at;switch(rt){case"/":Ir=st*Math.sqrt(2),bt=st*Math.sqrt(2),Ke="M-"+Ir/4+","+bt/4+"l"+Ir/2+",-"+bt/2+"M0,"+bt+"L"+Ir+",0M"+Ir/4*3+","+bt/4*5+"l"+Ir/2+",-"+bt/2,Ue=Qe*st,qe="path",Ce={d:Ke,opacity:yt,stroke:Pe,"stroke-width":Ue+"px"};break;case"\\":Ir=st*Math.sqrt(2),bt=st*Math.sqrt(2),Ke="M"+Ir/4*3+",-"+bt/4+"l"+Ir/2+","+bt/2+"M0,0L"+Ir+","+bt+"M-"+Ir/4+","+bt/4*3+"l"+Ir/2+","+bt/2,Ue=Qe*st,qe="path",Ce={d:Ke,opacity:yt,stroke:Pe,"stroke-width":Ue+"px"};break;case"x":Ir=st*Math.sqrt(2),bt=st*Math.sqrt(2),Ke="M-"+Ir/4+","+bt/4+"l"+Ir/2+",-"+bt/2+"M0,"+bt+"L"+Ir+",0M"+Ir/4*3+","+bt/4*5+"l"+Ir/2+",-"+bt/2+"M"+Ir/4*3+",-"+bt/4+"l"+Ir/2+","+bt/2+"M0,0L"+Ir+","+bt+"M-"+Ir/4+","+bt/4*3+"l"+Ir/2+","+bt/2,Ue=st-st*Math.sqrt(1-Qe),qe="path",Ce={d:Ke,opacity:yt,stroke:Pe,"stroke-width":Ue+"px"};break;case"|":Ir=st,bt=st,qe="path",Ke="M"+Ir/2+",0L"+Ir/2+","+bt,Ue=Qe*st,qe="path",Ce={d:Ke,opacity:yt,stroke:Pe,"stroke-width":Ue+"px"};break;case"-":Ir=st,bt=st,qe="path",Ke="M0,"+bt/2+"L"+Ir+","+bt/2,Ue=Qe*st,qe="path",Ce={d:Ke,opacity:yt,stroke:Pe,"stroke-width":Ue+"px"};break;case"+":Ir=st,bt=st,qe="path",Ke="M"+Ir/2+",0L"+Ir/2+","+bt+"M0,"+bt/2+"L"+Ir+","+bt/2,Ue=st-st*Math.sqrt(1-Qe),qe="path",Ce={d:Ke,opacity:yt,stroke:Pe,"stroke-width":Ue+"px"};break;case".":Ir=st,bt=st,Qe<Math.PI/4?Me=Math.sqrt(Qe*st*st/Math.PI):Me=Be(Qe,Math.PI/4,1,st/2,st/Math.sqrt(2)),qe="circle",Ce={cx:Ir/2,cy:bt/2,r:Me,opacity:yt,fill:Pe};break;default:Ir=st,bt=st,qe="path",Ce={d:rt,opacity:yt,fill:Pe};break}var Tt=[rt||"noSh",Vt||"noBg",Zt||"noFg",st,Qe].join(";"),Ot=jr._defs.select(".patterns").selectAll("#"+wr).data([Tt],x.identity);Ot.exit().remove(),Ot.enter().append("pattern").each(function(){var Gt=d.select(this);if(Gt.attr({id:wr,width:Ir+"px",height:bt+"px",patternUnits:"userSpaceOnUse",patternTransform:xr?"scale(0.8)":""}),Vt){var rr=e(Vt),Qt=r.tinyRGB(rr),Tr=rr.getAlpha(),la=Gt.selectAll("rect").data([0]);la.exit().remove(),la.enter().append("rect").attr({width:Ir+"px",height:bt+"px",fill:Qt,"fill-opacity":Tr})}var Ua=Gt.selectAll(qe).data([0]);Ua.exit().remove(),Ua.enter().append(qe).attr(Ce)}),Ee.style("fill",oe(wr,fe)).style("fill-opacity",null),Ee.classed("pattern_filled",!0)},l.initGradients=function(Ee){var _e=Ee._fullLayout,fe=x.ensureSingle(_e._defs,"g","gradients");fe.selectAll("linearGradient,radialGradient").remove(),d.select(Ee).selectAll(".gradient_filled").classed("gradient_filled",!1)},l.initPatterns=function(Ee){var _e=Ee._fullLayout,fe=x.ensureSingle(_e._defs,"g","patterns");fe.selectAll("pattern").remove(),d.select(Ee).selectAll(".pattern_filled").classed("pattern_filled",!1)},l.getPatternAttr=function(Ee,_e,fe){return Ee&&x.isArrayOrTypedArray(Ee)?_e<Ee.length?Ee[_e]:fe:Ee},l.pointStyle=function(Ee,_e,fe,Fe){if(Ee.size()){var rt=l.makePointStyleFns(_e);Ee.each(function(st){l.singlePointStyle(st,d.select(this),_e,rt,fe,Fe)})}},l.singlePointStyle=function(Ee,_e,fe,Fe,rt,st){var Qe=fe.marker,Lt=Qe.line;if(st&&st.i>=0&&Ee.i===void 0&&(Ee.i=st.i),_e.style("opacity",Fe.selectedOpacityFn?Fe.selectedOpacityFn(Ee):Ee.mo===void 0?Qe.opacity:Ee.mo),Fe.ms2mrc){var kt;Ee.ms==="various"||Qe.size==="various"?kt=3:kt=Fe.ms2mrc(Ee.ms),Ee.mrc=kt,Fe.selectedSizeFn&&(kt=Ee.mrc=Fe.selectedSizeFn(Ee));var Vt=l.symbolNumber(Ee.mx||Qe.symbol)||0;Ee.om=Vt%200>=100;var Zt=lt(Ee,fe),Sr=ee(Ee,fe);_e.attr("d",m(Vt,kt,Zt,Sr))}var xr=!1,jr,wr,Ir;if(Ee.so)Ir=Lt.outlierwidth,wr=Lt.outliercolor,jr=Qe.outliercolor;else{var bt=(Lt||{}).width;Ir=(Ee.mlw+1||bt+1||(Ee.trace?(Ee.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Ee?wr=Ee.mlcc=Fe.lineScale(Ee.mlc):x.isArrayOrTypedArray(Lt.color)?wr=r.defaultLine:wr=Lt.color,x.isArrayOrTypedArray(Qe.color)&&(jr=r.defaultLine,xr=!0),"mc"in Ee?jr=Ee.mcc=Fe.markerScale(Ee.mc):jr=Qe.color||Qe.colors||"rgba(0,0,0,0)",Fe.selectedColorFn&&(jr=Fe.selectedColorFn(Ee))}if(Ee.om)_e.call(r.stroke,jr).style({"stroke-width":(Ir||1)+"px",fill:"none"});else{_e.style("stroke-width",(Ee.isBlank?0:Ir)+"px");var Be=Qe.gradient,Ke=Ee.mgt;Ke?xr=!0:Ke=Be&&Be.type,x.isArrayOrTypedArray(Ke)&&(Ke=Ke[0],P[Ke]||(Ke=0));var Ue=Qe.pattern,Me=l.getPatternAttr,qe=Ue&&(Me(Ue.shape,Ee.i,"")||Me(Ue.path,Ee.i,""));if(Ke&&Ke!=="none"){var Ce=Ee.mgc;Ce?xr=!0:Ce=Be.color;var Te=fe.uid;xr&&(Te+="-"+Ee.i),l.gradient(_e,rt,Te,Ke,[[0,Ce],[1,jr]],"fill")}else if(qe){var Pe=!1,at=Ue.fgcolor;!at&&st&&st.color&&(at=st.color,Pe=!0);var yt=Me(at,Ee.i,st&&st.color||null),Tt=Me(Ue.bgcolor,Ee.i,null),Ot=Ue.fgopacity,Gt=Me(Ue.size,Ee.i,8),rr=Me(Ue.solidity,Ee.i,.3);Pe=Pe||Ee.mcc||x.isArrayOrTypedArray(Ue.shape)||x.isArrayOrTypedArray(Ue.path)||x.isArrayOrTypedArray(Ue.bgcolor)||x.isArrayOrTypedArray(Ue.fgcolor)||x.isArrayOrTypedArray(Ue.size)||x.isArrayOrTypedArray(Ue.solidity);var Qt=fe.uid;Pe&&(Qt+="-"+Ee.i),l.pattern(_e,"point",rt,Qt,qe,Gt,rr,Ee.mcc,Ue.fillmode,Tt,yt,Ot)}else x.isArrayOrTypedArray(jr)?r.fill(_e,jr[Ee.i]):r.fill(_e,jr);Ir&&r.stroke(_e,wr)}},l.makePointStyleFns=function(Ee){var _e={},fe=Ee.marker;return _e.markerScale=l.tryColorscale(fe,""),_e.lineScale=l.tryColorscale(fe,"line"),t.traceIs(Ee,"symbols")&&(_e.ms2mrc=g.isBubble(Ee)?v(Ee):function(){return(fe.size||6)/2}),Ee.selectedpoints&&x.extendFlat(_e,l.makeSelectedPointStyleFns(Ee)),_e},l.makeSelectedPointStyleFns=function(Ee){var _e={},fe=Ee.selected||{},Fe=Ee.unselected||{},rt=Ee.marker||{},st=fe.marker||{},Qe=Fe.marker||{},Lt=rt.opacity,kt=st.opacity,Vt=Qe.opacity,Zt=kt!==void 0,Sr=Vt!==void 0;(x.isArrayOrTypedArray(Lt)||Zt||Sr)&&(_e.selectedOpacityFn=function(Me){var qe=Me.mo===void 0?rt.opacity:Me.mo;return Me.selected?Zt?kt:qe:Sr?Vt:f*qe});var xr=rt.color,jr=st.color,wr=Qe.color;(jr||wr)&&(_e.selectedColorFn=function(Me){var qe=Me.mcc||xr;return Me.selected?jr||qe:wr||qe});var Ir=rt.size,bt=st.size,Be=Qe.size,Ke=bt!==void 0,Ue=Be!==void 0;return t.traceIs(Ee,"symbols")&&(Ke||Ue)&&(_e.selectedSizeFn=function(Me){var qe=Me.mrc||Ir/2;return Me.selected?Ke?bt/2:qe:Ue?Be/2:qe}),_e},l.makeSelectedTextStyleFns=function(Ee){var _e={},fe=Ee.selected||{},Fe=Ee.unselected||{},rt=Ee.textfont||{},st=fe.textfont||{},Qe=Fe.textfont||{},Lt=rt.color,kt=st.color,Vt=Qe.color;return _e.selectedTextColorFn=function(Zt){var Sr=Zt.tc||Lt;return Zt.selected?kt||Sr:Vt||(kt?Sr:r.addOpacity(Sr,f))},_e},l.selectedPointStyle=function(Ee,_e){if(!(!Ee.size()||!_e.selectedpoints)){var fe=l.makeSelectedPointStyleFns(_e),Fe=_e.marker||{},rt=[];fe.selectedOpacityFn&&rt.push(function(st,Qe){st.style("opacity",fe.selectedOpacityFn(Qe))}),fe.selectedColorFn&&rt.push(function(st,Qe){r.fill(st,fe.selectedColorFn(Qe))}),fe.selectedSizeFn&&rt.push(function(st,Qe){var Lt=Qe.mx||Fe.symbol||0,kt=fe.selectedSizeFn(Qe);st.attr("d",m(l.symbolNumber(Lt),kt,lt(Qe,_e),ee(Qe,_e))),Qe.mrc2=kt}),rt.length&&Ee.each(function(st){for(var Qe=d.select(this),Lt=0;Lt<rt.length;Lt++)rt[Lt](Qe,st)})}},l.tryColorscale=function(Ee,_e){var fe=_e?x.nestedProperty(Ee,_e).get():Ee;if(fe){var Fe=fe.color;if((fe.colorscale||fe._colorAx)&&x.isArrayOrTypedArray(Fe))return o.makeColorScaleFuncFromTrace(fe)}return x.identity};var z={start:1,end:-1,middle:0,bottom:1,top:-1};function F(Ee,_e,fe,Fe,rt){var st=d.select(Ee.node().parentNode),Qe=_e.indexOf("top")!==-1?"top":_e.indexOf("bottom")!==-1?"bottom":"middle",Lt=_e.indexOf("left")!==-1?"end":_e.indexOf("right")!==-1?"start":"middle",kt=Fe?Fe/.8+1:0,Vt=(i.lineCount(Ee)-1)*c+1,Zt=z[Lt]*kt,Sr=fe*.75+z[Qe]*kt+(z[Qe]-1)*Vt*fe/2;Ee.attr("text-anchor",Lt),rt||st.attr("transform",a(Zt,Sr))}function B(Ee,_e){var fe=Ee.ts||_e.textfont.size;return M(fe)&&fe>0?fe:0}l.textPointStyle=function(Ee,_e,fe){if(Ee.size()){var Fe;if(_e.selectedpoints){var rt=l.makeSelectedTextStyleFns(_e);Fe=rt.selectedTextColorFn}var st=_e.texttemplate,Qe=fe._fullLayout;Ee.each(function(Lt){var kt=d.select(this),Vt=st?x.extractOption(Lt,_e,"txt","texttemplate"):x.extractOption(Lt,_e,"tx","text");if(!Vt&&Vt!==0){kt.remove();return}if(st){var Zt=_e._module.formatLabels,Sr=Zt?Zt(Lt,_e,Qe):{},xr={};T(xr,_e,Lt.i);var jr=_e._meta||{};Vt=x.texttemplateString(Vt,Sr,Qe._d3locale,xr,Lt,jr)}var wr=Lt.tp||_e.textposition,Ir=B(Lt,_e),bt=Fe?Fe(Lt):Lt.tc||_e.textfont.color;kt.call(l.font,{family:Lt.tf||_e.textfont.family,weight:Lt.tw||_e.textfont.weight,style:Lt.ty||_e.textfont.style,variant:Lt.tv||_e.textfont.variant,textcase:Lt.tC||_e.textfont.textcase,lineposition:Lt.tE||_e.textfont.lineposition,shadow:Lt.tS||_e.textfont.shadow,size:Ir,color:bt}).text(Vt).call(i.convertToTspans,fe).call(F,wr,Ir,Lt.mrc)})}},l.selectedTextStyle=function(Ee,_e){if(!(!Ee.size()||!_e.selectedpoints)){var fe=l.makeSelectedTextStyleFns(_e);Ee.each(function(Fe){var rt=d.select(this),st=fe.selectedTextColorFn(Fe),Qe=Fe.tp||_e.textposition,Lt=B(Fe,_e);r.fill(rt,st);var kt=t.traceIs(_e,"bar-like");F(rt,Qe,Lt,Fe.mrc2||Fe.mrc,kt)})}};var O=.5;l.smoothopen=function(Ee,_e){if(Ee.length<3)return"M"+Ee.join("L");var fe="M"+Ee[0],Fe=[],rt;for(rt=1;rt<Ee.length-1;rt++)Fe.push(ue(Ee[rt-1],Ee[rt],Ee[rt+1],_e));for(fe+="Q"+Fe[0][0]+" "+Ee[1],rt=2;rt<Ee.length-1;rt++)fe+="C"+Fe[rt-2][1]+" "+Fe[rt-1][0]+" "+Ee[rt];return fe+="Q"+Fe[Ee.length-3][1]+" "+Ee[Ee.length-1],fe},l.smoothclosed=function(Ee,_e){if(Ee.length<3)return"M"+Ee.join("L")+"Z";var fe="M"+Ee[0],Fe=Ee.length-1,rt=[ue(Ee[Fe],Ee[0],Ee[1],_e)],st;for(st=1;st<Fe;st++)rt.push(ue(Ee[st-1],Ee[st],Ee[st+1],_e));for(rt.push(ue(Ee[Fe-1],Ee[Fe],Ee[0],_e)),st=1;st<=Fe;st++)fe+="C"+rt[st-1][1]+" "+rt[st][0]+" "+Ee[st];return fe+="C"+rt[Fe][1]+" "+rt[0][0]+" "+Ee[0]+"Z",fe};var I,N;function U(Ee,_e,fe){return fe&&(Ee=G(Ee)),_e?Q(Ee[1]):W(Ee[0])}function W(Ee){var _e=d.round(Ee,2);return I=_e,_e}function Q(Ee){var _e=d.round(Ee,2);return N=_e,_e}function ue(Ee,_e,fe,Fe){var rt=Ee[0]-_e[0],st=Ee[1]-_e[1],Qe=fe[0]-_e[0],Lt=fe[1]-_e[1],kt=Math.pow(rt*rt+st*st,O/2),Vt=Math.pow(Qe*Qe+Lt*Lt,O/2),Zt=(Vt*Vt*rt-kt*kt*Qe)*Fe,Sr=(Vt*Vt*st-kt*kt*Lt)*Fe,xr=3*Vt*(kt+Vt),jr=3*kt*(kt+Vt);return[[W(_e[0]+(xr&&Zt/xr)),Q(_e[1]+(xr&&Sr/xr))],[W(_e[0]-(jr&&Zt/jr)),Q(_e[1]-(jr&&Sr/jr))]]}var le={hv:function(Ee,_e,fe){return"H"+W(_e[0])+"V"+U(_e,1,fe)},vh:function(Ee,_e,fe){return"V"+Q(_e[1])+"H"+U(_e,0,fe)},hvh:function(Ee,_e,fe){return"H"+W((Ee[0]+_e[0])/2)+"V"+Q(_e[1])+"H"+U(_e,0,fe)},vhv:function(Ee,_e,fe){return"V"+Q((Ee[1]+_e[1])/2)+"H"+W(_e[0])+"V"+U(_e,1,fe)}},he=function(Ee,_e,fe){return"L"+U(_e,0,fe)+","+U(_e,1,fe)};l.steps=function(Ee){var _e=le[Ee]||he;return function(fe){for(var Fe="M"+W(fe[0][0])+","+Q(fe[0][1]),rt=fe.length,st=1;st<rt;st++)Fe+=_e(fe[st-1],fe[st],st===rt-1);return Fe}};function G(Ee,_e){var fe=Ee.backoff,Fe=Ee.trace,rt=Ee.d,st=Ee.i;if(fe&&Fe&&Fe.marker&&Fe.marker.angle%360===0&&Fe.line&&Fe.line.shape!=="spline"){var Qe=x.isArrayOrTypedArray(fe),Lt=Ee,kt=_e?_e[0]:I||0,Vt=_e?_e[1]:N||0,Zt=Lt[0],Sr=Lt[1],xr=Zt-kt,jr=Sr-Vt,wr=Math.atan2(jr,xr),Ir=Qe?fe[st]:fe;if(Ir==="auto"){var bt=Lt.i;Fe.type==="scatter"&&bt--;var Be=Lt.marker,Ke=Be.symbol;x.isArrayOrTypedArray(Ke)&&(Ke=Ke[bt]);var Ue=Be.size;x.isArrayOrTypedArray(Ue)&&(Ue=Ue[bt]),Ir=Be?l.symbolBackOffs[l.symbolNumber(Ke)]*Ue:0,Ir+=l.getMarkerStandoff(rt[bt],Fe)||0}var Me=Zt-Ir*Math.cos(wr),qe=Sr-Ir*Math.sin(wr);(Me<=Zt&&Me>=kt||Me>=Zt&&Me<=kt)&&(qe<=Sr&&qe>=Vt||qe>=Sr&&qe<=Vt)&&(Ee=[Me,qe])}return Ee}l.applyBackoff=G,l.makeTester=function(){var Ee=x.ensureSingleById(d.select("body"),"svg","js-plotly-tester",function(fe){fe.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),_e=x.ensureSingle(Ee,"path","js-reference-point",function(fe){fe.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});l.tester=Ee,l.testref=_e},l.savedBBoxes={};var $=0,J=1e4;l.bBox=function(Ee,_e,fe){fe||(fe=X(Ee));var Fe;if(fe){if(Fe=l.savedBBoxes[fe],Fe)return x.extendFlat({},Fe)}else if(Ee.childNodes.length===1){var rt=Ee.childNodes[0];if(fe=X(rt),fe){var st=+rt.getAttribute("x")||0,Qe=+rt.getAttribute("y")||0,Lt=rt.getAttribute("transform");if(!Lt){var kt=l.bBox(rt,!1,fe);return st&&(kt.left+=st,kt.right+=st),Qe&&(kt.top+=Qe,kt.bottom+=Qe),kt}if(fe+="~"+st+"~"+Qe+"~"+Lt,Fe=l.savedBBoxes[fe],Fe)return x.extendFlat({},Fe)}}var Vt,Zt;_e?Vt=Ee:(Zt=l.tester.node(),Vt=Ee.cloneNode(!0),Zt.appendChild(Vt)),d.select(Vt).attr("transform",null).call(i.positionText,0,0);var Sr=Vt.getBoundingClientRect(),xr=l.testref.node().getBoundingClientRect();_e||Zt.removeChild(Vt);var jr={height:Sr.height,width:Sr.width,left:Sr.left-xr.left,top:Sr.top-xr.top,right:Sr.right-xr.left,bottom:Sr.bottom-xr.top};return $>=J&&(l.savedBBoxes={},$=0),fe&&(l.savedBBoxes[fe]=jr),$++,x.extendFlat({},jr)};function X(Ee){var _e=Ee.getAttribute("data-unformatted");if(_e!==null)return _e+Ee.getAttribute("data-math")+Ee.getAttribute("text-anchor")+Ee.getAttribute("style")}l.setClipUrl=function(Ee,_e,fe){Ee.attr("clip-path",oe(_e,fe))};function oe(Ee,_e){if(!Ee)return null;var fe=_e._context,Fe=fe._exportedPlot?"":fe._baseUrl||"";return Fe?"url('"+Fe+"#"+Ee+"')":"url(#"+Ee+")"}l.getTranslate=function(Ee){var _e=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,fe=Ee.attr?"attr":"getAttribute",Fe=Ee[fe]("transform")||"",rt=Fe.replace(_e,function(st,Qe,Lt){return[Qe,Lt].join(" ")}).split(" ");return{x:+rt[0]||0,y:+rt[1]||0}},l.setTranslate=function(Ee,_e,fe){var Fe=/(\btranslate\(.*?\);?)/,rt=Ee.attr?"attr":"getAttribute",st=Ee.attr?"attr":"setAttribute",Qe=Ee[rt]("transform")||"";return _e=_e||0,fe=fe||0,Qe=Qe.replace(Fe,"").trim(),Qe+=a(_e,fe),Qe=Qe.trim(),Ee[st]("transform",Qe),Qe},l.getScale=function(Ee){var _e=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,fe=Ee.attr?"attr":"getAttribute",Fe=Ee[fe]("transform")||"",rt=Fe.replace(_e,function(st,Qe,Lt){return[Qe,Lt].join(" ")}).split(" ");return{x:+rt[0]||1,y:+rt[1]||1}},l.setScale=function(Ee,_e,fe){var Fe=/(\bscale\(.*?\);?)/,rt=Ee.attr?"attr":"getAttribute",st=Ee.attr?"attr":"setAttribute",Qe=Ee[rt]("transform")||"";return _e=_e||1,fe=fe||1,Qe=Qe.replace(Fe,"").trim(),Qe+="scale("+_e+","+fe+")",Qe=Qe.trim(),Ee[st]("transform",Qe),Qe};var ie=/\s*sc.*/;l.setPointGroupScale=function(Ee,_e,fe){if(_e=_e||1,fe=fe||1,!!Ee){var Fe=_e===1&&fe===1?"":"scale("+_e+","+fe+")";Ee.each(function(){var rt=(this.getAttribute("transform")||"").replace(ie,"");rt+=Fe,rt=rt.trim(),this.setAttribute("transform",rt)})}};var j=/translate\([^)]*\)\s*$/;l.setTextPointsScale=function(Ee,_e,fe){Ee&&Ee.each(function(){var Fe,rt=d.select(this),st=rt.select("text");if(st.node()){var Qe=parseFloat(st.attr("x")||0),Lt=parseFloat(st.attr("y")||0),kt=(rt.attr("transform")||"").match(j);_e===1&&fe===1?Fe=[]:Fe=[a(Qe,Lt),"scale("+_e+","+fe+")",a(-Qe,-Lt)],kt&&Fe.push(kt),rt.attr("transform",Fe.join(""))}})};function ee(Ee,_e){var fe;return Ee&&(fe=Ee.mf),fe===void 0&&(fe=_e.marker&&_e.marker.standoff||0),!_e._geo&&!_e._xA?-fe:fe}l.getMarkerStandoff=ee;var re=Math.atan2,ce=Math.cos,be=Math.sin;function Ae(Ee,_e){var fe=_e[0],Fe=_e[1];return[fe*ce(Ee)-Fe*be(Ee),fe*be(Ee)+Fe*ce(Ee)]}var ze,Re,Xe,it,ot,tt;function lt(Ee,_e){var fe=Ee.ma;fe===void 0&&(fe=_e.marker.angle,(!fe||x.isArrayOrTypedArray(fe))&&(fe=0));var Fe,rt,st=_e.marker.angleref;if(st==="previous"||st==="north"){if(_e._geo){var Qe=_e._geo.project(Ee.lonlat);Fe=Qe[0],rt=Qe[1]}else{var Lt=_e._xA,kt=_e._yA;if(Lt&&kt)Fe=Lt.c2p(Ee.x),rt=kt.c2p(Ee.y);else return 90}if(_e._geo){var Vt=Ee.lonlat[0],Zt=Ee.lonlat[1],Sr=_e._geo.project([Vt,Zt+1e-5]),xr=_e._geo.project([Vt+1e-5,Zt]),jr=re(xr[1]-rt,xr[0]-Fe),wr=re(Sr[1]-rt,Sr[0]-Fe),Ir;if(st==="north")Ir=fe/180*Math.PI;else if(st==="previous"){var bt=Vt/180*Math.PI,Be=Zt/180*Math.PI,Ke=ze/180*Math.PI,Ue=Re/180*Math.PI,Me=Ke-bt,qe=ce(Ue)*be(Me),Ce=be(Ue)*ce(Be)-ce(Ue)*be(Be)*ce(Me);Ir=-re(qe,Ce)-Math.PI,ze=Vt,Re=Zt}var Te=Ae(jr,[ce(Ir),0]),Pe=Ae(wr,[be(Ir),0]);fe=re(Te[1]+Pe[1],Te[0]+Pe[0])/Math.PI*180,st==="previous"&&!(tt===_e.uid&&Ee.i===ot+1)&&(fe=null)}if(st==="previous"&&!_e._geo)if(tt===_e.uid&&Ee.i===ot+1&&M(Fe)&&M(rt)){var at=Fe-Xe,yt=rt-it,Tt=_e.line&&_e.line.shape||"",Ot=Tt.slice(Tt.length-1);Ot==="h"&&(yt=0),Ot==="v"&&(at=0),fe+=re(yt,at)/Math.PI*180+90}else fe=null}return Xe=Fe,it=rt,ot=Ee.i,tt=_e.uid,fe}l.getMarkerAngle=lt}}),Z0=Ze({"src/components/titles/index.js"(Z,q){"use strict";var d=On(),x=ns(),A=xc(),M=oo(),e=ca(),t=e.strTranslate,r=as(),o=Yn(),a=fu(),i=Zm(),n=mh().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,f=1.6;function g(v,T,l){var _=v._fullLayout,w=l.propContainer,S=l.propName,E=l.placeholder,y=l.traceIndex,b=l.avoid||{},p=l.attributes,u=l.transform,m=l.containerGroup,h=1,P=w.title,L=(P&&P.text?P.text:"").trim(),z=!1,F=P&&P.font?P.font:{},B=F.family,O=F.size,I=F.color,N=F.weight,U=F.style,W=F.variant,Q=F.textcase,ue=F.lineposition,le=F.shadow,he=l.subtitlePropName,G=!!he,$=l.subtitlePlaceholder,J=(w.title||{}).subtitle||{text:"",font:{}},X=J.text.trim(),oe=!1,ie=1,j=J.font,ee=j.family,re=j.size,ce=j.color,be=j.weight,Ae=j.style,ze=j.variant,Re=j.textcase,Xe=j.lineposition,it=j.shadow,ot;S==="title.text"?ot="titleText":S.indexOf("axis")!==-1?ot="axisTitleText":S.indexOf("colorbar")!==-1&&(ot="colorbarTitleText");var tt=v._context.edits[ot];function lt(xr,jr){return xr===void 0||jr===void 0?!1:xr.replace(s," % ")===jr.replace(s," % ")}L===""?h=0:lt(L,E)&&(tt||(L=""),h=.2,z=!0),G&&(X===""?ie=0:lt(X,$)&&(tt||(X=""),ie=.2,oe=!0)),l._meta?L=e.templateString(L,l._meta):_._meta&&(L=e.templateString(L,_._meta));var Ee=L||X||tt,_e;m||(m=e.ensureSingle(_._infolayer,"g","g-"+T),_e=_._hColorbarMoveTitle);var fe=m.selectAll("text."+T).data(Ee?[0]:[]);fe.enter().append("text"),fe.text(L).attr("class",T),fe.exit().remove();var Fe=null,rt=T+"-subtitle",st=X||tt;if(G&&st&&(Fe=m.selectAll("text."+rt).data(st?[0]:[]),Fe.enter().append("text"),Fe.text(X).attr("class",rt),Fe.exit().remove()),!Ee)return m;function Qe(xr,jr){e.syncOrAsync([Lt,kt],{title:xr,subtitle:jr})}function Lt(xr){var jr=xr.title,wr=xr.subtitle,Ir;!u&&_e&&(u={}),u?(Ir="",u.rotate&&(Ir+="rotate("+[u.rotate,p.x,p.y]+")"),(u.offset||_e)&&(Ir+=t(0,(u.offset||0)-(_e||0)))):Ir=null,jr.attr("transform",Ir);function bt(Ce){if(Ce){var Te=d.select(Ce.node().parentNode).select("."+rt);if(!Te.empty()){var Pe=Ce.node().getBBox();if(Pe.height){var at=Pe.y+Pe.height+c*re;Te.attr("y",at)}}}}if(jr.style("opacity",h*o.opacity(I)).call(r.font,{color:o.rgb(I),size:d.round(O,2),family:B,weight:N,style:U,variant:W,textcase:Q,shadow:le,lineposition:ue}).attr(p).call(a.convertToTspans,v,bt),wr){var Be=m.select("."+T+"-math-group"),Ke=jr.node().getBBox(),Ue=Be.node()?Be.node().getBBox():void 0,Me=Ue?Ue.y+Ue.height+c*re:Ke.y+Ke.height+f*re,qe=e.extendFlat({},p,{y:Me});wr.attr("transform",Ir),wr.style("opacity",ie*o.opacity(ce)).call(r.font,{color:o.rgb(ce),size:d.round(re,2),family:ee,weight:be,style:Ae,variant:ze,textcase:Re,shadow:it,lineposition:Xe}).attr(qe).call(a.convertToTspans,v)}return A.previousPromises(v)}function kt(xr){var jr=xr.title,wr=d.select(jr.node().parentNode);if(b&&b.selection&&b.side&&L){wr.attr("transform",null);var Ir=n[b.side],bt=b.side==="left"||b.side==="top"?-1:1,Be=x(b.pad)?b.pad:2,Ke=r.bBox(wr.node()),Ue={t:0,b:0,l:0,r:0},Me=v._fullLayout._reservedMargin;for(var qe in Me)for(var Ce in Me[qe]){var Te=Me[qe][Ce];Ue[Ce]=Math.max(Ue[Ce],Te)}var Pe={left:Ue.l,top:Ue.t,right:_.width-Ue.r,bottom:_.height-Ue.b},at=b.maxShift||bt*(Pe[b.side]-Ke[b.side]),yt=0;if(at<0)yt=at;else{var Tt=b.offsetLeft||0,Ot=b.offsetTop||0;Ke.left-=Tt,Ke.right-=Tt,Ke.top-=Ot,Ke.bottom-=Ot,b.selection.each(function(){var rr=r.bBox(this);e.bBoxIntersect(Ke,rr,Be)&&(yt=Math.max(yt,bt*(rr[b.side]-Ke[Ir])+Be))}),yt=Math.min(at,yt),w._titleScoot=Math.abs(yt)}if(yt>0||at<0){var Gt={left:[-yt,0],right:[yt,0],top:[0,-yt],bottom:[0,yt]}[b.side];wr.attr("transform",t(Gt[0],Gt[1]))}}}fe.call(Qe,Fe);function Vt(xr,jr){xr.text(jr).on("mouseover.opacity",function(){d.select(this).transition().duration(i.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){d.select(this).transition().duration(i.HIDE_PLACEHOLDER).style("opacity",0)})}if(tt&&(L?fe.on(".opacity",null):(Vt(fe,E),z=!0),fe.call(a.makeEditable,{gd:v}).on("edit",function(xr){y!==void 0?M.call("_guiRestyle",v,S,xr,y):M.call("_guiRelayout",v,S,xr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Qe)}).on("input",function(xr){this.text(xr||" ").call(a.positionText,p.x,p.y)}),G)){if(G&&!L){var Zt=fe.node().getBBox(),Sr=Zt.y+Zt.height+f*re;Fe.attr("y",Sr)}X?Fe.on(".opacity",null):(Vt(Fe,$),oe=!0),Fe.call(a.makeEditable,{gd:v}).on("edit",function(xr){M.call("_guiRelayout",v,"title.subtitle.text",xr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Qe)}).on("input",function(xr){this.text(xr||" ").call(a.positionText,Fe.attr("x"),Fe.attr("y"))})}return fe.classed("js-placeholder",z),Fe&&Fe.classed("js-placeholder",oe),m}q.exports={draw:g,SUBTITLE_PADDING_EM:f,SUBTITLE_PADDING_MATHJAX_EM:c}}}),wv=Ze({"src/plots/cartesian/set_convert.js"(Z,q){"use strict";var d=On(),x=jp().utcFormat,A=ca(),M=A.numberFormat,e=ns(),t=A.cleanNumber,r=A.ms2DateTime,o=A.dateTime2ms,a=A.ensureNumber,i=A.isArrayOrTypedArray,n=qs(),s=n.FP_SAFE,c=n.BADNUM,f=n.LOG_CLIP,g=n.ONEWEEK,v=n.ONEDAY,T=n.ONEHOUR,l=n.ONEMIN,_=n.ONESEC,w=$c(),S=kh(),E=S.HOUR_PATTERN,y=S.WEEKDAY_PATTERN;function b(u){return Math.pow(10,u)}function p(u){return u!=null}q.exports=function(m,h){h=h||{};var P=m._id||"x",L=P.charAt(0);function z(X,oe){if(X>0)return Math.log(X)/Math.LN10;if(X<=0&&oe&&m.range&&m.range.length===2){var ie=m.range[0],j=m.range[1];return .5*(ie+j-2*f*Math.abs(ie-j))}else return c}function F(X,oe,ie,j){if((j||{}).msUTC&&e(X))return+X;var ee=o(X,ie||m.calendar);if(ee===c)if(e(X)){X=+X;var re=Math.floor(A.mod(X+.05,1)*10),ce=Math.round(X-re/10);ee=o(new Date(ce))+re/10}else return c;return ee}function B(X,oe,ie){return r(X,oe,ie||m.calendar)}function O(X){return m._categories[Math.round(X)]}function I(X){if(p(X)){if(m._categoriesMap===void 0&&(m._categoriesMap={}),m._categoriesMap[X]!==void 0)return m._categoriesMap[X];m._categories.push(typeof X=="number"?String(X):X);var oe=m._categories.length-1;return m._categoriesMap[X]=oe,oe}return c}function N(X,oe){for(var ie=new Array(oe),j=0;j<oe;j++){var ee=(X[0]||[])[j],re=(X[1]||[])[j];ie[j]=U([ee,re])}return ie}function U(X){if(m._categoriesMap)return m._categoriesMap[X]}function W(X){var oe=U(X);if(oe!==void 0)return oe;if(e(X))return+X}function Q(X){return e(X)?+X:U(X)}function ue(X,oe,ie){return d.round(ie+oe*X,2)}function le(X,oe,ie){return(X-ie)/oe}var he=function(oe){return e(oe)?ue(oe,m._m,m._b):c},G=function(X){return le(X,m._m,m._b)};if(m.rangebreaks){var $=L==="y";he=function(X){if(!e(X))return c;var oe=m._rangebreaks.length;if(!oe)return ue(X,m._m,m._b);var ie=$;m.range[0]>m.range[1]&&(ie=!ie);for(var j=ie?-1:1,ee=j*X,re=0,ce=0;ce<oe;ce++){var be=j*m._rangebreaks[ce].min,Ae=j*m._rangebreaks[ce].max;if(ee<be)break;if(ee>Ae)re=ce+1;else{re=ee<(be+Ae)/2?ce:ce+1;break}}var ze=m._B[re]||0;return isFinite(ze)?ue(X,m._m2,ze):0},G=function(X){var oe=m._rangebreaks.length;if(!oe)return le(X,m._m,m._b);for(var ie=0,j=0;j<oe&&!(X<m._rangebreaks[j].pmin);j++)X>m._rangebreaks[j].pmax&&(ie=j+1);return le(X,m._m2,m._B[ie])}}m.c2l=m.type==="log"?z:a,m.l2c=m.type==="log"?b:a,m.l2p=he,m.p2l=G,m.c2p=m.type==="log"?function(X,oe){return he(z(X,oe))}:he,m.p2c=m.type==="log"?function(X){return b(G(X))}:G,["linear","-"].indexOf(m.type)!==-1?(m.d2r=m.r2d=m.d2c=m.r2c=m.d2l=m.r2l=t,m.c2d=m.c2r=m.l2d=m.l2r=a,m.d2p=m.r2p=function(X){return m.l2p(t(X))},m.p2d=m.p2r=G,m.cleanPos=a):m.type==="log"?(m.d2r=m.d2l=function(X,oe){return z(t(X),oe)},m.r2d=m.r2c=function(X){return b(t(X))},m.d2c=m.r2l=t,m.c2d=m.l2r=a,m.c2r=z,m.l2d=b,m.d2p=function(X,oe){return m.l2p(m.d2r(X,oe))},m.p2d=function(X){return b(G(X))},m.r2p=function(X){return m.l2p(t(X))},m.p2r=G,m.cleanPos=a):m.type==="date"?(m.d2r=m.r2d=A.identity,m.d2c=m.r2c=m.d2l=m.r2l=F,m.c2d=m.c2r=m.l2d=m.l2r=B,m.d2p=m.r2p=function(X,oe,ie){return m.l2p(F(X,0,ie))},m.p2d=m.p2r=function(X,oe,ie){return B(G(X),oe,ie)},m.cleanPos=function(X){return A.cleanDate(X,c,m.calendar)}):m.type==="category"?(m.d2c=m.d2l=I,m.r2d=m.c2d=m.l2d=O,m.d2r=m.d2l_noadd=W,m.r2c=function(X){var oe=Q(X);return oe!==void 0?oe:m.fraction2r(.5)},m.l2r=m.c2r=a,m.r2l=Q,m.d2p=function(X){return m.l2p(m.r2c(X))},m.p2d=function(X){return O(G(X))},m.r2p=m.d2p,m.p2r=G,m.cleanPos=function(X){return typeof X=="string"&&X!==""?X:a(X)}):m.type==="multicategory"&&(m.r2d=m.c2d=m.l2d=O,m.d2r=m.d2l_noadd=W,m.r2c=function(X){var oe=W(X);return oe!==void 0?oe:m.fraction2r(.5)},m.r2c_just_indices=U,m.l2r=m.c2r=a,m.r2l=W,m.d2p=function(X){return m.l2p(m.r2c(X))},m.p2d=function(X){return O(G(X))},m.r2p=m.d2p,m.p2r=G,m.cleanPos=function(X){return Array.isArray(X)||typeof X=="string"&&X!==""?X:a(X)},m.setupMultiCategory=function(X){var oe=m._traceIndices,ie,j,ee=m._matchGroup;if(ee&&m._categories.length===0){for(var re in ee)if(re!==P){var ce=h[w.id2name(re)];oe=oe.concat(ce._traceIndices)}}var be=[[0,{}],[0,{}]],Ae=[];for(ie=0;ie<oe.length;ie++){var ze=X[oe[ie]];if(L in ze){var Re=ze[L],Xe=ze._length||A.minRowLength(Re);if(i(Re[0])&&i(Re[1]))for(j=0;j<Xe;j++){var it=Re[0][j],ot=Re[1][j];p(it)&&p(ot)&&(Ae.push([it,ot]),it in be[0][1]||(be[0][1][it]=be[0][0]++),ot in be[1][1]||(be[1][1][ot]=be[1][0]++))}}}for(Ae.sort(function(tt,lt){var Ee=be[0][1],_e=Ee[tt[0]]-Ee[lt[0]];if(_e)return _e;var fe=be[1][1];return fe[tt[1]]-fe[lt[1]]}),ie=0;ie<Ae.length;ie++)I(Ae[ie])}),m.fraction2r=function(X){var oe=m.r2l(m.range[0]),ie=m.r2l(m.range[1]);return m.l2r(oe+X*(ie-oe))},m.r2fraction=function(X){var oe=m.r2l(m.range[0]),ie=m.r2l(m.range[1]);return(m.r2l(X)-oe)/(ie-oe)},m.limitRange=function(X){var oe=m.minallowed,ie=m.maxallowed;if(!(oe===void 0&&ie===void 0)){X||(X="range");var j=A.nestedProperty(m,X).get(),ee=A.simpleMap(j,m.r2l),re=ee[1]<ee[0];re&&ee.reverse();var ce=A.simpleMap([oe,ie],m.r2l);if(oe!==void 0&&ee[0]<ce[0]&&(j[re?1:0]=oe),ie!==void 0&&ee[1]>ce[1]&&(j[re?0:1]=ie),j[0]===j[1]){var be=m.l2r(oe),Ae=m.l2r(ie);if(oe!==void 0){var ze=be+1;ie!==void 0&&(ze=Math.min(ze,Ae)),j[re?1:0]=ze}if(ie!==void 0){var Re=Ae+1;oe!==void 0&&(Re=Math.max(Re,be)),j[re?0:1]=Re}}}},m.cleanRange=function(X,oe){m._cleanRange(X,oe),m.limitRange(X)},m._cleanRange=function(X,oe){oe||(oe={}),X||(X="range");var ie=A.nestedProperty(m,X).get(),j,ee;if(m.type==="date"?ee=A.dfltRange(m.calendar):L==="y"?ee=S.DFLTRANGEY:m._name==="realaxis"?ee=[0,1]:ee=oe.dfltRange||S.DFLTRANGEX,ee=ee.slice(),(m.rangemode==="tozero"||m.rangemode==="nonnegative")&&(ee[0]=0),!ie||ie.length!==2){A.nestedProperty(m,X).set(ee);return}var re=ie[0]===null,ce=ie[1]===null;for(m.type==="date"&&!m.autorange&&(ie[0]=A.cleanDate(ie[0],c,m.calendar),ie[1]=A.cleanDate(ie[1],c,m.calendar)),j=0;j<2;j++)if(m.type==="date"){if(!A.isDateTime(ie[j],m.calendar)){m[X]=ee;break}if(m.r2l(ie[0])===m.r2l(ie[1])){var be=A.constrain(m.r2l(ie[0]),A.MIN_MS+1e3,A.MAX_MS-1e3);ie[0]=m.l2r(be-1e3),ie[1]=m.l2r(be+1e3);break}}else{if(!e(ie[j]))if(!(re||ce)&&e(ie[1-j]))ie[j]=ie[1-j]*(j?10:.1);else{m[X]=ee;break}if(ie[j]<-s?ie[j]=-s:ie[j]>s&&(ie[j]=s),ie[0]===ie[1]){var Ae=Math.max(1,Math.abs(ie[0]*1e-6));ie[0]-=Ae,ie[1]+=Ae}}},m.setScale=function(X){var oe=h._size;if(m.overlaying){var ie=w.getFromId({_fullLayout:h},m.overlaying);m.domain=ie.domain}var j=X&&m._r?"_r":"range",ee=m.calendar;m.cleanRange(j);var re=m.r2l(m[j][0],ee),ce=m.r2l(m[j][1],ee),be=L==="y";if(be?(m._offset=oe.t+(1-m.domain[1])*oe.h,m._length=oe.h*(m.domain[1]-m.domain[0]),m._m=m._length/(re-ce),m._b=-m._m*ce):(m._offset=oe.l+m.domain[0]*oe.w,m._length=oe.w*(m.domain[1]-m.domain[0]),m._m=m._length/(ce-re),m._b=-m._m*re),m._rangebreaks=[],m._lBreaks=0,m._m2=0,m._B=[],m.rangebreaks){var Ae,ze;if(m._rangebreaks=m.locateBreaks(Math.min(re,ce),Math.max(re,ce)),m._rangebreaks.length){for(Ae=0;Ae<m._rangebreaks.length;Ae++)ze=m._rangebreaks[Ae],m._lBreaks+=Math.abs(ze.max-ze.min);var Re=be;re>ce&&(Re=!Re),Re&&m._rangebreaks.reverse();var Xe=Re?-1:1;for(m._m2=Xe*m._length/(Math.abs(ce-re)-m._lBreaks),m._B.push(-m._m2*(be?ce:re)),Ae=0;Ae<m._rangebreaks.length;Ae++)ze=m._rangebreaks[Ae],m._B.push(m._B[m._B.length-1]-Xe*m._m2*(ze.max-ze.min));for(Ae=0;Ae<m._rangebreaks.length;Ae++)ze=m._rangebreaks[Ae],ze.pmin=he(ze.min),ze.pmax=he(ze.max)}}if(!isFinite(m._m)||!isFinite(m._b)||m._length<0)throw h._replotting=!1,new Error("Something went wrong with axis scaling")},m.maskBreaks=function(X){var oe=m.rangebreaks||[],ie,j,ee,re,ce;oe._cachedPatterns||(oe._cachedPatterns=oe.map(function(Ee){return Ee.enabled&&Ee.bounds?A.simpleMap(Ee.bounds,Ee.pattern?t:m.d2c):null})),oe._cachedValues||(oe._cachedValues=oe.map(function(Ee){return Ee.enabled&&Ee.values?A.simpleMap(Ee.values,m.d2c).sort(A.sorterAsc):null}));for(var be=0;be<oe.length;be++){var Ae=oe[be];if(Ae.enabled){if(Ae.bounds){var ze=Ae.pattern;switch(ie=oe._cachedPatterns[be],j=ie[0],ee=ie[1],ze){case y:ce=new Date(X),re=ce.getUTCDay(),j>ee&&(ee+=7,re<j&&(re+=7));break;case E:ce=new Date(X);var Re=ce.getUTCHours(),Xe=ce.getUTCMinutes(),it=ce.getUTCSeconds(),ot=ce.getUTCMilliseconds();re=Re+(Xe/60+it/3600+ot/36e5),j>ee&&(ee+=24,re<j&&(re+=24));break;case"":re=X;break}if(re>=j&&re<ee)return c}else for(var tt=oe._cachedValues[be],lt=0;lt<tt.length;lt++)if(j=tt[lt],ee=j+Ae.dvalue,X>=j&&X<ee)return c}}return X},m.locateBreaks=function(X,oe){var ie,j,ee,re,ce=[];if(!m.rangebreaks)return ce;var be=m.rangebreaks.slice().sort(function(fe,Fe){return fe.pattern===y&&Fe.pattern===E?-1:Fe.pattern===y&&fe.pattern===E?1:0}),Ae=function(fe,Fe){if(fe=A.constrain(fe,X,oe),Fe=A.constrain(Fe,X,oe),fe!==Fe){for(var rt=!0,st=0;st<ce.length;st++){var Qe=ce[st];fe<Qe.max&&Fe>=Qe.min&&(fe<Qe.min&&(Qe.min=fe),Fe>Qe.max&&(Qe.max=Fe),rt=!1)}rt&&ce.push({min:fe,max:Fe})}};for(ie=0;ie<be.length;ie++){var ze=be[ie];if(ze.enabled)if(ze.bounds){var Re=X,Xe=oe;ze.pattern&&(Re=Math.floor(Re)),j=A.simpleMap(ze.bounds,ze.pattern?t:m.r2l),ee=j[0],re=j[1];var it=new Date(Re),ot,tt;switch(ze.pattern){case y:tt=g,ot=((re<ee?7:0)+(re-ee))*v,Re+=ee*v-(it.getUTCDay()*v+it.getUTCHours()*T+it.getUTCMinutes()*l+it.getUTCSeconds()*_+it.getUTCMilliseconds());break;case E:tt=v,ot=((re<ee?24:0)+(re-ee))*T,Re+=ee*T-(it.getUTCHours()*T+it.getUTCMinutes()*l+it.getUTCSeconds()*_+it.getUTCMilliseconds());break;default:Re=Math.min(j[0],j[1]),Xe=Math.max(j[0],j[1]),tt=Xe-Re,ot=tt}for(var lt=Re;lt<Xe;lt+=tt)Ae(lt,lt+ot)}else for(var Ee=A.simpleMap(ze.values,m.d2c),_e=0;_e<Ee.length;_e++)ee=Ee[_e],re=ee+ze.dvalue,Ae(ee,re)}return ce.sort(function(fe,Fe){return fe.min-Fe.min}),ce},m.makeCalcdata=function(X,oe,ie){var j,ee,re,ce,be=m.type,Ae=be==="date"&&X[oe+"calendar"];if(oe in X){if(j=X[oe],ce=X._length||A.minRowLength(j),A.isTypedArray(j)&&(be==="linear"||be==="log")){if(ce===j.length)return j;if(j.subarray)return j.subarray(0,ce)}if(be==="multicategory")return N(j,ce);for(ee=new Array(ce),re=0;re<ce;re++)ee[re]=m.d2c(j[re],0,Ae,ie)}else{var ze=oe+"0"in X?m.d2c(X[oe+"0"],0,Ae):0,Re=X["d"+oe]?Number(X["d"+oe]):1;for(j=X[{x:"y",y:"x"}[oe]],ce=X._length||j.length,ee=new Array(ce),re=0;re<ce;re++)ee[re]=ze+re*Re}if(m.rangebreaks)for(re=0;re<ce;re++)ee[re]=m.maskBreaks(ee[re]);return ee},m.isValidRange=function(X,oe){return Array.isArray(X)&&X.length===2&&(oe&&X[0]===null||e(m.r2l(X[0])))&&(oe&&X[1]===null||e(m.r2l(X[1])))},m.getAutorangeDflt=function(X,oe){var ie=!m.isValidRange(X,"nullOk");return ie&&oe&&oe.reverseDflt?ie="reversed":X&&(X[0]===null&&X[1]===null?ie=!0:X[0]===null&&X[1]!==null?ie="min":X[0]!==null&&X[1]===null&&(ie="max")),ie},m.isReversed=function(){var X=m.autorange;return X==="reversed"||X==="min reversed"||X==="max reversed"},m.isPtWithinRange=function(X,oe){var ie=m.c2l(X[L],null,oe),j=m.r2l(m.range[0]),ee=m.r2l(m.range[1]);return j<ee?j<=ie&&ie<=ee:ee<=ie&&ie<=j},m._emptyCategories=function(){m._categories=[],m._categoriesMap={}},m.clearCalc=function(){var X=m._matchGroup;if(X){var oe=null,ie=null;for(var j in X){var ee=h[w.id2name(j)];if(ee._categories){oe=ee._categories,ie=ee._categoriesMap;break}}oe&&ie?(m._categories=oe,m._categoriesMap=ie):m._emptyCategories()}else m._emptyCategories();if(m._initialCategories)for(var re=0;re<m._initialCategories.length;re++)I(m._initialCategories[re])},m.sortByInitialCategories=function(){var X=[];if(m._emptyCategories(),m._initialCategories)for(var oe=0;oe<m._initialCategories.length;oe++)I(m._initialCategories[oe]);X=X.concat(m._traceIndices);var ie=m._matchGroup;for(var j in ie)if(P!==j){var ee=h[w.id2name(j)];ee._categories=m._categories,ee._categoriesMap=m._categoriesMap,X=X.concat(ee._traceIndices)}return X};var J=h._d3locale;m.type==="date"&&(m._dateFormat=J?J.timeFormat:x,m._extraFormat=h._extraFormat),m._separators=h.separators,m._numFormat=J?J.numberFormat:M,delete m._minDtick,delete m._forceTick0}}}),a1=Ze({"src/plots/cartesian/axis_autotype.js"(Z,q){"use strict";var d=ns(),x=ca(),A=qs().BADNUM,M=x.isArrayOrTypedArray,e=x.isDateTime,t=x.cleanNumber,r=Math.round;q.exports=function(g,v,T){var l=g,_=T.noMultiCategory;if(M(l)&&!l.length)return"-";if(!_&&c(l))return"multicategory";if(_&&Array.isArray(l[0])){for(var w=[],S=0;S<l.length;S++)if(M(l[S]))for(var E=0;E<l[S].length;E++)w.push(l[S][E]);l=w}if(i(l,v))return"date";var y=T.autotypenumbers!=="strict";return s(l,y)?"category":a(l,y)?"linear":"-"};function o(f,g){return g?d(f):typeof f=="number"}function a(f,g){for(var v=f.length,T=0;T<v;T++)if(o(f[T],g))return!0;return!1}function i(f,g){for(var v=f.length,T=n(v),l=0,_=0,w={},S=0;S<v;S+=T){var E=r(S),y=f[E],b=String(y);w[b]||(w[b]=1,e(y,g)&&l++,d(y)&&_++)}return l>_*2}function n(f){return Math.max(1,(f-1)/1e3)}function s(f,g){for(var v=f.length,T=n(v),l=0,_=0,w={},S=0;S<v;S+=T){var E=r(S),y=f[E],b=String(y);if(!w[b]){w[b]=1;var p=typeof y;p==="boolean"?_++:(g?t(y)!==A:p==="number")?l++:p==="string"&&_++}}return _>l*2}function c(f){return M(f[0])&&M(f[1])}}}),Yd=Ze({"src/plots/cartesian/autorange.js"(Z,q){"use strict";var d=On(),x=ns(),A=ca(),M=qs().FP_SAFE,e=oo(),t=as(),r=$c(),o=r.getFromId,a=r.isLinked;q.exports={applyAutorangeOptions:m,getAutoRange:i,makePadFn:s,doAutoRange:v,findExtremes:T,concatExtremes:g};function i(h,P){var L,z,F=[],B=h._fullLayout,O=s(B,P,0),I=s(B,P,1),N=g(h,P),U=N.min,W=N.max;if(U.length===0||W.length===0)return A.simpleMap(P.range,P.r2l);var Q=U[0].val,ue=W[0].val;for(L=1;L<U.length&&Q===ue;L++)Q=Math.min(Q,U[L].val);for(L=1;L<W.length&&Q===ue;L++)ue=Math.max(ue,W[L].val);var le=P.autorange,he=le==="reversed"||le==="min reversed"||le==="max reversed";if(!he&&P.range){var G=A.simpleMap(P.range,P.r2l);he=G[1]<G[0]}P.autorange==="reversed"&&(P.autorange=!0);var $=P.rangemode,J=$==="tozero",X=$==="nonnegative",oe=P._length,ie=oe/10,j=0,ee,re,ce,be,Ae,ze;for(L=0;L<U.length;L++)for(ee=U[L],z=0;z<W.length;z++)re=W[z],ze=re.val-ee.val-n(P,ee.val,re.val),ze>0&&(Ae=oe-O(ee)-I(re),Ae>ie?ze/Ae>j&&(ce=ee,be=re,j=ze/Ae):ze/oe>j&&(ce={val:ee.val,nopad:1},be={val:re.val,nopad:1},j=ze/oe));function Re(lt,Ee){return Math.max(lt,I(Ee))}if(Q===ue){var Xe=Q-1,it=Q+1;if(J)if(Q===0)F=[0,1];else{var ot=(Q>0?W:U).reduce(Re,0),tt=Q/(1-Math.min(.5,ot/oe));F=Q>0?[0,tt]:[tt,0]}else X?F=[Math.max(0,Xe),Math.max(1,it)]:F=[Xe,it]}else J?(ce.val>=0&&(ce={val:0,nopad:1}),be.val<=0&&(be={val:0,nopad:1})):X&&(ce.val-j*O(ce)<0&&(ce={val:0,nopad:1}),be.val<=0&&(be={val:1,nopad:1})),j=(be.val-ce.val-n(P,ee.val,re.val))/(oe-O(ce)-I(be)),F=[ce.val-j*O(ce),be.val+j*I(be)];return F=m(F,P),P.limitRange&&P.limitRange(),he&&F.reverse(),A.simpleMap(F,P.l2r||Number)}function n(h,P,L){var z=0;if(h.rangebreaks)for(var F=h.locateBreaks(P,L),B=0;B<F.length;B++){var O=F[B];z+=O.max-O.min}return z}function s(h,P,L){var z=.05*P._length,F=P._anchorAxis||{};if((P.ticklabelposition||"").indexOf("inside")!==-1||(F.ticklabelposition||"").indexOf("inside")!==-1){var B=P.isReversed();if(!B){var O=A.simpleMap(P.range,P.r2l);B=O[1]<O[0]}B&&(L=!L)}var I=0;return a(h,P._id)||(I=f(h,P,L)),z=Math.max(I,z),P.constrain==="domain"&&P._inputDomain&&(z*=(P._inputDomain[1]-P._inputDomain[0])/(P.domain[1]-P.domain[0])),function(U){return U.nopad?0:U.pad+(U.extrapad?z:I)}}var c=3;function f(h,P,L){var z=0,F=P._id.charAt(0)==="x";for(var B in h._plots){var O=h._plots[B];if(!(P._id!==O.xaxis._id&&P._id!==O.yaxis._id)){var I=(F?O.yaxis:O.xaxis)||{};if((I.ticklabelposition||"").indexOf("inside")!==-1&&(!L&&(I.side==="left"||I.side==="bottom")||L&&(I.side==="top"||I.side==="right"))){if(I._vals){var N=A.deg2rad(I._tickAngles[I._id+"tick"]||0),U=Math.abs(Math.cos(N)),W=Math.abs(Math.sin(N));if(!I._vals[0].bb){var Q=I._id+"tick",ue=I._selections[Q];ue.each(function(X){var oe=d.select(this),ie=oe.select(".text-math-group");ie.empty()&&(X.bb=t.bBox(oe.node()))})}for(var le=0;le<I._vals.length;le++){var he=I._vals[le],G=he.bb;if(G){var $=2*c+G.width,J=2*c+G.height;z=Math.max(z,F?Math.max($*U,J*W):Math.max(J*U,$*W))}}}I.ticks==="inside"&&I.ticklabelposition==="inside"&&(z+=I.ticklen||0)}}}return z}function g(h,P,L){var z=P._id,F=h._fullData,B=h._fullLayout,O=[],I=[],N,U,W;function Q($,J){for(N=0;N<J.length;N++){var X=$[J[N]],oe=(X._extremes||{})[z];if(X.visible===!0&&oe){for(U=0;U<oe.min.length;U++)W=oe.min[U],l(O,W.val,W.pad,{extrapad:W.extrapad});for(U=0;U<oe.max.length;U++)W=oe.max[U],_(I,W.val,W.pad,{extrapad:W.extrapad})}}}if(Q(F,P._traceIndices),Q(B.annotations||[],P._annIndices||[]),Q(B.shapes||[],P._shapeIndices||[]),P._matchGroup&&!L){for(var ue in P._matchGroup)if(ue!==P._id){var le=o(h,ue),he=g(h,le,!0),G=P._length/le._length;for(U=0;U<he.min.length;U++)W=he.min[U],l(O,W.val,W.pad*G,{extrapad:W.extrapad});for(U=0;U<he.max.length;U++)W=he.max[U],_(I,W.val,W.pad*G,{extrapad:W.extrapad})}}return{min:O,max:I}}function v(h,P,L){if(P.setScale(),P.autorange){P.range=L?L.slice():i(h,P),P._r=P.range.slice(),P._rl=A.simpleMap(P._r,P.r2l);var z=P._input,F={};F[P._attr+".range"]=P.range,F[P._attr+".autorange"]=P.autorange,e.call("_storeDirectGUIEdit",h.layout,h._fullLayout._preGUI,F),z.range=P.range.slice(),z.autorange=P.autorange}var B=P._anchorAxis;if(B&&B.rangeslider){var O=B.rangeslider[P._name];O&&O.rangemode==="auto"&&(O.range=i(h,P)),B._input.rangeslider[P._name]=A.extendFlat({},O)}}function T(h,P,L){L||(L={}),h._m||h.setScale();var z=[],F=[],B=P.length,O=L.padded||!1,I=L.tozero&&(h.type==="linear"||h.type==="-"),N=h.type==="log",U=!1,W=L.vpadLinearized||!1,Q,ue,le,he,G,$,J,X,oe;function ie(Re){if(Array.isArray(Re))return U=!0,function(it){return Math.max(Number(Re[it]||0),0)};var Xe=Math.max(Number(Re||0),0);return function(){return Xe}}var j=ie((h._m>0?L.ppadplus:L.ppadminus)||L.ppad||0),ee=ie((h._m>0?L.ppadminus:L.ppadplus)||L.ppad||0),re=ie(L.vpadplus||L.vpad),ce=ie(L.vpadminus||L.vpad);if(!U){if(X=1/0,oe=-1/0,N)for(Q=0;Q<B;Q++)ue=P[Q],ue<X&&ue>0&&(X=ue),ue>oe&&ue<M&&(oe=ue);else for(Q=0;Q<B;Q++)ue=P[Q],ue<X&&ue>-M&&(X=ue),ue>oe&&ue<M&&(oe=ue);P=[X,oe],B=2}var be={tozero:I,extrapad:O};function Ae(Re){le=P[Re],x(le)&&($=j(Re),J=ee(Re),W?(he=h.c2l(le)-ce(Re),G=h.c2l(le)+re(Re)):(X=le-ce(Re),oe=le+re(Re),N&&X<oe/10&&(X=oe/10),he=h.c2l(X),G=h.c2l(oe)),I&&(he=Math.min(0,he),G=Math.max(0,G)),S(he)&&l(z,he,J,be),S(G)&&_(F,G,$,be))}var ze=Math.min(6,B);for(Q=0;Q<ze;Q++)Ae(Q);for(Q=B-1;Q>=ze;Q--)Ae(Q);return{min:z,max:F,opts:L}}function l(h,P,L,z){w(h,P,L,z,E)}function _(h,P,L,z){w(h,P,L,z,y)}function w(h,P,L,z,F){for(var B=z.tozero,O=z.extrapad,I=!0,N=0;N<h.length&&I;N++){var U=h[N];if(F(U.val,P)&&U.pad>=L&&(U.extrapad||!O)){I=!1;break}else F(P,U.val)&&U.pad<=L&&(O||!U.extrapad)&&(h.splice(N,1),N--)}if(I){var W=B&&P===0;h.push({val:P,pad:W?0:L,extrapad:W?!1:O})}}function S(h){return x(h)&&Math.abs(h)<M}function E(h,P){return h<=P}function y(h,P){return h>=P}function b(h,P){var L=P.autorangeoptions;return L&&L.minallowed!==void 0&&u(P,L.minallowed,L.maxallowed)?L.minallowed:L&&L.clipmin!==void 0&&u(P,L.clipmin,L.clipmax)?Math.max(h,P.d2l(L.clipmin)):h}function p(h,P){var L=P.autorangeoptions;return L&&L.maxallowed!==void 0&&u(P,L.minallowed,L.maxallowed)?L.maxallowed:L&&L.clipmax!==void 0&&u(P,L.clipmin,L.clipmax)?Math.min(h,P.d2l(L.clipmax)):h}function u(h,P,L){return P!==void 0&&L!==void 0?(P=h.d2l(P),L=h.d2l(L),P<L):!0}function m(h,P){if(!P||!P.autorangeoptions)return h;var L=h[0],z=h[1],F=P.autorangeoptions.include;if(F!==void 0){var B=P.d2l(L),O=P.d2l(z);A.isArrayOrTypedArray(F)||(F=[F]);for(var I=0;I<F.length;I++){var N=P.d2l(F[I]);B>=N&&(B=N,L=N),O<=N&&(O=N,z=N)}}return L=b(L,P),z=p(z,P),[L,z]}}}),Wo=Ze({"src/plots/cartesian/axes.js"(Z,q){"use strict";var d=On(),x=ns(),A=xc(),M=oo(),e=ca(),t=e.strTranslate,r=fu(),o=Z0(),a=Yn(),i=as(),n=Wh(),s=l5(),c=qs(),f=c.ONEMAXYEAR,g=c.ONEAVGYEAR,v=c.ONEMINYEAR,T=c.ONEMAXQUARTER,l=c.ONEAVGQUARTER,_=c.ONEMINQUARTER,w=c.ONEMAXMONTH,S=c.ONEAVGMONTH,E=c.ONEMINMONTH,y=c.ONEWEEK,b=c.ONEDAY,p=b/2,u=c.ONEHOUR,m=c.ONEMIN,h=c.ONESEC,P=c.ONEMILLI,L=c.ONEMICROSEC,z=c.MINUS_SIGN,F=c.BADNUM,B={K:"zeroline"},O={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},W={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Q=mh(),ue=Q.MID_SHIFT,le=Q.CAP_SHIFT,he=Q.LINE_SPACING,G=Q.OPPOSITE_SIDE,$=3,J=q.exports={};J.setConvert=wv();var X=a1(),oe=$c(),ie=oe.idSort,j=oe.isLinked;J.id2name=oe.id2name,J.name2id=oe.name2id,J.cleanId=oe.cleanId,J.list=oe.list,J.listIds=oe.listIds,J.getFromId=oe.getFromId,J.getFromTrace=oe.getFromTrace;var ee=Yd();J.getAutoRange=ee.getAutoRange,J.findExtremes=ee.findExtremes;var re=1e-4;function ce(xt){var ct=(xt[1]-xt[0])*re;return[xt[0]-ct,xt[1]+ct]}J.coerceRef=function(xt,ct,Nr,Or,Rr,Lr){var Gr=Or.charAt(Or.length-1),Kr=Nr._fullLayout._subplots[Gr+"axis"],Ur=Or+"ref",aa={};return Rr||(Rr=Kr[0]||(typeof Lr=="string"?Lr:Lr[0])),Lr||(Lr=Rr),Kr=Kr.concat(Kr.map(function(da){return da+" domain"})),aa[Ur]={valType:"enumerated",values:Kr.concat(Lr?typeof Lr=="string"?[Lr]:Lr:[]),dflt:Rr},e.coerce(xt,ct,aa,Ur)},J.getRefType=function(xt){return xt===void 0?xt:xt==="paper"?"paper":xt==="pixel"?"pixel":/( domain)$/.test(xt)?"domain":"range"},J.coercePosition=function(xt,ct,Nr,Or,Rr,Lr){var Gr,Kr,Ur=J.getRefType(Or);if(Ur!=="range")Gr=e.ensureNumber,Kr=Nr(Rr,Lr);else{var aa=J.getFromId(ct,Or);Lr=aa.fraction2r(Lr),Kr=Nr(Rr,Lr),Gr=aa.cleanPos}xt[Rr]=Gr(Kr)},J.cleanPosition=function(xt,ct,Nr){var Or=Nr==="paper"||Nr==="pixel"?e.ensureNumber:J.getFromId(ct,Nr).cleanPos;return Or(xt)},J.redrawComponents=function(xt,ct){ct=ct||J.listIds(xt);var Nr=xt._fullLayout;function Or(Rr,Lr,Gr,Kr){for(var Ur=M.getComponentMethod(Rr,Lr),aa={},da=0;da<ct.length;da++)for(var fa=Nr[J.id2name(ct[da])],It=fa[Gr],dr=0;dr<It.length;dr++){var kr=It[dr];if(!aa[kr]&&(Ur(xt,kr),aa[kr]=1,Kr))return}}Or("annotations","drawOne","_annIndices"),Or("shapes","drawOne","_shapeIndices"),Or("images","draw","_imgIndices",!0),Or("selections","drawOne","_selectionIndices")};var be=J.getDataConversions=function(xt,ct,Nr,Or){var Rr,Lr=Nr==="x"||Nr==="y"||Nr==="z"?Nr:Or;if(e.isArrayOrTypedArray(Lr)){if(Rr={type:X(Or,void 0,{autotypenumbers:xt._fullLayout.autotypenumbers}),_categories:[]},J.setConvert(Rr),Rr.type==="category")for(var Gr=0;Gr<Or.length;Gr++)Rr.d2c(Or[Gr])}else Rr=J.getFromTrace(xt,ct,Lr);return Rr?{d2c:Rr.d2c,c2d:Rr.c2d}:Lr==="ids"?{d2c:ze,c2d:ze}:{d2c:Ae,c2d:Ae}};function Ae(xt){return+xt}function ze(xt){return String(xt)}J.getDataToCoordFunc=function(xt,ct,Nr,Or){return be(xt,ct,Nr,Or).d2c},J.counterLetter=function(xt){var ct=xt.charAt(0);if(ct==="x")return"y";if(ct==="y")return"x"},J.minDtick=function(xt,ct,Nr,Or){["log","category","multicategory"].indexOf(xt.type)!==-1||!Or?xt._minDtick=0:xt._minDtick===void 0?(xt._minDtick=ct,xt._forceTick0=Nr):xt._minDtick&&((xt._minDtick/ct+1e-6)%1<2e-6&&((Nr-xt._forceTick0)/ct%1+1.000001)%1<2e-6?(xt._minDtick=ct,xt._forceTick0=Nr):((ct/xt._minDtick+1e-6)%1>2e-6||((Nr-xt._forceTick0)/xt._minDtick%1+1.000001)%1>2e-6)&&(xt._minDtick=0))},J.saveRangeInitial=function(xt,ct){for(var Nr=J.list(xt,"",!0),Or=!1,Rr=0;Rr<Nr.length;Rr++){var Lr=Nr[Rr],Gr=Lr._rangeInitial0===void 0&&Lr._rangeInitial1===void 0,Kr=Gr||Lr.range[0]!==Lr._rangeInitial0||Lr.range[1]!==Lr._rangeInitial1,Ur=Lr.autorange;(Gr&&Ur!==!0||ct&&Kr)&&(Lr._rangeInitial0=Ur==="min"||Ur==="max reversed"?void 0:Lr.range[0],Lr._rangeInitial1=Ur==="max"||Ur==="min reversed"?void 0:Lr.range[1],Lr._autorangeInitial=Ur,Or=!0)}return Or},J.saveShowSpikeInitial=function(xt,ct){for(var Nr=J.list(xt,"",!0),Or=!1,Rr="on",Lr=0;Lr<Nr.length;Lr++){var Gr=Nr[Lr],Kr=Gr._showSpikeInitial===void 0,Ur=Kr||Gr.showspikes!==Gr._showspikes;(Kr||ct&&Ur)&&(Gr._showSpikeInitial=Gr.showspikes,Or=!0),Rr==="on"&&!Gr.showspikes&&(Rr="off")}return xt._fullLayout._cartesianSpikesEnabled=Rr,Or},J.autoBin=function(xt,ct,Nr,Or,Rr,Lr){var Gr=e.aggNums(Math.min,null,xt),Kr=e.aggNums(Math.max,null,xt);if(ct.type==="category"||ct.type==="multicategory")return{start:Gr-.5,end:Kr+.5,size:Math.max(1,Math.round(Lr)||1),_dataSpan:Kr-Gr};Rr||(Rr=ct.calendar);var Ur;if(ct.type==="log"?Ur={type:"linear",range:[Gr,Kr]}:Ur={type:ct.type,range:e.simpleMap([Gr,Kr],ct.c2r,0,Rr),calendar:Rr},J.setConvert(Ur),Lr=Lr&&s.dtick(Lr,Ur.type),Lr)Ur.dtick=Lr,Ur.tick0=s.tick0(void 0,Ur.type,Rr);else{var aa;if(Nr)aa=(Kr-Gr)/Nr;else{var da=e.distinctVals(xt),fa=Math.pow(10,Math.floor(Math.log(da.minDiff)/Math.LN10)),It=fa*e.roundUp(da.minDiff/fa,[.9,1.9,4.9,9.9],!0);aa=Math.max(It,2*e.stdev(xt)/Math.pow(xt.length,Or?.25:.4)),x(aa)||(aa=1)}J.autoTicks(Ur,aa)}var dr=Ur.dtick,kr=J.tickIncrement(J.tickFirst(Ur),dr,"reverse",Rr),ia,Ca;if(typeof dr=="number")kr=Re(kr,xt,Ur,Gr,Kr),Ca=1+Math.floor((Kr-kr)/dr),ia=kr+Ca*dr;else for(Ur.dtick.charAt(0)==="M"&&(kr=Xe(kr,xt,dr,Gr,Rr)),ia=kr,Ca=0;ia<=Kr;)ia=J.tickIncrement(ia,dr,!1,Rr),Ca++;return{start:ct.c2r(kr,0,Rr),end:ct.c2r(ia,0,Rr),size:dr,_dataSpan:Kr-Gr}};function Re(xt,ct,Nr,Or,Rr){var Lr=0,Gr=0,Kr=0,Ur=0;function aa(dr){return(1+(dr-xt)*100/Nr.dtick)%100<2}for(var da=0;da<ct.length;da++)ct[da]%1===0?Kr++:x(ct[da])||Ur++,aa(ct[da])&&Lr++,aa(ct[da]+Nr.dtick/2)&&Gr++;var fa=ct.length-Ur;if(Kr===fa&&Nr.type!=="date")Nr.dtick<1?xt=Or-.5*Nr.dtick:(xt-=.5,xt+Nr.dtick<Or&&(xt+=Nr.dtick));else if(Gr<fa*.1&&(Lr>fa*.3||aa(Or)||aa(Rr))){var It=Nr.dtick/2;xt+=xt+It<Or?It:-It}return xt}function Xe(xt,ct,Nr,Or,Rr){var Lr=e.findExactDates(ct,Rr),Gr=.8;if(Lr.exactDays>Gr){var Kr=Number(Nr.substr(1));Lr.exactYears>Gr&&Kr%12===0?xt=J.tickIncrement(xt,"M6","reverse")+b*1.5:Lr.exactMonths>Gr?xt=J.tickIncrement(xt,"M1","reverse")+b*15.5:xt-=p;var Ur=J.tickIncrement(xt,Nr);if(Ur<=Or)return Ur}return xt}J.prepMinorTicks=function(xt,ct,Nr){if(!ct.minor.dtick){delete xt.dtick;var Or=ct.dtick&&x(ct._tmin),Rr;if(Or){var Lr=J.tickIncrement(ct._tmin,ct.dtick,!0);Rr=[ct._tmin,Lr*.99+ct._tmin*.01]}else{var Gr=e.simpleMap(ct.range,ct.r2l);Rr=[Gr[0],.8*Gr[0]+.2*Gr[1]]}if(xt.range=e.simpleMap(Rr,ct.l2r),xt._isMinor=!0,J.prepTicks(xt,Nr),Or){var Kr=x(ct.dtick),Ur=x(xt.dtick),aa=Kr?ct.dtick:+ct.dtick.substring(1),da=Ur?xt.dtick:+xt.dtick.substring(1);Kr&&Ur?it(aa,da)?aa===2*y&&da===2*b&&(xt.dtick=y):aa===2*y&&da===3*b?xt.dtick=y:aa===y&&!(ct._input.minor||{}).nticks?xt.dtick=b:ot(aa/da,2.5)?xt.dtick=aa/2:xt.dtick=aa:String(ct.dtick).charAt(0)==="M"?Ur?xt.dtick="M1":it(aa,da)?aa>=12&&da===2&&(xt.dtick="M3"):xt.dtick=ct.dtick:String(xt.dtick).charAt(0)==="L"?String(ct.dtick).charAt(0)==="L"?it(aa,da)||(xt.dtick=ot(aa/da,2.5)?ct.dtick/2:ct.dtick):xt.dtick="D1":xt.dtick==="D2"&&+ct.dtick>1&&(xt.dtick=1)}xt.range=ct.range}ct.minor._tick0Init===void 0&&(xt.tick0=ct.tick0)};function it(xt,ct){return Math.abs((xt/ct+.5)%1-.5)<.001}function ot(xt,ct){return Math.abs(xt/ct-1)<.001}J.prepTicks=function(xt,ct){var Nr=e.simpleMap(xt.range,xt.r2l,void 0,void 0,ct);if(xt.tickmode==="auto"||!xt.dtick){var Or=xt.nticks,Rr;Or||(xt.type==="category"||xt.type==="multicategory"?(Rr=xt.tickfont?e.bigFont(xt.tickfont.size||12):15,Or=xt._length/Rr):(Rr=xt._id.charAt(0)==="y"?40:80,Or=e.constrain(xt._length/Rr,4,9)+1),xt._name==="radialaxis"&&(Or*=2)),xt.minor&&xt.minor.tickmode!=="array"||xt.tickmode==="array"&&(Or*=100),xt._roughDTick=Math.abs(Nr[1]-Nr[0])/Or,J.autoTicks(xt,xt._roughDTick),xt._minDtick>0&&xt.dtick<xt._minDtick*2&&(xt.dtick=xt._minDtick,xt.tick0=xt.l2r(xt._forceTick0))}xt.ticklabelmode==="period"&&lt(xt),xt.tick0||(xt.tick0=xt.type==="date"?"2000-01-01":0),xt.type==="date"&&xt.dtick<.1&&(xt.dtick=.1),xr(xt)};function tt(xt){return+xt.substring(1)}function lt(xt){var ct;function Nr(){return!(x(xt.dtick)||xt.dtick.charAt(0)!=="M")}var Or=Nr(),Rr=J.getTickFormat(xt);if(Rr){var Lr=xt._dtickInit!==xt.dtick;/%[fLQsSMX]/.test(Rr)||(/%[HI]/.test(Rr)?(ct=u,Lr&&!Or&&xt.dtick<u&&(xt.dtick=u)):/%p/.test(Rr)?(ct=p,Lr&&!Or&&xt.dtick<p&&(xt.dtick=p)):/%[Aadejuwx]/.test(Rr)?(ct=b,Lr&&!Or&&xt.dtick<b&&(xt.dtick=b)):/%[UVW]/.test(Rr)?(ct=y,Lr&&!Or&&xt.dtick<y&&(xt.dtick=y)):/%[Bbm]/.test(Rr)?(ct=S,Lr&&(Or?tt(xt.dtick)<1:xt.dtick<E)&&(xt.dtick="M1")):/%[q]/.test(Rr)?(ct=l,Lr&&(Or?tt(xt.dtick)<3:xt.dtick<_)&&(xt.dtick="M3")):/%[Yy]/.test(Rr)&&(ct=g,Lr&&(Or?tt(xt.dtick)<12:xt.dtick<v)&&(xt.dtick="M12")))}Or=Nr(),Or&&xt.tick0===xt._dowTick0&&(xt.tick0=xt._rawTick0),xt._definedDelta=ct}function Ee(xt,ct,Nr){for(var Or=0;Or<xt.length;Or++){var Rr=xt[Or].value,Lr=Or,Gr=Or+1;Or<xt.length-1?(Lr=Or,Gr=Or+1):Or>0?(Lr=Or-1,Gr=Or):(Lr=Or,Gr=Or);var Kr=xt[Lr].value,Ur=xt[Gr].value,aa=Math.abs(Ur-Kr),da=Nr||aa,fa=0;da>=v?aa>=v&&aa<=f?fa=aa:fa=g:Nr===l&&da>=_?aa>=_&&aa<=T?fa=aa:fa=l:da>=E?aa>=E&&aa<=w?fa=aa:fa=S:Nr===y&&da>=y?fa=y:da>=b?fa=b:Nr===p&&da>=p?fa=p:Nr===u&&da>=u&&(fa=u);var It;fa>=aa&&(fa=aa,It=!0);var dr=Rr+fa;if(ct.rangebreaks&&fa>0){for(var kr=84,ia=0,Ca=0;Ca<kr;Ca++){var Fa=(Ca+.5)/kr;ct.maskBreaks(Rr*(1-Fa)+Fa*dr)!==F&&ia++}fa*=ia/kr,fa||(xt[Or].drop=!0),It&&aa>y&&(fa=aa)}(fa>0||Or===0)&&(xt[Or].periodX=Rr+fa/2)}}J.calcTicks=function(ct,Nr){for(var Or=ct.type,Rr=ct.calendar,Lr=ct.ticklabelstep,Gr=ct.ticklabelmode==="period",Kr=ct.range[0]>ct.range[1],Ur=!ct.ticklabelindex||e.isArrayOrTypedArray(ct.ticklabelindex)?ct.ticklabelindex:[ct.ticklabelindex],aa=e.simpleMap(ct.range,ct.r2l,void 0,void 0,Nr),da=aa[1]<aa[0],fa=Math.min(aa[0],aa[1]),It=Math.max(aa[0],aa[1]),dr=Math.max(1e3,ct._length||0),kr=[],ia=[],Ca=[],Fa=[],Ya=[],ha=ct.minor&&(ct.minor.ticks||ct.minor.showgrid),Da=1;Da>=(ha?0:1);Da--){var Xi=!Da;Da?(ct._dtickInit=ct.dtick,ct._tick0Init=ct.tick0):(ct.minor._dtickInit=ct.minor.dtick,ct.minor._tick0Init=ct.minor.tick0);var Li=Da?ct:e.extendFlat({},ct,ct.minor);if(Xi?J.prepMinorTicks(Li,ct,Nr):J.prepTicks(Li,Nr),Li.tickmode==="array"){Da?(Ca=[],kr=Fe(ct,!Xi)):(Fa=[],ia=Fe(ct,!Xi));continue}if(Li.tickmode==="sync"){Ca=[],kr=fe(ct);continue}var fn=ce(aa),An=fn[0],kn=fn[1],zn=x(Li.dtick),Xn=Or==="log"&&!(zn||Li.dtick.charAt(0)==="L"),to=J.tickFirst(Li,Nr);if(Da){if(ct._tmin=to,to<An!==da)break;(Or==="category"||Or==="multicategory")&&(kn=da?Math.max(-.5,kn):Math.min(ct._categories.length-.5,kn))}var mo=null,pn=to,Jo;if(Da){var Xo;zn?Xo=ct.dtick:Or==="date"?typeof ct.dtick=="string"&&ct.dtick.charAt(0)==="M"&&(Xo=S*ct.dtick.substring(1)):Xo=ct._roughDTick,Jo=Math.round((ct.r2l(pn)-ct.r2l(ct.tick0))/Xo)-1}var Ts=Li.dtick;for(Li.rangebreaks&&Li._tick0Init!==Li.tick0&&(pn=ra(pn,ct),da||(pn=J.tickIncrement(pn,Ts,!da,Rr))),Da&&Gr&&(pn=J.tickIncrement(pn,Ts,!da,Rr),Jo--);da?pn>=kn:pn<=kn;pn=J.tickIncrement(pn,Ts,da,Rr)){if(Da&&Jo++,Li.rangebreaks&&!da){if(pn<An)continue;if(Li.maskBreaks(pn)===F&&ra(pn,Li)>=It)break}if(Ca.length>dr||pn===mo)break;mo=pn;var Po={value:pn};Da?(Xn&&pn!==(pn|0)&&(Po.simpleLabel=!0),Lr>1&&Jo%Lr&&(Po.skipLabel=!0),Ca.push(Po)):(Po.minor=!0,Fa.push(Po))}}if(!Fa||Fa.length<2)Ur=!1;else{var so=(Fa[1].value-Fa[0].value)*(Kr?-1:1);mi(so,ct.tickformat)||(Ur=!1)}if(!Ur)Ya=Ca;else{var Vn=Ca.concat(Fa);Gr&&Ca.length&&(Vn=Vn.slice(1)),Vn=Vn.sort(function(ro,As){return ro.value-As.value}).filter(function(ro,As,al){return As===0||ro.value!==al[As-1].value});var To=Vn.map(function(ro,As){return ro.minor===void 0&&!ro.skipLabel?As:null}).filter(function(ro){return ro!==null});To.forEach(function(ro){Ur.map(function(As){var al=ro+As;al>=0&&al<Vn.length&&e.pushUnique(Ya,Vn[al])})})}if(ha){var qo=ct.minor.ticks==="inside"&&ct.ticks==="outside"||ct.minor.ticks==="outside"&&ct.ticks==="inside";if(!qo){for(var Oo=Ca.map(function(ro){return ro.value}),lo=[],Co=0;Co<Fa.length;Co++){var os=Fa[Co],Ys=os.value;if(Oo.indexOf(Ys)===-1){for(var Os=!1,Yo=0;!Os&&Yo<Ca.length;Yo++)1e7+Ca[Yo].value===1e7+Ys&&(Os=!0);Os||lo.push(os)}}Fa=lo}}Gr&&Ee(Ya,ct,ct._definedDelta);var Ui;if(ct.rangebreaks){var Cn=ct._id.charAt(0)==="y",tl=1;ct.tickmode==="auto"&&(tl=ct.tickfont?ct.tickfont.size:12);var Bs=NaN;for(Ui=Ca.length-1;Ui>-1;Ui--){if(Ca[Ui].drop){Ca.splice(Ui,1);continue}Ca[Ui].value=ra(Ca[Ui].value,ct);var uo=ct.c2p(Ca[Ui].value);(Cn?Bs>uo-tl:Bs<uo+tl)?Ca.splice(da?Ui+1:Ui,1):Bs=uo}}ma(ct)&&Math.abs(aa[1]-aa[0])===360&&Ca.pop(),ct._tmax=(Ca[Ca.length-1]||{}).value,ct._prevDateHead="",ct._inCalcTicks=!0;var $s,ms=function(ro){ro.text="",ct._prevDateHead=$s};Ca=Ca.concat(Fa);function Is(ro,As){var al=J.tickText(ro,As.value,!1,As.simpleLabel),$n=As.periodX;return $n!==void 0&&(al.periodX=$n,($n>It||$n<fa)&&($n>It&&(al.periodX=It),$n<fa&&(al.periodX=fa),ms(al))),al}var rl;for(Ui=0;Ui<Ca.length;Ui++){var Sn=Ca[Ui].minor,po=Ca[Ui].value;Sn?(Ur&&Ya.indexOf(Ca[Ui])!==-1?rl=Is(ct,Ca[Ui]):rl={x:po},rl.minor=!0,ia.push(rl)):($s=ct._prevDateHead,rl=Is(ct,Ca[Ui]),(Ca[Ui].skipLabel||Ur&&Ya.indexOf(Ca[Ui])===-1)&&ms(rl),kr.push(rl))}return kr=kr.concat(ia),ct._inCalcTicks=!1,Gr&&kr.length&&(kr[0].noTick=!0),kr};function _e(xt,ct){return xt.rangebreaks&&(ct=ct.filter(function(Nr){return xt.maskBreaks(Nr.x)!==F})),ct}function fe(xt){var ct=xt._mainAxis,Nr=[];if(ct._vals){for(var Or=0;Or<ct._vals.length;Or++)if(!ct._vals[Or].noTick){var Rr=ct.l2p(ct._vals[Or].x),Lr=xt.p2l(Rr),Gr=J.tickText(xt,Lr);ct._vals[Or].minor&&(Gr.minor=!0,Gr.text=""),Nr.push(Gr)}}return Nr=_e(xt,Nr),Nr}function Fe(xt,ct){var Nr=e.simpleMap(xt.range,xt.r2l),Or=ce(Nr),Rr=Math.min(Or[0],Or[1]),Lr=Math.max(Or[0],Or[1]),Gr=xt.type==="category"?xt.d2l_noadd:xt.d2l;xt.type==="log"&&String(xt.dtick).charAt(0)!=="L"&&(xt.dtick="L"+Math.pow(10,Math.floor(Math.min(xt.range[0],xt.range[1]))-1));for(var Kr=[],Ur=0;Ur<=1;Ur++)if(!(ct!==void 0&&(ct&&Ur||ct===!1&&!Ur))&&!(Ur&&!xt.minor)){var aa=Ur?xt.minor.tickvals:xt.tickvals,da=Ur?[]:xt.ticktext;if(aa){e.isArrayOrTypedArray(da)||(da=[]);for(var fa=0;fa<aa.length;fa++){var It=Gr(aa[fa]);if(It>Rr&&It<Lr){var dr=J.tickText(xt,It,!1,String(da[fa]));Ur&&(dr.minor=!0,dr.text=""),Kr.push(dr)}}}}return Kr=_e(xt,Kr),Kr}var rt=[2,5,10],st=[1,2,3,6,12],Qe=[1,2,5,10,15,30],Lt=[1,2,3,7,14],kt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Vt=[-.301,0,.301,.699,1],Zt=[15,30,45,90,180];function Sr(xt,ct,Nr){return ct*e.roundUp(xt/ct,Nr)}J.autoTicks=function(xt,ct,Nr){var Or;function Rr(fa){return Math.pow(fa,Math.floor(Math.log(ct)/Math.LN10))}if(xt.type==="date"){xt.tick0=e.dateTick0(xt.calendar,0);var Lr=2*ct;if(Lr>g)ct/=g,Or=Rr(10),xt.dtick="M"+12*Sr(ct,Or,rt);else if(Lr>S)ct/=S,xt.dtick="M"+Sr(ct,1,st);else if(Lr>b){if(xt.dtick=Sr(ct,b,xt._hasDayOfWeekBreaks?[1,2,7,14]:Lt),!Nr){var Gr=J.getTickFormat(xt),Kr=xt.ticklabelmode==="period";Kr&&(xt._rawTick0=xt.tick0),/%[uVW]/.test(Gr)?xt.tick0=e.dateTick0(xt.calendar,2):xt.tick0=e.dateTick0(xt.calendar,1),Kr&&(xt._dowTick0=xt.tick0)}}else Lr>u?xt.dtick=Sr(ct,u,st):Lr>m?xt.dtick=Sr(ct,m,Qe):Lr>h?xt.dtick=Sr(ct,h,Qe):(Or=Rr(10),xt.dtick=Sr(ct,Or,rt))}else if(xt.type==="log"){xt.tick0=0;var Ur=e.simpleMap(xt.range,xt.r2l);if(xt._isMinor&&(ct*=1.5),ct>.7)xt.dtick=Math.ceil(ct);else if(Math.abs(Ur[1]-Ur[0])<1){var aa=1.5*Math.abs((Ur[1]-Ur[0])/ct);ct=Math.abs(Math.pow(10,Ur[1])-Math.pow(10,Ur[0]))/aa,Or=Rr(10),xt.dtick="L"+Sr(ct,Or,rt)}else xt.dtick=ct>.3?"D2":"D1"}else xt.type==="category"||xt.type==="multicategory"?(xt.tick0=0,xt.dtick=Math.ceil(Math.max(ct,1))):ma(xt)?(xt.tick0=0,Or=1,xt.dtick=Sr(ct,Or,Zt)):(xt.tick0=0,Or=Rr(10),xt.dtick=Sr(ct,Or,rt));if(xt.dtick===0&&(xt.dtick=1),!x(xt.dtick)&&typeof xt.dtick!="string"){var da=xt.dtick;throw xt.dtick=1,"ax.dtick error: "+String(da)}};function xr(xt){var ct=xt.dtick;if(xt._tickexponent=0,!x(ct)&&typeof ct!="string"&&(ct=1),(xt.type==="category"||xt.type==="multicategory")&&(xt._tickround=null),xt.type==="date"){var Nr=xt.r2l(xt.tick0),Or=xt.l2r(Nr).replace(/(^-|i)/g,""),Rr=Or.length;if(String(ct).charAt(0)==="M")Rr>10||Or.substr(5)!=="01-01"?xt._tickround="d":xt._tickround=+ct.substr(1)%12===0?"y":"m";else if(ct>=b&&Rr<=10||ct>=b*15)xt._tickround="d";else if(ct>=m&&Rr<=16||ct>=u)xt._tickround="M";else if(ct>=h&&Rr<=19||ct>=m)xt._tickround="S";else{var Lr=xt.l2r(Nr+ct).replace(/^-/,"").length;xt._tickround=Math.max(Rr,Lr)-20,xt._tickround<0&&(xt._tickround=4)}}else if(x(ct)||ct.charAt(0)==="L"){var Gr=xt.range.map(xt.r2d||Number);x(ct)||(ct=Number(ct.substr(1))),xt._tickround=2-Math.floor(Math.log(ct)/Math.LN10+.01);var Kr=Math.max(Math.abs(Gr[0]),Math.abs(Gr[1])),Ur=Math.floor(Math.log(Kr)/Math.LN10+.01),aa=xt.minexponent===void 0?3:xt.minexponent;Math.abs(Ur)>aa&&(Ce(xt.exponentformat)&&!Te(Ur)?xt._tickexponent=3*Math.round((Ur-1)/3):xt._tickexponent=Ur)}else xt._tickround=null}J.tickIncrement=function(xt,ct,Nr,Or){var Rr=Nr?-1:1;if(x(ct))return e.increment(xt,Rr*ct);var Lr=ct.charAt(0),Gr=Rr*Number(ct.substr(1));if(Lr==="M")return e.incrementMonth(xt,Gr,Or);if(Lr==="L")return Math.log(Math.pow(10,xt)+Gr)/Math.LN10;if(Lr==="D"){var Kr=ct==="D2"?Vt:kt,Ur=xt+Rr*.01,aa=e.roundUp(e.mod(Ur,1),Kr,Nr);return Math.floor(Ur)+Math.log(d.round(Math.pow(10,aa),1))/Math.LN10}throw"unrecognized dtick "+String(ct)},J.tickFirst=function(xt,ct){var Nr=xt.r2l||Number,Or=e.simpleMap(xt.range,Nr,void 0,void 0,ct),Rr=Or[1]<Or[0],Lr=Rr?Math.floor:Math.ceil,Gr=ce(Or)[0],Kr=xt.dtick,Ur=Nr(xt.tick0);if(x(Kr)){var aa=Lr((Gr-Ur)/Kr)*Kr+Ur;return(xt.type==="category"||xt.type==="multicategory")&&(aa=e.constrain(aa,0,xt._categories.length-1)),aa}var da=Kr.charAt(0),fa=Number(Kr.substr(1));if(da==="M"){for(var It=0,dr=Ur,kr,ia,Ca;It<10;){if(kr=J.tickIncrement(dr,Kr,Rr,xt.calendar),(kr-Gr)*(dr-Gr)<=0)return Rr?Math.min(dr,kr):Math.max(dr,kr);ia=(Gr-(dr+kr)/2)/(kr-dr),Ca=da+(Math.abs(Math.round(ia))||1)*fa,dr=J.tickIncrement(dr,Ca,ia<0?!Rr:Rr,xt.calendar),It++}return e.error("tickFirst did not converge",xt),dr}else{if(da==="L")return Math.log(Lr((Math.pow(10,Gr)-Ur)/fa)*fa+Ur)/Math.LN10;if(da==="D"){var Fa=Kr==="D2"?Vt:kt,Ya=e.roundUp(e.mod(Gr,1),Fa,Rr);return Math.floor(Gr)+Math.log(d.round(Math.pow(10,Ya),1))/Math.LN10}else throw"unrecognized dtick "+String(Kr)}},J.tickText=function(xt,ct,Nr,Or){var Rr=jr(xt,ct),Lr=xt.tickmode==="array",Gr=Nr||Lr,Kr=xt.type,Ur=Kr==="category"?xt.d2l_noadd:xt.d2l,aa,da=function(Ca){var Fa=xt.l2p(Ca);return Fa>=0&&Fa<=xt._length?Ca:null};if(Lr&&e.isArrayOrTypedArray(xt.ticktext)){var fa=e.simpleMap(xt.range,xt.r2l),It=(Math.abs(fa[1]-fa[0])-(xt._lBreaks||0))/1e4;for(aa=0;aa<xt.ticktext.length&&!(Math.abs(ct-Ur(xt.tickvals[aa]))<It);aa++);if(aa<xt.ticktext.length)return Rr.text=String(xt.ticktext[aa]),Rr.xbnd=[da(Rr.x-.5),da(Rr.x+xt.dtick-.5)],Rr}function dr(Ca){if(Ca===void 0)return!0;if(Nr)return Ca==="none";var Fa={first:xt._tmin,last:xt._tmax}[Ca];return Ca!=="all"&&ct!==Fa}var kr=Nr?"never":xt.exponentformat!=="none"&&dr(xt.showexponent)?"hide":"";if(Kr==="date"?wr(xt,Rr,Nr,Gr):Kr==="log"?Ir(xt,Rr,Nr,Gr,kr):Kr==="category"?bt(xt,Rr):Kr==="multicategory"?Be(xt,Rr,Nr):ma(xt)?Ue(xt,Rr,Nr,Gr,kr):Ke(xt,Rr,Nr,Gr,kr),Or||(xt.tickprefix&&!dr(xt.showtickprefix)&&(Rr.text=xt.tickprefix+Rr.text),xt.ticksuffix&&!dr(xt.showticksuffix)&&(Rr.text+=xt.ticksuffix)),xt.labelalias&&xt.labelalias.hasOwnProperty(Rr.text)){var ia=xt.labelalias[Rr.text];typeof ia=="string"&&(Rr.text=ia)}return(xt.tickson==="boundaries"||xt.showdividers)&&(Rr.xbnd=[da(Rr.x-.5),da(Rr.x+xt.dtick-.5)]),Rr},J.hoverLabelText=function(xt,ct,Nr){Nr&&(xt=e.extendFlat({},xt,{hoverformat:Nr}));var Or=e.isArrayOrTypedArray(ct)?ct[0]:ct,Rr=e.isArrayOrTypedArray(ct)?ct[1]:void 0;if(Rr!==void 0&&Rr!==Or)return J.hoverLabelText(xt,Or,Nr)+" - "+J.hoverLabelText(xt,Rr,Nr);var Lr=xt.type==="log"&&Or<=0,Gr=J.tickText(xt,xt.c2l(Lr?-Or:Or),"hover").text;return Lr?Or===0?"0":z+Gr:Gr};function jr(xt,ct,Nr){var Or=xt.tickfont||{};return{x:ct,dx:0,dy:0,text:Nr||"",fontSize:Or.size,font:Or.family,fontWeight:Or.weight,fontStyle:Or.style,fontVariant:Or.variant,fontTextcase:Or.textcase,fontLineposition:Or.lineposition,fontShadow:Or.shadow,fontColor:Or.color}}function wr(xt,ct,Nr,Or){var Rr=xt._tickround,Lr=Nr&&xt.hoverformat||J.getTickFormat(xt);Or=!Lr&&Or,Or&&(x(Rr)?Rr=4:Rr={y:"m",m:"d",d:"M",M:"S",S:4}[Rr]);var Gr=e.formatDate(ct.x,Lr,Rr,xt._dateFormat,xt.calendar,xt._extraFormat),Kr,Ur=Gr.indexOf(`
`);if(Ur!==-1&&(Kr=Gr.substr(Ur+1),Gr=Gr.substr(0,Ur)),Or&&(Kr!==void 0&&(Gr==="00:00:00"||Gr==="00:00")?(Gr=Kr,Kr=""):Gr.length===8&&(Gr=Gr.replace(/:00$/,""))),Kr)if(Nr)Rr==="d"?Gr+=", "+Kr:Gr=Kr+(Gr?", "+Gr:"");else if(!xt._inCalcTicks||xt._prevDateHead!==Kr)xt._prevDateHead=Kr,Gr+="<br>"+Kr;else{var aa=Ia(xt),da=xt._trueSide||xt.side;(!aa&&da==="top"||aa&&da==="bottom")&&(Gr+="<br> ")}ct.text=Gr}function Ir(xt,ct,Nr,Or,Rr){var Lr=xt.dtick,Gr=ct.x,Kr=xt.tickformat,Ur=typeof Lr=="string"&&Lr.charAt(0);if(Rr==="never"&&(Rr=""),Or&&Ur!=="L"&&(Lr="L3",Ur="L"),Kr||Ur==="L")ct.text=Pe(Math.pow(10,Gr),xt,Rr,Or);else if(x(Lr)||Ur==="D"&&(xt.minorloglabels==="complete"||e.mod(Gr+.01,1)<.1)){var aa;xt.minorloglabels==="complete"&&!(e.mod(Gr+.01,1)<.1)&&(aa=!0,ct.fontSize*=.75);var da=Math.pow(10,Gr).toExponential(0),fa=da.split("e"),It=+fa[1],dr=Math.abs(It),kr=xt.exponentformat;kr==="power"||Ce(kr)&&Te(It)?(ct.text=fa[0],dr>0&&(ct.text+="x10"),ct.text==="1x10"&&(ct.text="10"),It!==0&&It!==1&&(ct.text+="<sup>"+(It>0?"":z)+dr+"</sup>"),ct.fontSize*=1.25):(kr==="e"||kr==="E")&&dr>2?ct.text=fa[0]+kr+(It>0?"+":z)+dr:(ct.text=Pe(Math.pow(10,Gr),xt,"","fakehover"),Lr==="D1"&&xt._id.charAt(0)==="y"&&(ct.dy-=ct.fontSize/6))}else if(Ur==="D")ct.text=xt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,e.mod(Gr,1)))),ct.fontSize*=.75;else throw"unrecognized dtick "+String(Lr);if(xt.dtick==="D1"){var ia=String(ct.text).charAt(0);(ia==="0"||ia==="1")&&(xt._id.charAt(0)==="y"?ct.dx-=ct.fontSize/4:(ct.dy+=ct.fontSize/2,ct.dx+=(xt.range[1]>xt.range[0]?1:-1)*ct.fontSize*(Gr<0?.5:.25)))}}function bt(xt,ct){var Nr=xt._categories[Math.round(ct.x)];Nr===void 0&&(Nr=""),ct.text=String(Nr)}function Be(xt,ct,Nr){var Or=Math.round(ct.x),Rr=xt._categories[Or]||[],Lr=Rr[1]===void 0?"":String(Rr[1]),Gr=Rr[0]===void 0?"":String(Rr[0]);Nr?ct.text=Gr+" - "+Lr:(ct.text=Lr,ct.text2=Gr)}function Ke(xt,ct,Nr,Or,Rr){Rr==="never"?Rr="":xt.showexponent==="all"&&Math.abs(ct.x/xt.dtick)<1e-6&&(Rr="hide"),ct.text=Pe(ct.x,xt,Rr,Or)}function Ue(xt,ct,Nr,Or,Rr){if(xt.thetaunit==="radians"&&!Nr){var Lr=ct.x/180;if(Lr===0)ct.text="0";else{var Gr=Me(Lr);if(Gr[1]>=100)ct.text=Pe(e.deg2rad(ct.x),xt,Rr,Or);else{var Kr=ct.x<0;Gr[1]===1?Gr[0]===1?ct.text="\u03C0":ct.text=Gr[0]+"\u03C0":ct.text=["<sup>",Gr[0],"</sup>","\u2044","<sub>",Gr[1],"</sub>","\u03C0"].join(""),Kr&&(ct.text=z+ct.text)}}}else ct.text=Pe(ct.x,xt,Rr,Or)}function Me(xt){function ct(Kr,Ur){return Math.abs(Kr-Ur)<=1e-6}function Nr(Kr,Ur){return ct(Ur,0)?Kr:Nr(Ur,Kr%Ur)}function Or(Kr){for(var Ur=1;!ct(Math.round(Kr*Ur)/Ur,Kr);)Ur*=10;return Ur}var Rr=Or(xt),Lr=xt*Rr,Gr=Math.abs(Nr(Lr,Rr));return[Math.round(Lr/Gr),Math.round(Rr/Gr)]}var qe=["f","p","n","\u03BC","m","","k","M","G","T"];function Ce(xt){return xt==="SI"||xt==="B"}function Te(xt){return xt>14||xt<-15}function Pe(xt,ct,Nr,Or){var Rr=xt<0,Lr=ct._tickround,Gr=Nr||ct.exponentformat||"B",Kr=ct._tickexponent,Ur=J.getTickFormat(ct),aa=ct.separatethousands;if(Or){var da={exponentformat:Gr,minexponent:ct.minexponent,dtick:ct.showexponent==="none"?ct.dtick:x(xt)&&Math.abs(xt)||1,range:ct.showexponent==="none"?ct.range.map(ct.r2d):[0,xt||1]};xr(da),Lr=(Number(da._tickround)||0)+4,Kr=da._tickexponent,ct.hoverformat&&(Ur=ct.hoverformat)}if(Ur)return ct._numFormat(Ur)(xt).replace(/-/g,z);var fa=Math.pow(10,-Lr)/2;if(Gr==="none"&&(Kr=0),xt=Math.abs(xt),xt<fa)xt="0",Rr=!1;else{if(xt+=fa,Kr&&(xt*=Math.pow(10,-Kr),Lr+=Kr),Lr===0)xt=String(Math.floor(xt));else if(Lr<0){xt=String(Math.round(xt)),xt=xt.substr(0,xt.length+Lr);for(var It=Lr;It<0;It++)xt+="0"}else{xt=String(xt);var dr=xt.indexOf(".")+1;dr&&(xt=xt.substr(0,dr+Lr).replace(/\.?0+$/,""))}xt=e.numSeparate(xt,ct._separators,aa)}if(Kr&&Gr!=="hide"){Ce(Gr)&&Te(Kr)&&(Gr="power");var kr;Kr<0?kr=z+-Kr:Gr!=="power"?kr="+"+Kr:kr=String(Kr),Gr==="e"||Gr==="E"?xt+=Gr+kr:Gr==="power"?xt+="\xD710<sup>"+kr+"</sup>":Gr==="B"&&Kr===9?xt+="B":Ce(Gr)&&(xt+=qe[Kr/3+5])}return Rr?z+xt:xt}J.getTickFormat=function(xt){var ct;function Nr(Ur){return typeof Ur!="string"?Ur:Number(Ur.replace("M",""))*S}function Or(Ur,aa){var da=["L","D"];if(typeof Ur==typeof aa){if(typeof Ur=="number")return Ur-aa;var fa=da.indexOf(Ur.charAt(0)),It=da.indexOf(aa.charAt(0));return fa===It?Number(Ur.replace(/(L|D)/g,""))-Number(aa.replace(/(L|D)/g,"")):fa-It}else return typeof Ur=="number"?1:-1}function Rr(Ur,aa,da){var fa=da||function(kr){return kr},It=aa[0],dr=aa[1];return(!It&&typeof It!="number"||fa(It)<=fa(Ur))&&(!dr&&typeof dr!="number"||fa(dr)>=fa(Ur))}function Lr(Ur,aa){var da=aa[0]===null,fa=aa[1]===null,It=Or(Ur,aa[0])>=0,dr=Or(Ur,aa[1])<=0;return(da||It)&&(fa||dr)}var Gr,Kr;if(xt.tickformatstops&&xt.tickformatstops.length>0)switch(xt.type){case"date":case"linear":{for(ct=0;ct<xt.tickformatstops.length;ct++)if(Kr=xt.tickformatstops[ct],Kr.enabled&&Rr(xt.dtick,Kr.dtickrange,Nr)){Gr=Kr;break}break}case"log":{for(ct=0;ct<xt.tickformatstops.length;ct++)if(Kr=xt.tickformatstops[ct],Kr.enabled&&Lr(xt.dtick,Kr.dtickrange)){Gr=Kr;break}break}default:}return Gr?Gr.value:xt.tickformat},J.getSubplots=function(xt,ct){var Nr=xt._fullLayout._subplots,Or=Nr.cartesian.concat(Nr.gl2d||[]),Rr=ct?J.findSubplotsWithAxis(Or,ct):Or;return Rr.sort(function(Lr,Gr){var Kr=Lr.substr(1).split("y"),Ur=Gr.substr(1).split("y");return Kr[0]===Ur[0]?+Kr[1]-+Ur[1]:+Kr[0]-+Ur[0]}),Rr},J.findSubplotsWithAxis=function(xt,ct){for(var Nr=new RegExp(ct._id.charAt(0)==="x"?"^"+ct._id+"y":ct._id+"$"),Or=[],Rr=0;Rr<xt.length;Rr++){var Lr=xt[Rr];Nr.test(Lr)&&Or.push(Lr)}return Or},J.makeClipPaths=function(xt){var ct=xt._fullLayout;if(!ct._hasOnlyLargeSploms){var Nr={_offset:0,_length:ct.width,_id:""},Or={_offset:0,_length:ct.height,_id:""},Rr=J.list(xt,"x",!0),Lr=J.list(xt,"y",!0),Gr=[],Kr,Ur;for(Kr=0;Kr<Rr.length;Kr++)for(Gr.push({x:Rr[Kr],y:Or}),Ur=0;Ur<Lr.length;Ur++)Kr===0&&Gr.push({x:Nr,y:Lr[Ur]}),Gr.push({x:Rr[Kr],y:Lr[Ur]});var aa=ct._clips.selectAll(".axesclip").data(Gr,function(da){return da.x._id+da.y._id});aa.enter().append("clipPath").classed("axesclip",!0).attr("id",function(da){return"clip"+ct._uid+da.x._id+da.y._id}).append("rect"),aa.exit().remove(),aa.each(function(da){d.select(this).select("rect").attr({x:da.x._offset||0,y:da.y._offset||0,width:da.x._length||1,height:da.y._length||1})})}},J.draw=function(xt,ct,Nr){var Or=xt._fullLayout;ct==="redraw"&&Or._paper.selectAll("g.subplot").each(function(Ur){var aa=Ur[0],da=Or._plots[aa];if(da){var fa=da.xaxis,It=da.yaxis;da.xaxislayer.selectAll("."+fa._id+"tick").remove(),da.yaxislayer.selectAll("."+It._id+"tick").remove(),da.xaxislayer.selectAll("."+fa._id+"tick2").remove(),da.yaxislayer.selectAll("."+It._id+"tick2").remove(),da.xaxislayer.selectAll("."+fa._id+"divider").remove(),da.yaxislayer.selectAll("."+It._id+"divider").remove(),da.minorGridlayer&&da.minorGridlayer.selectAll("path").remove(),da.gridlayer&&da.gridlayer.selectAll("path").remove(),da.zerolinelayer&&da.zerolinelayer.selectAll("path").remove(),da.zerolinelayerAbove&&da.zerolinelayerAbove.selectAll("path").remove(),Or._infolayer.select(".g-"+fa._id+"title").remove(),Or._infolayer.select(".g-"+It._id+"title").remove()}});var Rr=!ct||ct==="redraw"?J.listIds(xt):ct,Lr=J.list(xt),Gr=Lr.filter(function(Ur){return Ur.autoshift}).map(function(Ur){return Ur.overlaying});Rr.map(function(Ur){var aa=J.getFromId(xt,Ur);if(aa.tickmode==="sync"&&aa.overlaying){var da=Rr.findIndex(function(fa){return fa===aa.overlaying});da>=0&&Rr.unshift(Rr.splice(da,1).shift())}});var Kr={false:{left:0,right:0}};return e.syncOrAsync(Rr.map(function(Ur){return function(){if(Ur){var aa=J.getFromId(xt,Ur);Nr||(Nr={}),Nr.axShifts=Kr,Nr.overlayingShiftedAx=Gr;var da=J.drawOne(xt,aa,Nr);return aa._shiftPusher&&$a(aa,aa._fullDepth||0,Kr,!0),aa._r=aa.range.slice(),aa._rl=e.simpleMap(aa._r,aa.r2l),da}}}))},J.drawOne=function(xt,ct,Nr){Nr=Nr||{};var Or=Nr.axShifts||{},Rr=Nr.overlayingShiftedAx||[],Lr,Gr,Kr;ct.setScale();var Ur=xt._fullLayout,aa=ct._id,da=aa.charAt(0),fa=J.counterLetter(aa),It=Ur._plots[ct._mainSubplot],dr=ct.zerolinelayer==="above traces";if(!It)return;if(ct._shiftPusher=ct.autoshift||Rr.indexOf(ct._id)!==-1||Rr.indexOf(ct.overlaying)!==-1,ct._shiftPusher&ct.anchor==="free"){var kr=ct.linewidth/2||0;ct.ticks==="inside"&&(kr+=ct.ticklen),$a(ct,kr,Or,!0),$a(ct,ct.shift||0,Or,!1)}(Nr.skipTitle!==!0||ct._shift===void 0)&&(ct._shift=ai(ct,Or));var ia=It[da+"axislayer"],Ca=ct._mainLinePosition,Fa=Ca+=ct._shift,Ya=ct._mainMirrorPosition,ha=ct._vals=J.calcTicks(ct),Da=[ct.mirror,Fa,Ya].join("_");for(Lr=0;Lr<ha.length;Lr++)ha[Lr].axInfo=Da;ct._selections={},ct._tickAngles&&(ct._prevTickAngles=ct._tickAngles),ct._tickAngles={},ct._depth=null;var Xi={};function Li(po){var ro=aa+(po||"tick");return Xi[ro]||(Xi[ro]=Gt(ct,ro,Fa)),Xi[ro]}if(ct.visible){var fn=J.makeTransTickFn(ct),An=J.makeTransTickLabelFn(ct),kn,zn,Xn=ct.ticks==="inside",to=ct.ticks==="outside";if(ct.tickson==="boundaries"){var mo=yt(ct,ha);zn=J.clipEnds(ct,mo),kn=Xn?zn:mo}else zn=J.clipEnds(ct,ha),kn=Xn&&ct.ticklabelmode!=="period"?zn:ha;var pn=ct._gridVals=zn,Jo=Ot(ct,ha);if(!Ur._hasOnlyLargeSploms){var Xo=ct._subplotsWith,Ts={};for(Lr=0;Lr<Xo.length;Lr++){Gr=Xo[Lr],Kr=Ur._plots[Gr];var Po=Kr[fa+"axis"],so=Po._mainAxis._id;if(!Ts[so]){Ts[so]=1;var Vn=da==="x"?"M0,"+Po._offset+"v"+Po._length:"M"+Po._offset+",0h"+Po._length;J.drawGrid(xt,ct,{vals:pn,counterAxis:Po,layer:Kr.gridlayer.select("."+aa),minorLayer:Kr.minorGridlayer.select("."+aa),path:Vn,transFn:fn}),J.drawZeroLine(xt,ct,{counterAxis:Po,layer:dr?Kr.zerolinelayerAbove:Kr.zerolinelayer,path:Vn,transFn:fn})}}}var To,qo=J.getTickSigns(ct),Oo=J.getTickSigns(ct,"minor");if(ct.ticks||ct.minor&&ct.minor.ticks){var lo=J.makeTickPath(ct,Fa,qo[2]),Co=J.makeTickPath(ct,Fa,Oo[2],{minor:!0}),os,Ys,Os,Yo;if(ct._anchorAxis&&ct.mirror&&ct.mirror!==!0?(os=J.makeTickPath(ct,Ya,qo[3]),Ys=J.makeTickPath(ct,Ya,Oo[3],{minor:!0}),Os=lo+os,Yo=Co+Ys):(os="",Ys="",Os=lo,Yo=Co),ct.showdividers&&to&&ct.tickson==="boundaries"){var Ui={};for(Lr=0;Lr<Jo.length;Lr++)Ui[Jo[Lr].x]=1;To=function(po){return Ui[po.x]?os:Os}}else To=function(po){return po.minor?Yo:Os}}if(J.drawTicks(xt,ct,{vals:kn,layer:ia,path:To,transFn:fn}),ct.mirror==="allticks"){var Cn=Object.keys(ct._linepositions||{});for(Lr=0;Lr<Cn.length;Lr++){Gr=Cn[Lr],Kr=Ur._plots[Gr];var tl=ct._linepositions[Gr]||[],Bs=tl[0],uo=tl[1],$s=tl[2],ms=J.makeTickPath(ct,Bs,$s?qo[0]:Oo[0],{minor:$s})+J.makeTickPath(ct,uo,$s?qo[1]:Oo[1],{minor:$s});J.drawTicks(xt,ct,{vals:kn,layer:Kr[da+"axislayer"],path:ms,transFn:fn})}}var Is=[];if(Is.push(function(){return J.drawLabels(xt,ct,{vals:ha,layer:ia,plotinfo:Kr,transFn:An,labelFns:J.makeLabelFns(ct,Fa)})}),ct.type==="multicategory"){var rl={x:2,y:10}[da];Is.push(function(){var po={x:"height",y:"width"}[da],ro=Li()[po]+rl+(ct._tickAngles[aa+"tick"]?ct.tickfont.size*he:0);return J.drawLabels(xt,ct,{vals:Tt(ct,ha),layer:ia,cls:aa+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:fn,labelFns:J.makeLabelFns(ct,Fa+ro*qo[4])})}),Is.push(function(){return ct._depth=qo[4]*(Li("tick2")[ct.side]-Fa),la(xt,ct,{vals:Jo,layer:ia,path:J.makeTickPath(ct,Fa,qo[4],{len:ct._depth}),transFn:fn})})}else ct.title.hasOwnProperty("standoff")&&Is.push(function(){ct._depth=qo[4]*(Li()[ct.side]-Fa)});var Sn=M.getComponentMethod("rangeslider","isVisible")(ct);return!Nr.skipTitle&&!(Sn&&ct.side==="bottom")&&Is.push(function(){return Ba(xt,ct)}),Is.push(function(){var po=ct.side.charAt(0),ro=G[ct.side].charAt(0),As=J.getPxPosition(xt,ct),al=to?ct.ticklen:0,$n,zs,au,fl;(ct.automargin||Sn||ct._shiftPusher)&&(ct.type==="multicategory"?$n=Li("tick2"):($n=Li(),da==="x"&&po==="b"&&(ct._depth=Math.max($n.width>0?$n.bottom-As:0,al))));var xu=0,zl=0;if(ct._shiftPusher&&(xu=Math.max(al,$n.height>0?po==="l"?As-$n.left:$n.right-As:0),ct.title.text!==Ur._dfltTitle[da]&&(zl=(ct._titleStandoff||0)+(ct._titleScoot||0),po==="l"&&(zl+=Ua(ct))),ct._fullDepth=Math.max(xu,zl)),ct.automargin){zs={x:0,y:0,r:0,l:0,t:0,b:0};var Ns=[0,1],iu=typeof ct._shift=="number"?ct._shift:0;if(da==="x"){if(po==="b"?zs[po]=ct._depth:(zs[po]=ct._depth=Math.max($n.width>0?As-$n.top:0,al),Ns.reverse()),$n.width>0){var Eu=$n.right-(ct._offset+ct._length);Eu>0&&(zs.xr=1,zs.r=Eu);var Bc=ct._offset-$n.left;Bc>0&&(zs.xl=0,zs.l=Bc)}}else if(po==="l"?(ct._depth=Math.max($n.height>0?As-$n.left:0,al),zs[po]=ct._depth-iu):(ct._depth=Math.max($n.height>0?$n.right-As:0,al),zs[po]=ct._depth+iu,Ns.reverse()),$n.height>0){var Cu=$n.bottom-(ct._offset+ct._length);Cu>0&&(zs.yb=0,zs.b=Cu);var Af=ct._offset-$n.top;Af>0&&(zs.yt=1,zs.t=Af)}zs[fa]=ct.anchor==="free"?ct.position:ct._anchorAxis.domain[Ns[0]],ct.title.text!==Ur._dfltTitle[da]&&(zs[po]+=Ua(ct)+(ct.title.standoff||0)),ct.mirror&&ct.anchor!=="free"&&(au={x:0,y:0,r:0,l:0,t:0,b:0},au[ro]=ct.linewidth,ct.mirror&&ct.mirror!==!0&&(au[ro]+=al),ct.mirror===!0||ct.mirror==="ticks"?au[fa]=ct._anchorAxis.domain[Ns[1]]:(ct.mirror==="all"||ct.mirror==="allticks")&&(au[fa]=[ct._counterDomainMin,ct._counterDomainMax][Ns[1]]))}Sn&&(fl=M.getComponentMethod("rangeslider","autoMarginOpts")(xt,ct)),typeof ct.automargin=="string"&&(at(zs,ct.automargin),at(au,ct.automargin)),A.autoMargin(xt,Ci(ct),zs),A.autoMargin(xt,Jt(ct),au),A.autoMargin(xt,Nt(ct),fl)}),e.syncOrAsync(Is)}};function at(xt,ct){if(xt){var Nr=Object.keys(W).reduce(function(Or,Rr){return ct.indexOf(Rr)!==-1&&W[Rr].forEach(function(Lr){Or[Lr]=1}),Or},{});Object.keys(xt).forEach(function(Or){Nr[Or]||(Or.length===1?xt[Or]=0:delete xt[Or])})}}function yt(xt,ct){var Nr=[],Or,Rr=function(Lr,Gr){var Kr=Lr.xbnd[Gr];Kr!==null&&Nr.push(e.extendFlat({},Lr,{x:Kr}))};if(ct.length){for(Or=0;Or<ct.length;Or++)Rr(ct[Or],0);Rr(ct[Or-1],1)}return Nr}function Tt(xt,ct){for(var Nr=[],Or={},Rr=0;Rr<ct.length;Rr++){var Lr=ct[Rr];Or[Lr.text2]?Or[Lr.text2].push(Lr.x):Or[Lr.text2]=[Lr.x]}for(var Gr in Or)Nr.push(jr(xt,e.interp(Or[Gr],.5),Gr));return Nr}function Ot(xt,ct){var Nr=[],Or,Rr,Lr=ct.length&&ct[ct.length-1].x<ct[0].x,Gr=function(Ur,aa){var da=Ur.xbnd[aa];da!==null&&Nr.push(e.extendFlat({},Ur,{x:da}))};if(xt.showdividers&&ct.length){for(Or=0;Or<ct.length;Or++){var Kr=ct[Or];Kr.text2!==Rr&&Gr(Kr,Lr?1:0),Rr=Kr.text2}Gr(ct[Or-1],Lr?0:1)}return Nr}function Gt(xt,ct,Nr){var Or,Rr,Lr,Gr;if(xt._selections[ct].size())Or=1/0,Rr=-1/0,Lr=1/0,Gr=-1/0,xt._selections[ct].each(function(){var Ur=ti(this);if(Ur.node().style.display!=="none"){var aa=i.bBox(Ur.node().parentNode);Or=Math.min(Or,aa.top),Rr=Math.max(Rr,aa.bottom),Lr=Math.min(Lr,aa.left),Gr=Math.max(Gr,aa.right)}});else{var Kr=J.makeLabelFns(xt,Nr);Or=Rr=Kr.yFn({dx:0,dy:0,fontSize:0}),Lr=Gr=Kr.xFn({dx:0,dy:0,fontSize:0})}return{top:Or,bottom:Rr,left:Lr,right:Gr,height:Rr-Or,width:Gr-Lr}}J.getTickSigns=function(xt,ct){var Nr=xt._id.charAt(0),Or={x:"top",y:"right"}[Nr],Rr=xt.side===Or?1:-1,Lr=[-1,1,Rr,-Rr],Gr=ct?(xt.minor||{}).ticks:xt.ticks;return Gr!=="inside"==(Nr==="x")&&(Lr=Lr.map(function(Kr){return-Kr})),xt.side&&Lr.push({l:-1,t:-1,r:1,b:1}[xt.side.charAt(0)]),Lr},J.makeTransTickFn=function(xt){return xt._id.charAt(0)==="x"?function(ct){return t(xt._offset+xt.l2p(ct.x),0)}:function(ct){return t(0,xt._offset+xt.l2p(ct.x))}},J.makeTransTickLabelFn=function(xt){var ct=Qt(xt),Nr=xt.ticklabelshift||0,Or=xt.ticklabelstandoff||0,Rr=ct[0],Lr=ct[1],Gr=xt.range[0]>xt.range[1],Kr=xt.ticklabelposition&&xt.ticklabelposition.indexOf("inside")!==-1,Ur=!Kr;if(Nr){var aa=Gr?-1:1;Nr=Nr*aa}if(Or){var da=xt.side,fa=Kr&&(da==="top"||da==="left")||Ur&&(da==="bottom"||da==="right")?1:-1;Or=Or*fa}return xt._id.charAt(0)==="x"?function(It){return t(Rr+xt._offset+xt.l2p(rr(It))+Nr,Lr+Or)}:function(It){return t(Lr+Or,Rr+xt._offset+xt.l2p(rr(It))+Nr)}};function rr(xt){return xt.periodX!==void 0?xt.periodX:xt.x}function Qt(xt){var ct=xt.ticklabelposition||"",Nr=xt.tickson||"",Or=function(kr){return ct.indexOf(kr)!==-1},Rr=Or("top"),Lr=Or("left"),Gr=Or("right"),Kr=Or("bottom"),Ur=Or("inside"),aa=Nr!=="boundaries"&&(Kr||Lr||Rr||Gr);if(!aa&&!Ur)return[0,0];var da=xt.side,fa=aa?(xt.tickwidth||0)/2:0,It=$,dr=xt.tickfont?xt.tickfont.size:12;return(Kr||Rr)&&(fa+=dr*le,It+=(xt.linewidth||0)/2),(Lr||Gr)&&(fa+=(xt.linewidth||0)/2,It+=$),Ur&&da==="top"&&(It-=dr*(1-le)),(Lr||Rr)&&(fa=-fa),(da==="bottom"||da==="right")&&(It=-It),[aa?fa:0,Ur?It:0]}J.makeTickPath=function(xt,ct,Nr,Or){Or||(Or={});var Rr=Or.minor;if(Rr&&!xt.minor)return"";var Lr=Or.len!==void 0?Or.len:Rr?xt.minor.ticklen:xt.ticklen,Gr=xt._id.charAt(0),Kr=(xt.linewidth||1)/2;return Gr==="x"?"M0,"+(ct+Kr*Nr)+"v"+Lr*Nr:"M"+(ct+Kr*Nr)+",0h"+Lr*Nr},J.makeLabelFns=function(xt,ct,Nr){var Or=xt.ticklabelposition||"",Rr=xt.tickson||"",Lr=function(mo){return Or.indexOf(mo)!==-1},Gr=Lr("top"),Kr=Lr("left"),Ur=Lr("right"),aa=Lr("bottom"),da=Rr!=="boundaries"&&(aa||Kr||Gr||Ur),fa=Lr("inside"),It=Or==="inside"&&xt.ticks==="inside"||!fa&&xt.ticks==="outside"&&Rr!=="boundaries",dr=0,kr=0,ia=It?xt.ticklen:0;if(fa?ia*=-1:da&&(ia=0),It&&(dr+=ia,Nr)){var Ca=e.deg2rad(Nr);dr=ia*Math.cos(Ca)+1,kr=ia*Math.sin(Ca)}xt.showticklabels&&(It||xt.showline)&&(dr+=.2*xt.tickfont.size),dr+=(xt.linewidth||1)/2*(fa?-1:1);var Fa={labelStandoff:dr,labelShift:kr},Ya,ha,Da,Xi,Li=0,fn=xt.side,An=xt._id.charAt(0),kn=xt.tickangle,zn;if(An==="x")zn=!fa&&fn==="bottom"||fa&&fn==="top",Xi=zn?1:-1,fa&&(Xi*=-1),Ya=kr*Xi,ha=ct+dr*Xi,Da=zn?1:-.2,Math.abs(kn)===90&&(fa?Da+=ue:kn===-90&&fn==="bottom"?Da=le:kn===90&&fn==="top"?Da=ue:Da=.5,Li=ue/2*(kn/90)),Fa.xFn=function(mo){return mo.dx+Ya+Li*mo.fontSize},Fa.yFn=function(mo){return mo.dy+ha+mo.fontSize*Da},Fa.anchorFn=function(mo,pn){if(da){if(Kr)return"end";if(Ur)return"start"}return!x(pn)||pn===0||pn===180?"middle":pn*Xi<0!==fa?"end":"start"},Fa.heightFn=function(mo,pn,Jo){return pn<-60||pn>60?-.5*Jo:xt.side==="top"!==fa?-Jo:0};else if(An==="y"){if(zn=!fa&&fn==="left"||fa&&fn==="right",Xi=zn?1:-1,fa&&(Xi*=-1),Ya=dr,ha=kr*Xi,Da=0,!fa&&Math.abs(kn)===90&&(kn===-90&&fn==="left"||kn===90&&fn==="right"?Da=le:Da=.5),fa){var Xn=x(kn)?+kn:0;if(Xn!==0){var to=e.deg2rad(Xn);Li=Math.abs(Math.sin(to))*le*Xi,Da=0}}Fa.xFn=function(mo){return mo.dx+ct-(Ya+mo.fontSize*Da)*Xi+Li*mo.fontSize},Fa.yFn=function(mo){return mo.dy+ha+mo.fontSize*ue},Fa.anchorFn=function(mo,pn){return x(pn)&&Math.abs(pn)===90?"middle":zn?"end":"start"},Fa.heightFn=function(mo,pn,Jo){return xt.side==="right"&&(pn*=-1),pn<-30?-Jo:pn<30?-.5*Jo:0}}return Fa};function Tr(xt){return[xt.text,xt.x,xt.axInfo,xt.font,xt.fontSize,xt.fontColor].join("_")}J.drawTicks=function(xt,ct,Nr){Nr=Nr||{};var Or=ct._id+"tick",Rr=[].concat(ct.minor&&ct.minor.ticks?Nr.vals.filter(function(Gr){return Gr.minor&&!Gr.noTick}):[]).concat(ct.ticks?Nr.vals.filter(function(Gr){return!Gr.minor&&!Gr.noTick}):[]),Lr=Nr.layer.selectAll("path."+Or).data(Rr,Tr);Lr.exit().remove(),Lr.enter().append("path").classed(Or,1).classed("ticks",1).classed("crisp",Nr.crisp!==!1).each(function(Gr){return a.stroke(d.select(this),Gr.minor?ct.minor.tickcolor:ct.tickcolor)}).style("stroke-width",function(Gr){return i.crispRound(xt,Gr.minor?ct.minor.tickwidth:ct.tickwidth,1)+"px"}).attr("d",Nr.path).style("display",null),Ha(ct,[N]),Lr.attr("transform",Nr.transFn)},J.drawGrid=function(xt,ct,Nr){if(Nr=Nr||{},ct.tickmode!=="sync"){var Or=ct._id+"grid",Rr=ct.minor&&ct.minor.showgrid,Lr=Rr?Nr.vals.filter(function(Fa){return Fa.minor}):[],Gr=ct.showgrid?Nr.vals.filter(function(Fa){return!Fa.minor}):[],Kr=Nr.counterAxis;if(Kr&&J.shouldShowZeroLine(xt,ct,Kr))for(var Ur=ct.tickmode==="array",aa=0;aa<Gr.length;aa++){var da=Gr[aa].x;if(Ur?!da:Math.abs(da)<ct.dtick/100)if(Gr=Gr.slice(0,aa).concat(Gr.slice(aa+1)),Ur)aa--;else break}ct._gw=i.crispRound(xt,ct.gridwidth,1);for(var fa=Rr?i.crispRound(xt,ct.minor.gridwidth,1):0,It=Nr.layer,dr=Nr.minorLayer,kr=1;kr>=0;kr--){var ia=kr?It:dr;if(ia){var Ca=ia.selectAll("path."+Or).data(kr?Gr:Lr,Tr);Ca.exit().remove(),Ca.enter().append("path").classed(Or,1).classed("crisp",Nr.crisp!==!1),Ca.attr("transform",Nr.transFn).attr("d",Nr.path).each(function(Fa){return a.stroke(d.select(this),Fa.minor?ct.minor.gridcolor:ct.gridcolor||"#ddd")}).style("stroke-dasharray",function(Fa){return i.dashStyle(Fa.minor?ct.minor.griddash:ct.griddash,Fa.minor?ct.minor.gridwidth:ct.gridwidth)}).style("stroke-width",function(Fa){return(Fa.minor?fa:ct._gw)+"px"}).style("display",null),typeof Nr.path=="function"&&Ca.attr("d",Nr.path)}}Ha(ct,[O,I])}},J.drawZeroLine=function(xt,ct,Nr){Nr=Nr||Nr;var Or=ct._id+"zl",Rr=J.shouldShowZeroLine(xt,ct,Nr.counterAxis),Lr=Nr.layer.selectAll("path."+Or).data(Rr?[{x:0,id:ct._id}]:[]);Lr.exit().remove(),Lr.enter().append("path").classed(Or,1).classed("zl",1).classed("crisp",Nr.crisp!==!1).each(function(){Nr.layer.selectAll("path").sort(function(Gr,Kr){return ie(Gr.id,Kr.id)})}),Lr.attr("transform",Nr.transFn).attr("d",Nr.path).call(a.stroke,ct.zerolinecolor||a.defaultLine).style("stroke-width",i.crispRound(xt,ct.zerolinewidth,ct._gw||1)+"px").style("display",null),Ha(ct,[B])},J.drawLabels=function(xt,ct,Nr){Nr=Nr||{};var Or=xt._fullLayout,Rr=ct._id,Lr=ct.zerolinelayer==="above traces",Gr=Nr.cls||Rr+"tick",Kr=Nr.vals.filter(function(so){return so.text}),Ur=Nr.labelFns,aa=Nr.secondary?0:ct.tickangle,da=(ct._prevTickAngles||{})[Gr],fa=Nr.layer.selectAll("g."+Gr).data(ct.showticklabels?Kr:[],Tr),It=[];fa.enter().append("g").classed(Gr,1).append("text").attr("text-anchor","middle").each(function(so){var Vn=d.select(this),To=xt._promises.length;Vn.call(r.positionText,Ur.xFn(so),Ur.yFn(so)).call(i.font,{family:so.font,size:so.fontSize,color:so.fontColor,weight:so.fontWeight,style:so.fontStyle,variant:so.fontVariant,textcase:so.fontTextcase,lineposition:so.fontLineposition,shadow:so.fontShadow}).text(so.text).call(r.convertToTspans,xt),xt._promises[To]?It.push(xt._promises.pop().then(function(){dr(Vn,aa)})):dr(Vn,aa)}),Ha(ct,[U]),fa.exit().remove(),Nr.repositionOnUpdate&&fa.each(function(so){d.select(this).select("text").call(r.positionText,Ur.xFn(so),Ur.yFn(so))});function dr(so,Vn){so.each(function(To){var qo=d.select(this),Oo=qo.select(".text-math-group"),lo=Ur.anchorFn(To,Vn),Co=Nr.transFn.call(qo.node(),To)+(x(Vn)&&+Vn!=0?" rotate("+Vn+","+Ur.xFn(To)+","+(Ur.yFn(To)-To.fontSize/2)+")":""),os=r.lineCount(qo),Ys=he*To.fontSize,Os=Ur.heightFn(To,x(Vn)?+Vn:0,(os-1)*Ys);if(Os&&(Co+=t(0,Os)),Oo.empty()){var Yo=qo.select("text");Yo.attr({transform:Co,"text-anchor":lo}),Yo.style("display",null),ct._adjustTickLabelsOverflow&&ct._adjustTickLabelsOverflow()}else{var Ui=i.bBox(Oo.node()).width,Cn=Ui*{end:-.5,start:.5}[lo];Oo.attr("transform",Co+t(Cn,0))}})}ct._adjustTickLabelsOverflow=function(){var so=ct.ticklabeloverflow;if(!(!so||so==="allow")){var Vn=so.indexOf("hide")!==-1,To=ct._id.charAt(0)==="x",qo=0,Oo=To?xt._fullLayout.width:xt._fullLayout.height;if(so.indexOf("domain")!==-1){var lo=e.simpleMap(ct.range,ct.r2l);qo=ct.l2p(lo[0])+ct._offset,Oo=ct.l2p(lo[1])+ct._offset}var Co=Math.min(qo,Oo),os=Math.max(qo,Oo),Ys=ct.side,Os=1/0,Yo=-1/0;fa.each(function(Bs){var uo=d.select(this),$s=uo.select(".text-math-group");if($s.empty()){var ms=i.bBox(uo.node()),Is=0;To?(ms.right>os||ms.left<Co)&&(Is=1):(ms.bottom>os||ms.top+(ct.tickangle?0:Bs.fontSize/4)<Co)&&(Is=1);var rl=uo.select("text");Is?Vn&&rl.style("display","none"):rl.node().style.display!=="none"&&(rl.style("display",null),Ys==="bottom"||Ys==="right"?Os=Math.min(Os,To?ms.top:ms.left):Os=-1/0,Ys==="top"||Ys==="left"?Yo=Math.max(Yo,To?ms.bottom:ms.right):Yo=1/0)}});for(var Ui in Or._plots){var Cn=Or._plots[Ui];if(!(ct._id!==Cn.xaxis._id&&ct._id!==Cn.yaxis._id)){var tl=To?Cn.yaxis:Cn.xaxis;tl&&(tl["_visibleLabelMin_"+ct._id]=Os,tl["_visibleLabelMax_"+ct._id]=Yo)}}}},ct._hideCounterAxisInsideTickLabels=function(so){var Vn=ct._id.charAt(0)==="x",To=[];for(var qo in Or._plots){var Oo=Or._plots[qo];ct._id!==Oo.xaxis._id&&ct._id!==Oo.yaxis._id||To.push(Vn?Oo.yaxis:Oo.xaxis)}To.forEach(function(lo,Co){lo&&Ia(lo)&&(so||[B,I,O,N,U]).forEach(function(os){var Ys=os.K==="tick"&&os.L==="text"&&ct.ticklabelmode==="period",Os=Or._plots[ct._mainSubplot],Yo;if(os.K===B.K){var Ui=Lr?Os.zerolinelayerAbove:Os.zerolinelayer;Yo=Ui.selectAll("."+ct._id+"zl")}else os.K===I.K?Yo=Os.minorGridlayer.selectAll("."+ct._id):os.K===O.K?Yo=Os.gridlayer.selectAll("."+ct._id):Yo=Os[ct._id.charAt(0)+"axislayer"];Yo.each(function(){var Cn=d.select(this);os.L&&(Cn=Cn.selectAll(os.L)),Cn.each(function(tl){var Bs=ct.l2p(Ys?rr(tl):tl.x)+ct._offset,uo=d.select(this);Bs<ct["_visibleLabelMax_"+lo._id]&&Bs>ct["_visibleLabelMin_"+lo._id]?uo.style("display","none"):os.K==="tick"&&!Co&&uo.node().style.display!=="none"&&uo.style("display",null)})})})})},dr(fa,da+1?da:aa);function kr(){return It.length&&Promise.all(It)}var ia=null;function Ca(){if(dr(fa,aa),Kr.length&&ct.autotickangles&&(ct.type!=="log"||String(ct.dtick).charAt(0)!=="D")){ia=ct.autotickangles[0];var so=0,Vn=[],To,qo=1;fa.each(function(zs){so=Math.max(so,zs.fontSize);var au=ct.l2p(zs.x),fl=ti(this),xu=i.bBox(fl.node());qo=Math.max(qo,r.lineCount(fl)),Vn.push({top:0,bottom:10,height:10,left:au-xu.width/2,right:au+xu.width/2+2,width:xu.width+2})});var Oo=(ct.tickson==="boundaries"||ct.showdividers)&&!Nr.secondary,lo=Kr.length,Co=Math.abs((Kr[lo-1].x-Kr[0].x)*ct._m)/(lo-1),os=Oo?Co/2:Co,Ys=Oo?ct.ticklen:so*1.25*qo,Os=Math.sqrt(Math.pow(os,2)+Math.pow(Ys,2)),Yo=os/Os,Ui=ct.autotickangles.map(function(zs){return zs*Math.PI/180}),Cn=Ui.find(function(zs){return Math.abs(Math.cos(zs))<=Yo});Cn===void 0&&(Cn=Ui.reduce(function(zs,au){return Math.abs(Math.cos(zs))<Math.abs(Math.cos(au))?zs:au},Ui[0]));var tl=Cn*(180/Math.PI);if(Oo){var Bs=2;for(ct.ticks&&(Bs+=ct.tickwidth/2),To=0;To<Vn.length;To++){var uo=Kr[To].xbnd,$s=Vn[To];if(uo[0]!==null&&$s.left-ct.l2p(uo[0])<Bs||uo[1]!==null&&ct.l2p(uo[1])-$s.right<Bs){ia=tl;break}}}else{var ms=ct.ticklabelposition||"",Is=ct.tickson||"",rl=function(zs){return ms.indexOf(zs)!==-1},Sn=rl("top"),po=rl("left"),ro=rl("right"),As=rl("bottom"),al=Is!=="boundaries"&&(As||po||Sn||ro),$n=al?(ct.tickwidth||0)+2*$:0;for(To=0;To<Vn.length-1;To++)if(e.bBoxIntersect(Vn[To],Vn[To+1],$n)){ia=tl;break}}ia&&dr(fa,ia)}}ct._selections&&(ct._selections[Gr]=fa);var Fa=[kr];ct.automargin&&Or._redrawFromAutoMarginCount&&da===90?(ia=da,Fa.push(function(){dr(fa,da)})):Fa.push(Ca),ct._tickAngles&&Fa.push(function(){ct._tickAngles[Gr]=ia===null?x(aa)?aa:0:ia});var Ya=function(){var so=0,Vn=0;return fa.each(function(To,qo){var Oo=ti(this),lo=Oo.select(".text-math-group");if(lo.empty()){var Co;ct._vals[qo]&&(Co=ct._vals[qo].bb||i.bBox(Oo.node()),ct._vals[qo].bb=Co),so=Math.max(so,Co.width),Vn=Math.max(Vn,Co.height)}}),{labelsMaxW:so,labelsMaxH:Vn}},ha=ct._anchorAxis;if(ha&&(ha.autorange||ha.insiderange)&&Ia(ct)&&!j(Or,ct._id)&&(Or._insideTickLabelsUpdaterange||(Or._insideTickLabelsUpdaterange={}),ha.autorange&&(Or._insideTickLabelsUpdaterange[ha._name+".autorange"]=ha.autorange,Fa.push(Ya)),ha.insiderange)){var Da=Ya(),Xi=ct._id.charAt(0)==="y"?Da.labelsMaxW:Da.labelsMaxH;Xi+=2*$,ct.ticklabelposition==="inside"&&(Xi+=ct.ticklen||0);var Li=ct.side==="right"||ct.side==="top"?1:-1,fn=Li===1?1:0,An=Li===1?0:1,kn=[];kn[An]=ha.range[An];var zn=ha.range,Xn=ha.r2p(zn[fn]),to=ha.r2p(zn[An]),mo=Or._insideTickLabelsUpdaterange[ha._name+".range"];if(mo){var pn=ha.r2p(mo[fn]),Jo=ha.r2p(mo[An]),Xo=Li*(ct._id.charAt(0)==="y"?1:-1);Xo*Xn<Xo*pn&&(Xn=pn,kn[fn]=zn[fn]=mo[fn]),Xo*to>Xo*Jo&&(to=Jo,kn[An]=zn[An]=mo[An])}var Ts=Math.abs(to-Xn);Ts-Xi>0?(Ts-=Xi,Xi*=1+Xi/Ts):Xi=0,ct._id.charAt(0)!=="y"&&(Xi=-Xi),kn[fn]=ha.p2r(ha.r2p(zn[fn])+Li*Xi),ha.autorange==="min"||ha.autorange==="max reversed"?(kn[0]=null,ha._rangeInitial0=void 0,ha._rangeInitial1=void 0):(ha.autorange==="max"||ha.autorange==="min reversed")&&(kn[1]=null,ha._rangeInitial0=void 0,ha._rangeInitial1=void 0),Or._insideTickLabelsUpdaterange[ha._name+".range"]=kn}var Po=e.syncOrAsync(Fa);return Po&&Po.then&&xt._promises.push(Po),Po};function la(xt,ct,Nr){var Or=ct._id+"divider",Rr=Nr.vals,Lr=Nr.layer.selectAll("path."+Or).data(Rr,Tr);Lr.exit().remove(),Lr.enter().insert("path",":first-child").classed(Or,1).classed("crisp",1).call(a.stroke,ct.dividercolor).style("stroke-width",i.crispRound(xt,ct.dividerwidth,1)+"px"),Lr.attr("transform",Nr.transFn).attr("d",Nr.path)}J.getPxPosition=function(xt,ct){var Nr=xt._fullLayout._size,Or=ct._id.charAt(0),Rr=ct.side,Lr;if(ct.anchor!=="free"?Lr=ct._anchorAxis:Or==="x"?Lr={_offset:Nr.t+(1-(ct.position||0))*Nr.h,_length:0}:Or==="y"&&(Lr={_offset:Nr.l+(ct.position||0)*Nr.w+ct._shift,_length:0}),Rr==="top"||Rr==="left")return Lr._offset;if(Rr==="bottom"||Rr==="right")return Lr._offset+Lr._length};function Ua(xt){var ct=xt.title.font.size,Nr=(xt.title.text.match(r.BR_TAG_ALL)||[]).length;return xt.title.hasOwnProperty("standoff")?ct*(le+Nr*he):Nr?ct*(Nr+1)*he:ct}function Ba(xt,ct){var Nr=xt._fullLayout,Or=ct._id,Rr=Or.charAt(0),Lr=ct.title.font.size,Gr,Kr=(ct.title.text.match(r.BR_TAG_ALL)||[]).length;if(ct.title.hasOwnProperty("standoff"))ct.side==="bottom"||ct.side==="right"?Gr=ct._depth+ct.title.standoff+Lr*le:(ct.side==="top"||ct.side==="left")&&(Gr=ct._depth+ct.title.standoff+Lr*(ue+Kr*he));else{var Ur=Ia(ct);if(ct.type==="multicategory")Gr=ct._depth;else{var aa=1.5*Lr;Ur&&(aa=.5*Lr,ct.ticks==="outside"&&(aa+=ct.ticklen)),Gr=10+aa+(ct.linewidth?ct.linewidth-1:0)}Ur||(Rr==="x"?Gr+=ct.side==="top"?Lr*(ct.showticklabels?1:0):Lr*(ct.showticklabels?1.5:.5):Gr+=ct.side==="right"?Lr*(ct.showticklabels?1:.5):Lr*(ct.showticklabels?.5:0))}var da=J.getPxPosition(xt,ct),fa,It,dr;Rr==="x"?(It=ct._offset+ct._length/2,dr=ct.side==="top"?da-Gr:da+Gr):(dr=ct._offset+ct._length/2,It=ct.side==="right"?da+Gr:da-Gr,fa={rotate:"-90",offset:0});var kr;if(ct.type!=="multicategory"){var ia=ct._selections[ct._id+"tick"];if(kr={selection:ia,side:ct.side},ia&&ia.node()&&ia.node().parentNode){var Ca=i.getTranslate(ia.node().parentNode);kr.offsetLeft=Ca.x,kr.offsetTop=Ca.y}ct.title.hasOwnProperty("standoff")&&(kr.pad=0)}return ct._titleStandoff=Gr,o.draw(xt,Or+"title",{propContainer:ct,propName:ct._name+".title.text",placeholder:Nr._dfltTitle[Rr],avoid:kr,transform:fa,attributes:{x:It,y:dr,"text-anchor":"middle"}})}J.shouldShowZeroLine=function(xt,ct,Nr){var Or=e.simpleMap(ct.range,ct.r2l);return Or[0]*Or[1]<=0&&ct.zeroline&&(ct.type==="linear"||ct.type==="-")&&!(ct.rangebreaks&&ct.maskBreaks(0)===F)&&(Ra(ct,0)||!ei(xt,ct,Nr,Or)||za(xt,ct))},J.clipEnds=function(xt,ct){return ct.filter(function(Nr){return Ra(xt,Nr.x)})};function Ra(xt,ct){var Nr=xt.l2p(ct);return Nr>1&&Nr<xt._length-1}function ei(xt,ct,Nr,Or){var Rr=Nr._mainAxis;if(!Rr)return;var Lr=xt._fullLayout,Gr=ct._id.charAt(0),Kr=J.counterLetter(ct._id),Ur=ct._offset+(Math.abs(Or[0])<Math.abs(Or[1])==(Gr==="x")?0:ct._length);function aa(kr){if(!kr.showline||!kr.linewidth)return!1;var ia=Math.max((kr.linewidth+ct.zerolinewidth)/2,1);function Ca(ha){return typeof ha=="number"&&Math.abs(ha-Ur)<ia}if(Ca(kr._mainLinePosition)||Ca(kr._mainMirrorPosition))return!0;var Fa=kr._linepositions||{};for(var Ya in Fa)if(Ca(Fa[Ya][0])||Ca(Fa[Ya][1]))return!0}var da=Lr._plots[Nr._mainSubplot];if(!(da.mainplotinfo||da).overlays.length)return aa(Nr,Ur);for(var fa=J.list(xt,Kr),It=0;It<fa.length;It++){var dr=fa[It];if(dr._mainAxis===Rr&&aa(dr,Ur))return!0}}function za(xt,ct){for(var Nr=xt._fullData,Or=ct._mainSubplot,Rr=ct._id.charAt(0),Lr=0;Lr<Nr.length;Lr++){var Gr=Nr[Lr];if(Gr.visible===!0&&Gr.xaxis+Gr.yaxis===Or&&(M.traceIs(Gr,"bar-like")&&Gr.orientation==={x:"h",y:"v"}[Rr]||Gr.fill&&Gr.fill.charAt(Gr.fill.length-1)===Rr))return!0}return!1}function ti(xt){var ct=d.select(xt),Nr=ct.select(".text-math-group");return Nr.empty()?ct.select("text"):Nr}J.allowAutoMargin=function(xt){for(var ct=J.list(xt,"",!0),Nr=0;Nr<ct.length;Nr++){var Or=ct[Nr];Or.automargin&&(A.allowAutoMargin(xt,Ci(Or)),Or.mirror&&A.allowAutoMargin(xt,Jt(Or))),M.getComponentMethod("rangeslider","isVisible")(Or)&&A.allowAutoMargin(xt,Nt(Or))}};function Ci(xt){return xt._id+".automargin"}function Jt(xt){return Ci(xt)+".mirror"}function Nt(xt){return xt._id+".rangeslider"}J.swap=function(xt,ct){for(var Nr=Kt(xt,ct),Or=0;Or<Nr.length;Or++)Pr(xt,Nr[Or].x,Nr[Or].y)};function Kt(xt,ct){var Nr=[],Or,Rr;for(Or=0;Or<ct.length;Or++){var Lr=[],Gr=xt._fullData[ct[Or]].xaxis,Kr=xt._fullData[ct[Or]].yaxis;if(!(!Gr||!Kr)){for(Rr=0;Rr<Nr.length;Rr++)(Nr[Rr].x.indexOf(Gr)!==-1||Nr[Rr].y.indexOf(Kr)!==-1)&&Lr.push(Rr);if(!Lr.length){Nr.push({x:[Gr],y:[Kr]});continue}var Ur=Nr[Lr[0]],aa;if(Lr.length>1)for(Rr=1;Rr<Lr.length;Rr++)aa=Nr[Lr[Rr]],Wt(Ur.x,aa.x),Wt(Ur.y,aa.y);Wt(Ur.x,[Gr]),Wt(Ur.y,[Kr])}}return Nr}function Wt(xt,ct){for(var Nr=0;Nr<ct.length;Nr++)xt.indexOf(ct[Nr])===-1&&xt.push(ct[Nr])}function Pr(xt,ct,Nr){var Or=[],Rr=[],Lr=xt.layout,Gr,Kr;for(Gr=0;Gr<ct.length;Gr++)Or.push(J.getFromId(xt,ct[Gr]));for(Gr=0;Gr<Nr.length;Gr++)Rr.push(J.getFromId(xt,Nr[Gr]));var Ur=Object.keys(n),aa=["anchor","domain","overlaying","position","side","tickangle","editType"],da=["linear","log"];for(Gr=0;Gr<Ur.length;Gr++){var fa=Ur[Gr],It=Or[0][fa],dr=Rr[0][fa],kr=!0,ia=!1,Ca=!1;if(!(fa.charAt(0)==="_"||typeof It=="function"||aa.indexOf(fa)!==-1)){for(Kr=1;Kr<Or.length&&kr;Kr++){var Fa=Or[Kr][fa];fa==="type"&&da.indexOf(It)!==-1&&da.indexOf(Fa)!==-1&&It!==Fa?ia=!0:Fa!==It&&(kr=!1)}for(Kr=1;Kr<Rr.length&&kr;Kr++){var Ya=Rr[Kr][fa];fa==="type"&&da.indexOf(dr)!==-1&&da.indexOf(Ya)!==-1&&dr!==Ya?Ca=!0:Rr[Kr][fa]!==dr&&(kr=!1)}kr&&(ia&&(Lr[Or[0]._name].type="linear"),Ca&&(Lr[Rr[0]._name].type="linear"),ta(Lr,fa,Or,Rr,xt._fullLayout._dfltTitle))}}for(Gr=0;Gr<xt._fullLayout.annotations.length;Gr++){var ha=xt._fullLayout.annotations[Gr];ct.indexOf(ha.xref)!==-1&&Nr.indexOf(ha.yref)!==-1&&e.swapAttrs(Lr.annotations[Gr],["?"])}}function ta(xt,ct,Nr,Or,Rr){var Lr=e.nestedProperty,Gr=Lr(xt[Nr[0]._name],ct).get(),Kr=Lr(xt[Or[0]._name],ct).get(),Ur;for(ct==="title"&&(Gr&&Gr.text===Rr.x&&(Gr.text=Rr.y),Kr&&Kr.text===Rr.y&&(Kr.text=Rr.x)),Ur=0;Ur<Nr.length;Ur++)Lr(xt,Nr[Ur]._name+"."+ct).set(Kr);for(Ur=0;Ur<Or.length;Ur++)Lr(xt,Or[Ur]._name+"."+ct).set(Gr)}function ma(xt){return xt._id==="angularaxis"}function ra(xt,ct){for(var Nr=ct._rangebreaks.length,Or=0;Or<Nr;Or++){var Rr=ct._rangebreaks[Or];if(xt>=Rr.min&&xt<Rr.max)return Rr.max}return xt}function Ia(xt){return(xt.ticklabelposition||"").indexOf("inside")!==-1}function Ha(xt,ct){Ia(xt._anchorAxis||{})&&xt._hideCounterAxisInsideTickLabels&&xt._hideCounterAxisInsideTickLabels(ct)}function $a(xt,ct,Nr,Or){var Rr=xt.anchor!=="free"&&(xt.overlaying===void 0||xt.overlaying===!1)?xt._id:xt.overlaying,Lr;Or?Lr=xt.side==="right"?ct:-ct:Lr=ct,Rr in Nr||(Nr[Rr]={}),xt.side in Nr[Rr]||(Nr[Rr][xt.side]=0),Nr[Rr][xt.side]+=Lr}function ai(xt,ct){return xt.autoshift?ct[xt.overlaying][xt.side]:xt.shift||0}function mi(xt,ct){return/%f/.test(ct)?xt>=L:/%L/.test(ct)?xt>=P:/%[SX]/.test(ct)?xt>=h:/%M/.test(ct)?xt>=m:/%[HI]/.test(ct)?xt>=u:/%p/.test(ct)?xt>=p:/%[Aadejuwx]/.test(ct)?xt>=b:/%[UVW]/.test(ct)?xt>=y:/%[Bbm]/.test(ct)?xt>=E:/%[q]/.test(ct)?xt>=_:/%[Yy]/.test(ct)?xt>=v:!0}}}),f5=Ze({"src/plots/cartesian/autorange_options_defaults.js"(Z,q){"use strict";q.exports=function(x,A,M){var e,t;if(M){var r=A==="reversed"||A==="min reversed"||A==="max reversed";e=M[r?1:0],t=M[r?0:1]}var o=x("autorangeoptions.minallowed",t===null?e:void 0),a=x("autorangeoptions.maxallowed",e===null?t:void 0);o===void 0&&x("autorangeoptions.clipmin"),a===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),h5=Ze({"src/plots/cartesian/range_defaults.js"(Z,q){"use strict";var d=f5();q.exports=function(A,M,e,t){var r=M._template||{},o=M.type||r.type||"-";e("minallowed"),e("maxallowed");var a=e("range");if(!a){var i;!t.noInsiderange&&o!=="log"&&(i=e("insiderange"),i&&(i[0]===null||i[1]===null)&&(M.insiderange=!1,i=void 0),i&&(a=e("range",i)))}var n=M.getAutorangeDflt(a,t),s=e("autorange",n),c;a&&(a[0]===null&&a[1]===null||(a[0]===null||a[1]===null)&&(s==="reversed"||s===!0)||a[0]!==null&&(s==="min"||s==="max reversed")||a[1]!==null&&(s==="max"||s==="min reversed"))&&(a=void 0,delete M.range,M.autorange=!0,c=!0),c||(n=M.getAutorangeDflt(a,t),s=e("autorange",n)),s&&(d(e,s,a),(o==="linear"||o==="-")&&e("rangemode")),M.cleanRange()}}}),sz=Ze({"node_modules/mouse-event-offset/index.js"(Z,q){var d={left:0,top:0};q.exports=x;function x(M,e,t){e=e||M.currentTarget||M.srcElement,Array.isArray(t)||(t=[0,0]);var r=M.clientX||0,o=M.clientY||0,a=A(e);return t[0]=r-a.left,t[1]=o-a.top,t}function A(M){return M===window||M===document||M===document.body?d:M.getBoundingClientRect()}}}),x2=Ze({"node_modules/has-passive-events/index.js"(Z,q){"use strict";var d=a5();function x(){var A=!1;try{var M=Object.defineProperty({},"passive",{get:function(){A=!0}});window.addEventListener("test",null,M),window.removeEventListener("test",null,M)}catch{A=!1}return A}q.exports=d&&x()}}),lz=Ze({"src/components/dragelement/align.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t){var r=(x-M)/(e-M),o=r+A/(e-M),a=(r+o)/2;return t==="left"||t==="bottom"?r:t==="center"||t==="middle"?a:t==="right"||t==="top"?o:r<2/3-a?r:o>4/3-a?o:a}}}),uz=Ze({"src/components/dragelement/cursor.js"(Z,q){"use strict";var d=ca(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];q.exports=function(M,e,t,r){return t==="left"?M=0:t==="center"?M=1:t==="right"?M=2:M=d.constrain(Math.floor(M*3),0,2),r==="bottom"?e=0:r==="middle"?e=1:r==="top"?e=2:e=d.constrain(Math.floor(e*3),0,2),x[e][M]}}}),cz=Ze({"src/components/dragelement/unhover.js"(Z,q){"use strict";var d=Qy(),x=g2(),A=T_().getGraphDiv,M=w_(),e=q.exports={};e.wrapped=function(t,r,o){t=A(t),t._fullLayout&&x.clear(t._fullLayout._uid+M.HOVERID),e.raw(t,r,o)},e.raw=function(r,o){var a=r._fullLayout,i=r._hoverdata;o||(o={}),!(o.target&&!r._dragged&&d.triggerHandler(r,"plotly_beforehover",o)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,o.target&&i&&r.emit("plotly_unhover",{event:o,points:i}))}}}),Tp=Ze({"src/components/dragelement/index.js"(Z,q){"use strict";var d=sz(),x=i5(),A=x2(),M=ca().removeElement,e=kh(),t=q.exports={};t.align=lz(),t.getCursor=uz();var r=cz();t.unhover=r.wrapped,t.unhoverRaw=r.raw,t.init=function(n){var s=n.gd,c=1,f=s._context.doubleClickDelay,g=n.element,v,T,l,_,w,S,E,y;s._mouseDownTime||(s._mouseDownTime=0),g.style.pointerEvents="all",g.onmousedown=u,A?(g._ontouchstart&&g.removeEventListener("touchstart",g._ontouchstart),g._ontouchstart=u,g.addEventListener("touchstart",u,{passive:!1})):g.ontouchstart=u;function b(P,L,z){return Math.abs(P)<z&&(P=0),Math.abs(L)<z&&(L=0),[P,L]}var p=n.clampFn||b;function u(P){s._dragged=!1,s._dragging=!0;var L=a(P);v=L[0],T=L[1],E=P.target,S=P,y=P.buttons===2||P.ctrlKey,typeof P.clientX>"u"&&typeof P.clientY>"u"&&(P.clientX=v,P.clientY=T),l=new Date().getTime(),l-s._mouseDownTime<f?c+=1:(c=1,s._mouseDownTime=l),n.prepFn&&n.prepFn(P,v,T),x&&!y?(w=o(),w.style.cursor=window.getComputedStyle(g).cursor):x||(w=document,_=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(g).cursor),document.addEventListener("mouseup",h),document.addEventListener("touchend",h),n.dragmode!==!1&&(P.preventDefault(),document.addEventListener("mousemove",m),document.addEventListener("touchmove",m,{passive:!1}))}function m(P){P.preventDefault();var L=a(P),z=n.minDrag||e.MINDRAG,F=p(L[0]-v,L[1]-T,z),B=F[0],O=F[1];(B||O)&&(s._dragged=!0,t.unhover(s,P)),s._dragged&&n.moveFn&&!y&&(s._dragdata={element:g,dx:B,dy:O},n.moveFn(B,O))}function h(P){if(delete s._dragdata,n.dragmode!==!1&&(P.preventDefault(),document.removeEventListener("mousemove",m),document.removeEventListener("touchmove",m)),document.removeEventListener("mouseup",h),document.removeEventListener("touchend",h),x?M(w):_&&(w.documentElement.style.cursor=_,_=null),!s._dragging){s._dragged=!1;return}if(s._dragging=!1,new Date().getTime()-s._mouseDownTime>f&&(c=Math.max(c-1,1)),s._dragged)n.doneFn&&n.doneFn();else{var L;S.target===E?L=S:(L={target:E,srcElement:E,toElement:E},Object.keys(S).concat(Object.keys(S.__proto__)).forEach(z=>{var F=S[z];!L[z]&&typeof F!="function"&&(L[z]=F)})),n.clickFn&&n.clickFn(c,L),y||E.dispatchEvent(new MouseEvent("click",P))}s._dragging=!1,s._dragged=!1}};function o(){var i=document.createElement("div");i.className="dragcover";var n=i.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(i),i}t.coverSlip=o;function a(i){return d(i.changedTouches?i.changedTouches[0]:i,document.body)}}}),Kd=Ze({"src/lib/setcursor.js"(Z,q){"use strict";q.exports=function(x,A){(x.attr("class")||"").split(" ").forEach(function(M){M.indexOf("cursor-")===0&&x.classed(M,!1)}),A&&x.classed("cursor-"+A,!0)}}}),fz=Ze({"src/lib/override_cursor.js"(Z,q){"use strict";var d=Kd(),x="data-savedcursor",A="!!";q.exports=function(e,t){var r=e.attr(x);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;a<o.length;a++){var i=o[a];i.indexOf("cursor-")===0&&e.attr(x,i.substr(7)).classed(i,!1)}e.attr(x)||e.attr(x,A)}d(e,t)}else r&&(e.attr(x,null),r===A?d(e):d(e,r))}}}),p5=Ze({"src/components/legend/attributes.js"(Z,q){"use strict";var d=tc(),x=oh();q.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:d({editType:"legend"}),grouptitlefont:d({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:d({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}}),b2=Ze({"src/components/legend/helpers.js"(Z){"use strict";Z.isGrouped=function(d){return(d.traceorder||"").indexOf("grouped")!==-1},Z.isVertical=function(d){return d.orientation!=="h"},Z.isReversed=function(d){return(d.traceorder||"").indexOf("reversed")!==-1}}}),d5=Ze({"src/components/legend/defaults.js"(Z,q){"use strict";var d=oo(),x=ca(),A=Dl(),M=eu(),e=p5(),t=$y(),r=b2();function o(a,i,n,s){var c=i[a]||{},f=A.newContainer(n,a);function g(he,G){return x.coerce(c,f,e,he,G)}var v=x.coerceFont(g,"font",n.font);g("bgcolor",n.paper_bgcolor),g("bordercolor");var T=g("visible");if(T){for(var l,_=function(he,G){var $=l._input,J=l;return x.coerce($,J,M,he,G)},w=n.font||{},S=x.coerceFont(g,"grouptitlefont",w,{overrideDflt:{size:Math.round(w.size*1.1)}}),E=0,y=!1,b="normal",p=(n.shapes||[]).filter(function(he){return he.showlegend}),u=s.concat(p).filter(function(he){return a===(he.legend||"legend")}),m=0;m<u.length;m++)if(l=u[m],!!l.visible){var h=l._isShape;(l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(E++,l.showlegend&&(y=!0,(!h&&d.traceIs(l,"pie-like")||l._input.showlegend===!0)&&E++),x.coerceFont(_,"legendgrouptitle.font",S)),(!h&&d.traceIs(l,"bar")&&n.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(b=r.isGrouped({traceorder:b})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(b=r.isReversed({traceorder:b})?"reversed+grouped":"grouped")}var P=x.coerce(i,n,t,"showlegend",y&&E>(a==="legend"?1:0));if(P===!1&&(n[a]=void 0),!(P===!1&&!c.uirevision)&&(g("uirevision",n.uirevision),P!==!1)){g("borderwidth");var L=g("orientation"),z=g("yref"),F=g("xref"),B=L==="h",O=z==="paper",I=F==="paper",N,U,W,Q="left";B?(N=0,d.getComponentMethod("rangeslider","isVisible")(i.xaxis)?O?(U=1.1,W="bottom"):(U=1,W="top"):O?(U=-.1,W="top"):(U=0,W="bottom")):(U=1,W="auto",I?N=1.02:(N=1,Q="right")),x.coerce(c,f,{x:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:N}},"x"),x.coerce(c,f,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:U}},"y"),g("traceorder",b),r.isGrouped(n[a])&&g("tracegroupgap"),g("entrywidth"),g("entrywidthmode"),g("indentation"),g("itemsizing"),g("itemwidth"),g("itemclick"),g("itemdoubleclick"),g("groupclick"),g("xanchor",Q),g("yanchor",W),g("maxheight"),g("valign"),x.noneOrAll(c,f,["x","y"]);var ue=g("title.text");if(ue){g("title.side",B?"left":"top");var le=x.extendFlat({},v,{size:x.bigFont(v.size)});x.coerceFont(g,"title.font",le)}}}}q.exports=function(i,n,s){var c,f=s.slice(),g=n.shapes;if(g)for(c=0;c<g.length;c++){var v=g[c];if(v.showlegend){var T={_input:v._input,visible:v.visible,showlegend:v.showlegend,legend:v.legend};f.push(T)}}var l=["legend"];for(c=0;c<f.length;c++)x.pushUnique(l,f[c].legend);for(n._legends=[],c=0;c<l.length;c++){var _=l[c];o(_,i,n,f),n[_]&&n[_].visible&&(n[_]._id=_),n._legends.push(_)}}}}),hz=Ze({"src/components/legend/handle_click.js"(Z,q){"use strict";var d=oo(),x=ca(),A=x.pushUnique,M=!0;q.exports=function(t,r,o){var a=r._fullLayout;if(r._dragged||r._editing)return;var i=a.legend.itemclick,n=a.legend.itemdoubleclick,s=a.legend.groupclick;o===1&&i==="toggle"&&n==="toggleothers"&&M&&r.data&&r._context.showTips&&x.notifier(x._(r,"Double-click on legend to isolate one trace"),"long"),M=!1;var c;if(o===1?c=i:o===2&&(c=n),!c)return;var f=s==="togglegroup",g=a.hiddenlabels?a.hiddenlabels.slice():[],v=t.data()[0][0];if(v.groupTitle&&v.noClick)return;var T=r._fullData,l=(a.shapes||[]).filter(function(Ee){return Ee.showlegend}),_=T.concat(l),w=v.trace;w._isShape&&(w=w._fullInput);var S=w.legendgroup,E,y,b,p,u,m,h={},P=[],L=[],z=[];function F(Ee,_e){var fe=P.indexOf(Ee),Fe=h.visible;return Fe||(Fe=h.visible=[]),P.indexOf(Ee)===-1&&(P.push(Ee),fe=P.length-1),Fe[fe]=_e,fe}var B=(a.shapes||[]).map(function(Ee){return Ee._input}),O=!1;function I(Ee,_e){B[Ee].visible=_e,O=!0}function N(Ee,_e){if(!(v.groupTitle&&!f)){var fe=Ee._fullInput||Ee,Fe=fe._isShape,rt=fe.index;rt===void 0&&(rt=fe._index);var st=fe.visible===!1?!1:_e;Fe?I(rt,st):F(rt,st)}}var U=w.legend,W=w._fullInput,Q=W&&W._isShape;if(!Q&&d.traceIs(w,"pie-like")){var ue=v.label,le=g.indexOf(ue);if(c==="toggle")le===-1?g.push(ue):g.splice(le,1);else if(c==="toggleothers"){var he=le!==-1,G=[];for(E=0;E<r.calcdata.length;E++){var $=r.calcdata[E];for(y=0;y<$.length;y++){var J=$[y],X=J.label;U===$[0].trace.legend&&ue!==X&&(g.indexOf(X)===-1&&(he=!0),A(g,X),G.push(X))}}if(!he)for(var oe=0;oe<G.length;oe++){var ie=g.indexOf(G[oe]);ie!==-1&&g.splice(ie,1)}}d.call("_guiRelayout",r,"hiddenlabels",g)}else{var j=S&&S.length,ee=[],re;if(j)for(E=0;E<_.length;E++)re=_[E],re.visible&&re.legendgroup===S&&ee.push(E);if(c==="toggle"){var ce;switch(w.visible){case!0:ce="legendonly";break;case!1:ce=!1;break;case"legendonly":ce=!0;break}if(j)if(f)for(E=0;E<_.length;E++){var be=_[E];be.visible!==!1&&be.legendgroup===S&&N(be,ce)}else N(w,ce);else N(w,ce)}else if(c==="toggleothers"){var Ae,ze,Re,Xe,it,ot=!0;for(E=0;E<_.length;E++)if(it=_[E],Ae=it===w,Re=it.showlegend!==!0,!(Ae||Re)&&(ze=j&&it.legendgroup===S,!ze&&it.legend===U&&it.visible===!0&&!d.traceIs(it,"notLegendIsolatable"))){ot=!1;break}for(E=0;E<_.length;E++)if(it=_[E],!(it.visible===!1||it.legend!==U)&&!d.traceIs(it,"notLegendIsolatable"))switch(w.visible){case"legendonly":N(it,!0);break;case!0:Xe=ot?!0:"legendonly",Ae=it===w,Re=it.showlegend!==!0&&!it.legendgroup,ze=Ae||j&&it.legendgroup===S,N(it,ze||Re?!0:Xe);break}}for(E=0;E<L.length;E++)if(b=L[E],!!b){var tt=b.constructUpdate(),lt=Object.keys(tt);for(y=0;y<lt.length;y++)p=lt[y],m=h[p]=h[p]||[],m[z[E]]=tt[p]}for(u=Object.keys(h),E=0;E<u.length;E++)for(p=u[E],y=0;y<P.length;y++)h[p].hasOwnProperty(y)||(h[p][y]=void 0);O?d.call("_guiUpdate",r,h,{shapes:B},P):d.call("_guiRestyle",r,h,P)}}}}),v5=Ze({"src/components/legend/constants.js"(Z,q){"use strict";q.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}}),pz=Ze({"src/components/legend/get_legend_data.js"(Z,q){"use strict";var d=oo(),x=b2();q.exports=function(M,e,t){var r=e._inHover,o=x.isGrouped(e),a=x.isReversed(e),i={},n=[],s=!1,c={},f=0,g=0,v,T;function l(N,U,W){if(e.visible!==!1&&!(t&&N!==e._id))if(U===""||!x.isGrouped(e)){var Q="~~i"+f;n.push(Q),i[Q]=[W],f++}else n.indexOf(U)===-1?(n.push(U),s=!0,i[U]=[W]):i[U].push(W)}for(v=0;v<M.length;v++){var _=M[v],w=_[0],S=w.trace,E=S.legend,y=S.legendgroup;if(!(!r&&(!S.visible||!S.showlegend)))if(d.traceIs(S,"pie-like"))for(c[y]||(c[y]={}),T=0;T<_.length;T++){var b=_[T].label;c[y][b]||(l(E,y,{label:b,color:_[T].color,i:_[T].i,trace:S,pts:_[T].pts}),c[y][b]=!0,g=Math.max(g,(b||"").length))}else l(E,y,w),g=Math.max(g,(S.name||"").length)}if(!n.length)return[];var p=!s||!o,u=[];for(v=0;v<n.length;v++){var m=i[n[v]];p?u.push(m[0]):u.push(m)}for(p&&(u=[u]),v=0;v<u.length;v++){var h=1/0;for(T=0;T<u[v].length;T++){var P=u[v][T].trace.legendrank;h>P&&(h=P)}u[v][0]._groupMinRank=h,u[v][0]._preGroupSort=v}var L=function(N,U){return N[0]._groupMinRank-U[0]._groupMinRank||N[0]._preGroupSort-U[0]._preGroupSort},z=function(N,U){return N.trace.legendrank-U.trace.legendrank||N._preSort-U._preSort};for(u.forEach(function(N,U){N[0]._preGroupSort=U}),u.sort(L),v=0;v<u.length;v++){u[v].forEach(function(N,U){N._preSort=U}),u[v].sort(z);var F=u[v][0].trace,B=null;for(T=0;T<u[v].length;T++){var O=u[v][T].trace.legendgrouptitle;if(O&&O.text){B=O,r&&(O.font=e._groupTitleFont);break}}if(a&&u[v].reverse(),B){var I=!1;for(T=0;T<u[v].length;T++)if(d.traceIs(u[v][T].trace,"pie-like")){I=!0;break}u[v].unshift({i:-1,groupTitle:B,noClick:I,trace:{showlegend:F.showlegend,legendgroup:F.legendgroup,visible:e.groupclick==="toggleitem"?!0:F.visible}})}for(T=0;T<u[v].length;T++)u[v][T]=[u[v][T]]}return e._lgroupsLength=u.length,e._maxNameLength=g,u}}}),e0=Ze({"src/traces/pie/helpers.js"(Z){"use strict";var q=ca();function d(x){return x.indexOf("e")!==-1?x.replace(/[.]?0+e/,"e"):x.indexOf(".")!==-1?x.replace(/[.]?0+$/,""):x}Z.formatPiePercent=function(A,M){var e=d((A*100).toPrecision(3));return q.numSeparate(e,M)+"%"},Z.formatPieValue=function(A,M){var e=d(A.toPrecision(10));return q.numSeparate(e,M)},Z.getFirstFilled=function(A,M){if(q.isArrayOrTypedArray(A))for(var e=0;e<M.length;e++){var t=A[M[e]];if(t||t===0||t==="")return t}},Z.castOption=function(A,M){if(q.isArrayOrTypedArray(A))return Z.getFirstFilled(A,M);if(A)return A},Z.getRotationAngle=function(x){return(x==="auto"?0:x)*Math.PI/180}}}),dz=Ze({"src/traces/pie/fill_one.js"(Z,q){"use strict";var d=as(),x=Yn();q.exports=function(M,e,t,r){var o=t.marker.pattern;o&&o.shape?d.pointStyle(M,t,r,e):x.fill(M,e.color)}}}),i1=Ze({"src/traces/pie/style_one.js"(Z,q){"use strict";var d=Yn(),x=e0().castOption,A=dz();q.exports=function(e,t,r,o){var a=r.marker.line,i=x(a.color,t.pts)||d.defaultLine,n=x(a.width,t.pts)||0;e.call(A,t,r,o).style("stroke-width",n).call(d.stroke,i)}}}),m5=Ze({"src/components/legend/style.js"(Z,q){"use strict";var d=On(),x=oo(),A=ca(),M=A.strTranslate,e=as(),t=Yn(),r=bp().extractOpts,o=Fu(),a=i1(),i=e0().castOption,n=v5(),s=12,c=5,f=2,g=10,v=5;q.exports=function(S,E,y){var b=E._fullLayout;y||(y=b.legend);var p=y.itemsizing==="constant",u=y.itemwidth,m=(u+n.itemGap*2)/2,h=M(m,0),P=function(G,$,J,X){var oe;if(G+1)oe=G;else if($&&$.width>0)oe=$.width;else return 0;return p?X:Math.min(oe,J)};S.each(function(G){var $=d.select(this),J=A.ensureSingle($,"g","layers");J.style("opacity",G[0].trace.opacity);var X=y.indentation,oe=y.valign,ie=G[0].lineHeight,j=G[0].height;if(oe==="middle"&&X===0||!ie||!j)J.attr("transform",null);else{var ee={top:1,bottom:-1}[oe],re=ee*(.5*(ie-j+3))||0,ce=y.indentation;J.attr("transform",M(ce,re))}var be=J.selectAll("g.legendfill").data([G]);be.enter().append("g").classed("legendfill",!0);var Ae=J.selectAll("g.legendlines").data([G]);Ae.enter().append("g").classed("legendlines",!0);var ze=J.selectAll("g.legendsymbols").data([G]);ze.enter().append("g").classed("legendsymbols",!0),ze.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(he).each(F).each(O).each(B).each(N).each(ue).each(Q).each(L).each(z).each(U).each(W);function L(G){var $=l(G),J=$.showFill,X=$.showLine,oe=$.showGradientLine,ie=$.showGradientFill,j=$.anyFill,ee=$.anyLine,re=G[0],ce=re.trace,be,Ae,ze=r(ce),Re=ze.colorscale,Xe=ze.reversescale,it=function(Fe){if(Fe.size())if(J)e.fillGroupStyle(Fe,E,!0);else{var rt="legendfill-"+ce.uid;e.gradient(Fe,E,rt,T(Xe),Re,"fill")}},ot=function(Fe){if(Fe.size()){var rt="legendline-"+ce.uid;e.lineGroupStyle(Fe),e.gradient(Fe,E,rt,T(Xe),Re,"stroke")}},tt=o.hasMarkers(ce)||!j?"M5,0":ee?"M5,-2":"M5,-3",lt=d.select(this),Ee=lt.select(".legendfill").selectAll("path").data(J||ie?[G]:[]);if(Ee.enter().append("path").classed("js-fill",!0),Ee.exit().remove(),Ee.attr("d",tt+"h"+u+"v6h-"+u+"z").call(it),X||oe){var _e=P(void 0,ce.line,g,c);Ae=A.minExtend(ce,{line:{width:_e}}),be=[A.minExtend(re,{trace:Ae})]}var fe=lt.select(".legendlines").selectAll("path").data(X||oe?[be]:[]);fe.enter().append("path").classed("js-line",!0),fe.exit().remove(),fe.attr("d",tt+(oe?"l"+u+",0.0001":"h"+u)).call(X?e.lineGroupStyle:ot)}function z(G){var $=l(G),J=$.anyFill,X=$.anyLine,oe=$.showLine,ie=$.showMarker,j=G[0],ee=j.trace,re=!ie&&!X&&!J&&o.hasText(ee),ce,be;function Ae(Ee,_e,fe,Fe){var rt=A.nestedProperty(ee,Ee).get(),st=A.isArrayOrTypedArray(rt)&&_e?_e(rt):rt;if(p&&st&&Fe!==void 0&&(st=Fe),fe){if(st<fe[0])return fe[0];if(st>fe[1])return fe[1]}return st}function ze(Ee){return j._distinct&&j.index&&Ee[j.index]?Ee[j.index]:Ee[0]}if(ie||re||oe){var Re={},Xe={};if(ie){Re.mc=Ae("marker.color",ze),Re.mx=Ae("marker.symbol",ze),Re.mo=Ae("marker.opacity",A.mean,[.2,1]),Re.mlc=Ae("marker.line.color",ze),Re.mlw=Ae("marker.line.width",A.mean,[0,5],f),Xe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var it=Ae("marker.size",A.mean,[2,16],s);Re.ms=it,Xe.marker.size=it}oe&&(Xe.line={width:Ae("line.width",ze,[0,10],c)}),re&&(Re.tx="Aa",Re.tp=Ae("textposition",ze),Re.ts=10,Re.tc=Ae("textfont.color",ze),Re.tf=Ae("textfont.family",ze),Re.tw=Ae("textfont.weight",ze),Re.ty=Ae("textfont.style",ze),Re.tv=Ae("textfont.variant",ze),Re.tC=Ae("textfont.textcase",ze),Re.tE=Ae("textfont.lineposition",ze),Re.tS=Ae("textfont.shadow",ze)),ce=[A.minExtend(j,Re)],be=A.minExtend(ee,Xe),be.selectedpoints=null,be.texttemplate=null}var ot=d.select(this).select("g.legendpoints"),tt=ot.selectAll("path.scatterpts").data(ie?ce:[]);tt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",h),tt.exit().remove(),tt.call(e.pointStyle,be,E),ie&&(ce[0].mrc=3);var lt=ot.selectAll("g.pointtext").data(re?ce:[]);lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",h),lt.exit().remove(),lt.selectAll("text").call(e.textPointStyle,be,E)}function F(G){var $=G[0].trace,J=$.type==="waterfall";if(G[0]._distinct&&J){var X=G[0].trace[G[0].dir].marker;return G[0].mc=X.color,G[0].mlw=X.line.width,G[0].mlc=X.line.color,I(G,this,"waterfall")}var oe=[];$.visible&&J&&(oe=G[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 ie=d.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(oe);ie.enter().append("path").classed("legendwaterfall",!0).attr("transform",h).style("stroke-miterlimit",1),ie.exit().remove(),ie.each(function(j){var ee=d.select(this),re=$[j[0]].marker,ce=P(void 0,re.line,v,f);ee.attr("d",j[1]).style("stroke-width",ce+"px").call(t.fill,re.color),ce&&ee.call(t.stroke,re.line.color)})}function B(G){I(G,this)}function O(G){I(G,this,"funnel")}function I(G,$,J){var X=G[0].trace,oe=X.marker||{},ie=oe.line||{},j=oe.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",ee=J?X.visible&&X.type===J:x.traceIs(X,"bar"),re=d.select($).select("g.legendpoints").selectAll("path.legend"+J).data(ee?[G]:[]);re.enter().append("path").classed("legend"+J,!0).attr("d",j).attr("transform",h),re.exit().remove(),re.each(function(ce){var be=d.select(this),Ae=ce[0],ze=P(Ae.mlw,oe.line,v,f);be.style("stroke-width",ze+"px");var Re=Ae.mcc;if(!y._inHover&&"mc"in Ae){var Xe=r(oe),it=Xe.mid;it===void 0&&(it=(Xe.max+Xe.min)/2),Re=e.tryColorscale(oe,"")(it)}var ot=Re||Ae.mc||oe.color,tt=oe.pattern,lt=e.getPatternAttr,Ee=tt&&(lt(tt.shape,0,"")||lt(tt.path,0,""));if(Ee){var _e=lt(tt.bgcolor,0,null),fe=lt(tt.fgcolor,0,null),Fe=tt.fgopacity,rt=_(tt.size,8,10),st=_(tt.solidity,.5,1),Qe="legend-"+X.uid;be.call(e.pattern,"legend",E,Qe,Ee,rt,st,Re,tt.fillmode,_e,fe,Fe)}else be.call(t.fill,ot);ze&&t.stroke(be,Ae.mlc||ie.color)})}function N(G){var $=G[0].trace,J=d.select(this).select("g.legendpoints").selectAll("path.legendbox").data($.visible&&x.traceIs($,"box-violin")?[G]:[]);J.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",h),J.exit().remove(),J.each(function(){var X=d.select(this);if(($.boxpoints==="all"||$.points==="all")&&t.opacity($.fillcolor)===0&&t.opacity(($.line||{}).color)===0){var oe=A.minExtend($,{marker:{size:p?s:A.constrain($.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});J.call(e.pointStyle,oe,E)}else{var ie=P(void 0,$.line,v,f);X.style("stroke-width",ie+"px").call(t.fill,$.fillcolor),ie&&t.stroke(X,$.line.color)}})}function U(G){var $=G[0].trace,J=d.select(this).select("g.legendpoints").selectAll("path.legendcandle").data($.visible&&$.type==="candlestick"?[G,G]:[]);J.enter().append("path").classed("legendcandle",!0).attr("d",function(X,oe){return oe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",h).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(X,oe){var ie=d.select(this),j=$[oe?"increasing":"decreasing"],ee=P(void 0,j.line,v,f);ie.style("stroke-width",ee+"px").call(t.fill,j.fillcolor),ee&&t.stroke(ie,j.line.color)})}function W(G){var $=G[0].trace,J=d.select(this).select("g.legendpoints").selectAll("path.legendohlc").data($.visible&&$.type==="ohlc"?[G,G]:[]);J.enter().append("path").classed("legendohlc",!0).attr("d",function(X,oe){return oe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",h).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(X,oe){var ie=d.select(this),j=$[oe?"increasing":"decreasing"],ee=P(void 0,j.line,v,f);ie.style("fill","none").call(e.dashLine,j.line.dash,ee),ee&&t.stroke(ie,j.line.color)})}function Q(G){le(G,this,"pie")}function ue(G){le(G,this,"funnelarea")}function le(G,$,J){var X=G[0],oe=X.trace,ie=J?oe.visible&&oe.type===J:x.traceIs(oe,J),j=d.select($).select("g.legendpoints").selectAll("path.legend"+J).data(ie?[G]:[]);if(j.enter().append("path").classed("legend"+J,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",h),j.exit().remove(),j.size()){var ee=oe.marker||{},re=P(i(ee.line.width,X.pts),ee.line,v,f),ce="pieLike",be=A.minExtend(oe,{marker:{line:{width:re}}},ce),Ae=A.minExtend(X,{trace:be},ce);a(j,Ae,be,E)}}function he(G){var $=G[0].trace,J,X=[];if($.visible)switch($.type){case"histogram2d":case"heatmap":X=[["M-15,-2V4H15V-2Z"]],J=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":X=[["M-6,-6V6H6V-6Z"]],J=!0;break;case"densitymapbox":case"densitymap":X=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],J="radial";break;case"cone":X=[["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"]],J=!1;break;case"streamtube":X=[["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"]],J=!1;break;case"surface":X=[["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"]],J=!0;break;case"mesh3d":X=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],J=!1;break;case"volume":X=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],J=!0;break;case"isosurface":X=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],J=!1;break}var oe=d.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(X);oe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",h).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(ie,j){var ee=d.select(this),re=r($),ce=re.colorscale,be=re.reversescale,Ae=function(it){if(it.size()){var ot="legendfill-"+$.uid;e.gradient(it,E,ot,T(be,J==="radial"),ce,"fill")}},ze;if(ce){if(!J){var Xe=ce.length;ze=j===0?ce[be?Xe-1:0][1]:j===1?ce[be?0:Xe-1][1]:ce[Math.floor((Xe-1)/2)][1]}}else{var Re=$.vertexcolor||$.facecolor||$.color;ze=A.isArrayOrTypedArray(Re)?Re[j]||Re[0]:Re}ee.attr("d",ie[0]),ze?ee.call(t.fill,ze):ee.call(Ae)})}};function T(w,S){var E=S?"radial":"horizontal";return E+(w?"":"reversed")}function l(w){var S=w[0].trace,E=S.contours,y=o.hasLines(S),b=o.hasMarkers(S),p=S.visible&&S.fill&&S.fill!=="none",u=!1,m=!1;if(E){var h=E.coloring;h==="lines"?u=!0:y=h==="none"||h==="heatmap"||E.showlines,E.type==="constraint"?p=E._operation!=="=":(h==="fill"||h==="heatmap")&&(m=!0)}return{showMarker:b,showLine:y,showFill:p,showGradientLine:u,showGradientFill:m,anyLine:y||u,anyFill:p||m}}function _(w,S,E){return w&&A.isArrayOrTypedArray(w)?S:w>E?E:w}}}),g5=Ze({"src/components/legend/draw.js"(Z,q){"use strict";var d=On(),x=ca(),A=xc(),M=oo(),e=Qy(),t=Tp(),r=as(),o=Yn(),a=fu(),i=hz(),n=v5(),s=mh(),c=s.LINE_SPACING,f=s.FROM_TL,g=s.FROM_BR,v=pz(),T=m5(),l=b2(),_=1,w=/^legend[0-9]*$/;q.exports=function(U,W){if(W)E(U,W);else{var Q=U._fullLayout,ue=Q._legends,le=Q._infolayer.selectAll('[class^="legend"]');le.each(function(){var J=d.select(this),X=J.attr("class"),oe=X.split(" ")[0];oe.match(w)&&ue.indexOf(oe)===-1&&J.remove()});for(var he=0;he<ue.length;he++){var G=ue[he],$=U._fullLayout[G];E(U,$)}}};function S(N,U,W){if(!(U.title.side!=="top center"&&U.title.side!=="top right")){var Q=U.title.font,ue=Q.size*c,le=0,he=N.node(),G=r.bBox(he).width;U.title.side==="top center"?le=.5*(U._width-2*W-2*n.titlePad-G):U.title.side==="top right"&&(le=U._width-2*W-2*n.titlePad-G),a.positionText(N,W+n.titlePad+le,W+ue)}}function E(N,U){var W=U||{},Q=N._fullLayout,ue=I(W),le,he,G=W._inHover;if(G?(he=W.layer,le="hover"):(he=Q._infolayer,le=ue),!!he){le+=Q._uid,N._legendMouseDownTime||(N._legendMouseDownTime=0);var $;if(G){if(!W.entries)return;$=v(W.entries,W)}else{for(var J=(N.calcdata||[]).slice(),X=Q.shapes,oe=0;oe<X.length;oe++){var ie=X[oe];if(ie.showlegend){var j={_isShape:!0,_fullInput:ie,index:ie._index,name:ie.name||ie.label.text||"shape "+ie._index,legend:ie.legend,legendgroup:ie.legendgroup,legendgrouptitle:ie.legendgrouptitle,legendrank:ie.legendrank,legendwidth:ie.legendwidth,showlegend:ie.showlegend,visible:ie.visible,opacity:ie.opacity,mode:ie.type==="line"?"lines":"markers",line:ie.line,marker:{line:ie.line,color:ie.fillcolor,size:12,symbol:ie.type==="rect"?"square":ie.type==="circle"?"circle":"hexagon2"}};J.push([{trace:j}])}}$=Q.showlegend&&v(J,W,Q._legends.length>1)}var ee=Q.hiddenlabels||[];if(!G&&(!Q.showlegend||!$.length))return he.selectAll("."+ue).remove(),Q._topdefs.select("#"+le).remove(),A.autoMargin(N,ue);var re=x.ensureSingle(he,"g",ue,function(tt){G||tt.attr("pointer-events","all")}),ce=x.ensureSingleById(Q._topdefs,"clipPath",le,function(tt){tt.append("rect")}),be=x.ensureSingle(re,"rect","bg",function(tt){tt.attr("shape-rendering","crispEdges")});be.call(o.stroke,W.bordercolor).call(o.fill,W.bgcolor).style("stroke-width",W.borderwidth+"px");var Ae=x.ensureSingle(re,"g","scrollbox"),ze=W.title;W._titleWidth=0,W._titleHeight=0;var Re;ze.text?(Re=x.ensureSingle(Ae,"text",ue+"titletext"),Re.attr("text-anchor","start").call(r.font,ze.font).text(ze.text),h(Re,Ae,N,W,_)):Ae.selectAll("."+ue+"titletext").remove();var Xe=x.ensureSingle(re,"rect","scrollbar",function(tt){tt.attr(n.scrollBarEnterAttrs).call(o.fill,n.scrollBarColor)}),it=Ae.selectAll("g.groups").data($);it.enter().append("g").attr("class","groups"),it.exit().remove();var ot=it.selectAll("g.traces").data(x.identity);ot.enter().append("g").attr("class","traces"),ot.exit().remove(),ot.style("opacity",function(tt){var lt=tt[0].trace;return M.traceIs(lt,"pie-like")?ee.indexOf(tt[0].label)!==-1?.5:1:lt.visible==="legendonly"?.5:1}).each(function(){d.select(this).call(p,N,W)}).call(T,N,W).each(function(){G||d.select(this).call(m,N,ue)}),x.syncOrAsync([A.previousPromises,function(){return z(N,it,ot,W)},function(){var tt=Q._size,lt=W.borderwidth,Ee=W.xref==="paper",_e=W.yref==="paper";if(ze.text&&S(Re,W,lt),!G){var fe,Fe;Ee?fe=tt.l+tt.w*W.x-f[B(W)]*W._width:fe=Q.width*W.x-f[B(W)]*W._width,_e?Fe=tt.t+tt.h*(1-W.y)-f[O(W)]*W._effHeight:Fe=Q.height*(1-W.y)-f[O(W)]*W._effHeight;var rt=F(N,ue,fe,Fe);if(rt)return;if(Q.margin.autoexpand){var st=fe,Qe=Fe;fe=Ee?x.constrain(fe,0,Q.width-W._width):st,Fe=_e?x.constrain(Fe,0,Q.height-W._effHeight):Qe,fe!==st&&x.log("Constrain "+ue+".x to make legend fit inside graph"),Fe!==Qe&&x.log("Constrain "+ue+".y to make legend fit inside graph")}r.setTranslate(re,fe,Fe)}if(Xe.on(".drag",null),re.on("wheel",null),G||W._height<=W._maxHeight||N._context.staticPlot){var Lt=W._effHeight;G&&(Lt=W._height),be.attr({width:W._width-lt,height:Lt-lt,x:lt/2,y:lt/2}),r.setTranslate(Ae,0,0),ce.select("rect").attr({width:W._width-2*lt,height:Lt-2*lt,x:lt,y:lt}),r.setClipUrl(Ae,le,N),r.setRect(Xe,0,0,0,0),delete W._scrollY}else{var kt=Math.max(n.scrollBarMinHeight,W._effHeight*W._effHeight/W._height),Vt=W._effHeight-kt-2*n.scrollBarMargin,Zt=W._height-W._effHeight,Sr=Vt/Zt,xr=Math.min(W._scrollY||0,Zt);be.attr({width:W._width-2*lt+n.scrollBarWidth+n.scrollBarMargin,height:W._effHeight-lt,x:lt/2,y:lt/2}),ce.select("rect").attr({width:W._width-2*lt+n.scrollBarWidth+n.scrollBarMargin,height:W._effHeight-2*lt,x:lt,y:lt+xr}),r.setClipUrl(Ae,le,N),Me(xr,kt,Sr),re.on("wheel",function(){xr=x.constrain(W._scrollY+d.event.deltaY/Vt*Zt,0,Zt),Me(xr,kt,Sr),xr!==0&&xr!==Zt&&d.event.preventDefault()});var jr,wr,Ir,bt=function(at,yt,Tt){var Ot=(Tt-yt)/Sr+at;return x.constrain(Ot,0,Zt)},Be=function(at,yt,Tt){var Ot=(yt-Tt)/Sr+at;return x.constrain(Ot,0,Zt)},Ke=d.behavior.drag().on("dragstart",function(){var at=d.event.sourceEvent;at.type==="touchstart"?jr=at.changedTouches[0].clientY:jr=at.clientY,Ir=xr}).on("drag",function(){var at=d.event.sourceEvent;at.buttons===2||at.ctrlKey||(at.type==="touchmove"?wr=at.changedTouches[0].clientY:wr=at.clientY,xr=bt(Ir,jr,wr),Me(xr,kt,Sr))});Xe.call(Ke);var Ue=d.behavior.drag().on("dragstart",function(){var at=d.event.sourceEvent;at.type==="touchstart"&&(jr=at.changedTouches[0].clientY,Ir=xr)}).on("drag",function(){var at=d.event.sourceEvent;at.type==="touchmove"&&(wr=at.changedTouches[0].clientY,xr=Be(Ir,jr,wr),Me(xr,kt,Sr))});Ae.call(Ue)}function Me(at,yt,Tt){W._scrollY=N._fullLayout[ue]._scrollY=at,r.setTranslate(Ae,0,-at),r.setRect(Xe,W._width,n.scrollBarMargin+at*Tt,n.scrollBarWidth,yt),ce.select("rect").attr("y",lt+at)}if(N._context.edits.legendPosition){var qe,Ce,Te,Pe;re.classed("cursor-move",!0),t.init({element:re.node(),gd:N,prepFn:function(at){if(at.target!==Xe.node()){var yt=r.getTranslate(re);Te=yt.x,Pe=yt.y}},moveFn:function(at,yt){if(Te!==void 0&&Pe!==void 0){var Tt=Te+at,Ot=Pe+yt;r.setTranslate(re,Tt,Ot),qe=t.align(Tt,W._width,tt.l,tt.l+tt.w,W.xanchor),Ce=t.align(Ot+W._height,-W._height,tt.t+tt.h,tt.t,W.yanchor)}},doneFn:function(){if(qe!==void 0&&Ce!==void 0){var at={};at[ue+".x"]=qe,at[ue+".y"]=Ce,M.call("_guiRelayout",N,at)}},clickFn:function(at,yt){var Tt=he.selectAll("g.traces").filter(function(){var Ot=this.getBoundingClientRect();return yt.clientX>=Ot.left&&yt.clientX<=Ot.right&&yt.clientY>=Ot.top&&yt.clientY<=Ot.bottom});Tt.size()>0&&b(N,re,Tt,at,yt)}})}}],N)}}function y(N,U,W){var Q=N[0],ue=Q.width,le=U.entrywidthmode,he=Q.trace.legendwidth||U.entrywidth;return le==="fraction"?U._maxWidth*he:W+(he||ue)}function b(N,U,W,Q,ue){var le=W.data()[0][0].trace,he={event:ue,node:W.node(),curveNumber:le.index,expandedIndex:le.index,data:N.data,layout:N.layout,frames:N._transitionData._frames,config:N._context,fullData:N._fullData,fullLayout:N._fullLayout};le._group&&(he.group=le._group),M.traceIs(le,"pie-like")&&(he.label=W.datum()[0].label);var G=e.triggerHandler(N,"plotly_legendclick",he);if(Q===1){if(G===!1)return;U._clickTimeout=setTimeout(function(){N._fullLayout&&i(W,N,Q)},N._context.doubleClickDelay)}else if(Q===2){U._clickTimeout&&clearTimeout(U._clickTimeout),N._legendMouseDownTime=0;var $=e.triggerHandler(N,"plotly_legenddoubleclick",he);$!==!1&&G!==!1&&i(W,N,Q)}}function p(N,U,W){var Q=I(W),ue=N.data()[0][0],le=ue.trace,he=M.traceIs(le,"pie-like"),G=!W._inHover&&U._context.edits.legendText&&!he,$=W._maxNameLength,J,X;ue.groupTitle?(J=ue.groupTitle.text,X=ue.groupTitle.font):(X=W.font,W.entries?J=ue.text:(J=he?ue.label:le.name,le._meta&&(J=x.templateString(J,le._meta))));var oe=x.ensureSingle(N,"text",Q+"text");oe.attr("text-anchor","start").call(r.font,X).text(G?u(J,$):J);var ie=W.indentation+W.itemwidth+n.itemGap*2;a.positionText(oe,ie,0),G?oe.call(a.makeEditable,{gd:U,text:J}).call(h,N,U,W).on("edit",function(j){this.text(u(j,$)).call(h,N,U,W);var ee=ue.trace._fullInput||{},re={};return re.name=j,ee._isShape?M.call("_guiRelayout",U,"shapes["+le.index+"].name",re.name):M.call("_guiRestyle",U,re,le.index)}):h(oe,N,U,W)}function u(N,U){var W=Math.max(4,U);if(N&&N.trim().length>=W/2)return N;N=N||"";for(var Q=W-N.length;Q>0;Q--)N+=" ";return N}function m(N,U,W){var Q=U._context.doubleClickDelay,ue,le=1,he=x.ensureSingle(N,"rect",W+"toggle",function(G){U._context.staticPlot||G.style("cursor","pointer").attr("pointer-events","all"),G.call(o.fill,"rgba(0,0,0,0)")});U._context.staticPlot||(he.on("mousedown",function(){ue=new Date().getTime(),ue-U._legendMouseDownTime<Q?le+=1:(le=1,U._legendMouseDownTime=ue)}),he.on("mouseup",function(){if(!(U._dragged||U._editing)){var G=U._fullLayout[W];new Date().getTime()-U._legendMouseDownTime>Q&&(le=Math.max(le-1,1)),b(U,G,N,le,d.event)}}))}function h(N,U,W,Q,ue){Q._inHover&&N.attr("data-notex",!0),a.convertToTspans(N,W,function(){P(U,W,Q,ue)})}function P(N,U,W,Q){var ue=N.data()[0][0];if(!W._inHover&&ue&&!ue.trace.showlegend){N.remove();return}var le=N.select("g[class*=math-group]"),he=le.node(),G=I(W);W||(W=U._fullLayout[G]);var $=W.borderwidth,J;Q===_?J=W.title.font:ue.groupTitle?J=ue.groupTitle.font:J=W.font;var X=J.size*c,oe,ie;if(he){var j=r.bBox(he);oe=j.height,ie=j.width,Q===_?r.setTranslate(le,$,$+oe*.75):r.setTranslate(le,0,oe*.25)}else{var ee="."+G+(Q===_?"title":"")+"text",re=N.select(ee),ce=a.lineCount(re),be=re.node();if(oe=X*ce,ie=be?r.bBox(be).width:0,Q===_)W.title.side==="left"&&(ie+=n.itemGap*2),a.positionText(re,$+n.titlePad,$+X);else{var Ae=n.itemGap*2+W.indentation+W.itemwidth;ue.groupTitle&&(Ae=n.itemGap,ie-=W.indentation+W.itemwidth),a.positionText(re,Ae,-X*((ce-1)/2-.3))}}Q===_?(W._titleWidth=ie,W._titleHeight=oe):(ue.lineHeight=X,ue.height=Math.max(oe,16)+3,ue.width=ie)}function L(N){var U=0,W=0,Q=N.title.side;return Q&&(Q.indexOf("left")!==-1&&(U=N._titleWidth),Q.indexOf("top")!==-1&&(W=N._titleHeight)),[U,W]}function z(N,U,W,Q){var ue=N._fullLayout,le=I(Q);Q||(Q=ue[le]);var he=ue._size,G=l.isVertical(Q),$=l.isGrouped(Q),J=Q.entrywidthmode==="fraction",X=Q.borderwidth,oe=2*X,ie=n.itemGap,j=Q.indentation+Q.itemwidth+ie*2,ee=2*(X+ie),re=O(Q),ce=Q.y<0||Q.y===0&&re==="top",be=Q.y>1||Q.y===1&&re==="bottom",Ae=Q.tracegroupgap,ze={};let{orientation:Re,yref:Xe}=Q,{maxheight:it}=Q,ot=ce||be||Re!=="v"||Xe!=="paper";it||(it=ot?.5:1);let tt=ot?ue.height:he.h;Q._maxHeight=Math.max(it>1?it:it*tt,30);var lt=0;Q._width=0,Q._height=0;var Ee=L(Q);if(G)W.each(function(Me){var qe=Me[0].height;r.setTranslate(this,X+Ee[0],X+Ee[1]+Q._height+qe/2+ie),Q._height+=qe,Q._width=Math.max(Q._width,Me[0].width)}),lt=j+Q._width,Q._width+=ie+j+oe,Q._height+=ee,$&&(U.each(function(Me,qe){r.setTranslate(this,0,qe*Q.tracegroupgap)}),Q._height+=(Q._lgroupsLength-1)*Q.tracegroupgap);else{var _e=B(Q),fe=Q.x<0||Q.x===0&&_e==="right",Fe=Q.x>1||Q.x===1&&_e==="left",rt=be||ce,st=ue.width/2;Q._maxWidth=Math.max(fe?rt&&_e==="left"?he.l+he.w:st:Fe?rt&&_e==="right"?he.r+he.w:st:he.w,2*j);var Qe=0,Lt=0;W.each(function(Me){var qe=y(Me,Q,j);Qe=Math.max(Qe,qe),Lt+=qe}),lt=null;var kt=0;if($){var Vt=0,Zt=0,Sr=0;U.each(function(){var Me=0,qe=0;d.select(this).selectAll("g.traces").each(function(Te){var Pe=y(Te,Q,j),at=Te[0].height;r.setTranslate(this,Ee[0],Ee[1]+X+ie+at/2+qe),qe+=at,Me=Math.max(Me,Pe),ze[Te[0].trace.legendgroup]=Me});var Ce=Me+ie;Zt>0&&Ce+X+Zt>Q._maxWidth?(kt=Math.max(kt,Zt),Zt=0,Sr+=Vt+Ae,Vt=qe):Vt=Math.max(Vt,qe),r.setTranslate(this,Zt,Sr),Zt+=Ce}),Q._width=Math.max(kt,Zt)+X,Q._height=Sr+Vt+ee}else{var xr=W.size(),jr=Lt+oe+(xr-1)*ie<Q._maxWidth,wr=0,Ir=0,bt=0,Be=0;W.each(function(Me){var qe=Me[0].height,Ce=y(Me,Q,j,$),Te=jr?Ce:Qe;J||(Te+=ie),Te+X+Ir-ie>=Q._maxWidth&&(kt=Math.max(kt,Be),Ir=0,bt+=wr,Q._height+=wr,wr=0),r.setTranslate(this,Ee[0]+X+Ir,Ee[1]+X+bt+qe/2+ie),Be=Ir+Ce+ie,Ir+=Te,wr=Math.max(wr,qe)}),jr?(Q._width=Ir+oe,Q._height=wr+ee):(Q._width=Math.max(kt,Be)+oe,Q._height+=wr+ee)}}Q._width=Math.ceil(Math.max(Q._width+Ee[0],Q._titleWidth+2*(X+n.titlePad))),Q._height=Math.ceil(Math.max(Q._height+Ee[1],Q._titleHeight+2*(X+n.itemGap))),Q._effHeight=Math.min(Q._height,Q._maxHeight);var Ke=N._context.edits,Ue=Ke.legendText||Ke.legendPosition;W.each(function(Me){var qe=d.select(this).select("."+le+"toggle"),Ce=Me[0].height,Te=Me[0].trace.legendgroup,Pe=y(Me,Q,j);$&&Te!==""&&(Pe=ze[Te]);var at=Ue?j:lt||Pe;!G&&!J&&(at+=ie/2),r.setRect(qe,0,-Ce/2,at,Ce)})}function F(N,U,W,Q){var ue=N._fullLayout,le=ue[U],he=B(le),G=O(le),$=le.xref==="paper",J=le.yref==="paper";N._fullLayout._reservedMargin[U]={};var X=le.y<.5?"b":"t",oe=le.x<.5?"l":"r",ie={r:ue.width-W,l:W+le._width,b:ue.height-Q,t:Q+le._effHeight};if($&&J)return A.autoMargin(N,U,{x:le.x,y:le.y,l:le._width*f[he],r:le._width*g[he],b:le._effHeight*g[G],t:le._effHeight*f[G]});$?N._fullLayout._reservedMargin[U][X]=ie[X]:J||le.orientation==="v"?N._fullLayout._reservedMargin[U][oe]=ie[oe]:N._fullLayout._reservedMargin[U][X]=ie[X]}function B(N){return x.isRightAnchor(N)?"right":x.isCenterAnchor(N)?"center":"left"}function O(N){return x.isBottomAnchor(N)?"bottom":x.isMiddleAnchor(N)?"middle":"top"}function I(N){return N._id||"legend"}}}),y5=Ze({"src/components/fx/hover.js"(Z){"use strict";var q=On(),d=ns(),x=Ch(),A=ca(),M=A.pushUnique,e=A.strTranslate,t=A.strRotate,r=Qy(),o=fu(),a=fz(),i=as(),n=Yn(),s=Tp(),c=Wo(),f=kh().zindexSeparator,g=oo(),v=Qp(),T=w_(),l=d5(),_=g5(),w=T.YANGLE,S=Math.PI*w/180,E=1/Math.sin(S),y=Math.cos(S),b=Math.sin(S),p=T.HOVERARROWSIZE,u=T.HOVERTEXTPAD,m={box:!0,ohlc:!0,violin:!0,candlestick:!0},h={scatter:!0,scattergl:!0,splom:!0};function P(j,ee){return j.distance-ee.distance}Z.hover=function(ee,re,ce,be){ee=A.getGraphDiv(ee);var Ae=re.target;A.throttle(ee._fullLayout._uid+T.HOVERID,T.HOVERMINTIME,function(){L(ee,re,ce,be,Ae)})},Z.loneHover=function(ee,re){var ce=!0;Array.isArray(ee)||(ce=!1,ee=[ee]);var be=re.gd,Ae=X(be),ze=oe(be),Re=ee.map(function(Fe){var rt=Fe._x0||Fe.x0||Fe.x||0,st=Fe._x1||Fe.x1||Fe.x||0,Qe=Fe._y0||Fe.y0||Fe.y||0,Lt=Fe._y1||Fe.y1||Fe.y||0,kt=Fe.eventData;if(kt){var Vt=Math.min(rt,st),Zt=Math.max(rt,st),Sr=Math.min(Qe,Lt),xr=Math.max(Qe,Lt),jr=Fe.trace;if(g.traceIs(jr,"gl3d")){var wr=be._fullLayout[jr.scene]._scene.container,Ir=wr.offsetLeft,bt=wr.offsetTop;Vt+=Ir,Zt+=Ir,Sr+=bt,xr+=bt}kt.bbox={x0:Vt+ze,x1:Zt+ze,y0:Sr+Ae,y1:xr+Ae},re.inOut_bbox&&re.inOut_bbox.push(kt.bbox)}else kt=!1;return{color:Fe.color||n.defaultLine,x0:Fe.x0||Fe.x||0,x1:Fe.x1||Fe.x||0,y0:Fe.y0||Fe.y||0,y1:Fe.y1||Fe.y||0,xLabel:Fe.xLabel,yLabel:Fe.yLabel,zLabel:Fe.zLabel,text:Fe.text,name:Fe.name,idealAlign:Fe.idealAlign,borderColor:Fe.borderColor,fontFamily:Fe.fontFamily,fontSize:Fe.fontSize,fontColor:Fe.fontColor,fontWeight:Fe.fontWeight,fontStyle:Fe.fontStyle,fontVariant:Fe.fontVariant,nameLength:Fe.nameLength,textAlign:Fe.textAlign,trace:Fe.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Fe.hovertemplate||!1,hovertemplateLabels:Fe.hovertemplateLabels||!1,eventData:kt}}),Xe=!1,it=B(Re,{gd:be,hovermode:"closest",rotateLabels:Xe,bgColor:re.bgColor||n.background,container:q.select(re.container),outerContainer:re.outerContainer||re.container}),ot=it.hoverLabels,tt=5,lt=0,Ee=0;ot.sort(function(Fe,rt){return Fe.y0-rt.y0}).each(function(Fe,rt){var st=Fe.y0-Fe.by/2;st-tt<lt?Fe.offset=lt-st+tt:Fe.offset=0,lt=st+Fe.by+Fe.offset,rt===re.anchorIndex&&(Ee=Fe.offset)}).each(function(Fe){Fe.offset-=Ee});var _e=be._fullLayout._invScaleX,fe=be._fullLayout._invScaleY;return W(ot,Xe,_e,fe),ce?ot:ot.node()};function L(j,ee,re,ce,be){re||(re="xy"),typeof re=="string"&&(re=re.split(f)[0]);var Ae=Array.isArray(re)?re:[re],ze,Re=j._fullLayout,Xe=Re.hoversubplots,it=Re._plots||[],ot=it[re],tt=Re._has("cartesian"),lt=ee.hovermode||Re.hovermode,Ee=(lt||"").charAt(0)==="x",_e=(lt||"").charAt(0)==="y",fe,Fe;if(tt&&(Ee||_e)&&Xe==="axis"){for(var rt=Ae.length,st=0;st<rt;st++)if(ze=Ae[st],it[ze]){fe=c.getFromId(j,ze,"x"),Fe=c.getFromId(j,ze,"y");var Qe=(Ee?fe:Fe)._subplotsWith;if(Qe&&Qe.length)for(var Lt=0;Lt<Qe.length;Lt++)M(Ae,Qe[Lt])}}if(ot&&Xe!=="single"){var kt=ot.overlays.map(function(pn){return pn.id});Ae=Ae.concat(kt)}for(var Vt=Ae.length,Zt=new Array(Vt),Sr=new Array(Vt),xr=!1,jr=0;jr<Vt;jr++)if(ze=Ae[jr],it[ze])xr=!0,Zt[jr]=it[ze].xaxis,Sr[jr]=it[ze].yaxis;else if(Re[ze]&&Re[ze]._subplot){var wr=Re[ze]._subplot;Zt[jr]=wr.xaxis,Sr[jr]=wr.yaxis}else{A.warn("Unrecognized subplot: "+ze);return}if(lt&&!xr&&(lt="closest"),["x","y","closest","x unified","y unified"].indexOf(lt)===-1||!j.calcdata||j.querySelector(".zoombox")||j._dragging)return s.unhoverRaw(j,ee);var Ir=Re.hoverdistance;Ir===-1&&(Ir=1/0);var bt=Re.spikedistance;bt===-1&&(bt=1/0);var Be=[],Ke=[],Ue,Me,qe,Ce,Te,Pe,at,yt,Tt,Ot,Gt,rr,Qt,Tr={hLinePoint:null,vLinePoint:null},la=!1;if(Array.isArray(ee))for(lt="array",qe=0;qe<ee.length;qe++)Te=j.calcdata[ee[qe].curveNumber||0],Te&&(Pe=Te[0].trace,Te[0].trace.hoverinfo!=="skip"&&(Ke.push(Te),Pe.orientation==="h"&&(la=!0)));else{var Ua=j.calcdata.slice();for(Ua.sort(function(pn,Jo){var Xo=pn[0].trace.zorder||0,Ts=Jo[0].trace.zorder||0;return Xo-Ts}),Ce=0;Ce<Ua.length;Ce++)Te=Ua[Ce],Pe=Te[0].trace,Pe.hoverinfo!=="skip"&&v.isTraceInSubplots(Pe,Ae)&&(Ke.push(Te),Pe.orientation==="h"&&(la=!0));var Ba=!be,Ra,ei;if(Ba)"xpx"in ee?Ra=ee.xpx:Ra=Zt[0]._length/2,"ypx"in ee?ei=ee.ypx:ei=Sr[0]._length/2;else{if(r.triggerHandler(j,"plotly_beforehover",ee)===!1)return;var za=be.getBoundingClientRect();Ra=ee.clientX-za.left,ei=ee.clientY-za.top,Re._calcInverseTransform(j);var ti=A.apply3DTransform(Re._invTransform)(Ra,ei);if(Ra=ti[0],ei=ti[1],Ra<0||Ra>Zt[0]._length||ei<0||ei>Sr[0]._length)return s.unhoverRaw(j,ee)}if(ee.pointerX=Ra+Zt[0]._offset,ee.pointerY=ei+Sr[0]._offset,"xval"in ee?Ue=v.flat(Ae,ee.xval):Ue=v.p2c(Zt,Ra),"yval"in ee?Me=v.flat(Ae,ee.yval):Me=v.p2c(Sr,ei),!d(Ue[0])||!d(Me[0]))return A.warn("Fx.hover failed",ee,j),s.unhoverRaw(j,ee)}var Ci=1/0;function Jt(pn,Jo){for(Ce=0;Ce<Ke.length;Ce++)if(Te=Ke[Ce],!(!Te||!Te[0]||!Te[0].trace)&&(Pe=Te[0].trace,!(Pe.visible!==!0||Pe._length===0)&&["carpet","contourcarpet"].indexOf(Pe._module.name)===-1)){if(Tt=lt,v.isUnifiedHover(Tt)&&(Tt=Tt.charAt(0)),Pe.type==="splom"?(yt=0,at=Ae[yt]):(at=v.getSubplot(Pe),yt=Ae.indexOf(at)),rr={cd:Te,trace:Pe,xa:Zt[yt],ya:Sr[yt],maxHoverDistance:Ir,maxSpikeDistance:bt,index:!1,distance:Math.min(Ci,Ir),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:Pe.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},Re[at]&&(rr.subplot=Re[at]._subplot),Re._splomScenes&&Re._splomScenes[Pe.uid]&&(rr.scene=Re._splomScenes[Pe.uid]),Tt==="array"){var Xo=ee[Ce];"pointNumber"in Xo?(rr.index=Xo.pointNumber,Tt="closest"):(Tt="","xval"in Xo&&(Ot=Xo.xval,Tt="x"),"yval"in Xo&&(Gt=Xo.yval,Tt=Tt?"closest":"y"))}else pn!==void 0&&Jo!==void 0?(Ot=pn,Gt=Jo):(Ot=Ue[yt],Gt=Me[yt]);if(Qt=Be.length,Ir!==0)if(Pe._module&&Pe._module.hoverPoints){var Ts=Pe._module.hoverPoints(rr,Ot,Gt,Tt,{finiteRange:!0,hoverLayer:Re._hoverlayer,hoversubplots:Xe,gd:j});if(Ts)for(var Po,so=0;so<Ts.length;so++)Po=Ts[so],d(Po.x0)&&d(Po.y0)&&Be.push(Q(Po,lt))}else A.log("Unrecognized trace type in hover:",Pe);if(lt==="closest"&&Be.length>Qt&&(Be.splice(0,Qt),Ci=Be[0].distance),tt&&bt!==0&&Be.length===0){rr.distance=bt,rr.index=!1;var Vn=Pe._module.hoverPoints(rr,Ot,Gt,"closest",{hoverLayer:Re._hoverlayer});if(Vn&&(Vn=Vn.filter(function(os){return os.spikeDistance<=bt})),Vn&&Vn.length){var To,qo=Vn.filter(function(os){return os.xa.showspikes&&os.xa.spikesnap!=="hovered data"});if(qo.length){var Oo=qo[0];d(Oo.x0)&&d(Oo.y0)&&(To=Kt(Oo),(!Tr.vLinePoint||Tr.vLinePoint.spikeDistance>To.spikeDistance)&&(Tr.vLinePoint=To))}var lo=Vn.filter(function(os){return os.ya.showspikes&&os.ya.spikesnap!=="hovered data"});if(lo.length){var Co=lo[0];d(Co.x0)&&d(Co.y0)&&(To=Kt(Co),(!Tr.hLinePoint||Tr.hLinePoint.spikeDistance>To.spikeDistance)&&(Tr.hLinePoint=To))}}}}}Jt();function Nt(pn,Jo,Xo){for(var Ts=null,Po=1/0,so,Vn=0;Vn<pn.length;Vn++)fe&&fe._id!==pn[Vn].xa._id||Fe&&Fe._id!==pn[Vn].ya._id||(so=pn[Vn].spikeDistance,Xo&&Vn===0&&(so=-1/0),so<=Po&&so<=Jo&&(Ts=pn[Vn],Po=so));return Ts}function Kt(pn){return pn?{xa:pn.xa,ya:pn.ya,x:pn.xSpike!==void 0?pn.xSpike:(pn.x0+pn.x1)/2,y:pn.ySpike!==void 0?pn.ySpike:(pn.y0+pn.y1)/2,distance:pn.distance,spikeDistance:pn.spikeDistance,curveNumber:pn.trace.index,color:pn.color,pointNumber:pn.index}:null}var Wt={fullLayout:Re,container:Re._hoverlayer,event:ee},Pr=j._spikepoints,ta={vLinePoint:Tr.vLinePoint,hLinePoint:Tr.hLinePoint};j._spikepoints=ta;var ma=function(){var pn=Be.filter(function(Xo){return fe&&fe._id===Xo.xa._id&&Fe&&Fe._id===Xo.ya._id}),Jo=Be.filter(function(Xo){return!(fe&&fe._id===Xo.xa._id&&Fe&&Fe._id===Xo.ya._id)});pn.sort(P),Jo.sort(P),Be=pn.concat(Jo),Be=$(Be,lt)};ma();var ra=lt.charAt(0),Ia=(ra==="x"||ra==="y")&&Be[0]&&h[Be[0].trace.type];if(tt&&bt!==0&&Be.length!==0){var Ha=Be.filter(function(pn){return pn.ya.showspikes}),$a=Nt(Ha,bt,Ia);Tr.hLinePoint=Kt($a);var ai=Be.filter(function(pn){return pn.xa.showspikes}),mi=Nt(ai,bt,Ia);Tr.vLinePoint=Kt(mi)}if(Be.length===0){var xt=s.unhoverRaw(j,ee);return tt&&(Tr.hLinePoint!==null||Tr.vLinePoint!==null)&&he(Pr)&&ue(j,Tr,Wt),xt}if(tt&&he(Pr)&&ue(j,Tr,Wt),v.isXYhover(Tt)&&Be[0].length!==0&&Be[0].trace.type!=="splom"){var ct=Be[0];m[ct.trace.type]?Be=Be.filter(function(pn){return pn.trace.index===ct.trace.index}):Be=[ct];var Nr=Be.length,Or=J("x",ct,Re),Rr=J("y",ct,Re);Jt(Or,Rr);var Lr=[],Gr={},Kr=0,Ur=function(pn){var Jo=m[pn.trace.type]?z(pn):pn.trace.index;if(!Gr[Jo])Kr++,Gr[Jo]=Kr,Lr.push(pn);else{var Xo=Gr[Jo]-1,Ts=Lr[Xo];Xo>0&&Math.abs(pn.distance)<Math.abs(Ts.distance)&&(Lr[Xo]=pn)}},aa;for(aa=0;aa<Nr;aa++)Ur(Be[aa]);for(aa=Be.length-1;aa>Nr-1;aa--)Ur(Be[aa]);Be=Lr,ma()}var da=j._hoverdata,fa=[],It=X(j),dr=oe(j);for(qe=0;qe<Be.length;qe++){var kr=Be[qe],ia=v.makeEventData(kr,kr.trace,kr.cd);if(kr.hovertemplate!==!1){var Ca=!1;kr.cd[kr.index]&&kr.cd[kr.index].ht&&(Ca=kr.cd[kr.index].ht),kr.hovertemplate=Ca||kr.trace.hovertemplate||!1}if(kr.xa&&kr.ya){var Fa=kr.x0+kr.xa._offset,Ya=kr.x1+kr.xa._offset,ha=kr.y0+kr.ya._offset,Da=kr.y1+kr.ya._offset,Xi=Math.min(Fa,Ya),Li=Math.max(Fa,Ya),fn=Math.min(ha,Da),An=Math.max(ha,Da);ia.bbox={x0:Xi+dr,x1:Li+dr,y0:fn+It,y1:An+It}}kr.eventData=[ia],fa.push(ia)}j._hoverdata=fa;var kn=lt==="y"&&(Ke.length>1||Be.length>1)||lt==="closest"&&la&&Be.length>1,zn=n.combine(Re.plot_bgcolor||n.background,Re.paper_bgcolor),Xn=B(Be,{gd:j,hovermode:lt,rotateLabels:kn,bgColor:zn,container:Re._hoverlayer,outerContainer:Re._paper.node(),commonLabelOpts:Re.hoverlabel,hoverdistance:Re.hoverdistance}),to=Xn.hoverLabels;if(v.isUnifiedHover(lt)||(I(to,kn,Re,Xn.commonLabelBoundingBox),W(to,kn,Re._invScaleX,Re._invScaleY)),be&&be.tagName){var mo=g.getComponentMethod("annotations","hasClickToShow")(j,fa);a(q.select(be),mo?"pointer":"")}!be||ce||!le(j,ee,da)||(da&&j.emit("plotly_unhover",{event:ee,points:da}),j.emit("plotly_hover",{event:ee,points:j._hoverdata,xaxes:Zt,yaxes:Sr,xvals:Ue,yvals:Me}))}function z(j){return[j.trace.index,j.index,j.x0,j.y0,j.name,j.attr,j.xa?j.xa._id:"",j.ya?j.ya._id:""].join(",")}var F=/<extra>([\s\S]*)<\/extra>/;function B(j,ee){var re=ee.gd,ce=re._fullLayout,be=ee.hovermode,Ae=ee.rotateLabels,ze=ee.bgColor,Re=ee.container,Xe=ee.outerContainer,it=ee.commonLabelOpts||{};if(j.length===0)return[[]];var ot=ee.fontFamily||T.HOVERFONT,tt=ee.fontSize||T.HOVERFONTSIZE,lt=ee.fontWeight||ce.font.weight,Ee=ee.fontStyle||ce.font.style,_e=ee.fontVariant||ce.font.variant,fe=ee.fontTextcase||ce.font.textcase,Fe=ee.fontLineposition||ce.font.lineposition,rt=ee.fontShadow||ce.font.shadow,st=j[0],Qe=st.xa,Lt=st.ya,kt=be.charAt(0),Vt=kt+"Label",Zt=st[Vt];if(Zt===void 0&&Qe.type==="multicategory")for(var Sr=0;Sr<j.length&&(Zt=j[Sr][Vt],Zt===void 0);Sr++);var xr=ie(re,Xe),jr=xr.top,wr=xr.width,Ir=xr.height,bt=Zt!==void 0&&st.distance<=ee.hoverdistance&&(be==="x"||be==="y");if(bt){var Be=!0,Ke,Ue;for(Ke=0;Ke<j.length;Ke++)if(Be&&j[Ke].zLabel===void 0&&(Be=!1),Ue=j[Ke].hoverinfo||j[Ke].trace.hoverinfo,Ue){var Me=Array.isArray(Ue)?Ue:Ue.split("+");if(Me.indexOf("all")===-1&&Me.indexOf(be)===-1){bt=!1;break}}Be&&(bt=!1)}var qe=Re.selectAll("g.axistext").data(bt?[0]:[]);qe.enter().append("g").classed("axistext",!0),qe.exit().remove();var Ce={minX:0,maxX:0,minY:0,maxY:0};if(qe.each(function(){var ct=q.select(this),Nr=A.ensureSingle(ct,"path","",function(An){An.style({"stroke-width":"1px"})}),Or=A.ensureSingle(ct,"text","",function(An){An.attr("data-notex",1)}),Rr=it.bgcolor||n.defaultLine,Lr=it.bordercolor||n.contrast(Rr),Gr=n.contrast(Rr),Kr=it.font,Ur={weight:Kr.weight||lt,style:Kr.style||Ee,variant:Kr.variant||_e,textcase:Kr.textcase||fe,lineposition:Kr.lineposition||Fe,shadow:Kr.shadow||rt,family:Kr.family||ot,size:Kr.size||tt,color:Kr.color||Gr};Nr.style({fill:Rr,stroke:Lr}),Or.text(Zt).call(i.font,Ur).call(o.positionText,0,0).call(o.convertToTspans,re),ct.attr("transform","");var aa=ie(re,Or.node()),da,fa;if(be==="x"){var It=Qe.side==="top"?"-":"";Or.attr("text-anchor","middle").call(o.positionText,0,Qe.side==="top"?jr-aa.bottom-p-u:jr-aa.top+p+u),da=Qe._offset+(st.x0+st.x1)/2,fa=Lt._offset+(Qe.side==="top"?0:Lt._length);var dr=aa.width/2+u,kr=da;da<dr?kr=dr:da>ce.width-dr&&(kr=ce.width-dr),Nr.attr("d","M"+(da-kr)+",0L"+(da-kr+p)+","+It+p+"H"+dr+"v"+It+(u*2+aa.height)+"H"+-dr+"V"+It+p+"H"+(da-kr-p)+"Z"),da=kr,Ce.minX=da-dr,Ce.maxX=da+dr,Qe.side==="top"?(Ce.minY=fa-(u*2+aa.height),Ce.maxY=fa-u):(Ce.minY=fa+u,Ce.maxY=fa+(u*2+aa.height))}else{var ia,Ca,Fa;Lt.side==="right"?(ia="start",Ca=1,Fa="",da=Qe._offset+Qe._length):(ia="end",Ca=-1,Fa="-",da=Qe._offset),fa=Lt._offset+(st.y0+st.y1)/2,Or.attr("text-anchor",ia),Nr.attr("d","M0,0L"+Fa+p+","+p+"V"+(u+aa.height/2)+"h"+Fa+(u*2+aa.width)+"V-"+(u+aa.height/2)+"H"+Fa+p+"V-"+p+"Z"),Ce.minY=fa-(u+aa.height/2),Ce.maxY=fa+(u+aa.height/2),Lt.side==="right"?(Ce.minX=da+p,Ce.maxX=da+p+(u*2+aa.width)):(Ce.minX=da-p-(u*2+aa.width),Ce.maxX=da-p);var Ya=aa.height/2,ha=jr-aa.top-Ya,Da="clip"+ce._uid+"commonlabel"+Lt._id,Xi;if(da<aa.width+2*u+p){Xi="M-"+(p+u)+"-"+Ya+"h-"+(aa.width-u)+"V"+Ya+"h"+(aa.width-u)+"Z";var Li=aa.width-da+u;o.positionText(Or,Li,ha),ia==="end"&&Or.selectAll("tspan").each(function(){var An=q.select(this),kn=i.tester.append("text").text(An.text()).call(i.font,Ur),zn=ie(re,kn.node());Math.round(zn.width)<Math.round(aa.width)&&An.attr("x",Li-zn.width),kn.remove()})}else o.positionText(Or,Ca*(u+p),ha),Xi=null;var fn=ce._topclips.selectAll("#"+Da).data(Xi?[0]:[]);fn.enter().append("clipPath").attr("id",Da).append("path"),fn.exit().remove(),fn.select("path").attr("d",Xi),i.setClipUrl(Or,Xi?Da:null,re)}ct.attr("transform",e(da,fa))}),v.isUnifiedHover(be)){Re.selectAll("g.hovertext").remove();var Te=j.filter(function(ct){return ct.hoverinfo!=="none"});if(Te.length===0)return[];var Pe=ce.hoverlabel,at=Pe.font,yt=Te[0],Tt=((be==="x unified"?yt.xa:yt.ya).unifiedhovertitle||{}).text,Ot=Tt?A.hovertemplateString(Tt,{},ce._d3locale,be==="x unified"?{xa:yt.xa,x:yt.xVal}:{ya:yt.ya,y:yt.yVal}):Zt,Gt={showlegend:!0,legend:{title:{text:Ot,font:at},font:at,bgcolor:Pe.bgcolor,bordercolor:Pe.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ce.legend?ce.legend.traceorder:void 0,orientation:"v"}},rr={font:at};l(Gt,rr,re._fullData);var Qt=rr.legend;Qt.entries=[];for(var Tr=0;Tr<Te.length;Tr++){var la=Te[Tr];if(la.hoverinfo!=="none"){var Ua=O(la,!0,be,ce,Zt),Ba=Ua[0],Ra=Ua[1];la.name=Ra,Ra!==""?la.text=Ra+" : "+Ba:la.text=Ba;var ei=la.cd[la.index];ei&&(ei.mc&&(la.mc=ei.mc),ei.mcc&&(la.mc=ei.mcc),ei.mlc&&(la.mlc=ei.mlc),ei.mlcc&&(la.mlc=ei.mlcc),ei.mlw&&(la.mlw=ei.mlw),ei.mrc&&(la.mrc=ei.mrc),ei.dir&&(la.dir=ei.dir)),la._distinct=!0,Qt.entries.push([la])}}Qt.entries.sort(function(ct,Nr){return ct[0].trace.index-Nr[0].trace.index}),Qt.layer=Re,Qt._inHover=!0,Qt._groupTitleFont=Pe.grouptitlefont,_(re,Qt);var za=Re.select("g.legend"),ti=ie(re,za.node()),Ci=ti.width+2*u,Jt=ti.height+2*u,Nt=Te[0],Kt=(Nt.x0+Nt.x1)/2,Wt=(Nt.y0+Nt.y1)/2,Pr=!(g.traceIs(Nt.trace,"bar-like")||g.traceIs(Nt.trace,"box-violin")),ta,ma;kt==="y"?Pr?(ma=Wt-u,ta=Wt+u):(ma=Math.min.apply(null,Te.map(function(ct){return Math.min(ct.y0,ct.y1)})),ta=Math.max.apply(null,Te.map(function(ct){return Math.max(ct.y0,ct.y1)}))):ma=ta=A.mean(Te.map(function(ct){return(ct.y0+ct.y1)/2}))-Jt/2;var ra,Ia;kt==="x"?Pr?(ra=Kt+u,Ia=Kt-u):(ra=Math.max.apply(null,Te.map(function(ct){return Math.max(ct.x0,ct.x1)})),Ia=Math.min.apply(null,Te.map(function(ct){return Math.min(ct.x0,ct.x1)}))):ra=Ia=A.mean(Te.map(function(ct){return(ct.x0+ct.x1)/2}))-Ci/2;var Ha=Qe._offset,$a=Lt._offset;ta+=$a,ra+=Ha,Ia+=Ha-Ci,ma+=$a-Jt;var ai,mi;return ra+Ci<wr&&ra>=0?ai=ra:Ia+Ci<wr&&Ia>=0?ai=Ia:Ha+Ci<wr?ai=Ha:ra-Kt<Kt-Ia+Ci?ai=wr-Ci:ai=0,ai+=u,ta+Jt<Ir&&ta>=0?mi=ta:ma+Jt<Ir&&ma>=0?mi=ma:$a+Jt<Ir?mi=$a:ta-Wt<Wt-ma+Jt?mi=Ir-Jt:mi=0,mi+=u,za.attr("transform",e(ai-1,mi-1)),za}var xt=Re.selectAll("g.hovertext").data(j,function(ct){return z(ct)});return xt.enter().append("g").classed("hovertext",!0).each(function(){var ct=q.select(this);ct.append("rect").call(n.fill,n.addOpacity(ze,.8)),ct.append("text").classed("name",!0),ct.append("path").style("stroke-width","1px"),ct.append("text").classed("nums",!0).call(i.font,{weight:lt,style:Ee,variant:_e,textcase:fe,lineposition:Fe,shadow:rt,family:ot,size:tt})}),xt.exit().remove(),xt.each(function(ct){var Nr=q.select(this).attr("transform",""),Or=ct.color;Array.isArray(Or)&&(Or=Or[ct.eventData[0].pointNumber]);var Rr=ct.bgcolor||Or,Lr=n.combine(n.opacity(Rr)?Rr:n.defaultLine,ze),Gr=n.combine(n.opacity(Or)?Or:n.defaultLine,ze),Kr=ct.borderColor||n.contrast(Lr),Ur=O(ct,bt,be,ce,Zt,Nr),aa=Ur[0],da=Ur[1],fa=Nr.select("text.nums").call(i.font,{family:ct.fontFamily||ot,size:ct.fontSize||tt,color:ct.fontColor||Kr,weight:ct.fontWeight||lt,style:ct.fontStyle||Ee,variant:ct.fontVariant||_e,textcase:ct.fontTextcase||fe,lineposition:ct.fontLineposition||Fe,shadow:ct.fontShadow||rt}).text(aa).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,re),It=Nr.select("text.name"),dr=0,kr=0;if(da&&da!==aa){It.call(i.font,{family:ct.fontFamily||ot,size:ct.fontSize||tt,color:Gr,weight:ct.fontWeight||lt,style:ct.fontStyle||Ee,variant:ct.fontVariant||_e,textcase:ct.fontTextcase||fe,lineposition:ct.fontLineposition||Fe,shadow:ct.fontShadow||rt}).text(da).attr("data-notex",1).call(o.positionText,0,0).call(o.convertToTspans,re);var ia=ie(re,It.node());dr=ia.width+2*u,kr=ia.height+2*u}else It.remove(),Nr.select("rect").remove();Nr.select("path").style({fill:Lr,stroke:Kr});var Ca=ct.xa._offset+(ct.x0+ct.x1)/2,Fa=ct.ya._offset+(ct.y0+ct.y1)/2,Ya=Math.abs(ct.x1-ct.x0),ha=Math.abs(ct.y1-ct.y0),Da=ie(re,fa.node()),Xi=Da.width/ce._invScaleX,Li=Da.height/ce._invScaleY;ct.ty0=(jr-Da.top)/ce._invScaleY,ct.bx=Xi+2*u,ct.by=Math.max(Li+2*u,kr),ct.anchor="start",ct.txwidth=Xi,ct.tx2width=dr,ct.offset=0;var fn=(Xi+p+u+dr)*ce._invScaleX,An,kn;if(Ae)ct.pos=Ca,An=Fa+ha/2+fn<=Ir,kn=Fa-ha/2-fn>=0,(ct.idealAlign==="top"||!An)&&kn?(Fa-=ha/2,ct.anchor="end"):An?(Fa+=ha/2,ct.anchor="start"):ct.anchor="middle",ct.crossPos=Fa;else{if(ct.pos=Fa,An=Ca+Ya/2+fn<=wr,kn=Ca-Ya/2-fn>=0,(ct.idealAlign==="left"||!An)&&kn)Ca-=Ya/2,ct.anchor="end";else if(An)Ca+=Ya/2,ct.anchor="start";else{ct.anchor="middle";var zn=fn/2,Xn=Ca+zn-wr,to=Ca-zn;Xn>0&&(Ca-=Xn),to<0&&(Ca+=-to)}ct.crossPos=Ca}fa.attr("text-anchor",ct.anchor),dr&&It.attr("text-anchor",ct.anchor),Nr.attr("transform",e(Ca,Fa)+(Ae?t(w):""))}),{hoverLabels:xt,commonLabelBoundingBox:Ce}}function O(j,ee,re,ce,be,Ae){var ze="",Re="";j.nameOverride!==void 0&&(j.name=j.nameOverride),j.name&&(j.trace._meta&&(j.name=A.templateString(j.name,j.trace._meta)),ze=G(j.name,j.nameLength));var Xe=re.charAt(0),it=Xe==="x"?"y":"x";j.zLabel!==void 0?(j.xLabel!==void 0&&(Re+="x: "+j.xLabel+"<br>"),j.yLabel!==void 0&&(Re+="y: "+j.yLabel+"<br>"),j.trace.type!=="choropleth"&&j.trace.type!=="choroplethmapbox"&&j.trace.type!=="choroplethmap"&&(Re+=(Re?"z: ":"")+j.zLabel)):ee&&j[Xe+"Label"]===be?Re=j[it+"Label"]||"":j.xLabel===void 0?j.yLabel!==void 0&&j.trace.type!=="scattercarpet"&&(Re=j.yLabel):j.yLabel===void 0?Re=j.xLabel:Re="("+j.xLabel+", "+j.yLabel+")",(j.text||j.text===0)&&!Array.isArray(j.text)&&(Re+=(Re?"<br>":"")+j.text),j.extraText!==void 0&&(Re+=(Re?"<br>":"")+j.extraText),Ae&&Re===""&&!j.hovertemplate&&(ze===""&&Ae.remove(),Re=ze);var ot=j.hovertemplate||!1;if(ot){var tt=j.hovertemplateLabels||j;j[Xe+"Label"]!==be&&(tt[Xe+"other"]=tt[Xe+"Val"],tt[Xe+"otherLabel"]=tt[Xe+"Label"]),Re=A.hovertemplateString(ot,tt,ce._d3locale,j.eventData[0]||{},j.trace._meta),Re=Re.replace(F,function(lt,Ee){return ze=G(Ee,j.nameLength),""})}return[Re,ze]}function I(j,ee,re,ce){var be=ee?"xa":"ya",Ae=ee?"ya":"xa",ze=0,Re=1,Xe=j.size(),it=new Array(Xe),ot=0,tt=ce.minX,lt=ce.maxX,Ee=ce.minY,_e=ce.maxY,fe=function(Ue){return Ue*re._invScaleX},Fe=function(Ue){return Ue*re._invScaleY};j.each(function(Ue){var Me=Ue[be],qe=Ue[Ae],Ce=Me._id.charAt(0)==="x",Te=Me.range;ot===0&&Te&&Te[0]>Te[1]!==Ce&&(Re=-1);var Pe=0,at=Ce?re.width:re.height;if(re.hovermode==="x"||re.hovermode==="y"){var yt=N(Ue,ee),Tt=Ue.anchor,Ot=Tt==="end"?-1:1,Gt,rr;if(Tt==="middle")Gt=Ue.crossPos+(Ce?Fe(yt.y-Ue.by/2):fe(Ue.bx/2+Ue.tx2width/2)),rr=Gt+(Ce?Fe(Ue.by):fe(Ue.bx));else if(Ce)Gt=Ue.crossPos+Fe(p+yt.y)-Fe(Ue.by/2-p),rr=Gt+Fe(Ue.by);else{var Qt=fe(Ot*p+yt.x),Tr=Qt+fe(Ot*Ue.bx);Gt=Ue.crossPos+Math.min(Qt,Tr),rr=Ue.crossPos+Math.max(Qt,Tr)}Ce?Ee!==void 0&&_e!==void 0&&Math.min(rr,_e)-Math.max(Gt,Ee)>1&&(qe.side==="left"?(Pe=qe._mainLinePosition,at=re.width):at=qe._mainLinePosition):tt!==void 0&&lt!==void 0&&Math.min(rr,lt)-Math.max(Gt,tt)>1&&(qe.side==="top"?(Pe=qe._mainLinePosition,at=re.height):at=qe._mainLinePosition)}it[ot++]=[{datum:Ue,traceIndex:Ue.trace.index,dp:0,pos:Ue.pos,posref:Ue.posref,size:Ue.by*(Ce?E:1)/2,pmin:Pe,pmax:at}]}),it.sort(function(Ue,Me){return Ue[0].posref-Me[0].posref||Re*(Me[0].traceIndex-Ue[0].traceIndex)});var rt,st,Qe,Lt,kt,Vt,Zt;function Sr(Ue){var Me=Ue[0],qe=Ue[Ue.length-1];if(st=Me.pmin-Me.pos-Me.dp+Me.size,Qe=qe.pos+qe.dp+qe.size-Me.pmax,st>.01){for(kt=Ue.length-1;kt>=0;kt--)Ue[kt].dp+=st;rt=!1}if(!(Qe<.01)){if(st<-.01){for(kt=Ue.length-1;kt>=0;kt--)Ue[kt].dp-=Qe;rt=!1}if(rt){var Ce=0;for(Lt=0;Lt<Ue.length;Lt++)Vt=Ue[Lt],Vt.pos+Vt.dp+Vt.size>Me.pmax&&Ce++;for(Lt=Ue.length-1;Lt>=0&&!(Ce<=0);Lt--)Vt=Ue[Lt],Vt.pos>Me.pmax-1&&(Vt.del=!0,Ce--);for(Lt=0;Lt<Ue.length&&!(Ce<=0);Lt++)if(Vt=Ue[Lt],Vt.pos<Me.pmin+1)for(Vt.del=!0,Ce--,Qe=Vt.size*2,kt=Ue.length-1;kt>=0;kt--)Ue[kt].dp-=Qe;for(Lt=Ue.length-1;Lt>=0&&!(Ce<=0);Lt--)Vt=Ue[Lt],Vt.pos+Vt.dp+Vt.size>Me.pmax&&(Vt.del=!0,Ce--)}}}for(;!rt&&ze<=Xe;){for(ze++,rt=!0,Lt=0;Lt<it.length-1;){var xr=it[Lt],jr=it[Lt+1],wr=xr[xr.length-1],Ir=jr[0];if(st=wr.pos+wr.dp+wr.size-Ir.pos-Ir.dp+Ir.size,st>.01){for(kt=jr.length-1;kt>=0;kt--)jr[kt].dp+=st;for(xr.push.apply(xr,jr),it.splice(Lt+1,1),Zt=0,kt=xr.length-1;kt>=0;kt--)Zt+=xr[kt].dp;for(Qe=Zt/xr.length,kt=xr.length-1;kt>=0;kt--)xr[kt].dp-=Qe;rt=!1}else Lt++}it.forEach(Sr)}for(Lt=it.length-1;Lt>=0;Lt--){var bt=it[Lt];for(kt=bt.length-1;kt>=0;kt--){var Be=bt[kt],Ke=Be.datum;Ke.offset=Be.dp,Ke.del=Be.del}}}function N(j,ee){var re=0,ce=j.offset;return ee&&(ce*=-b,re=j.offset*y),{x:re,y:ce}}function U(j){var ee={start:1,end:-1,middle:0}[j.anchor],re=ee*(p+u),ce=re+ee*(j.txwidth+u),be=j.anchor==="middle";return be&&(re-=j.tx2width/2,ce+=j.txwidth/2+u),{alignShift:ee,textShiftX:re,text2ShiftX:ce}}function W(j,ee,re,ce){var be=function(ze){return ze*re},Ae=function(ze){return ze*ce};j.each(function(ze){var Re=q.select(this);if(ze.del)return Re.remove();var Xe=Re.select("text.nums"),it=ze.anchor,ot=it==="end"?-1:1,tt=U(ze),lt=N(ze,ee),Ee=lt.x,_e=lt.y,fe=it==="middle",Fe="hoverlabel"in ze.trace?ze.trace.hoverlabel.showarrow:!0,rt;fe?rt="M-"+be(ze.bx/2+ze.tx2width/2)+","+Ae(_e-ze.by/2)+"h"+be(ze.bx)+"v"+Ae(ze.by)+"h-"+be(ze.bx)+"Z":Fe?rt="M0,0L"+be(ot*p+Ee)+","+Ae(p+_e)+"v"+Ae(ze.by/2-p)+"h"+be(ot*ze.bx)+"v-"+Ae(ze.by)+"H"+be(ot*p+Ee)+"V"+Ae(_e-p)+"Z":rt="M"+be(ot*p+Ee)+","+Ae(_e-ze.by/2)+"h"+be(ot*ze.bx)+"v"+Ae(ze.by)+"h"+be(-ot*ze.bx)+"Z",Re.select("path").attr("d",rt);var st=Ee+tt.textShiftX,Qe=_e+ze.ty0-ze.by/2+u,Lt=ze.textAlign||"auto";Lt!=="auto"&&(Lt==="left"&&it!=="start"?(Xe.attr("text-anchor","start"),st=fe?-ze.bx/2-ze.tx2width/2+u:-ze.bx-u):Lt==="right"&&it!=="end"&&(Xe.attr("text-anchor","end"),st=fe?ze.bx/2-ze.tx2width/2-u:ze.bx+u)),Xe.call(o.positionText,be(st),Ae(Qe)),ze.tx2width&&(Re.select("text.name").call(o.positionText,be(tt.text2ShiftX+tt.alignShift*u+Ee),Ae(_e+ze.ty0-ze.by/2+u)),Re.select("rect").call(i.setRect,be(tt.text2ShiftX+(tt.alignShift-1)*ze.tx2width/2+Ee),Ae(_e-ze.by/2-1),be(ze.tx2width),Ae(ze.by+2)))})}function Q(j,ee){var re=j.index,ce=j.trace||{},be=j.cd[0],Ae=j.cd[re]||{};function ze(lt){return lt||d(lt)&&lt===0}var Re=Array.isArray(re)?function(lt,Ee){var _e=A.castOption(be,re,lt);return ze(_e)?_e:A.extractOption({},ce,"",Ee)}:function(lt,Ee){return A.extractOption(Ae,ce,lt,Ee)};function Xe(lt,Ee,_e){var fe=Re(Ee,_e);ze(fe)&&(j[lt]=fe)}if(Xe("hoverinfo","hi","hoverinfo"),Xe("bgcolor","hbg","hoverlabel.bgcolor"),Xe("borderColor","hbc","hoverlabel.bordercolor"),Xe("fontFamily","htf","hoverlabel.font.family"),Xe("fontSize","hts","hoverlabel.font.size"),Xe("fontColor","htc","hoverlabel.font.color"),Xe("fontWeight","htw","hoverlabel.font.weight"),Xe("fontStyle","hty","hoverlabel.font.style"),Xe("fontVariant","htv","hoverlabel.font.variant"),Xe("nameLength","hnl","hoverlabel.namelength"),Xe("textAlign","hta","hoverlabel.align"),j.posref=ee==="y"||ee==="closest"&&ce.orientation==="h"?j.xa._offset+(j.x0+j.x1)/2:j.ya._offset+(j.y0+j.y1)/2,j.x0=A.constrain(j.x0,0,j.xa._length),j.x1=A.constrain(j.x1,0,j.xa._length),j.y0=A.constrain(j.y0,0,j.ya._length),j.y1=A.constrain(j.y1,0,j.ya._length),j.xLabelVal!==void 0&&(j.xLabel="xLabel"in j?j.xLabel:c.hoverLabelText(j.xa,j.xLabelVal,ce.xhoverformat),j.xVal=j.xa.c2d(j.xLabelVal)),j.yLabelVal!==void 0&&(j.yLabel="yLabel"in j?j.yLabel:c.hoverLabelText(j.ya,j.yLabelVal,ce.yhoverformat),j.yVal=j.ya.c2d(j.yLabelVal)),j.zLabelVal!==void 0&&j.zLabel===void 0&&(j.zLabel=String(j.zLabelVal)),!isNaN(j.xerr)&&!(j.xa.type==="log"&&j.xerr<=0)){var it=c.tickText(j.xa,j.xa.c2l(j.xerr),"hover").text;j.xerrneg!==void 0?j.xLabel+=" +"+it+" / -"+c.tickText(j.xa,j.xa.c2l(j.xerrneg),"hover").text:j.xLabel+=" \xB1 "+it,ee==="x"&&(j.distance+=1)}if(!isNaN(j.yerr)&&!(j.ya.type==="log"&&j.yerr<=0)){var ot=c.tickText(j.ya,j.ya.c2l(j.yerr),"hover").text;j.yerrneg!==void 0?j.yLabel+=" +"+ot+" / -"+c.tickText(j.ya,j.ya.c2l(j.yerrneg),"hover").text:j.yLabel+=" \xB1 "+ot,ee==="y"&&(j.distance+=1)}var tt=j.hoverinfo||j.trace.hoverinfo;return tt&&tt!=="all"&&(tt=Array.isArray(tt)?tt:tt.split("+"),tt.indexOf("x")===-1&&(j.xLabel=void 0),tt.indexOf("y")===-1&&(j.yLabel=void 0),tt.indexOf("z")===-1&&(j.zLabel=void 0),tt.indexOf("text")===-1&&(j.text=void 0),tt.indexOf("name")===-1&&(j.name=void 0)),j}function ue(j,ee,re){var ce=re.container,be=re.fullLayout,Ae=be._size,ze=re.event,Re=!!ee.hLinePoint,Xe=!!ee.vLinePoint,it,ot;if(ce.selectAll(".spikeline").remove(),!!(Xe||Re)){var tt=n.combine(be.plot_bgcolor,be.paper_bgcolor);if(Re){var lt=ee.hLinePoint,Ee,_e;it=lt&&lt.xa,ot=lt&&lt.ya;var fe=ot.spikesnap;fe==="cursor"?(Ee=ze.pointerX,_e=ze.pointerY):(Ee=it._offset+lt.x,_e=ot._offset+lt.y);var Fe=x.readability(lt.color,tt)<1.5?n.contrast(tt):lt.color,rt=ot.spikemode,st=ot.spikethickness,Qe=ot.spikecolor||Fe,Lt=c.getPxPosition(j,ot),kt,Vt;if(rt.indexOf("toaxis")!==-1||rt.indexOf("across")!==-1){if(rt.indexOf("toaxis")!==-1&&(kt=Lt,Vt=Ee),rt.indexOf("across")!==-1){var Zt=ot._counterDomainMin,Sr=ot._counterDomainMax;ot.anchor==="free"&&(Zt=Math.min(Zt,ot.position),Sr=Math.max(Sr,ot.position)),kt=Ae.l+Zt*Ae.w,Vt=Ae.l+Sr*Ae.w}ce.insert("line",":first-child").attr({x1:kt,x2:Vt,y1:_e,y2:_e,"stroke-width":st,stroke:Qe,"stroke-dasharray":i.dashStyle(ot.spikedash,st)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:kt,x2:Vt,y1:_e,y2:_e,"stroke-width":st+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}rt.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:Lt+(ot.side!=="right"?st:-st),cy:_e,r:st,fill:Qe}).classed("spikeline",!0)}if(Xe){var xr=ee.vLinePoint,jr,wr;it=xr&&xr.xa,ot=xr&&xr.ya;var Ir=it.spikesnap;Ir==="cursor"?(jr=ze.pointerX,wr=ze.pointerY):(jr=it._offset+xr.x,wr=ot._offset+xr.y);var bt=x.readability(xr.color,tt)<1.5?n.contrast(tt):xr.color,Be=it.spikemode,Ke=it.spikethickness,Ue=it.spikecolor||bt,Me=c.getPxPosition(j,it),qe,Ce;if(Be.indexOf("toaxis")!==-1||Be.indexOf("across")!==-1){if(Be.indexOf("toaxis")!==-1&&(qe=Me,Ce=wr),Be.indexOf("across")!==-1){var Te=it._counterDomainMin,Pe=it._counterDomainMax;it.anchor==="free"&&(Te=Math.min(Te,it.position),Pe=Math.max(Pe,it.position)),qe=Ae.t+(1-Pe)*Ae.h,Ce=Ae.t+(1-Te)*Ae.h}ce.insert("line",":first-child").attr({x1:jr,x2:jr,y1:qe,y2:Ce,"stroke-width":Ke,stroke:Ue,"stroke-dasharray":i.dashStyle(it.spikedash,Ke)}).classed("spikeline",!0).classed("crisp",!0),ce.insert("line",":first-child").attr({x1:jr,x2:jr,y1:qe,y2:Ce,"stroke-width":Ke+2,stroke:tt}).classed("spikeline",!0).classed("crisp",!0)}Be.indexOf("marker")!==-1&&ce.insert("circle",":first-child").attr({cx:jr,cy:Me-(it.side!=="top"?Ke:-Ke),r:Ke,fill:Ue}).classed("spikeline",!0)}}}function le(j,ee,re){if(!re||re.length!==j._hoverdata.length)return!0;for(var ce=re.length-1;ce>=0;ce--){var be=re[ce],Ae=j._hoverdata[ce];if(be.curveNumber!==Ae.curveNumber||String(be.pointNumber)!==String(Ae.pointNumber)||String(be.pointNumbers)!==String(Ae.pointNumbers)||be.binNumber!==Ae.binNumber)return!0}return!1}function he(j,ee){return!ee||ee.vLinePoint!==j._spikepoints.vLinePoint||ee.hLinePoint!==j._spikepoints.hLinePoint}function G(j,ee){return o.plainText(j||"",{len:ee,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function $(j,ee){for(var re=ee.charAt(0),ce=[],be=[],Ae=[],ze=0;ze<j.length;ze++){var Re=j[ze];g.traceIs(Re.trace,"bar-like")||g.traceIs(Re.trace,"box-violin")?Ae.push(Re):Re.trace[re+"period"]?be.push(Re):ce.push(Re)}return ce.concat(be).concat(Ae)}function J(j,ee,re){var ce=ee[j+"a"],be=ee[j+"Val"],Ae=ee.cd[0];if(ce.type==="category"||ce.type==="multicategory")be=ce._categoriesMap[be];else if(ce.type==="date"){var ze=ee.trace[j+"periodalignment"];if(ze){var Re=ee.cd[ee.index],Xe=Re[j+"Start"];Xe===void 0&&(Xe=Re[j]);var it=Re[j+"End"];it===void 0&&(it=Re[j]);var ot=it-Xe;ze==="end"?be+=ot:ze==="middle"&&(be+=ot/2)}be=ce.d2c(be)}return Ae&&Ae.t&&Ae.t.posLetter===ce._id&&(re.boxmode==="group"||re.violinmode==="group")&&(be+=Ae.t.dPos),be}function X(j){return j.offsetTop+j.clientTop}function oe(j){return j.offsetLeft+j.clientLeft}function ie(j,ee){var re=j._fullLayout,ce=ee.getBoundingClientRect(),be=ce.left,Ae=ce.top,ze=be+ce.width,Re=Ae+ce.height,Xe=A.apply3DTransform(re._invTransform)(be,Ae),it=A.apply3DTransform(re._invTransform)(ze,Re),ot=Xe[0],tt=Xe[1],lt=it[0],Ee=it[1];return{x:ot,y:tt,width:lt-ot,height:Ee-tt,top:Math.min(tt,Ee),left:Math.min(ot,lt),right:Math.max(ot,lt),bottom:Math.max(tt,Ee)}}}}),E_=Ze({"src/components/fx/hoverlabel_defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Qp().isUnifiedHover;q.exports=function(e,t,r,o){o=o||{};var a=t.legend;function i(n){o.font[n]||(o.font[n]=a?t.legend.font[n]:t.font[n])}t&&A(t.hovermode)&&(o.font||(o.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),a?(o.bgcolor||(o.bgcolor=x.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),r("hoverlabel.showarrow",o.showarrow),d.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}}}),vz=Ze({"src/components/fx/layout_global_defaults.js"(Z,q){"use strict";var d=ca(),x=E_(),A=Xm();q.exports=function(e,t){function r(o,a){return d.coerce(e,t,A,o,a)}x(e,t,r)}}}),mz=Ze({"src/components/fx/defaults.js"(Z,q){"use strict";var d=ca(),x=Ky(),A=E_();q.exports=function(e,t,r,o){function a(n,s){return d.coerce(e,t,x,n,s)}var i=d.extendFlat({},o.hoverlabel);t.hovertemplate&&(i.namelength=-1),A(e,t,a,i)}}}),_5=Ze({"src/components/fx/hovermode_defaults.js"(Z,q){"use strict";var d=ca(),x=Xm();q.exports=function(M,e){function t(r,o){return e[r]!==void 0?e[r]:d.coerce(M,e,x,r,o)}return t("clickmode"),t("hoversubplots"),t("hovermode")}}}),gz=Ze({"src/components/fx/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=Xm(),A=_5(),M=E_();q.exports=function(t,r){function o(g,v){return d.coerce(t,r,x,g,v)}var a=A(t,r);a&&(o("hoverdistance"),o("spikedistance"));var i=o("dragmode");i==="select"&&o("selectdirection");var n=r._has("mapbox"),s=r._has("map"),c=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((n||s||c)&&f===1||(n||s)&&c&&f===2)&&(r.dragmode="pan"),M(t,r,o),d.coerceFont(o,"hoverlabel.grouptitlefont",r.hoverlabel.font)}}}),yz=Ze({"src/components/fx/calc.js"(Z,q){"use strict";var d=ca(),x=oo();q.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(c){return function(f){return d.coerceHoverinfo({hoverinfo:f},{_module:c._module},r)}}for(var a=0;a<t.length;a++){var i=t[a],n=i[0].trace;if(!x.traceIs(n,"pie-like")){var s=x.traceIs(n,"2dMap")?A:d.fillArray;s(n.hoverinfo,i,"hi",o(n)),n.hovertemplate&&s(n.hovertemplate,i,"ht"),n.hoverlabel&&(s(n.hoverlabel.bgcolor,i,"hbg"),s(n.hoverlabel.bordercolor,i,"hbc"),s(n.hoverlabel.font.size,i,"hts"),s(n.hoverlabel.font.color,i,"htc"),s(n.hoverlabel.font.family,i,"htf"),s(n.hoverlabel.font.weight,i,"htw"),s(n.hoverlabel.font.style,i,"hty"),s(n.hoverlabel.font.variant,i,"htv"),s(n.hoverlabel.namelength,i,"hnl"),s(n.hoverlabel.align,i,"hta"),s(n.hoverlabel.showarrow,i,"htsa"))}}};function A(M,e,t,r){r=r||d.identity,Array.isArray(M)&&(e[0][t]=r(M))}}}),_z=Ze({"src/components/fx/click.js"(Z,q){"use strict";var d=oo(),x=y5().hover;q.exports=function(M,e,t){var r=d.getComponentMethod("annotations","onClick")(M,M._hoverdata);t!==void 0&&x(M,e,t,!0);function o(){M.emit("plotly_click",{points:M._hoverdata,event:e})}M._hoverdata&&e&&e.target&&(r&&r.then?r.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}}}),ef=Ze({"src/components/fx/index.js"(Z,q){"use strict";var d=On(),x=ca(),A=Tp(),M=Qp(),e=Xm(),t=y5();q.exports={moduleType:"component",name:"fx",constants:w_(),schema:{layout:e},attributes:Ky(),layoutAttributes:e,supplyLayoutGlobalDefaults:vz(),supplyDefaults:mz(),supplyLayoutDefaults:gz(),calc:yz(),getDistanceFunction:M.getDistanceFunction,getClosest:M.getClosest,inbox:M.inbox,quadrature:M.quadrature,appendArrayPointValue:M.appendArrayPointValue,castHoverOption:o,castHoverinfo:a,hover:t.hover,unhover:A.unhover,loneHover:t.loneHover,loneUnhover:r,click:_z()};function r(i){var n=x.isD3Selection(i)?i:d.select(i);n.selectAll("g.hovertext").remove(),n.selectAll(".spikeline").remove()}function o(i,n,s){return x.castOption(i,n,"hoverlabel."+s)}function a(i,n,s){function c(f){return x.coerceHoverinfo({hoverinfo:f},{_module:i._module},n)}return x.castOption(i,s,"hoverinfo",c)}}}),Jd=Ze({"src/components/dragelement/helpers.js"(Z){"use strict";Z.selectMode=function(q){return q==="lasso"||q==="select"},Z.drawMode=function(q){return q==="drawclosedpath"||q==="drawopenpath"||q==="drawline"||q==="drawrect"||q==="drawcircle"},Z.openMode=function(q){return q==="drawline"||q==="drawopenpath"},Z.rectMode=function(q){return q==="select"||q==="drawline"||q==="drawrect"||q==="drawcircle"},Z.freeMode=function(q){return q==="lasso"||q==="drawclosedpath"||q==="drawopenpath"},Z.selectingOrDrawing=function(q){return Z.freeMode(q)||Z.rectMode(q)}}}),C_=Ze({"src/lib/clear_gl_canvases.js"(Z,q){"use strict";q.exports=function(x){var A=x._fullLayout;A._glcanvas&&A._glcanvas.size()&&A._glcanvas.each(function(M){M.regl&&M.regl.clear({color:!0,depth:!0})})}}}),w2=Ze({"src/fonts/ploticon.js"(Z,q){"use strict";q.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("")}}}}),T2=Ze({"src/components/shapes/draw_newshape/constants.js"(Z,q){"use strict";var d=32;q.exports={CIRCLE_SIDES:d,i000:0,i090:d/4,i180:d/2,i270:d/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),A2=Ze({"src/components/selections/helpers.js"(Z,q){"use strict";var d=ca().strTranslate;function x(t,r){switch(t.type){case"log":return t.p2d(r);case"date":return t.p2r(r,0,t.calendar);default:return t.p2r(r)}}function A(t,r){switch(t.type){case"log":return t.d2p(r);case"date":return t.r2p(r,0,t.calendar);default:return t.r2p(r)}}function M(t){var r=t._id.charAt(0)==="y"?1:0;return function(o){return x(t,o[r])}}function e(t){return d(t.xaxis._offset,t.yaxis._offset)}q.exports={p2r:x,r2p:A,axValue:M,getTransform:e}}}),t0=Ze({"src/components/shapes/draw_newshape/helpers.js"(Z){"use strict";var q=M_(),d=T2(),x=d.CIRCLE_SIDES,A=d.SQRT2,M=A2(),e=M.p2r,t=M.r2p,r=[0,3,4,5,6,1,2],o=[0,3,4,1,2];Z.writePaths=function(n){var s=n.length;if(!s)return"M0,0Z";for(var c="",f=0;f<s;f++)for(var g=n[f].length,v=0;v<g;v++){var T=n[f][v][0];if(T==="Z")c+="Z";else for(var l=n[f][v].length,_=0;_<l;_++){var w=_;T==="Q"||T==="S"?w=o[_]:T==="C"&&(w=r[_]),c+=n[f][v][w],_>0&&_<l-1&&(c+=",")}}return c},Z.readPaths=function(n,s,c,f){var g=q(n),v=[],T=-1,l=function(){T++,v[T]=[]},_,w=0,S=0,E,y,b=function(){E=w,y=S};b();for(var p=0;p<g.length;p++){var u=[],m,h,P,L,z=g[p][0],F=z;switch(z){case"M":l(),w=+g[p][1],S=+g[p][2],u.push([F,w,S]),b();break;case"Q":case"S":m=+g[p][1],P=+g[p][2],w=+g[p][3],S=+g[p][4],u.push([F,w,S,m,P]);break;case"C":m=+g[p][1],P=+g[p][2],h=+g[p][3],L=+g[p][4],w=+g[p][5],S=+g[p][6],u.push([F,w,S,m,P,h,L]);break;case"T":case"L":w=+g[p][1],S=+g[p][2],u.push([F,w,S]);break;case"H":F="L",w=+g[p][1],u.push([F,w,S]);break;case"V":F="L",S=+g[p][1],u.push([F,w,S]);break;case"A":F="L";var B=+g[p][1],O=+g[p][2];+g[p][4]||(B=-B,O=-O);var I=w-B,N=S;for(_=1;_<=x/2;_++){var U=2*Math.PI*_/x;u.push([F,I+B*Math.cos(U),N+O*Math.sin(U)])}break;case"Z":(w!==E||S!==y)&&(w=E,S=y,u.push([F,w,S]));break}for(var W=(c||{}).domain,Q=s._fullLayout._size,ue=c&&c.xsizemode==="pixel",le=c&&c.ysizemode==="pixel",he=f===!1,G=0;G<u.length;G++){for(_=0;_+2<7;_+=2){var $=u[G][_+1],J=u[G][_+2];$===void 0||J===void 0||(w=$,S=J,c&&(c.xaxis&&c.xaxis.p2r?(he&&($-=c.xaxis._offset),ue?$=t(c.xaxis,c.xanchor)+$:$=e(c.xaxis,$)):(he&&($-=Q.l),W?$=W.x[0]+$/Q.w:$=$/Q.w),c.yaxis&&c.yaxis.p2r?(he&&(J-=c.yaxis._offset),le?J=t(c.yaxis,c.yanchor)-J:J=e(c.yaxis,J)):(he&&(J-=Q.t),W?J=W.y[1]-J/Q.h:J=1-J/Q.h)),u[G][_+1]=$,u[G][_+2]=J)}v[T].push(u[G].slice())}}return v};function a(n,s){return Math.abs(n-s)<=1e-6}function i(n,s){var c=s[1]-n[1],f=s[2]-n[2];return Math.sqrt(c*c+f*f)}Z.pointsOnRectangle=function(n){var s=n.length;if(s!==5)return!1;for(var c=1;c<3;c++){var f=n[0][c]-n[1][c],g=n[3][c]-n[2][c];if(!a(f,g))return!1;var v=n[0][c]-n[3][c],T=n[1][c]-n[2][c];if(!a(v,T))return!1}return!a(n[0][1],n[1][1])&&!a(n[0][1],n[3][1])?!1:!!(i(n[0],n[1])*i(n[0],n[3]))},Z.pointsOnEllipse=function(n){var s=n.length;if(s!==x+1)return!1;s=x;for(var c=0;c<s;c++){var f=(s*2-c)%s,g=(s/2+f)%s,v=(s/2+c)%s;if(!a(i(n[c],n[v]),i(n[f],n[g])))return!1}return!0},Z.handleEllipse=function(n,s,c){if(!n)return[s,c];var f=Z.ellipseOver({x0:s[0],y0:s[1],x1:c[0],y1:c[1]}),g=(f.x1+f.x0)/2,v=(f.y1+f.y0)/2,T=(f.x1-f.x0)/2,l=(f.y1-f.y0)/2;T||(T=l=l/A),l||(l=T=T/A);for(var _=[],w=0;w<x;w++){var S=w*2*Math.PI/x;_.push([g+T*Math.cos(S),v+l*Math.sin(S)])}return _},Z.ellipseOver=function(n){var s=n.x0,c=n.y0,f=n.x1,g=n.y1,v=f-s,T=g-c;s-=v,c-=T;var l=(s+f)/2,_=(c+g)/2,w=A;return v*=w,T*=w,{x0:l-v,y0:_-T,x1:l+v,y1:_+T}},Z.fixDatesForPaths=function(n,s,c){var f=s.type==="date",g=c.type==="date";if(!f&&!g)return n;for(var v=0;v<n.length;v++)for(var T=0;T<n[v].length;T++)for(var l=0;l+2<n[v][T].length;l+=2)f&&(n[v][T][l+1]=n[v][T][l+1].replace(" ","_")),g&&(n[v][T][l+2]=n[v][T][l+2].replace(" ","_"));return n}}}),S2=Ze({"src/components/shapes/draw_newshape/newshapes.js"(Z,q){"use strict";var d=$c(),x=Jd(),A=x.drawMode,M=x.openMode,e=T2(),t=e.i000,r=e.i090,o=e.i180,a=e.i270,i=e.cos45,n=e.sin45,s=A2(),c=s.p2r,f=s.r2p,g=Jm(),v=g.clearOutline,T=t0(),l=T.readPaths,_=T.writePaths,w=T.ellipseOver,S=T.fixDatesForPaths;function E(b,p){if(b.length){var u=b[0][0];if(u){var m=p.gd,h=p.isActiveShape,P=p.dragmode,L=(m.layout||{}).shapes||[];if(!A(P)&&h!==void 0){var z=m._fullLayout._activeShapeIndex;if(z<L.length)switch(m._fullLayout.shapes[z].type){case"rect":P="drawrect";break;case"circle":P="drawcircle";break;case"line":P="drawline";break;case"path":var F=L[z].path||"";F[F.length-1]==="Z"?P="drawclosedpath":P="drawopenpath";break}}var B=y(b,p,P);v(m);for(var O=p.editHelpers,I=(O||{}).modifyItem,N=[],U=0;U<L.length;U++){var W=m._fullLayout.shapes[U];if(N[U]=W._input,h!==void 0&&U===m._fullLayout._activeShapeIndex){var Q=B;switch(W.type){case"line":case"rect":case"circle":var ue=d.getFromId(m,W.xref);W.xref.charAt(0)==="x"&&ue.type.includes("category")?(I("x0",Q.x0-(W.x0shift||0)),I("x1",Q.x1-(W.x1shift||0))):(I("x0",Q.x0),I("x1",Q.x1));var le=d.getFromId(m,W.yref);W.yref.charAt(0)==="y"&&le.type.includes("category")?(I("y0",Q.y0-(W.y0shift||0)),I("y1",Q.y1-(W.y1shift||0))):(I("y0",Q.y0),I("y1",Q.y1));break;case"path":I("path",Q.path);break}}}return h===void 0?(N.push(B),N):O?O.getUpdateObj():{}}}}function y(b,p,u){var m=b[0][0],h=p.gd,P=m.getAttribute("d"),L=h._fullLayout.newshape,z=p.plotinfo,F=p.isActiveShape,B=z.xaxis,O=z.yaxis,I=!!z.domain||!z.xaxis,N=!!z.domain||!z.yaxis,U=M(u),W=l(P,h,z,F),Q={editable:!0,visible:L.visible,name:L.name,showlegend:L.showlegend,legend:L.legend,legendwidth:L.legendwidth,legendgroup:L.legendgroup,legendgrouptitle:{text:L.legendgrouptitle.text,font:L.legendgrouptitle.font},legendrank:L.legendrank,label:L.label,xref:I?"paper":B._id,yref:N?"paper":O._id,layer:L.layer,opacity:L.opacity,line:{color:L.line.color,width:L.line.width,dash:L.line.dash}};U||(Q.fillcolor=L.fillcolor,Q.fillrule=L.fillrule);var ue;if(W.length===1&&(ue=W[0]),ue&&ue.length===5&&u==="drawrect")Q.type="rect",Q.x0=ue[0][1],Q.y0=ue[0][2],Q.x1=ue[2][1],Q.y1=ue[2][2];else if(ue&&u==="drawline")Q.type="line",Q.x0=ue[0][1],Q.y0=ue[0][2],Q.x1=ue[1][1],Q.y1=ue[1][2];else if(ue&&u==="drawcircle"){Q.type="circle";var le=ue[t][1],he=ue[r][1],G=ue[o][1],$=ue[a][1],J=ue[t][2],X=ue[r][2],oe=ue[o][2],ie=ue[a][2],j=z.xaxis&&(z.xaxis.type==="date"||z.xaxis.type==="log"),ee=z.yaxis&&(z.yaxis.type==="date"||z.yaxis.type==="log");j&&(le=f(z.xaxis,le),he=f(z.xaxis,he),G=f(z.xaxis,G),$=f(z.xaxis,$)),ee&&(J=f(z.yaxis,J),X=f(z.yaxis,X),oe=f(z.yaxis,oe),ie=f(z.yaxis,ie));var re=(he+$)/2,ce=(J+oe)/2,be=($-he+G-le)/2,Ae=(ie-X+oe-J)/2,ze=w({x0:re,y0:ce,x1:re+be*i,y1:ce+Ae*n});j&&(ze.x0=c(z.xaxis,ze.x0),ze.x1=c(z.xaxis,ze.x1)),ee&&(ze.y0=c(z.yaxis,ze.y0),ze.y1=c(z.yaxis,ze.y1)),Q.x0=ze.x0,Q.y0=ze.y0,Q.x1=ze.x1,Q.y1=ze.y1}else Q.type="path",B&&O&&S(W,B,O),Q.path=_(W),ue=null;return Q}q.exports={newShapes:E,createShapeObj:y}}}),x5=Ze({"src/components/selections/draw_newselection/newselections.js"(Z,q){"use strict";var d=Jd(),x=d.selectMode,A=Jm(),M=A.clearOutline,e=t0(),t=e.readPaths,r=e.writePaths,o=e.fixDatesForPaths;q.exports=function(i,n){if(i.length){var s=i[0][0];if(s){var c=s.getAttribute("d"),f=n.gd,g=f._fullLayout.newselection,v=n.plotinfo,T=v.xaxis,l=v.yaxis,_=n.isActiveSelection,w=n.dragmode,S=(f.layout||{}).selections||[];if(!x(w)&&_!==void 0){var E=f._fullLayout._activeSelectionIndex;if(E<S.length)switch(f._fullLayout.selections[E].type){case"rect":w="select";break;case"path":w="lasso";break}}var y=t(c,f,v,_),b={xref:T._id,yref:l._id,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}},p;y.length===1&&(p=y[0]),p&&p.length===5&&w==="select"?(b.type="rect",b.x0=p[0][1],b.y0=p[0][2],b.x1=p[2][1],b.y1=p[2][2]):(b.type="path",T&&l&&o(y,T,l),b.path=r(y),p=null),M(f);for(var u=n.editHelpers,m=(u||{}).modifyItem,h=[],P=0;P<S.length;P++){var L=f._fullLayout.selections[P];if(!L){h[P]=L;continue}if(h[P]=L._input,_!==void 0&&P===f._fullLayout._activeSelectionIndex){var z=b;switch(L.type){case"rect":m("x0",z.x0),m("x1",z.x1),m("y0",z.y0),m("y1",z.y1);break;case"path":m("path",z.path);break}}}return _===void 0?(h.push(b),h):u?u.getUpdateObj():{}}}}}}),k_=Ze({"src/components/shapes/constants.js"(Z,q){"use strict";q.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}}),r0=Ze({"src/components/shapes/helpers.js"(Z){"use strict";var q=k_(),d=ca(),x=Wo();Z.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}},Z.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}},Z.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},Z.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},Z.extractPathCoords=function(e,t,r){var o=[],a=e.match(q.segmentRE);return a.forEach(function(i){var n=t[i.charAt(0)].drawn;if(n!==void 0){var s=i.substr(1).match(q.paramRE);if(!(!s||s.length<n)){var c=s[n],f=r?c:d.cleanNumber(c);o.push(f)}}}),o},Z.getDataToPixel=function(e,t,r,o,a){var i=e._fullLayout._size,n;if(t)if(a==="domain")n=function(c){return t._length*(o?1-c:c)+t._offset};else{var s=Z.shapePositionToRange(t);n=function(c){var f=M(t,r);return t._offset+t.r2p(s(c,!0))+f},t.type==="date"&&(n=Z.decodeDate(n))}else o?n=function(c){return i.t+i.h*(1-c)}:n=function(c){return i.l+i.w*c};return n},Z.getPixelToData=function(e,t,r,o){var a=e._fullLayout._size,i;if(t)if(o==="domain")i=function(s){var c=(s-t._offset)/t._length;return r?1-c:c};else{var n=Z.rangeToShapePosition(t);i=function(s){return n(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i},Z.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,o=Math.round(e);return r?o+.5:o},Z.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&r.xref!=="paper"&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(o.yaxis=e._fullLayout[r.yref+"axis"])),o.xsizemode=r.xsizemode,o.ysizemode=r.ysizemode,o.xanchor=r.xanchor,o.yanchor=r.yanchor,{options:r,plotinfo:o}},Z.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},o=e._fullLayout._plots[r.xref+r.yref],a=!!o;return a?o._hadPlotinfo=!0:(o={},r.xref&&(o.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(o.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:o}},Z.getPathString=function(e,t){var r=t.type,o=x.getRefType(t.xref),a=x.getRefType(t.yref),i=x.getFromId(e,t.xref),n=x.getFromId(e,t.yref),s=e._fullLayout._size,c,f,g,v,T=M(i,t.x0shift),l=M(i,t.x1shift),_=M(n,t.y0shift),w=M(n,t.y1shift),S,E,y,b;if(i?o==="domain"?f=function(O){return i._offset+i._length*O}:(c=Z.shapePositionToRange(i),f=function(O){return i._offset+i.r2p(c(O,!0))}):f=function(O){return s.l+s.w*O},n?a==="domain"?v=function(O){return n._offset+n._length*(1-O)}:(g=Z.shapePositionToRange(n),v=function(O){return n._offset+n.r2p(g(O,!0))}):v=function(O){return s.t+s.h*(1-O)},r==="path")return i&&i.type==="date"&&(f=Z.decodeDate(f)),n&&n.type==="date"&&(v=Z.decodeDate(v)),A(t,f,v);if(t.xsizemode==="pixel"){var p=f(t.xanchor);S=p+t.x0+T,E=p+t.x1+l}else S=f(t.x0)+T,E=f(t.x1)+l;if(t.ysizemode==="pixel"){var u=v(t.yanchor);y=u-t.y0+_,b=u-t.y1+w}else y=v(t.y0)+_,b=v(t.y1)+w;if(r==="line")return"M"+S+","+y+"L"+E+","+b;if(r==="rect")return"M"+S+","+y+"H"+E+"V"+b+"H"+S+"Z";var m=(S+E)/2,h=(y+b)/2,P=Math.abs(m-S),L=Math.abs(h-y),z="A"+P+","+L,F=m+P+","+h,B=m+","+(h-L);return"M"+F+z+" 0 1,1 "+B+z+" 0 0,1 "+F+"Z"};function A(e,t,r){var o=e.path,a=e.xsizemode,i=e.ysizemode,n=e.xanchor,s=e.yanchor;return o.replace(q.segmentRE,function(c){var f=0,g=c.charAt(0),v=q.paramIsX[g],T=q.paramIsY[g],l=q.numParams[g],_=c.substr(1).replace(q.paramRE,function(w){return v[f]?a==="pixel"?w=t(n)+Number(w):w=t(w):T[f]&&(i==="pixel"?w=r(s)-Number(w):w=r(w)),f++,f>l&&(w="X"),w});return f>l&&(_=_.replace(/[\s,]*X.*/,""),d.log("Ignoring extra params in segment "+c)),g+_})}function M(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}}}),b5=Ze({"src/components/shapes/display_labels.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=fu(),M=as(),e=t0().readPaths,t=r0(),r=t.getPathString,o=d2(),a=mh().FROM_TL;q.exports=function(c,f,g,v){if(v.selectAll(".shape-label").remove(),!!(g.label.text||g.label.texttemplate)){var T;if(g.label.texttemplate){var l={};if(g.type!=="path"){var _=x.getFromId(c,g.xref),w=x.getFromId(c,g.yref);for(var S in o){var E=o[S](g,_,w);E!==void 0&&(l[S]=E)}}T=d.texttemplateStringForShapes(g.label.texttemplate,{},c._fullLayout._d3locale,l)}else T=g.label.text;var y={"data-index":f},b=g.label.font,p={"data-notex":1},u=v.append("g").attr(y).classed("shape-label",!0),m=u.append("text").attr(p).classed("shape-label-text",!0).text(T),h,P,L,z;if(g.path){var F=r(c,g),B=e(F,c);h=1/0,L=1/0,P=-1/0,z=-1/0;for(var O=0;O<B.length;O++)for(var I=0;I<B[O].length;I++)for(var N=B[O][I],U=1;U<N.length;U+=2){var W=N[U],Q=N[U+1];h=Math.min(h,W),P=Math.max(P,W),L=Math.min(L,Q),z=Math.max(z,Q)}}else{var ue=x.getFromId(c,g.xref),le=g.x0shift,he=g.x1shift,G=x.getRefType(g.xref),$=x.getFromId(c,g.yref),J=g.y0shift,X=g.y1shift,oe=x.getRefType(g.yref),ie=function(Re,Xe){var it=t.getDataToPixel(c,ue,Xe,!1,G);return it(Re)},j=function(Re,Xe){var it=t.getDataToPixel(c,$,Xe,!0,oe);return it(Re)};h=ie(g.x0,le),P=ie(g.x1,he),L=j(g.y0,J),z=j(g.y1,X)}var ee=g.label.textangle;ee==="auto"&&(g.type==="line"?ee=i(h,L,P,z):ee=0),m.call(function(Re){return Re.call(M.font,b).attr({}),A.convertToTspans(Re,c),Re});var re=M.bBox(m.node()),ce=n(h,L,P,z,g,ee,re),be=ce.textx,Ae=ce.texty,ze=ce.xanchor;m.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ze],y:Ae,x:be,transform:"rotate("+ee+","+be+","+Ae+")"}).call(A.positionText,be,Ae)}};function i(s,c,f,g){var v,T;return T=Math.abs(f-s),f>=s?v=c-g:v=g-c,-180/Math.PI*Math.atan2(v,T)}function n(s,c,f,g,v,T,l){var _=v.label.textposition,w=v.label.textangle,S=v.label.padding,E=v.type,y=Math.PI/180*T,b=Math.sin(y),p=Math.cos(y),u=v.label.xanchor,m=v.label.yanchor,h,P,L,z;if(E==="line"){_==="start"?(h=s,P=c):_==="end"?(h=f,P=g):(h=(s+f)/2,P=(c+g)/2),u==="auto"&&(_==="start"?w==="auto"?f>s?u="left":f<s?u="right":u="center":f>s?u="right":f<s?u="left":u="center":_==="end"?w==="auto"?f>s?u="right":f<s?u="left":u="center":f>s?u="left":f<s?u="right":u="center":u="center");var F={left:1,center:0,right:-1},B={bottom:-1,middle:0,top:1};if(w==="auto"){var O=B[m];L=-S*b*O,z=S*p*O}else{var I=F[u],N=B[m];L=S*I,z=S*N}h=h+L,P=P+z}else L=S+3,_.indexOf("right")!==-1?(h=Math.max(s,f)-L,u==="auto"&&(u="right")):_.indexOf("left")!==-1?(h=Math.min(s,f)+L,u==="auto"&&(u="left")):(h=(s+f)/2,u==="auto"&&(u="center")),_.indexOf("top")!==-1?P=Math.min(c,g):_.indexOf("bottom")!==-1?P=Math.max(c,g):P=(c+g)/2,z=S,m==="bottom"?P=P-z:m==="top"&&(P=P+z);var U=a[m],W=v.label.font.size,Q=l.height,ue=(Q*U-W)*b,le=-(Q*U-W)*p;return{textx:h+ue,texty:P+le,xanchor:u}}}}),M2=Ze({"src/components/shapes/display_outlines.js"(Z,q){"use strict";var d=ca(),x=d.strTranslate,A=Tp(),M=Jd(),e=M.drawMode,t=M.selectMode,r=oo(),o=Yn(),a=T2(),i=a.i000,n=a.i090,s=a.i180,c=a.i270,f=Jm(),g=f.clearOutlineControllers,v=t0(),T=v.pointsOnRectangle,l=v.pointsOnEllipse,_=v.writePaths,w=S2().newShapes,S=S2().createShapeObj,E=x5(),y=b5();q.exports=function m(h,P,L,z){z||(z=0);var F=L.gd;function B(){m(h,P,L,z++),(l(h[0])||L.hasText)&&O({redrawing:!0})}function O(tt){var lt={};L.isActiveShape!==void 0&&(L.isActiveShape=!1,lt=w(P,L)),L.isActiveSelection!==void 0&&(L.isActiveSelection=!1,lt=E(P,L),F._fullLayout._reselect=!0),Object.keys(lt).length&&r.call((tt||{}).redrawing?"relayout":"_guiRelayout",F,lt)}var I=F._fullLayout,N=I._zoomlayer,U=L.dragmode,W=e(U),Q=t(U);(W||Q)&&(F._fullLayout._outlining=!0),g(F),P.attr("d",_(h));var ue,le,he,G,$;if(!z&&(L.isActiveShape||L.isActiveSelection)){$=b([],h);var J=N.append("g").attr("class","outline-controllers");be(J),ot()}if(W&&L.hasText){var X=N.select(".label-temp"),oe=S(P,L,L.dragmode);y(F,"label-temp",oe,X)}function ie(tt){he=+tt.srcElement.getAttribute("data-i"),G=+tt.srcElement.getAttribute("data-j"),ue[he][G].moveFn=j}function j(tt,lt){if(h.length){var Ee=$[he][G][1],_e=$[he][G][2],fe=h[he],Fe=fe.length;if(T(fe)){var rt=tt,st=lt;if(L.isActiveSelection){var Qe=p(fe,G);Qe[1]===fe[G][1]?st=0:rt=0}for(var Lt=0;Lt<Fe;Lt++)if(Lt!==G){var kt=fe[Lt];kt[1]===fe[G][1]&&(kt[1]=Ee+rt),kt[2]===fe[G][2]&&(kt[2]=_e+st)}if(fe[G][1]=Ee+rt,fe[G][2]=_e+st,!T(fe))for(var Vt=0;Vt<Fe;Vt++)for(var Zt=0;Zt<fe[Vt].length;Zt++)fe[Vt][Zt]=$[he][Vt][Zt]}else fe[G][1]=Ee+tt,fe[G][2]=_e+lt;B()}}function ee(){O()}function re(){if(h.length&&h[he]&&h[he].length){for(var tt=[],lt=0;lt<h[he].length;lt++)lt!==G&&tt.push(h[he][lt]);tt.length>1&&!(tt.length===2&&tt[1][0]==="Z")&&(G===0&&(tt[0][0]="M"),h[he]=tt,B(),O())}}function ce(tt,lt){if(tt===2){he=+lt.srcElement.getAttribute("data-i"),G=+lt.srcElement.getAttribute("data-j");var Ee=h[he];!T(Ee)&&!l(Ee)&&re()}}function be(tt){ue=[];for(var lt=0;lt<h.length;lt++){var Ee=h[lt],_e=T(Ee),fe=!_e&&l(Ee);ue[lt]=[];for(var Fe=Ee.length,rt=0;rt<Fe;rt++)if(Ee[rt][0]!=="Z"&&!(fe&&rt!==i&&rt!==n&&rt!==s&&rt!==c)){var st=_e&&L.isActiveSelection,Qe;st&&(Qe=p(Ee,rt));var Lt=Ee[rt][1],kt=Ee[rt][2],Vt=tt.append(st?"rect":"circle").attr("data-i",lt).attr("data-j",rt).style({fill:o.background,stroke:o.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(st){var Zt=Qe[1]-Lt,Sr=Qe[2]-kt,xr=Sr?5:Math.max(Math.min(25,Math.abs(Zt)-5),5),jr=Zt?5:Math.max(Math.min(25,Math.abs(Sr)-5),5);Vt.classed(Sr?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",xr).attr("height",jr).attr("x",Lt-xr/2).attr("y",kt-jr/2).attr("transform",x(Zt/2,Sr/2))}else Vt.classed("cursor-grab",!0).attr("r",5).attr("cx",Lt).attr("cy",kt);ue[lt][rt]={element:Vt.node(),gd:F,prepFn:ie,doneFn:ee,clickFn:ce},A.init(ue[lt][rt])}}}function Ae(tt,lt){if(h.length)for(var Ee=0;Ee<h.length;Ee++)for(var _e=0;_e<h[Ee].length;_e++)for(var fe=0;fe+2<h[Ee][_e].length;fe+=2)h[Ee][_e][fe+1]=$[Ee][_e][fe+1]+tt,h[Ee][_e][fe+2]=$[Ee][_e][fe+2]+lt}function ze(tt,lt){Ae(tt,lt),B()}function Re(tt){he=+tt.srcElement.getAttribute("data-i"),he||(he=0),le[he].moveFn=ze}function Xe(){O()}function it(tt){tt===2&&u(F)}function ot(){if(le=[],!!h.length){var tt=0;le[tt]={element:P[0][0],gd:F,prepFn:Re,doneFn:Xe,clickFn:it},A.init(le[tt])}}};function b(m,h){for(var P=0;P<h.length;P++){var L=h[P];m[P]=[];for(var z=0;z<L.length;z++){m[P][z]=[];for(var F=0;F<L[z].length;F++)m[P][z][F]=L[z][F]}}return m}function p(m,h){var P=m[h][1],L=m[h][2],z=m.length,F,B,O;return F=(h+1)%z,B=m[F][1],O=m[F][2],B===P&&O===L&&(F=(h+2)%z,B=m[F][1],O=m[F][2]),[F,B,O]}function u(m){if(t(m._fullLayout.dragmode)){g(m);var h=m._fullLayout._activeSelectionIndex,P=(m.layout||{}).selections||[];if(h<P.length){for(var L=[],z=0;z<P.length;z++)z!==h&&L.push(P[z]);delete m._fullLayout._activeSelectionIndex;var F=m._fullLayout.selections[h];m._fullLayout._deselect={xref:F.xref,yref:F.yref},r.call("_guiRelayout",m,{selections:L})}}}}}),E2=Ze({"src/components/shapes/draw.js"(Z,q){"use strict";var d=On(),x=oo(),A=ca(),M=Wo(),e=t0().readPaths,t=M2(),r=b5(),o=Jm().clearOutlineControllers,a=Yn(),i=as(),n=Dl().arrayEditor,s=Tp(),c=Kd(),f=k_(),g=r0(),v=g.getPathString;q.exports={draw:T,drawOne:w,eraseActiveShape:u,drawLabel:r};function T(m){var h=m._fullLayout;h._shapeUpperLayer.selectAll("path").remove(),h._shapeLowerLayer.selectAll("path").remove(),h._shapeUpperLayer.selectAll("text").remove(),h._shapeLowerLayer.selectAll("text").remove();for(var P in h._plots){var L=h._plots[P].shapelayer;L&&(L.selectAll("path").remove(),L.selectAll("text").remove())}for(var z=0;z<h.shapes.length;z++)h.shapes[z].visible===!0&&w(m,z)}function l(m){return!!m._fullLayout._outlining}function _(m){return!m._context.edits.shapePosition}function w(m,h){m._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+h+'"]').remove();var P=g.makeShapesOptionsAndPlotinfo(m,h),L=P.options,z=P.plotinfo;if(!L._input||L.visible!==!0)return;if(L.layer==="above")B(m._fullLayout._shapeUpperLayer);else if(L.xref==="paper"||L.yref==="paper")B(m._fullLayout._shapeLowerLayer);else if(L.layer==="between")B(z.shapelayerBetween);else if(z._hadPlotinfo){var F=z.mainplotinfo||z;B(F.shapelayer)}else B(m._fullLayout._shapeLowerLayer);function B(O){var I=v(m,L),N={"data-index":h,"fill-rule":L.fillrule,d:I},U=L.opacity,W=L.fillcolor,Q=L.line.width?L.line.color:"rgba(0,0,0,0)",ue=L.line.width,le=L.line.dash;!ue&&L.editable===!0&&(ue=5,le="solid");var he=I[I.length-1]!=="Z",G=_(m)&&L.editable&&m._fullLayout._activeShapeIndex===h;G&&(W=he?"rgba(0,0,0,0)":m._fullLayout.activeshape.fillcolor,U=m._fullLayout.activeshape.opacity);var $=O.append("g").classed("shape-group",!0).attr({"data-index":h}),J=$.append("path").attr(N).style("opacity",U).call(a.stroke,Q).call(a.fill,W).call(i.dashLine,le,ue);S($,m,L),r(m,h,L,$);var X;if((G||m._context.edits.shapePosition)&&(X=n(m.layout,"shapes",L)),G){J.style({cursor:"move"});var oe={element:J.node(),plotinfo:z,gd:m,editHelpers:X,hasText:L.label.text||L.label.texttemplate,isActiveShape:!0},ie=e(I,m);t(ie,J,oe)}else m._context.edits.shapePosition?E(m,J,L,h,O,X):L.editable===!0&&J.style("pointer-events",he||a.opacity(W)*U<=.5?"stroke":"all");J.node().addEventListener("click",function(){return b(m,J)})}}function S(m,h,P){var L=(P.xref+P.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");i.setClipUrl(m,L?"clip"+h._fullLayout._uid+L:null,h)}function E(m,h,P,L,z,F){var B=10,O=10,I=P.xsizemode==="pixel",N=P.ysizemode==="pixel",U=P.type==="line",W=P.type==="path",Q=F.modifyItem,ue,le,he,G,$,J,X,oe,ie,j,ee,re,ce,be,Ae,ze=d.select(h.node().parentNode),Re=M.getFromId(m,P.xref),Xe=M.getRefType(P.xref),it=M.getFromId(m,P.yref),ot=M.getRefType(P.yref),tt=P.x0shift,lt=P.x1shift,Ee=P.y0shift,_e=P.y1shift,fe=function(Me,qe){var Ce=g.getDataToPixel(m,Re,qe,!1,Xe);return Ce(Me)},Fe=function(Me,qe){var Ce=g.getDataToPixel(m,it,qe,!0,ot);return Ce(Me)},rt=g.getPixelToData(m,Re,!1,Xe),st=g.getPixelToData(m,it,!0,ot),Qe=Vt(),Lt={element:Qe.node(),gd:m,prepFn:xr,doneFn:jr,clickFn:wr},kt;s.init(Lt),Qe.node().onmousemove=Sr;function Vt(){return U?Zt():h}function Zt(){var Me=10,qe=Math.max(P.line.width,Me),Ce=z.append("g").attr("data-index",L).attr("drag-helper",!0);Ce.append("path").attr("d",h.attr("d")).style({cursor:"move","stroke-width":qe,"stroke-opacity":"0"});var Te={"fill-opacity":"0"},Pe=Math.max(qe/2,Me);return Ce.append("circle").attr({"data-line-point":"start-point",cx:I?fe(P.xanchor)+P.x0:fe(P.x0,tt),cy:N?Fe(P.yanchor)-P.y0:Fe(P.y0,Ee),r:Pe}).style(Te).classed("cursor-grab",!0),Ce.append("circle").attr({"data-line-point":"end-point",cx:I?fe(P.xanchor)+P.x1:fe(P.x1,lt),cy:N?Fe(P.yanchor)-P.y1:Fe(P.y1,_e),r:Pe}).style(Te).classed("cursor-grab",!0),Ce}function Sr(Me){if(l(m)){kt=null;return}if(U)Me.target.tagName==="path"?kt="move":kt=Me.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var qe=Lt.element.getBoundingClientRect(),Ce=qe.right-qe.left,Te=qe.bottom-qe.top,Pe=Me.clientX-qe.left,at=Me.clientY-qe.top,yt=!W&&Ce>B&&Te>O&&!Me.shiftKey?s.getCursor(Pe/Ce,1-at/Te):"move";c(h,yt),kt=yt.split("-")[0]}}function xr(Me){l(m)||(I&&($=fe(P.xanchor)),N&&(J=Fe(P.yanchor)),P.type==="path"?Ae=P.path:(ue=I?P.x0:fe(P.x0),le=N?P.y0:Fe(P.y0),he=I?P.x1:fe(P.x1),G=N?P.y1:Fe(P.y1)),ue<he?(ie=ue,ce="x0",j=he,be="x1"):(ie=he,ce="x1",j=ue,be="x0"),!N&&le<G||N&&le>G?(X=le,ee="y0",oe=G,re="y1"):(X=G,ee="y1",oe=le,re="y0"),Sr(Me),Be(z,P),Ue(h,P,m),Lt.moveFn=kt==="move"?Ir:bt,Lt.altKey=Me.altKey)}function jr(){l(m)||(c(h),Ke(z),S(h,m,P),x.call("_guiRelayout",m,F.getUpdateObj()))}function wr(){l(m)||Ke(z)}function Ir(Me,qe){if(P.type==="path"){var Ce=function(at){return at},Te=Ce,Pe=Ce;I?Q("xanchor",P.xanchor=rt($+Me)):(Te=function(yt){return rt(fe(yt)+Me)},Re&&Re.type==="date"&&(Te=g.encodeDate(Te))),N?Q("yanchor",P.yanchor=st(J+qe)):(Pe=function(yt){return st(Fe(yt)+qe)},it&&it.type==="date"&&(Pe=g.encodeDate(Pe))),Q("path",P.path=y(Ae,Te,Pe))}else I?Q("xanchor",P.xanchor=rt($+Me)):(Q("x0",P.x0=rt(ue+Me)),Q("x1",P.x1=rt(he+Me))),N?Q("yanchor",P.yanchor=st(J+qe)):(Q("y0",P.y0=st(le+qe)),Q("y1",P.y1=st(G+qe)));h.attr("d",v(m,P)),Be(z,P),r(m,L,P,ze)}function bt(Me,qe){if(W){var Ce=function(za){return za},Te=Ce,Pe=Ce;I?Q("xanchor",P.xanchor=rt($+Me)):(Te=function(ti){return rt(fe(ti)+Me)},Re&&Re.type==="date"&&(Te=g.encodeDate(Te))),N?Q("yanchor",P.yanchor=st(J+qe)):(Pe=function(ti){return st(Fe(ti)+qe)},it&&it.type==="date"&&(Pe=g.encodeDate(Pe))),Q("path",P.path=y(Ae,Te,Pe))}else if(U){if(kt==="resize-over-start-point"){var at=ue+Me,yt=N?le-qe:le+qe;Q("x0",P.x0=I?at:rt(at)),Q("y0",P.y0=N?yt:st(yt))}else if(kt==="resize-over-end-point"){var Tt=he+Me,Ot=N?G-qe:G+qe;Q("x1",P.x1=I?Tt:rt(Tt)),Q("y1",P.y1=N?Ot:st(Ot))}}else{var Gt=function(za){return kt.indexOf(za)!==-1},rr=Gt("n"),Qt=Gt("s"),Tr=Gt("w"),la=Gt("e"),Ua=rr?X+qe:X,Ba=Qt?oe+qe:oe,Ra=Tr?ie+Me:ie,ei=la?j+Me:j;N&&(rr&&(Ua=X-qe),Qt&&(Ba=oe-qe)),(!N&&Ba-Ua>O||N&&Ua-Ba>O)&&(Q(ee,P[ee]=N?Ua:st(Ua)),Q(re,P[re]=N?Ba:st(Ba))),ei-Ra>B&&(Q(ce,P[ce]=I?Ra:rt(Ra)),Q(be,P[be]=I?ei:rt(ei)))}h.attr("d",v(m,P)),Be(z,P),r(m,L,P,ze)}function Be(Me,qe){(I||N)&&Ce();function Ce(){var Te=qe.type!=="path",Pe=Me.selectAll(".visual-cue").data([0]),at=1;Pe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":at}).classed("visual-cue",!0);var yt=fe(I?qe.xanchor:A.midRange(Te?[qe.x0,qe.x1]:g.extractPathCoords(qe.path,f.paramIsX))),Tt=Fe(N?qe.yanchor:A.midRange(Te?[qe.y0,qe.y1]:g.extractPathCoords(qe.path,f.paramIsY)));if(yt=g.roundPositionForSharpStrokeRendering(yt,at),Tt=g.roundPositionForSharpStrokeRendering(Tt,at),I&&N){var Ot="M"+(yt-1-at)+","+(Tt-1-at)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pe.attr("d",Ot)}else if(I){var Gt="M"+(yt-1-at)+","+(Tt-9-at)+"v18 h2 v-18 Z";Pe.attr("d",Gt)}else{var rr="M"+(yt-9-at)+","+(Tt-1-at)+"h18 v2 h-18 Z";Pe.attr("d",rr)}}}function Ke(Me){Me.selectAll(".visual-cue").remove()}function Ue(Me,qe,Ce){var Te=qe.xref,Pe=qe.yref,at=M.getFromId(Ce,Te),yt=M.getFromId(Ce,Pe),Tt="";Te!=="paper"&&!at.autorange&&(Tt+=Te),Pe!=="paper"&&!yt.autorange&&(Tt+=Pe),i.setClipUrl(Me,Tt?"clip"+Ce._fullLayout._uid+Tt:null,Ce)}}function y(m,h,P){return m.replace(f.segmentRE,function(L){var z=0,F=L.charAt(0),B=f.paramIsX[F],O=f.paramIsY[F],I=f.numParams[F],N=L.substr(1).replace(f.paramRE,function(U){return z>=I||(B[z]?U=h(U):O[z]&&(U=P(U)),z++),U});return F+N})}function b(m,h){if(_(m)){var P=h.node(),L=+P.getAttribute("data-index");if(L>=0){if(L===m._fullLayout._activeShapeIndex){p(m);return}m._fullLayout._activeShapeIndex=L,m._fullLayout._deactivateShape=p,T(m)}}}function p(m){if(_(m)){var h=m._fullLayout._activeShapeIndex;h>=0&&(o(m),delete m._fullLayout._activeShapeIndex,T(m))}}function u(m){if(_(m)){o(m);var h=m._fullLayout._activeShapeIndex,P=(m.layout||{}).shapes||[];if(h<P.length){for(var L=[],z=0;z<P.length;z++)z!==h&&L.push(P[z]);return delete m._fullLayout._activeShapeIndex,x.call("_guiRelayout",m,{shapes:L})}}}}}),w5=Ze({"src/components/modebar/buttons.js"(Z,q){"use strict";var d=oo(),x=xc(),A=$c(),M=w2(),e=E2().eraseActiveShape,t=ca(),r=t._,o=q.exports={};o.toImage={name:"toImage",title:function(E){var y=E._context.toImageButtonOptions||{},b=y.format||"png";return b==="png"?r(E,"Download plot as a PNG"):r(E,"Download plot")},icon:M.camera,click:function(E){var y=E._context.toImageButtonOptions,b={format:y.format||"png"};t.notifier(r(E,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(p){p in y&&(b[p]=y[p])}),d.call("downloadImage",E,b).then(function(p){t.notifier(r(E,"Snapshot succeeded")+" - "+p,"long")}).catch(function(){t.notifier(r(E,"Sorry, there was a problem downloading your snapshot!"),"long")})}},o.sendDataToCloud={name:"sendDataToCloud",title:function(E){return r(E,"Edit in Chart Studio")},icon:M.disk,click:function(E){x.sendDataToCloud(E)}},o.editInChartStudio={name:"editInChartStudio",title:function(E){return r(E,"Edit in Chart Studio")},icon:M.pencil,click:function(E){x.sendDataToCloud(E)}},o.zoom2d={name:"zoom2d",_cat:"zoom",title:function(E){return r(E,"Zoom")},attr:"dragmode",val:"zoom",icon:M.zoombox,click:a},o.pan2d={name:"pan2d",_cat:"pan",title:function(E){return r(E,"Pan")},attr:"dragmode",val:"pan",icon:M.pan,click:a},o.select2d={name:"select2d",_cat:"select",title:function(E){return r(E,"Box Select")},attr:"dragmode",val:"select",icon:M.selectbox,click:a},o.lasso2d={name:"lasso2d",_cat:"lasso",title:function(E){return r(E,"Lasso Select")},attr:"dragmode",val:"lasso",icon:M.lasso,click:a},o.drawclosedpath={name:"drawclosedpath",title:function(E){return r(E,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:M.drawclosedpath,click:a},o.drawopenpath={name:"drawopenpath",title:function(E){return r(E,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:M.drawopenpath,click:a},o.drawline={name:"drawline",title:function(E){return r(E,"Draw line")},attr:"dragmode",val:"drawline",icon:M.drawline,click:a},o.drawrect={name:"drawrect",title:function(E){return r(E,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:M.drawrect,click:a},o.drawcircle={name:"drawcircle",title:function(E){return r(E,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:M.drawcircle,click:a},o.eraseshape={name:"eraseshape",title:function(E){return r(E,"Erase active shape")},icon:M.eraseshape,click:e},o.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(E){return r(E,"Zoom in")},attr:"zoom",val:"in",icon:M.zoom_plus,click:a},o.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(E){return r(E,"Zoom out")},attr:"zoom",val:"out",icon:M.zoom_minus,click:a},o.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(E){return r(E,"Autoscale")},attr:"zoom",val:"auto",icon:M.autoscale,click:a},o.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(E){return r(E,"Reset axes")},attr:"zoom",val:"reset",icon:M.home,click:a},o.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(E){return r(E,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:M.tooltip_basic,gravity:"ne",click:a},o.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(E){return r(E,"Compare data on hover")},attr:"hovermode",val:function(E){return E._fullLayout._isHoriz?"y":"x"},icon:M.tooltip_compare,gravity:"ne",click:a};function a(E,y){var b=y.currentTarget,p=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,m=E._fullLayout,h={},P=A.list(E,null,!0),L=m._cartesianSpikesEnabled,z,F;if(p==="zoom"){var B=u==="in"?.5:2,O=(1+B)/2,I=(1-B)/2,N,U;for(F=0;F<P.length;F++)if(z=P[F],U=z.modebardisable==="none"||z.modebardisable.indexOf(u==="auto"||u==="reset"?"autoscale":"zoominout")===-1,U&&!z.fixedrange)if(N=z._name,u==="auto")h[N+".autorange"]=!0;else if(u==="reset")z._rangeInitial0===void 0&&z._rangeInitial1===void 0?h[N+".autorange"]=!0:z._rangeInitial0===void 0?(h[N+".autorange"]=z._autorangeInitial,h[N+".range"]=[null,z._rangeInitial1]):z._rangeInitial1===void 0?(h[N+".range"]=[z._rangeInitial0,null],h[N+".autorange"]=z._autorangeInitial):h[N+".range"]=[z._rangeInitial0,z._rangeInitial1],z._showSpikeInitial!==void 0&&(h[N+".showspikes"]=z._showSpikeInitial,L==="on"&&!z._showSpikeInitial&&(L="off"));else{var W=[z.r2l(z.range[0]),z.r2l(z.range[1])],Q=[O*W[0]+I*W[1],O*W[1]+I*W[0]];h[N+".range[0]"]=z.l2r(Q[0]),h[N+".range[1]"]=z.l2r(Q[1])}}else p==="hovermode"&&(u==="x"||u==="y")&&(u=m._isHoriz?"y":"x",b.setAttribute("data-val",u)),h[p]=u;m._cartesianSpikesEnabled=L,d.call("_guiRelayout",E,h)}o.zoom3d={name:"zoom3d",_cat:"zoom",title:function(E){return r(E,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:M.zoombox,click:i},o.pan3d={name:"pan3d",_cat:"pan",title:function(E){return r(E,"Pan")},attr:"scene.dragmode",val:"pan",icon:M.pan,click:i},o.orbitRotation={name:"orbitRotation",title:function(E){return r(E,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:M["3d_rotate"],click:i},o.tableRotation={name:"tableRotation",title:function(E){return r(E,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:M["z-axis"],click:i};function i(E,y){for(var b=y.currentTarget,p=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,m=E._fullLayout._subplots.gl3d||[],h={},P=p.split("."),L=0;L<m.length;L++)h[m[L]+"."+P[1]]=u;var z=u==="pan"?u:"zoom";h.dragmode=z,d.call("_guiRelayout",E,h)}o.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(E){return r(E,"Reset camera to default")},attr:"resetDefault",icon:M.home,click:n},o.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(E){return r(E,"Reset camera to last save")},attr:"resetLastSave",icon:M.movie,click:n};function n(E,y){for(var b=y.currentTarget,p=b.getAttribute("data-attr"),u=p==="resetLastSave",m=p==="resetDefault",h=E._fullLayout,P=h._subplots.gl3d||[],L={},z=0;z<P.length;z++){var F=P[z],B=F+".camera",O=F+".aspectratio",I=F+".aspectmode",N=h[F]._scene,U;u?(L[B+".up"]=N.viewInitial.up,L[B+".eye"]=N.viewInitial.eye,L[B+".center"]=N.viewInitial.center,U=!0):m&&(L[B+".up"]=null,L[B+".eye"]=null,L[B+".center"]=null,U=!0),U&&(L[O+".x"]=N.viewInitial.aspectratio.x,L[O+".y"]=N.viewInitial.aspectratio.y,L[O+".z"]=N.viewInitial.aspectratio.z,L[I]=N.viewInitial.aspectmode)}d.call("_guiRelayout",E,L)}o.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(E){return r(E,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:M.tooltip_basic,gravity:"ne",click:c};function s(E,y){var b=y.currentTarget,p=b._previousVal,u=E._fullLayout,m=u._subplots.gl3d||[],h=["xaxis","yaxis","zaxis"],P={},L={};if(p)L=p,b._previousVal=null;else{for(var z=0;z<m.length;z++){var F=m[z],B=u[F],O=F+".hovermode";P[O]=B.hovermode,L[O]=!1;for(var I=0;I<3;I++){var N=h[I],U=F+"."+N+".showspikes";L[U]=!1,P[U]=B[N].showspikes}}b._previousVal=P}return L}function c(E,y){var b=s(E,y);d.call("_guiRelayout",E,b)}o.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(E){return r(E,"Zoom in")},attr:"zoom",val:"in",icon:M.zoom_plus,click:f},o.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(E){return r(E,"Zoom out")},attr:"zoom",val:"out",icon:M.zoom_minus,click:f},o.resetGeo={name:"resetGeo",_cat:"reset",title:function(E){return r(E,"Reset")},attr:"reset",val:null,icon:M.autoscale,click:f},o.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(E){return r(E,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:M.tooltip_basic,gravity:"ne",click:v};function f(E,y){for(var b=y.currentTarget,p=b.getAttribute("data-attr"),u=b.getAttribute("data-val")||!0,m=E._fullLayout,h=m._subplots.geo||[],P=0;P<h.length;P++){var L=h[P],z=m[L];if(p==="zoom"){var F=z.projection.scale,B=u==="in"?2*F:.5*F;d.call("_guiRelayout",E,L+".projection.scale",B)}}p==="reset"&&S(E,"geo")}o.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(E){return r(E,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:M.tooltip_basic,gravity:"ne",click:v};function g(E){var y=E._fullLayout;return y.hovermode?!1:y._has("cartesian")?y._isHoriz?"y":"x":"closest"}function v(E){var y=g(E);d.call("_guiRelayout",E,"hovermode",y)}o.resetViewSankey={name:"resetSankeyGroup",title:function(E){return r(E,"Reset view")},icon:M.home,click:function(E){for(var y={"node.groups":[],"node.x":[],"node.y":[]},b=0;b<E._fullData.length;b++){var p=E._fullData[b]._viewInitial;y["node.groups"].push(p.node.groups.slice()),y["node.x"].push(p.node.x.slice()),y["node.y"].push(p.node.y.slice())}d.call("restyle",E,y)}},o.toggleHover={name:"toggleHover",title:function(E){return r(E,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:M.tooltip_basic,gravity:"ne",click:function(E,y){var b=s(E,y);b.hovermode=g(E),d.call("_guiRelayout",E,b)}},o.resetViews={name:"resetViews",title:function(E){return r(E,"Reset views")},icon:M.home,click:function(E,y){var b=y.currentTarget;b.setAttribute("data-attr","zoom"),b.setAttribute("data-val","reset"),a(E,y),b.setAttribute("data-attr","resetLastSave"),n(E,y),S(E,"geo"),S(E,"mapbox"),S(E,"map")}},o.toggleSpikelines={name:"toggleSpikelines",title:function(E){return r(E,"Toggle Spike Lines")},icon:M.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(E){var y=E._fullLayout,b=y._cartesianSpikesEnabled;y._cartesianSpikesEnabled=b==="on"?"off":"on",d.call("_guiRelayout",E,T(E))}};function T(E){for(var y=E._fullLayout,b=y._cartesianSpikesEnabled==="on",p=A.list(E,null,!0),u={},m=0;m<p.length;m++){var h=p[m];u[h._name+".showspikes"]=b?!0:h._showSpikeInitial}return u}o.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(E){return r(E,"Reset view")},attr:"reset",icon:M.home,click:function(E){S(E,"mapbox")}},o.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(E){return r(E,"Reset view")},attr:"reset",icon:M.home,click:function(E){S(E,"map")}},o.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(E){return r(E,"Zoom in")},attr:"zoom",val:"in",icon:M.zoom_plus,click:l},o.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(E){return r(E,"Zoom in")},attr:"zoom",val:"in",icon:M.zoom_plus,click:_},o.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(E){return r(E,"Zoom out")},attr:"zoom",val:"out",icon:M.zoom_minus,click:l},o.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(E){return r(E,"Zoom out")},attr:"zoom",val:"out",icon:M.zoom_minus,click:_};function l(E,y){w(E,y,"mapbox")}function _(E,y){w(E,y,"map")}function w(E,y,b){for(var p=y.currentTarget,u=p.getAttribute("data-val"),m=E._fullLayout,h=m._subplots[b]||[],P=1.05,L={},z=0;z<h.length;z++){var F=h[z],B=m[F].zoom,O=u==="in"?P*B:B/P;L[F+".zoom"]=O}d.call("_guiRelayout",E,L)}function S(E,y){for(var b=E._fullLayout,p=b._subplots[y]||[],u={},m=0;m<p.length;m++)for(var h=p[m],P=b[h]._subplot,L=P.viewInitial,z=Object.keys(L),F=0;F<z.length;F++){var B=z[F];u[h+"."+B]=L[B]}d.call("_guiRelayout",E,u)}}}),T5=Ze({"src/components/modebar/constants.js"(Z,q){"use strict";var d=w5(),x=Object.keys(d),A=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],M=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(A),e=[],t=function(r){if(M.indexOf(r._cat||r.name)===-1){var o=r.name,a=(r._cat||r.name).toLowerCase();e.indexOf(o)===-1&&e.push(o),e.indexOf(a)===-1&&e.push(a)}};x.forEach(function(r){t(d[r])}),e.sort(),q.exports={DRAW_MODES:A,backButtons:M,foreButtons:e}}}),A5=Ze({"src/components/modebar/attributes.js"(Z,q){"use strict";var d=T5();q.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"}}}}),xz=Ze({"src/components/modebar/defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Dl(),M=A5();q.exports=function(t,r){var o=t.modebar||{},a=A.newContainer(r,"modebar");function i(s,c){return d.coerce(o,a,M,s,c)}i("orientation"),i("bgcolor",x.addOpacity(r.paper_bgcolor,.5));var n=x.contrast(x.rgb(r.modebar.bgcolor));i("color",x.addOpacity(n,.3)),i("activecolor",x.addOpacity(n,.7)),i("uirevision",r.uirevision),i("add"),i("remove")}}}),bz=Ze({"src/components/modebar/modebar.js"(Z,q){"use strict";var d=On(),x=ns(),A=ca(),M=w2(),e=Eh().version,t=new DOMParser;function r(n){this.container=n.container,this.element=document.createElement("div"),this.update(n.graphInfo,n.buttons),this.container.appendChild(this.element)}var o=r.prototype;o.update=function(n,s){this.graphInfo=n;var c=this.graphInfo._context,f=this.graphInfo._fullLayout,g="modebar-"+f._uid;this.element.setAttribute("id",g),this.element.setAttribute("role","toolbar"),this._uid=g,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),f.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=f.modebar,T="#"+g+" .modebar-group";document.querySelectorAll(T).forEach(function(E){E.style.backgroundColor=v.bgcolor});var l=!this.hasButtons(s),_=this.hasLogo!==c.displaylogo,w=this.locale!==c.locale;if(this.locale=c.locale,(l||_||w)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var S=this.getLogo();c.watermark&&(S.className=S.className+" watermark"),f.modebar.orientation==="v"?this.element.insertBefore(S,this.element.childNodes[0]):this.element.appendChild(S),this.hasLogo=!0}this.updateActiveButton(),A.setStyleOnHover("#"+g+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},o.updateButtons=function(n){var s=this;this.buttons=n,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var f=s.createGroup();c.forEach(function(g){var v=g.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var T=s.createButton(g);s.buttonElements.push(T),f.appendChild(T)}),s.element.appendChild(f)})},o.createGroup=function(){var n=document.createElement("div");n.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return n.style.backgroundColor=s.bgcolor,n},o.createButton=function(n){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var f=n.title;f===void 0?f=n.name:typeof f=="function"&&(f=f(this.graphInfo)),(f||f===0)&&(c.setAttribute("data-title",f),c.setAttribute("aria-label",f)),n.attr!==void 0&&c.setAttribute("data-attr",n.attr);var g=n.val;g!==void 0&&(typeof g=="function"&&(g=g(this.graphInfo)),c.setAttribute("data-val",g));var v=n.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(l){n.click(s.graphInfo,l),s.updateActiveButton(l.currentTarget)}),c.setAttribute("data-toggle",n.toggle||!1),n.toggle&&d.select(c).classed("active",!0);var T=n.icon;return typeof T=="function"?c.appendChild(T()):c.appendChild(this.createIcon(T||M.question)),c.setAttribute("data-gravity",n.gravity||"n"),c},o.createIcon=function(n){var s=x(n.height)?Number(n.height):n.ascent-n.descent,c="http://www.w3.org/2000/svg",f;if(n.path){f=document.createElementNS(c,"svg"),f.setAttribute("viewBox",[0,0,n.width,s].join(" ")),f.setAttribute("class","icon");var g=document.createElementNS(c,"path");g.setAttribute("d",n.path),n.transform?g.setAttribute("transform",n.transform):n.ascent!==void 0&&g.setAttribute("transform","matrix(1 0 0 -1 0 "+n.ascent+")"),f.appendChild(g)}if(n.svg){var v=t.parseFromString(n.svg,"application/xml");f=v.childNodes[0]}return f.setAttribute("height","1em"),f.setAttribute("width","1em"),f},o.updateActiveButton=function(n){var s=this.graphInfo._fullLayout,c=n!==void 0?n.getAttribute("data-attr"):null;this.buttonElements.forEach(function(f){var g=f.getAttribute("data-val")||!0,v=f.getAttribute("data-attr"),T=f.getAttribute("data-toggle")==="true",l=d.select(f),_=function(E,y){var b=s.modebar,p=E.querySelector(".icon path");p&&(y||E.matches(":hover")?p.style.fill=b.activecolor:p.style.fill=b.color)};if(T){if(v===c){var w=!l.classed("active");l.classed("active",w),_(f,w)}}else{var S=v===null?v:A.nestedProperty(s,v).get();l.classed("active",S===g),_(f,S===g)}})},o.hasButtons=function(n){var s=this.buttons;if(!s||n.length!==s.length)return!1;for(var c=0;c<n.length;++c){if(n[c].length!==s[c].length)return!1;for(var f=0;f<n[c].length;f++)if(n[c][f].name!==s[c][f].name)return!1}return!0};function a(n){return n+" (v"+e+")"}o.getLogo=function(){var n=this.createGroup(),s=document.createElement("a");return s.href="https://plotly.com/",s.target="_blank",s.setAttribute("data-title",a(A._(this.graphInfo,"Produced with Plotly.js"))),s.className="modebar-btn plotlyjsicon modebar-btn--logo",s.appendChild(this.createIcon(M.newplotlylogo)),n.appendChild(s),n},o.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},o.destroy=function(){A.removeElement(this.container.querySelector(".modebar"))};function i(n,s){var c=n._fullLayout,f=new r({graphInfo:n,container:c._modebardiv.node(),buttons:s});return c._privateplot&&d.select(f.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),f}q.exports=i}}),wz=Ze({"src/components/modebar/manage.js"(Z,q){"use strict";var d=$c(),x=Fu(),A=oo(),M=Qp().isUnifiedHover,e=bz(),t=w5(),r=T5().DRAW_MODES,o=ca().extendDeep;q.exports=function(v){var T=v._fullLayout,l=v._context,_=T._modeBar;if(!l.displayModeBar&&!l.watermark){_&&(_.destroy(),delete T._modeBar);return}if(!Array.isArray(l.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(l.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var w=l.modeBarButtons,S;Array.isArray(w)&&w.length?S=f(w):!l.displayModeBar&&l.watermark?S=[]:S=a(v),_?_.update(v,S):T._modeBar=e(v,S)};function a(g){var v=g._fullLayout,T=g._fullData,l=g._context;function _(j,ee){if(typeof ee=="string"){if(ee.toLowerCase()===j.toLowerCase())return!0}else{var re=ee.name,ce=ee._cat||ee.name;if(re===j||ce===j.toLowerCase())return!0}return!1}var w=v.modebar.add;typeof w=="string"&&(w=[w]);var S=v.modebar.remove;typeof S=="string"&&(S=[S]);var E=l.modeBarButtonsToAdd.concat(w.filter(function(j){for(var ee=0;ee<l.modeBarButtonsToRemove.length;ee++)if(_(j,l.modeBarButtonsToRemove[ee]))return!1;return!0})),y=l.modeBarButtonsToRemove.concat(S.filter(function(j){for(var ee=0;ee<l.modeBarButtonsToAdd.length;ee++)if(_(j,l.modeBarButtonsToAdd[ee]))return!1;return!0})),b=v._has("cartesian"),p=v._has("gl3d"),u=v._has("geo"),m=v._has("pie"),h=v._has("funnelarea"),P=v._has("ternary"),L=v._has("mapbox"),z=v._has("map"),F=v._has("polar"),B=v._has("smith"),O=v._has("sankey"),I=i(v),N=M(v.hovermode),U=[];function W(j){if(j.length){for(var ee=[],re=0;re<j.length;re++){for(var ce=j[re],be=t[ce],Ae=be.name.toLowerCase(),ze=(be._cat||be.name).toLowerCase(),Re=!1,Xe=0;Xe<y.length;Xe++){var it=y[Xe].toLowerCase();if(it===Ae||it===ze){Re=!0;break}}Re||ee.push(t[ce])}U.push(ee)}}var Q=["toImage"];l.showEditInChartStudio?Q.push("editInChartStudio"):l.showSendToCloud&&Q.push("sendDataToCloud"),W(Q);var ue=[],le=[],he=[],G=[];(b||m||h||P)+u+p+L+z+F+B>1?(le=["toggleHover"],he=["resetViews"]):u?(ue=["zoomInGeo","zoomOutGeo"],le=["hoverClosestGeo"],he=["resetGeo"]):p?(le=["hoverClosest3d"],he=["resetCameraDefault3d","resetCameraLastSave3d"]):L?(ue=["zoomInMapbox","zoomOutMapbox"],le=["toggleHover"],he=["resetViewMapbox"]):z?(ue=["zoomInMap","zoomOutMap"],le=["toggleHover"],he=["resetViewMap"]):m?le=["hoverClosestPie"]:O?(le=["hoverClosestCartesian","hoverCompareCartesian"],he=["resetViewSankey"]):le=["toggleHover"],b&&le.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(T)||N)&&(le=[]),b&&!I&&(ue=["zoomIn2d","zoomOut2d","autoScale2d"],he[0]!=="resetViews"&&(he=["resetScale2d"])),p?G=["zoom3d","pan3d","orbitRotation","tableRotation"]:b&&!I||P?G=["zoom2d","pan2d"]:L||z||u?G=["pan2d"]:F&&(G=["zoom2d"]),n(T)&&G.push("select2d","lasso2d");var $=[],J=function(j){$.indexOf(j)===-1&&le.indexOf(j)!==-1&&$.push(j)};if(Array.isArray(E)){for(var X=[],oe=0;oe<E.length;oe++){var ie=E[oe];typeof ie=="string"?(ie=ie.toLowerCase(),r.indexOf(ie)!==-1?(v._has("mapbox")||v._has("map")||v._has("cartesian"))&&G.push(ie):ie==="togglespikelines"?J("toggleSpikelines"):ie==="togglehover"?J("toggleHover"):ie==="hovercompare"?J("hoverCompareCartesian"):ie==="hoverclosest"?(J("hoverClosestCartesian"),J("hoverClosestGeo"),J("hoverClosest3d"),J("hoverClosestPie")):ie==="v1hovermode"&&(J("hoverClosestCartesian"),J("hoverCompareCartesian"),J("hoverClosestGeo"),J("hoverClosest3d"),J("hoverClosestPie"))):X.push(ie)}E=X}return W(G),W(ue.concat(he)),W($),c(U,E)}function i(g){for(var v=d.list({_fullLayout:g},null,!0),T=0;T<v.length;T++){var l=v[T].modebardisable;if(!v[T].fixedrange&&l!=="autoscale+zoominout"&&l!=="zoominout+autoscale")return!1}return!0}function n(g){for(var v=!1,T=0;T<g.length&&!v;T++){var l=g[T];!l._module||!l._module.selectPoints||(A.traceIs(l,"scatter-like")?(x.hasMarkers(l)||x.hasText(l))&&(v=!0):A.traceIs(l,"box-violin")?(l.boxpoints==="all"||l.points==="all")&&(v=!0):v=!0)}return v}function s(g){for(var v=0;v<g.length;v++)if(!A.traceIs(g[v],"noHover"))return!1;return!0}function c(g,v){if(v.length)if(Array.isArray(v[0]))for(var T=0;T<v.length;T++)g.push(v[T]);else g.push(v);return g}function f(g){for(var v=o([],g),T=0;T<v.length;T++)for(var l=v[T],_=0;_<l.length;_++){var w=l[_];if(typeof w=="string")if(t[w]!==void 0)v[T][_]=t[w];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return v}}}),S5=Ze({"src/components/modebar/index.js"(Z,q){"use strict";q.exports={moduleType:"component",name:"modebar",layoutAttributes:A5(),supplyLayoutDefaults:xz(),manage:wz()}}}),M5=Ze({"src/plots/cartesian/scale_zoom.js"(Z,q){"use strict";var d=mh().FROM_BL;q.exports=function(A,M,e){e===void 0&&(e=d[A.constraintoward||"center"]);var t=[A.r2l(A.range[0]),A.r2l(A.range[1])],r=t[0]+(t[1]-t[0])*e;A.range=A._input.range=[A.l2r(r+(t[0]-r)*M),A.l2r(r+(t[1]-r)*M)],A.setScale()}}}),Y0=Ze({"src/plots/cartesian/constraints.js"(Z){"use strict";var q=ca(),d=Yd(),x=$c().id2name,A=Wh(),M=M5(),e=wv(),t=qs().ALMOST_EQUAL,r=mh().FROM_BL;Z.handleDefaults=function(g,v,T){var l=T.axIds,_=T.axHasImage,w=v._axisConstraintGroups=[],S=v._axisMatchGroups=[],E,y,b,p,u,m,h,P;for(E=0;E<l.length;E++)p=x(l[E]),u=g[p],m=v[p],o(u,m,{axIds:l,layoutOut:v,hasImage:_[p]});function L(Q,ue){for(E=0;E<Q.length;E++){y=Q[E];for(b in y)v[x(b)][ue]=y}}for(L(S,"_matchGroup"),E=0;E<w.length;E++){y=w[E];for(b in y)if(m=v[x(b)],m.fixedrange){for(var z in y){var F=x(z);(g[F]||{}).fixedrange===!1&&q.warn("fixedrange was specified as false for axis "+F+" but was overridden because another axis in its constraint group has fixedrange true"),v[F].fixedrange=!0}break}}for(E=0;E<w.length;){y=w[E];for(b in y){m=v[x(b)],m._matchGroup&&Object.keys(m._matchGroup).length===Object.keys(y).length&&(w.splice(E,1),E--);break}E++}L(w,"_constraintGroup");var B=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],O=!1,I=!1;function N(){P=m[h],h==="rangebreaks"&&(I=m._hasDayOfWeekBreaks)}for(E=0;E<S.length;E++){y=S[E];for(var U=0;U<B.length;U++){h=B[U],P=null;var W;for(b in y)if(p=x(b),u=g[p],m=v[p],h in m){if(!m.matches&&(W=m,h in u)){N();break}P===null&&h in u&&N()}if(h==="range"&&P&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(O=!0),h==="autorange"&&P===null&&O&&(P=!1),P===null&&h in W&&(P=W[h]),P!==null)for(b in y)m=v[x(b)],m[h]=h==="range"?P.slice():P,h==="rangebreaks"&&(m._hasDayOfWeekBreaks=I,e(m,v))}}};function o(g,v,T){var l=T.axIds,_=T.layoutOut,w=T.hasImage,S=_._axisConstraintGroups,E=_._axisMatchGroups,y=v._id,b=y.charAt(0),p=((_._splomAxes||{})[b]||{})[y]||{},u=v._id,m=u.charAt(0)==="x";v._matchGroup=null,v._constraintGroup=null;function h(G,$){return q.coerce(g,v,A,G,$)}h("constrain",w?"domain":"range"),q.coerce(g,v,{constraintoward:{valType:"enumerated",values:m?["left","center","right"]:["bottom","middle","top"],dflt:m?"center":"middle"}},"constraintoward");var P=v.type,L,z,F=[];for(L=0;L<l.length;L++)if(z=l[L],z!==u){var B=_[x(z)];B.type===P&&F.push(z)}var O=i(S,u);if(O){var I=[];for(L=0;L<F.length;L++)z=F[L],O[z]||I.push(z);F=I}var N=F.length,U,W;N&&(g.matches||p.matches)&&(U=q.coerce(g,v,{matches:{valType:"enumerated",values:F,dflt:F.indexOf(p.matches)!==-1?p.matches:void 0}},"matches"));var Q=w&&!m?v.anchor:void 0;if(N&&!U&&(g.scaleanchor||Q)&&(W=q.coerce(g,v,{scaleanchor:{valType:"enumerated",values:F.concat([!1])}},"scaleanchor",Q)),U){v._matchGroup=n(E,u,U,1);var ue=_[x(U)],le=a(_,v)/a(_,ue);m!==(U.charAt(0)==="x")&&(le=(m?"x":"y")+le),n(S,u,U,le)}else g.matches&&l.indexOf(g.matches)!==-1&&q.warn("ignored "+v._name+'.matches: "'+g.matches+'" to avoid an infinite loop');if(W){var he=h("scaleratio");he||(he=v.scaleratio=1),n(S,u,W,he)}else g.scaleanchor&&l.indexOf(g.scaleanchor)!==-1&&q.warn("ignored "+v._name+'.scaleanchor: "'+g.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function a(g,v){var T=v.domain;return T||(T=g[x(v.overlaying)].domain),T[1]-T[0]}function i(g,v){for(var T=0;T<g.length;T++)if(g[T][v])return g[T];return null}function n(g,v,T,l){var _,w,S,E,y,b=i(g,v);b===null?(b={},b[v]=1,y=g.length,g.push(b)):y=g.indexOf(b);var p=Object.keys(b);for(_=0;_<g.length;_++)if(S=g[_],_!==y&&S[T]){var u=S[T];for(w=0;w<p.length;w++)E=p[w],S[E]=s(u,s(l,b[E]));g.splice(y,1);return}if(l!==1)for(w=0;w<p.length;w++){var m=p[w];b[m]=s(l,b[m])}b[T]=1}function s(g,v){var T="",l="",_,w;typeof g=="string"&&(T=g.match(/^[xy]*/)[0],_=T.length,g=+g.substr(_)),typeof v=="string"&&(l=v.match(/^[xy]*/)[0],w=l.length,v=+v.substr(w));var S=g*v;return!_&&!w?S:!_||!w||T.charAt(0)===l.charAt(0)?T+l+g*v:_===w?S:(_>w?T.substr(w):l.substr(_))+S}function c(g,v){for(var T=v._size,l=T.h/T.w,_={},w=Object.keys(g),S=0;S<w.length;S++){var E=w[S],y=g[E];if(typeof y=="string"){var b=y.match(/^[xy]*/)[0],p=b.length;y=+y.substr(p);for(var u=b.charAt(0)==="y"?l:1/l,m=0;m<p;m++)y*=u}_[E]=y}return _}Z.enforce=function(v){var T=v._fullLayout,l=T._axisConstraintGroups||[],_,w,S,E,y,b,p,u;for(_=0;_<l.length;_++){S=c(l[_],T);var m=Object.keys(S),h=1/0,P=0,L=1/0,z={},F={},B=!1;for(w=0;w<m.length;w++)E=m[w],F[E]=y=T[x(E)],y._inputDomain?y.domain=y._inputDomain.slice():y._inputDomain=y.domain.slice(),y._inputRange||(y._inputRange=y.range.slice()),y.setScale(),z[E]=b=Math.abs(y._m)/S[E],h=Math.min(h,b),(y.constrain==="domain"||!y._constraintShrinkable)&&(L=Math.min(L,b)),delete y._constraintShrinkable,P=Math.max(P,b),y.constrain==="domain"&&(B=!0);if(!(h>t*P&&!B)){for(w=0;w<m.length;w++)if(E=m[w],b=z[E],y=F[E],p=y.constrain,b!==L||p==="domain")if(u=b/L,p==="range")M(y,u);else{var O=y._inputDomain,I=(y.domain[1]-y.domain[0])/(O[1]-O[0]),N=(y.r2l(y.range[1])-y.r2l(y.range[0]))/(y.r2l(y._inputRange[1])-y.r2l(y._inputRange[0]));if(u/=I,u*N<1){y.domain=y._input.domain=O.slice(),M(y,u);continue}if(N<1&&(y.range=y._input.range=y._inputRange.slice(),u*=N),y.autorange){var U=y.r2l(y.range[0]),W=y.r2l(y.range[1]),Q=(U+W)/2,ue=Q,le=Q,he=Math.abs(W-Q),G=Q-he*u*1.0001,$=Q+he*u*1.0001,J=d.makePadFn(T,y,0),X=d.makePadFn(T,y,1);f(y,u);var oe=Math.abs(y._m),ie=d.concatExtremes(v,y),j=ie.min,ee=ie.max,re,ce;for(ce=0;ce<j.length;ce++)re=j[ce].val-J(j[ce])/oe,re>G&&re<ue&&(ue=re);for(ce=0;ce<ee.length;ce++)re=ee[ce].val+X(ee[ce])/oe,re<$&&re>le&&(le=re);var be=(le-ue)/(2*he);u/=be,ue=y.l2r(ue),le=y.l2r(le),y.range=y._input.range=U<W?[ue,le]:[le,ue]}f(y,u)}}}},Z.getAxisGroup=function(v,T){for(var l=v._axisMatchGroups,_=0;_<l.length;_++){var w=l[_];if(w[T])return"g"+_}return T},Z.clean=function(v,T){if(T._inputDomain){for(var l=!1,_=T._id,w=v._fullLayout._axisConstraintGroups,S=0;S<w.length;S++)if(w[S][_]){l=!0;break}(!l||T.constrain!=="domain")&&(T._input.domain=T.domain=T._inputDomain,delete T._inputDomain)}};function f(g,v){var T=g._inputDomain,l=r[g.constraintoward],_=T[0]+(T[1]-T[0])*l;g.domain=g._input.domain=[_+(T[0]-_)/v,_+(T[1]-_)/v],g.setScale()}}}),L_=Ze({"src/plot_api/subroutines.js"(Z){"use strict";var q=On(),d=oo(),x=xc(),A=ca(),M=fu(),e=C_(),t=Yn(),r=as(),o=Z0(),a=S5(),i=Wo(),n=mh(),s=Y0(),c=s.enforce,f=s.clean,g=Yd().doAutoRange,v="start",T="middle",l="end",_=kh().zindexSeparator;Z.layoutStyles=function(O){return A.syncOrAsync([x.doAutoMargin,S],O)};function w(O,I,N){for(var U=0;U<N.length;U++){var W=N[U][0],Q=N[U][1];if(!(W[0]>=O[1]||W[1]<=O[0])&&Q[0]<I[1]&&Q[1]>I[0])return!0}return!1}function S(O){var I=O._fullLayout,N=I._size,U=N.p,W=i.list(O,"",!0),Q,ue,le,he,G,$;if(I._paperdiv.style({width:O._context.responsive&&I.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":I.width+"px",height:O._context.responsive&&I.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":I.height+"px"}).selectAll(".main-svg").call(r.setSize,I.width,I.height),O._context.setBackground(O,I.paper_bgcolor),Z.drawMainTitle(O),a.manage(O),!I._has("cartesian"))return x.previousPromises(O);function J(Ue,Me,qe){var Ce=Ue._lw/2;if(Ue._id.charAt(0)==="x"){if(Me){if(qe==="top")return Me._offset-U-Ce}else return N.t+N.h*(1-(Ue.position||0))+Ce%1;return Me._offset+Me._length+U+Ce}if(Me){if(qe==="right")return Me._offset+Me._length+U+Ce}else return N.l+N.w*(Ue.position||0)+Ce%1;return Me._offset-U-Ce}for(Q=0;Q<W.length;Q++){he=W[Q];var X=he._anchorAxis;he._linepositions={},he._lw=r.crispRound(O,he.linewidth,1),he._mainLinePosition=J(he,X,he.side),he._mainMirrorPosition=he.mirror&&X?J(he,X,n.OPPOSITE_SIDE[he.side]):null}var oe=[],ie=[],j=[],ee=t.opacity(I.paper_bgcolor)===1&&t.opacity(I.plot_bgcolor)===1&&I.paper_bgcolor===I.plot_bgcolor;for(ue in I._plots)if(le=I._plots[ue],le.mainplot)le.bg&&le.bg.remove(),le.bg=void 0;else{var re=le.xaxis.domain,ce=le.yaxis.domain,be=le.plotgroup;if(w(re,ce,j)&&ue.indexOf(_)===-1){var Ae=be.node(),ze=le.bg=A.ensureSingle(be,"rect","bg");Ae.insertBefore(ze.node(),Ae.childNodes[0]),ie.push(ue)}else be.select("rect.bg").remove(),j.push([re,ce]),ee||(oe.push(ue),ie.push(ue))}var Re=I._bgLayer.selectAll(".bg").data(oe);for(Re.enter().append("rect").classed("bg",!0),Re.exit().remove(),Re.each(function(Ue){I._plots[Ue].bg=q.select(this)}),Q=0;Q<ie.length;Q++)le=I._plots[ie[Q]],G=le.xaxis,$=le.yaxis,le.bg&&G._offset!==void 0&&$._offset!==void 0&&le.bg.call(r.setRect,G._offset-U,$._offset-U,G._length+2*U,$._length+2*U).call(t.fill,I.plot_bgcolor).style("stroke-width",0);if(!I._hasOnlyLargeSploms)for(ue in I._plots){le=I._plots[ue],G=le.xaxis,$=le.yaxis;var Xe=le.clipId="clip"+I._uid+ue+"plot",it=A.ensureSingleById(I._clips,"clipPath",Xe,function(Ue){Ue.classed("plotclip",!0).append("rect")});le.clipRect=it.select("rect").attr({width:G._length,height:$._length}),r.setTranslate(le.plot,G._offset,$._offset);var ot,tt;le._hasClipOnAxisFalse?(ot=null,tt=Xe):(ot=Xe,tt=null),r.setClipUrl(le.plot,ot,O),le.layerClipId=tt}var lt,Ee,_e,fe,Fe,rt,st,Qe,Lt,kt,Vt,Zt,Sr;function xr(Ue){return"M"+lt+","+Ue+"H"+Ee}function jr(Ue){return"M"+G._offset+","+Ue+"h"+G._length}function wr(Ue){return"M"+Ue+","+Qe+"V"+st}function Ir(Ue){return $._shift!==void 0&&(Ue+=$._shift),"M"+Ue+","+$._offset+"v"+$._length}function bt(Ue,Me,qe){if(!Ue.showline||ue!==Ue._mainSubplot)return"";if(!Ue._anchorAxis)return qe(Ue._mainLinePosition);var Ce=Me(Ue._mainLinePosition);return Ue.mirror&&(Ce+=Me(Ue._mainMirrorPosition)),Ce}for(ue in I._plots){le=I._plots[ue],G=le.xaxis,$=le.yaxis;var Be="M0,0";E(G,ue)&&(Fe=b(G,"left",$,W),lt=G._offset-(Fe?U+Fe:0),rt=b(G,"right",$,W),Ee=G._offset+G._length+(rt?U+rt:0),_e=J(G,$,"bottom"),fe=J(G,$,"top"),Sr=!G._anchorAxis||ue!==G._mainSubplot,Sr&&(G.mirror==="allticks"||G.mirror==="all")&&(G._linepositions[ue]=[_e,fe]),Be=bt(G,xr,jr),Sr&&G.showline&&(G.mirror==="all"||G.mirror==="allticks")&&(Be+=xr(_e)+xr(fe)),le.xlines.style("stroke-width",G._lw+"px").call(t.stroke,G.showline?G.linecolor:"rgba(0,0,0,0)")),le.xlines.attr("d",Be);var Ke="M0,0";E($,ue)&&(Vt=b($,"bottom",G,W),st=$._offset+$._length+(Vt?U:0),Zt=b($,"top",G,W),Qe=$._offset-(Zt?U:0),Lt=J($,G,"left"),kt=J($,G,"right"),Sr=!$._anchorAxis||ue!==$._mainSubplot,Sr&&($.mirror==="allticks"||$.mirror==="all")&&($._linepositions[ue]=[Lt,kt]),Ke=bt($,wr,Ir),Sr&&$.showline&&($.mirror==="all"||$.mirror==="allticks")&&(Ke+=wr(Lt)+wr(kt)),le.ylines.style("stroke-width",$._lw+"px").call(t.stroke,$.showline?$.linecolor:"rgba(0,0,0,0)")),le.ylines.attr("d",Ke)}return i.makeClipPaths(O),x.previousPromises(O)}function E(O,I){return(O.ticks||O.showline)&&(I===O._mainSubplot||O.mirror==="all"||O.mirror==="allticks")}function y(O,I,N){if(!N.showline||!N._lw)return!1;if(N.mirror==="all"||N.mirror==="allticks")return!0;var U=N._anchorAxis;if(!U)return!1;var W=n.FROM_BL[I];return N.side===I?U.domain[W]===O.domain[W]:N.mirror&&U.domain[1-W]===O.domain[1-W]}function b(O,I,N,U){if(y(O,I,N))return N._lw;for(var W=0;W<U.length;W++){var Q=U[W];if(Q._mainAxis===N._mainAxis&&y(O,I,Q))return Q._lw}return 0}Z.drawMainTitle=function(O){var I=O._fullLayout.title,N=O._fullLayout,U=F(N),W=B(N),Q=L(N,W),ue=P(N,U);if(o.draw(O,"gtitle",{propContainer:N,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:N._dfltTitle.plot,subtitlePlaceholder:N._dfltTitle.subtitle,attributes:{x:ue,y:Q,"text-anchor":U,dy:W}}),I.text&&I.automargin){var le=q.select(O).selectAll(".gtitle"),he=r.bBox(q.select(O).selectAll(".g-gtitle").node()).height,G=m(O,I,he);if(G>0){h(O,Q,G,he),le.attr({x:ue,y:Q,"text-anchor":U,dy:z(I.yanchor)}).call(M.positionText,ue,Q);var $=(I.text.match(M.BR_TAG_ALL)||[]).length;if($){var J=n.LINE_SPACING*$+n.MID_SHIFT;I.y===0&&(J=-J),le.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-J+"em";this.setAttribute("dy",ee)})}var X=q.select(O).selectAll(".gtitle-subtitle");if(X.node()){var oe=le.node().getBBox(),ie=oe.y+oe.height,j=ie+o.SUBTITLE_PADDING_EM*I.subtitle.font.size;X.attr({x:ue,y:j,"text-anchor":U,dy:z(I.yanchor)}).call(M.positionText,ue,j)}}}};function p(O,I,N,U,W){var Q=I.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,ue=A.isTopAnchor(I)?U:U-W,le=N==="b"?Q-ue:ue;return A.isTopAnchor(I)&&N==="t"||A.isBottomAnchor(I)&&N==="b"?!1:le<W}function u(O,I,N,U,W){var Q=0;return N==="middle"&&(Q+=W/2),O==="t"?(N==="top"&&(Q+=W),Q+=U-I*U):(N==="bottom"&&(Q+=W),Q+=I*U),Q}function m(O,I,N){var U=I.y,W=I.yanchor,Q=U>.5?"t":"b",ue=O._fullLayout.margin[Q],le=0;return I.yref==="paper"?le=N+I.pad.t+I.pad.b:I.yref==="container"&&(le=u(Q,U,W,O._fullLayout.height,N)+I.pad.t+I.pad.b),le>ue?le:0}function h(O,I,N,U){var W="title.automargin",Q=O._fullLayout.title,ue=Q.y>.5?"t":"b",le={x:Q.x,y:Q.y,t:0,b:0},he={};Q.yref==="paper"&&p(O,Q,ue,I,U)?le[ue]=N:Q.yref==="container"&&(he[ue]=N,O._fullLayout._reservedMargin[W]=he),x.allowAutoMargin(O,W),x.autoMargin(O,W,le)}function P(O,I){var N=O.title,U=O._size,W=0;switch(I===v?W=N.pad.l:I===l&&(W=-N.pad.r),N.xref){case"paper":return U.l+U.w*N.x+W;case"container":default:return O.width*N.x+W}}function L(O,I){var N=O.title,U=O._size,W=0;if(I==="0em"||!I?W=-N.pad.b:I===n.CAP_SHIFT+"em"&&(W=N.pad.t),N.y==="auto")return U.t/2;switch(N.yref){case"paper":return U.t+U.h-U.h*N.y+W;case"container":default:return O.height-O.height*N.y+W}}function z(O){return O==="top"?n.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":n.MID_SHIFT+"em"}function F(O){var I=O.title,N=T;return A.isRightAnchor(I)?N=l:A.isLeftAnchor(I)&&(N=v),N}function B(O){var I=O.title,N="0em";return A.isTopAnchor(I)?N=n.CAP_SHIFT+"em":A.isMiddleAnchor(I)&&(N=n.MID_SHIFT+"em"),N}Z.doTraceStyle=function(O){var I=O.calcdata,N=[],U;for(U=0;U<I.length;U++){var W=I[U],Q=W[0]||{},ue=Q.trace||{},le=ue._module||{},he=le.arraysToCalcdata;he&&he(W,ue);var G=le.editStyle;G&&N.push({fn:G,cd0:Q})}if(N.length){for(U=0;U<N.length;U++){var $=N[U];$.fn(O,$.cd0)}e(O),Z.redrawReglTraces(O)}return x.style(O),d.getComponentMethod("legend","draw")(O),x.previousPromises(O)},Z.doColorBars=function(O){return d.getComponentMethod("colorbar","draw")(O),x.previousPromises(O)},Z.layoutReplot=function(O){var I=O.layout;return O.layout=void 0,d.call("_doPlot",O,"",I)},Z.doLegend=function(O){return d.getComponentMethod("legend","draw")(O),x.previousPromises(O)},Z.doTicksRelayout=function(O){return i.draw(O,"redraw"),O._fullLayout._hasOnlyLargeSploms&&(d.subplotsRegistry.splom.updateGrid(O),e(O),Z.redrawReglTraces(O)),Z.drawMainTitle(O),x.previousPromises(O)},Z.doModeBar=function(O){var I=O._fullLayout;a.manage(O);for(var N=0;N<I._basePlotModules.length;N++){var U=I._basePlotModules[N].updateFx;U&&U(O)}return x.previousPromises(O)},Z.doCamera=function(O){for(var I=O._fullLayout,N=I._subplots.gl3d,U=0;U<N.length;U++){var W=I[N[U]],Q=W._scene;Q.setViewport(W)}},Z.drawData=function(O){var I=O._fullLayout;e(O);for(var N=I._basePlotModules,U=0;U<N.length;U++)N[U].plot(O);return Z.redrawReglTraces(O),x.style(O),d.getComponentMethod("selections","draw")(O),d.getComponentMethod("shapes","draw")(O),d.getComponentMethod("annotations","draw")(O),d.getComponentMethod("images","draw")(O),I._replotting=!1,x.previousPromises(O)},Z.redrawReglTraces=function(O){var I=O._fullLayout;if(I._has("regl")){var N=O._fullData,U=[],W=[],Q,ue;for(I._hasOnlyLargeSploms&&I._splomGrid.draw(),Q=0;Q<N.length;Q++){var le=N[Q];le.visible===!0&&le._length!==0&&(le.type==="splom"?I._splomScenes[le.uid].draw():le.type==="scattergl"?A.pushUnique(U,le.xaxis+le.yaxis):le.type==="scatterpolargl"&&A.pushUnique(W,le.subplot))}for(Q=0;Q<U.length;Q++)ue=I._plots[U[Q]],ue._scene&&ue._scene.draw();for(Q=0;Q<W.length;Q++)ue=I[W[Q]]._subplot,ue._scene&&ue._scene.draw()}},Z.doAutoRangeAndConstraints=function(O){for(var I=i.list(O,"",!0),N,U={},W=0;W<I.length;W++)if(N=I[W],!U[N._id]){U[N._id]=1,f(O,N),g(O,N);var Q=N._matchGroup;if(Q)for(var ue in Q){var le=i.getFromId(O,ue);g(O,le,N.range),U[ue]=1}}c(O)},Z.finalDraw=function(O){d.getComponentMethod("rangeslider","draw")(O),d.getComponentMethod("rangeselector","draw")(O)},Z.drawMarginPushers=function(O){d.getComponentMethod("legend","draw")(O),d.getComponentMethod("rangeselector","draw")(O),d.getComponentMethod("sliders","draw")(O),d.getComponentMethod("updatemenus","draw")(O),d.getComponentMethod("colorbar","draw")(O)}}}),E5=Ze({"src/components/selections/draw.js"(Z,q){"use strict";var d=t0().readPaths,x=M2(),A=Jm().clearOutlineControllers,M=Yn(),e=as(),t=Dl().arrayEditor,r=r0(),o=r.getPathString;q.exports={draw:a,drawOne:n,activateLastSelection:f};function a(v){var T=v._fullLayout;A(v),T._selectionLayer.selectAll("path").remove();for(var l in T._plots){var _=T._plots[l].selectionLayer;_&&_.selectAll("path").remove()}for(var w=0;w<T.selections.length;w++)n(v,w)}function i(v){return v._context.editSelection}function n(v,T){v._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+T+'"]').remove();var l=r.makeSelectionsOptionsAndPlotinfo(v,T),_=l.options,w=l.plotinfo;if(!_._input)return;S(v._fullLayout._selectionLayer);function S(E){var y=o(v,_),b={"data-index":T,"fill-rule":"evenodd",d:y},p=_.opacity,u="rgba(0,0,0,0)",m=_.line.color||M.contrast(v._fullLayout.plot_bgcolor),h=_.line.width,P=_.line.dash;h||(h=5,P="solid");var L=i(v)&&v._fullLayout._activeSelectionIndex===T;L&&(u=v._fullLayout.activeselection.fillcolor,p=v._fullLayout.activeselection.opacity);for(var z=[],F=1;F>=0;F--){var B=E.append("path").attr(b).style("opacity",F?.1:p).call(M.stroke,m).call(M.fill,u).call(e.dashLine,F?"solid":P,F?4+h:h);if(s(B,v,_),L){var O=t(v.layout,"selections",_);B.style({cursor:"move"});var I={element:B.node(),plotinfo:w,gd:v,editHelpers:O,isActiveSelection:!0},N=d(y,v);x(N,B,I)}else B.style("pointer-events",F?"all":"none");z[F]=B}var U=z[0],W=z[1];W.node().addEventListener("click",function(){return c(v,U)})}}function s(v,T,l){var _=l.xref+l.yref;e.setClipUrl(v,"clip"+T._fullLayout._uid+_,T)}function c(v,T){if(i(v)){var l=T.node(),_=+l.getAttribute("data-index");if(_>=0){if(_===v._fullLayout._activeSelectionIndex){g(v);return}v._fullLayout._activeSelectionIndex=_,v._fullLayout._deactivateSelection=g,a(v)}}}function f(v){if(i(v)){var T=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=T,v._fullLayout._deactivateSelection=g,a(v)}}function g(v){if(i(v)){var T=v._fullLayout._activeSelectionIndex;T>=0&&(A(v),delete v._fullLayout._activeSelectionIndex,a(v))}}}}),Tz=Ze({"node_modules/polybooljs/lib/build-log.js"(Z,q){function d(){var x,A=0,M=!1;function e(t,r){return x.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),x}return x={list:[],segmentId:function(){return A++},checkIntersection:function(t,r){return e("check",{seg1:t,seg2:r})},segmentChop:function(t,r){return e("div_seg",{seg:t,pt:r}),e("chop",{seg:t,pt:r})},statusRemove:function(t){return e("pop_seg",{seg:t})},segmentUpdate:function(t){return e("seg_update",{seg:t})},segmentNew:function(t,r){return e("new_seg",{seg:t,primary:r})},segmentRemove:function(t){return e("rem_seg",{seg:t})},tempStatus:function(t,r,o){return e("temp_status",{seg:t,above:r,below:o})},rewind:function(t){return e("rewind",{seg:t})},status:function(t,r,o){return e("status",{seg:t,above:r,below:o})},vert:function(t){return t===M?x:(M=t,e("vert",{x:t}))},log:function(t){return typeof t!="string"&&(t=JSON.stringify(t,!1," ")),e("log",{txt:t})},reset:function(){return e("reset")},selected:function(t){return e("selected",{segs:t})},chainStart:function(t){return e("chain_start",{seg:t})},chainRemoveHead:function(t,r){return e("chain_rem_head",{index:t,pt:r})},chainRemoveTail:function(t,r){return e("chain_rem_tail",{index:t,pt:r})},chainNew:function(t,r){return e("chain_new",{pt1:t,pt2:r})},chainMatch:function(t){return e("chain_match",{index:t})},chainClose:function(t){return e("chain_close",{index:t})},chainAddHead:function(t,r){return e("chain_add_head",{index:t,pt:r})},chainAddTail:function(t,r){return e("chain_add_tail",{index:t,pt:r})},chainConnect:function(t,r){return e("chain_con",{index1:t,index2:r})},chainReverse:function(t){return e("chain_rev",{index:t})},chainJoin:function(t,r){return e("chain_join",{index1:t,index2:r})},done:function(){return e("done")}},x}q.exports=d}}),Az=Ze({"node_modules/polybooljs/lib/epsilon.js"(Z,q){function d(x){typeof x!="number"&&(x=1e-10);var A={epsilon:function(M){return typeof M=="number"&&(x=M),x},pointAboveOrOnLine:function(M,e,t){var r=e[0],o=e[1],a=t[0],i=t[1],n=M[0],s=M[1];return(a-r)*(s-o)-(i-o)*(n-r)>=-x},pointBetween:function(M,e,t){var r=M[1]-e[1],o=t[0]-e[0],a=M[0]-e[0],i=t[1]-e[1],n=a*o+r*i;if(n<x)return!1;var s=o*o+i*i;return!(n-s>-x)},pointsSameX:function(M,e){return Math.abs(M[0]-e[0])<x},pointsSameY:function(M,e){return Math.abs(M[1]-e[1])<x},pointsSame:function(M,e){return A.pointsSameX(M,e)&&A.pointsSameY(M,e)},pointsCompare:function(M,e){return A.pointsSameX(M,e)?A.pointsSameY(M,e)?0:M[1]<e[1]?-1:1:M[0]<e[0]?-1:1},pointsCollinear:function(M,e,t){var r=M[0]-e[0],o=M[1]-e[1],a=e[0]-t[0],i=e[1]-t[1];return Math.abs(r*i-a*o)<x},linesIntersect:function(M,e,t,r){var o=e[0]-M[0],a=e[1]-M[1],i=r[0]-t[0],n=r[1]-t[1],s=o*n-a*i;if(Math.abs(s)<x)return!1;var c=M[0]-t[0],f=M[1]-t[1],g=(i*f-n*c)/s,v=(o*f-a*c)/s,T={alongA:0,alongB:0,pt:[M[0]+g*o,M[1]+g*a]};return g<=-x?T.alongA=-2:g<x?T.alongA=-1:g-1<=-x?T.alongA=0:g-1<x?T.alongA=1:T.alongA=2,v<=-x?T.alongB=-2:v<x?T.alongB=-1:v-1<=-x?T.alongB=0:v-1<x?T.alongB=1:T.alongB=2,T},pointInsideRegion:function(M,e){for(var t=M[0],r=M[1],o=e[e.length-1][0],a=e[e.length-1][1],i=!1,n=0;n<e.length;n++){var s=e[n][0],c=e[n][1];c-r>x!=a-r>x&&(o-s)*(r-c)/(a-c)+s-t>x&&(i=!i),o=s,a=c}return i}};return A}q.exports=d}}),Sz=Ze({"node_modules/polybooljs/lib/linked-list.js"(Z,q){var d={create:function(){var x={root:{root:!0,next:null},exists:function(A){return!(A===null||A===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(A,M){for(var e=x.root,t=x.root.next;t!==null;){if(M(t)){A.prev=t.prev,A.next=t,t.prev.next=A,t.prev=A;return}e=t,t=t.next}e.next=A,A.prev=e,A.next=null},findTransition:function(A){for(var M=x.root,e=x.root.next;e!==null&&!A(e);)M=e,e=e.next;return{before:M===x.root?null:M,after:e,insert:function(t){return t.prev=M,t.next=e,M.next=t,e!==null&&(e.prev=t),t}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};q.exports=d}}),Mz=Ze({"node_modules/polybooljs/lib/intersecter.js"(Z,q){var d=Sz();function x(A,M,e){function t(T,l){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:null,below:null},otherFill:null}}function r(T,l,_){return{id:e?e.segmentId():-1,start:T,end:l,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var o=d.create();function a(T,l,_,w,S,E){var y=M.pointsCompare(l,S);return y!==0?y:M.pointsSame(_,E)?0:T!==w?T?1:-1:M.pointAboveOrOnLine(_,w?S:E,w?E:S)?1:-1}function i(T,l){o.insertBefore(T,function(_){var w=a(T.isStart,T.pt,l,_.isStart,_.pt,_.other.pt);return w<0})}function n(T,l){var _=d.node({isStart:!0,pt:T.start,seg:T,primary:l,other:null,status:null});return i(_,T.end),_}function s(T,l,_){var w=d.node({isStart:!1,pt:l.end,seg:l,primary:_,other:T,status:null});T.other=w,i(w,T.pt)}function c(T,l){var _=n(T,l);return s(_,T,l),_}function f(T,l){e&&e.segmentChop(T.seg,l),T.other.remove(),T.seg.end=l,T.other.pt=l,i(T.other,T.pt)}function g(T,l){var _=r(l,T.seg.end,T.seg);return f(T,l),c(_,T.primary)}function v(T,l){var _=d.create();function w(O,I){var N=O.seg.start,U=O.seg.end,W=I.seg.start,Q=I.seg.end;return M.pointsCollinear(N,W,Q)?M.pointsCollinear(U,W,Q)||M.pointAboveOrOnLine(U,W,Q)?1:-1:M.pointAboveOrOnLine(N,W,Q)?1:-1}function S(O){return _.findTransition(function(I){var N=w(O,I.ev);return N>0})}function E(O,I){var N=O.seg,U=I.seg,W=N.start,Q=N.end,ue=U.start,le=U.end;e&&e.checkIntersection(N,U);var he=M.linesIntersect(W,Q,ue,le);if(he===!1){if(!M.pointsCollinear(W,Q,ue)||M.pointsSame(W,le)||M.pointsSame(Q,ue))return!1;var G=M.pointsSame(W,ue),$=M.pointsSame(Q,le);if(G&&$)return I;var J=!G&&M.pointBetween(W,ue,le),X=!$&&M.pointBetween(Q,ue,le);if(G)return X?g(I,Q):g(O,le),I;J&&($||(X?g(I,Q):g(O,le)),g(I,W))}else he.alongA===0&&(he.alongB===-1?g(O,ue):he.alongB===0?g(O,he.pt):he.alongB===1&&g(O,le)),he.alongB===0&&(he.alongA===-1?g(I,W):he.alongA===0?g(I,he.pt):he.alongA===1&&g(I,Q));return!1}for(var y=[];!o.isEmpty();){var b=o.getHead();if(e&&e.vert(b.pt[0]),b.isStart){let O=function(){if(m){var I=E(b,m);if(I)return I}return h?E(b,h):!1};var p=O;e&&e.segmentNew(b.seg,b.primary);var u=S(b),m=u.before?u.before.ev:null,h=u.after?u.after.ev:null;e&&e.tempStatus(b.seg,m?m.seg:!1,h?h.seg:!1);var P=O();if(P){if(A){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,L&&(P.seg.myFill.above=!P.seg.myFill.above)}else P.seg.otherFill=b.seg.myFill;e&&e.segmentUpdate(P.seg),b.other.remove(),b.remove()}if(o.getHead()!==b){e&&e.rewind(b.seg);continue}if(A){var L;b.seg.myFill.below===null?L=!0:L=b.seg.myFill.above!==b.seg.myFill.below,h?b.seg.myFill.below=h.seg.myFill.above:b.seg.myFill.below=T,L?b.seg.myFill.above=!b.seg.myFill.below:b.seg.myFill.above=b.seg.myFill.below}else if(b.seg.otherFill===null){var z;h?b.primary===h.primary?z=h.seg.otherFill.above:z=h.seg.myFill.above:z=b.primary?l:T,b.seg.otherFill={above:z,below:z}}e&&e.status(b.seg,m?m.seg:!1,h?h.seg:!1),b.other.status=u.insert(d.node({ev:b}))}else{var F=b.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(F.prev)&&_.exists(F.next)&&E(F.prev.ev,F.next.ev),e&&e.statusRemove(F.ev.seg),F.remove(),!b.primary){var B=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=B}y.push(b.seg)}o.getHead().remove()}return e&&e.done(),y}return A?{addRegion:function(T){for(var l,_=T[T.length-1],w=0;w<T.length;w++){l=_,_=T[w];var S=M.pointsCompare(l,_);S!==0&&c(t(S<0?l:_,S<0?_:l),!0)}},calculate:function(T){return v(T,!1)}}:{calculate:function(T,l,_,w){return T.forEach(function(S){c(r(S.start,S.end,S),!0)}),_.forEach(function(S){c(r(S.start,S.end,S),!1)}),v(l,w)}}}q.exports=x}}),Ez=Ze({"node_modules/polybooljs/lib/segment-chainer.js"(Z,q){function d(x,A,M){var e=[],t=[];return x.forEach(function(r){var o=r.start,a=r.end;if(A.pointsSame(o,a)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}M&&M.chainStart(r);var i={index:0,matches_head:!1,matches_pt1:!1},n={index:0,matches_head:!1,matches_pt1:!1},s=i;function c(F,B,O){return s.index=F,s.matches_head=B,s.matches_pt1=O,s===i?(s=n,!1):(s=null,!0)}for(var f=0;f<e.length;f++){var g=e[f],v=g[0],T=g[1],l=g[g.length-1],_=g[g.length-2];if(A.pointsSame(v,o)){if(c(f,!0,!0))break}else if(A.pointsSame(v,a)){if(c(f,!0,!1))break}else if(A.pointsSame(l,o)){if(c(f,!1,!0))break}else if(A.pointsSame(l,a)&&c(f,!1,!1))break}if(s===i){e.push([o,a]),M&&M.chainNew(o,a);return}if(s===n){M&&M.chainMatch(i.index);var w=i.index,S=i.matches_pt1?a:o,E=i.matches_head,g=e[w],y=E?g[0]:g[g.length-1],b=E?g[1]:g[g.length-2],p=E?g[g.length-1]:g[0],u=E?g[g.length-2]:g[1];if(A.pointsCollinear(b,y,S)&&(E?(M&&M.chainRemoveHead(i.index,S),g.shift()):(M&&M.chainRemoveTail(i.index,S),g.pop()),y=b),A.pointsSame(p,S)){e.splice(w,1),A.pointsCollinear(u,p,y)&&(E?(M&&M.chainRemoveTail(i.index,y),g.pop()):(M&&M.chainRemoveHead(i.index,y),g.shift())),M&&M.chainClose(i.index),t.push(g);return}E?(M&&M.chainAddHead(i.index,S),g.unshift(S)):(M&&M.chainAddTail(i.index,S),g.push(S));return}function m(F){M&&M.chainReverse(F),e[F].reverse()}function h(F,B){var O=e[F],I=e[B],N=O[O.length-1],U=O[O.length-2],W=I[0],Q=I[1];A.pointsCollinear(U,N,W)&&(M&&M.chainRemoveTail(F,N),O.pop(),N=U),A.pointsCollinear(N,W,Q)&&(M&&M.chainRemoveHead(B,W),I.shift()),M&&M.chainJoin(F,B),e[F]=O.concat(I),e.splice(B,1)}var P=i.index,L=n.index;M&&M.chainConnect(P,L);var z=e[P].length<e[L].length;i.matches_head?n.matches_head?z?(m(P),h(P,L)):(m(L),h(L,P)):h(L,P):n.matches_head?h(P,L):z?(m(P),h(L,P)):(m(L),h(P,L))}),t}q.exports=d}}),Cz=Ze({"node_modules/polybooljs/lib/segment-selector.js"(Z,q){function d(A,M,e){var t=[];return A.forEach(function(r){var o=(r.myFill.above?8:0)+(r.myFill.below?4:0)+(r.otherFill&&r.otherFill.above?2:0)+(r.otherFill&&r.otherFill.below?1:0);M[o]!==0&&t.push({id:e?e.segmentId():-1,start:r.start,end:r.end,myFill:{above:M[o]===1,below:M[o]===2},otherFill:null})}),e&&e.selected(t),t}var x={union:function(A,M){return d(A,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],M)},intersect:function(A,M){return d(A,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],M)},difference:function(A,M){return d(A,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],M)},differenceRev:function(A,M){return d(A,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],M)},xor:function(A,M){return d(A,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],M)}};q.exports=x}}),kz=Ze({"node_modules/polybooljs/lib/geojson.js"(Z,q){var d={toPolygon:function(x,A){function M(r){if(r.length<=0)return x.segments({inverted:!1,regions:[]});function o(n){var s=n.slice(0,n.length-1);return x.segments({inverted:!1,regions:[s]})}for(var a=o(r[0]),i=1;i<r.length;i++)a=x.selectDifference(x.combine(a,o(r[i])));return a}if(A.type==="Polygon")return x.polygon(M(A.coordinates));if(A.type==="MultiPolygon"){for(var e=x.segments({inverted:!1,regions:[]}),t=0;t<A.coordinates.length;t++)e=x.selectUnion(x.combine(e,M(A.coordinates[t])));return x.polygon(e)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(x,A,M){M=x.polygon(x.segments(M));function e(g,v){return A.pointInsideRegion([(g[0][0]+g[1][0])*.5,(g[0][1]+g[1][1])*.5],v)}function t(g){return{region:g,children:[]}}var r=t(null);function o(g,v){for(var T=0;T<g.children.length;T++){var l=g.children[T];if(e(v,l.region)){o(l,v);return}}for(var _=t(v),T=0;T<g.children.length;T++){var l=g.children[T];e(l.region,v)&&(_.children.push(l),g.children.splice(T,1),T--)}g.children.push(_)}for(var a=0;a<M.regions.length;a++){var i=M.regions[a];i.length<3||o(r,i)}function n(g,v){for(var T=0,l=g[g.length-1][0],_=g[g.length-1][1],w=[],S=0;S<g.length;S++){var E=g[S][0],y=g[S][1];w.push([E,y]),T+=y*l-E*_,l=E,_=y}var b=T<0;return b!==v&&w.reverse(),w.push([w[0][0],w[0][1]]),w}var s=[];function c(g){var v=[n(g.region,!1)];s.push(v);for(var T=0;T<g.children.length;T++)v.push(f(g.children[T]))}function f(g){for(var v=0;v<g.children.length;v++)c(g.children[v]);return n(g.region,!0)}for(var a=0;a<r.children.length;a++)c(r.children[a]);return s.length<=0?{type:"Polygon",coordinates:[]}:s.length==1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s}}};q.exports=d}}),Lz=Ze({"node_modules/polybooljs/index.js"(Z,q){var d=Tz(),x=Az(),A=Mz(),M=Ez(),e=Cz(),t=kz(),r=!1,o=x(),a;a={buildLog:function(n){return n===!0?r=d():n===!1&&(r=!1),r===!1?!1:r.list},epsilon:function(n){return o.epsilon(n)},segments:function(n){var s=A(!0,o,r);return n.regions.forEach(s.addRegion),{segments:s.calculate(n.inverted),inverted:n.inverted}},combine:function(n,s){var c=A(!1,o,r);return{combined:c.calculate(n.segments,n.inverted,s.segments,s.inverted),inverted1:n.inverted,inverted2:s.inverted}},selectUnion:function(n){return{segments:e.union(n.combined,r),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:e.intersect(n.combined,r),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:e.difference(n.combined,r),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:e.differenceRev(n.combined,r),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:e.xor(n.combined,r),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:M(n.segments,o,r),inverted:n.inverted}},polygonFromGeoJSON:function(n){return t.toPolygon(a,n)},polygonToGeoJSON:function(n){return t.fromPolygon(a,o,n)},union:function(n,s){return i(n,s,a.selectUnion)},intersect:function(n,s){return i(n,s,a.selectIntersect)},difference:function(n,s){return i(n,s,a.selectDifference)},differenceRev:function(n,s){return i(n,s,a.selectDifferenceRev)},xor:function(n,s){return i(n,s,a.selectXor)}};function i(n,s,c){var f=a.segments(n),g=a.segments(s),v=a.combine(f,g),T=c(v);return a.polygon(T)}typeof window=="object"&&(window.PolyBool=a),q.exports=a}}),Pz=Ze({"node_modules/point-in-polygon/nested.js"(Z,q){q.exports=function(x,A,M,e){var t=x[0],r=x[1],o=!1;M===void 0&&(M=0),e===void 0&&(e=A.length);for(var a=e-M,i=0,n=a-1;i<a;n=i++){var s=A[i+M][0],c=A[i+M][1],f=A[n+M][0],g=A[n+M][1],v=c>r!=g>r&&t<(f-s)*(r-c)/(g-c)+s;v&&(o=!o)}return o}}}),P_=Ze({"src/lib/polygon.js"(Z,q){"use strict";var d=p2().dot,x=qs().BADNUM,A=q.exports={};A.tester=function(e){var t=e.slice(),r=t[0][0],o=r,a=t[0][1],i=a,n;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),n=1;n<t.length;n++)r=Math.min(r,t[n][0]),o=Math.max(o,t[n][0]),a=Math.min(a,t[n][1]),i=Math.max(i,t[n][1]);var s=!1,c;t.length===5&&(t[0][0]===t[1][0]?t[2][0]===t[3][0]&&t[0][1]===t[3][1]&&t[1][1]===t[2][1]&&(s=!0,c=function(l){return l[0]===t[0][0]}):t[0][1]===t[1][1]&&t[2][1]===t[3][1]&&t[0][0]===t[3][0]&&t[1][0]===t[2][0]&&(s=!0,c=function(l){return l[1]===t[0][1]}));function f(l,_){var w=l[0],S=l[1];return!(w===x||w<r||w>o||S===x||S<a||S>i||_&&c(l))}function g(l,_){var w=l[0],S=l[1];if(w===x||w<r||w>o||S===x||S<a||S>i)return!1;var E=t.length,y=t[0][0],b=t[0][1],p=0,u,m,h,P,L;for(u=1;u<E;u++)if(m=y,h=b,y=t[u][0],b=t[u][1],P=Math.min(m,y),!(w<P||w>Math.max(m,y)||S>Math.max(h,b)))if(S<Math.min(h,b))w!==P&&p++;else{if(y===m?L=S:L=h+(w-m)*(b-h)/(y-m),S===L)return!(u===1&&_);S<=L&&w!==P&&p++}return p%2===1}var v=!0,T=t[0];for(n=1;n<t.length;n++)if(T[0]!==t[n][0]||T[1]!==t[n][1]){v=!1;break}return{xmin:r,xmax:o,ymin:a,ymax:i,pts:t,contains:s?f:g,isRect:s,degenerate:v}},A.isSegmentBent=function(e,t,r,o){var a=e[t],i=[e[r][0]-a[0],e[r][1]-a[1]],n=d(i,i),s=Math.sqrt(n),c=[-i[1]/s,i[0]/s],f,g,v;for(f=t+1;f<r;f++)if(g=[e[f][0]-a[0],e[f][1]-a[1]],v=d(g,i),v<0||v>n||Math.abs(d(g,c))>o)return!0;return!1},A.filter=function(e,t){var r=[e[0]],o=0,a=0;function i(s){e.push(s);var c=r.length,f=o;r.splice(a+1);for(var g=f+1;g<e.length;g++)(g===e.length-1||A.isSegmentBent(e,f,g+1,t))&&(r.push(e[g]),r.length<c-2&&(o=g,a=r.length-1),f=g)}if(e.length>1){var n=e.pop();i(n)}return{addPt:i,raw:e,filtered:r}}}}),Iz=Ze({"src/components/selections/constants.js"(Z,q){"use strict";q.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),Rz=Ze({"src/components/selections/select.js"(Z,q){"use strict";var d=Lz(),x=Pz(),A=oo(),M=as().dashStyle,e=Yn(),t=ef(),r=Qp().makeEventData,o=Jd(),a=o.freeMode,i=o.rectMode,n=o.drawMode,s=o.openMode,c=o.selectMode,f=r0(),g=k_(),v=M2(),T=Jm().clearOutline,l=t0(),_=l.handleEllipse,w=l.readPaths,S=S2().newShapes,E=x5(),y=E5().activateLastSelection,b=ca(),p=b.sorterAsc,u=P_(),m=g2(),h=$c().getFromId,P=C_(),L=L_().redrawReglTraces,z=Iz(),F=z.MINSELECT,B=u.filter,O=u.tester,I=A2(),N=I.p2r,U=I.axValue,W=I.getTransform;function Q(Be){return Be.subplot!==void 0}function ue(Be,Ke,Ue,Me,qe){var Ce=!Q(Me),Te=a(qe),Pe=i(qe),at=s(qe),yt=n(qe),Tt=c(qe),Ot=qe==="drawline",Gt=qe==="drawcircle",rr=Ot||Gt,Qt=Me.gd,Tr=Qt._fullLayout,la=Tt&&Tr.newselection.mode==="immediate"&&Ce,Ua=Tr._zoomlayer,Ba=Me.element.getBoundingClientRect(),Ra=Me.plotinfo,ei=W(Ra),za=Ke-Ba.left,ti=Ue-Ba.top;Tr._calcInverseTransform(Qt);var Ci=b.apply3DTransform(Tr._invTransform)(za,ti);za=Ci[0],ti=Ci[1];var Jt=Tr._invScaleX,Nt=Tr._invScaleY,Kt=za,Wt=ti,Pr="M"+za+","+ti,ta=Me.xaxes[0],ma=Me.yaxes[0],ra=ta._length,Ia=ma._length,Ha=Be.altKey&&!(n(qe)&&at),$a,ai,mi,xt,ct,Nr,Or;X(Be,Qt,Me),Te&&($a=B([[za,ti]],z.BENDPX));var Rr=Ua.selectAll("path.select-outline-"+Ra.id).data([1]),Lr=yt?Tr.newshape:Tr.newselection;yt&&(Me.hasText=Lr.label.text||Lr.label.texttemplate);var Gr=yt&&!at?Lr.fillcolor:"rgba(0,0,0,0)",Kr=Lr.line.color||(Ce?e.contrast(Qt._fullLayout.plot_bgcolor):"#7f7f7f");Rr.enter().append("path").attr("class","select-outline select-outline-"+Ra.id).style({opacity:yt?Lr.opacity/2:1,"stroke-dasharray":M(Lr.line.dash,Lr.line.width),"stroke-width":Lr.line.width+"px","shape-rendering":"crispEdges"}).call(e.stroke,Kr).call(e.fill,Gr).attr("fill-rule","evenodd").classed("cursor-move",!!yt).attr("transform",ei).attr("d",Pr+"Z");var Ur=Ua.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1}).attr("transform",ei).attr("d","M0,0Z");if(yt&&Me.hasText){var aa=Ua.select(".label-temp");aa.empty()&&(aa=Ua.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var da=Tr._uid+z.SELECTID,fa=[],It=re(Qt,Me.xaxes,Me.yaxes,Me.subplot);la&&!Be.shiftKey&&(Me._clearSubplotSelections=function(){if(Ce){var kr=ta._id,ia=ma._id;st(Qt,kr,ia,It);for(var Ca=(Qt.layout||{}).selections||[],Fa=[],Ya=!1,ha=0;ha<Ca.length;ha++){var Da=Tr.selections[ha];!Da||Da.xref!==kr||Da.yref!==ia?Fa.push(Ca[ha]):Ya=!0}Ya&&(Qt._fullLayout._noEmitSelectedAtStart=!0,A.call("_guiRelayout",Qt,{selections:Fa}))}});var dr=jr(Me);Me.moveFn=function(kr,ia){Me._clearSubplotSelections&&(Me._clearSubplotSelections(),Me._clearSubplotSelections=void 0),Kt=Math.max(0,Math.min(ra,Jt*kr+za)),Wt=Math.max(0,Math.min(Ia,Nt*ia+ti));var Ca=Math.abs(Kt-za),Fa=Math.abs(Wt-ti);if(Pe){var Ya,ha,Da;if(Tt){var Xi=Tr.selectdirection;switch(Xi==="any"?Fa<Math.min(Ca*.6,F)?Ya="h":Ca<Math.min(Fa*.6,F)?Ya="v":Ya="d":Ya=Xi,Ya){case"h":ha=Gt?Ia/2:0,Da=Ia;break;case"v":ha=Gt?ra/2:0,Da=ra;break}}if(yt)switch(Tr.newshape.drawdirection){case"vertical":Ya="h",ha=Gt?Ia/2:0,Da=Ia;break;case"horizontal":Ya="v",ha=Gt?ra/2:0,Da=ra;break;case"ortho":Ca<Fa?(Ya="h",ha=ti,Da=Wt):(Ya="v",ha=za,Da=Kt);break;default:Ya="d"}Ya==="h"?(xt=rr?_(Gt,[Kt,ha],[Kt,Da]):[[za,ha],[za,Da],[Kt,Da],[Kt,ha]],xt.xmin=rr?Kt:Math.min(za,Kt),xt.xmax=rr?Kt:Math.max(za,Kt),xt.ymin=Math.min(ha,Da),xt.ymax=Math.max(ha,Da),Ur.attr("d","M"+xt.xmin+","+(ti-F)+"h-4v"+2*F+"h4ZM"+(xt.xmax-1)+","+(ti-F)+"h4v"+2*F+"h-4Z")):Ya==="v"?(xt=rr?_(Gt,[ha,Wt],[Da,Wt]):[[ha,ti],[ha,Wt],[Da,Wt],[Da,ti]],xt.xmin=Math.min(ha,Da),xt.xmax=Math.max(ha,Da),xt.ymin=rr?Wt:Math.min(ti,Wt),xt.ymax=rr?Wt:Math.max(ti,Wt),Ur.attr("d","M"+(za-F)+","+xt.ymin+"v-4h"+2*F+"v4ZM"+(za-F)+","+(xt.ymax-1)+"v4h"+2*F+"v-4Z")):Ya==="d"&&(xt=rr?_(Gt,[za,ti],[Kt,Wt]):[[za,ti],[za,Wt],[Kt,Wt],[Kt,ti]],xt.xmin=Math.min(za,Kt),xt.xmax=Math.max(za,Kt),xt.ymin=Math.min(ti,Wt),xt.ymax=Math.max(ti,Wt),Ur.attr("d","M0,0Z"))}else Te&&($a.addPt([Kt,Wt]),xt=$a.filtered);if(Me.selectionDefs&&Me.selectionDefs.length?(mi=tt(Me.mergedPolygons,xt,Ha),xt.subtract=Ha,ai=J(Me.selectionDefs.concat([xt]))):(mi=[xt],ai=O(xt)),v(Ee(mi,at),Rr,Me),Tt){var Li=fe(Qt,!1),fn=Li.eventData?Li.eventData.points.slice():[];Li=fe(Qt,!1,ai,It,Me),ai=Li.selectionTesters,Or=Li.eventData;var An;$a?An=$a.filtered:An=Zt(mi),m.throttle(da,z.SELECTDELAY,function(){fa=_e(ai,It);for(var kn=fa.slice(),zn=0;zn<fn.length;zn++){for(var Xn=fn[zn],to=!1,mo=0;mo<kn.length;mo++)if(kn[mo].curveNumber===Xn.curveNumber&&kn[mo].pointNumber===Xn.pointNumber){to=!0;break}to||kn.push(Xn)}kn.length&&(Or||(Or={}),Or.points=kn),dr(Or,An),wr(Qt,Or)})}},Me.clickFn=function(kr,ia){if(Ur.remove(),Qt._fullLayout._activeShapeIndex>=0){Qt._fullLayout._deactivateShape(Qt);return}if(!yt){var Ca=Tr.clickmode;m.done(da).then(function(){if(m.clear(da),kr===2){for(Rr.remove(),ct=0;ct<It.length;ct++)Nr=It[ct],Nr._module.selectPoints(Nr,!1);if(it(Qt,It),j(Me),bt(Qt),It.length){var Fa=It[0].xaxis,Ya=It[0].yaxis;if(Fa&&Ya){for(var ha=[],Da=Qt._fullLayout.selections,Xi=0;Xi<Da.length;Xi++){var Li=Da[Xi];Li&&(Li.xref!==Fa._id||Li.yref!==Ya._id)&&ha.push(Li)}ha.length<Da.length&&(Qt._fullLayout._noEmitSelectedAtStart=!0,A.call("_guiRelayout",Qt,{selections:ha}))}}}else Ca.indexOf("select")>-1&&le(ia,Qt,Me.xaxes,Me.yaxes,Me.subplot,Me,Rr),Ca==="event"&&Ir(Qt,void 0);t.click(Qt,ia,Ra.id)}).catch(b.error)}},Me.doneFn=function(){Ur.remove(),m.done(da).then(function(){m.clear(da),!la&&xt&&Me.selectionDefs&&(xt.subtract=Ha,Me.selectionDefs.push(xt),Me.mergedPolygons.length=0,[].push.apply(Me.mergedPolygons,mi)),(la||yt)&&j(Me,la),Me.doneFnCompleted&&Me.doneFnCompleted(fa),Tt&&Ir(Qt,Or)}).catch(b.error)}}function le(Be,Ke,Ue,Me,qe,Ce,Te){var Pe=Ke._hoverdata,at=Ke._fullLayout,yt=at.clickmode,Tt=yt.indexOf("event")>-1,Ot=[],Gt,rr,Qt,Tr,la,Ua,Ba,Ra,ei,za;if(be(Pe)){X(Be,Ke,Ce),Gt=re(Ke,Ue,Me,qe);var ti=Ae(Pe,Gt),Ci=ti.pointNumbers.length>0;if(Ci?Re(Gt,ti):Xe(Gt)&&(Ba=ze(ti))){for(Te&&Te.remove(),za=0;za<Gt.length;za++)rr=Gt[za],rr._module.selectPoints(rr,!1);it(Ke,Gt),j(Ce),Tt&&bt(Ke)}else{Ra=Be.shiftKey&&(Ba!==void 0?Ba:ze(ti)),Qt=he(ti.pointNumber,ti.searchInfo,Ra);var Jt=Ce.selectionDefs.concat([Qt]);for(Tr=J(Jt,Tr),za=0;za<Gt.length;za++)if(la=Gt[za]._module.selectPoints(Gt[za],Tr),Ua=lt(la,Gt[za]),Ot.length)for(var Nt=0;Nt<Ua.length;Nt++)Ot.push(Ua[Nt]);else Ot=Ua;if(ei={points:Ot},it(Ke,Gt,ei),Qt&&Ce&&Ce.selectionDefs.push(Qt),Te){var Kt=Ce.mergedPolygons,Wt=s(Ce.dragmode);v(Ee(Kt,Wt),Te,Ce)}Tt&&Ir(Ke,ei)}}}function he(Be,Ke,Ue){return{pointNumber:Be,searchInfo:Ke,subtract:!!Ue}}function G(Be){return"pointNumber"in Be&&"searchInfo"in Be}function $(Be){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Ke,Ue,Me,qe){var Ce=Be.searchInfo.cd[0].trace.index,Te=qe.cd[0].trace.index;return Te===Ce&&Me===Be.pointNumber},isRect:!1,degenerate:!1,subtract:!!Be.subtract}}function J(Be){if(!Be.length)return;for(var Ke=[],Ue=G(Be[0])?0:Be[0][0][0],Me=Ue,qe=G(Be[0])?0:Be[0][0][1],Ce=qe,Te=0;Te<Be.length;Te++)if(G(Be[Te]))Ke.push($(Be[Te]));else{var Pe=O(Be[Te]);Pe.subtract=!!Be[Te].subtract,Ke.push(Pe),Ue=Math.min(Ue,Pe.xmin),Me=Math.max(Me,Pe.xmax),qe=Math.min(qe,Pe.ymin),Ce=Math.max(Ce,Pe.ymax)}function at(yt,Tt,Ot,Gt){for(var rr=!1,Qt=0;Qt<Ke.length;Qt++)Ke[Qt].contains(yt,Tt,Ot,Gt)&&(rr=!Ke[Qt].subtract);return rr}return{xmin:Ue,xmax:Me,ymin:qe,ymax:Ce,pts:[],contains:at,isRect:!1,degenerate:!1}}function X(Be,Ke,Ue){var Me=Ke._fullLayout,qe=Ue.plotinfo,Ce=Ue.dragmode,Te=Me._lastSelectedSubplot&&Me._lastSelectedSubplot===qe.id,Pe=(Be.shiftKey||Be.altKey)&&!(n(Ce)&&s(Ce));Te&&Pe&&qe.selection&&qe.selection.selectionDefs&&!Ue.selectionDefs?(Ue.selectionDefs=qe.selection.selectionDefs,Ue.mergedPolygons=qe.selection.mergedPolygons):(!Pe||!qe.selection)&&j(Ue),Te||(T(Ke),Me._lastSelectedSubplot=qe.id)}function oe(Be){return Be._fullLayout._activeShapeIndex>=0}function ie(Be){return Be._fullLayout._activeSelectionIndex>=0}function j(Be,Ke){var Ue=Be.dragmode,Me=Be.plotinfo,qe=Be.gd;oe(qe)&&qe._fullLayout._deactivateShape(qe),ie(qe)&&qe._fullLayout._deactivateSelection(qe);var Ce=qe._fullLayout,Te=Ce._zoomlayer,Pe=n(Ue),at=c(Ue);if(Pe||at){var yt=Te.selectAll(".select-outline-"+Me.id);if(yt&&qe._fullLayout._outlining){var Tt;Pe&&(Tt=S(yt,Be)),Tt&&A.call("_guiRelayout",qe,{shapes:Tt});var Ot;at&&!Q(Be)&&(Ot=E(yt,Be)),Ot&&(qe._fullLayout._noEmitSelectedAtStart=!0,A.call("_guiRelayout",qe,{selections:Ot}).then(function(){Ke&&y(qe)})),qe._fullLayout._outlining=!1}}Me.selection={},Me.selection.selectionDefs=Be.selectionDefs=[],Me.selection.mergedPolygons=Be.mergedPolygons=[]}function ee(Be){return Be._id}function re(Be,Ke,Ue,Me){if(!Be.calcdata)return[];var qe=[],Ce=Ke.map(ee),Te=Ue.map(ee),Pe,at,yt;for(yt=0;yt<Be.calcdata.length;yt++)if(Pe=Be.calcdata[yt],at=Pe[0].trace,!(at.visible!==!0||!at._module||!at._module.selectPoints))if(Q({subplot:Me})&&(at.subplot===Me||at.geo===Me))qe.push(ce(at._module,Pe,Ke[0],Ue[0]));else if(at.type==="splom"){if(at._xaxes[Ce[0]]&&at._yaxes[Te[0]]){var Tt=ce(at._module,Pe,Ke[0],Ue[0]);Tt.scene=Be._fullLayout._splomScenes[at.uid],qe.push(Tt)}}else if(at.type==="sankey"){var Ot=ce(at._module,Pe,Ke[0],Ue[0]);qe.push(Ot)}else{if(Ce.indexOf(at.xaxis)===-1&&(!at._xA||!at._xA.overlaying)||Te.indexOf(at.yaxis)===-1&&(!at._yA||!at._yA.overlaying))continue;qe.push(ce(at._module,Pe,h(Be,at.xaxis),h(Be,at.yaxis)))}return qe}function ce(Be,Ke,Ue,Me){return{_module:Be,cd:Ke,xaxis:Ue,yaxis:Me}}function be(Be){return Be&&Array.isArray(Be)&&Be[0].hoverOnBox!==!0}function Ae(Be,Ke){var Ue=Be[0],Me=-1,qe=[],Ce,Te;for(Te=0;Te<Ke.length;Te++)if(Ce=Ke[Te],Ue.fullData.index===Ce.cd[0].trace.index){if(Ue.hoverOnBox===!0)break;Ue.pointNumber!==void 0?Me=Ue.pointNumber:Ue.binNumber!==void 0&&(Me=Ue.binNumber,qe=Ue.pointNumbers);break}return{pointNumber:Me,pointNumbers:qe,searchInfo:Ce}}function ze(Be){var Ke=Be.searchInfo.cd[0].trace,Ue=Be.pointNumber,Me=Be.pointNumbers,qe=Me.length>0,Ce=qe?Me[0]:Ue;return Ke.selectedpoints?Ke.selectedpoints.indexOf(Ce)>-1:!1}function Re(Be,Ke){var Ue=[],Me,qe,Ce,Te;for(Te=0;Te<Be.length;Te++)Me=Be[Te],Me.cd[0].trace.selectedpoints&&Me.cd[0].trace.selectedpoints.length>0&&Ue.push(Me);if(Ue.length===1&&(Ce=Ue[0]===Ke.searchInfo,Ce&&(qe=Ke.searchInfo.cd[0].trace,qe.selectedpoints.length===Ke.pointNumbers.length))){for(Te=0;Te<Ke.pointNumbers.length;Te++)if(qe.selectedpoints.indexOf(Ke.pointNumbers[Te])<0)return!1;return!0}return!1}function Xe(Be){var Ke=0,Ue,Me,qe;for(qe=0;qe<Be.length;qe++)if(Ue=Be[qe],Me=Ue.cd[0].trace,Me.selectedpoints&&(Me.selectedpoints.length>1||(Ke+=Me.selectedpoints.length,Ke>1)))return!1;return Ke===1}function it(Be,Ke,Ue){var Me;for(Me=0;Me<Ke.length;Me++){var qe=Ke[Me].cd[0].trace._fullInput,Ce=Be._fullLayout._tracePreGUI[qe.uid]||{};Ce.selectedpoints===void 0&&(Ce.selectedpoints=qe._input.selectedpoints||null)}var Te;if(Ue){var Pe=Ue.points||[];for(Me=0;Me<Ke.length;Me++)Te=Ke[Me].cd[0].trace,Te._input.selectedpoints=Te._fullInput.selectedpoints=[],Te._fullInput!==Te&&(Te.selectedpoints=[]);for(var at=0;at<Pe.length;at++){var yt=Pe[at],Tt=yt.data,Ot=yt.fullData,Gt=yt.pointIndex,rr=yt.pointIndices;rr?([].push.apply(Tt.selectedpoints,rr),Te._fullInput!==Te&&[].push.apply(Ot.selectedpoints,rr)):(Tt.selectedpoints.push(Gt),Te._fullInput!==Te&&Ot.selectedpoints.push(Gt))}}else for(Me=0;Me<Ke.length;Me++)Te=Ke[Me].cd[0].trace,delete Te.selectedpoints,delete Te._input.selectedpoints,Te._fullInput!==Te&&delete Te._fullInput.selectedpoints;ot(Be,Ke)}function ot(Be,Ke){for(var Ue=!1,Me=0;Me<Ke.length;Me++){var qe=Ke[Me],Ce=qe.cd;A.traceIs(Ce[0].trace,"regl")&&(Ue=!0);var Te=qe._module,Pe=Te.styleOnSelect||Te.style;Pe&&(Pe(Be,Ce,Ce[0].node3),Ce[0].nodeRangePlot3&&Pe(Be,Ce,Ce[0].nodeRangePlot3))}Ue&&(P(Be),L(Be))}function tt(Be,Ke,Ue){for(var Me=Ue?d.difference:d.union,qe=Me({regions:Be},{regions:[Ke]}),Ce=qe.regions.reverse(),Te=0;Te<Ce.length;Te++){var Pe=Ce[Te];Pe.subtract=kt(Pe,Ce.slice(0,Te))}return Ce}function lt(Be,Ke){if(Array.isArray(Be))for(var Ue=Ke.cd,Me=Ke.cd[0].trace,qe=0;qe<Be.length;qe++)Be[qe]=r(Be[qe],Me,Ue);return Be}function Ee(Be,Ke){for(var Ue=[],Me=0;Me<Be.length;Me++){Ue[Me]=[];for(var qe=0;qe<Be[Me].length;qe++){Ue[Me][qe]=[],Ue[Me][qe][0]=qe?"L":"M";for(var Ce=0;Ce<Be[Me][qe].length;Ce++)Ue[Me][qe].push(Be[Me][qe][Ce])}Ke||Ue[Me].push(["Z",Ue[Me][0][1],Ue[Me][0][2]])}return Ue}function _e(Be,Ke){for(var Ue=[],Me,qe=[],Ce,Te=0;Te<Ke.length;Te++){var Pe=Ke[Te];Ce=Pe._module.selectPoints(Pe,Be),qe.push(Ce),Me=lt(Ce,Pe),Ue=Ue.concat(Me)}return Ue}function fe(Be,Ke,Ue,Me,qe){var Ce=!!Me,Te,Pe,at;qe&&(Te=qe.plotinfo,Pe=qe.xaxes[0]._id,at=qe.yaxes[0]._id);var yt=[],Tt=[],Ot=Lt(Be),Gt=Be._fullLayout;if(Te){var rr=Gt._zoomlayer,Qt=Gt.dragmode,Tr=n(Qt),la=c(Qt);if(Tr||la){var Ua=h(Be,Pe,"x"),Ba=h(Be,at,"y");if(Ua&&Ba){var Ra=rr.selectAll(".select-outline-"+Te.id);if(Ra&&Be._fullLayout._outlining&&Ra.length){for(var ei=Ra[0][0],za=ei.getAttribute("d"),ti=w(za,Be,Te),Ci=[],Jt=0;Jt<ti.length;Jt++){for(var Nt=ti[Jt],Kt=[],Wt=0;Wt<Nt.length;Wt++)Kt.push([Vt(Ua,Nt[Wt][1]),Vt(Ba,Nt[Wt][2])]);Kt.xref=Pe,Kt.yref=at,Kt.subtract=kt(Kt,Ci),Ci.push(Kt)}Ot=Ot.concat(Ci)}}}}var Pr=Pe&&at?[Pe+at]:Gt._subplots.cartesian;Fe(Be);for(var ta={},ma=0;ma<Pr.length;ma++){var ra=Pr[ma],Ia=ra.indexOf("y"),Ha=ra.slice(0,Ia),$a=ra.slice(Ia),ai=Pe&&at?Ue:void 0;if(ai=Qe(Ot,Ha,$a,ai),ai){var mi=Me;if(!Ce){var xt=h(Be,Ha,"x"),ct=h(Be,$a,"y");mi=re(Be,[xt],[ct],ra);for(var Nr=0;Nr<mi.length;Nr++){var Or=mi[Nr],Rr=Or.cd[0],Lr=Rr.trace;if(Or._module.name==="scattergl"&&!Rr.t.xpx){var Gr=Lr.x,Kr=Lr.y,Ur=Lr._length;Rr.t.xpx=[],Rr.t.ypx=[];for(var aa=0;aa<Ur;aa++)Rr.t.xpx[aa]=xt.c2p(Gr[aa]),Rr.t.ypx[aa]=ct.c2p(Kr[aa])}Or._module.name==="splom"&&(ta[Lr.uid]||(ta[Lr.uid]=!0))}}var da=_e(ai,mi);yt=yt.concat(da),Tt=Tt.concat(mi)}}var fa={points:yt};it(Be,Tt,fa);var It=Gt.clickmode,dr=It.indexOf("event")>-1&&Ke;if(!Te&&Ke){var kr=Lt(Be,!0);if(kr.length){var ia=kr[0].xref,Ca=kr[0].yref;if(ia&&Ca){var Fa=Zt(kr),Ya=xr([h(Be,ia,"x"),h(Be,Ca,"y")]);Ya(fa,Fa)}}Be._fullLayout._noEmitSelectedAtStart?Be._fullLayout._noEmitSelectedAtStart=!1:dr&&Ir(Be,fa),Gt._reselect=!1}if(!Te&&Gt._deselect){var ha=Gt._deselect;Pe=ha.xref,at=ha.yref,rt(Pe,at,Tt)||st(Be,Pe,at,Me),dr&&(fa.points.length?Ir(Be,fa):bt(Be)),Gt._deselect=!1}return{eventData:fa,selectionTesters:Ue}}function Fe(Be){var Ke=Be.calcdata;if(Ke)for(var Ue=0;Ue<Ke.length;Ue++){var Me=Ke[Ue][0],qe=Me.trace,Ce=Be._fullLayout._splomScenes;if(Ce){var Te=Ce[qe.uid];Te&&(Te.selectBatch=[])}}}function rt(Be,Ke,Ue){for(var Me=0;Me<Ue.length;Me++){var qe=Ue[Me];if(qe.xaxis&&qe.xaxis._id===Be&&qe.yaxis&&qe.yaxis._id===Ke)return!0}return!1}function st(Be,Ke,Ue,Me){Me=re(Be,[h(Be,Ke,"x")],[h(Be,Ue,"y")],Ke+Ue);for(var qe=0;qe<Me.length;qe++){var Ce=Me[qe];Ce._module.selectPoints(Ce,!1)}it(Be,Me)}function Qe(Be,Ke,Ue,Me){for(var qe,Ce=0;Ce<Be.length;Ce++){var Te=Be[Ce];if(!(Ke!==Te.xref||Ue!==Te.yref))if(qe){var Pe=!!Te.subtract;qe=tt(qe,Te,Pe),Me=J(qe)}else qe=[Te],Me=O(Te)}return Me}function Lt(Be,Ke){for(var Ue=[],Me=Be._fullLayout,qe=Me.selections,Ce=qe.length,Te=0;Te<Ce;Te++)if(!(Ke&&Te!==Me._activeSelectionIndex)){var Pe=qe[Te];if(Pe){var at=Pe.xref,yt=Pe.yref,Tt=h(Be,at,"x"),Ot=h(Be,yt,"y"),Gt,rr,Qt,Tr,la;if(Pe.type==="rect"){la=[];var Ua=Vt(Tt,Pe.x0),Ba=Vt(Tt,Pe.x1),Ra=Vt(Ot,Pe.y0),ei=Vt(Ot,Pe.y1);la=[[Ua,Ra],[Ua,ei],[Ba,ei],[Ba,Ra]],Gt=Math.min(Ua,Ba),rr=Math.max(Ua,Ba),Qt=Math.min(Ra,ei),Tr=Math.max(Ra,ei),la.xmin=Gt,la.xmax=rr,la.ymin=Qt,la.ymax=Tr,la.xref=at,la.yref=yt,la.subtract=!1,la.isRect=!0,Ue.push(la)}else if(Pe.type==="path")for(var za=Pe.path.split("Z"),ti=[],Ci=0;Ci<za.length;Ci++){var Jt=za[Ci];if(Jt){Jt+="Z";var Nt=f.extractPathCoords(Jt,g.paramIsX,"raw"),Kt=f.extractPathCoords(Jt,g.paramIsY,"raw");Gt=1/0,rr=-1/0,Qt=1/0,Tr=-1/0,la=[];for(var Wt=0;Wt<Nt.length;Wt++){var Pr=Vt(Tt,Nt[Wt]),ta=Vt(Ot,Kt[Wt]);la.push([Pr,ta]),Gt=Math.min(Pr,Gt),rr=Math.max(Pr,rr),Qt=Math.min(ta,Qt),Tr=Math.max(ta,Tr)}la.xmin=Gt,la.xmax=rr,la.ymin=Qt,la.ymax=Tr,la.xref=at,la.yref=yt,la.subtract=kt(la,ti),ti.push(la),Ue.push(la)}}}}return Ue}function kt(Be,Ke){for(var Ue=!1,Me=0;Me<Ke.length;Me++)for(var qe=Ke[Me],Ce=0;Ce<Be.length;Ce++)if(x(Be[Ce],qe)){Ue=!Ue;break}return Ue}function Vt(Be,Ke){return Be.type==="date"&&(Ke=Ke.replace("_"," ")),Be.type==="log"?Be.c2p(Ke):Be.r2p(Ke,null,Be.calendar)}function Zt(Be){for(var Ke=Be.length,Ue=[],Me=0;Me<Ke;Me++){var qe=Be[Me];Ue=Ue.concat(qe),Ue=Ue.concat([qe[0]])}return Sr(Ue)}function Sr(Be){return Be.isRect=Be.length===5&&Be[0][0]===Be[4][0]&&Be[0][1]===Be[4][1]&&Be[0][0]===Be[1][0]&&Be[2][0]===Be[3][0]&&Be[0][1]===Be[3][1]&&Be[1][1]===Be[2][1]||Be[0][1]===Be[1][1]&&Be[2][1]===Be[3][1]&&Be[0][0]===Be[3][0]&&Be[1][0]===Be[2][0],Be.isRect&&(Be.xmin=Math.min(Be[0][0],Be[2][0]),Be.xmax=Math.max(Be[0][0],Be[2][0]),Be.ymin=Math.min(Be[0][1],Be[2][1]),Be.ymax=Math.max(Be[0][1],Be[2][1])),Be}function xr(Be){return function(Ke,Ue){for(var Me,qe,Ce=0;Ce<Be.length;Ce++){var Te=Be[Ce],Pe=Te._id,at=Pe.charAt(0);if(Ue.isRect){Me||(Me={});var yt=Ue[at+"min"],Tt=Ue[at+"max"];yt!==void 0&&Tt!==void 0&&(Me[Pe]=[N(Te,yt),N(Te,Tt)].sort(p))}else qe||(qe={}),qe[Pe]=Ue.map(U(Te))}Me&&(Ke.range=Me),qe&&(Ke.lassoPoints=qe)}}function jr(Be){var Ke=Be.plotinfo;return Ke.fillRangeItems||xr(Be.xaxes.concat(Be.yaxes))}function wr(Be,Ke){Be.emit("plotly_selecting",Ke)}function Ir(Be,Ke){Ke&&(Ke.selections=(Be.layout||{}).selections||[]),Be.emit("plotly_selected",Ke)}function bt(Be){Be.emit("plotly_deselect",null)}q.exports={reselect:fe,prepSelect:ue,clearOutline:T,clearSelectionsCache:j,selectOnClick:le}}}),C5=Ze({"src/components/annotations/arrow_paths.js"(Z,q){"use strict";q.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}]}}),I_=Ze({"src/constants/axis_placeable_objects.js"(Z,q){"use strict";q.exports={axisRefDescription:function(d,x,A){return["If set to a",d,"axis id (e.g. *"+d+"* or","*"+d+"2*), the `"+d+"` position refers to a",d,"coordinate. If set to *paper*, the `"+d+"`","position refers to the distance from the",x,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",x,"("+A+"). If set to a",d,"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",x,"of the domain of that axis: e.g.,","*"+d+"2 domain* refers to the domain of the second",d," axis and a",d,"position of 0.5 refers to the","point between the",x,"and the",A,"of the domain of the","second",d,"axis."].join(" ")}}}}),K0=Ze({"src/components/annotations/attributes.js"(Z,q){"use strict";var d=C5(),x=tc(),A=kh(),M=Dl().templatedArray,e=I_();q.exports=M("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:x({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:d.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:d.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",A.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",A.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",A.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",A.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:x({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),Tv=Ze({"src/traces/scatter/constants.js"(Z,q){"use strict";q.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),$d=Ze({"src/traces/scatter/fillcolor_attribute.js"(Z,q){"use strict";q.exports=function(x){return{valType:"color",editType:"style",anim:!0}}}}),tf=Ze({"src/traces/scatter/attributes.js"(Z,q){"use strict";var d=Qc().axisHoverFormat,x=Cs().texttemplateAttrs,A=Cs().hovertemplateAttrs,M=Mu(),e=tc(),t=Gh().dash,r=Gh().pattern,o=as(),a=Tv(),i=rs().extendFlat,n=$d();function s(g){return{valType:"any",dflt:0,editType:"calc"}}function c(g){return{valType:"any",editType:"calc"}}function f(g){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}q.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:s("x"),yperiod:s("y"),xperiod0:c("x0"),yperiod0:c("y0"),xperiodalignment:f("x"),yperiodalignment:f("y"),xhoverformat:d("x"),yhoverformat:d("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:x({},{}),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:A({},{keys:a.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i({},t,{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:n(!0),fillgradient:i({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:r,marker:i({symbol:{valType:"enumerated",values:o.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:i({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},M("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"},M("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:e({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),k5=Ze({"src/components/selections/attributes.js"(Z,q){"use strict";var d=K0(),x=tf().line,A=Gh().dash,M=rs().extendFlat,e=pc().overrideAll,t=Dl().templatedArray,r=I_();q.exports=e(t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:M({},d.xref,{}),yref:M({},d.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:x.color,width:M({},x.width,{min:1,dflt:1}),dash:M({},A,{dflt:"dot"})}}),"arraydraw","from-root")}}),Dz=Ze({"src/components/selections/defaults.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=fp(),M=k5(),e=r0();q.exports=function(o,a){A(o,a,{name:"selections",handleItemDefaults:t});for(var i=a.selections,n=0;n<i.length;n++){var s=i[n];s&&s.path===void 0&&(s.x0===void 0||s.x1===void 0||s.y0===void 0||s.y1===void 0)&&(a.selections[n]=null)}};function t(r,o,a){function i(P,L){return d.coerce(r,o,M,P,L)}var n=i("path"),s=n?"path":"rect",c=i("type",s),f=c!=="path";f&&delete o.path,i("opacity"),i("line.color"),i("line.width"),i("line.dash");for(var g=["x","y"],v=0;v<2;v++){var T=g[v],l={_fullLayout:a},_,w,S,E=x.coerceRef(r,o,l,T);if(_=x.getFromId(l,E),_._selectionIndices.push(o._index),S=e.rangeToShapePosition(_),w=e.shapePositionToRange(_),f){var y=T+"0",b=T+"1",p=r[y],u=r[b];r[y]=w(r[y],!0),r[b]=w(r[b],!0),x.coercePosition(o,l,i,E,y),x.coercePosition(o,l,i,E,b);var m=o[y],h=o[b];m!==void 0&&h!==void 0&&(o[y]=S(m),o[b]=S(h),r[y]=p,r[b]=u)}}f&&d.noneOrAll(r,o,["x0","x1","y0","y1"])}}}),zz=Ze({"src/components/selections/draw_newselection/defaults.js"(Z,q){"use strict";q.exports=function(x,A,M){M("newselection.mode");var e=M("newselection.line.width");e&&(M("newselection.line.color"),M("newselection.line.dash")),M("activeselection.fillcolor"),M("activeselection.opacity")}}}),R_=Ze({"src/plots/cartesian/include_components.js"(Z,q){"use strict";var d=oo(),x=ca(),A=$c();q.exports=function(e){return function(r,o){var a=r[e];if(Array.isArray(a))for(var i=d.subplotsRegistry.cartesian,n=i.idRegex,s=o._subplots,c=s.xaxis,f=s.yaxis,g=s.cartesian,v=o._has("cartesian"),T=0;T<a.length;T++){var l=a[T];if(x.isPlainObject(l)){var _=A.cleanId(l.xref,"x",!1),w=A.cleanId(l.yref,"y",!1),S=n.x.test(_),E=n.y.test(w);if(S||E){v||x.pushUnique(o._basePlotModules,i);var y=!1;S&&c.indexOf(_)===-1&&(c.push(_),y=!0),E&&f.indexOf(w)===-1&&(f.push(w),y=!0),y&&S&&E&&g.push(_+w)}}}}}}}),Tf=Ze({"src/components/selections/index.js"(Z,q){"use strict";var d=E5(),x=Rz();q.exports={moduleType:"component",name:"selections",layoutAttributes:k5(),supplyLayoutDefaults:Dz(),supplyDrawNewSelectionDefaults:zz(),includeBasePlot:R_()("selections"),draw:d.draw,drawOne:d.drawOne,reselect:x.reselect,prepSelect:x.prepSelect,clearOutline:x.clearOutline,clearSelectionsCache:x.clearSelectionsCache,selectOnClick:x.selectOnClick}}}),L5=Ze({"src/plots/cartesian/dragbox.js"(Z,q){"use strict";var d=On(),x=ca(),A=x.numberFormat,M=Ch(),e=x2(),t=oo(),r=x.strTranslate,o=fu(),a=Yn(),i=as(),n=ef(),s=Wo(),c=Kd(),f=Tp(),g=Jd(),v=g.selectingOrDrawing,T=g.freeMode,l=mh().FROM_TL,_=C_(),w=L_().redrawReglTraces,S=xc(),E=$c().getFromId,y=Tf().prepSelect,b=Tf().clearOutline,p=Tf().selectOnClick,u=M5(),m=kh(),h=m.MINDRAG,P=m.MINZOOM,L=!0;function z(ce,be,Ae,ze,Re,Xe,it,ot){var tt=ce._fullLayout._zoomlayer,lt=it+ot==="nsew",Ee=(it+ot).length===1,_e,fe,Fe,rt,st,Qe,Lt,kt,Vt,Zt,Sr,xr,jr,wr,Ir,bt,Be,Ke,Ue,Me,qe,Ce,Te;Ae+=be.yaxis._shift;function Pe(){if(_e=be.xaxis,fe=be.yaxis,Vt=_e._length,Zt=fe._length,Lt=_e._offset,kt=fe._offset,Fe={},Fe[_e._id]=_e,rt={},rt[fe._id]=fe,it&&ot)for(var Rr=be.overlays,Lr=0;Lr<Rr.length;Lr++){var Gr=Rr[Lr].xaxis;Fe[Gr._id]=Gr;var Kr=Rr[Lr].yaxis;rt[Kr._id]=Kr}st=re(Fe),Qe=re(rt),jr=O(st,ot),wr=O(Qe,it),Ir=!wr&&!jr,xr=j(ce,ce._fullLayout._axisMatchGroups,Fe,rt),Sr=j(ce,ce._fullLayout._axisConstraintGroups,Fe,rt,xr);var Ur=Sr.isSubplotConstrained||xr.isSubplotConstrained;bt=ot||Ur,Be=it||Ur;var aa=ce._fullLayout;Ke=aa._has("scattergl"),Ue=aa._has("splom"),Me=aa._has("svg")}Pe();var at=Q(wr+jr,ce._fullLayout.dragmode,lt),yt=B(be,it+ot+"drag",at,Ae,ze,Re,Xe);if(Ir&&!lt)return yt.onmousedown=null,yt.style.pointerEvents="none",yt;var Tt={element:yt,gd:ce,plotinfo:be};Tt.prepFn=function(Rr,Lr,Gr){var Kr=Tt.dragmode,Ur=ce._fullLayout.dragmode;Ur!==Kr&&(Tt.dragmode=Ur),Pe(),Ce=ce._fullLayout._invScaleX,Te=ce._fullLayout._invScaleY,Ir||(lt?Rr.shiftKey?Ur==="pan"?Ur="zoom":v(Ur)||(Ur="pan"):Rr.ctrlKey&&(Ur="pan"):Ur="pan"),T(Ur)?Tt.minDrag=1:Tt.minDrag=void 0,v(Ur)?(Tt.xaxes=st,Tt.yaxes=Qe,y(Rr,Lr,Gr,Tt,Ur)):(Tt.clickFn=Gt,v(Kr)&&Ot(),Ir||(Ur==="zoom"?(Tt.moveFn=Jt,Tt.doneFn=Kt,Tt.minDrag=1,Ci(Rr,Lr,Gr)):Ur==="pan"&&(Tt.moveFn=Ia,Tt.doneFn=mi))),ce._fullLayout._redrag=function(){var aa=ce._dragdata;if(aa&&aa.element===yt){var da=ce._fullLayout.dragmode;v(da)||(Pe(),xt([0,0,Vt,Zt]),Tt.moveFn(aa.dx,aa.dy))}}};function Ot(){Tt.plotinfo.selection=!1,b(ce)}function Gt(Rr,Lr){var Gr=Tt.gd;if(Gr._fullLayout._activeShapeIndex>=0){Gr._fullLayout._deactivateShape(Gr);return}var Kr=Gr._fullLayout.clickmode;if($(Gr),Rr===2&&!Ee&&ai(),lt)Kr.indexOf("select")>-1&&p(Lr,Gr,st,Qe,be.id,Tt),Kr.indexOf("event")>-1&&n.click(Gr,Lr,be.id);else if(Rr===1&&Ee){var Ur=it?fe:_e,aa=it==="s"||ot==="w"?0:1,da=Ur._name+".range["+aa+"]",fa=I(Ur,aa),It="left",dr="middle";if(Ur.fixedrange)return;it?(dr=it==="n"?"top":"bottom",Ur.side==="right"&&(It="right")):ot==="e"&&(It="right"),Gr._context.showAxisRangeEntryBoxes&&d.select(yt).call(o.makeEditable,{gd:Gr,immediate:!0,background:Gr._fullLayout.paper_bgcolor,text:String(fa),fill:Ur.tickfont?Ur.tickfont.color:"#444",horizontalAlign:It,verticalAlign:dr}).on("edit",function(kr){var ia=Ur.d2r(kr);ia!==void 0&&t.call("_guiRelayout",Gr,da,ia)})}}f.init(Tt);var rr,Qt,Tr,la,Ua,Ba,Ra,ei,za,ti;function Ci(Rr,Lr,Gr){var Kr=yt.getBoundingClientRect();rr=Lr-Kr.left,Qt=Gr-Kr.top,ce._fullLayout._calcInverseTransform(ce);var Ur=x.apply3DTransform(ce._fullLayout._invTransform)(rr,Qt);rr=Ur[0],Qt=Ur[1],Tr={l:rr,r:rr,w:0,t:Qt,b:Qt,h:0},la=ce._hmpixcount?ce._hmlumcount/ce._hmpixcount:M(ce._fullLayout.plot_bgcolor).getLuminance(),Ua="M0,0H"+Vt+"V"+Zt+"H0V0",Ba=!1,Ra="xy",ti=!1,ei=ue(tt,la,Lt,kt,Ua),za=le(tt,Lt,kt)}function Jt(Rr,Lr){if(ce._transitioningWithDuration)return!1;var Gr=Math.max(0,Math.min(Vt,Ce*Rr+rr)),Kr=Math.max(0,Math.min(Zt,Te*Lr+Qt)),Ur=Math.abs(Gr-rr),aa=Math.abs(Kr-Qt);Tr.l=Math.min(rr,Gr),Tr.r=Math.max(rr,Gr),Tr.t=Math.min(Qt,Kr),Tr.b=Math.max(Qt,Kr);function da(){Ra="",Tr.r=Tr.l,Tr.t=Tr.b,za.attr("d","M0,0Z")}if(Sr.isSubplotConstrained)Ur>P||aa>P?(Ra="xy",Ur/Vt>aa/Zt?(aa=Ur*Zt/Vt,Qt>Kr?Tr.t=Qt-aa:Tr.b=Qt+aa):(Ur=aa*Vt/Zt,rr>Gr?Tr.l=rr-Ur:Tr.r=rr+Ur),za.attr("d",ie(Tr))):da();else if(xr.isSubplotConstrained)if(Ur>P||aa>P){Ra="xy";var fa=Math.min(Tr.l/Vt,(Zt-Tr.b)/Zt),It=Math.max(Tr.r/Vt,(Zt-Tr.t)/Zt);Tr.l=fa*Vt,Tr.r=It*Vt,Tr.b=(1-fa)*Zt,Tr.t=(1-It)*Zt,za.attr("d",ie(Tr))}else da();else!wr||aa<Math.min(Math.max(Ur*.6,h),P)?Ur<h||!jr?da():(Tr.t=0,Tr.b=Zt,Ra="x",za.attr("d",X(Tr,Qt))):!jr||Ur<Math.min(aa*.6,P)?(Tr.l=0,Tr.r=Vt,Ra="y",za.attr("d",oe(Tr,rr))):(Ra="xy",za.attr("d",ie(Tr)));Tr.w=Tr.r-Tr.l,Tr.h=Tr.b-Tr.t,Ra&&(ti=!0),ce._dragged=ti,he(ei,za,Tr,Ua,Ba,la),Nt(),ce.emit("plotly_relayouting",qe),Ba=!0}function Nt(){qe={},(Ra==="xy"||Ra==="x")&&(N(st,Tr.l/Vt,Tr.r/Vt,qe,Sr.xaxes),Ha("x",qe)),(Ra==="xy"||Ra==="y")&&(N(Qe,(Zt-Tr.b)/Zt,(Zt-Tr.t)/Zt,qe,Sr.yaxes),Ha("y",qe))}function Kt(){Nt(),$(ce),mi(),J(ce)}var Wt=[0,0,Vt,Zt],Pr=null,ta=m.REDRAWDELAY,ma=be.mainplot?ce._fullLayout._plots[be.mainplot]:be;function ra(Rr){if(!ce._context._scrollZoom.cartesian&&!ce._fullLayout._enablescrollzoom)return;if(Ot(),ce._transitioningWithDuration){Rr.preventDefault(),Rr.stopPropagation();return}Pe(),clearTimeout(Pr);var Lr=-Rr.deltaY;if(isFinite(Lr)||(Lr=Rr.wheelDelta/10),!isFinite(Lr)){x.log("Did not find wheel motion attributes: ",Rr);return}var Gr=Math.exp(-Math.min(Math.max(Lr,-20),20)/200),Kr=ma.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Ur=(Rr.clientX-Kr.left)/Kr.width,aa=(Kr.bottom-Rr.clientY)/Kr.height,da;function fa(It,dr,kr){if(It.fixedrange)return;var ia=x.simpleMap(It.range,It.r2l),Ca=ia[0]+(ia[1]-ia[0])*dr;function Fa(Ya){return It.l2r(Ca+(Ya-Ca)*kr)}It.range=ia.map(Fa)}if(bt){for(ot||(Ur=.5),da=0;da<st.length;da++)fa(st[da],Ur,Gr);Ha("x"),Wt[2]*=Gr,Wt[0]+=Wt[2]*Ur*(1/Gr-1)}if(Be){for(it||(aa=.5),da=0;da<Qe.length;da++)fa(Qe[da],aa,Gr);Ha("y"),Wt[3]*=Gr,Wt[1]+=Wt[3]*(1-aa)*(1/Gr-1)}xt(Wt),$a(),ce.emit("plotly_relayouting",qe),Pr=setTimeout(function(){ce._fullLayout&&(Wt=[0,0,Vt,Zt],mi())},ta),Rr.preventDefault()}it.length*ot.length!==1&&ee(yt,ra);function Ia(Rr,Lr){if(Rr=Rr*Ce,Lr=Lr*Te,ce._transitioningWithDuration)return;if(ce._fullLayout._replotting=!0,jr==="ew"||wr==="ns"){var Gr=jr?-Rr:0,Kr=wr?-Lr:0;if(xr.isSubplotConstrained){if(jr&&wr){var Ur=(Rr/Vt-Lr/Zt)/2;Rr=Ur*Vt,Lr=-Ur*Zt,Gr=-Rr,Kr=-Lr}wr?Gr=-Kr*Vt/Zt:Kr=-Gr*Zt/Vt}jr&&(U(st,Rr),Ha("x")),wr&&(U(Qe,Lr),Ha("y")),xt([Gr,Kr,Vt,Zt]),$a(),ce.emit("plotly_relayouting",qe);return}function aa(Fa,Ya,ha){for(var Da=1-Ya,Xi,Li,fn=0;fn<Fa.length;fn++){var An=Fa[fn];if(!An.fixedrange){Xi=An,Li=An._rl[Da]+(An._rl[Ya]-An._rl[Da])/W(ha/An._length);var kn=An.l2r(Li);kn!==!1&&kn!==void 0&&(An.range[Ya]=kn)}}return Xi._length*(Xi._rl[Ya]-Li)/(Xi._rl[Ya]-Xi._rl[Da])}var da=jr==="w"==(wr==="n")?1:-1;if(jr&&wr&&(Sr.isSubplotConstrained||xr.isSubplotConstrained)){var fa=(Rr/Vt+da*Lr/Zt)/2;Rr=fa*Vt,Lr=da*fa*Zt}var It,dr;if(jr==="w"?Rr=aa(st,0,Rr):jr==="e"?Rr=aa(st,1,-Rr):jr||(Rr=0),wr==="n"?Lr=aa(Qe,1,Lr):wr==="s"?Lr=aa(Qe,0,-Lr):wr||(Lr=0),It=jr==="w"?Rr:0,dr=wr==="n"?Lr:0,Sr.isSubplotConstrained&&!xr.isSubplotConstrained||xr.isSubplotConstrained&&jr&&wr&&da>0){var kr;if(xr.isSubplotConstrained||!jr&&wr.length===1){for(kr=0;kr<st.length;kr++)st[kr].range=st[kr]._r.slice(),u(st[kr],1-Lr/Zt);Rr=Lr*Vt/Zt,It=Rr/2}if(xr.isSubplotConstrained||!wr&&jr.length===1){for(kr=0;kr<Qe.length;kr++)Qe[kr].range=Qe[kr]._r.slice(),u(Qe[kr],1-Rr/Vt);Lr=Rr*Zt/Vt,dr=Lr/2}}(!xr.isSubplotConstrained||!wr)&&Ha("x"),(!xr.isSubplotConstrained||!jr)&&Ha("y");var ia=Vt-Rr,Ca=Zt-Lr;xr.isSubplotConstrained&&!(jr&&wr)&&(jr?(dr=It?0:Rr*Zt/Vt,Ca=ia*Zt/Vt):(It=dr?0:Lr*Vt/Zt,ia=Ca*Vt/Zt)),xt([It,dr,ia,Ca]),$a(),ce.emit("plotly_relayouting",qe)}function Ha(Rr,Lr){for(var Gr=xr.isSubplotConstrained?{x:Qe,y:st}[Rr]:xr[Rr+"axes"],Kr=xr.isSubplotConstrained?{x:st,y:Qe}[Rr]:[],Ur=0;Ur<Gr.length;Ur++){var aa=Gr[Ur],da=aa._id,fa=xr.xLinks[da]||xr.yLinks[da],It=Kr[0]||Fe[fa]||rt[fa];It&&(Lr?(Lr[aa._name+".range[0]"]=Lr[It._name+".range[0]"],Lr[aa._name+".range[1]"]=Lr[It._name+".range[1]"]):aa.range=It.range.slice())}}function $a(){var Rr=[],Lr;function Gr(da){for(Lr=0;Lr<da.length;Lr++)da[Lr].fixedrange||Rr.push(da[Lr]._id)}function Kr(da,fa){for(Lr=0;Lr<da.length;Lr++){var It=da[Lr],dr=It[fa];!It.fixedrange&&dr.tickmode==="sync"&&Rr.push(dr._id)}}for(bt&&(Gr(st),Gr(Sr.xaxes),Gr(xr.xaxes),Kr(be.overlays,"xaxis")),Be&&(Gr(Qe),Gr(Sr.yaxes),Gr(xr.yaxes),Kr(be.overlays,"yaxis")),qe={},Lr=0;Lr<Rr.length;Lr++){var Ur=Rr[Lr],aa=E(ce,Ur);s.drawOne(ce,aa,{skipTitle:!0}),qe[aa._name+".range[0]"]=aa.range[0],qe[aa._name+".range[1]"]=aa.range[1]}s.redrawComponents(ce,Rr)}function ai(){if(!ce._transitioningWithDuration){var Rr=ce._context.doubleClick,Lr=[];jr&&(Lr=Lr.concat(st)),wr&&(Lr=Lr.concat(Qe)),xr.xaxes&&(Lr=Lr.concat(xr.xaxes)),xr.yaxes&&(Lr=Lr.concat(xr.yaxes));var Gr={},Kr,Ur;if(Rr==="reset+autosize")for(Rr="autosize",Ur=0;Ur<Lr.length;Ur++){Kr=Lr[Ur];var aa=Kr._rangeInitial0,da=Kr._rangeInitial1,fa=aa!==void 0||da!==void 0;if(fa&&(aa!==void 0&&aa!==Kr.range[0]||da!==void 0&&da!==Kr.range[1])||!fa&&Kr.autorange!==!0){Rr="reset";break}}if(Rr==="autosize")for(Ur=0;Ur<Lr.length;Ur++)Kr=Lr[Ur],Kr.fixedrange||(Gr[Kr._name+".autorange"]=!0);else if(Rr==="reset"){for((jr||Sr.isSubplotConstrained)&&(Lr=Lr.concat(Sr.xaxes)),wr&&!Sr.isSubplotConstrained&&(Lr=Lr.concat(Sr.yaxes)),Sr.isSubplotConstrained&&(jr?wr||(Lr=Lr.concat(Qe)):Lr=Lr.concat(st)),Ur=0;Ur<Lr.length;Ur++)if(Kr=Lr[Ur],!Kr.fixedrange){var It=Kr._name,dr=Kr._autorangeInitial;Kr._rangeInitial0===void 0&&Kr._rangeInitial1===void 0?Gr[It+".autorange"]=!0:Kr._rangeInitial0===void 0?(Gr[It+".autorange"]=dr,Gr[It+".range"]=[null,Kr._rangeInitial1]):Kr._rangeInitial1===void 0?(Gr[It+".range"]=[Kr._rangeInitial0,null],Gr[It+".autorange"]=dr):Gr[It+".range"]=[Kr._rangeInitial0,Kr._rangeInitial1]}}ce.emit("plotly_doubleclick",null),t.call("_guiRelayout",ce,Gr)}}function mi(){xt([0,0,Vt,Zt]),x.syncOrAsync([S.previousPromises,function(){ce._fullLayout._replotting=!1,t.call("_guiRelayout",ce,qe)}],ce)}function xt(Rr){var Lr=ce._fullLayout,Gr=Lr._plots,Kr=Lr._subplots.cartesian,Ur,aa,da,fa;if(Ue&&t.subplotsRegistry.splom.drag(ce),Ke){for(Ur=0;Ur<Kr.length;Ur++)if(aa=Gr[Kr[Ur]],da=aa.xaxis,fa=aa.yaxis,aa._scene){da.limitRange&&da.limitRange(),fa.limitRange&&fa.limitRange();var It=x.simpleMap(da.range,da.r2l),dr=x.simpleMap(fa.range,fa.r2l);aa._scene.update({range:[It[0],dr[0],It[1],dr[1]]})}}if((Ue||Ke)&&(_(ce),w(ce)),Me){var kr=Rr[2]/_e._length,ia=Rr[3]/fe._length;for(Ur=0;Ur<Kr.length;Ur++){aa=Gr[Kr[Ur]],da=aa.xaxis,fa=aa.yaxis;var Ca=(bt||xr.isSubplotConstrained)&&!da.fixedrange&&Fe[da._id],Fa=(Be||xr.isSubplotConstrained)&&!fa.fixedrange&&rt[fa._id],Ya,ha,Da,Xi;if(Ca?(Ya=kr,Da=ot||xr.isSubplotConstrained?Rr[0]:Or(da,Ya)):xr.xaHash[da._id]?(Ya=kr,Da=Rr[0]*da._length/_e._length):xr.yaHash[da._id]?(Ya=ia,Da=wr==="ns"?-Rr[1]*da._length/fe._length:Or(da,Ya,{n:"top",s:"bottom"}[wr])):(Ya=ct(da,kr,ia),Da=Nr(da,Ya)),Ya>1&&(da.maxallowed!==void 0&&bt===(da.range[0]<da.range[1]?"e":"w")||da.minallowed!==void 0&&bt===(da.range[0]<da.range[1]?"w":"e"))&&(Ya=1,Da=0),Fa?(ha=ia,Xi=it||xr.isSubplotConstrained?Rr[1]:Or(fa,ha)):xr.yaHash[fa._id]?(ha=ia,Xi=Rr[1]*fa._length/fe._length):xr.xaHash[fa._id]?(ha=kr,Xi=jr==="ew"?-Rr[0]*fa._length/_e._length:Or(fa,ha,{e:"right",w:"left"}[jr])):(ha=ct(fa,kr,ia),Xi=Nr(fa,ha)),ha>1&&(fa.maxallowed!==void 0&&Be===(fa.range[0]<fa.range[1]?"n":"s")||fa.minallowed!==void 0&&Be===(fa.range[0]<fa.range[1]?"s":"n"))&&(ha=1,Xi=0),!(!Ya&&!ha)){Ya||(Ya=1),ha||(ha=1);var Li=da._offset-Da/Ya,fn=fa._offset-Xi/ha;aa.clipRect.call(i.setTranslate,Da,Xi).call(i.setScale,Ya,ha),aa.plot.call(i.setTranslate,Li,fn).call(i.setScale,1/Ya,1/ha),(Ya!==aa.xScaleFactor||ha!==aa.yScaleFactor)&&(i.setPointGroupScale(aa.zoomScalePts,Ya,ha),i.setTextPointsScale(aa.zoomScaleTxt,Ya,ha)),i.hideOutsideRangePoints(aa.clipOnAxisFalseTraces,aa),aa.xScaleFactor=Ya,aa.yScaleFactor=ha}}}}function ct(Rr,Lr,Gr){return Rr.fixedrange?0:bt&&Sr.xaHash[Rr._id]?Lr:Be&&(Sr.isSubplotConstrained?Sr.xaHash:Sr.yaHash)[Rr._id]?Gr:0}function Nr(Rr,Lr){return Lr?(Rr.range=Rr._r.slice(),u(Rr,Lr),Or(Rr,Lr)):0}function Or(Rr,Lr,Gr){return Rr._length*(1-Lr)*l[Gr||Rr.constraintoward||"middle"]}return yt}function F(ce,be,Ae,ze){var Re=x.ensureSingle(ce.draglayer,be,Ae,function(Xe){Xe.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",ce.id)});return Re.call(c,ze),Re.node()}function B(ce,be,Ae,ze,Re,Xe,it){var ot=F(ce,"rect",be,Ae);return d.select(ot).call(i.setRect,ze,Re,Xe,it),ot}function O(ce,be){for(var Ae=0;Ae<ce.length;Ae++)if(!ce[Ae].fixedrange)return be;return""}function I(ce,be){var Ae=ce.range[be],ze=Math.abs(Ae-ce.range[1-be]),Re;return ce.type==="date"?Ae:ce.type==="log"?(Re=Math.ceil(Math.max(0,-Math.log(ze)/Math.LN10))+3,A("."+Re+"g")(Math.pow(10,Ae))):(Re=Math.floor(Math.log(Math.abs(Ae))/Math.LN10)-Math.floor(Math.log(ze)/Math.LN10)+4,A("."+String(Re)+"g")(Ae))}function N(ce,be,Ae,ze,Re){for(var Xe=0;Xe<ce.length;Xe++){var it=ce[Xe];if(!it.fixedrange)if(it.rangebreaks){var ot=it._id.charAt(0)==="y",tt=ot?1-be:be,lt=ot?1-Ae:Ae;ze[it._name+".range[0]"]=it.l2r(it.p2l(tt*it._length)),ze[it._name+".range[1]"]=it.l2r(it.p2l(lt*it._length))}else{var Ee=it._rl[0],_e=it._rl[1]-Ee;ze[it._name+".range[0]"]=it.l2r(Ee+_e*be),ze[it._name+".range[1]"]=it.l2r(Ee+_e*Ae)}}if(Re&&Re.length){var fe=(be+(1-Ae))/2;N(Re,fe,1-fe,ze,[])}}function U(ce,be){for(var Ae=0;Ae<ce.length;Ae++){var ze=ce[Ae];if(!ze.fixedrange){if(ze.rangebreaks){var Re=0,Xe=ze._length,it=ze.p2l(Re+be)-ze.p2l(Re),ot=ze.p2l(Xe+be)-ze.p2l(Xe),tt=(it+ot)/2;ze.range=[ze.l2r(ze._rl[0]-tt),ze.l2r(ze._rl[1]-tt)]}else ze.range=[ze.l2r(ze._rl[0]-be/ze._m),ze.l2r(ze._rl[1]-be/ze._m)];ze.limitRange&&ze.limitRange()}}}function W(ce){return 1-(ce>=0?Math.min(ce,.9):1/(1/Math.max(ce,-.3)+3.222))}function Q(ce,be,Ae){return ce?ce==="nsew"?Ae?"":be==="pan"?"move":"crosshair":ce.toLowerCase()+"-resize":"pointer"}function ue(ce,be,Ae,ze,Re){return ce.append("path").attr("class","zoombox").style({fill:be>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",r(Ae,ze)).attr("d",Re+"Z")}function le(ce,be,Ae){return ce.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",r(be,Ae)).attr("d","M0,0Z")}function he(ce,be,Ae,ze,Re,Xe){ce.attr("d",ze+"M"+Ae.l+","+Ae.t+"v"+Ae.h+"h"+Ae.w+"v-"+Ae.h+"h-"+Ae.w+"Z"),G(ce,be,Re,Xe)}function G(ce,be,Ae,ze){Ae||(ce.transition().style("fill",ze>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),be.transition().style("opacity",1).duration(200))}function $(ce){d.select(ce).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function J(ce){L&&ce.data&&ce._context.showTips&&(x.notifier(x._(ce,"Double-click to zoom back out"),"long"),L=!1)}function X(ce,be){return"M"+(ce.l-.5)+","+(be-P-.5)+"h-3v"+(2*P+1)+"h3ZM"+(ce.r+.5)+","+(be-P-.5)+"h3v"+(2*P+1)+"h-3Z"}function oe(ce,be){return"M"+(be-P-.5)+","+(ce.t-.5)+"v-3h"+(2*P+1)+"v3ZM"+(be-P-.5)+","+(ce.b+.5)+"v3h"+(2*P+1)+"v-3Z"}function ie(ce){var be=Math.floor(Math.min(ce.b-ce.t,ce.r-ce.l,P)/2);return"M"+(ce.l-3.5)+","+(ce.t-.5+be)+"h3v"+-be+"h"+be+"v-3h-"+(be+3)+"ZM"+(ce.r+3.5)+","+(ce.t-.5+be)+"h-3v"+-be+"h"+-be+"v-3h"+(be+3)+"ZM"+(ce.r+3.5)+","+(ce.b+.5-be)+"h-3v"+be+"h"+-be+"v3h"+(be+3)+"ZM"+(ce.l-3.5)+","+(ce.b+.5-be)+"h3v"+be+"h"+be+"v3h-"+(be+3)+"Z"}function j(ce,be,Ae,ze,Re){for(var Xe=!1,it={},ot={},tt,lt,Ee,_e,fe=(Re||{}).xaHash,Fe=(Re||{}).yaHash,rt=0;rt<be.length;rt++){var st=be[rt];for(tt in Ae)if(st[tt]){for(Ee in st)!(Re&&(fe[Ee]||Fe[Ee]))&&!(Ee.charAt(0)==="x"?Ae:ze)[Ee]&&(it[Ee]=tt);for(lt in ze)!(Re&&(fe[lt]||Fe[lt]))&&st[lt]&&(Xe=!0)}for(lt in ze)if(st[lt])for(_e in st)!(Re&&(fe[_e]||Fe[_e]))&&!(_e.charAt(0)==="x"?Ae:ze)[_e]&&(ot[_e]=lt)}Xe&&(x.extendFlat(it,ot),ot={});var Qe={},Lt=[];for(Ee in it){var kt=E(ce,Ee);Lt.push(kt),Qe[kt._id]=kt}var Vt={},Zt=[];for(_e in ot){var Sr=E(ce,_e);Zt.push(Sr),Vt[Sr._id]=Sr}return{xaHash:Qe,yaHash:Vt,xaxes:Lt,yaxes:Zt,xLinks:it,yLinks:ot,isSubplotConstrained:Xe}}function ee(ce,be){if(!e)ce.onwheel!==void 0?ce.onwheel=be:ce.onmousewheel!==void 0?ce.onmousewheel=be:ce.isAddedWheelEvent||(ce.isAddedWheelEvent=!0,ce.addEventListener("wheel",be,{passive:!1}));else{var Ae=ce.onwheel!==void 0?"wheel":"mousewheel";ce._onwheel&&ce.removeEventListener(Ae,ce._onwheel),ce._onwheel=be,ce.addEventListener(Ae,be,{passive:!1})}}function re(ce){var be=[];for(var Ae in ce)be.push(ce[Ae]);return be}q.exports={makeDragBox:z,makeDragger:F,makeRectDragger:B,makeZoombox:ue,makeCorners:le,updateZoombox:he,xyCorners:ie,transitionZoombox:G,removeZoombox:$,showDoubleClickNotifier:J,attachWheelEventHandler:ee}}}),P5=Ze({"src/plots/cartesian/graph_interact.js"(Z){"use strict";var q=On(),d=ef(),x=Tp(),A=Kd(),M=L5().makeDragBox,e=kh().DRAGGERSIZE;Z.initInteractions=function(r){var o=r._fullLayout;if(r._context.staticPlot){q.select(r).selectAll(".drag").remove();return}if(!(!o._has("cartesian")&&!o._has("splom"))){var a=Object.keys(o._plots||{}).sort(function(n,s){if((o._plots[n].mainplot&&!0)===(o._plots[s].mainplot&&!0)){var c=n.split("y"),f=s.split("y");return c[0]===f[0]?Number(c[1]||1)-Number(f[1]||1):Number(c[0]||1)-Number(f[0]||1)}return o._plots[n].mainplot?1:-1});a.forEach(function(n){var s=o._plots[n],c=s.xaxis,f=s.yaxis;if(!s.mainplot){var g=M(r,s,c._offset,f._offset,c._length,f._length,"ns","ew");g.onmousemove=function(l){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===n&&r._fullLayout._plots[n]&&d.hover(r,l,n)},d.hover(r,l,n),r._fullLayout._lasthover=g,r._fullLayout._hoversubplot=n},g.onmouseout=function(l){r._dragging||(r._fullLayout._hoversubplot=null,x.unhover(r,l))},r._context.showAxisDragHandles&&(M(r,s,c._offset-e,f._offset-e,e,e,"n","w"),M(r,s,c._offset+c._length,f._offset-e,e,e,"n","e"),M(r,s,c._offset-e,f._offset+f._length,e,e,"s","w"),M(r,s,c._offset+c._length,f._offset+f._length,e,e,"s","e"))}if(r._context.showAxisDragHandles){if(n===c._mainSubplot){var v=c._mainLinePosition;c.side==="top"&&(v-=e),M(r,s,c._offset+c._length*.1,v,c._length*.8,e,"","ew"),M(r,s,c._offset,v,c._length*.1,e,"","w"),M(r,s,c._offset+c._length*.9,v,c._length*.1,e,"","e")}if(n===f._mainSubplot){var T=f._mainLinePosition;f.side!=="right"&&(T-=e),M(r,s,T,f._offset+f._length*.1,e,f._length*.8,"ns",""),M(r,s,T,f._offset+f._length*.9,e,f._length*.1,"s",""),M(r,s,T,f._offset,e,f._length*.1,"n","")}}});var i=o._hoverlayer.node();i.onmousemove=function(n){n.target=r._fullLayout._lasthover,d.hover(r,n,o._hoversubplot)},i.onclick=function(n){n.target=r._fullLayout._lasthover,d.click(r,n)},i.onmousedown=function(n){r._fullLayout._lasthover.onmousedown(n)},Z.updateFx(r)}},Z.updateFx=function(t){var r=t._fullLayout,o=r.dragmode==="pan"?"move":"crosshair";A(r._draggers,o)}}}),Fz=Ze({"src/plot_api/container_array_match.js"(Z,q){"use strict";var d=oo();q.exports=function(A){for(var M=d.layoutArrayContainers,e=d.layoutArrayRegexes,t=A.split("[")[0],r,o,a=0;a<e.length;a++)if(o=A.match(e[a]),o&&o.index===0){r=o[0];break}if(r||(r=M[M.indexOf(t)]),!r)return!1;var i=A.substr(r.length);return i?(o=i.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:r,index:Number(o[1]),property:o[3]||""}:!1):{array:r,index:"",property:""}}}}),Oz=Ze({"src/plot_api/manage_arrays.js"(Z){"use strict";var q=Xv(),d=h2(),x=Ym(),A=m2().sorterAsc,M=oo();Z.containerArrayMatch=Fz();var e=Z.isAddVal=function(o){return o==="add"||q(o)},t=Z.isRemoveVal=function(o){return o===null||o==="remove"};Z.applyContainerArrayChanges=function(o,a,i,n,s){var c=a.astr,f=M.getComponentMethod(c,"supplyLayoutDefaults"),g=M.getComponentMethod(c,"draw"),v=M.getComponentMethod(c,"drawOne"),T=n.replot||n.recalc||f===d||g===d,l=o.layout,_=o._fullLayout;if(i[""]){Object.keys(i).length>1&&x.warn("Full array edits are incompatible with other edits",c);var w=i[""][""];if(t(w))a.set(null);else if(Array.isArray(w))a.set(w);else return x.warn("Unrecognized full array edit value",c,w),!0;return T?!1:(f(l,_),g(o),!0)}var S=Object.keys(i).map(Number).sort(A),E=a.get(),y=E||[],b=s(_,c).get(),p=[],u=-1,m=y.length,h,P,L,z,F,B,O,I;for(h=0;h<S.length;h++){if(L=S[h],z=i[L],F=Object.keys(z),B=z[""],O=e(B),L<0||L>y.length-(O?0:1)){x.warn("index out of range",c,L);continue}if(B!==void 0)F.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",c,L),t(B)?p.push(L):O?(B==="add"&&(B={}),y.splice(L,0,B),b&&b.splice(L,0,{})):x.warn("Unrecognized full object edit value",c,L,B),u===-1&&(u=L);else for(P=0;P<F.length;P++)I=c+"["+L+"].",s(y[L],F[P],I).set(z[F[P]])}for(h=p.length-1;h>=0;h--)y.splice(p[h],1),b&&b.splice(p[h],1);if(y.length?E||a.set(y):a.set(null),T)return!1;if(f(l,_),v!==d){var N;if(u===-1)N=S;else{for(m=Math.max(y.length,m),N=[],h=0;h<S.length&&(L=S[h],!(L>=u));h++)N.push(L);for(h=u;h<m;h++)N.push(h)}for(h=0;h<N.length;h++)v(o,N[h])}else g(o);return!0}}}),Bz=Ze({"src/plot_api/helpers.js"(Z){"use strict";var q=ns(),d=QA(),x=oo(),A=ca(),M=xc(),e=$c(),t=Yn(),r=e.cleanId,o=e.getFromTrace,a=x.traceIs;Z.clearPromiseQueue=function(l){Array.isArray(l._promises)&&l._promises.length>0&&A.log("Clearing previous rejected promises from queue."),l._promises=[]},Z.cleanLayout=function(l){var _,w;l||(l={}),l.xaxis1&&(l.xaxis||(l.xaxis=l.xaxis1),delete l.xaxis1),l.yaxis1&&(l.yaxis||(l.yaxis=l.yaxis1),delete l.yaxis1),l.scene1&&(l.scene||(l.scene=l.scene1),delete l.scene1);var S=(M.subplotsRegistry.cartesian||{}).attrRegex,E=(M.subplotsRegistry.polar||{}).attrRegex,y=(M.subplotsRegistry.ternary||{}).attrRegex,b=(M.subplotsRegistry.gl3d||{}).attrRegex,p=Object.keys(l);for(_=0;_<p.length;_++){var u=p[_];if(S&&S.test(u)){var m=l[u];m.anchor&&m.anchor!=="free"&&(m.anchor=r(m.anchor)),m.overlaying&&(m.overlaying=r(m.overlaying)),m.type||(m.isdate?m.type="date":m.islog?m.type="log":m.isdate===!1&&m.islog===!1&&(m.type="linear")),(m.autorange==="withzero"||m.autorange==="tozero")&&(m.autorange=!0,m.rangemode="tozero"),m.insiderange&&delete m.range,delete m.islog,delete m.isdate,delete m.categories,f(m,"domain")&&delete m.domain}}var h=Array.isArray(l.annotations)?l.annotations.length:0;for(_=0;_<h;_++){var P=l.annotations[_];A.isPlainObject(P)&&(i(P,"xref"),i(P,"yref"))}var L=Array.isArray(l.shapes)?l.shapes.length:0;for(_=0;_<L;_++){var z=l.shapes[_];A.isPlainObject(z)&&(i(z,"xref"),i(z,"yref"))}var F=Array.isArray(l.images)?l.images.length:0;for(_=0;_<F;_++){var B=l.images[_];A.isPlainObject(B)&&(i(B,"xref"),i(B,"yref"))}var O=l.legend;return O&&(O.x>3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),l.dragmode==="rotate"&&(l.dragmode="orbit"),t.clean(l),l.template&&l.template.layout&&Z.cleanLayout(l.template.layout),l};function i(l,_){var w=l[_],S=_.charAt(0);w&&w!=="paper"&&(l[_]=r(w,S,!0))}Z.cleanData=function(l){for(var _=0;_<l.length;_++){var w=l[_],S;if(w.type==="histogramy"&&"xbins"in w&&!("ybins"in w)&&(w.ybins=w.xbins,delete w.xbins),w.type==="histogramy"&&Z.swapXYData(w),(w.type==="histogramx"||w.type==="histogramy")&&(w.type="histogram"),"scl"in w&&!("colorscale"in w)&&(w.colorscale=w.scl,delete w.scl),"reversescl"in w&&!("reversescale"in w)&&(w.reversescale=w.reversescl,delete w.reversescl),w.xaxis&&(w.xaxis=r(w.xaxis,"x")),w.yaxis&&(w.yaxis=r(w.yaxis,"y")),a(w,"gl3d")&&w.scene&&(w.scene=M.subplotsRegistry.gl3d.cleanId(w.scene)),!a(w,"pie-like")&&!a(w,"bar-like"))if(Array.isArray(w.textposition))for(S=0;S<w.textposition.length;S++)w.textposition[S]=c(w.textposition[S]);else w.textposition&&(w.textposition=c(w.textposition));var E=x.getModule(w);if(E&&E.colorbar){var y=E.colorbar.container,b=y?w[y]:w;b&&b.colorscale&&(b.colorscale==="YIGnBu"&&(b.colorscale="YlGnBu"),b.colorscale==="YIOrRd"&&(b.colorscale="YlOrRd"))}if(w.type==="surface"&&A.isPlainObject(w.contours)){var p=["x","y","z"];for(S=0;S<p.length;S++){var u=w.contours[p[S]];A.isPlainObject(u)&&(u.highlightColor&&(u.highlightcolor=u.highlightColor,delete u.highlightColor),u.highlightWidth&&(u.highlightwidth=u.highlightWidth,delete u.highlightWidth))}}if(w.type==="candlestick"||w.type==="ohlc"){var m=(w.increasing||{}).showlegend!==!1,h=(w.decreasing||{}).showlegend!==!1,P=n(w.increasing),L=n(w.decreasing);if(P!==!1&&L!==!1){var z=s(P,L,m,h);z&&(w.name=z)}else(P||L)&&!w.name&&(w.name=P||L)}f(w,"line")&&delete w.line,"marker"in w&&(f(w.marker,"line")&&delete w.marker.line,f(w,"marker")&&delete w.marker),t.clean(w),w.autobinx&&(delete w.autobinx,delete w.xbins),w.autobiny&&(delete w.autobiny,delete w.ybins)}};function n(l){if(!A.isPlainObject(l))return!1;var _=l.name;return delete l.name,delete l.showlegend,(typeof _=="string"||typeof _=="number")&&String(_)}function s(l,_,w,S){if(w&&!S)return l;if(S&&!w||!l.trim())return _;if(!_.trim())return l;var E=Math.min(l.length,_.length),y;for(y=0;y<E&&l.charAt(y)===_.charAt(y);y++);var b=l.substr(0,y);return b.trim()}function c(l){var _="middle",w="center";return typeof l=="string"&&(l.indexOf("top")!==-1?_="top":l.indexOf("bottom")!==-1&&(_="bottom"),l.indexOf("left")!==-1?w="left":l.indexOf("right")!==-1&&(w="right")),_+" "+w}function f(l,_){return _ in l&&typeof l[_]=="object"&&Object.keys(l[_]).length===0}Z.swapXYData=function(l){var _;if(A.swapAttrs(l,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(l.z)&&Array.isArray(l.z[0])&&(l.transpose?delete l.transpose:l.transpose=!0),l.error_x&&l.error_y){var w=l.error_y,S="copy_ystyle"in w?w.copy_ystyle:!(w.color||w.thickness||w.width);A.swapAttrs(l,["error_?.copy_ystyle"]),S&&A.swapAttrs(l,["error_?.color","error_?.thickness","error_?.width"])}if(typeof l.hoverinfo=="string"){var E=l.hoverinfo.split("+");for(_=0;_<E.length;_++)E[_]==="x"?E[_]="y":E[_]==="y"&&(E[_]="x");l.hoverinfo=E.join("+")}},Z.coerceTraceIndices=function(l,_){if(q(_))return[_];if(!Array.isArray(_)||!_.length)return l.data.map(function(E,y){return y});if(Array.isArray(_)){for(var w=[],S=0;S<_.length;S++)A.isIndex(_[S],l.data.length)?w.push(_[S]):A.warn("trace index (",_[S],") is not a number or is out of bounds");return w}return _},Z.manageArrayContainers=function(l,_,w){var S=l.obj,E=l.parts,y=E.length,b=E[y-1],p=q(b);if(p&&_===null){var u=E.slice(0,y-1).join("."),m=A.nestedProperty(S,u).get();m.splice(b,1)}else p&&l.get()===void 0&&l.get()===void 0&&(w[l.astr]=null),l.set(_)};var g=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function v(l){var _=l.search(g);if(_>0)return l.substr(0,_)}Z.hasParent=function(l,_){for(var w=v(_);w;){if(w in l)return!0;w=v(w)}return!1};var T=["x","y","z"];Z.clearAxisTypes=function(l,_,w){for(var S=0;S<_.length;S++)for(var E=l._fullData[S],y=0;y<3;y++){var b=o(l,E,T[y]);if(b&&b.type!=="log"){var p=b._name,u=b._id.substr(1);if(u.substr(0,5)==="scene"){if(w[u]!==void 0)continue;p=u+"."+p}var m=p+".type";w[p]===void 0&&w[m]===void 0&&A.nestedProperty(l.layout,m).set(null)}}}}}),C2=Ze({"src/plot_api/plot_api.js"(Z){"use strict";var q=On(),d=ns(),x=i5(),A=ca(),M=A.nestedProperty,e=Qy(),t=rz(),r=oo(),o=e1(),a=xc(),i=Wo(),n=h5(),s=Wh(),c=as(),f=Yn(),g=P5().initInteractions,v=vd(),T=Tf().clearOutline,l=H0().dfltConfig,_=Oz(),w=Bz(),S=L_(),E=pc(),y=kh().AX_NAME_PATTERN,b=0,p=5;function u(Me,qe,Ce,Te){var Pe;if(Me=A.getGraphDiv(Me),e.init(Me),A.isPlainObject(qe)){var at=qe;qe=at.data,Ce=at.layout,Te=at.config,Pe=at.frames}var yt=e.triggerHandler(Me,"plotly_beforeplot",[qe,Ce,Te]);if(yt===!1)return Promise.reject();!qe&&!Ce&&!A.isPlotDiv(Me)&&A.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Me);function Tt(){if(Pe)return Z.addFrames(Me,Pe)}z(Me,Te),Ce||(Ce={}),q.select(Me).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(Me._promises)||(Me._promises=[]);var Ot=(Me.data||[]).length===0&&Array.isArray(qe);Array.isArray(qe)&&(w.cleanData(qe),Ot?Me.data=qe:Me.data.push.apply(Me.data,qe),Me.empty=!1),(!Me.layout||Ot)&&(Me.layout=w.cleanLayout(Ce)),a.supplyDefaults(Me);var Gt=Me._fullLayout,rr=Gt._has("cartesian");Gt._replotting=!0,(Ot||Gt._shouldCreateBgLayer)&&(Ue(Me),Gt._shouldCreateBgLayer&&delete Gt._shouldCreateBgLayer),c.initGradients(Me),c.initPatterns(Me),Ot&&i.saveShowSpikeInitial(Me);var Qt=!Me.calcdata||Me.calcdata.length!==(Me._fullData||[]).length;Qt&&a.doCalcdata(Me);for(var Tr=0;Tr<Me.calcdata.length;Tr++)Me.calcdata[Tr][0].trace=Me._fullData[Tr];Me._context.responsive?Me._responsiveChartHandler||(Me._responsiveChartHandler=function(){A.isHidden(Me)||a.resize(Me)},window.addEventListener("resize",Me._responsiveChartHandler)):A.clearResponsive(Me);var la=A.extendFlat({},Gt._size),Ua=0;function Ba(){for(var Kt=Gt._basePlotModules,Wt=0;Wt<Kt.length;Wt++)Kt[Wt].drawFramework&&Kt[Wt].drawFramework(Me);!Gt._glcanvas&&Gt._has("gl")&&(Gt._glcanvas=Gt._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(ra){return ra.key}),Gt._glcanvas.enter().append("canvas").attr("class",function(ra){return"gl-canvas gl-canvas-"+ra.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Pr=Me._context.plotGlPixelRatio;if(Gt._glcanvas){Gt._glcanvas.attr("width",Gt.width*Pr).attr("height",Gt.height*Pr).style("width",Gt.width+"px").style("height",Gt.height+"px");var ta=Gt._glcanvas.data()[0].regl;if(ta&&(Math.floor(Gt.width*Pr)!==ta._gl.drawingBufferWidth||Math.floor(Gt.height*Pr)!==ta._gl.drawingBufferHeight)){var ma="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(Ua)A.error(ma);else return A.log(ma+" Clearing graph and plotting again."),a.cleanPlot([],{},Me._fullData,Gt),a.supplyDefaults(Me),Gt=Me._fullLayout,a.doCalcdata(Me),Ua++,Ba()}}return Gt.modebar.orientation==="h"?Gt._modebardiv.style("height",null).style("width","100%"):Gt._modebardiv.style("width",null).style("height",Gt.height+"px"),a.previousPromises(Me)}function Ra(){if(a.clearAutoMarginIds(Me),S.drawMarginPushers(Me),i.allowAutoMargin(Me),Me._fullLayout.title.text&&Me._fullLayout.title.automargin&&a.allowAutoMargin(Me,"title.automargin"),Gt._has("pie"))for(var Kt=Me._fullData,Wt=0;Wt<Kt.length;Wt++){var Pr=Kt[Wt];Pr.type==="pie"&&Pr.automargin&&a.allowAutoMargin(Me,"pie."+Pr.uid+".automargin")}return a.doAutoMargin(Me),a.previousPromises(Me)}function ei(){if(a.didMarginChange(la,Gt._size))return A.syncOrAsync([Ra,S.layoutStyles],Me)}function za(){if(!Qt){ti();return}return A.syncOrAsync([r.getComponentMethod("shapes","calcAutorange"),r.getComponentMethod("annotations","calcAutorange"),ti],Me)}function ti(){Me._transitioning||(S.doAutoRangeAndConstraints(Me),Ot&&i.saveRangeInitial(Me),r.getComponentMethod("rangeslider","calcAutorange")(Me))}function Ci(){return i.draw(Me,Ot?"":"redraw")}var Jt=[a.previousPromises,Tt,Ba,Ra,ei];rr&&Jt.push(za),Jt.push(S.layoutStyles),rr&&Jt.push(Ci,function(Wt){var Pr=Wt._fullLayout._insideTickLabelsUpdaterange;if(Pr)return Wt._fullLayout._insideTickLabelsUpdaterange=void 0,be(Wt,Pr).then(function(){i.saveRangeInitial(Wt,!0)})}),Jt.push(S.drawData,S.finalDraw,g,a.addLinks,a.rehover,a.redrag,a.reselect,a.doAutoMargin,a.previousPromises);var Nt=A.syncOrAsync(Jt,Me);return(!Nt||!Nt.then)&&(Nt=Promise.resolve()),Nt.then(function(){return m(Me),Me})}function m(Me){var qe=Me._fullLayout;qe._redrawFromAutoMarginCount?qe._redrawFromAutoMarginCount--:Me.emit("plotly_afterplot")}function h(Me){return A.extendFlat(l,Me)}function P(Me,qe){try{Me._fullLayout._paper.style("background",qe)}catch(Ce){A.error(Ce)}}function L(Me,qe){var Ce=f.combine(qe,"white");P(Me,Ce)}function z(Me,qe){if(!Me._context){Me._context=A.extendDeep({},l);var Ce=q.select("base");Me._context._baseUrl=Ce.size()&&Ce.attr("href")?window.location.href.split("#")[0]:""}var Te=Me._context,Pe,at,yt;if(qe){for(at=Object.keys(qe),Pe=0;Pe<at.length;Pe++)yt=at[Pe],!(yt==="editable"||yt==="edits")&&yt in Te&&(yt==="setBackground"&&qe[yt]==="opaque"?Te[yt]=L:Te[yt]=qe[yt]);var Tt=qe.editable;if(Tt!==void 0)for(Te.editable=Tt,at=Object.keys(Te.edits),Pe=0;Pe<at.length;Pe++)Te.edits[at[Pe]]=Tt;if(qe.edits)for(at=Object.keys(qe.edits),Pe=0;Pe<at.length;Pe++)yt=at[Pe],yt in Te.edits&&(Te.edits[yt]=qe.edits[yt]);Te._exportedPlot=qe._exportedPlot}Te.staticPlot&&(Te.editable=!1,Te.edits={},Te.autosizable=!1,Te.scrollZoom=!1,Te.doubleClick=!1,Te.showTips=!1,Te.showLink=!1,Te.displayModeBar=!1),Te.displayModeBar==="hover"&&!x&&(Te.displayModeBar=!0),(Te.setBackground==="transparent"||typeof Te.setBackground!="function")&&(Te.setBackground=P),Te._hasZeroHeight=Te._hasZeroHeight||Me.clientHeight===0,Te._hasZeroWidth=Te._hasZeroWidth||Me.clientWidth===0;var Ot=Te.scrollZoom,Gt=Te._scrollZoom={};if(Ot===!0)Gt.cartesian=1,Gt.gl3d=1,Gt.geo=1,Gt.mapbox=1,Gt.map=1;else if(typeof Ot=="string"){var rr=Ot.split("+");for(Pe=0;Pe<rr.length;Pe++)Gt[rr[Pe]]=1}else Ot!==!1&&(Gt.gl3d=1,Gt.geo=1,Gt.mapbox=1,Gt.map=1)}function F(Me){if(Me=A.getGraphDiv(Me),!A.isPlotDiv(Me))throw new Error("This element is not a Plotly plot: "+Me);return w.cleanData(Me.data),w.cleanLayout(Me.layout),Me.calcdata=void 0,Z._doPlot(Me).then(function(){return Me.emit("plotly_redraw"),Me})}function B(Me,qe,Ce,Te){return Me=A.getGraphDiv(Me),a.cleanPlot([],{},Me._fullData||[],Me._fullLayout||{}),a.purge(Me),Z._doPlot(Me,qe,Ce,Te)}function O(Me,qe){var Ce=qe+1,Te=[],Pe,at;for(Pe=0;Pe<Me.length;Pe++)at=Me[Pe],at<0?Te.push(Ce+at):Te.push(at);return Te}function I(Me,qe,Ce){var Te,Pe;for(Te=0;Te<qe.length;Te++){if(Pe=qe[Te],Pe!==parseInt(Pe,10))throw new Error("all values in "+Ce+" must be integers");if(Pe>=Me.data.length||Pe<-Me.data.length)throw new Error(Ce+" must be valid indices for gd.data.");if(qe.indexOf(Pe,Te+1)>-1||Pe>=0&&qe.indexOf(-Me.data.length+Pe)>-1||Pe<0&&qe.indexOf(Me.data.length+Pe)>-1)throw new Error("each index in "+Ce+" must be unique.")}}function N(Me,qe,Ce){if(!Array.isArray(Me.data))throw new Error("gd.data must be an array.");if(typeof qe>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(qe)||(qe=[qe]),I(Me,qe,"currentIndices"),typeof Ce<"u"&&!Array.isArray(Ce)&&(Ce=[Ce]),typeof Ce<"u"&&I(Me,Ce,"newIndices"),typeof Ce<"u"&&qe.length!==Ce.length)throw new Error("current and new indices must be of equal length.")}function U(Me,qe,Ce){var Te,Pe;if(!Array.isArray(Me.data))throw new Error("gd.data must be an array.");if(typeof qe>"u")throw new Error("traces must be defined.");for(Array.isArray(qe)||(qe=[qe]),Te=0;Te<qe.length;Te++)if(Pe=qe[Te],typeof Pe!="object"||Array.isArray(Pe)||Pe===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ce<"u"&&!Array.isArray(Ce)&&(Ce=[Ce]),typeof Ce<"u"&&Ce.length!==qe.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function W(Me,qe,Ce,Te){var Pe=A.isPlainObject(Te);if(!Array.isArray(Me.data))throw new Error("gd.data must be an array");if(!A.isPlainObject(qe))throw new Error("update must be a key:value object");if(typeof Ce>"u")throw new Error("indices must be an integer or array of integers");I(Me,Ce,"indices");for(var at in qe){if(!Array.isArray(qe[at])||qe[at].length!==Ce.length)throw new Error("attribute "+at+" must be an array of length equal to indices array length");if(Pe&&(!(at in Te)||!Array.isArray(Te[at])||Te[at].length!==qe[at].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 Q(Me,qe,Ce,Te){var Pe=A.isPlainObject(Te),at=[],yt,Tt,Ot,Gt,rr;Array.isArray(Ce)||(Ce=[Ce]),Ce=O(Ce,Me.data.length-1);for(var Qt in qe)for(var Tr=0;Tr<Ce.length;Tr++){if(yt=Me.data[Ce[Tr]],Ot=M(yt,Qt),Tt=Ot.get(),Gt=qe[Qt][Tr],!A.isArrayOrTypedArray(Gt))throw new Error("attribute: "+Qt+" index: "+Tr+" must be an array");if(!A.isArrayOrTypedArray(Tt))throw new Error("cannot extend missing or non-array attribute: "+Qt);if(Tt.constructor!==Gt.constructor)throw new Error("cannot extend array with an array of a different type: "+Qt);rr=Pe?Te[Qt][Tr]:Te,d(rr)||(rr=-1),at.push({prop:Ot,target:Tt,insert:Gt,maxp:Math.floor(rr)})}return at}function ue(Me,qe,Ce,Te,Pe){W(Me,qe,Ce,Te);for(var at=Q(Me,qe,Ce,Te),yt={},Tt={},Ot=0;Ot<at.length;Ot++){var Gt=at[Ot].prop,rr=at[Ot].maxp,Qt=Pe(at[Ot].target,at[Ot].insert,rr);Gt.set(Qt[0]),Array.isArray(yt[Gt.astr])||(yt[Gt.astr]=[]),yt[Gt.astr].push(Qt[1]),Array.isArray(Tt[Gt.astr])||(Tt[Gt.astr]=[]),Tt[Gt.astr].push(at[Ot].target.length)}return{update:yt,maxPoints:Tt}}function le(Me,qe){var Ce=new Me.constructor(Me.length+qe.length);return Ce.set(Me),Ce.set(qe,Me.length),Ce}function he(Me,qe,Ce,Te){Me=A.getGraphDiv(Me);function Pe(Ot,Gt,rr){var Qt,Tr;if(A.isTypedArray(Ot))if(rr<0){var la=new Ot.constructor(0),Ua=le(Ot,Gt);rr<0?(Qt=Ua,Tr=la):(Qt=la,Tr=Ua)}else if(Qt=new Ot.constructor(rr),Tr=new Ot.constructor(Ot.length+Gt.length-rr),rr===Gt.length)Qt.set(Gt),Tr.set(Ot);else if(rr<Gt.length){var Ba=Gt.length-rr;Qt.set(Gt.subarray(Ba)),Tr.set(Ot),Tr.set(Gt.subarray(0,Ba),Ot.length)}else{var Ra=rr-Gt.length,ei=Ot.length-Ra;Qt.set(Ot.subarray(ei)),Qt.set(Gt,Ra),Tr.set(Ot.subarray(0,ei))}else Qt=Ot.concat(Gt),Tr=rr>=0&&rr<Qt.length?Qt.splice(0,Qt.length-rr):[];return[Qt,Tr]}var at=ue(Me,qe,Ce,Te,Pe),yt=Z.redraw(Me),Tt=[Me,at.update,Ce,at.maxPoints];return t.add(Me,Z.prependTraces,Tt,he,arguments),yt}function G(Me,qe,Ce,Te){Me=A.getGraphDiv(Me);function Pe(Ot,Gt,rr){var Qt,Tr;if(A.isTypedArray(Ot))if(rr<=0){var la=new Ot.constructor(0),Ua=le(Gt,Ot);rr<0?(Qt=Ua,Tr=la):(Qt=la,Tr=Ua)}else if(Qt=new Ot.constructor(rr),Tr=new Ot.constructor(Ot.length+Gt.length-rr),rr===Gt.length)Qt.set(Gt),Tr.set(Ot);else if(rr<Gt.length){var Ba=Gt.length-rr;Qt.set(Gt.subarray(0,Ba)),Tr.set(Gt.subarray(Ba)),Tr.set(Ot,Ba)}else{var Ra=rr-Gt.length;Qt.set(Gt),Qt.set(Ot.subarray(0,Ra),Gt.length),Tr.set(Ot.subarray(Ra))}else Qt=Gt.concat(Ot),Tr=rr>=0&&rr<Qt.length?Qt.splice(rr,Qt.length):[];return[Qt,Tr]}var at=ue(Me,qe,Ce,Te,Pe),yt=Z.redraw(Me),Tt=[Me,at.update,Ce,at.maxPoints];return t.add(Me,Z.extendTraces,Tt,G,arguments),yt}function $(Me,qe,Ce){Me=A.getGraphDiv(Me);var Te=[],Pe=Z.deleteTraces,at=$,yt=[Me,Te],Tt=[Me,qe],Ot,Gt;for(U(Me,qe,Ce),Array.isArray(qe)||(qe=[qe]),qe=qe.map(function(rr){return A.extendFlat({},rr)}),w.cleanData(qe),Ot=0;Ot<qe.length;Ot++)Me.data.push(qe[Ot]);for(Ot=0;Ot<qe.length;Ot++)Te.push(-qe.length+Ot);if(typeof Ce>"u")return Gt=Z.redraw(Me),t.add(Me,Pe,yt,at,Tt),Gt;Array.isArray(Ce)||(Ce=[Ce]);try{N(Me,Te,Ce)}catch(rr){throw Me.data.splice(Me.data.length-qe.length,qe.length),rr}return t.startSequence(Me),t.add(Me,Pe,yt,at,Tt),Gt=Z.moveTraces(Me,Te,Ce),t.stopSequence(Me),Gt}function J(Me,qe){Me=A.getGraphDiv(Me);var Ce=[],Te=Z.addTraces,Pe=J,at=[Me,Ce,qe],yt=[Me,qe],Tt,Ot;if(typeof qe>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(qe)||(qe=[qe]),I(Me,qe,"indices"),qe=O(qe,Me.data.length-1),qe.sort(A.sorterDes),Tt=0;Tt<qe.length;Tt+=1)Ot=Me.data.splice(qe[Tt],1)[0],Ce.push(Ot);var Gt=Z.redraw(Me);return t.add(Me,Te,at,Pe,yt),Gt}function X(Me,qe,Ce){Me=A.getGraphDiv(Me);var Te=[],Pe=[],at=X,yt=X,Tt=[Me,Ce,qe],Ot=[Me,qe,Ce],Gt;if(N(Me,qe,Ce),qe=Array.isArray(qe)?qe:[qe],typeof Ce>"u")for(Ce=[],Gt=0;Gt<qe.length;Gt++)Ce.push(-qe.length+Gt);for(Ce=Array.isArray(Ce)?Ce:[Ce],qe=O(qe,Me.data.length-1),Ce=O(Ce,Me.data.length-1),Gt=0;Gt<Me.data.length;Gt++)qe.indexOf(Gt)===-1&&Te.push(Me.data[Gt]);for(Gt=0;Gt<qe.length;Gt++)Pe.push({newIndex:Ce[Gt],trace:Me.data[qe[Gt]]});for(Pe.sort(function(Qt,Tr){return Qt.newIndex-Tr.newIndex}),Gt=0;Gt<Pe.length;Gt+=1)Te.splice(Pe[Gt].newIndex,0,Pe[Gt].trace);Me.data=Te;var rr=Z.redraw(Me);return t.add(Me,at,Tt,yt,Ot),rr}function oe(Me,qe,Ce,Te){Me=A.getGraphDiv(Me),w.clearPromiseQueue(Me);var Pe={};if(typeof qe=="string")Pe[qe]=Ce;else if(A.isPlainObject(qe))Pe=A.extendFlat({},qe),Te===void 0&&(Te=Ce);else return A.warn("Restyle fail.",qe,Ce,Te),Promise.reject();Object.keys(Pe).length&&(Me.changed=!0);var at=w.coerceTraceIndices(Me,Te),yt=ce(Me,Pe,at),Tt=yt.flags;Tt.calc&&(Me.calcdata=void 0),Tt.clearAxisTypes&&w.clearAxisTypes(Me,at,{});var Ot=[];Tt.fullReplot?Ot.push(Z._doPlot):(Ot.push(a.previousPromises),a.supplyDefaults(Me),Tt.markerSize&&(a.doCalcdata(Me),ze(Ot)),Tt.style&&Ot.push(S.doTraceStyle),Tt.colorbars&&Ot.push(S.doColorBars),Ot.push(m)),Ot.push(a.rehover,a.redrag,a.reselect),t.add(Me,oe,[Me,yt.undoit,yt.traces],oe,[Me,yt.redoit,yt.traces]);var Gt=A.syncOrAsync(Ot,Me);return(!Gt||!Gt.then)&&(Gt=Promise.resolve()),Gt.then(function(){return Me.emit("plotly_restyle",yt.eventData),Me})}function ie(Me){return Me===void 0?null:Me}function j(Me,qe){return qe?function(Ce,Te,Pe){var at=M(Ce,Te),yt=at.set;return at.set=function(Tt){var Ot=(Pe||"")+Te;ee(Ot,at.get(),Tt,Me),yt(Tt)},at}:M}function ee(Me,qe,Ce,Te){if(Array.isArray(qe)||Array.isArray(Ce))for(var Pe=Array.isArray(qe)?qe:[],at=Array.isArray(Ce)?Ce:[],yt=Math.max(Pe.length,at.length),Tt=0;Tt<yt;Tt++)ee(Me+"["+Tt+"]",Pe[Tt],at[Tt],Te);else if(A.isPlainObject(qe)||A.isPlainObject(Ce)){var Ot=A.isPlainObject(qe)?qe:{},Gt=A.isPlainObject(Ce)?Ce:{},rr=A.extendFlat({},Ot,Gt);for(var Qt in rr)ee(Me+"."+Qt,Ot[Qt],Gt[Qt],Te)}else Te[Me]===void 0&&(Te[Me]=ie(qe))}function re(Me,qe,Ce){for(var Te in Ce){var Pe=M(Me,Te);ee(Te,Pe.get(),Ce[Te],qe)}}function ce(Me,qe,Ce){var Te=Me._fullLayout,Pe=Me._fullData,at=Me.data,yt=Te._guiEditing,Tt=j(Te._preGUI,yt),Ot=A.extendDeepAll({},qe),Gt,rr=E.traceFlags(),Qt={},Tr={},la;function Ua(){return Ce.map(function(){})}function Ba(kr){var ia=i.id2name(kr);la.indexOf(ia)===-1&&la.push(ia)}function Ra(kr){return"LAYOUT"+kr+".autorange"}function ei(kr){return"LAYOUT"+kr+".range"}function za(kr){for(var ia=kr;ia<Pe.length;ia++)if(Pe[ia]._input===at[kr])return Pe[ia]}function ti(kr,ia,Ca){if(Array.isArray(kr)){kr.forEach(function(Da){ti(Da,ia,Ca)});return}if(!(kr in qe||w.hasParent(qe,kr))){var Fa;if(kr.substr(0,6)==="LAYOUT")Fa=Tt(Me.layout,kr.replace("LAYOUT",""));else{var Ya=Ce[Ca],ha=Te._tracePreGUI[za(Ya)._fullInput.uid];Fa=j(ha,yt)(at[Ya],kr)}kr in Tr||(Tr[kr]=Ua()),Tr[kr][Ca]===void 0&&(Tr[kr][Ca]=ie(Fa.get())),ia!==void 0&&Fa.set(ia)}}function Ci(kr){return function(ia){return Pe[ia][kr]}}function Jt(kr){return function(ia,Ca){return ia===!1?Pe[Ce[Ca]][kr]:null}}for(var Nt in qe){if(w.hasParent(qe,Nt))throw new Error("cannot set "+Nt+" and a parent attribute simultaneously");var Kt=qe[Nt],Wt,Pr,ta,ma,ra,Ia;if((Nt==="autobinx"||Nt==="autobiny")&&(Nt=Nt.charAt(Nt.length-1)+"bins",Array.isArray(Kt)?Kt=Kt.map(Jt(Nt)):Kt===!1?Kt=Ce.map(Ci(Nt)):Kt=null),Qt[Nt]=Kt,Nt.substr(0,6)==="LAYOUT"){ta=Tt(Me.layout,Nt.replace("LAYOUT","")),Tr[Nt]=[ie(ta.get())],ta.set(Array.isArray(Kt)?Kt[0]:Kt),rr.calc=!0;continue}for(Tr[Nt]=Ua(),Gt=0;Gt<Ce.length;Gt++){Wt=at[Ce[Gt]],Pr=za(Ce[Gt]);var Ha=Te._tracePreGUI[Pr._fullInput.uid];if(ta=j(Ha,yt)(Wt,Nt),ma=ta.get(),ra=Array.isArray(Kt)?Kt[Gt%Kt.length]:Kt,ra!==void 0){var $a=ta.parts[ta.parts.length-1],ai=Nt.substr(0,Nt.length-$a.length-1),mi=ai?ai+".":"",xt=ai?M(Pr,ai).get():Pr;if(Ia=o.getTraceValObject(Pr,ta.parts),Ia&&Ia.impliedEdits&&ra!==null)for(var ct in Ia.impliedEdits)ti(A.relativeAttr(Nt,ct),Ia.impliedEdits[ct],Gt);else if(($a==="thicknessmode"||$a==="lenmode")&&ma!==ra&&(ra==="fraction"||ra==="pixels")&&xt){var Nr=Te._size,Or=xt.orient,Rr=Or==="top"||Or==="bottom";if($a==="thicknessmode"){var Lr=Rr?Nr.h:Nr.w;ti(mi+"thickness",xt.thickness*(ra==="fraction"?1/Lr:Lr),Gt)}else{var Gr=Rr?Nr.w:Nr.h;ti(mi+"len",xt.len*(ra==="fraction"?1/Gr:Gr),Gt)}}else if(Nt==="type"&&(ra==="pie"!=(ma==="pie")||ra==="funnelarea"!=(ma==="funnelarea"))){var Kr="x",Ur="y";(ra==="bar"||ma==="bar")&&Wt.orientation==="h"&&(Kr="y",Ur="x"),A.swapAttrs(Wt,["?","?src"],"labels",Kr),A.swapAttrs(Wt,["d?","?0"],"label",Kr),A.swapAttrs(Wt,["?","?src"],"values",Ur),ma==="pie"||ma==="funnelarea"?(M(Wt,"marker.color").set(M(Wt,"marker.colors").get()),Te._pielayer.selectAll("g.trace").remove()):r.traceIs(Wt,"cartesian")&&M(Wt,"marker.colors").set(M(Wt,"marker.color").get())}Tr[Nt][Gt]=ie(ma);var aa=["swapxy","swapxyaxes","orientation","orientationaxes"];if(aa.indexOf(Nt)!==-1){if(Nt==="orientation"){ta.set(ra);var da=Wt.x&&!Wt.y?"h":"v";if((ta.get()||da)===Pr.orientation)continue}else Nt==="orientationaxes"&&(Wt.orientation={v:"h",h:"v"}[Pr.orientation]);w.swapXYData(Wt),rr.calc=rr.clearAxisTypes=!0}else a.dataArrayContainers.indexOf(ta.parts[0])!==-1?(w.manageArrayContainers(ta,ra,Tr),rr.calc=!0):(Ia?Ia.arrayOk&&!r.traceIs(Pr,"regl")&&(A.isArrayOrTypedArray(ra)||A.isArrayOrTypedArray(ma))?rr.calc=!0:E.update(rr,Ia):rr.calc=!0,ta.set(ra))}}if(["swapxyaxes","orientationaxes"].indexOf(Nt)!==-1&&i.swap(Me,Ce),Nt==="orientationaxes"){var fa=M(Me.layout,"hovermode"),It=fa.get();It==="x"?fa.set("y"):It==="y"?fa.set("x"):It==="x unified"?fa.set("y unified"):It==="y unified"&&fa.set("x unified")}if(["orientation","type"].indexOf(Nt)!==-1){for(la=[],Gt=0;Gt<Ce.length;Gt++){var dr=at[Ce[Gt]];r.traceIs(dr,"cartesian")&&(Ba(dr.xaxis||"x"),Ba(dr.yaxis||"y"))}ti(la.map(Ra),!0,0),ti(la.map(ei),[0,1],0)}}return(rr.calc||rr.plot)&&(rr.fullReplot=!0),{flags:rr,undoit:Tr,redoit:Qt,traces:Ce,eventData:A.extendDeepNoArrays([],[Ot,Ce])}}function be(Me,qe,Ce){Me=A.getGraphDiv(Me),w.clearPromiseQueue(Me);var Te={};if(typeof qe=="string")Te[qe]=Ce;else if(A.isPlainObject(qe))Te=A.extendFlat({},qe);else return A.warn("Relayout fail.",qe,Ce),Promise.reject();Object.keys(Te).length&&(Me.changed=!0);var Pe=ot(Me,Te),at=Pe.flags;at.calc&&(Me.calcdata=void 0);var yt=[a.previousPromises];at.layoutReplot?yt.push(S.layoutReplot):Object.keys(Te).length&&(Ae(Me,at,Pe)||a.supplyDefaults(Me),at.legend&&yt.push(S.doLegend),at.layoutstyle&&yt.push(S.layoutStyles),at.axrange&&ze(yt,Pe.rangesAltered),at.ticks&&yt.push(S.doTicksRelayout),at.modebar&&yt.push(S.doModeBar),at.camera&&yt.push(S.doCamera),at.colorbars&&yt.push(S.doColorBars),yt.push(m)),yt.push(a.rehover,a.redrag,a.reselect),t.add(Me,be,[Me,Pe.undoit],be,[Me,Pe.redoit]);var Tt=A.syncOrAsync(yt,Me);return(!Tt||!Tt.then)&&(Tt=Promise.resolve(Me)),Tt.then(function(){return Me.emit("plotly_relayout",Pe.eventData),Me})}function Ae(Me,qe,Ce){var Te=Me._fullLayout;if(!qe.axrange)return!1;for(var Pe in qe)if(Pe!=="axrange"&&qe[Pe])return!1;var at,yt,Tt=function(la,Ua){return A.coerce(at,yt,s,la,Ua)},Ot={};for(var Gt in Ce.rangesAltered){var rr=i.id2name(Gt);if(at=Me.layout[rr],yt=Te[rr],n(at,yt,Tt,Ot),yt._matchGroup){for(var Qt in yt._matchGroup)if(Qt!==Gt){var Tr=Te[i.id2name(Qt)];Tr.autorange=yt.autorange,Tr.range=yt.range.slice(),Tr._input.range=yt.range.slice()}}}return!0}function ze(Me,qe){var Ce=qe?function(Te){var Pe=[],at=!0;for(var yt in qe){var Tt=i.getFromId(Te,yt);if(Pe.push(yt),(Tt.ticklabelposition||"").indexOf("inside")!==-1&&Tt._anchorAxis&&Pe.push(Tt._anchorAxis._id),Tt._matchGroup)for(var Ot in Tt._matchGroup)qe[Ot]||Pe.push(Ot)}return i.draw(Te,Pe,{skipTitle:at})}:function(Te){return i.draw(Te,"redraw")};Me.push(T,S.doAutoRangeAndConstraints,Ce,S.drawData,S.finalDraw)}var Re=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Xe=/^[xyz]axis[0-9]*\.autorange$/,it=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ot(Me,qe){var Ce=Me.layout,Te=Me._fullLayout,Pe=Te._guiEditing,at=j(Te._preGUI,Pe),yt=Object.keys(qe),Tt=i.list(Me),Ot=A.extendDeepAll({},qe),Gt={},rr,Qt,Tr;for(yt=Object.keys(qe),Qt=0;Qt<yt.length;Qt++)if(yt[Qt].indexOf("allaxes")===0){for(Tr=0;Tr<Tt.length;Tr++){var la=Tt[Tr]._id.substr(1),Ua=la.indexOf("scene")!==-1?la+".":"",Ba=yt[Qt].replace("allaxes",Ua+Tt[Tr]._name);qe[Ba]||(qe[Ba]=qe[yt[Qt]])}delete qe[yt[Qt]]}var Ra=E.layoutFlags(),ei={},za={};function ti(ha,Da){if(Array.isArray(ha)){ha.forEach(function(Li){ti(Li,Da)});return}if(!(ha in qe||w.hasParent(qe,ha))){var Xi=at(Ce,ha);ha in za||(za[ha]=ie(Xi.get())),Da!==void 0&&Xi.set(Da)}}var Ci={},Jt;function Nt(ha){var Da=i.name2id(ha.split(".")[0]);return Ci[Da]=1,Da}for(var Kt in qe){if(w.hasParent(qe,Kt))throw new Error("cannot set "+Kt+" and a parent attribute simultaneously");for(var Wt=at(Ce,Kt),Pr=qe[Kt],ta=Wt.parts.length,ma=ta-1;ma>0&&typeof Wt.parts[ma]!="string";)ma--;var ra=Wt.parts[ma],Ia=Wt.parts[ma-1]+"."+ra,Ha=Wt.parts.slice(0,ma).join("."),$a=M(Me.layout,Ha).get(),ai=M(Te,Ha).get(),mi=Wt.get();if(Pr!==void 0){ei[Kt]=Pr,za[Kt]=ra==="reverse"?Pr:ie(mi);var xt=o.getLayoutValObject(Te,Wt.parts);if(xt&&xt.impliedEdits&&Pr!==null)for(var ct in xt.impliedEdits)ti(A.relativeAttr(Kt,ct),xt.impliedEdits[ct]);if(["width","height"].indexOf(Kt)!==-1)if(Pr){ti("autosize",null);var Nr=Kt==="height"?"width":"height";ti(Nr,Te[Nr])}else Te[Kt]=Me._initialAutoSize[Kt];else if(Kt==="autosize")ti("width",Pr?null:Te.width),ti("height",Pr?null:Te.height);else if(Ia.match(Re))Nt(Ia),M(Te,Ha+"._inputRange").set(null);else if(Ia.match(Xe)){Nt(Ia),M(Te,Ha+"._inputRange").set(null);var Or=M(Te,Ha).get();Or._inputDomain&&(Or._input.domain=Or._inputDomain.slice())}else Ia.match(it)&&M(Te,Ha+"._inputDomain").set(null);if(ra==="type"){Jt=$a;var Rr=ai.type==="linear"&&Pr==="log",Lr=ai.type==="log"&&Pr==="linear";if(Rr||Lr){if(!Jt||!Jt.range)ti(Ha+".autorange",!0);else if(ai.autorange)Rr&&(Jt.range=Jt.range[1]>Jt.range[0]?[1,2]:[2,1]);else{var Gr=Jt.range[0],Kr=Jt.range[1];Rr?(Gr<=0&&Kr<=0&&ti(Ha+".autorange",!0),Gr<=0?Gr=Kr/1e6:Kr<=0&&(Kr=Gr/1e6),ti(Ha+".range[0]",Math.log(Gr)/Math.LN10),ti(Ha+".range[1]",Math.log(Kr)/Math.LN10)):(ti(Ha+".range[0]",Math.pow(10,Gr)),ti(Ha+".range[1]",Math.pow(10,Kr)))}Array.isArray(Te._subplots.polar)&&Te._subplots.polar.length&&Te[Wt.parts[0]]&&Wt.parts[1]==="radialaxis"&&delete Te[Wt.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Me,ai,Pr,ti),r.getComponentMethod("images","convertCoords")(Me,ai,Pr,ti)}else ti(Ha+".autorange",!0),ti(Ha+".range",null);M(Te,Ha+"._inputRange").set(null)}else if(ra.match(y)){var Ur=M(Te,Kt).get(),aa=(Pr||{}).type;(!aa||aa==="-")&&(aa="linear"),r.getComponentMethod("annotations","convertCoords")(Me,Ur,aa,ti),r.getComponentMethod("images","convertCoords")(Me,Ur,aa,ti)}var da=_.containerArrayMatch(Kt);if(da){rr=da.array,Qt=da.index;var fa=da.property,It=xt||{editType:"calc"};Qt!==""&&fa===""&&(_.isAddVal(Pr)?za[Kt]=null:_.isRemoveVal(Pr)?za[Kt]=(M(Ce,rr).get()||[])[Qt]:A.warn("unrecognized full object value",qe)),E.update(Ra,It),Gt[rr]||(Gt[rr]={});var dr=Gt[rr][Qt];dr||(dr=Gt[rr][Qt]={}),dr[fa]=Pr,delete qe[Kt]}else ra==="reverse"?($a.range?$a.range.reverse():(ti(Ha+".autorange",!0),$a.range=[1,0]),ai.autorange?Ra.calc=!0:Ra.plot=!0):(Kt==="dragmode"&&(Pr===!1&&mi!==!1||Pr!==!1&&mi===!1)||Te._has("scatter-like")&&Te._has("regl")&&Kt==="dragmode"&&(Pr==="lasso"||Pr==="select")&&!(mi==="lasso"||mi==="select")?Ra.plot=!0:xt?E.update(Ra,xt):Ra.calc=!0,Wt.set(Pr))}}for(rr in Gt){var kr=_.applyContainerArrayChanges(Me,at(Ce,rr),Gt[rr],Ra,at);kr||(Ra.plot=!0)}for(var ia in Ci){Jt=i.getFromId(Me,ia);var Ca=Jt&&Jt._constraintGroup;if(Ca){Ra.calc=!0;for(var Fa in Ca)Ci[Fa]||(i.getFromId(Me,Fa)._constraintShrinkable=!0)}}(tt(Me)||qe.height||qe.width)&&(Ra.plot=!0);var Ya=Te.shapes;for(Qt=0;Qt<Ya.length;Qt++)if(Ya[Qt].showlegend){Ra.calc=!0;break}return(Ra.plot||Ra.calc)&&(Ra.layoutReplot=!0),{flags:Ra,rangesAltered:Ci,undoit:za,redoit:ei,eventData:Ot}}function tt(Me){var qe=Me._fullLayout,Ce=qe.width,Te=qe.height;return Me.layout.autosize&&a.plotAutoSize(Me,Me.layout,qe),qe.width!==Ce||qe.height!==Te}function lt(Me,qe,Ce,Te){Me=A.getGraphDiv(Me),w.clearPromiseQueue(Me),A.isPlainObject(qe)||(qe={}),A.isPlainObject(Ce)||(Ce={}),Object.keys(qe).length&&(Me.changed=!0),Object.keys(Ce).length&&(Me.changed=!0);var Pe=w.coerceTraceIndices(Me,Te),at=ce(Me,A.extendFlat({},qe),Pe),yt=at.flags,Tt=ot(Me,A.extendFlat({},Ce)),Ot=Tt.flags;(yt.calc||Ot.calc)&&(Me.calcdata=void 0),yt.clearAxisTypes&&w.clearAxisTypes(Me,Pe,Ce);var Gt=[];Ot.layoutReplot?Gt.push(S.layoutReplot):yt.fullReplot?Gt.push(Z._doPlot):(Gt.push(a.previousPromises),Ae(Me,Ot,Tt)||a.supplyDefaults(Me),yt.style&&Gt.push(S.doTraceStyle),(yt.colorbars||Ot.colorbars)&&Gt.push(S.doColorBars),Ot.legend&&Gt.push(S.doLegend),Ot.layoutstyle&&Gt.push(S.layoutStyles),Ot.axrange&&ze(Gt,Tt.rangesAltered),Ot.ticks&&Gt.push(S.doTicksRelayout),Ot.modebar&&Gt.push(S.doModeBar),Ot.camera&&Gt.push(S.doCamera),Gt.push(m)),Gt.push(a.rehover,a.redrag,a.reselect),t.add(Me,lt,[Me,at.undoit,Tt.undoit,at.traces],lt,[Me,at.redoit,Tt.redoit,at.traces]);var rr=A.syncOrAsync(Gt,Me);return(!rr||!rr.then)&&(rr=Promise.resolve(Me)),rr.then(function(){return Me.emit("plotly_update",{data:at.eventData,layout:Tt.eventData}),Me})}function Ee(Me){return function(Ce){Ce._fullLayout._guiEditing=!0;var Te=Me.apply(null,arguments);return Ce._fullLayout._guiEditing=!1,Te}}var _e=[{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"}],fe=[{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 Fe(Me,qe){for(var Ce=0;Ce<qe.length;Ce++){var Te=qe[Ce],Pe=Me.match(Te.pattern);if(Pe){var at=Pe[1]||"";return{head:at,tail:Me.substr(at.length+1),attr:Te.attr}}}}function rt(Me,qe){var Ce=M(qe,Me).get();if(Ce!==void 0)return Ce;var Te=Me.split(".");for(Te.pop();Te.length>1;)if(Te.pop(),Ce=M(qe,Te.join(".")+".uirevision").get(),Ce!==void 0)return Ce;return qe.uirevision}function st(Me,qe){for(var Ce=0;Ce<qe.length;Ce++)if(qe[Ce]._fullInput.uid===Me)return Ce;return-1}function Qe(Me,qe,Ce){for(var Te=0;Te<qe.length;Te++)if(qe[Te].uid===Me)return Te;return!qe[Ce]||qe[Ce].uid?-1:Ce}function Lt(Me,qe){var Ce=A.isPlainObject(Me),Te=Array.isArray(Me);return Ce||Te?(Ce&&A.isPlainObject(qe)||Te&&Array.isArray(qe))&&JSON.stringify(Me)===JSON.stringify(qe):Me===qe}function kt(Me,qe,Ce,Te){var Pe=Te._preGUI,at,yt,Tt,Ot,Gt,rr,Qt,Tr,la,Ua,Ba=[],Ra={},ei={};for(at in Pe){if(Gt=Fe(at,_e),Gt){if(la=Gt.head,Ua=Gt.tail,yt=Gt.attr||la+".uirevision",Tt=M(Te,yt).get(),Ot=Tt&&rt(yt,qe),Ot&&Ot===Tt){if(rr=Pe[at],rr===null&&(rr=void 0),Qt=M(qe,at),Tr=Qt.get(),Lt(Tr,rr)){Tr===void 0&&Ua==="autorange"&&Ba.push(la),Qt.set(ie(M(Te,at).get()));continue}else if(Ua==="autorange"||Ua.substr(0,6)==="range["){var za=Pe[la+".range[0]"],ti=Pe[la+".range[1]"],Ci=Pe[la+".autorange"];if(Ci||Ci===null&&za===null&&ti===null){if(!(la in Ra)){var Jt=M(qe,la).get();Ra[la]=Jt&&(Jt.autorange||Jt.autorange!==!1&&(!Jt.range||Jt.range.length!==2))}if(Ra[la]){Qt.set(ie(M(Te,at).get()));continue}}}}}else A.warn("unrecognized GUI edit: "+at);delete Pe[at],Gt&&Gt.tail.substr(0,6)==="range["&&(ei[Gt.head]=1)}for(var Nt=0;Nt<Ba.length;Nt++){var Kt=Ba[Nt];if(ei[Kt]){var Wt=M(qe,Kt).get();Wt&&delete Wt.autorange}}var Pr=Te._tracePreGUI;for(var ta in Pr){var ma=Pr[ta],ra=null,Ia;for(at in ma){if(!ra){var Ha=st(ta,Ce);if(Ha<0){delete Pr[ta];break}var $a=Ce[Ha];Ia=$a._fullInput;var ai=Qe(ta,Me,Ia.index);if(ai<0){delete Pr[ta];break}ra=Me[ai]}if(Gt=Fe(at,fe),Gt){if(Gt.attr?(Tt=M(Te,Gt.attr).get(),Ot=Tt&&rt(Gt.attr,qe)):(Tt=Ia.uirevision,Ot=ra.uirevision,Ot===void 0&&(Ot=qe.uirevision)),Ot&&Ot===Tt&&(rr=ma[at],rr===null&&(rr=void 0),Qt=M(ra,at),Tr=Qt.get(),Lt(Tr,rr))){Qt.set(ie(M(Ia,at).get()));continue}}else A.warn("unrecognized GUI edit: "+at+" in trace uid "+ta);delete ma[at]}}}function Vt(Me,qe,Ce,Te){var Pe,at;function yt(){return Z.addFrames(Me,Pe)}Me=A.getGraphDiv(Me),w.clearPromiseQueue(Me);var Tt=Me._fullData,Ot=Me._fullLayout;if(!A.isPlotDiv(Me)||!Tt||!Ot)at=Z.newPlot(Me,qe,Ce,Te);else{if(A.isPlainObject(qe)){var Gt=qe;qe=Gt.data,Ce=Gt.layout,Te=Gt.config,Pe=Gt.frames}var rr=!1;if(Te){var Qt=A.extendDeep({},Me._context);Me._context=void 0,z(Me,Te),rr=jr(Qt,Me._context)}if(rr){let Ha=Me._ev.eventNames().map($a=>[$a,Me._ev.listeners($a)]);at=Z.newPlot(Me,qe,Ce,Te).then(()=>{for(let[$a,ai]of Ha)ai.forEach(mi=>Me.on($a,mi));return Z.react(Me,qe,Ce,Te)})}else{Me.data=qe||[],w.cleanData(Me.data),Me.layout=Ce||{},w.cleanLayout(Me.layout),kt(Me.data,Me.layout,Tt,Ot),a.supplyDefaults(Me,{skipUpdateCalc:!0});var Tr=Me._fullData,la=Me._fullLayout,Ua=la.datarevision===void 0,Ba=la.transition,Ra=Sr(Me,Ot,la,Ua,Ba),ei=Ra.newDataRevision,za=Zt(Me,Tt,Tr,Ua,Ba,ei);if(tt(Me)&&(Ra.layoutReplot=!0),za.calc||Ra.calc){Me.calcdata=void 0;for(var ti=Object.getOwnPropertyNames(la),Ci=0;Ci<ti.length;Ci++){var Jt=ti[Ci],Nt=Jt.substring(0,5);if(Nt==="xaxis"||Nt==="yaxis"){var Kt=la[Jt]._emptyCategories;Kt&&Kt()}}}else a.supplyDefaultsUpdateCalc(Me.calcdata,Tr);var Wt=[];if(Pe&&(Me._transitionData={},a.createTransitionData(Me),Wt.push(yt)),la.transition&&(za.anim||Ra.anim))Ra.ticks&&Wt.push(S.doTicksRelayout),a.doCalcdata(Me),S.doAutoRangeAndConstraints(Me),Wt.push(function(){return a.transitionFromReact(Me,za,Ra,Ot)});else if(za.fullReplot||Ra.layoutReplot)Me._fullLayout._skipDefaults=!0,Wt.push(Z._doPlot);else{for(var Pr in Ra.arrays){var ta=Ra.arrays[Pr];if(ta.length){var ma=r.getComponentMethod(Pr,"drawOne");if(ma!==A.noop)for(var ra=0;ra<ta.length;ra++)ma(Me,ta[ra]);else{var Ia=r.getComponentMethod(Pr,"draw");if(Ia===A.noop)throw new Error("cannot draw components: "+Pr);Ia(Me)}}}Wt.push(a.previousPromises),za.style&&Wt.push(S.doTraceStyle),(za.colorbars||Ra.colorbars)&&Wt.push(S.doColorBars),Ra.legend&&Wt.push(S.doLegend),Ra.layoutstyle&&Wt.push(S.layoutStyles),Ra.axrange&&ze(Wt),Ra.ticks&&Wt.push(S.doTicksRelayout),Ra.modebar&&Wt.push(S.doModeBar),Ra.camera&&Wt.push(S.doCamera),Wt.push(m)}Wt.push(a.rehover,a.redrag,a.reselect),at=A.syncOrAsync(Wt,Me),(!at||!at.then)&&(at=Promise.resolve(Me))}}return at.then(()=>(rr||Me.emit("plotly_react",{config:Te,data:qe,layout:Ce}),Me))}function Zt(Me,qe,Ce,Te,Pe,at){var yt=qe.length===Ce.length;if(!Pe&&!yt)return{fullReplot:!0,calc:!0};var Tt=E.traceFlags();Tt.arrays={},Tt.nChanges=0,Tt.nChangesAnim=0;var Ot,Gt;function rr(la){var Ua=o.getTraceValObject(Gt,la);return!Gt._module.animatable&&Ua.anim&&(Ua.anim=!1),Ua}var Qt={getValObject:rr,flags:Tt,immutable:Te,transition:Pe,newDataRevision:at,gd:Me},Tr={};for(Ot=0;Ot<qe.length;Ot++)if(Ce[Ot]){if(Gt=Ce[Ot]._fullInput,Tr[Gt.uid])continue;Tr[Gt.uid]=1,xr(qe[Ot]._fullInput,Gt,[],Qt)}return(Tt.calc||Tt.plot)&&(Tt.fullReplot=!0),Pe&&Tt.nChanges&&Tt.nChangesAnim&&(Tt.anim=Tt.nChanges===Tt.nChangesAnim&&yt?"all":"some"),Tt}function Sr(Me,qe,Ce,Te,Pe){var at=E.layoutFlags();at.arrays={},at.rangesAltered={},at.nChanges=0,at.nChangesAnim=0;function yt(Tr){return o.getLayoutValObject(Ce,Tr)}for(var Tt in Ce)if(!(!Tt.startsWith("xaxis")&&!Tt.startsWith("yaxis"))&&qe[Tt]){var Ot=Ce[Tt].domain,Gt=qe[Tt].domain,rr=qe[Tt]._inputDomain;qe[Tt]._inputDomain&&(Ot[0]===rr[0]&&Ot[1]===rr[1]?Ce[Tt].domain=qe[Tt].domain:(Ot[0]!==Gt[0]||Ot[1]!==Gt[1])&&(Ce[Tt]._inputDomain=null))}var Qt={getValObject:yt,flags:at,immutable:Te,transition:Pe,gd:Me};return xr(qe,Ce,[],Qt),(at.plot||at.calc)&&(at.layoutReplot=!0),Pe&&at.nChanges&&at.nChangesAnim&&(at.anim=at.nChanges===at.nChangesAnim?"all":"some"),at}function xr(Me,qe,Ce,Te){var Pe,at,yt,Tt=Te.getValObject,Ot=Te.flags,Gt=Te.immutable,rr=Te.inArray,Qt=Te.arrayIndex;function Tr(){var Ha=Pe.editType;if(rr&&Ha.indexOf("arraydraw")!==-1){A.pushUnique(Ot.arrays[rr],Qt);return}E.update(Ot,Pe),Ha!=="none"&&Ot.nChanges++,Te.transition&&Pe.anim&&Ot.nChangesAnim++,(Re.test(yt)||Xe.test(yt))&&(Ot.rangesAltered[Ce[0]]=1),at==="datarevision"&&(Ot.newDataRevision=1)}function la(Ha){return Ha.valType==="data_array"||Ha.arrayOk}for(at in Me){if(Ot.calc&&!Te.transition)return;var Ua=Me[at],Ba=qe[at],Ra=Ce.concat(at);if(yt=Ra.join("."),!(at.charAt(0)==="_"||typeof Ua=="function"||Ua===Ba)){if((at==="tick0"||at==="dtick")&&Ce[0]!=="geo"){var ei=qe.tickmode;if(ei==="auto"||ei==="array"||!ei)continue}if(!(at==="range"&&qe.autorange)&&!((at==="zmin"||at==="zmax")&&qe.type==="contourcarpet")&&(Pe=Tt(Ra),!!Pe&&!(Pe._compareAsJSON&&JSON.stringify(Ua)===JSON.stringify(Ba)))){var za=Pe.valType,ti,Ci=la(Pe),Jt=Array.isArray(Ua),Nt=Array.isArray(Ba);if(Jt&&Nt){var Kt="_input_"+at,Wt=Me[Kt],Pr=qe[Kt];if(Array.isArray(Wt)&&Wt===Pr)continue}if(Ba===void 0)Ci&&Jt?Ot.calc=!0:Tr();else if(Pe._isLinkedToArray){var ta=[],ma=!1;rr||(Ot.arrays[at]=ta);var ra=Math.min(Ua.length,Ba.length),Ia=Math.max(Ua.length,Ba.length);if(ra!==Ia)if(Pe.editType==="arraydraw")ma=!0;else{Tr();continue}for(ti=0;ti<ra;ti++)xr(Ua[ti],Ba[ti],Ra.concat(ti),A.extendFlat({inArray:at,arrayIndex:ti},Te));if(ma)for(ti=ra;ti<Ia;ti++)ta.push(ti)}else!za&&A.isPlainObject(Ua)?xr(Ua,Ba,Ra,Te):Ci?Jt&&Nt?(Gt&&(Ot.calc=!0),(Gt||Te.newDataRevision)&&Tr()):Jt!==Nt?Ot.calc=!0:Tr():Jt&&Nt?(Ua.length!==Ba.length||String(Ua)!==String(Ba))&&Tr():Tr()}}}for(at in qe)if(!(at in Me||at.charAt(0)==="_"||typeof qe[at]=="function"))if(Pe=Tt(Ce.concat(at)),la(Pe)&&Array.isArray(qe[at])){Ot.calc=!0;return}else Tr()}function jr(Me,qe){var Ce;for(Ce in Me)if(Ce.charAt(0)!=="_"){var Te=Me[Ce],Pe=qe[Ce];if(Te!==Pe)if(A.isPlainObject(Te)&&A.isPlainObject(Pe)){if(jr(Te,Pe))return!0}else if(Array.isArray(Te)&&Array.isArray(Pe)){if(Te.length!==Pe.length)return!0;for(var at=0;at<Te.length;at++)if(Te[at]!==Pe[at])if(A.isPlainObject(Te[at])&&A.isPlainObject(Pe[at])){if(jr(Te[at],Pe[at]))return!0}else return!0}else return!0}}function wr(Me,qe,Ce){if(Me=A.getGraphDiv(Me),!A.isPlotDiv(Me))throw new Error("This element is not a Plotly plot: "+Me+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var Te=Me._transitionData;Te._frameQueue||(Te._frameQueue=[]),Ce=a.supplyAnimationDefaults(Ce);var Pe=Ce.transition,at=Ce.frame;Te._frameWaitingCnt===void 0&&(Te._frameWaitingCnt=0);function yt(Gt){return Array.isArray(Pe)?Gt>=Pe.length?Pe[0]:Pe[Gt]:Pe}function Tt(Gt){return Array.isArray(at)?Gt>=at.length?at[0]:at[Gt]:at}function Ot(Gt,rr){var Qt=0;return function(){if(Gt&&++Qt===rr)return Gt()}}return new Promise(function(Gt,rr){function Qt(){if(Te._frameQueue.length!==0){for(;Te._frameQueue.length;){var ra=Te._frameQueue.pop();ra.onInterrupt&&ra.onInterrupt()}Me.emit("plotly_animationinterrupted",[])}}function Tr(ra){if(ra.length!==0){for(var Ia=0;Ia<ra.length;Ia++){var Ha;ra[Ia].type==="byname"?Ha=a.computeFrame(Me,ra[Ia].name):Ha=ra[Ia].data;var $a=Tt(Ia),ai=yt(Ia);ai.duration=Math.min(ai.duration,$a.duration);var mi={frame:Ha,name:ra[Ia].name,frameOpts:$a,transitionOpts:ai};Ia===ra.length-1&&(mi.onComplete=Ot(Gt,2),mi.onInterrupt=rr),Te._frameQueue.push(mi)}Ce.mode==="immediate"&&(Te._lastFrameAt=-1/0),Te._animationRaf||Ba()}}function la(){Me.emit("plotly_animated"),window.cancelAnimationFrame(Te._animationRaf),Te._animationRaf=null}function Ua(){Te._currentFrame&&Te._currentFrame.onComplete&&Te._currentFrame.onComplete();var ra=Te._currentFrame=Te._frameQueue.shift();if(ra){var Ia=ra.name?ra.name.toString():null;Me._fullLayout._currentFrame=Ia,Te._lastFrameAt=Date.now(),Te._timeToNext=ra.frameOpts.duration,a.transition(Me,ra.frame.data,ra.frame.layout,w.coerceTraceIndices(Me,ra.frame.traces),ra.frameOpts,ra.transitionOpts).then(function(){ra.onComplete&&ra.onComplete()}),Me.emit("plotly_animatingframe",{name:Ia,frame:ra.frame,animation:{frame:ra.frameOpts,transition:ra.transitionOpts}})}else la()}function Ba(){Me.emit("plotly_animating"),Te._lastFrameAt=-1/0,Te._timeToNext=0,Te._runningTransitions=0,Te._currentFrame=null;var ra=function(){Te._animationRaf=window.requestAnimationFrame(ra),Date.now()-Te._lastFrameAt>Te._timeToNext&&Ua()};ra()}var Ra=0;function ei(ra){return Array.isArray(Pe)?Ra>=Pe.length?ra.transitionOpts=Pe[Ra]:ra.transitionOpts=Pe[0]:ra.transitionOpts=Pe,Ra++,ra}var za,ti,Ci=[],Jt=qe==null,Nt=Array.isArray(qe),Kt=!Jt&&!Nt&&A.isPlainObject(qe);if(Kt)Ci.push({type:"object",data:ei(A.extendFlat({},qe))});else if(Jt||["string","number"].indexOf(typeof qe)!==-1)for(za=0;za<Te._frames.length;za++)ti=Te._frames[za],ti&&(Jt||String(ti.group)===String(qe))&&Ci.push({type:"byname",name:String(ti.name),data:ei({name:ti.name})});else if(Nt)for(za=0;za<qe.length;za++){var Wt=qe[za];["number","string"].indexOf(typeof Wt)!==-1?(Wt=String(Wt),Ci.push({type:"byname",name:Wt,data:ei({name:Wt})})):A.isPlainObject(Wt)&&Ci.push({type:"object",data:ei(A.extendFlat({},Wt))})}for(za=0;za<Ci.length;za++)if(ti=Ci[za],ti.type==="byname"&&!Te._frameHash[ti.data.name]){A.warn('animate failure: frame not found: "'+ti.data.name+'"'),rr();return}["next","immediate"].indexOf(Ce.mode)!==-1&&Qt(),Ce.direction==="reverse"&&Ci.reverse();var Pr=Me._fullLayout._currentFrame;if(Pr&&Ce.fromcurrent){var ta=-1;for(za=0;za<Ci.length;za++)if(ti=Ci[za],ti.type==="byname"&&ti.name===Pr){ta=za;break}if(ta>0&&ta<Ci.length-1){var ma=[];for(za=0;za<Ci.length;za++)ti=Ci[za],(Ci[za].type!=="byname"||za>ta)&&ma.push(ti);Ci=ma}}Ci.length>0?Tr(Ci):(Me.emit("plotly_animated"),Gt())})}function Ir(Me,qe,Ce){if(Me=A.getGraphDiv(Me),qe==null)return Promise.resolve();if(!A.isPlotDiv(Me))throw new Error("This element is not a Plotly plot: "+Me+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Te,Pe,at,yt,Tt=Me._transitionData._frames,Ot=Me._transitionData._frameHash;if(!Array.isArray(qe))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+qe);var Gt=Tt.length+qe.length*2,rr=[],Qt={};for(Te=qe.length-1;Te>=0;Te--)if(A.isPlainObject(qe[Te])){var Tr=qe[Te].name,la=(Ot[Tr]||Qt[Tr]||{}).name,Ua=qe[Te].name,Ba=Ot[la]||Qt[la];la&&Ua&&typeof Ua=="number"&&Ba&&b<p&&(b++,A.warn('addFrames: overwriting frame "'+(Ot[la]||Qt[la]).name+'" with a frame whose name of type "number" also equates to "'+la+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),b===p&&A.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.")),Qt[Tr]={name:Tr},rr.push({frame:a.supplyFrameDefaults(qe[Te]),index:Ce&&Ce[Te]!==void 0&&Ce[Te]!==null?Ce[Te]:Gt+Te})}rr.sort(function(Kt,Wt){return Kt.index>Wt.index?-1:Kt.index<Wt.index?1:0});var Ra=[],ei=[],za=Tt.length;for(Te=rr.length-1;Te>=0;Te--){if(Pe=rr[Te].frame,typeof Pe.name=="number"&&A.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Pe.name)for(;Ot[Pe.name="frame "+Me._transitionData._counter++];);if(Ot[Pe.name]){for(at=0;at<Tt.length&&(Tt[at]||{}).name!==Pe.name;at++);Ra.push({type:"replace",index:at,value:Pe}),ei.unshift({type:"replace",index:at,value:Tt[at]})}else yt=Math.max(0,Math.min(rr[Te].index,za)),Ra.push({type:"insert",index:yt,value:Pe}),ei.unshift({type:"delete",index:yt}),za++}var ti=a.modifyFrames,Ci=a.modifyFrames,Jt=[Me,ei],Nt=[Me,Ra];return t&&t.add(Me,ti,Jt,Ci,Nt),a.modifyFrames(Me,Ra)}function bt(Me,qe){if(Me=A.getGraphDiv(Me),!A.isPlotDiv(Me))throw new Error("This element is not a Plotly plot: "+Me);var Ce,Te,Pe=Me._transitionData._frames,at=[],yt=[];if(!qe)for(qe=[],Ce=0;Ce<Pe.length;Ce++)qe.push(Ce);for(qe=qe.slice(),qe.sort(),Ce=qe.length-1;Ce>=0;Ce--)Te=qe[Ce],at.push({type:"delete",index:Te}),yt.unshift({type:"insert",index:Te,value:Pe[Te]});var Tt=a.modifyFrames,Ot=a.modifyFrames,Gt=[Me,yt],rr=[Me,at];return t&&t.add(Me,Tt,Gt,Ot,rr),a.modifyFrames(Me,at)}function Be(Me){Me=A.getGraphDiv(Me);var qe=Me._fullLayout||{},Ce=Me._fullData||[];return a.cleanPlot([],{},Ce,qe),a.purge(Me),e.purge(Me),qe._container&&qe._container.remove(),delete Me._context,Me}function Ke(Me){var qe=Me._fullLayout,Ce=Me.getBoundingClientRect();if(!A.equalDomRects(Ce,qe._lastBBox)){var Te=qe._invTransform=A.inverseTransformMatrix(A.getFullTransformMatrix(Me));qe._invScaleX=Math.sqrt(Te[0][0]*Te[0][0]+Te[0][1]*Te[0][1]+Te[0][2]*Te[0][2]),qe._invScaleY=Math.sqrt(Te[1][0]*Te[1][0]+Te[1][1]*Te[1][1]+Te[1][2]*Te[1][2]),qe._lastBBox=Ce}}function Ue(Me){var qe=q.select(Me),Ce=Me._fullLayout;if(Ce._calcInverseTransform=Ke,Ce._calcInverseTransform(Me),Ce._container=qe.selectAll(".plot-container").data([0]),Ce._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ce._paperdiv=Ce._container.selectAll(".svg-container").data([0]),Ce._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ce._glcontainer=Ce._paperdiv.selectAll(".gl-container").data([{}]),Ce._glcontainer.enter().append("div").classed("gl-container",!0),Ce._paperdiv.selectAll(".main-svg").remove(),Ce._paperdiv.select(".modebar-container").remove(),Ce._paper=Ce._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ce._toppaper=Ce._paperdiv.append("svg").classed("main-svg",!0),Ce._modebardiv=Ce._paperdiv.append("div"),delete Ce._modeBar,Ce._hoverpaper=Ce._paperdiv.append("svg").classed("main-svg",!0),!Ce._uid){var Te={};q.selectAll("defs").each(function(){this.id&&(Te[this.id.split("-")[1]]=1)}),Ce._uid=A.randstr(Te)}Ce._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),Ce._defs=Ce._paper.append("defs").attr("id","defs-"+Ce._uid),Ce._clips=Ce._defs.append("g").classed("clips",!0),Ce._topdefs=Ce._toppaper.append("defs").attr("id","topdefs-"+Ce._uid),Ce._topclips=Ce._topdefs.append("g").classed("clips",!0),Ce._bgLayer=Ce._paper.append("g").classed("bglayer",!0),Ce._draggers=Ce._paper.append("g").classed("draglayer",!0);var Pe=Ce._paper.append("g").classed("layer-below",!0);Ce._imageLowerLayer=Pe.append("g").classed("imagelayer",!0),Ce._shapeLowerLayer=Pe.append("g").classed("shapelayer",!0),Ce._cartesianlayer=Ce._paper.append("g").classed("cartesianlayer",!0),Ce._polarlayer=Ce._paper.append("g").classed("polarlayer",!0),Ce._smithlayer=Ce._paper.append("g").classed("smithlayer",!0),Ce._ternarylayer=Ce._paper.append("g").classed("ternarylayer",!0),Ce._geolayer=Ce._paper.append("g").classed("geolayer",!0),Ce._funnelarealayer=Ce._paper.append("g").classed("funnelarealayer",!0),Ce._pielayer=Ce._paper.append("g").classed("pielayer",!0),Ce._iciclelayer=Ce._paper.append("g").classed("iciclelayer",!0),Ce._treemaplayer=Ce._paper.append("g").classed("treemaplayer",!0),Ce._sunburstlayer=Ce._paper.append("g").classed("sunburstlayer",!0),Ce._indicatorlayer=Ce._toppaper.append("g").classed("indicatorlayer",!0),Ce._glimages=Ce._paper.append("g").classed("glimages",!0);var at=Ce._toppaper.append("g").classed("layer-above",!0);Ce._imageUpperLayer=at.append("g").classed("imagelayer",!0),Ce._shapeUpperLayer=at.append("g").classed("shapelayer",!0),Ce._selectionLayer=Ce._toppaper.append("g").classed("selectionlayer",!0),Ce._infolayer=Ce._toppaper.append("g").classed("infolayer",!0),Ce._menulayer=Ce._toppaper.append("g").classed("menulayer",!0),Ce._zoomlayer=Ce._toppaper.append("g").classed("zoomlayer",!0),Ce._hoverlayer=Ce._hoverpaper.append("g").classed("hoverlayer",!0),Ce._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Me.emit("plotly_framework")}Z.animate=wr,Z.addFrames=Ir,Z.deleteFrames=bt,Z.addTraces=$,Z.deleteTraces=J,Z.extendTraces=he,Z.moveTraces=X,Z.prependTraces=G,Z.newPlot=B,Z._doPlot=u,Z.purge=Be,Z.react=Vt,Z.redraw=F,Z.relayout=be,Z.restyle=oe,Z.setPlotConfig=h,Z.update=lt,Z._guiRelayout=Ee(be),Z._guiRestyle=Ee(oe),Z._guiUpdate=Ee(lt),Z._storeDirectGUIEdit=re}}),Zv=Ze({"src/snapshot/helpers.js"(Z){"use strict";var q=oo();Z.getDelay=function(A){return A._has&&(A._has("gl3d")||A._has("mapbox")||A._has("map"))?500:0},Z.getRedrawFunc=function(A){return function(){q.getComponentMethod("colorbar","draw")(A)}},Z.encodeSVG=function(A){return"data:image/svg+xml,"+encodeURIComponent(A)},Z.encodeJSON=function(A){return"data:application/json,"+encodeURIComponent(A)};var d=window.URL||window.webkitURL;Z.createObjectURL=function(A){return d.createObjectURL(A)},Z.revokeObjectURL=function(A){return d.revokeObjectURL(A)},Z.createBlob=function(A,M){if(M==="svg")return new window.Blob([A],{type:"image/svg+xml;charset=utf-8"});if(M==="full-json")return new window.Blob([A],{type:"application/json;charset=utf-8"});var e=x(window.atob(A));return new window.Blob([e],{type:"image/"+M})},Z.octetStream=function(A){document.location.href="data:application/octet-stream"+A};function x(A){for(var M=A.length,e=new ArrayBuffer(M),t=new Uint8Array(e),r=0;r<M;r++)t[r]=A.charCodeAt(r);return e}Z.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/}}),k2=Ze({"src/snapshot/tosvg.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=Yn(),e=vd(),t=/"/g,r="TOBESTRIPPED",o=new RegExp('("'+r+")|("+r+'")',"g");function a(n){var s=d.select("body").append("div").style({display:"none"}).html(""),c=n.replace(/(&[^;]*;)/gi,function(f){return f==="&lt;"?"&#60;":f==="&rt;"?"&#62;":f.indexOf("<")!==-1||f.indexOf(">")!==-1?"":s.html(f).text()});return s.remove(),c}function i(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}q.exports=function(s,c,f){var g=s._fullLayout,v=g._paper,T=g._toppaper,l=g.width,_=g.height,w;v.insert("rect",":first-child").call(A.setRect,0,0,l,_).call(M.fill,g.paper_bgcolor);var S=g._basePlotModules||[];for(w=0;w<S.length;w++){var E=S[w];E.toSVG&&E.toSVG(s)}if(T){var y=T.node().childNodes,b=Array.prototype.slice.call(y);for(w=0;w<b.length;w++){var p=b[w];p.childNodes.length&&v.node().appendChild(p)}}g._draggers&&g._draggers.remove(),v.node().style.background="",v.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var m=d.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){m.remove();return}else m.style({visibility:null,display:null});var h=this.style.fontFamily;h&&h.indexOf('"')!==-1&&m.style("font-family",h.replace(t,r));var P=this.style.fontWeight;P&&(P==="normal"||P==="400")&&m.style("font-weight",void 0);var L=this.style.fontStyle;L&&L==="normal"&&m.style("font-style",void 0);var z=this.style.fontVariant;z&&z==="normal"&&m.style("font-variant",void 0)}),v.selectAll(".gradient_filled,.pattern_filled").each(function(){var m=d.select(this),h=this.style.fill;h&&h.indexOf("url(")!==-1&&m.style("fill",h.replace(t,r));var P=this.style.stroke;P&&P.indexOf("url(")!==-1&&m.style("stroke",P.replace(t,r))}),(c==="pdf"||c==="eps")&&v.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),c==="svg"&&f&&(v.attr("width",f*l),v.attr("height",f*_),v.attr("viewBox","0 0 "+l+" "+_));var u=new window.XMLSerializer().serializeToString(v.node());return u=a(u),u=i(u),u=u.replace(o,"'"),u}}}),L2=Ze({"src/snapshot/svgtoimg.js"(Z,q){"use strict";var d=ca(),x=W0().EventEmitter,A=Zv();function M(e){var t=e.emitter||new x,r=new Promise(function(o,a){var i=window.Image,n=e.svg,s=e.format||"png",c=e.canvas,f=e.scale||1,g=e.width||300,v=e.height||150,T=f*g,l=f*v,_=c.getContext("2d",{willReadFrequently:!0}),w=new i,S,E;s==="svg"||d.isSafari()?E=A.encodeSVG(n):(S=A.createBlob(n,"svg"),E=A.createObjectURL(S)),c.width=T,c.height=l,w.onload=function(){var y;switch(S=null,A.revokeObjectURL(E),s!=="svg"&&_.drawImage(w,0,0,T,l),s){case"jpeg":y=c.toDataURL("image/jpeg");break;case"png":y=c.toDataURL("image/png");break;case"webp":y=c.toDataURL("image/webp");break;case"svg":y=E;break;default:var b="Image format is not jpeg, png, svg or webp.";if(a(new Error(b)),!e.promise)return t.emit("error",b)}o(y),e.promise||t.emit("success",y)},w.onerror=function(y){if(S=null,A.revokeObjectURL(E),a(y),!e.promise)return t.emit("error",y)},w.src=E});return e.promise?r:t}q.exports=M}}),I5=Ze({"src/plot_api/to_image.js"(Z,q){"use strict";var d=ns(),x=C2(),A=xc(),M=ca(),e=Zv(),t=k2(),r=L2(),o=Eh().version,a={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 i(n,s){s=s||{};var c,f,g,v;M.isPlainObject(n)?(c=n.data||[],f=n.layout||{},g=n.config||{},v={}):(n=M.getGraphDiv(n),c=M.extendDeep([],n.data),f=M.extendDeep({},n.layout),g=n._context,v=n._fullLayout||{});function T(B){return!(B in s)||M.validate(s[B],a[B])}if(!T("width")&&s.width!==null||!T("height")&&s.height!==null)throw new Error("Height and width should be pixel values.");if(!T("format"))throw new Error("Export format is not "+M.join2(a.format.values,", "," or ")+".");var l={};function _(B,O){return M.coerce(s,l,a,B,O)}var w=_("format"),S=_("width"),E=_("height"),y=_("scale"),b=_("setBackground"),p=_("imageDataOnly"),u=document.createElement("div");u.style.position="absolute",u.style.left="-5000px",document.body.appendChild(u);var m=M.extendFlat({},f);S?m.width=S:s.width===null&&d(v.width)&&(m.width=v.width),E?m.height=E:s.height===null&&d(v.height)&&(m.height=v.height);var h=M.extendFlat({},g,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),P=e.getRedrawFunc(u);function L(){return new Promise(function(B){setTimeout(B,e.getDelay(u._fullLayout))})}function z(){return new Promise(function(B,O){var I=t(u,w,y),N=u._fullLayout.width,U=u._fullLayout.height;function W(){x.purge(u),document.body.removeChild(u)}if(w==="full-json"){var Q=A.graphJson(u,!1,"keepdata","object",!0,!0);return Q.version=o,Q=JSON.stringify(Q),W(),B(p?Q:e.encodeJSON(Q))}if(W(),w==="svg")return B(p?I:e.encodeSVG(I));var ue=document.createElement("canvas");ue.id=M.randstr(),r({format:w,width:N,height:U,scale:y,canvas:ue,svg:I,promise:!0}).then(B).catch(O)})}function F(B){return p?B.replace(e.IMAGE_URL_PREFIX,""):B}return new Promise(function(B,O){x.newPlot(u,c,m,h).then(P).then(L).then(z).then(function(I){B(F(I))}).catch(function(I){O(I)})})}q.exports=i}}),Nz=Ze({"src/plot_api/validate.js"(Z,q){"use strict";var d=ca(),x=xc(),A=e1(),M=H0().dfltConfig,e=d.isPlainObject,t=Array.isArray,r=d.isArrayOrTypedArray;q.exports=function(_,w){_===void 0&&(_=[]),w===void 0&&(w={});var S=A.get(),E=[],y={_context:d.extendFlat({},M)},b,p;t(_)?(y.data=d.extendDeep([],_),b=_):(y.data=[],b=[],E.push(s("array","data"))),e(w)?(y.layout=d.extendDeep({},w),p=w):(y.layout={},p={},arguments.length>1&&E.push(s("object","layout"))),x.supplyDefaults(y);for(var u=y._fullData,m=b.length,h=0;h<m;h++){var P=b[h],L=["data",h];if(!e(P)){E.push(s("object",L));continue}var z=u[h],F=z.type,B=S.traces[F].attributes;B.type={valType:"enumerated",values:[F]},z.visible===!1&&P.visible!==!1&&E.push(s("invisible",L)),o(P,z,B,E,L)}var O=y._fullLayout,I=a(S,u);return o(p,O,I,E,"layout"),E.length===0?void 0:E};function o(l,_,w,S,E,y){y=y||[];for(var b=Object.keys(l),p=0;p<b.length;p++){var u=b[p],m=y.slice();m.push(u);var h=l[u],P=_[u],L=f(w,u),z=(L||{}).valType,F=z==="info_array",B=z==="colorscale",O=(L||{}).items;if(!c(w,u))S.push(s("schema",E,m));else if(e(h)&&e(P)&&z!=="any")o(h,P,L,S,E,m);else if(F&&t(h)){h.length>P.length&&S.push(s("unused",E,m.concat(P.length)));var I=P.length,N=Array.isArray(O);N&&(I=Math.min(I,O.length));var U,W,Q,ue,le;if(L.dimensions===2)for(W=0;W<I;W++)if(t(h[W])){h[W].length>P[W].length&&S.push(s("unused",E,m.concat(W,P[W].length)));var he=P[W].length;for(U=0;U<(N?Math.min(he,O[W].length):he);U++)Q=N?O[W][U]:O,ue=h[W][U],le=P[W][U],d.validate(ue,Q)?le!==ue&&le!==+ue&&S.push(s("dynamic",E,m.concat(W,U),ue,le)):S.push(s("value",E,m.concat(W,U),ue))}else S.push(s("array",E,m.concat(W),h[W]));else for(W=0;W<I;W++)Q=N?O[W]:O,ue=h[W],le=P[W],d.validate(ue,Q)?le!==ue&&le!==+ue&&S.push(s("dynamic",E,m.concat(W),ue,le)):S.push(s("value",E,m.concat(W),ue))}else if(L.items&&!F&&t(h)){var G=O[Object.keys(O)[0]],$=[],J,X;for(J=0;J<P.length;J++){var oe=P[J]._index||J;if(X=m.slice(),X.push(oe),e(h[oe])&&e(P[J])){$.push(oe);var ie=h[oe],j=P[J];e(ie)&&ie.visible!==!1&&j.visible===!1?S.push(s("invisible",E,X)):o(ie,j,G,S,E,X)}}for(J=0;J<h.length;J++)X=m.slice(),X.push(J),e(h[J])?$.indexOf(J)===-1&&S.push(s("unused",E,X)):S.push(s("object",E,X,h[J]))}else!e(h)&&e(P)?S.push(s("object",E,m,h)):!r(h)&&r(P)&&!F&&!B?S.push(s("array",E,m,h)):u in _?d.validate(h,L)?L.valType==="enumerated"&&(L.coerceNumber&&h!==+P||!r(h)&&h!==P||String(h)!==String(P))&&S.push(s("dynamic",E,m,h,P)):S.push(s("value",E,m,h)):S.push(s("unused",E,m,h))}return S}function a(l,_){for(var w=l.layout.layoutAttributes,S=0;S<_.length;S++){var E=_[S],y=l.traces[E.type],b=y.layoutAttributes;b&&(E.subplot?d.extendFlat(w[y.attributes.subplot.dflt],b):d.extendFlat(w,b))}return w}var i={object:function(l,_){var w;return l==="layout"&&_===""?w="The layout argument":l[0]==="data"&&_===""?w="Trace "+l[1]+" in the data argument":w=n(l)+"key "+_,w+" must be linked to an object container"},array:function(l,_){var w;return l==="data"?w="The data argument":w=n(l)+"key "+_,w+" must be linked to an array container"},schema:function(l,_){return n(l)+"key "+_+" is not part of the schema"},unused:function(l,_,w){var S=e(w)?"container":"key";return n(l)+S+" "+_+" did not get coerced"},dynamic:function(l,_,w,S){return[n(l)+"key",_,"(set to '"+w+"')","got reset to","'"+S+"'","during defaults."].join(" ")},invisible:function(l,_){return(_?n(l)+"item "+_:"Trace "+l[1])+" got defaulted to be not visible"},value:function(l,_,w){return[n(l)+"key "+_,"is set to an invalid value ("+w+")"].join(" ")}};function n(l){return t(l)?"In data trace "+l[1]+", ":"In "+l+", "}function s(l,_,w,S,E){w=w||"";var y,b;t(_)?(y=_[0],b=_[1]):(y=_,b=null);var p=T(w),u=i[l](_,p,S,E);return d.log(u),{code:l,container:y,trace:b,path:w,astr:p,msg:u}}function c(l,_){var w=v(_),S=w.keyMinusId,E=w.id;return S in l&&l[S]._isSubplotObj&&E?!0:_ in l}function f(l,_){if(_ in l)return l[_];var w=v(_);return l[w.keyMinusId]}var g=d.counterRegex("([a-z]+)");function v(l){var _=l.match(g);return{keyMinusId:_&&_[1],id:_&&_[2]}}function T(l){if(!t(l))return String(l);for(var _="",w=0;w<l.length;w++){var S=l[w];typeof S=="number"?_=_.substr(0,_.length-1)+"["+S+"]":_+=S,w<l.length-1&&(_+=".")}return _}}}),Uz=Ze({"src/snapshot/filesaver.js"(Z,q){"use strict";var d=ca(),x=Zv();function A(M,e,t){var r=document.createElement("a"),o="download"in r,a=new Promise(function(i,n){var s,c;if(o)return s=x.createBlob(M,t),c=x.createObjectURL(s),r.href=c,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),x.revokeObjectURL(c),s=null,i(e);if(d.isSafari()){var f=t==="svg"?",":";base64,";return x.octetStream(f+encodeURIComponent(M)),i(e)}n(new Error("download error"))});return a}q.exports=A}}),R5=Ze({"src/snapshot/download.js"(Z,q){"use strict";var d=ca(),x=I5(),A=Uz(),M=Zv();function e(t,r){var o;return d.isPlainObject(t)||(o=d.getGraphDiv(t)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,i){o&&o._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),o&&(o._snapshotInProgress=!0);var n=x(t,r),s=r.filename||t.fn||"newplot";s+="."+r.format.replace("-","."),n.then(function(c){return o&&(o._snapshotInProgress=!1),A(c,s,r.format)}).then(function(c){a(c)}).catch(function(c){o&&(o._snapshotInProgress=!1),i(c)})})}q.exports=e}}),jz=Ze({"src/plot_api/template_api.js"(Z){"use strict";var q=ca(),d=q.isPlainObject,x=e1(),A=xc(),M=eu(),e=Dl(),t=H0().dfltConfig;Z.makeTemplate=function(g){g=q.isPlainObject(g)?g:q.getGraphDiv(g),g=q.extendDeep({_context:t},{data:g.data,layout:g.layout}),A.supplyDefaults(g);var v=g.data||[],T=g.layout||{};T._basePlotModules=g._fullLayout._basePlotModules,T._modules=g._fullLayout._modules;var l={data:{},layout:{}};v.forEach(function(h){var P={};a(h,P,n.bind(null,h));var L=q.coerce(h,{},M,"type"),z=l.data[L];z||(z=l.data[L]=[]),z.push(P)}),a(T,l.layout,i.bind(null,T)),delete l.layout.template;var _=T.template;if(d(_)){var w=_.layout,S,E,y,b,p,u;d(w)&&r(w,l.layout);var m=_.data;if(d(m)){for(E in l.data)if(y=m[E],Array.isArray(y)){for(p=l.data[E],u=p.length,b=y.length,S=0;S<u;S++)r(y[S%b],p[S]);for(S=u;S<b;S++)p.push(q.extendDeep({},y[S]))}for(E in m)E in l.data||(l.data[E]=q.extendDeep([],m[E]))}}return l};function r(g,v){g=q.extendDeep({},g);var T=Object.keys(g).sort(),l,_;function w(p,u,m){if(d(u)&&d(p))r(p,u);else if(Array.isArray(u)&&Array.isArray(p)){var h=e.arrayTemplater({_template:g},m);for(_=0;_<u.length;_++){var P=u[_],L=h.newItem(P)._template;L&&r(L,P)}var z=h.defaultItems();for(_=0;_<z.length;_++)u.push(z[_]._template);for(_=0;_<u.length;_++)delete u[_].templateitemname}}for(l=0;l<T.length;l++){var S=T[l],E=g[S];if(S in v?w(E,v[S],S):v[S]=E,o(S)===S)for(var y in v){var b=o(y);y!==b&&b===S&&!(y in g)&&w(E,v[y],S)}}}function o(g){return g.replace(/[0-9]+$/,"")}function a(g,v,T,l,_){var w=_&&T(_);for(var S in g){var E=g[S],y=s(g,S,l),b=s(g,S,_),p=T(b);if(!p){var u=o(S);u!==S&&(b=s(g,u,_),p=T(b))}if(!(w&&w===p)&&!(!p||p._noTemplating||p.valType==="data_array"||p.arrayOk&&Array.isArray(E)))if(!p.valType&&d(E))a(E,v,T,y,b);else if(p._isLinkedToArray&&Array.isArray(E))for(var m=!1,h=0,P={},L=0;L<E.length;L++){var z=E[L];if(d(z)){var F=z.name;if(F)P[F]||(a(z,v,T,s(E,h,y),s(E,h,b)),h++,P[F]=1);else if(!m){var B=e.arrayDefaultKey(S),O=s(g,B,l),I=s(E,h,y);a(z,v,T,I,s(E,h,b));var N=q.nestedProperty(v,I),U=q.nestedProperty(v,O);U.set(N.get()),N.set(null),m=!0}}}else{var W=q.nestedProperty(v,y);W.set(E)}}}function i(g,v){return x.getLayoutValObject(g,q.nestedProperty({},v).parts)}function n(g,v){return x.getTraceValObject(g,q.nestedProperty({},v).parts)}function s(g,v,T){var l;return T?Array.isArray(g)?l=T+"["+v+"]":l=T+"."+v:l=v,l}Z.validateTemplate=function(g,v){var T=q.extendDeep({},{_context:t,data:g.data,layout:g.layout}),l=T.layout||{};d(v)||(v=l.template||{});var _=v.layout,w=v.data,S=[];T.layout=l,T.layout.template=v,A.supplyDefaults(T);var E=T._fullLayout,y=T._fullData,b={};function p(O,I){for(var N in O)if(N.charAt(0)!=="_"&&d(O[N])){var U=o(N),W=[],Q;for(Q=0;Q<I.length;Q++)W.push(s(O,N,I[Q])),U!==N&&W.push(s(O,U,I[Q]));for(Q=0;Q<W.length;Q++)b[W[Q]]=1;p(O[N],W)}}function u(O,I){for(var N in O)if(N.indexOf("defaults")===-1&&d(O[N])){var U=s(O,N,I);b[U]?u(O[N],U):S.push({code:"unused",path:U})}}if(d(_)?(p(E,["layout"]),u(_,"layout")):S.push({code:"layout"}),!d(w))S.push({code:"data"});else{for(var m={},h,P=0;P<y.length;P++){var L=y[P];h=L.type,m[h]=(m[h]||0)+1,L._fullInput._template||S.push({code:"missing",index:L.index,traceType:h})}for(h in w){var z=w[h].length,F=m[h]||0;z>F?S.push({code:"unused",traceType:h,templateCount:z,dataCount:F}):F>z&&S.push({code:"reused",traceType:h,templateCount:z,dataCount:F})}}function B(O,I){for(var N in O)if(N.charAt(0)!=="_"){var U=O[N],W=s(O,N,I);d(U)?(Array.isArray(O)&&U._template===!1&&U.templateitemname&&S.push({code:"missing",path:W,templateitemname:U.templateitemname}),B(U,W)):Array.isArray(U)&&c(U)&&B(U,W)}}if(B({data:y,layout:E},""),S.length)return S.map(f)};function c(g){for(var v=0;v<g.length;v++)if(d(g[v]))return!0}function f(g){var v;switch(g.code){case"data":v="The template has no key data.";break;case"layout":v="The template has no key layout.";break;case"missing":g.path?v="There are no templates for item "+g.path+" with name "+g.templateitemname:v="There are no templates for trace "+g.index+", of type "+g.traceType+".";break;case"unused":g.path?v="The template item at "+g.path+" was not used in constructing the plot.":g.dataCount?v="Some of the templates of type "+g.traceType+" were not used. The template has "+g.templateCount+" traces, the data only has "+g.dataCount+" of this type.":v="The template has "+g.templateCount+" traces of type "+g.traceType+" but there are none in the data.";break;case"reused":v="Some of the templates of type "+g.traceType+" were used more than once. The template has "+g.templateCount+" traces, the data has "+g.dataCount+" of this type.";break}return g.msg=v,g}}}),qz=Ze({"src/plot_api/index.js"(Z){"use strict";var q=C2();Z._doPlot=q._doPlot,Z.newPlot=q.newPlot,Z.restyle=q.restyle,Z.relayout=q.relayout,Z.redraw=q.redraw,Z.update=q.update,Z._guiRestyle=q._guiRestyle,Z._guiRelayout=q._guiRelayout,Z._guiUpdate=q._guiUpdate,Z._storeDirectGUIEdit=q._storeDirectGUIEdit,Z.react=q.react,Z.extendTraces=q.extendTraces,Z.prependTraces=q.prependTraces,Z.addTraces=q.addTraces,Z.deleteTraces=q.deleteTraces,Z.moveTraces=q.moveTraces,Z.purge=q.purge,Z.addFrames=q.addFrames,Z.deleteFrames=q.deleteFrames,Z.animate=q.animate,Z.setPlotConfig=q.setPlotConfig;var d=T_().getGraphDiv,x=E2().eraseActiveShape;Z.deleteActiveShape=function(M){return x(d(M))},Z.toImage=I5(),Z.validate=Nz(),Z.downloadImage=R5();var A=jz();Z.makeTemplate=A.makeTemplate,Z.validateTemplate=A.validateTemplate}}),n1=Ze({"src/traces/scatter/xy_defaults.js"(Z,q){"use strict";var d=ca(),x=oo();q.exports=function(M,e,t,r){var o=r("x"),a=r("y"),i,n=x.getComponentMethod("calendars","handleTraceDefaults");if(n(M,e,["x","y"],t),o){var s=d.minRowLength(o);a?i=Math.min(s,d.minRowLength(a)):(i=s,r("y0"),r("dy"))}else{if(!a)return 0;i=d.minRowLength(a),r("x0"),r("dx")}return e._length=i,i}}}),Qd=Ze({"src/traces/scatter/period_defaults.js"(Z,q){"use strict";var d=ca().dateTick0,x=qs(),A=x.ONEWEEK;function M(e,t){return e%A===0?d(t,1):d(t,0)}q.exports=function(t,r,o,a,i){if(i||(i={x:!0,y:!0}),i.x){var n=a("xperiod");n&&(a("xperiod0",M(n,r.xcalendar)),a("xperiodalignment"))}if(i.y){var s=a("yperiod");s&&(a("yperiod0",M(s,r.ycalendar)),a("yperiodalignment"))}}}}),Vz=Ze({"src/traces/scatter/stack_defaults.js"(Z,q){"use strict";var d=["orientation","groupnorm","stackgaps"];q.exports=function(A,M,e,t){var r=e._scatterStackOpts,o=t("stackgroup");if(o){var a=M.xaxis+M.yaxis,i=r[a];i||(i=r[a]={});var n=i[o],s=!1;n?n.traces.push(M):(n=i[o]={traceIndices:[],traces:[M]},s=!0);for(var c={orientation:M.x&&!M.y?"h":"v"},f=0;f<d.length;f++){var g=d[f],v=g+"Found";if(!n[v]){var T=A[g]!==void 0,l=g==="orientation";if((T||s)&&(n[g]=t(g,c[g]),l&&(n.fillDflt=n[g]==="h"?"tonextx":"tonexty"),T&&(n[v]=!0,!s&&(delete n.traces[0][g],l))))for(var _=0;_<n.traces.length-1;_++){var w=n.traces[_];w._input.fill!==w.fill&&(w.fill=n.fillDflt)}}}return n}}}}),md=Ze({"src/traces/scatter/marker_defaults.js"(Z,q){"use strict";var d=Yn(),x=bp().hasColorscale,A=gh(),M=Fu();q.exports=function(t,r,o,a,i,n){var s=M.isBubble(t),c=(t.line||{}).color,f;if(n=n||{},c&&(o=c),i("marker.symbol"),i("marker.opacity",s?.7:1),i("marker.size"),n.noAngle||(i("marker.angle"),n.noAngleRef||i("marker.angleref"),n.noStandOff||i("marker.standoff")),i("marker.color",o),x(t,"marker")&&A(t,r,a,i,{prefix:"marker.",cLetter:"c"}),n.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),n.noLine||(c&&!Array.isArray(c)&&r.marker.color!==c?f=c:s?f=d.background:f=d.defaultLine,i("marker.line.color",f),x(t,"marker.line")&&A(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",s?1:0)),s&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),n.gradient){var g=i("marker.gradient.type");g!=="none"&&i("marker.gradient.color")}}}}),Dd=Ze({"src/traces/scatter/line_defaults.js"(Z,q){"use strict";var d=ca().isArrayOrTypedArray,x=bp().hasColorscale,A=gh();q.exports=function(e,t,r,o,a,i){i||(i={});var n=(e.marker||{}).color;if(n&&n._inputArray&&(n=n._inputArray),a("line.color",r),x(e,"line"))A(e,t,o,a,{prefix:"line.",cLetter:"c"});else{var s=(d(n)?!1:n)||r;a("line.color",s)}a("line.width"),i.noDash||a("line.dash"),i.backoff&&a("line.backoff")}}}),o1=Ze({"src/traces/scatter/line_shape_defaults.js"(Z,q){"use strict";q.exports=function(x,A,M){var e=M("line.shape");e==="spline"&&M("line.smoothing")}}}),zd=Ze({"src/traces/scatter/text_defaults.js"(Z,q){"use strict";var d=ca();q.exports=function(x,A,M,e,t){t=t||{},e("textposition"),d.coerceFont(e,"textfont",t.font||M.font,t),t.noSelect||(e("selected.textfont.color"),e("unselected.textfont.color"))}}}),ev=Ze({"src/traces/scatter/fillcolor_defaults.js"(Z,q){"use strict";var d=Yn(),x=ca().isArrayOrTypedArray;function A(M){for(var e=d.interpolate(M[0][1],M[1][1],.5),t=2;t<M.length;t++){var r=d.interpolate(M[t-1][1],M[t][1],.5);e=d.interpolate(e,r,M[t-1][0]/M[t][0])}return e}q.exports=function(e,t,r,o,a){a||(a={});var i=!1;if(t.marker){var n=t.marker.color,s=(t.marker.line||{}).color;n&&!x(n)?i=n:s&&!x(s)&&(i=s)}var c;if(a.moduleHasFillgradient){var f=o("fillgradient.type");if(f!=="none"){o("fillgradient.start"),o("fillgradient.stop");var g=o("fillgradient.colorscale");g&&(c=A(g))}}o("fillcolor",d.addOpacity((t.line||{}).color||i||c||r,.5))}}}),Gz=Ze({"src/traces/scatter/defaults.js"(Z,q){"use strict";var d=ca(),x=oo(),A=tf(),M=Tv(),e=Fu(),t=n1(),r=Qd(),o=Vz(),a=md(),i=Dd(),n=o1(),s=zd(),c=ev(),f=ca().coercePattern;q.exports=function(v,T,l,_){function w(h,P){return d.coerce(v,T,A,h,P)}var S=t(v,T,_,w);if(S||(T.visible=!1),!!T.visible){r(v,T,_,w),w("xhoverformat"),w("yhoverformat"),w("zorder");var E=o(v,T,_,w);_.scattermode==="group"&&T.orientation===void 0&&w("orientation","v");var y=!E&&S<M.PTS_LINESONLY?"lines+markers":"lines";w("text"),w("hovertext"),w("mode",y),e.hasMarkers(T)&&a(v,T,l,_,w,{gradient:!0}),e.hasLines(T)&&(i(v,T,l,_,w,{backoff:!0}),n(v,T,w),w("connectgaps"),w("line.simplify")),e.hasText(T)&&(w("texttemplate"),s(v,T,_,w));var b=[];(e.hasMarkers(T)||e.hasText(T))&&(w("cliponaxis"),w("marker.maxdisplayed"),b.push("points")),w("fill",E?E.fillDflt:"none"),T.fill!=="none"&&(c(v,T,l,w,{moduleHasFillgradient:!0}),e.hasLines(T)||n(v,T,w),f(w,"fillpattern",T.fillcolor,!1));var p=(T.line||{}).color,u=(T.marker||{}).color;(T.fill==="tonext"||T.fill==="toself")&&b.push("fills"),w("hoveron",b.join("+")||"points"),T.hoveron!=="fills"&&w("hovertemplate");var m=x.getComponentMethod("errorbars","supplyDefaults");m(v,T,p||u||l,{axis:"y"}),m(v,T,p||u||l,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(T,w)}}}}),J0=Ze({"src/traces/scatter/grouping_defaults.js"(Z,q){"use strict";var d=Y0().getAxisGroup;q.exports=function(A,M,e,t,r){var o=M.orientation,a=M[{v:"x",h:"y"}[o]+"axis"],i=d(e,a)+o,n=e._alignmentOpts||{},s=t("alignmentgroup"),c=n[i];c||(c=n[i]={});var f=c[s];f?f.traces.push(M):f=c[s]={traces:[M],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var g=t("offsetgroup")||"",v=f.offsetGroups,T=v[g];M._offsetIndex=0,(r!=="group"||g)&&(T||(T=v[g]={offsetIndex:Object.keys(v).length}),M._offsetIndex=T.offsetIndex)}}}),D5=Ze({"src/traces/scatter/cross_trace_defaults.js"(Z,q){"use strict";var d=ca(),x=J0(),A=tf();q.exports=function(e,t){var r,o,a,i=t.scattermode;function n(v){return d.coerce(o._input,o,A,v)}if(t.scattermode==="group")for(a=0;a<e.length;a++)o=e[a],o.type==="scatter"&&(r=o._input,x(r,o,t,n,i));for(a=0;a<e.length;a++){var s=e[a];if(s.type==="scatter"){var c=s.fill;if(!(c==="none"||c==="toself")&&(s.opacity=void 0,c==="tonexty"||c==="tonextx"))for(var f=a-1;f>=0;f--){var g=e[f];if(g.type==="scatter"&&g.xaxis===s.xaxis&&g.yaxis===s.yaxis){g.opacity=void 0;break}}}}}}}),Hz=Ze({"src/traces/scatter/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=y2();q.exports=function(A,M){function e(r,o){return d.coerce(A,M,x,r,o)}var t=M.barmode==="group";M.scattermode==="group"&&e("scattergap",t?M.bargap:.2)}}}),tv=Ze({"src/plots/cartesian/align_period.js"(Z,q){"use strict";var d=ns(),x=ca(),A=x.dateTime2ms,M=x.incrementMonth,e=qs(),t=e.ONEAVGMONTH;q.exports=function(o,a,i,n){if(a.type!=="date")return{vals:n};var s=o[i+"periodalignment"];if(!s)return{vals:n};var c=o[i+"period"],f;if(d(c)){if(c=+c,c<=0)return{vals:n}}else if(typeof c=="string"&&c.charAt(0)==="M"){var g=+c.substring(1);if(g>0&&Math.round(g)===g)f=g;else return{vals:n}}for(var v=a.calendar,T=s==="start",l=s==="end",_=o[i+"period0"],w=A(_,v)||0,S=[],E=[],y=[],b=n.length,p=0;p<b;p++){var u=n[p],m,h,P;if(f){for(m=Math.round((u-w)/(f*t)),P=M(w,f*m,v);P>u;)P=M(P,-f,v);for(;P<=u;)P=M(P,f,v);h=M(P,-f,v)}else{for(m=Math.round((u-w)/c),P=w+m*c;P>u;)P-=c;for(;P<=u;)P+=c;h=P-c}S[p]=T?h:l?P:(h+P)/2,E[p]=h,y[p]=P}return{vals:S,starts:E,ends:y}}}}),Fd=Ze({"src/traces/scatter/colorscale_calc.js"(Z,q){"use strict";var d=bp().hasColorscale,x=wp(),A=Fu();q.exports=function(e,t){A.hasLines(t)&&d(t,"line")&&x(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),A.hasMarkers(t)&&(d(t,"marker")&&x(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),d(t,"marker.line")&&x(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Av=Ze({"src/traces/scatter/arrays_to_calcdata.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){for(var e=0;e<A.length;e++)A[e].i=e;d.mergeArray(M.text,A,"tx"),d.mergeArray(M.texttemplate,A,"txt"),d.mergeArray(M.hovertext,A,"htx"),d.mergeArray(M.customdata,A,"data"),d.mergeArray(M.textposition,A,"tp"),M.textfont&&(d.mergeArrayCastPositive(M.textfont.size,A,"ts"),d.mergeArray(M.textfont.color,A,"tc"),d.mergeArray(M.textfont.family,A,"tf"),d.mergeArray(M.textfont.weight,A,"tw"),d.mergeArray(M.textfont.style,A,"ty"),d.mergeArray(M.textfont.variant,A,"tv"),d.mergeArray(M.textfont.textcase,A,"tC"),d.mergeArray(M.textfont.lineposition,A,"tE"),d.mergeArray(M.textfont.shadow,A,"tS"));var t=M.marker;if(t){d.mergeArrayCastPositive(t.size,A,"ms"),d.mergeArrayCastPositive(t.opacity,A,"mo"),d.mergeArray(t.symbol,A,"mx"),d.mergeArray(t.angle,A,"ma"),d.mergeArray(t.standoff,A,"mf"),d.mergeArray(t.color,A,"mc");var r=t.line;t.line&&(d.mergeArray(r.color,A,"mlc"),d.mergeArrayCastPositive(r.width,A,"mlw"));var o=t.gradient;o&&o.type!=="none"&&(d.mergeArray(o.type,A,"mgt"),d.mergeArray(o.color,A,"mgc"))}}}}),Od=Ze({"src/traces/scatter/calc_selection.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){d.isArrayOrTypedArray(M.selectedpoints)&&d.tagSelected(A,M)}}}),Bd=Ze({"src/traces/scatter/calc.js"(Z,q){"use strict";var d=ns(),x=ca(),A=Wo(),M=tv(),e=qs().BADNUM,t=Fu(),r=Fd(),o=Av(),a=Od();function i(v,T){var l=v._fullLayout,_=T._xA=A.getFromId(v,T.xaxis||"x","x"),w=T._yA=A.getFromId(v,T.yaxis||"y","y"),S=_.makeCalcdata(T,"x"),E=w.makeCalcdata(T,"y"),y=M(T,_,"x",S),b=M(T,w,"y",E),p=y.vals,u=b.vals,m=T._length,h=new Array(m),P=T.ids,L=g(T,l,_,w),z=!1,F,B,O,I,N,U;c(l,T);var W="x",Q="y",ue;if(L)x.pushUnique(L.traceIndices,T.index),F=L.orientation==="v",F?(Q="s",ue="x"):(W="s",ue="y"),N=L.stackgaps==="interpolate";else{var le=s(T,m);n(v,T,_,w,p,u,le)}var he=!!T.xperiodalignment,G=!!T.yperiodalignment;for(B=0;B<m;B++){var $=h[B]={},J=d(p[B]),X=d(u[B]);J&&X?($[W]=p[B],$[Q]=u[B],he&&($.orig_x=S[B],$.xEnd=y.ends[B],$.xStart=y.starts[B]),G&&($.orig_y=E[B],$.yEnd=b.ends[B],$.yStart=b.starts[B])):L&&(F?J:X)?($[ue]=F?p[B]:u[B],$.gap=!0,N?($.s=e,z=!0):$.s=0):$[W]=$[Q]=e,P&&($.id=String(P[B]))}if(o(h,T),r(v,T),a(h,T),L){for(B=0;B<h.length;)h[B][ue]===e?h.splice(B,1):B++;if(x.sort(h,function(ee,re){return ee[ue]-re[ue]||ee.i-re.i}),z){for(B=0;B<h.length-1&&h[B].gap;)B++;for(U=h[B].s,U||(U=h[B].s=0),O=0;O<B;O++)h[O].s=U;for(I=h.length-1;I>B&&h[I].gap;)I--;for(U=h[I].s,O=h.length-1;O>I;O--)h[O].s=U;for(;B<I;)if(B++,h[B].gap){for(O=B+1;h[O].gap;)O++;for(var oe=h[B-1][ue],ie=h[B-1].s,j=(h[O].s-ie)/(h[O][ue]-oe);B<O;)h[B].s=ie+(h[B][ue]-oe)*j,B++}}}return h}function n(v,T,l,_,w,S,E){var y=T._length,b=v._fullLayout,p=l._id,u=_._id,m=b._firstScatter[f(T)]===T.uid,h=(g(T,b,l,_)||{}).orientation,P=T.fill;l._minDtick=0,_._minDtick=0;var L={padded:!0},z={padded:!0};E&&(L.ppad=z.ppad=E);var F=y<2||w[0]!==w[y-1]||S[0]!==S[y-1];F&&(P==="tozerox"||P==="tonextx"&&(m||h==="h"))?L.tozero=!0:!(T.error_y||{}).visible&&(P==="tonexty"||P==="tozeroy"||!t.hasMarkers(T)&&!t.hasText(T))&&(L.padded=!1,L.ppad=0),F&&(P==="tozeroy"||P==="tonexty"&&(m||h==="v"))?z.tozero=!0:(P==="tonextx"||P==="tozerox")&&(z.padded=!1),p&&(T._extremes[p]=A.findExtremes(l,w,L)),u&&(T._extremes[u]=A.findExtremes(_,S,z))}function s(v,T){if(t.hasMarkers(v)){var l=v.marker,_=1.6*(v.marker.sizeref||1),w;if(v.marker.sizemode==="area"?w=function(p){return Math.max(Math.sqrt((p||0)/_),3)}:w=function(p){return Math.max((p||0)/_,3)},x.isArrayOrTypedArray(l.size)){var S={type:"linear"};A.setConvert(S);for(var E=S.makeCalcdata(v.marker,"size"),y=new Array(T),b=0;b<T;b++)y[b]=w(E[b]);return y}else return w(l.size)}}function c(v,T){var l=f(T),_=v._firstScatter;_[l]||(_[l]=T.uid)}function f(v){var T=v.stackgroup;return v.xaxis+v.yaxis+v.type+(T?"-"+T:"")}function g(v,T,l,_){var w=v.stackgroup;if(w){var S=T._scatterStackOpts[l._id+_._id][w],E=S.orientation==="v"?_:l;if(E.type==="linear"||E.type==="log")return S}}q.exports={calc:i,calcMarkerSize:s,calcAxisExpansion:n,setFirstScatter:c,getStackOpts:g}}}),Wz=Ze({"src/traces/bar/sieve.js"(Z,q){"use strict";q.exports=x;var d=ca().distinctVals;function x(A,M){this.traces=A,this.sepNegVal=M.sepNegVal,this.overlapNoMerge=M.overlapNoMerge;for(var e=1/0,t=M.posAxis._id.charAt(0),r=[],o=0;o<A.length;o++){for(var a=A[o],i=0;i<a.length;i++){var n=a[i],s=n.p;s===void 0&&(s=n[t]),s!==void 0&&r.push(s)}a[0]&&a[0].width1&&(e=Math.min(a[0].width1,e))}this.positions=r;var c=d(r);this.distinctPositions=c.vals,c.vals.length===1&&e!==1/0?this.minDiff=e:this.minDiff=Math.min(c.minDiff,e);var f=(M.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}x.prototype.put=function(M,e,t){var r=this.getLabel(M,e,t),o=this.bins[r]||0;return this.bins[r]=o+t,o},x.prototype.get=function(M,e,t){var r=this.getLabel(M,e,t);return this.bins[r]||0},x.prototype.getLabel=function(M,e,t){var r=t<0&&this.sepNegVal?"v":"^",o=this.overlapNoMerge?M:Math.round(M/this.binWidth);return r+o+"g"+e}}}),$0=Ze({"src/traces/bar/cross_trace_calc.js"(Z,q){"use strict";var d=ns(),x=ca().isArrayOrTypedArray,A=qs().BADNUM,M=oo(),e=Wo(),t=Y0().getAxisGroup,r=Wz();function o(h,P){for(var L=P.xaxis,z=P.yaxis,F=h._fullLayout,B=h._fullData,O=h.calcdata,I=[],N=[],U=0;U<B.length;U++){var W=B[U];if(W.visible===!0&&M.traceIs(W,"bar")&&W.xaxis===L._id&&W.yaxis===z._id&&(W.orientation==="h"?I.push(O[U]):N.push(O[U]),W._computePh))for(var Q=h.calcdata[U],ue=0;ue<Q.length;ue++)typeof Q[ue].ph0=="function"&&(Q[ue].ph0=Q[ue].ph0()),typeof Q[ue].ph1=="function"&&(Q[ue].ph1=Q[ue].ph1())}var le={xCat:L.type==="category"||L.type==="multicategory",yCat:z.type==="category"||z.type==="multicategory",mode:F.barmode,norm:F.barnorm,gap:F.bargap,groupgap:F.bargroupgap};a(h,L,z,N,le),a(h,z,L,I,le)}function a(h,P,L,z,F){if(z.length){var B,O,I,N,U;switch(s(L,z),F.mode){case"overlay":c(h,P,L,z,F);break;case"group":for(B=[],O=[],I=0;I<z.length;I++)N=z[I],U=N[0].trace,U.offset===void 0?O.push(N):B.push(N);O.length&&f(h,P,L,O,F),B.length&&c(h,P,L,B,F);break;case"stack":case"relative":for(B=[],O=[],I=0;I<z.length;I++)N=z[I],U=N[0].trace,U.base===void 0?O.push(N):B.push(N);n(O),O.length&&g(h,P,L,O,F),B.length&&c(h,P,L,B,F);break}i(z),u(z,P)}}function i(h){var P,L,z,F,B,O,I;for(P=0;P<h.length;P++)L=h[P],z=L[0].trace,F=L[0].t,F.cornerradiusvalue===void 0&&(B=z.marker?z.marker.cornerradius:void 0,B!==void 0&&(O=d(B)?+B:+B.slice(0,-1),I=d(B)?"px":"%",F.cornerradiusvalue=O,F.cornerradiusform=I))}function n(h){if(!(h.length<2)){var P,L,z,F,B,O,I;for(P=0;P<h.length&&(L=h[P],z=L[0].trace,B=z.marker?z.marker.cornerradius:void 0,B===void 0);P++);if(B!==void 0)for(O=d(B)?+B:+B.slice(0,-1),I=d(B)?"px":"%",P=0;P<h.length;P++)L=h[P],F=L[0].t,F.cornerradiusvalue=O,F.cornerradiusform=I}}function s(h,P){var L,z;for(L=0;L<P.length;L++){var F=P[L],B=F[0].trace,O=B.type==="funnel"?B._base:B.base,I,N=B.orientation==="h"?B.xcalendar:B.ycalendar,U=h.type==="category"||h.type==="multicategory"?function(){return null}:h.d2c;if(x(O)){for(z=0;z<Math.min(O.length,F.length);z++)I=U(O[z],0,N),d(I)?(F[z].b=+I,F[z].hasB=1):F[z].b=0;for(;z<F.length;z++)F[z].b=0}else{I=U(O,0,N);var W=d(I);for(I=W?I:0,z=0;z<F.length;z++)F[z].b=I,W&&(F[z].hasB=1)}}}function c(h,P,L,z,F){for(var B=0;B<z.length;B++){var O=z[B],I=new r([O],{posAxis:P,sepNegVal:!1,overlapNoMerge:!F.norm});v(h,P,I,F),F.norm?(E(I),b(L,I,F)):w(L,I)}}function f(h,P,L,z,F){var B=new r(z,{posAxis:P,sepNegVal:!1,overlapNoMerge:!F.norm});v(h,P,B,F),y(B,P),F.norm?(E(B),b(L,B,F)):w(L,B)}function g(h,P,L,z,F){var B=new r(z,{posAxis:P,sepNegVal:F.mode==="relative",overlapNoMerge:!(F.norm||F.mode==="stack"||F.mode==="relative")});v(h,P,B,F),S(L,B,F);for(var O=0;O<z.length;O++)for(var I=z[O],N=I[0].t.offsetindex,U=0;U<I.length;U++){var W=I[U];if(W.s!==A){var Q=W.b+W.s===B.get(W.p,N,W.s);Q&&(W._outmost=!0)}}F.norm&&b(L,B,F)}function v(h,P,L,z){var F=h._fullLayout,B=L.positions,O=L.distinctPositions,I=L.minDiff,N=L.traces,U=N.length,W=B.length!==O.length,Q=I*(1-z.gap),ue,le,he,G;if(P._id==="angularaxis")ue=Q,le=ue*(1-(z.groupgap||0)),he=-le/2;else{var $=t(F,P._id)+N[0][0].trace.orientation;G=F._alignmentOpts[$]||{}}for(var J=0;J<U;J++){var X=N[J],oe=X[0].trace;if(P._id!=="angularaxis"){var ie=G[oe.alignmentgroup]||{},j=Object.keys(ie.offsetGroups||{}).length;j?ue=Q/j:ue=W?Q/U:Q,le=ue*(1-(z.groupgap||0)),j?he=((2*oe._offsetIndex+1-j)*ue-le)/2:he=W?((2*J+1-U)*ue-le)/2:-le/2}var ee=X[0].t;ee.barwidth=le,ee.offsetindex=oe._offsetIndex||0,ee.poffset=he,ee.bargroupwidth=Q,ee.bardelta=I}L.binWidth=N[0][0].t.barwidth/100,T(L),l(P,L),P._id==="angularaxis"?_(P,L):_(P,L,W)}function T(h){var P=h.traces,L,z;for(L=0;L<P.length;L++){var F=P[L],B=F[0],O=B.trace,I=B.t,N=O._offset||O.offset,U=I.poffset,W;if(x(N)){for(W=Array.prototype.slice.call(N,0,F.length),z=0;z<W.length;z++)d(W[z])||(W[z]=U);for(z=W.length;z<F.length;z++)W.push(U);I.poffset=W}else N!==void 0&&(I.poffset=N);var Q=O._width||O.width,ue=I.barwidth;if(x(Q)){var le=Array.prototype.slice.call(Q,0,F.length);for(z=0;z<le.length;z++)d(le[z])||(le[z]=ue);for(z=le.length;z<F.length;z++)le.push(ue);if(I.barwidth=le,N===void 0){for(W=[],z=0;z<F.length;z++)W.push(U+(ue-le[z])/2);I.poffset=W}}else Q!==void 0&&(I.barwidth=Q,N===void 0&&(I.poffset=U+(ue-Q)/2))}}function l(h,P){for(var L=P.traces,z=m(h),F=0;F<L.length;F++)for(var B=L[F],O=B[0].t,I=O.poffset,N=x(I),U=O.barwidth,W=x(U),Q=0;Q<B.length;Q++){var ue=B[Q],le=ue.w=W?U[Q]:U;ue.p===void 0&&(ue.p=ue[z],ue["orig_"+z]=ue[z]);var he=(N?I[Q]:I)+le/2;ue[z]=ue.p+he}}function _(h,P,L){var z=P.traces,F=P.minDiff,B=F/2;e.minDtick(h,P.minDiff,P.distinctPositions[0],L);for(var O=0;O<z.length;O++){var I=z[O],N=I[0],U=N.trace,W=[],Q,ue,le,he;for(he=0;he<I.length;he++)Q=I[he],ue=Q.p-B,le=Q.p+B,W.push(ue,le);if(U.width||U.offset){var G=N.t,$=G.poffset,J=G.barwidth,X=x($),oe=x(J);for(he=0;he<I.length;he++){Q=I[he];var ie=X?$[he]:$,j=oe?J[he]:J;ue=Q.p+ie,le=ue+j,W.push(ue,le)}}U._extremes[h._id]=e.findExtremes(h,W,{padded:!1})}}function w(h,P){for(var L=P.traces,z=m(h),F=0;F<L.length;F++){for(var B=L[F],O=B[0].trace,I=O.type==="scatter",N=O.orientation==="v",U=[],W=!1,Q=0;Q<B.length;Q++){var ue=B[Q],le=I?0:ue.b,he=I?N?ue.y:ue.x:le+ue.s;ue[z]=he,U.push(he),ue.hasB&&U.push(le),(!ue.hasB||!ue.b)&&(W=!0)}O._extremes[h._id]=e.findExtremes(h,U,{tozero:W,padded:!0})}}function S(h,P,L){var z=m(h),F=P.traces,B,O,I,N,U,W,Q;for(N=0;N<F.length;N++)if(B=F[N],O=B[0].trace,O.type==="funnel")for(Q=B[0].t.offsetindex,U=0;U<B.length;U++)W=B[U],W.s!==A&&P.put(W.p,Q,-.5*W.s);for(N=0;N<F.length;N++){B=F[N],O=B[0].trace,I=O.type==="funnel",Q=O.type==="barpolar"?0:B[0].t.offsetindex;var ue=[];for(U=0;U<B.length;U++)if(W=B[U],W.s!==A){var le;I?le=W.s:le=W.s+W.b;var he=P.put(W.p,Q,le),G=he+le;W.b=he,W[z]=G,L.norm||(ue.push(G),W.hasB&&ue.push(he))}L.norm||(O._extremes[h._id]=e.findExtremes(h,ue,{tozero:!0,padded:!0}))}}function E(h){for(var P=h.traces,L=0;L<P.length;L++)for(var z=P[L],F=z[0].t.offsetindex,B=0;B<z.length;B++){var O=z[B];O.s!==A&&h.put(O.p,F,O.b+O.s)}}function y(h,P){for(var L=h.traces,z=0;z<L.length;z++){var F=L[z],B=F[0].trace,O=F[0].t.offsetindex;if(B.base===void 0)for(var I=new r([F],{posAxis:P,sepNegVal:!0,overlapNoMerge:!0}),N=0;N<F.length;N++){var U=F[N];if(U.p!==A){var W=I.put(U.p,O,U.b+U.s);W&&(U.b=W)}}}}function b(h,P,L){var z=P.traces,F=m(h),B=L.norm==="fraction"?1:100,O=B/1e9,I=h.l2c(h.c2l(0)),N=L.mode==="stack"?B:I;function U(ee){return d(h.c2l(ee))&&(ee<I-O||ee>N+O||!d(I))}for(var W=0;W<z.length;W++){for(var Q=z[W],ue=Q[0].t.offsetindex,le=Q[0].trace,he=[],G=!1,$=!1,J=0;J<Q.length;J++){var X=Q[J];if(X.s!==A){var oe=Math.abs(B/P.get(X.p,ue,X.s));X.b*=oe,X.s*=oe;var ie=X.b,j=ie+X.s;X[F]=j,he.push(j),$=$||U(j),X.hasB&&(he.push(ie),$=$||U(ie)),(!X.hasB||!X.b)&&(G=!0)}}le._extremes[h._id]=e.findExtremes(h,he,{tozero:G,padded:$})}}function p(h,P,L,z){for(var F=m(z),B=0;B<h.length;B++)for(var O=h[B],I=0;I<O.length;I++){var N=O[I],U=N[F];N._sMin=P[U],N._sMax=L[U]}}function u(h,P){var L=m(P),z={},F,B,O,I=1/0,N=-1/0;for(F=0;F<h.length;F++)for(O=h[F],B=0;B<O.length;B++){var U=O[B].p;d(U)&&(I=Math.min(I,U),N=Math.max(N,U))}var W=1e4/(N-I),Q=z.round=function(ce){return String(Math.round(W*(ce-I)))},ue={},le={},he=h.some(function(ce){var be=ce[0].trace;return"marker"in be&&be.marker.cornerradius});for(F=0;F<h.length;F++){O=h[F],O[0].t.extents=z;var G=O[0].t.poffset,$=x(G);for(B=0;B<O.length;B++){var J=O[B],X=J[L]-J.w/2;if(d(X)){var oe=J[L]+J.w/2,ie=Q(J.p);z[ie]?z[ie]=[Math.min(X,z[ie][0]),Math.max(oe,z[ie][1])]:z[ie]=[X,oe]}if(J.p0=J.p+($?G[B]:G),J.p1=J.p0+J.w,J.s0=J.b,J.s1=J.s0+J.s,he){var j=Math.min(J.s0,J.s1)||0,ee=Math.max(J.s0,J.s1)||0,re=J[L];ue[re]=re in ue?Math.min(ue[re],j):j,le[re]=re in le?Math.max(le[re],ee):ee}}}he&&p(h,ue,le,P)}function m(h){return h._id.charAt(0)}q.exports={crossTraceCalc:o,setGroupPositions:a}}}),Xz=Ze({"src/traces/scatter/cross_trace_calc.js"(Z,q){"use strict";var d=Bd(),x=$0().setGroupPositions;function A(t,r){for(var o=r.xaxis,a=r.yaxis,i=t._fullLayout,n=t._fullData,s=t.calcdata,c=[],f=[],g=0;g<n.length;g++){var v=n[g];v.visible===!0&&v.type==="scatter"&&v.xaxis===o._id&&v.yaxis===a._id&&(v.orientation==="h"?c.push(s[g]):v.orientation==="v"&&f.push(s[g]))}var T={mode:i.scattermode,gap:i.scattergap};x(t,o,a,f,T),x(t,a,o,c,T)}q.exports=function(r,o){r._fullLayout.scattermode==="group"&&A(r,o);var a=o.xaxis,i=o.yaxis,n=a._id+i._id,s=r._fullLayout._scatterStackOpts[n];if(s){var c=r.calcdata,f,g,v,T,l,_,w,S,E,y,b,p,u,m,h;for(var P in s){y=s[P];var L=y.traceIndices;if(L.length){for(b=y.stackgaps==="interpolate",p=y.groupnorm,y.orientation==="v"?(u="x",m="y"):(u="y",m="x"),h=new Array(L.length),f=0;f<h.length;f++)h[f]=!1;_=c[L[0]];var z=new Array(_.length);for(f=0;f<_.length;f++)z[f]=_[f][u];for(f=1;f<L.length;f++){for(l=c[L[f]],g=v=0;g<l.length;g++){for(w=l[g][u];w>z[v]&&v<z.length;v++)M(l,g,z[v],f,h,b,u),g++;if(w!==z[v]){for(T=0;T<f;T++)M(c[L[T]],v,w,T,h,b,u);z.splice(v,0,w)}v++}for(;v<z.length;v++)M(l,g,z[v],f,h,b,u),g++}var F=z.length;for(g=0;g<_.length;g++){for(S=_[g][m]=_[g].s,f=1;f<L.length;f++)l=c[L[f]],l[0].trace._rawLength=l[0].trace._length,l[0].trace._length=F,S+=l[g].s,l[g][m]=S;if(p)for(E=(p==="fraction"?S:S/100)||1,f=0;f<L.length;f++){var B=c[L[f]][g];B[m]/=E,B.sNorm=B.s/E}}for(f=0;f<L.length;f++){l=c[L[f]];var O=l[0].trace,I=d.calcMarkerSize(O,O._rawLength),N=Array.isArray(I);if(I&&h[f]||N){var U=I;for(I=new Array(F),g=0;g<F;g++)I[g]=l[g].gap?0:N?U[l[g].i]:U}var W=new Array(F),Q=new Array(F);for(g=0;g<F;g++)W[g]=l[g].x,Q[g]=l[g].y;d.calcAxisExpansion(r,O,a,i,W,Q,I),l[0].t.orientation=y.orientation}}}}};function M(t,r,o,a,i,n,s){i[a]=!0;var c={i:null,gap:!0,s:0};if(c[s]=o,t.splice(r,0,c),r&&o===t[r-1][s]){var f=t[r-1];c.s=f.s,c.i=f.i,c.gap=f.gap}else n&&(c.s=e(t,r,o,s));r||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}function e(t,r,o,a){var i=t[r-1],n=t[r+1];return n?i?i.s+(n.s-i.s)*(o-i[a])/(n[a]-i[a]):n.s:i.s}}}),z5=Ze({"src/traces/scatter/line_points.js"(Z,q){"use strict";var d=as(),x=qs(),A=x.BADNUM,M=x.LOG_CLIP,e=M+.5,t=M-.5,r=ca(),o=r.segmentsIntersect,a=r.constrain,i=Tv();q.exports=function(s,c){var f=c.trace||{},g=c.xaxis,v=c.yaxis,T=g.type==="log",l=v.type==="log",_=g._length,w=v._length,S=c.backoff,E=f.marker,y=c.connectGaps,b=c.baseTolerance,p=c.shape,u=p==="linear",m=f.fill&&f.fill!=="none",h=[],P=i.minTolerance,L=s.length,z=new Array(L),F=0,B,O,I,N,U,W,Q,ue,le,he,G,$,J,X,oe,ie;function j(yt){var Tt=s[yt];if(!Tt)return!1;var Ot=c.linearized?g.l2p(Tt.x):g.c2p(Tt.x),Gt=c.linearized?v.l2p(Tt.y):v.c2p(Tt.y);if(Ot===A){if(T&&(Ot=g.c2p(Tt.x,!0)),Ot===A)return!1;l&&Gt===A&&(Ot*=Math.abs(g._m*w*(g._m>0?e:t)/(v._m*_*(v._m>0?e:t)))),Ot*=1e3}if(Gt===A){if(l&&(Gt=v.c2p(Tt.y,!0)),Gt===A)return!1;Gt*=1e3}return[Ot,Gt]}function ee(yt,Tt,Ot,Gt){var rr=Ot-yt,Qt=Gt-Tt,Tr=.5-yt,la=.5-Tt,Ua=rr*rr+Qt*Qt,Ba=rr*Tr+Qt*la;if(Ba>0&&Ba<Ua){var Ra=Tr*Qt-la*rr;if(Ra*Ra<Ua)return!0}}var re,ce;function be(yt,Tt){var Ot=yt[0]/_,Gt=yt[1]/w,rr=Math.max(0,-Ot,Ot-1,-Gt,Gt-1);return rr&&re!==void 0&&ee(Ot,Gt,re,ce)&&(rr=0),rr&&Tt&&ee(Ot,Gt,Tt[0]/_,Tt[1]/w)&&(rr=0),(1+i.toleranceGrowth*rr)*b}function Ae(yt,Tt){var Ot=yt[0]-Tt[0],Gt=yt[1]-Tt[1];return Math.sqrt(Ot*Ot+Gt*Gt)}var ze=i.maxScreensAway,Re=-_*ze,Xe=_*(1+ze),it=-w*ze,ot=w*(1+ze),tt=[[Re,it,Xe,it],[Xe,it,Xe,ot],[Xe,ot,Re,ot],[Re,ot,Re,it]],lt,Ee,_e,fe,Fe,rt;function st(yt,Tt){for(var Ot=[],Gt=0,rr=0;rr<4;rr++){var Qt=tt[rr],Tr=o(yt[0],yt[1],Tt[0],Tt[1],Qt[0],Qt[1],Qt[2],Qt[3]);Tr&&(!Gt||Math.abs(Tr.x-Ot[0][0])>1||Math.abs(Tr.y-Ot[0][1])>1)&&(Tr=[Tr.x,Tr.y],Gt&&Ae(Tr,yt)<Ae(Ot[0],yt)?Ot.unshift(Tr):Ot.push(Tr),Gt++)}return Ot}function Qe(yt){if(yt[0]<Re||yt[0]>Xe||yt[1]<it||yt[1]>ot)return[a(yt[0],Re,Xe),a(yt[1],it,ot)]}function Lt(yt,Tt){if(yt[0]===Tt[0]&&(yt[0]===Re||yt[0]===Xe)||yt[1]===Tt[1]&&(yt[1]===it||yt[1]===ot))return!0}function kt(yt,Tt){var Ot=[],Gt=Qe(yt),rr=Qe(Tt);return Gt&&rr&&Lt(Gt,rr)||(Gt&&Ot.push(Gt),rr&&Ot.push(rr)),Ot}function Vt(yt,Tt,Ot){return function(Gt,rr){var Qt=Qe(Gt),Tr=Qe(rr),la=[];if(Qt&&Tr&&Lt(Qt,Tr))return la;Qt&&la.push(Qt),Tr&&la.push(Tr);var Ua=2*r.constrain((Gt[yt]+rr[yt])/2,Tt,Ot)-((Qt||Gt)[yt]+(Tr||rr)[yt]);if(Ua){var Ba;Qt&&Tr?Ba=Ua>0==Qt[yt]>Tr[yt]?Qt:Tr:Ba=Qt||Tr,Ba[yt]+=Ua}return la}}var Zt;p==="linear"||p==="spline"?Zt=st:p==="hv"||p==="vh"?Zt=kt:p==="hvh"?Zt=Vt(0,Re,Xe):p==="vhv"&&(Zt=Vt(1,it,ot));function Sr(yt,Tt){var Ot=Tt[0]-yt[0],Gt=(Tt[1]-yt[1])/Ot,rr=(yt[1]*Tt[0]-Tt[1]*yt[0])/Ot;return rr>0?[Gt>0?Re:Xe,ot]:[Gt>0?Xe:Re,it]}function xr(yt){var Tt=yt[0],Ot=yt[1],Gt=Tt===z[F-1][0],rr=Ot===z[F-1][1];if(!(Gt&&rr))if(F>1){var Qt=Tt===z[F-2][0],Tr=Ot===z[F-2][1];Gt&&(Tt===Re||Tt===Xe)&&Qt?Tr?F--:z[F-1]=yt:rr&&(Ot===it||Ot===ot)&&Tr?Qt?F--:z[F-1]=yt:z[F++]=yt}else z[F++]=yt}function jr(yt){z[F-1][0]!==yt[0]&&z[F-1][1]!==yt[1]&&xr([_e,fe]),xr(yt),Fe=null,_e=fe=0}var wr=r.isArrayOrTypedArray(E);function Ir(yt){if(yt&&S&&(yt.i=B,yt.d=s,yt.trace=f,yt.marker=wr?E[yt.i]:E,yt.backoff=S),re=yt[0]/_,ce=yt[1]/w,lt=yt[0]<Re?Re:yt[0]>Xe?Xe:0,Ee=yt[1]<it?it:yt[1]>ot?ot:0,lt||Ee){if(!F)z[F++]=[lt||yt[0],Ee||yt[1]];else if(Fe){var Tt=Zt(Fe,yt);Tt.length>1&&(jr(Tt[0]),z[F++]=Tt[1])}else rt=Zt(z[F-1],yt)[0],z[F++]=rt;var Ot=z[F-1];lt&&Ee&&(Ot[0]!==lt||Ot[1]!==Ee)?(Fe&&(_e!==lt&&fe!==Ee?xr(_e&&fe?Sr(Fe,yt):[_e||lt,fe||Ee]):_e&&fe&&xr([_e,fe])),xr([lt,Ee])):_e-lt&&fe-Ee&&xr([lt||_e,Ee||fe]),Fe=yt,_e=lt,fe=Ee}else Fe&&jr(Zt(Fe,yt)[0]),z[F++]=yt}for(B=0;B<L;B++)if(O=j(B),!!O){for(F=0,Fe=null,Ir(O),B++;B<L;B++){if(N=j(B),!N){if(y)continue;break}if(!u||!c.simplify){Ir(N);continue}var bt=j(B+1);if(he=Ae(N,O),!(!(m&&(F===0||F===L-1))&&he<be(N,bt)*P)){for(ue=[(N[0]-O[0])/he,(N[1]-O[1])/he],U=O,G=he,$=X=oe=0,Q=!1,I=N,B++;B<s.length;B++){if(W=bt,bt=j(B+1),!W){if(y)continue;break}if(le=[W[0]-O[0],W[1]-O[1]],ie=le[0]*ue[1]-le[1]*ue[0],X=Math.min(X,ie),oe=Math.max(oe,ie),oe-X>be(W,bt))break;I=W,J=le[0]*ue[0]+le[1]*ue[1],J>G?(G=J,N=W,Q=!1):J<$&&($=J,U=W,Q=!0)}if(Q?(Ir(N),I!==U&&Ir(U)):(U!==O&&Ir(U),I!==N&&Ir(N)),Ir(I),B>=s.length||!W)break;Ir(W),O=W}}Fe&&xr([_e||Fe[0],fe||Fe[1]]),h.push(z.slice(0,F))}var Be=p.slice(p.length-1);if(S&&Be!=="h"&&Be!=="v"){for(var Ke=!1,Ue=-1,Me=[],qe=0;qe<h.length;qe++)for(var Ce=0;Ce<h[qe].length-1;Ce++){var Te=h[qe][Ce],Pe=h[qe][Ce+1],at=d.applyBackoff(Pe,Te);(at[0]!==Pe[0]||at[1]!==Pe[1])&&(Ke=!0),Me[Ue+1]||(Ue++,Me[Ue]=[Te,[at[0],at[1]]])}return Ke?Me:h}return h}}}),F5=Ze({"src/traces/scatter/link_traces.js"(Z,q){"use strict";var d={tonextx:1,tonexty:1,tonext:1};q.exports=function(A,M,e){var t,r,o,a,i,n={},s=!1,c=-1,f=0,g=-1;for(r=0;r<e.length;r++)t=e[r][0].trace,o=t.stackgroup||"",o?o in n?i=n[o]:(i=n[o]=f,f++):t.fill in d&&g>=0?i=g:(i=g=f,f++),i<c&&(s=!0),t._groupIndex=c=i;var v=e.slice();s&&v.sort(function(l,_){var w=l[0].trace,S=_[0].trace;return w._groupIndex-S._groupIndex||w.index-S.index});var T={};for(r=0;r<v.length;r++)t=v[r][0].trace,o=t.stackgroup||"",t.visible===!0?(t._nexttrace=null,t.fill in d&&(a=T[o],t._prevtrace=a||null,a&&(a._nexttrace=t)),t._ownfill=t.fill&&(t.fill.substr(0,6)==="tozero"||t.fill==="toself"||t.fill.substr(0,2)==="to"&&!t._prevtrace),T[o]=t):t._prevtrace=t._nexttrace=t._ownfill=null;return v}}}),s1=Ze({"src/traces/scatter/plot.js"(Z,q){"use strict";var d=On(),x=oo(),A=ca(),M=A.ensureSingle,e=A.identity,t=as(),r=Fu(),o=z5(),a=F5(),i=P_().tester;q.exports=function(g,v,T,l,_,w){var S,E,y=!_,b=!!_&&_.duration>0,p=a(g,v,T);if(S=l.selectAll("g.trace").data(p,function(m){return m[0].trace.uid}),S.enter().append("g").attr("class",function(m){return"trace scatter trace"+m[0].trace.uid}).style("stroke-miterlimit",2),S.order(),n(g,S,v),b){w&&(E=w());var u=d.transition().duration(_.duration).ease(_.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});u.each(function(){l.selectAll("g.trace").each(function(m,h){s(g,h,v,m,p,this,_)})})}else S.each(function(m,h){s(g,h,v,m,p,this,_)});y&&S.exit().remove(),l.selectAll("path:not([d])").remove()};function n(f,g,v){g.each(function(T){var l=M(d.select(this),"g","fills");t.setClipUrl(l,v.layerClipId,f);var _=T[0].trace,w=[];_._ownfill&&w.push("_ownFill"),_._nexttrace&&w.push("_nextFill");var S=l.selectAll("g").data(w,e);S.enter().append("g"),S.exit().each(function(E){_[E]=null}).remove(),S.order().each(function(E){_[E]=M(d.select(this),"path","js-fill")})})}function s(f,g,v,T,l,_,w){var S=f._context.staticPlot,E;c(f,g,v,T,l);var y=!!w&&w.duration>0;function b(xr){return y?xr.transition():xr}var p=v.xaxis,u=v.yaxis,m=T[0].trace,h=m.line,P=d.select(_),L=M(P,"g","errorbars"),z=M(P,"g","lines"),F=M(P,"g","points"),B=M(P,"g","text");if(x.getComponentMethod("errorbars","plot")(f,L,v,w),m.visible!==!0)return;b(P).style("opacity",m.opacity);var O,I,N=m.fill.charAt(m.fill.length-1);N!=="x"&&N!=="y"&&(N="");var U,W;N==="y"?(U=1,W=u.c2p(0,!0)):N==="x"&&(U=0,W=p.c2p(0,!0)),T[0][v.isRangePlot?"nodeRangePlot3":"node3"]=P;var Q="",ue=[],le=m._prevtrace,he=null,G=null;le&&(Q=le._prevRevpath||"",I=le._nextFill,ue=le._ownPolygons,he=le._fillsegments,G=le._fillElement);var $,J,X="",oe="",ie,j,ee,re,ce,be,Ae=[];m._polygons=[];var ze=[],Re=[],Xe=A.noop;if(O=m._ownFill,r.hasLines(m)||m.fill!=="none"){I&&I.datum(T),["hv","vh","hvh","vhv"].indexOf(h.shape)!==-1?(ie=t.steps(h.shape),j=t.steps(h.shape.split("").reverse().join(""))):h.shape==="spline"?ie=j=function(xr){var jr=xr[xr.length-1];return xr.length>1&&xr[0][0]===jr[0]&&xr[0][1]===jr[1]?t.smoothclosed(xr.slice(1),h.smoothing):t.smoothopen(xr,h.smoothing)}:ie=j=function(xr){return"M"+xr.join("L")},ee=function(xr){return j(xr.reverse())},Re=o(T,{xaxis:p,yaxis:u,trace:m,connectGaps:m.connectgaps,baseTolerance:Math.max(h.width||1,3)/4,shape:h.shape,backoff:h.backoff,simplify:h.simplify,fill:m.fill}),ze=new Array(Re.length);var it=0;for(E=0;E<Re.length;E++){var ot,tt=Re[E];!ot||!N?(ot=tt.slice(),ze[it]=ot,it++):ot.push.apply(ot,tt)}m._fillElement=null,m._fillExclusionElement=G,m._fillsegments=ze.slice(0,it),ze=m._fillsegments,Re.length&&(re=Re[0][0].slice(),ce=Re[Re.length-1],be=ce[ce.length-1].slice()),Xe=function(xr){return function(jr){if($=ie(jr),J=ee(jr),X?N?(X+="L"+$.substr(1),oe=J+("L"+oe.substr(1))):(X+="Z"+$,oe=J+"Z"+oe):(X=$,oe=J),r.hasLines(m)){var wr=d.select(this);if(wr.datum(T),xr)b(wr.style("opacity",0).attr("d",$).call(t.lineGroupStyle)).style("opacity",1);else{var Ir=b(wr);Ir.attr("d",$),t.singleLineStyle(T,Ir)}}}}}var lt=z.selectAll(".js-line").data(Re);b(lt.exit()).style("opacity",0).remove(),lt.each(Xe(!1)),lt.enter().append("path").classed("js-line",!0).style("vector-effect",S?"none":"non-scaling-stroke").call(t.lineGroupStyle).each(Xe(!0)),t.setClipUrl(lt,v.layerClipId,f);function Ee(xr){b(xr).attr("d","M0,0Z")}var _e=function(){var xr=new Array(ze.length);for(E=0;E<ze.length;E++)xr[E]=i(ze[E]);return xr},fe=function(xr){var jr,wr;if(!xr||xr.length===0)for(jr=new Array(ze.length),wr=0;wr<ze.length;wr++){var Ir=ze[wr][0].slice(),bt=ze[wr][ze[wr].length-1].slice();Ir[U]=bt[U]=W;var Be=[bt,Ir],Ke=Be.concat(ze[wr]);jr[wr]=i(Ke)}else{for(jr=new Array(xr.length-1+ze.length),wr=0;wr<xr.length-1;wr++)jr[wr]=i(xr[wr]);var Ue=xr[xr.length-1].slice();for(Ue.reverse(),wr=0;wr<ze.length;wr++)jr[xr.length-1+wr]=i(ze[wr].concat(Ue))}return jr};Re.length?(O?(O.datum(T),re&&be&&(N?(re[U]=be[U]=W,b(O).attr("d","M"+be+"L"+re+"L"+X.substr(1)).call(t.singleFillStyle,f),Ae=fe(null)):(b(O).attr("d",X+"Z").call(t.singleFillStyle,f),Ae=_e())),m._polygons=Ae,m._fillElement=O):I&&(m.fill.substr(0,6)==="tonext"&&X&&Q?(m.fill==="tonext"?(b(I).attr("d",X+"Z"+Q+"Z").call(t.singleFillStyle,f),Ae=_e(),m._polygons=Ae.concat(ue)):(b(I).attr("d",X+"L"+Q.substr(1)+"Z").call(t.singleFillStyle,f),Ae=fe(he),m._polygons=Ae),m._fillElement=I):Ee(I)),m._prevRevpath=oe):(O?Ee(O):I&&Ee(I),m._prevRevpath=null),m._ownPolygons=Ae;function Fe(xr){return xr.filter(function(jr){return!jr.gap&&jr.vis})}function rt(xr){return xr.filter(function(jr){return jr.vis})}function st(xr){return xr.filter(function(jr){return!jr.gap})}function Qe(xr){return xr.id}function Lt(xr){if(xr.ids)return Qe}function kt(){return!1}function Vt(xr,jr,wr){var Ir,bt,Be,Ke=wr[0].trace,Ue=r.hasMarkers(Ke),Me=r.hasText(Ke),qe=Lt(Ke),Ce=kt,Te=kt;if(Ue||Me){var Pe=e,at=Ke.stackgroup,yt=at&&f._fullLayout._scatterStackOpts[p._id+u._id][at].stackgaps==="infer zero";Ke.marker.maxdisplayed||Ke._needsCull?Pe=yt?rt:Fe:at&&!yt&&(Pe=st),Ue&&(Ce=Pe),Me&&(Te=Pe)}bt=xr.selectAll("path.point"),Ir=bt.data(Ce,qe);var Tt=Ir.enter().append("path").classed("point",!0);y&&Tt.call(t.pointStyle,Ke,f).call(t.translatePoints,p,u).style("opacity",0).transition().style("opacity",1),Ir.order();var Ot;Ue&&(Ot=t.makePointStyleFns(Ke)),Ir.each(function(Gt){var rr=d.select(this),Qt=b(rr);Be=t.translatePoint(Gt,Qt,p,u),Be?(t.singlePointStyle(Gt,Qt,Ke,Ot,f),v.layerClipId&&t.hideOutsideRangePoint(Gt,Qt,p,u,Ke.xcalendar,Ke.ycalendar),Ke.customdata&&rr.classed("plotly-customdata",Gt.data!==null&&Gt.data!==void 0)):Qt.remove()}),y?Ir.exit().transition().style("opacity",0).remove():Ir.exit().remove(),bt=jr.selectAll("g"),Ir=bt.data(Te,qe),Ir.enter().append("g").classed("textpoint",!0).append("text"),Ir.order(),Ir.each(function(Gt){var rr=d.select(this),Qt=b(rr.select("text"));Be=t.translatePoint(Gt,Qt,p,u),Be?v.layerClipId&&t.hideOutsideRangePoint(Gt,rr,p,u,Ke.xcalendar,Ke.ycalendar):rr.remove()}),Ir.selectAll("text").call(t.textPointStyle,Ke,f).each(function(Gt){var rr=p.c2p(Gt.x),Qt=u.c2p(Gt.y);d.select(this).selectAll("tspan.line").each(function(){b(d.select(this)).attr({x:rr,y:Qt})})}),Ir.exit().remove()}F.datum(T),B.datum(T),Vt(F,B,T);var Zt=m.cliponaxis===!1,Sr=Zt?null:v.layerClipId;t.setClipUrl(F,Sr,f),t.setClipUrl(B,Sr,f)}function c(f,g,v,T,l){var _=v.xaxis,w=v.yaxis,S=d.extent(A.simpleMap(_.range,_.r2c)),E=d.extent(A.simpleMap(w.range,w.r2c)),y=T[0].trace;if(r.hasMarkers(y)){var b=y.marker.maxdisplayed;if(b!==0){var p=T.filter(function(P){return P.x>=S[0]&&P.x<=S[1]&&P.y>=E[0]&&P.y<=E[1]}),u=Math.ceil(p.length/b),m=0;l.forEach(function(P,L){var z=P[0].trace;r.hasMarkers(z)&&z.marker.maxdisplayed>0&&L<g&&m++});var h=Math.round(m*u/3+Math.floor(m/3)*u/7.1);T.forEach(function(P){delete P.vis}),p.forEach(function(P,L){Math.round((L+h)%u)===0&&(P.vis=!0)})}}}}}),hp=Ze({"src/traces/scatter/marker_colorbar.js"(Z,q){"use strict";q.exports={container:"marker",min:"cmin",max:"cmax"}}}),P2=Ze({"src/traces/scatter/format_labels.js"(Z,q){"use strict";var d=Wo();q.exports=function(A,M,e){var t={},r={_fullLayout:e},o=d.getFromTrace(r,M,"x"),a=d.getFromTrace(r,M,"y"),i=A.orig_x;i===void 0&&(i=A.x);var n=A.orig_y;return n===void 0&&(n=A.y),t.xLabel=d.tickText(o,o.c2l(i),!0).text,t.yLabel=d.tickText(a,a.c2l(n),!0).text,t}}}),ed=Ze({"src/traces/scatter/style.js"(Z,q){"use strict";var d=On(),x=as(),A=oo();function M(o){var a=d.select(o).selectAll("g.trace.scatter");a.style("opacity",function(i){return i[0].trace.opacity}),a.selectAll("g.points").each(function(i){var n=d.select(this),s=i.trace||i[0].trace;e(n,s,o)}),a.selectAll("g.text").each(function(i){var n=d.select(this),s=i.trace||i[0].trace;t(n,s,o)}),a.selectAll("g.trace path.js-line").call(x.lineGroupStyle),a.selectAll("g.trace path.js-fill").call(x.fillGroupStyle,o,!1),A.getComponentMethod("errorbars","style")(a)}function e(o,a,i){x.pointStyle(o.selectAll("path.point"),a,i)}function t(o,a,i){x.textPointStyle(o.selectAll("text"),a,i)}function r(o,a,i){var n=a[0].trace;n.selectedpoints?(x.selectedPointStyle(i.selectAll("path.point"),n),x.selectedTextStyle(i.selectAll("text"),n)):(e(i,n,o),t(i,n,o))}q.exports={style:M,stylePoints:e,styleText:t,styleOnSelect:r}}}),l1=Ze({"src/traces/scatter/get_trace_color.js"(Z,q){"use strict";var d=Yn(),x=Fu();q.exports=function(M,e){var t,r;if(M.mode==="lines")return t=M.line.color,t&&d.opacity(t)?t:M.fillcolor;if(M.mode==="none")return M.fill?M.fillcolor:"";var o=e.mcc||(M.marker||{}).color,a=e.mlcc||((M.marker||{}).line||{}).color;return r=o&&d.opacity(o)?o:a&&d.opacity(a)&&(e.mlw||((M.marker||{}).line||{}).width)?a:"",r?d.opacity(r)<.3?d.addOpacity(r,.3):r:(t=(M.line||{}).color,t&&d.opacity(t)&&x.hasLines(M)&&M.line.width?t:M.fillcolor)}}}),u1=Ze({"src/traces/scatter/hover.js"(Z,q){"use strict";var d=ca(),x=ef(),A=oo(),M=l1(),e=Yn(),t=d.fillText;q.exports=function(o,a,i,n){var s=o.cd,c=s[0].trace,f=o.xa,g=o.ya,v=f.c2p(a),T=g.c2p(i),l=[v,T],_=c.hoveron||"",w=c.mode.indexOf("markers")!==-1?3:.5,S=!!c.xperiodalignment,E=!!c.yperiodalignment;if(_.indexOf("points")!==-1){var y=function(ue){if(S){var le=f.c2p(ue.xStart),he=f.c2p(ue.xEnd);return v>=Math.min(le,he)&&v<=Math.max(le,he)?0:1/0}var G=Math.max(3,ue.mrc||0),$=1-1/G,J=Math.abs(f.c2p(ue.x)-v);return J<G?$*J/G:J-G+$},b=function(ue){if(E){var le=g.c2p(ue.yStart),he=g.c2p(ue.yEnd);return T>=Math.min(le,he)&&T<=Math.max(le,he)?0:1/0}var G=Math.max(3,ue.mrc||0),$=1-1/G,J=Math.abs(g.c2p(ue.y)-T);return J<G?$*J/G:J-G+$},p=function(ue){var le=Math.max(w,ue.mrc||0),he=f.c2p(ue.x)-v,G=g.c2p(ue.y)-T;return Math.max(Math.sqrt(he*he+G*G)-le,1-w/le)},u=x.getDistanceFunction(n,y,b,p);if(x.getClosest(s,u,o),o.index!==!1){var m=s[o.index],h=f.c2p(m.x,!0),P=g.c2p(m.y,!0),L=m.mrc||1;o.index=m.i;var z=s[0].t.orientation,F=z&&(m.sNorm||m.s),B=z==="h"?F:m.orig_x!==void 0?m.orig_x:m.x,O=z==="v"?F:m.orig_y!==void 0?m.orig_y:m.y;return d.extendFlat(o,{color:M(c,m),x0:h-L,x1:h+L,xLabelVal:B,y0:P-L,y1:P+L,yLabelVal:O,spikeDistance:p(m),hovertemplate:c.hovertemplate}),t(m,c,o),A.getComponentMethod("errorbars","hoverInfo")(m,c,o),[o]}}function I(ue){if(!ue)return!1;var le=ue.node();try{var he=new DOMPoint(l[0],l[1]);return le.isPointInFill(he)}catch{var G=le.ownerSVGElement.createSVGPoint();return G.x=l[0],G.y=l[1],le.isPointInFill(G)}}function N(ue){var le,he=[],G=1/0,$=-1/0,J=1/0,X=-1/0,oe;for(le=0;le<ue.length;le++){var ie=ue[le];ie.contains(l)&&(he.push(ie),J=Math.min(J,ie.ymin),X=Math.max(X,ie.ymax))}if(he.length===0)return null;J=Math.max(J,0),X=Math.min(X,g._length),oe=(J+X)/2;var j,ee,re,ce,be,Ae,ze;for(le=0;le<he.length;le++)for(ee=he[le].pts,j=1;j<ee.length;j++)Ae=ee[j-1][1],ze=ee[j][1],Ae>oe!=ze>=oe&&(ce=ee[j-1][0],be=ee[j][0],ze-Ae&&(re=ce+(be-ce)*(oe-Ae)/(ze-Ae),G=Math.min(G,re),$=Math.max($,re)));return G=Math.max(G,0),$=Math.min($,f._length),{x0:G,x1:$,y0:oe,y1:oe}}if(_.indexOf("fills")!==-1&&c._fillElement){var U=I(c._fillElement)&&!I(c._fillExclusionElement);if(U){var W=N(c._polygons);W===null&&(W={x0:l[0],x1:l[0],y0:l[1],y1:l[1]});var Q=e.defaultLine;return e.opacity(c.fillcolor)?Q=c.fillcolor:e.opacity((c.line||{}).color)&&(Q=c.line.color),d.extendFlat(o,{distance:o.maxHoverDistance,x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1,color:Q,hovertemplate:!1}),delete o.index,c.text&&!d.isArrayOrTypedArray(c.text)?o.text=String(c.text):o.text=c.name,[o]}}}}}),c1=Ze({"src/traces/scatter/select.js"(Z,q){"use strict";var d=Fu();q.exports=function(A,M){var e=A.cd,t=A.xaxis,r=A.yaxis,o=[],a=e[0].trace,i,n,s,c,f=!d.hasMarkers(a)&&!d.hasText(a);if(f)return[];if(M===!1)for(i=0;i<e.length;i++)e[i].selected=0;else for(i=0;i<e.length;i++)n=e[i],s=t.c2p(n.x),c=r.c2p(n.y),n.i!==null&&M.contains([s,c],!1,i,A)?(o.push({pointNumber:n.i,x:t.c2d(n.x),y:r.c2d(n.y)}),n.selected=1):n.selected=0;return o}}}),Zz=Ze({"src/plots/cartesian/attributes.js"(Z,q){"use strict";q.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}}),O5=Ze({"src/plots/cartesian/type_defaults.js"(Z,q){"use strict";var d=oo().traceIs,x=a1();q.exports=function(o,a,i,n){i("autotypenumbers",n.autotypenumbersDflt);var s=i("type",(n.splomStash||{}).type);s==="-"&&(A(a,n.data),a.type==="-"?a.type="linear":o.type=a.type)};function A(r,o){if(r.type==="-"){var a=r._id,i=a.charAt(0),n;a.indexOf("scene")!==-1&&(a=i);var s=M(o,a,i);if(s){if(s.type==="histogram"&&i==={v:"y",h:"x"}[s.orientation||"v"]){r.type="linear";return}var c=i+"calendar",f=s[c],g={noMultiCategory:!d(s,"cartesian")||d(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&i==={h:"x",v:"y"}[s.orientation||"v"]&&(g.noMultiCategory=!0),g.autotypenumbers=r.autotypenumbers,t(s,i)){var v=e(s),T=[];for(n=0;n<o.length;n++){var l=o[n];!d(l,"box-violin")||(l[i+"axis"]||i)!==a||(l[v]!==void 0?T.push(l[v][0]):l.name!==void 0?T.push(l.name):T.push("text"),l[c]!==f&&(f=void 0))}r.type=x(T,f,g)}else if(s.type==="splom"){var _=s.dimensions,w=_[s._axesDim[a]];w.visible&&(r.type=x(w.values,f,g))}else r.type=x(s[i]||[s[i+"0"]],f,g)}}}function M(r,o,a){for(var i=0;i<r.length;i++){var n=r[i];if(n.type==="splom"&&n._length>0&&(n["_"+a+"axes"]||{})[o])return n;if((n[a+"axis"]||a)===o){if(t(n,a))return n;if((n[a]||[]).length||n[a+"0"])return n}}}function e(r){return{v:"x",h:"y"}[r.orientation||"v"]}function t(r,o){var a=e(r),i=d(r,"box-violin"),n=d(r._fullInput||{},"candlestick");return i&&!n&&o===a&&r[a]===void 0&&r[a+"0"]===void 0}}}),I2=Ze({"src/plots/cartesian/category_order_defaults.js"(Z,q){"use strict";var d=xp().isTypedArraySpec;function x(A,M){var e=M.dataAttr||A._id.charAt(0),t={},r,o,a;if(M.axData)r=M.axData;else for(r=[],o=0;o<M.data.length;o++){var i=M.data[o];i[e+"axis"]===A._id&&r.push(i)}for(o=0;o<r.length;o++){var n=r[o][e];for(a=0;a<n.length;a++){var s=n[a];s!=null&&(t[s]=1)}}return Object.keys(t)}q.exports=function(M,e,t,r){if(e.type==="category"){var o=M.categoryarray,a=Array.isArray(o)&&o.length>0||d(o),i;a&&(i="array");var n=t("categoryorder",i),s;n==="array"&&(s=t("categoryarray")),!a&&n==="array"&&(n=e.categoryorder="trace"),n==="trace"?e._initialCategories=[]:n==="array"?e._initialCategories=s.slice():(s=x(e,r).sort(),n==="category ascending"?e._initialCategories=s:n==="category descending"&&(e._initialCategories=s.reverse()))}}}}),D_=Ze({"src/plots/cartesian/line_grid_defaults.js"(Z,q){"use strict";var d=Ch().mix,x=oh(),A=ca();q.exports=function(e,t,r,o){o=o||{};var a=o.dfltColor;function i(h,P){return A.coerce2(e,t,o.attributes,h,P)}var n=i("linecolor",a),s=i("linewidth"),c=r("showline",o.showLine||!!n||!!s);c||(delete t.linecolor,delete t.linewidth);var f=d(a,o.bgColor,o.blend||x.lightFraction).toRgbString(),g=i("gridcolor",f),v=i("gridwidth"),T=i("griddash"),l=r("showgrid",o.showGrid||!!g||!!v||!!T);if(l||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var _=d(t.gridcolor,o.bgColor,67).toRgbString(),w=i("minor.gridcolor",_),S=i("minor.gridwidth",t.gridwidth||1),E=i("minor.griddash",t.griddash||"solid"),y=r("minor.showgrid",!!w||!!S||!!E);y||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var b=i("zerolinelayer"),p=i("zerolinecolor",a),u=i("zerolinewidth"),m=r("zeroline",o.showGrid||!!p||!!u);m||(delete t.zerolinelayer,delete t.zerolinecolor,delete t.zerolinewidth)}}}}),z_=Ze({"src/plots/cartesian/axis_defaults.js"(Z,q){"use strict";var d=ns(),x=oo(),A=ca(),M=Dl(),e=fp(),t=Wh(),r=X0(),o=t1(),a=$m(),i=Qm(),n=I2(),s=D_(),c=h5(),f=wv(),g=kh().WEEKDAY_PATTERN,v=kh().HOUR_PATTERN;q.exports=function(S,E,y,b,p){var u=b.letter,m=b.font||{},h=b.splomStash||{},P=y("visible",!b.visibleDflt),L=E._template||{},z=E.type||L.type||"-",F;if(z==="date"){var B=x.getComponentMethod("calendars","handleDefaults");B(S,E,"calendar",b.calendar),b.noTicklabelmode||(F=y("ticklabelmode"))}!b.noTicklabelindex&&(z==="date"||z==="linear")&&y("ticklabelindex");var O="";(!b.noTicklabelposition||z==="multicategory")&&(O=A.coerce(S,E,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:F==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),b.noTicklabeloverflow||y("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":z==="category"||z==="multicategory"?"allow":"hide past div"),f(E,p),c(S,E,y,b),n(S,E,y,b),b.noHover||(z!=="category"&&y("hoverformat"),b.noUnifiedhovertitle||y("unifiedhovertitle.text"));var I=y("color"),N=I!==t.color.dflt?I:m.color,U=h.label||p._dfltTitle[u];if(i(S,E,y,z,b),!P)return E;y("title.text",U),A.coerceFont(y,"title.font",m,{overrideDflt:{size:A.bigFont(m.size),color:N}}),r(S,E,y,z);var W=b.hasMinor;if(W&&(M.newContainer(E,"minor"),r(S,E,y,z,{isMinor:!0})),a(S,E,y,z,b),o(S,E,y,b),W){var Q=b.isMinor;b.isMinor=!0,o(S,E,y,b),b.isMinor=Q}s(S,E,y,{dfltColor:I,bgColor:b.bgColor,showGrid:b.showGrid,hasMinor:W,attributes:t}),W&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&y("mirror");var ue=z==="multicategory";if(!b.noTickson&&(z==="category"||ue)&&(E.ticks||E.showgrid)&&(ue?(y("tickson","boundaries"),delete E.ticklabelposition):y("tickson")),ue){var le=y("showdividers");le&&(y("dividercolor"),y("dividerwidth"))}if(z==="date")if(e(S,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var he=0;he<E.rangebreaks.length;he++)if(E.rangebreaks[he].pattern===g){E._hasDayOfWeekBreaks=!0;break}if(f(E,p),p._has("scattergl")||p._has("splom"))for(var G=0;G<b.data.length;G++){var $=b.data[G];($.type==="scattergl"||$.type==="splom")&&($.visible=!1,A.warn($.type+" traces do not work on axes with rangebreaks. Setting trace "+$.index+" to `visible: false`."))}}return E};function T(w,S,E){function y(F,B){return A.coerce(w,S,t.rangebreaks,F,B)}var b=y("enabled");if(b){var p=y("bounds");if(p&&p.length>=2){var u="",m,h;if(p.length===2){for(m=0;m<2;m++)if(h=_(p[m]),h){u=g;break}}var P=y("pattern",u);if(P===g)for(m=0;m<2;m++)h=_(p[m]),h&&(S.bounds[m]=p[m]=h-1);if(P)for(m=0;m<2;m++)switch(h=p[m],P){case g:if(!d(h)){S.enabled=!1;return}if(h=+h,h!==Math.floor(h)||h<0||h>=7){S.enabled=!1;return}S.bounds[m]=p[m]=h;break;case v:if(!d(h)){S.enabled=!1;return}if(h=+h,h<0||h>24){S.enabled=!1;return}S.bounds[m]=p[m]=h;break}if(E.autorange===!1){var L=E.range;if(L[0]<L[1]){if(p[0]<L[0]&&p[1]>L[1]){S.enabled=!1;return}}else if(p[0]>L[0]&&p[1]<L[1]){S.enabled=!1;return}}}else{var z=y("values");if(z&&z.length)y("dvalue");else{S.enabled=!1;return}}}}var l={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(w){if(typeof w=="string")return l[w.substr(0,3).toLowerCase()]}}}),R2=Ze({"src/plots/cartesian/position_defaults.js"(Z,q){"use strict";var d=ns(),x=ca();q.exports=function(M,e,t,r){var o=r.counterAxes||[],a=r.overlayableAxes||[],i=r.letter,n=r.grid,s=r.overlayingDomain,c,f,g,v,T,l;n&&(f=n._domains[i][n._axisMap[e._id]],c=n._anchors[e._id],f&&(g=n[i+"side"].split(" ")[0],v=n.domain[i][g==="right"||g==="top"?1:0])),f=f||[0,1],c=c||(d(M.position)?"free":o[0]||"free"),g=g||(i==="x"?"bottom":"left"),v=v||0,T=0,l=!1;var _=x.coerce(M,e,{anchor:{valType:"enumerated",values:["free"].concat(o),dflt:c}},"anchor"),w=x.coerce(M,e,{side:{valType:"enumerated",values:i==="x"?["bottom","top"]:["left","right"],dflt:g}},"side");if(_==="free"){if(i==="y"){var S=t("autoshift");S&&(v=w==="left"?s[0]:s[1],l=e.automargin?e.automargin:!0,T=w==="left"?-3:3),t("shift",T)}t("position",v)}t("automargin",l);var E=!1;if(a.length&&(E=x.coerce(M,e,{overlaying:{valType:"enumerated",values:[!1].concat(a),dflt:!1}},"overlaying")),!E){var y=t("domain",f);y[0]>y[1]-1/4096&&(e.domain=f),x.noneOrAll(M.domain,e.domain,f),e.tickmode==="sync"&&(e.tickmode="auto")}return t("layer"),e}}}),Yz=Ze({"src/plots/cartesian/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Qp().isUnifiedHover,M=_5(),e=Dl(),t=$y(),r=Wh(),o=O5(),a=z_(),i=Y0(),n=R2(),s=$c(),c=s.id2name,f=s.name2id,g=kh().AX_ID_PATTERN,v=oo(),T=v.traceIs,l=v.getComponentMethod;function _(w,S,E){Array.isArray(w[S])?w[S].push(E):w[S]=[E]}q.exports=function(S,E,y){var b=E.autotypenumbers,p={},u={},m={},h={},P={},L={},z={},F={},B={},O={},I,N;for(I=0;I<y.length;I++){var U=y[I];if(T(U,"cartesian")){var W;if(U.xaxis)W=c(U.xaxis),_(p,W,U);else if(U.xaxes)for(N=0;N<U.xaxes.length;N++)_(p,c(U.xaxes[N]),U);var Q;if(U.yaxis)Q=c(U.yaxis),_(p,Q,U);else if(U.yaxes)for(N=0;N<U.yaxes.length;N++)_(p,c(U.yaxes[N]),U);if(U.type==="funnel"?U.orientation==="h"?(W&&(u[W]=!0),Q&&(z[Q]=!0)):Q&&(m[Q]=!0):U.type==="image"?(Q&&(F[Q]=!0),W&&(F[W]=!0)):(Q&&(P[Q]=!0,L[Q]=!0),(!T(U,"carpet")||U.type==="carpet"&&!U._cheater)&&W&&(h[W]=!0)),U.type==="carpet"&&U._cheater&&W&&(u[W]=!0),T(U,"2dMap")&&(B[W]=!0,B[Q]=!0),T(U,"oriented")){var ue=U.orientation==="h"?Q:W;O[ue]=!0}}}var le=E._subplots,he=le.xaxis,G=le.yaxis,$=d.simpleMap(he,c),J=d.simpleMap(G,c),X=$.concat(J),oe=x.background;he.length&&G.length&&(oe=d.coerce(S,E,t,"plot_bgcolor"));var ie=x.combine(oe,E.paper_bgcolor),j,ee,re,ce,be;function Ae(){var Ce=p[j]||[];be._traceIndices=Ce.map(function(Te){return Te.index}),be._annIndices=[],be._shapeIndices=[],be._selectionIndices=[],be._imgIndices=[],be._subplotsWith=[],be._counterAxes=[],be._name=be._attr=j,be._id=ee}function ze(Ce,Te){return d.coerce(ce,be,r,Ce,Te)}function Re(Ce,Te){return d.coerce2(ce,be,r,Ce,Te)}function Xe(Ce){return Ce==="x"?G:he}function it(Ce,Te){for(var Pe=Ce==="x"?$:J,at=[],yt=0;yt<Pe.length;yt++){var Tt=Pe[yt];Tt!==Te&&!(S[Tt]||{}).overlaying&&at.push(f(Tt))}return at}var ot={x:Xe("x"),y:Xe("y")},tt=ot.x.concat(ot.y),lt={},Ee=[];function _e(){var Ce=ce.matches;g.test(Ce)&&tt.indexOf(Ce)===-1&&(lt[Ce]=ce.type,Ee=Object.keys(lt))}var fe=M(S,E),Fe=A(fe);for(I=0;I<X.length;I++){j=X[I],ee=f(j),re=j.charAt(0),d.isPlainObject(S[j])||(S[j]={}),ce=S[j],be=e.newContainer(E,j,re+"axis"),Ae();var rt=re==="x"&&!h[j]&&u[j]||re==="y"&&!P[j]&&m[j],st=re==="y"&&(!L[j]&&z[j]||F[j]),Qe={hasMinor:!0,letter:re,font:E.font,outerTicks:B[j],showGrid:!O[j],data:p[j]||[],bgColor:ie,calendar:E.calendar,automargin:!0,visibleDflt:rt,reverseDflt:st,autotypenumbersDflt:b,splomStash:((E._splomAxes||{})[re]||{})[ee],noAutotickangles:re==="y"};ze("uirevision",E.uirevision),o(ce,be,ze,Qe),a(ce,be,ze,Qe,E);var Lt=Fe&&re===fe.charAt(0),kt=Re("spikecolor",Fe?be.color:void 0),Vt=Re("spikethickness",Fe?1.5:void 0),Zt=Re("spikedash",Fe?"dot":void 0),Sr=Re("spikemode",Fe?"across":void 0),xr=Re("spikesnap"),jr=ze("showspikes",!!Lt||!!kt||!!Vt||!!Zt||!!Sr||!!xr);jr||(delete be.spikecolor,delete be.spikethickness,delete be.spikedash,delete be.spikemode,delete be.spikesnap);var wr=c(ce.overlaying),Ir=[0,1];if(E[wr]!==void 0){var bt=c(E[wr].anchor);E[bt]!==void 0&&(Ir=E[bt].domain)}n(ce,be,ze,{letter:re,counterAxes:ot[re],overlayableAxes:it(re,j),grid:E.grid,overlayingDomain:Ir}),ze("title.standoff"),_e(),be._input=ce}for(I=0;I<Ee.length;){ee=Ee[I++],j=c(ee),re=j.charAt(0),d.isPlainObject(S[j])||(S[j]={}),ce=S[j],be=e.newContainer(E,j,re+"axis"),Ae();var Be={letter:re,font:E.font,outerTicks:B[j],showGrid:!O[j],data:[],bgColor:ie,calendar:E.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:b,splomStash:((E._splomAxes||{})[re]||{})[ee]};ze("uirevision",E.uirevision),be.type=lt[ee]||"linear",a(ce,be,ze,Be,E),n(ce,be,ze,{letter:re,counterAxes:ot[re],overlayableAxes:it(re,j),grid:E.grid}),ze("fixedrange"),ze("modebardisable"),_e(),be._input=ce}var Ke=l("rangeslider","handleDefaults"),Ue=l("rangeselector","handleDefaults");for(I=0;I<$.length;I++)j=$[I],ce=S[j],be=E[j],Ke(S,E,j),be.type==="date"&&Ue(ce,be,E,J,be.calendar),ze("fixedrange"),ze("modebardisable");for(I=0;I<J.length;I++){j=J[I],ce=S[j],be=E[j];var Me=E[c(be.anchor)],qe=l("rangeslider","isVisible")(Me);ze("fixedrange",qe),ze("modebardisable")}i.handleDefaults(S,E,{axIds:tt.concat(Ee).sort(s.idSort),axHasImage:F})}}}),Kz=Ze({"src/plots/cartesian/transition_axes.js"(Z,q){"use strict";var d=On(),x=oo(),A=ca(),M=as(),e=Wo();q.exports=function(r,o,a,i){var n=r._fullLayout;if(o.length===0){e.redrawComponents(r);return}function s(E){var y=E.xaxis,b=E.yaxis;n._defs.select("#"+E.clipId+"> rect").call(M.setTranslate,0,0).call(M.setScale,1,1),E.plot.call(M.setTranslate,y._offset,b._offset).call(M.setScale,1,1);var p=E.plot.selectAll(".scatterlayer .trace");p.selectAll(".point").call(M.setPointGroupScale,1,1),p.selectAll(".textpoint").call(M.setTextPointsScale,1,1),p.call(M.hideOutsideRangePoints,E)}function c(E,y){var b=E.plotinfo,p=b.xaxis,u=b.yaxis,m=p._length,h=u._length,P=!!E.xr1,L=!!E.yr1,z=[];if(P){var F=A.simpleMap(E.xr0,p.r2l),B=A.simpleMap(E.xr1,p.r2l),O=F[1]-F[0],I=B[1]-B[0];z[0]=(F[0]*(1-y)+y*B[0]-F[0])/(F[1]-F[0])*m,z[2]=m*(1-y+y*I/O),p.range[0]=p.l2r(F[0]*(1-y)+y*B[0]),p.range[1]=p.l2r(F[1]*(1-y)+y*B[1])}else z[0]=0,z[2]=m;if(L){var N=A.simpleMap(E.yr0,u.r2l),U=A.simpleMap(E.yr1,u.r2l),W=N[1]-N[0],Q=U[1]-U[0];z[1]=(N[1]*(1-y)+y*U[1]-N[1])/(N[0]-N[1])*h,z[3]=h*(1-y+y*Q/W),u.range[0]=p.l2r(N[0]*(1-y)+y*U[0]),u.range[1]=u.l2r(N[1]*(1-y)+y*U[1])}else z[1]=0,z[3]=h;e.drawOne(r,p,{skipTitle:!0}),e.drawOne(r,u,{skipTitle:!0}),e.redrawComponents(r,[p._id,u._id]);var ue=P?m/z[2]:1,le=L?h/z[3]:1,he=P?z[0]:0,G=L?z[1]:0,$=P?z[0]/z[2]*m:0,J=L?z[1]/z[3]*h:0,X=p._offset-$,oe=u._offset-J;b.clipRect.call(M.setTranslate,he,G).call(M.setScale,1/ue,1/le),b.plot.call(M.setTranslate,X,oe).call(M.setScale,ue,le),M.setPointGroupScale(b.zoomScalePts,1/ue,1/le),M.setTextPointsScale(b.zoomScaleTxt,1/ue,1/le)}var f;i&&(f=i());function g(){for(var E={},y=0;y<o.length;y++){var b=o[y],p=b.plotinfo.xaxis,u=b.plotinfo.yaxis;b.xr1&&(E[p._name+".range"]=b.xr1.slice()),b.yr1&&(E[u._name+".range"]=b.yr1.slice())}return f&&f(),x.call("relayout",r,E).then(function(){for(var m=0;m<o.length;m++)s(o[m].plotinfo)})}function v(){for(var E={},y=0;y<o.length;y++){var b=o[y],p=b.plotinfo.xaxis,u=b.plotinfo.yaxis;b.xr0&&(E[p._name+".range"]=b.xr0.slice()),b.yr0&&(E[u._name+".range"]=b.yr0.slice())}return x.call("relayout",r,E).then(function(){for(var m=0;m<o.length;m++)s(o[m].plotinfo)})}var T,l,_,w=d.ease(a.easing);r._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,v()});function S(){l=Date.now();for(var E=Math.min(1,(l-T)/a.duration),y=w(E),b=0;b<o.length;b++)c(o[b],y);l-T>a.duration?(g(),_=window.cancelAnimationFrame(S)):_=window.requestAnimationFrame(S)}return T=Date.now(),_=window.requestAnimationFrame(S),Promise.resolve()}}}),Zf=Ze({"src/plots/cartesian/index.js"(Z){"use strict";var q=On(),d=oo(),x=ca(),A=xc(),M=as(),e=Hh().getModuleCalcData,t=$c(),r=kh(),o=vd(),a=x.ensureSingle;function i(T,l,_){return x.ensureSingle(T,l,_,function(w){w.datum(_)})}var n=r.zindexSeparator;Z.name="cartesian",Z.attr=["xaxis","yaxis"],Z.idRoot=["x","y"],Z.idRegex=r.idRegex,Z.attrRegex=r.attrRegex,Z.attributes=Zz(),Z.layoutAttributes=Wh(),Z.supplyLayoutDefaults=Yz(),Z.transitionAxes=Kz(),Z.finalizeSubplots=function(T,l){var _=l._subplots,w=_.xaxis,S=_.yaxis,E=_.cartesian,y=E,b={},p={},u,m,h;for(u=0;u<y.length;u++){var P=y[u].split("y");b[P[0]]=1,p["y"+P[1]]=1}for(u=0;u<w.length;u++)m=w[u],b[m]||(h=(T[t.id2name(m)]||{}).anchor,r.idRegex.y.test(h)||(h="y"),E.push(m+h),y.push(m+h),p[h]||(p[h]=1,x.pushUnique(S,h)));for(u=0;u<S.length;u++)h=S[u],p[h]||(m=(T[t.id2name(h)]||{}).anchor,r.idRegex.x.test(m)||(m="x"),E.push(m+h),y.push(m+h),b[m]||(b[m]=1,x.pushUnique(w,m)));if(!y.length){m="",h="";for(var L in T)if(r.attrRegex.test(L)){var z=L.charAt(0);z==="x"?(!m||+L.substr(5)<+m.substr(5))&&(m=L):(!h||+L.substr(5)<+h.substr(5))&&(h=L)}m=m?t.name2id(m):"x",h=h?t.name2id(h):"y",w.push(m),S.push(h),E.push(m+h)}},Z.plot=function(T,l,_,w){var S=T._fullLayout,E=S._subplots.cartesian,y=T.calcdata,b;if(!Array.isArray(l))for(l=[],b=0;b<y.length;b++)l.push(b);for(var p=S._zindices,u=0;u<p.length;u++){var m=p[u];for(b=0;b<E.length;b++){var h=E[b],P=S._plots[h];if(u>0){var L=P.id;if(L.indexOf(n)!==-1)continue;L+=n+(u+1),P=x.extendFlat({},P,{id:L,plot:S._cartesianlayer.selectAll(".subplot").select("."+L)})}for(var z=[],F,B=0;B<y.length;B++){var O=y[B],I=O[0].trace;m===(I.zorder||0)&&I.xaxis+I.yaxis===h&&((l.indexOf(I.index)!==-1||I.carpet)&&(F&&F[0].trace.xaxis+F[0].trace.yaxis===h&&["tonextx","tonexty","tonext"].indexOf(I.fill)!==-1&&z.indexOf(F)===-1&&z.push(F),z.push(O)),F=O)}s(T,P,z,_,w)}}};function s(T,l,_,w,S){for(var E=r.traceLayerClasses,y=T._fullLayout,b=y._zindices,p=y._modules,u,m,h,P=[],L=[],z=0;z<b.length;z++)for(var F=b[z],B=0;B<p.length;B++){u=p[B];var O=u.name,I=d.modules[O].categories;if(I.svg){var N=u.layerName||O+"layer",U=N+(z?Number(z)+1:""),W=u.plot;m=e(_,W,F),h=m[0],_=m[1],h.length&&P.push({i:E.indexOf(N),zindex:z,className:U,plotMethod:W,cdModule:h}),I.zoomScale&&L.push("."+U)}}P.sort(function(le,he){return(le.zindex||0)-(he.zindex||0)||le.i-he.i});var Q=l.plot.selectAll("g.mlayer").data(P,function(le){return le.className});if(Q.enter().append("g").attr("class",function(le){return le.className}).classed("mlayer",!0).classed("rangeplot",l.isRangePlot),Q.exit().remove(),Q.order(),Q.each(function(le){var he=q.select(this),G=le.className;le.plotMethod(T,l,le.cdModule,he,w,S),r.clipOnAxisFalseQuery.indexOf("."+G)===-1&&M.setClipUrl(he,l.layerClipId,T)}),y._has("scattergl")&&(u=d.getModule("scattergl"),h=e(_,u)[0],u.plot(T,l,h)),!T._context.staticPlot&&(l._hasClipOnAxisFalse&&(l.clipOnAxisFalseTraces=l.plot.selectAll(r.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),L.length)){var ue=l.plot.selectAll(L.join(",")).selectAll(".trace");l.zoomScalePts=ue.selectAll("path.point"),l.zoomScaleTxt=ue.selectAll(".textpoint")}}Z.clean=function(T,l,_,w){var S=w._plots||{},E=l._plots||{},y=w._subplots||{},b,p,u;if(w._hasOnlyLargeSploms&&!l._hasOnlyLargeSploms)for(u in S)b=S[u],b.plotgroup&&b.plotgroup.remove();var m=w._has&&w._has("gl"),h=l._has&&l._has("gl");if(m&&!h)for(u in S)b=S[u],b._scene&&b._scene.destroy();if(y.xaxis&&y.yaxis){var P=t.listIds({_fullLayout:w});for(p=0;p<P.length;p++){var L=P[p];l[t.id2name(L)]||w._infolayer.selectAll(".g-"+L+"title").remove()}}var z=w._has&&w._has("cartesian"),F=l._has&&l._has("cartesian");if(z&&!F)g(w._cartesianlayer.selectAll(".subplot"),w),w._defs.selectAll(".axesclip").remove(),delete w._axisConstraintGroups,delete w._axisMatchGroups;else if(y.cartesian)for(p=0;p<y.cartesian.length;p++){var B=y.cartesian[p];if(B.indexOf(n)===-1&&!E[B]){var O="."+B+",."+B+"-x,."+B+"-y";w._cartesianlayer.selectAll(O).remove(),v(B,w)}}},Z.drawFramework=function(T){var l=T._fullLayout,_=T.calcdata,w,S={};for(w=0;w<_.length;w++){var E=_[w][0],y=E.trace,b=y.zorder||0;S[b]||(S[b]=[]),S[b].push(E)}var p=Object.keys(S).map(Number).sort(x.sorterAsc);p.length||(p=[0]),l._zindices=p;var u=c(T),m=u.length,h=[];for(w=0;w<m;w++)h[w]=u[w].slice();for(var P=1;P<p.length;P++){var L=[];for(w=0;w<m;w++)L[w]=u[w].slice(),L[w][0]+=n+(P+1);h=h.concat(L)}var z=l._cartesianlayer.selectAll(".subplot").data(h,String);z.enter().append("g").attr("class",function(F){return"subplot "+F[0]}),z.order(),z.exit().call(g,l),z.each(function(F){var B=F[0],O=B.indexOf(n),I=O!==-1,N=I?B.slice(0,O):B,U=l._plots[B];U||(U=x.extendFlat({},l._plots[N]),U&&(U.id=B,l._plots[B]=U,l._subplots.cartesian.push(B))),U&&(U.plotgroup=q.select(this),f(T,U),I||(U.draglayer=a(l._draggers,"g",B)))})},Z.rangePlot=function(T,l,_){f(T,l),s(T,l,_),A.style(T)};function c(T){var l=T._fullLayout,_=l._zindices.length,w=l._subplots.cartesian,S=w.length,E,y,b,p,u,m,h=[],P=[];for(E=0;E<S;E++){b=w[E],p=l._plots[b],u=p.xaxis,m=p.yaxis;var L=u._mainAxis,z=m._mainAxis,F=L._id+z._id,B=l._plots[F];p.overlays=[],F!==b&&B?(p.mainplot=F,p.mainplotinfo=B,P.push(b)):(p.mainplot=void 0,p.mainplotinfo=void 0,h.push(b))}for(E=0;E<P.length;E++)b=P[E],p=l._plots[b],p.mainplotinfo.overlays.push(p);var O=h.concat(P),I=[];for(E=0;E<S;E++){b=O[E],p=l._plots[b],u=p.xaxis,m=p.yaxis;for(var N=[],U=1;U<=_;U++){var W="";for(U>1&&(W+=n+U),N.push(b+W),y=0;y<p.overlays.length;y++)N.push(p.overlays[y].id+W)}N=N.concat([u.layer,m.layer,u.overlaying||"",m.overlaying||""]),I.push(N)}return I}function f(T,l){var _=T._fullLayout,w=l.plotgroup,S=l.id,E=S.indexOf(n),y=E!==-1,b=r.layerValue2layerClass[l.xaxis.layer],p=r.layerValue2layerClass[l.yaxis.layer],u=_._hasOnlyLargeSploms,m=_._zindices.length>1,h=l.mainplotinfo;if(!l.mainplot||m)if(u)l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.xaxislayer=a(w,"g","xaxislayer-above"),l.yaxislayer=a(w,"g","yaxislayer-above");else{if(!y){var P=a(w,"g","layer-subplot");l.shapelayer=a(P,"g","shapelayer"),l.imagelayer=a(P,"g","imagelayer"),h&&m?(l.minorGridlayer=h.minorGridlayer,l.gridlayer=h.gridlayer,l.zerolinelayer=h.zerolinelayer):(l.minorGridlayer=a(w,"g","minor-gridlayer"),l.gridlayer=a(w,"g","gridlayer"),l.zerolinelayer=a(w,"g","zerolinelayer"));var L=a(w,"g","layer-between");l.shapelayerBetween=a(L,"g","shapelayer"),l.imagelayerBetween=a(L,"g","imagelayer"),a(w,"path","xlines-below"),a(w,"path","ylines-below"),l.overlinesBelow=a(w,"g","overlines-below"),a(w,"g","xaxislayer-below"),a(w,"g","yaxislayer-below"),l.overaxesBelow=a(w,"g","overaxes-below")}l.overplot=a(w,"g","overplot"),l.plot=a(l.overplot,"g",S),h&&m?l.zerolinelayerAbove=h.zerolinelayerAbove:l.zerolinelayerAbove=a(w,"g","zerolinelayer-above"),y||(l.xlines=a(w,"path","xlines-above"),l.ylines=a(w,"path","ylines-above"),l.overlinesAbove=a(w,"g","overlines-above"),a(w,"g","xaxislayer-above"),a(w,"g","yaxislayer-above"),l.overaxesAbove=a(w,"g","overaxes-above"),l.xlines=w.select(".xlines-"+b),l.ylines=w.select(".ylines-"+p),l.xaxislayer=w.select(".xaxislayer-"+b),l.yaxislayer=w.select(".yaxislayer-"+p))}else{var z=h.plotgroup,F=S+"-x",B=S+"-y";l.minorGridlayer=h.minorGridlayer,l.gridlayer=h.gridlayer,l.zerolinelayer=h.zerolinelayer,l.zerolinelayerAbove=h.zerolinelayerAbove,a(h.overlinesBelow,"path",F),a(h.overlinesBelow,"path",B),a(h.overaxesBelow,"g",F),a(h.overaxesBelow,"g",B),l.plot=a(h.overplot,"g",S),a(h.overlinesAbove,"path",F),a(h.overlinesAbove,"path",B),a(h.overaxesAbove,"g",F),a(h.overaxesAbove,"g",B),l.xlines=z.select(".overlines-"+b).select("."+F),l.ylines=z.select(".overlines-"+p).select("."+B),l.xaxislayer=z.select(".overaxes-"+b).select("."+F),l.yaxislayer=z.select(".overaxes-"+p).select("."+B)}y||(u||(i(l.minorGridlayer,"g",l.xaxis._id),i(l.minorGridlayer,"g",l.yaxis._id),l.minorGridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort),i(l.gridlayer,"g",l.xaxis._id),i(l.gridlayer,"g",l.yaxis._id),l.gridlayer.selectAll("g").map(function(O){return O[0]}).sort(t.idSort)),l.xlines.style("fill","none").classed("crisp",!0),l.ylines.style("fill","none").classed("crisp",!0))}function g(T,l){if(T){var _={};T.each(function(p){var u=p[0],m=q.select(this);m.remove(),v(u,l),_[u]=!0});for(var w in l._plots)for(var S=l._plots[w],E=S.overlays||[],y=0;y<E.length;y++){var b=E[y];_[b.id]&&b.plot.selectAll(".trace").remove()}}}function v(T,l){l._draggers.selectAll("g."+T).remove(),l._defs.select("#clip"+l._uid+T+"plot").remove()}Z.toSVG=function(T){var l=T._fullLayout._glimages,_=q.select(T).selectAll(".svg-container"),w=_.filter(function(E,y){return y===_.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function S(){var E=this,y=E.toDataURL("image/png"),b=l.append("svg:image");b.attr({xmlns:o.svg,"xlink:href":y,preserveAspectRatio:"none",x:0,y:0,width:E.style.width,height:E.style.height})}w.each(S)},Z.updateFx=P5().updateFx}}),Jz=Ze({"src/traces/scatter/index.js"(Z,q){"use strict";var d=Fu();q.exports={hasLines:d.hasLines,hasMarkers:d.hasMarkers,hasText:d.hasText,isBubble:d.isBubble,attributes:tf(),layoutAttributes:y2(),supplyDefaults:Gz(),crossTraceDefaults:D5(),supplyLayoutDefaults:Hz(),calc:Bd().calc,crossTraceCalc:Xz(),arraysToCalcdata:Av(),plot:s1(),colorbar:hp(),formatLabels:P2(),style:ed().style,styleOnSelect:ed().styleOnSelect,hoverPoints:u1(),selectPoints:c1(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Zf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}}),$z=Ze({"src/components/annotations/draw_arrow_head.js"(Z,q){"use strict";var d=On(),x=Yn(),A=C5(),M=ca(),e=M.strScale,t=M.strRotate,r=M.strTranslate;q.exports=function(a,i,n){var s=a.node(),c=A[n.arrowhead||0],f=A[n.startarrowhead||0],g=(n.arrowwidth||1)*(n.arrowsize||1),v=(n.arrowwidth||1)*(n.startarrowsize||1),T=i.indexOf("start")>=0,l=i.indexOf("end")>=0,_=c.backoff*g+n.standoff,w=f.backoff*v+n.startstandoff,S,E,y,b;if(s.nodeName==="line"){S={x:+a.attr("x1"),y:+a.attr("y1")},E={x:+a.attr("x2"),y:+a.attr("y2")};var p=S.x-E.x,u=S.y-E.y;if(y=Math.atan2(u,p),b=y+Math.PI,_&&w&&_+w>Math.sqrt(p*p+u*u)){W();return}if(_){if(_*_>p*p+u*u){W();return}var m=_*Math.cos(y),h=_*Math.sin(y);E.x+=m,E.y+=h,a.attr({x2:E.x,y2:E.y})}if(w){if(w*w>p*p+u*u){W();return}var P=w*Math.cos(y),L=w*Math.sin(y);S.x-=P,S.y-=L,a.attr({x1:S.x,y1:S.y})}}else if(s.nodeName==="path"){var z=s.getTotalLength(),F="";if(z<_+w){W();return}var B=s.getPointAtLength(0),O=s.getPointAtLength(.1);y=Math.atan2(B.y-O.y,B.x-O.x),S=s.getPointAtLength(Math.min(w,z)),F="0px,"+w+"px,";var I=s.getPointAtLength(z),N=s.getPointAtLength(z-.1);b=Math.atan2(I.y-N.y,I.x-N.x),E=s.getPointAtLength(Math.max(0,z-_));var U=F?w+_:_;F+=z-U+"px,"+z+"px",a.style("stroke-dasharray",F)}function W(){a.style("stroke-dasharray","0px,100px")}function Q(ue,le,he,G){ue.path&&(ue.noRotate&&(he=0),d.select(s.parentNode).append("path").attr({class:a.attr("class"),d:ue.path,transform:r(le.x,le.y)+t(he*180/Math.PI)+e(G)}).style({fill:x.rgb(n.arrowcolor),"stroke-width":0}))}T&&Q(f,S,y,v),l&&Q(c,E,b,g)}}}),D2=Ze({"src/components/annotations/draw.js"(Z,q){"use strict";var d=On(),x=oo(),A=xc(),M=ca(),e=M.strTranslate,t=Wo(),r=Yn(),o=as(),a=ef(),i=fu(),n=Kd(),s=Tp(),c=Dl().arrayEditor,f=$z();q.exports={draw:g,drawOne:v,drawRaw:l};function g(_){var w=_._fullLayout;w._infolayer.selectAll(".annotation").remove();for(var S=0;S<w.annotations.length;S++)w.annotations[S].visible&&v(_,S);return A.previousPromises(_)}function v(_,w){var S=_._fullLayout,E=S.annotations[w]||{},y=t.getFromId(_,E.xref),b=t.getFromId(_,E.yref);y&&y.setScale(),b&&b.setScale(),l(_,E,w,!1,y,b)}function T(_,w,S,E,y){var b=y[S],p=y[S+"ref"],u=S.indexOf("y")!==-1,m=t.getRefType(p)==="domain",h=u?E.h:E.w;return _?m?b+(u?-w:w)/_._length:_.p2r(_.r2p(b)+w):b+(u?-w:w)/h}function l(_,w,S,E,y,b){var p=_._fullLayout,u=_._fullLayout._size,m=_._context.edits,h,P;E?(h="annotation-"+E,P=E+".annotations"):(h="annotation",P="annotations");var L=c(_.layout,P,w),z=L.modifyBase,F=L.modifyItem,B=L.getUpdateObj;p._infolayer.selectAll("."+h+'[data-index="'+S+'"]').remove();var O="clip"+p._uid+"_ann"+S;if(!w._input||w.visible===!1){d.selectAll("#"+O).remove();return}var I={x:{},y:{}},N=+w.textangle||0,U=p._infolayer.append("g").classed(h,!0).attr("data-index",String(S)).style("opacity",w.opacity),W=U.append("g").classed("annotation-text-g",!0),Q=m[w.showarrow?"annotationTail":"annotationPosition"],ue=w.captureevents||m.annotationText||Q;function le(Ae){var ze={index:S,annotation:w._input,fullAnnotation:w,event:Ae};return E&&(ze.subplotId=E),ze}var he=W.append("g").style("pointer-events",ue?"all":null).call(n,"pointer").on("click",function(){_._dragging=!1,_.emit("plotly_clickannotation",le(d.event))});w.hovertext&&he.on("mouseover",function(){var Ae=w.hoverlabel,ze=Ae.font,Re=this.getBoundingClientRect(),Xe=_.getBoundingClientRect();a.loneHover({x0:Re.left-Xe.left,x1:Re.right-Xe.left,y:(Re.top+Re.bottom)/2-Xe.top,text:w.hovertext,color:Ae.bgcolor,borderColor:Ae.bordercolor,fontFamily:ze.family,fontSize:ze.size,fontColor:ze.color,fontWeight:ze.weight,fontStyle:ze.style,fontVariant:ze.variant,fontShadow:ze.fontShadow,fontLineposition:ze.fontLineposition,fontTextcase:ze.fontTextcase},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:_})}).on("mouseout",function(){a.loneUnhover(p._hoverlayer.node())});var G=w.borderwidth,$=w.borderpad,J=G+$,X=he.append("rect").attr("class","bg").style("stroke-width",G+"px").call(r.stroke,w.bordercolor).call(r.fill,w.bgcolor),oe=w.width||w.height,ie=p._topclips.selectAll("#"+O).data(oe?[0]:[]);ie.enter().append("clipPath").classed("annclip",!0).attr("id",O).append("rect"),ie.exit().remove();var j=w.font,ee=p._meta?M.templateString(w.text,p._meta):w.text,re=he.append("text").classed("annotation-text",!0).text(ee);function ce(Ae){return Ae.call(o.font,j).attr({"text-anchor":{left:"start",right:"end"}[w.align]||"middle"}),i.convertToTspans(Ae,_,be),Ae}function be(){var Ae=re.selectAll("a");if(Ae.size()===1&&Ae.text()===re.text()){var ze=he.insert("a",":first-child").attr({"xlink:xlink:href":Ae.attr("xlink:href"),"xlink:xlink:show":Ae.attr("xlink:show")}).style({cursor:"pointer"});ze.node().appendChild(X.node())}var Re=he.select(".annotation-text-math-group"),Xe=!Re.empty(),it=o.bBox((Xe?Re:re).node()),ot=it.width,tt=it.height,lt=w.width||ot,Ee=w.height||tt,_e=Math.round(lt+2*J),fe=Math.round(Ee+2*J);function Fe(ei,za){return za==="auto"&&(ei<1/3?za="left":ei>2/3?za="right":za="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[za]}for(var rt=!1,st=["x","y"],Qe=0;Qe<st.length;Qe++){var Lt=st[Qe],kt=w[Lt+"ref"]||Lt,Vt=w["a"+Lt+"ref"],Zt={x:y,y:b}[Lt],Sr=(N+(Lt==="x"?0:-90))*Math.PI/180,xr=_e*Math.cos(Sr),jr=fe*Math.sin(Sr),wr=Math.abs(xr)+Math.abs(jr),Ir=w[Lt+"anchor"],bt=w[Lt+"shift"]*(Lt==="x"?1:-1),Be=I[Lt],Ke,Ue,Me,qe,Ce,Te=t.getRefType(kt);if(Zt&&Te!=="domain"){var Pe=Zt.r2fraction(w[Lt]);(Pe<0||Pe>1)&&(Vt===kt?(Pe=Zt.r2fraction(w["a"+Lt]),(Pe<0||Pe>1)&&(rt=!0)):rt=!0),Ke=Zt._offset+Zt.r2p(w[Lt]),qe=.5}else{var at=Te==="domain";Lt==="x"?(Me=w[Lt],Ke=at?Zt._offset+Zt._length*Me:Ke=u.l+u.w*Me):(Me=1-w[Lt],Ke=at?Zt._offset+Zt._length*Me:Ke=u.t+u.h*Me),qe=w.showarrow?.5:Me}if(w.showarrow){Be.head=Ke;var yt=w["a"+Lt];if(Ce=xr*Fe(.5,w.xanchor)-jr*Fe(.5,w.yanchor),Vt===kt){var Tt=t.getRefType(Vt);Tt==="domain"?(Lt==="y"&&(yt=1-yt),Be.tail=Zt._offset+Zt._length*yt):Tt==="paper"?Lt==="y"?(yt=1-yt,Be.tail=u.t+u.h*yt):Be.tail=u.l+u.w*yt:Be.tail=Zt._offset+Zt.r2p(yt),Ue=Ce}else Be.tail=Ke+yt,Ue=Ce+yt;Be.text=Be.tail+Ce;var Ot=p[Lt==="x"?"width":"height"];if(kt==="paper"&&(Be.head=M.constrain(Be.head,1,Ot-1)),Vt==="pixel"){var Gt=-Math.max(Be.tail-3,Be.text),rr=Math.min(Be.tail+3,Be.text)-Ot;Gt>0?(Be.tail+=Gt,Be.text+=Gt):rr>0&&(Be.tail-=rr,Be.text-=rr)}Be.tail+=bt,Be.head+=bt}else Ce=wr*Fe(qe,Ir),Ue=Ce,Be.text=Ke+Ce;Be.text+=bt,Ce+=bt,Ue+=bt,w["_"+Lt+"padplus"]=wr/2+Ue,w["_"+Lt+"padminus"]=wr/2-Ue,w["_"+Lt+"size"]=wr,w["_"+Lt+"shift"]=Ce}if(rt){he.remove();return}var Qt=0,Tr=0;if(w.align!=="left"&&(Qt=(lt-ot)*(w.align==="center"?.5:1)),w.valign!=="top"&&(Tr=(Ee-tt)*(w.valign==="middle"?.5:1)),Xe)Re.select("svg").attr({x:J+Qt-1,y:J+Tr}).call(o.setClipUrl,oe?O:null,_);else{var la=J+Tr-it.top,Ua=J+Qt-it.left;re.call(i.positionText,Ua,la).call(o.setClipUrl,oe?O:null,_)}ie.select("rect").call(o.setRect,J,J,lt,Ee),X.call(o.setRect,G/2,G/2,_e-G,fe-G),he.call(o.setTranslate,Math.round(I.x.text-_e/2),Math.round(I.y.text-fe/2)),W.attr({transform:"rotate("+N+","+I.x.text+","+I.y.text+")"});var Ba=function(ei,za){U.selectAll(".annotation-arrow-g").remove();var ti=I.x.head,Ci=I.y.head,Jt=I.x.tail+ei,Nt=I.y.tail+za,Kt=I.x.text+ei,Wt=I.y.text+za,Pr=M.rotationXYMatrix(N,Kt,Wt),ta=M.apply2DTransform(Pr),ma=M.apply2DTransform2(Pr),ra=+X.attr("width"),Ia=+X.attr("height"),Ha=Kt-.5*ra,$a=Ha+ra,ai=Wt-.5*Ia,mi=ai+Ia,xt=[[Ha,ai,Ha,mi],[Ha,mi,$a,mi],[$a,mi,$a,ai],[$a,ai,Ha,ai]].map(ma);if(!xt.reduce(function(It,dr){return It^!!M.segmentsIntersect(ti,Ci,ti+1e6,Ci+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){xt.forEach(function(It){var dr=M.segmentsIntersect(Jt,Nt,ti,Ci,It[0],It[1],It[2],It[3]);dr&&(Jt=dr.x,Nt=dr.y)});var ct=w.arrowwidth,Nr=w.arrowcolor,Or=w.arrowside,Rr=U.append("g").style({opacity:r.opacity(Nr)}).classed("annotation-arrow-g",!0),Lr=Rr.append("path").attr("d","M"+Jt+","+Nt+"L"+ti+","+Ci).style("stroke-width",ct+"px").call(r.stroke,r.rgb(Nr));if(f(Lr,Or,w),m.annotationPosition&&Lr.node().parentNode&&!E){var Gr=ti,Kr=Ci;if(w.standoff){var Ur=Math.sqrt(Math.pow(ti-Jt,2)+Math.pow(Ci-Nt,2));Gr+=w.standoff*(Jt-ti)/Ur,Kr+=w.standoff*(Nt-Ci)/Ur}var aa=Rr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Jt-Gr)+","+(Nt-Kr),transform:e(Gr,Kr)}).style("stroke-width",ct+6+"px").call(r.stroke,"rgba(0,0,0,0)").call(r.fill,"rgba(0,0,0,0)"),da,fa;s.init({element:aa.node(),gd:_,prepFn:function(){var It=o.getTranslate(he);da=It.x,fa=It.y,y&&y.autorange&&z(y._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0)},moveFn:function(It,dr){var kr=ta(da,fa),ia=kr[0]+It,Ca=kr[1]+dr;he.call(o.setTranslate,ia,Ca),F("x",T(y,It,"x",u,w)),F("y",T(b,dr,"y",u,w)),w.axref===w.xref&&F("ax",T(y,It,"ax",u,w)),w.ayref===w.yref&&F("ay",T(b,dr,"ay",u,w)),Rr.attr("transform",e(It,dr)),W.attr({transform:"rotate("+N+","+ia+","+Ca+")"})},doneFn:function(){x.call("_guiRelayout",_,B());var It=document.querySelector(".js-notes-box-panel");It&&It.redraw(It.selectedObj)}})}}};if(w.showarrow&&Ba(0,0),Q){var Ra;s.init({element:he.node(),gd:_,prepFn:function(){Ra=W.attr("transform")},moveFn:function(ei,za){var ti="pointer";if(w.showarrow)w.axref===w.xref?F("ax",T(y,ei,"ax",u,w)):F("ax",w.ax+ei),w.ayref===w.yref?F("ay",T(b,za,"ay",u.w,w)):F("ay",w.ay+za),Ba(ei,za);else{if(E)return;var Ci,Jt;if(y)Ci=T(y,ei,"x",u,w);else{var Nt=w._xsize/u.w,Kt=w.x+(w._xshift-w.xshift)/u.w-Nt/2;Ci=s.align(Kt+ei/u.w,Nt,0,1,w.xanchor)}if(b)Jt=T(b,za,"y",u,w);else{var Wt=w._ysize/u.h,Pr=w.y-(w._yshift+w.yshift)/u.h-Wt/2;Jt=s.align(Pr-za/u.h,Wt,0,1,w.yanchor)}F("x",Ci),F("y",Jt),(!y||!b)&&(ti=s.getCursor(y?.5:Ci,b?.5:Jt,w.xanchor,w.yanchor))}W.attr({transform:e(ei,za)+Ra}),n(he,ti)},clickFn:function(ei,za){w.captureevents&&_.emit("plotly_clickannotation",le(za))},doneFn:function(){n(he),x.call("_guiRelayout",_,B());var ei=document.querySelector(".js-notes-box-panel");ei&&ei.redraw(ei.selectedObj)}})}}m.annotationText?re.call(i.makeEditable,{delegate:he,gd:_}).call(ce).on("edit",function(Ae){w.text=Ae,this.call(ce),F("text",Ae),y&&y.autorange&&z(y._name+".autorange",!0),b&&b.autorange&&z(b._name+".autorange",!0),x.call("_guiRelayout",_,B())}):re.call(ce)}}}),Qz=Ze({"src/components/annotations/click.js"(Z,q){"use strict";var d=ca(),x=oo(),A=Dl().arrayEditor;q.exports={hasClickToShow:M,onClick:e};function M(o,a){var i=t(o,a);return i.on.length>0||i.explicitOff.length>0}function e(o,a){var i=t(o,a),n=i.on,s=i.off.concat(i.explicitOff),c={},f=o._fullLayout.annotations,g,v;if(n.length||s.length){for(g=0;g<n.length;g++)v=A(o.layout,"annotations",f[n[g]]),v.modifyItem("visible",!0),d.extendFlat(c,v.getUpdateObj());for(g=0;g<s.length;g++)v=A(o.layout,"annotations",f[s[g]]),v.modifyItem("visible",!1),d.extendFlat(c,v.getUpdateObj());return x.call("update",o,{},c)}}function t(o,a){var i=o._fullLayout.annotations,n=[],s=[],c=[],f=(a||[]).length,g,v,T,l,_,w,S,E;for(g=0;g<i.length;g++)if(T=i[g],l=T.clicktoshow,l){for(v=0;v<f;v++)if(_=a[v],w=_.xaxis,S=_.yaxis,w._id===T.xref&&S._id===T.yref&&w.d2r(_.x)===r(T._xclick,w)&&S.d2r(_.y)===r(T._yclick,S)){T.visible?l==="onout"?E=s:E=c:E=n,E.push(g);break}v===f&&T.visible&&l==="onout"&&s.push(g)}return{on:n,off:s,explicitOff:c}}function r(o,a){return a.type==="log"?a.l2r(o):a.d2r(o)}}}),B5=Ze({"src/components/annotations/common_defaults.js"(Z,q){"use strict";var d=ca(),x=Yn();q.exports=function(M,e,t,r){r("opacity");var o=r("bgcolor"),a=r("bordercolor"),i=x.opacity(a);r("borderpad");var n=r("borderwidth"),s=r("showarrow");r("text",s?" ":t._dfltTitle.annotation),r("textangle"),d.coerceFont(r,"font",t.font),r("width"),r("align");var c=r("height");if(c&&r("valign"),s){var f=r("arrowside"),g,v;f.indexOf("end")!==-1&&(g=r("arrowhead"),v=r("arrowsize")),f.indexOf("start")!==-1&&(r("startarrowhead",g),r("startarrowsize",v)),r("arrowcolor",i?e.bordercolor:x.defaultLine),r("arrowwidth",(i&&n||1)*2),r("standoff"),r("startstandoff")}var T=r("hovertext"),l=t.hoverlabel||{};if(T){var _=r("hoverlabel.bgcolor",l.bgcolor||(x.opacity(o)?x.rgb(o):x.defaultLine)),w=r("hoverlabel.bordercolor",l.bordercolor||x.contrast(_)),S=d.extendFlat({},l.font);S.color||(S.color=w),d.coerceFont(r,"hoverlabel.font",S)}r("captureevents",!!T)}}}),e9=Ze({"src/components/annotations/defaults.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=fp(),M=B5(),e=K0();q.exports=function(o,a){A(o,a,{name:"annotations",handleItemDefaults:t})};function t(r,o,a){function i(u,m){return d.coerce(r,o,e,u,m)}var n=i("visible"),s=i("clicktoshow");if(n||s){M(r,o,a,i);for(var c=o.showarrow,f=["x","y"],g=[-10,-30],v={_fullLayout:a},T=0;T<2;T++){var l=f[T],_=x.coerceRef(r,o,v,l,"","paper");if(_!=="paper"){var w=x.getFromId(v,_);w._annIndices.push(o._index)}if(x.coercePosition(o,v,i,_,l,.5),c){var S="a"+l,E=x.coerceRef(r,o,v,S,"pixel",["pixel","paper"]);E!=="pixel"&&E!==_&&(E=o[S]="pixel");var y=E==="pixel"?g[T]:.4;x.coercePosition(o,v,i,E,S,y)}i(l+"anchor"),i(l+"shift")}if(d.noneOrAll(r,o,["x","y"]),c&&d.noneOrAll(r,o,["ax","ay"]),s){var b=i("xclick"),p=i("yclick");o._xclick=b===void 0?o.x:x.cleanPosition(b,v,o.xref),o._yclick=p===void 0?o.y:x.cleanPosition(p,v,o.yref)}}}}}),t9=Ze({"src/components/annotations/calc_autorange.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=D2().draw;q.exports=function(r){var o=r._fullLayout,a=d.filterVisible(o.annotations);if(a.length&&r._fullData.length)return d.syncOrAsync([A,M],r)};function M(t){var r=t._fullLayout;d.filterVisible(r.annotations).forEach(function(o){var a=x.getFromId(t,o.xref),i=x.getFromId(t,o.yref),n=x.getRefType(o.xref),s=x.getRefType(o.yref);o._extremes={},n==="range"&&e(o,a),s==="range"&&e(o,i)})}function e(t,r){var o=r._id,a=o.charAt(0),i=t[a],n=t["a"+a],s=t[a+"ref"],c=t["a"+a+"ref"],f=t["_"+a+"padplus"],g=t["_"+a+"padminus"],v={x:1,y:-1}[a]*t[a+"shift"],T=3*t.arrowsize*t.arrowwidth||0,l=T+v,_=T-v,w=3*t.startarrowsize*t.arrowwidth||0,S=w+v,E=w-v,y;if(c===s){var b=x.findExtremes(r,[r.r2c(i)],{ppadplus:l,ppadminus:_}),p=x.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(f,S),ppadminus:Math.max(g,E)});y={min:[b.min[0],p.min[0]],max:[b.max[0],p.max[0]]}}else S=n?S+n:S,E=n?E-n:E,y=x.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(f,l,S),ppadminus:Math.max(g,_,E)});t._extremes[o]=y}}}),r9=Ze({"src/components/annotations/convert_coords.js"(Z,q){"use strict";var d=ns(),x=f2();q.exports=function(M,e,t,r){e=e||{};var o=t==="log"&&e.type==="linear",a=t==="linear"&&e.type==="log";if(!(o||a))return;var i=M._fullLayout.annotations,n=e._id.charAt(0),s,c;function f(v){var T=s[v],l=null;o?l=x(T,e.range):l=Math.pow(10,T),d(l)||(l=null),r(c+v,l)}for(var g=0;g<i.length;g++)s=i[g],c="annotations["+g+"].",s[n+"ref"]===e._id&&f(n),s["a"+n+"ref"]===e._id&&f("a"+n)}}}),a9=Ze({"src/components/annotations/index.js"(Z,q){"use strict";var d=D2(),x=Qz();q.exports={moduleType:"component",name:"annotations",layoutAttributes:K0(),supplyLayoutDefaults:e9(),includeBasePlot:R_()("annotations"),calcAutorange:t9(),draw:d.draw,drawOne:d.drawOne,drawRaw:d.drawRaw,hasClickToShow:x.hasClickToShow,onClick:x.onClick,convertCoords:r9()}}}),z2=Ze({"src/components/annotations3d/attributes.js"(Z,q){"use strict";var d=K0(),x=pc().overrideAll,A=Dl().templatedArray;q.exports=x(A("annotation",{visible:d.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:d.xanchor,xshift:d.xshift,yanchor:d.yanchor,yshift:d.yshift,text:d.text,textangle:d.textangle,font:d.font,width:d.width,height:d.height,opacity:d.opacity,align:d.align,valign:d.valign,bgcolor:d.bgcolor,bordercolor:d.bordercolor,borderpad:d.borderpad,borderwidth:d.borderwidth,showarrow:d.showarrow,arrowcolor:d.arrowcolor,arrowhead:d.arrowhead,startarrowhead:d.startarrowhead,arrowside:d.arrowside,arrowsize:d.arrowsize,startarrowsize:d.startarrowsize,arrowwidth:d.arrowwidth,standoff:d.standoff,startstandoff:d.startstandoff,hovertext:d.hovertext,hoverlabel:d.hoverlabel,captureevents:d.captureevents}),"calc","from-root")}}),i9=Ze({"src/components/annotations3d/defaults.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=fp(),M=B5(),e=z2();q.exports=function(o,a,i){A(o,a,{name:"annotations",handleItemDefaults:t,fullLayout:i.fullLayout})};function t(r,o,a,i){function n(f,g){return d.coerce(r,o,e,f,g)}function s(f){var g=f+"axis",v={_fullLayout:{}};return v._fullLayout[g]=a[g],x.coercePosition(o,v,n,f,f,.5)}var c=n("visible");c&&(M(r,o,i.fullLayout,n),s("x"),s("y"),s("z"),d.noneOrAll(r,o,["x","y","z"]),o.xref="x",o.yref="y",o.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),o.showarrow&&(o.axref="pixel",o.ayref="pixel",n("ax",-10),n("ay",-30),d.noneOrAll(r,o,["ax","ay"])))}}}),n9=Ze({"src/components/annotations3d/convert.js"(Z,q){"use strict";var d=ca(),x=Wo();q.exports=function(e){for(var t=e.fullSceneLayout,r=t.annotations,o=0;o<r.length;o++)A(r[o],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function A(M,e){var t=e.fullSceneLayout,r=t.domain,o=e.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};M._xa={},d.extendFlat(M._xa,a),x.setConvert(M._xa),M._xa._offset=o.l+r.x[0]*o.w,M._xa.l2p=function(){return .5*(1+M._pdata[0]/M._pdata[3])*o.w*(r.x[1]-r.x[0])},M._ya={},d.extendFlat(M._ya,a),x.setConvert(M._ya),M._ya._offset=o.t+(1-r.y[1])*o.h,M._ya.l2p=function(){return .5*(1-M._pdata[1]/M._pdata[3])*o.h*(r.y[1]-r.y[0])}}}}),N5=Ze({"src/plots/gl3d/project.js"(Z,q){"use strict";function d(A,M){var e=[0,0,0,0],t,r;for(t=0;t<4;++t)for(r=0;r<4;++r)e[r]+=A[4*t+r]*M[t];return e}function x(A,M){var e=d(A.projection,d(A.view,d(A.model,[M[0],M[1],M[2],1])));return e}q.exports=x}}),o9=Ze({"src/components/annotations3d/draw.js"(Z,q){"use strict";var d=D2().drawRaw,x=N5(),A=["x","y","z"];q.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,o=t.annotations,a=0;a<o.length;a++){for(var i=o[a],n=!1,s=0;s<3;s++){var c=A[s],f=i[c],g=t[c+"axis"],v=g.r2fraction(f);if(v<0||v>1){n=!0;break}}n?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+a+'"]').remove():(i._pdata=x(e.glplot.cameraParams,[t.xaxis.r2l(i.x)*r[0],t.yaxis.r2l(i.y)*r[1],t.zaxis.r2l(i.z)*r[2]]),d(e.graphDiv,i,a,e.id,i._xa,i._ya))}}}}),s9=Ze({"src/components/annotations3d/index.js"(Z,q){"use strict";var d=oo(),x=ca();q.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:z2()}}},layoutAttributes:z2(),handleDefaults:i9(),includeBasePlot:A,convert:n9(),draw:o9()};function A(M,e){var t=d.subplotsRegistry.gl3d;if(t)for(var r=t.attrRegex,o=Object.keys(M),a=0;a<o.length;a++){var i=o[a];r.test(i)&&(M[i].annotations||[]).length&&(x.pushUnique(e._basePlotModules,t),x.pushUnique(e._subplots.gl3d,i))}}}}),U5=Ze({"src/components/shapes/attributes.js"(Z,q){"use strict";var d=K0(),x=tc(),A=tf().line,M=Gh().dash,e=rs().extendFlat,t=Dl().templatedArray,r=I_(),o=eu(),a=Cs().shapeTexttemplateAttrs,i=d2();q.exports=t("shape",{visible:e({},o.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:e({},o.legend,{editType:"calc+arraydraw"}),legendgroup:e({},o.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:e({},o.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:x({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:e({},o.legendrank,{editType:"calc+arraydraw"}),legendwidth:e({},o.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:e({},d.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:e({},d.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:e({},A.color,{editType:"arraydraw"}),width:e({},A.width,{editType:"calc+arraydraw"}),dash:e({},M,{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:a({},{keys:Object.keys(i)}),font:x({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"})}}),l9=Ze({"src/components/shapes/defaults.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=fp(),M=U5(),e=r0();q.exports=function(a,i){A(a,i,{name:"shapes",handleItemDefaults:r})};function t(o,a){return o?"bottom":a.indexOf("top")!==-1?"top":a.indexOf("bottom")!==-1?"bottom":"middle"}function r(o,a,i){function n(G,$){return d.coerce(o,a,M,G,$)}a._isShape=!0;var s=n("visible");if(s){var c=n("showlegend");c&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),d.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var f=n("path"),g=f?"path":"rect",v=n("type",g),T=v!=="path";T&&delete a.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var l=n("line.width");l&&(n("line.color"),n("line.dash"));for(var _=n("xsizemode"),w=n("ysizemode"),S=["x","y"],E=0;E<2;E++){var y=S[E],b=y+"anchor",p=y==="x"?_:w,u={_fullLayout:i},m,h,P,L=x.coerceRef(o,a,u,y,void 0,"paper"),z=x.getRefType(L);if(z==="range"?(m=x.getFromId(u,L),m._shapeIndices.push(a._index),P=e.rangeToShapePosition(m),h=e.shapePositionToRange(m),(m.type==="category"||m.type==="multicategory")&&(n(y+"0shift"),n(y+"1shift"))):h=P=d.identity,T){var F=.25,B=.75,O=y+"0",I=y+"1",N=o[O],U=o[I];o[O]=h(o[O],!0),o[I]=h(o[I],!0),p==="pixel"?(n(O,0),n(I,10)):(x.coercePosition(a,u,n,L,O,F),x.coercePosition(a,u,n,L,I,B)),a[O]=P(a[O]),a[I]=P(a[I]),o[O]=N,o[I]=U}if(p==="pixel"){var W=o[b];o[b]=h(o[b],!0),x.coercePosition(a,u,n,L,b,.25),a[b]=P(a[b]),o[b]=W}}T&&d.noneOrAll(o,a,["x0","x1","y0","y1"]);var Q=v==="line",ue,le;if(T&&(ue=n("label.texttemplate")),ue||(le=n("label.text")),le||ue){n("label.textangle");var he=n("label.textposition",Q?"middle":"middle center");n("label.xanchor"),n("label.yanchor",t(Q,he)),n("label.padding"),d.coerceFont(n,"label.font",i.font)}}}}}),u9=Ze({"src/components/shapes/draw_newshape/defaults.js"(Z,q){"use strict";var d=Yn(),x=ca();function A(M,e){return M?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}q.exports=function(e,t,r){r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),x.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity");var o=r("newshape.line.width");if(o){var a=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",d.contrast(a)),r("newshape.line.dash")}var i=e.dragmode==="drawline",n=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(n||s){r("newshape.label.textangle");var c=r("newshape.label.textposition",i?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",A(i,c)),r("newshape.label.padding"),x.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}}}),c9=Ze({"src/components/shapes/calc_autorange.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=k_(),M=r0();q.exports=function(i){var n=i._fullLayout,s=d.filterVisible(n.shapes);if(!(!s.length||!i._fullData.length))for(var c=0;c<s.length;c++){var f=s[c];f._extremes={};var g,v,T=x.getRefType(f.xref),l=x.getRefType(f.yref);f.xref!=="paper"&&T!=="domain"&&(g=x.getFromId(i,f.xref),v=o(g,f,A.paramIsX),v&&(f._extremes[g._id]=x.findExtremes(g,v,e(f)))),f.yref!=="paper"&&l!=="domain"&&(g=x.getFromId(i,f.yref),v=o(g,f,A.paramIsY),v&&(f._extremes[g._id]=x.findExtremes(g,v,t(f))))}};function e(a){return r(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return r(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function r(a,i,n,s,c,f){var g=a/2,v=f;if(i==="pixel"){var T=c?M.extractPathCoords(c,f?A.paramIsY:A.paramIsX):[n,s],l=d.aggNums(Math.max,null,T),_=d.aggNums(Math.min,null,T),w=_<0?Math.abs(_)+g:g,S=l>0?l+g:g;return{ppad:g,ppadplus:v?w:S,ppadminus:v?S:w}}else return{ppad:g}}function o(a,i,n){var s=a._id.charAt(0)==="x"?"x":"y",c=a.type==="category"||a.type==="multicategory",f,g,v=0,T=0,l=c?a.r2c:a.d2c,_=i[s+"sizemode"]==="scaled";if(_?(f=i[s+"0"],g=i[s+"1"],c&&(v=i[s+"0shift"],T=i[s+"1shift"])):(f=i[s+"anchor"],g=i[s+"anchor"]),f!==void 0)return[l(f)+v,l(g)+T];if(i.path){var w=1/0,S=-1/0,E=i.path.match(A.segmentRE),y,b,p,u,m;for(a.type==="date"&&(l=M.decodeDate(l)),y=0;y<E.length;y++)b=E[y],p=n[b.charAt(0)].drawn,p!==void 0&&(u=E[y].substr(1).match(A.paramRE),!(!u||u.length<p)&&(m=l(u[p]),m<w&&(w=m),m>S&&(S=m)));if(S>=w)return[w,S]}}}}),f9=Ze({"src/components/shapes/index.js"(Z,q){"use strict";var d=E2();q.exports={moduleType:"component",name:"shapes",layoutAttributes:U5(),supplyLayoutDefaults:l9(),supplyDrawNewShapeDefaults:u9(),includeBasePlot:R_()("shapes"),calcAutorange:c9(),draw:d.draw,drawOne:d.drawOne}}}),j5=Ze({"src/components/images/attributes.js"(Z,q){"use strict";var d=kh(),x=Dl().templatedArray,A=I_();q.exports=x("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",d.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",d.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),h9=Ze({"src/components/images/defaults.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=fp(),M=j5(),e="images";q.exports=function(o,a){var i={name:e,handleItemDefaults:t};A(o,a,i)};function t(r,o,a){function i(_,w){return d.coerce(r,o,M,_,w)}var n=i("source"),s=i("visible",!!n);if(!s)return o;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var c={_fullLayout:a},f=["x","y"],g=0;g<2;g++){var v=f[g],T=x.coerceRef(r,o,c,v,"paper",void 0);if(T!=="paper"){var l=x.getFromId(c,T);l._imgIndices.push(o._index)}x.coercePosition(o,c,i,T,v,0)}return o}}}),p9=Ze({"src/components/images/draw.js"(Z,q){"use strict";var d=On(),x=as(),A=Wo(),M=$c(),e=vd();q.exports=function(r){var o=r._fullLayout,a=[],i={},n=[],s,c;for(c=0;c<o.images.length;c++){var f=o.images[c];if(f.visible)if(f.layer==="below"&&f.xref!=="paper"&&f.yref!=="paper"){s=M.ref2id(f.xref)+M.ref2id(f.yref);var g=o._plots[s];if(!g){n.push(f);continue}g.mainplot&&(s=g.mainplot.id),i[s]||(i[s]=[]),i[s].push(f)}else f.layer==="above"?a.push(f):n.push(f)}var v={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 T(u){var m=d.select(this);if(this._imgSrc!==u.source)if(m.attr("xmlns",e.svg),!r._context.staticPlot||u.source&&u.source.slice(0,5)==="data:")m.attr("xlink:href",u.source),this._imgSrc=u.source;else{var h=new Promise(function(P){var L=new Image;this.img=L,L.setAttribute("crossOrigin","anonymous"),L.onerror=z,L.onload=function(){var F=document.createElement("canvas");F.width=this.width,F.height=this.height;var B=F.getContext("2d",{willReadFrequently:!0});B.drawImage(this,0,0);var O=F.toDataURL("image/png");m.attr("xlink:href",O),P()},m.on("error",z),L.src=u.source,this._imgSrc=u.source;function z(){m.remove(),P()}}.bind(this));r._promises.push(h)}}function l(u){var m=d.select(this),h=A.getFromId(r,u.xref),P=A.getFromId(r,u.yref),L=A.getRefType(u.xref)==="domain",z=A.getRefType(u.yref)==="domain",F=o._size,B,O;h!==void 0?B=typeof u.xref=="string"&&L?h._length*u.sizex:Math.abs(h.l2p(u.sizex)-h.l2p(0)):B=u.sizex*F.w,P!==void 0?O=typeof u.yref=="string"&&z?P._length*u.sizey:Math.abs(P.l2p(u.sizey)-P.l2p(0)):O=u.sizey*F.h;var I=B*v.x[u.xanchor].offset,N=O*v.y[u.yanchor].offset,U=v.x[u.xanchor].sizing+v.y[u.yanchor].sizing,W,Q;switch(h!==void 0?W=typeof u.xref=="string"&&L?h._length*u.x+h._offset:h.r2p(u.x)+h._offset:W=u.x*F.w+F.l,W+=I,P!==void 0?Q=typeof u.yref=="string"&&z?P._length*(1-u.y)+P._offset:P.r2p(u.y)+P._offset:Q=F.h-u.y*F.h+F.t,Q+=N,u.sizing){case"fill":U+=" slice";break;case"stretch":U="none";break}m.attr({x:W,y:Q,width:B,height:O,preserveAspectRatio:U,opacity:u.opacity});var ue=h&&A.getRefType(u.xref)!=="domain"?h._id:"",le=P&&A.getRefType(u.yref)!=="domain"?P._id:"",he=ue+le;x.setClipUrl(m,he?"clip"+o._uid+he:null,r)}function _(u){return[u.xref,u.x,u.sizex,u.yref,u.y,u.sizey].join("_")}function w(u,m){return u._index-m._index}var S=o._imageLowerLayer.selectAll("image").data(n,_),E=o._imageUpperLayer.selectAll("image").data(a,_);S.enter().append("image"),E.enter().append("image"),S.exit().remove(),E.exit().remove(),S.each(function(u){T.bind(this)(u),l.bind(this)(u)}),E.each(function(u){T.bind(this)(u),l.bind(this)(u)}),S.sort(w),E.sort(w);var y=Object.keys(o._plots);for(c=0;c<y.length;c++){s=y[c];var b=o._plots[s];if(b.imagelayer){var p=b.imagelayer.selectAll("image").data(i[s]||[],_);p.enter().append("image"),p.exit().remove(),p.each(function(u){T.bind(this)(u),l.bind(this)(u)}),p.sort(w)}}}}}),d9=Ze({"src/components/images/convert_coords.js"(Z,q){"use strict";var d=ns(),x=f2();q.exports=function(M,e,t,r){e=e||{};var o=t==="log"&&e.type==="linear",a=t==="linear"&&e.type==="log";if(o||a){for(var i=M._fullLayout.images,n=e._id.charAt(0),s,c,f=0;f<i.length;f++)if(s=i[f],c="images["+f+"].",s[n+"ref"]===e._id){var g=s[n],v=s["size"+n],T=null,l=null;if(o){T=x(g,e.range);var _=v/Math.pow(10,T)/2;l=2*Math.log(_+Math.sqrt(1+_*_))/Math.LN10}else T=Math.pow(10,g),l=T*(Math.pow(10,v/2)-Math.pow(10,-v/2));d(T)?d(l)||(l=null):(T=null,l=null),r(c+n,T),r(c+"size"+n,l)}}}}}),v9=Ze({"src/components/images/index.js"(Z,q){"use strict";q.exports={moduleType:"component",name:"images",layoutAttributes:j5(),supplyLayoutDefaults:h9(),includeBasePlot:R_()("images"),draw:p9(),convertCoords:d9()}}}),F2=Ze({"src/components/updatemenus/constants.js"(Z,q){"use strict";q.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"}}}}),q5=Ze({"src/components/updatemenus/attributes.js"(Z,q){"use strict";var d=tc(),x=oh(),A=rs().extendFlat,M=pc().overrideAll,e=v2(),t=Dl().templatedArray,r=t("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}});q.exports=M(t("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:r,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:A(e({editType:"arraydraw"}),{}),font:d({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:x.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}}),m9=Ze({"src/components/updatemenus/defaults.js"(Z,q){"use strict";var d=ca(),x=fp(),A=q5(),M=F2(),e=M.name,t=A.buttons;q.exports=function(i,n){var s={name:e,handleItemDefaults:r};x(i,n,s)};function r(a,i,n){function s(g,v){return d.coerce(a,i,A,g,v)}var c=x(a,i,{name:"buttons",handleItemDefaults:o}),f=s("visible",c.length>0);f&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),d.noneOrAll(a,i,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),d.coerceFont(s,"font",n.font),s("bgcolor",n.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function o(a,i){function n(c,f){return d.coerce(a,i,t,c,f)}var s=n("visible",a.method==="skip"||Array.isArray(a.args));s&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}}}),g9=Ze({"src/components/updatemenus/scrollbox.js"(Z,q){"use strict";q.exports=e;var d=On(),x=Yn(),A=as(),M=ca();function e(t,r,o){this.gd=t,this.container=r,this.id=o,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})}e.barWidth=2,e.barLength=20,e.barRadius=2,e.barPad=1,e.barColor="#808BA4",e.prototype.enable=function(r,o,a){var i=this.gd._fullLayout,n=i.width,s=i.height;this.position=r;var c=this.position.l,f=this.position.w,g=this.position.t,v=this.position.h,T=this.position.direction,l=T==="down",_=T==="left",w=T==="right",S=T==="up",E=f,y=v,b,p,u,m;!l&&!_&&!w&&!S&&(this.position.direction="down",l=!0);var h=l||S;h?(b=c,p=b+E,l?(u=g,m=Math.min(u+y,s),y=m-u):(m=g+y,u=Math.max(m-y,0),y=m-u)):(u=g,m=u+y,_?(p=c+E,b=Math.max(p-E,0),E=p-b):(b=c,p=Math.min(b+E,n),E=p-b)),this._box={l:b,t:u,w:E,h:y};var P=f>E,L=e.barLength+2*e.barPad,z=e.barWidth+2*e.barPad,F=c,B=g+v;B+z>s&&(B=s-z);var O=this.container.selectAll("rect.scrollbar-horizontal").data(P?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,e.barColor),P?(this.hbar=O.attr({rx:e.barRadius,ry:e.barRadius,x:F,y:B,width:L,height:z}),this._hbarXMin=F+L/2,this._hbarTranslateMax=E-L):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var I=v>y,N=e.barWidth+2*e.barPad,U=e.barLength+2*e.barPad,W=c+f,Q=g;W+N>n&&(W=n-N);var ue=this.container.selectAll("rect.scrollbar-vertical").data(I?[0]:[]);ue.exit().on(".drag",null).remove(),ue.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,e.barColor),I?(this.vbar=ue.attr({rx:e.barRadius,ry:e.barRadius,x:W,y:Q,width:N,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=y-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var le=this.id,he=b-.5,G=I?p+N+.5:p+.5,$=u-.5,J=P?m+z+.5:m+.5,X=i._topdefs.selectAll("#"+le).data(P||I?[0]:[]);if(X.exit().remove(),X.enter().append("clipPath").attr("id",le).append("rect"),P||I?(this._clipRect=X.select("rect").attr({x:Math.floor(he),y:Math.floor($),width:Math.ceil(G)-Math.floor(he),height:Math.ceil(J)-Math.floor($)}),this.container.call(A.setClipUrl,le,this.gd),this.bg.attr({x:c,y:g,width:f,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(A.setClipUrl,null),delete this._clipRect),P||I){var oe=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(oe);var ie=d.behavior.drag().on("dragstart",function(){d.event.sourceEvent.preventDefault(),d.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));P&&this.hbar.on(".drag",null).call(ie),I&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(o,a)},e.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(A.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)},e.prototype._onBoxDrag=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r-=d.event.dx),this.vbar&&(o-=d.event.dy),this.setTranslate(r,o)},e.prototype._onBoxWheel=function(){var r=this.translateX,o=this.translateY;this.hbar&&(r+=d.event.deltaY),this.vbar&&(o+=d.event.deltaY),this.setTranslate(r,o)},e.prototype._onBarDrag=function(){var r=this.translateX,o=this.translateY;if(this.hbar){var a=r+this._hbarXMin,i=a+this._hbarTranslateMax,n=M.constrain(d.event.x,a,i),s=(n-a)/(i-a),c=this.position.w-this._box.w;r=s*c}if(this.vbar){var f=o+this._vbarYMin,g=f+this._vbarTranslateMax,v=M.constrain(d.event.y,f,g),T=(v-f)/(g-f),l=this.position.h-this._box.h;o=T*l}this.setTranslate(r,o)},e.prototype.setTranslate=function(r,o){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(r=M.constrain(r||0,0,a),o=M.constrain(o||0,0,i),this.translateX=r,this.translateY=o,this.container.call(A.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-o),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+o-.5)}),this.hbar){var n=r/a;this.hbar.call(A.setTranslate,r+n*this._hbarTranslateMax,o)}if(this.vbar){var s=o/i;this.vbar.call(A.setTranslate,r,o+s*this._vbarTranslateMax)}}}}),y9=Ze({"src/components/updatemenus/draw.js"(Z,q){"use strict";var d=On(),x=xc(),A=Yn(),M=as(),e=ca(),t=fu(),r=Dl().arrayEditor,o=mh().LINE_SPACING,a=F2(),i=g9();q.exports=function(L){var z=L._fullLayout,F=e.filterVisible(z[a.name]);function B(le){x.autoMargin(L,u(le))}var O=z._menulayer.selectAll("g."+a.containerClassName).data(F.length>0?[0]:[]);if(O.enter().append("g").classed(a.containerClassName,!0).style("cursor","pointer"),O.exit().each(function(){d.select(this).selectAll("g."+a.headerGroupClassName).each(B)}).remove(),F.length!==0){var I=O.selectAll("g."+a.headerGroupClassName).data(F,n);I.enter().append("g").classed(a.headerGroupClassName,!0);for(var N=e.ensureSingle(O,"g",a.dropdownButtonGroupClassName,function(le){le.style("pointer-events","all")}),U=0;U<F.length;U++){var W=F[U];p(L,W)}var Q="updatemenus"+z._uid,ue=new i(L,N,Q);I.enter().size()&&(N.node().parentNode.appendChild(N.node()),N.call(h)),I.exit().each(function(le){N.call(h),B(le)}).remove(),I.each(function(le){var he=d.select(this),G=le.type==="dropdown"?N:null;x.manageCommandObserver(L,le,le.buttons,function($){f(L,le,le.buttons[$.index],he,G,ue,$.index,!0)}),le.type==="dropdown"?(g(L,he,N,ue,le),c(N,le)&&v(L,he,N,ue,le)):v(L,he,null,null,le)})}};function n(P){return P._index}function s(P){return+P.attr(a.menuIndexAttrName)==-1}function c(P,L){return+P.attr(a.menuIndexAttrName)===L._index}function f(P,L,z,F,B,O,I,N){L.active=I,r(P.layout,a.name,L).applyUpdate("active",I),L.type==="buttons"?v(P,F,null,null,L):L.type==="dropdown"&&(B.attr(a.menuIndexAttrName,"-1"),g(P,F,B,O,L),N||v(P,F,B,O,L))}function g(P,L,z,F,B){var O=e.ensureSingle(L,"g",a.headerClassName,function(le){le.style("pointer-events","all")}),I=B._dims,N=B.active,U=B.buttons[N]||a.blankHeaderOpts,W={y:B.pad.t,yPad:0,x:B.pad.l,xPad:0,index:0},Q={width:I.headerWidth,height:I.headerHeight};O.call(_,B,U,P).call(m,B,W,Q);var ue=e.ensureSingle(L,"text",a.headerArrowClassName,function(le){le.attr("text-anchor","end").call(M.font,B.font).text(a.arrowSymbol[B.direction])});ue.attr({x:I.headerWidth-a.arrowOffsetX+B.pad.l,y:I.headerHeight/2+a.textOffsetY+B.pad.t}),O.on("click",function(){z.call(h,String(c(z,B)?-1:B._index)),v(P,L,z,F,B)}),O.on("mouseover",function(){O.call(y)}),O.on("mouseout",function(){O.call(b,B)}),M.setTranslate(L,I.lx,I.ly)}function v(P,L,z,F,B){z||(z=L,z.attr("pointer-events","all"));var O=!s(z)||B.type==="buttons"?B.buttons:[],I=B.type==="dropdown"?a.dropdownButtonClassName:a.buttonClassName,N=z.selectAll("g."+I).data(e.filterVisible(O)),U=N.enter().append("g").classed(I,!0),W=N.exit();B.type==="dropdown"?(U.attr("opacity","0").transition().attr("opacity","1"),W.transition().attr("opacity","0").remove()):W.remove();var Q=0,ue=0,le=B._dims,he=["up","down"].indexOf(B.direction)!==-1;B.type==="dropdown"&&(he?ue=le.headerHeight+a.gapButtonHeader:Q=le.headerWidth+a.gapButtonHeader),B.type==="dropdown"&&B.direction==="up"&&(ue=-a.gapButtonHeader+a.gapButton-le.openHeight),B.type==="dropdown"&&B.direction==="left"&&(Q=-a.gapButtonHeader+a.gapButton-le.openWidth);var G={x:le.lx+Q+B.pad.l,y:le.ly+ue+B.pad.t,yPad:a.gapButton,xPad:a.gapButton,index:0},$={l:G.x+B.borderwidth,t:G.y+B.borderwidth};N.each(function(J,X){var oe=d.select(this);oe.call(_,B,J,P).call(m,B,G),oe.on("click",function(){d.event.defaultPrevented||(J.execute&&(J.args2&&B.active===X?(f(P,B,J,L,z,F,-1),x.executeAPICommand(P,J.method,J.args2)):(f(P,B,J,L,z,F,X),x.executeAPICommand(P,J.method,J.args))),P.emit("plotly_buttonclicked",{menu:B,button:J,active:B.active}))}),oe.on("mouseover",function(){oe.call(y)}),oe.on("mouseout",function(){oe.call(b,B),N.call(E,B)})}),N.call(E,B),he?($.w=Math.max(le.openWidth,le.headerWidth),$.h=G.y-$.t):($.w=G.x-$.l,$.h=Math.max(le.openHeight,le.headerHeight)),$.direction=B.direction,F&&(N.size()?T(P,L,z,F,B,$):l(F))}function T(P,L,z,F,B,O){var I=B.direction,N=I==="up"||I==="down",U=B._dims,W=B.active,Q,ue,le;if(N)for(ue=0,le=0;le<W;le++)ue+=U.heights[le]+a.gapButton;else for(Q=0,le=0;le<W;le++)Q+=U.widths[le]+a.gapButton;F.enable(O,Q,ue),F.hbar&&F.hbar.attr("opacity","0").transition().attr("opacity","1"),F.vbar&&F.vbar.attr("opacity","0").transition().attr("opacity","1")}function l(P){var L=!!P.hbar,z=!!P.vbar;L&&P.hbar.transition().attr("opacity","0").each("end",function(){L=!1,z||P.disable()}),z&&P.vbar.transition().attr("opacity","0").each("end",function(){z=!1,L||P.disable()})}function _(P,L,z,F){P.call(w,L).call(S,L,z,F)}function w(P,L){var z=e.ensureSingle(P,"rect",a.itemRectClassName,function(F){F.attr({rx:a.rx,ry:a.ry,"shape-rendering":"crispEdges"})});z.call(A.stroke,L.bordercolor).call(A.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px")}function S(P,L,z,F){var B=e.ensureSingle(P,"text",a.itemTextClassName,function(N){N.attr({"text-anchor":"start","data-notex":1})}),O=z.label,I=F._fullLayout._meta;I&&(O=e.templateString(O,I)),B.call(M.font,L.font).text(O).call(t.convertToTspans,F)}function E(P,L){var z=L.active;P.each(function(F,B){var O=d.select(this);B===z&&L.showactive&&O.select("rect."+a.itemRectClassName).call(A.fill,a.activeColor)})}function y(P){P.select("rect."+a.itemRectClassName).call(A.fill,a.hoverColor)}function b(P,L){P.select("rect."+a.itemRectClassName).call(A.fill,L.bgcolor)}function p(P,L){var z=L._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},F=M.tester.selectAll("g."+a.dropdownButtonClassName).data(e.filterVisible(L.buttons));F.enter().append("g").classed(a.dropdownButtonClassName,!0);var B=["up","down"].indexOf(L.direction)!==-1;F.each(function(Q,ue){var le=d.select(this);le.call(_,L,Q,P);var he=le.select("."+a.itemTextClassName),G=he.node()&&M.bBox(he.node()).width,$=Math.max(G+a.textPadX,a.minWidth),J=L.font.size*o,X=t.lineCount(he),oe=Math.max(J*X,a.minHeight)+a.textOffsetY;oe=Math.ceil(oe),$=Math.ceil($),z.widths[ue]=$,z.heights[ue]=oe,z.height1=Math.max(z.height1,oe),z.width1=Math.max(z.width1,$),B?(z.totalWidth=Math.max(z.totalWidth,$),z.openWidth=z.totalWidth,z.totalHeight+=oe+a.gapButton,z.openHeight+=oe+a.gapButton):(z.totalWidth+=$+a.gapButton,z.openWidth+=$+a.gapButton,z.totalHeight=Math.max(z.totalHeight,oe),z.openHeight=z.totalHeight)}),B?z.totalHeight-=a.gapButton:z.totalWidth-=a.gapButton,z.headerWidth=z.width1+a.arrowPadX,z.headerHeight=z.height1,L.type==="dropdown"&&(B?(z.width1+=a.arrowPadX,z.totalHeight=z.height1):z.totalWidth=z.width1,z.totalWidth+=a.arrowPadX),F.remove();var O=z.totalWidth+L.pad.l+L.pad.r,I=z.totalHeight+L.pad.t+L.pad.b,N=P._fullLayout._size;z.lx=N.l+N.w*L.x,z.ly=N.t+N.h*(1-L.y);var U="left";e.isRightAnchor(L)&&(z.lx-=O,U="right"),e.isCenterAnchor(L)&&(z.lx-=O/2,U="center");var W="top";e.isBottomAnchor(L)&&(z.ly-=I,W="bottom"),e.isMiddleAnchor(L)&&(z.ly-=I/2,W="middle"),z.totalWidth=Math.ceil(z.totalWidth),z.totalHeight=Math.ceil(z.totalHeight),z.lx=Math.round(z.lx),z.ly=Math.round(z.ly),x.autoMargin(P,u(L),{x:L.x,y:L.y,l:O*({right:1,center:.5}[U]||0),r:O*({left:1,center:.5}[U]||0),b:I*({top:1,middle:.5}[W]||0),t:I*({bottom:1,middle:.5}[W]||0)})}function u(P){return a.autoMarginIdRoot+P._index}function m(P,L,z,F){F=F||{};var B=P.select("."+a.itemRectClassName),O=P.select("."+a.itemTextClassName),I=L.borderwidth,N=z.index,U=L._dims;M.setTranslate(P,I+z.x,I+z.y);var W=["up","down"].indexOf(L.direction)!==-1,Q=F.height||(W?U.heights[N]:U.height1);B.attr({x:0,y:0,width:F.width||(W?U.width1:U.widths[N]),height:Q});var ue=L.font.size*o,le=t.lineCount(O),he=(le-1)*ue/2;t.positionText(O,a.textOffsetX,Q/2-he+a.textOffsetY),W?z.y+=U.heights[N]+z.yPad:z.x+=U.widths[N]+z.xPad,z.index++}function h(P,L){P.attr(a.menuIndexAttrName,L||"-1").selectAll("g."+a.dropdownButtonClassName).remove()}}}),_9=Ze({"src/components/updatemenus/index.js"(Z,q){"use strict";var d=F2();q.exports={moduleType:"component",name:d.name,layoutAttributes:q5(),supplyLayoutDefaults:m9(),draw:y9()}}}),F_=Ze({"src/components/sliders/constants.js"(Z,q){"use strict";q.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}}}),V5=Ze({"src/components/sliders/attributes.js"(Z,q){"use strict";var d=tc(),x=v2(),A=rs().extendDeepAll,M=pc().overrideAll,e=A_(),t=Dl().templatedArray,r=F_(),o=t("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}});q.exports=M(t("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:o,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:A(x({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:e.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:d({})},font:d({}),activebgcolor:{valType:"color",dflt:r.gripBgActiveColor},bgcolor:{valType:"color",dflt:r.railBgColor},bordercolor:{valType:"color",dflt:r.railBorderColor},borderwidth:{valType:"number",min:0,dflt:r.railBorderWidth},ticklen:{valType:"number",min:0,dflt:r.tickLength},tickcolor:{valType:"color",dflt:r.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:r.minorTickLength}}),"arraydraw","from-root")}}),x9=Ze({"src/components/sliders/defaults.js"(Z,q){"use strict";var d=ca(),x=fp(),A=V5(),M=F_(),e=M.name,t=A.steps;q.exports=function(i,n){x(i,n,{name:e,handleItemDefaults:r})};function r(a,i,n){function s(w,S){return d.coerce(a,i,A,w,S)}for(var c=x(a,i,{name:"steps",handleItemDefaults:o}),f=0,g=0;g<c.length;g++)c[g].visible&&f++;var v;if(f<2?v=i.visible=!1:v=s("visible"),!!v){i._stepCount=f;var T=i._visibleSteps=d.filterVisible(c),l=s("active");(c[l]||{}).visible||(i.active=T[0]._index),s("x"),s("y"),d.noneOrAll(a,i,["x","y"]),s("xanchor"),s("yanchor"),s("len"),s("lenmode"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),d.coerceFont(s,"font",n.font);var _=s("currentvalue.visible");_&&(s("currentvalue.xanchor"),s("currentvalue.prefix"),s("currentvalue.suffix"),s("currentvalue.offset"),d.coerceFont(s,"currentvalue.font",i.font)),s("transition.duration"),s("transition.easing"),s("bgcolor"),s("activebgcolor"),s("bordercolor"),s("borderwidth"),s("ticklen"),s("tickwidth"),s("tickcolor"),s("minorticklen")}}function o(a,i){function n(f,g){return d.coerce(a,i,t,f,g)}var s;if(a.method!=="skip"&&!Array.isArray(a.args)?s=i.visible=!1:s=n("visible"),s){n("method"),n("args");var c=n("label","step-"+i._index);n("value",c),n("execute")}}}}),b9=Ze({"src/components/sliders/draw.js"(Z,q){"use strict";var d=On(),x=xc(),A=Yn(),M=as(),e=ca(),t=e.strTranslate,r=fu(),o=Dl().arrayEditor,a=F_(),i=mh(),n=i.LINE_SPACING,s=i.FROM_TL,c=i.FROM_BR;q.exports=function(O){var I=O._context.staticPlot,N=O._fullLayout,U=g(N,O),W=N._infolayer.selectAll("g."+a.containerClassName).data(U.length>0?[0]:[]);W.enter().append("g").classed(a.containerClassName,!0).style("cursor",I?null:"ew-resize");function Q(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),x.autoMargin(O,f(G))}if(W.exit().each(function(){d.select(this).selectAll("g."+a.groupClassName).each(Q)}).remove(),U.length!==0){var ue=W.selectAll("g."+a.groupClassName).data(U,v);ue.enter().append("g").classed(a.groupClassName,!0),ue.exit().each(Q).remove();for(var le=0;le<U.length;le++){var he=U[le];T(O,he)}ue.each(function(G){var $=d.select(this);m(G),x.manageCommandObserver(O,G,G._visibleSteps,function(J){var X=$.data()[0];X.active!==J.index&&(X._dragging||b(O,$,X,J.index,!1,!0))}),l(O,d.select(this),G)})}};function f(B){return a.autoMarginIdRoot+B._index}function g(B,O){for(var I=B[a.name],N=[],U=0;U<I.length;U++){var W=I[U];W.visible&&(W._gd=O,N.push(W))}return N}function v(B){return B._index}function T(B,O){var I=M.tester.selectAll("g."+a.labelGroupClass).data(O._visibleSteps);I.enter().append("g").classed(a.labelGroupClass,!0);var N=0,U=0;I.each(function(oe){var ie=d.select(this),j=S(ie,{step:oe},O),ee=j.node();if(ee){var re=M.bBox(ee);U=Math.max(U,re.height),N=Math.max(N,re.width)}}),I.remove();var W=O._dims={};W.inputAreaWidth=Math.max(a.railWidth,a.gripHeight);var Q=B._fullLayout._size;W.lx=Q.l+Q.w*O.x,W.ly=Q.t+Q.h*(1-O.y),O.lenmode==="fraction"?W.outerLength=Math.round(Q.w*O.len):W.outerLength=O.len,W.inputAreaStart=0,W.inputAreaLength=Math.round(W.outerLength-O.pad.l-O.pad.r);var ue=W.inputAreaLength-2*a.stepInset,le=ue/(O._stepCount-1),he=N+a.labelPadding;if(W.labelStride=Math.max(1,Math.ceil(he/le)),W.labelHeight=U,W.currentValueMaxWidth=0,W.currentValueHeight=0,W.currentValueTotalHeight=0,W.currentValueMaxLines=1,O.currentvalue.visible){var G=M.tester.append("g");I.each(function(oe){var ie=_(G,O,oe.label),j=ie.node()&&M.bBox(ie.node())||{width:0,height:0},ee=r.lineCount(ie);W.currentValueMaxWidth=Math.max(W.currentValueMaxWidth,Math.ceil(j.width)),W.currentValueHeight=Math.max(W.currentValueHeight,Math.ceil(j.height)),W.currentValueMaxLines=Math.max(W.currentValueMaxLines,ee)}),W.currentValueTotalHeight=W.currentValueHeight+O.currentvalue.offset,G.remove()}W.height=W.currentValueTotalHeight+a.tickOffset+O.ticklen+a.labelOffset+W.labelHeight+O.pad.t+O.pad.b;var $="left";e.isRightAnchor(O)&&(W.lx-=W.outerLength,$="right"),e.isCenterAnchor(O)&&(W.lx-=W.outerLength/2,$="center");var J="top";e.isBottomAnchor(O)&&(W.ly-=W.height,J="bottom"),e.isMiddleAnchor(O)&&(W.ly-=W.height/2,J="middle"),W.outerLength=Math.ceil(W.outerLength),W.height=Math.ceil(W.height),W.lx=Math.round(W.lx),W.ly=Math.round(W.ly);var X={y:O.y,b:W.height*c[J],t:W.height*s[J]};O.lenmode==="fraction"?(X.l=0,X.xl=O.x-O.len*s[$],X.r=0,X.xr=O.x+O.len*c[$]):(X.x=O.x,X.l=W.outerLength*s[$],X.r=W.outerLength*c[$]),x.autoMargin(B,f(O),X)}function l(B,O,I){(I.steps[I.active]||{}).visible||(I.active=I._visibleSteps[0]._index),O.call(_,I).call(F,I).call(E,I).call(u,I).call(z,B,I).call(w,B,I);var N=I._dims;M.setTranslate(O,N.lx+I.pad.l,N.ly+I.pad.t),O.call(h,I,!1),O.call(_,I)}function _(B,O,I){if(O.currentvalue.visible){var N=O._dims,U,W;switch(O.currentvalue.xanchor){case"right":U=N.inputAreaLength-a.currentValueInset-N.currentValueMaxWidth,W="left";break;case"center":U=N.inputAreaLength*.5,W="middle";break;default:U=a.currentValueInset,W="left"}var Q=e.ensureSingle(B,"text",a.labelClass,function(J){J.attr({"text-anchor":W,"data-notex":1})}),ue=O.currentvalue.prefix?O.currentvalue.prefix:"";if(typeof I=="string")ue+=I;else{var le=O.steps[O.active].label,he=O._gd._fullLayout._meta;he&&(le=e.templateString(le,he)),ue+=le}O.currentvalue.suffix&&(ue+=O.currentvalue.suffix),Q.call(M.font,O.currentvalue.font).text(ue).call(r.convertToTspans,O._gd);var G=r.lineCount(Q),$=(N.currentValueMaxLines+1-G)*O.currentvalue.font.size*n;return r.positionText(Q,U,$),Q}}function w(B,O,I){var N=e.ensureSingle(B,"rect",a.gripRectClass,function(U){U.call(p,O,B,I).style("pointer-events","all")});N.attr({width:a.gripWidth,height:a.gripHeight,rx:a.gripRadius,ry:a.gripRadius}).call(A.stroke,I.bordercolor).call(A.fill,I.bgcolor).style("stroke-width",I.borderwidth+"px")}function S(B,O,I){var N=e.ensureSingle(B,"text",a.labelClass,function(Q){Q.attr({"text-anchor":"middle","data-notex":1})}),U=O.step.label,W=I._gd._fullLayout._meta;return W&&(U=e.templateString(U,W)),N.call(M.font,I.font).text(U).call(r.convertToTspans,I._gd),N}function E(B,O){var I=e.ensureSingle(B,"g",a.labelsClass),N=O._dims,U=I.selectAll("g."+a.labelGroupClass).data(N.labelSteps);U.enter().append("g").classed(a.labelGroupClass,!0),U.exit().remove(),U.each(function(W){var Q=d.select(this);Q.call(S,W,O),M.setTranslate(Q,P(O,W.fraction),a.tickOffset+O.ticklen+O.font.size*n+a.labelOffset+N.currentValueTotalHeight)})}function y(B,O,I,N,U){var W=Math.round(N*(I._stepCount-1)),Q=I._visibleSteps[W]._index;Q!==I.active&&b(B,O,I,Q,!0,U)}function b(B,O,I,N,U,W){var Q=I.active;I.active=N,o(B.layout,a.name,I).applyUpdate("active",N);var ue=I.steps[I.active];O.call(h,I,W),O.call(_,I),B.emit("plotly_sliderchange",{slider:I,step:I.steps[I.active],interaction:U,previousActive:Q}),ue&&ue.method&&U&&(O._nextMethod?(O._nextMethod.step=ue,O._nextMethod.doCallback=U,O._nextMethod.doTransition=W):(O._nextMethod={step:ue,doCallback:U,doTransition:W},O._nextMethodRaf=window.requestAnimationFrame(function(){var le=O._nextMethod.step;le.method&&(le.execute&&x.executeAPICommand(B,le.method,le.args),O._nextMethod=null,O._nextMethodRaf=null)})))}function p(B,O,I){if(O._context.staticPlot)return;var N=I.node(),U=d.select(O);function W(){return I.data()[0]}function Q(){var ue=W();O.emit("plotly_sliderstart",{slider:ue});var le=I.select("."+a.gripRectClass);d.event.stopPropagation(),d.event.preventDefault(),le.call(A.fill,ue.activebgcolor);var he=L(ue,d.mouse(N)[0]);y(O,I,ue,he,!0),ue._dragging=!0;function G(){var J=W(),X=L(J,d.mouse(N)[0]);y(O,I,J,X,!1)}U.on("mousemove",G),U.on("touchmove",G);function $(){var J=W();J._dragging=!1,le.call(A.fill,J.bgcolor),U.on("mouseup",null),U.on("mousemove",null),U.on("touchend",null),U.on("touchmove",null),O.emit("plotly_sliderend",{slider:J,step:J.steps[J.active]})}U.on("mouseup",$),U.on("touchend",$)}B.on("mousedown",Q),B.on("touchstart",Q)}function u(B,O){var I=B.selectAll("rect."+a.tickRectClass).data(O._visibleSteps),N=O._dims;I.enter().append("rect").classed(a.tickRectClass,!0),I.exit().remove(),I.attr({width:O.tickwidth+"px","shape-rendering":"crispEdges"}),I.each(function(U,W){var Q=W%N.labelStride===0,ue=d.select(this);ue.attr({height:Q?O.ticklen:O.minorticklen}).call(A.fill,O.tickcolor),M.setTranslate(ue,P(O,W/(O._stepCount-1))-.5*O.tickwidth,(Q?a.tickOffset:a.minorTickOffset)+N.currentValueTotalHeight)})}function m(B){var O=B._dims;O.labelSteps=[];for(var I=B._stepCount,N=0;N<I;N+=O.labelStride)O.labelSteps.push({fraction:N/(I-1),step:B._visibleSteps[N]})}function h(B,O,I){for(var N=B.select("rect."+a.gripRectClass),U=0,W=0;W<O._stepCount;W++)if(O._visibleSteps[W]._index===O.active){U=W;break}var Q=P(O,U/(O._stepCount-1));if(!O._invokingCommand){var ue=N;I&&O.transition.duration>0&&(ue=ue.transition().duration(O.transition.duration).ease(O.transition.easing)),ue.attr("transform",t(Q-a.gripWidth*.5,O._dims.currentValueTotalHeight))}}function P(B,O){var I=B._dims;return I.inputAreaStart+a.stepInset+(I.inputAreaLength-2*a.stepInset)*Math.min(1,Math.max(0,O))}function L(B,O){var I=B._dims;return Math.min(1,Math.max(0,(O-a.stepInset-I.inputAreaStart)/(I.inputAreaLength-2*a.stepInset-2*I.inputAreaStart)))}function z(B,O,I){var N=I._dims,U=e.ensureSingle(B,"rect",a.railTouchRectClass,function(W){W.call(p,O,B,I).style("pointer-events","all")});U.attr({width:N.inputAreaLength,height:Math.max(N.inputAreaWidth,a.tickOffset+I.ticklen+N.labelHeight)}).call(A.fill,I.bgcolor).attr("opacity",0),M.setTranslate(U,0,N.currentValueTotalHeight)}function F(B,O){var I=O._dims,N=I.inputAreaLength-a.railInset*2,U=e.ensureSingle(B,"rect",a.railRectClass);U.attr({width:N,height:a.railWidth,rx:a.railRadius,ry:a.railRadius,"shape-rendering":"crispEdges"}).call(A.stroke,O.bordercolor).call(A.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),M.setTranslate(U,a.railInset,(I.inputAreaWidth-a.railWidth)*.5+I.currentValueTotalHeight)}}}),w9=Ze({"src/components/sliders/index.js"(Z,q){"use strict";var d=F_();q.exports={moduleType:"component",name:d.name,layoutAttributes:V5(),supplyLayoutDefaults:x9(),draw:b9()}}}),O2=Ze({"src/components/rangeslider/attributes.js"(Z,q){"use strict";var d=oh();q.exports={bgcolor:{valType:"color",dflt:d.background,editType:"plot"},bordercolor:{valType:"color",dflt:d.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"}}}),G5=Ze({"src/components/rangeslider/oppaxis_attributes.js"(Z,q){"use strict";q.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"}}}),B2=Ze({"src/components/rangeslider/constants.js"(Z,q){"use strict";q.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}}}),T9=Ze({"src/components/rangeslider/helpers.js"(Z){"use strict";var q=$c(),d=fu(),x=B2(),A=mh().LINE_SPACING,M=x.name;function e(t){var r=t&&t[M];return r&&r.visible}Z.isVisible=e,Z.makeData=function(t){for(var r=q.list({_fullLayout:t},"x",!0),o=t.margin,a=[],i=0;i<r.length;i++){var n=r[i];if(e(n)){a.push(n);var s=n[M];s._id=M+n._id,s._height=(t.height-o.b-o.t)*s.thickness,s._offsetShift=Math.floor(s.borderwidth/2)}}t._rangeSliderData=a},Z.autoMarginOpts=function(t,r){var o=t._fullLayout,a=r[M],i=r._id.charAt(0),n=0,s=0;if(r.side==="bottom"&&(n=r._depth,r.title.text!==o._dfltTitle[i])){s=1.5*r.title.font.size+10+a._offsetShift;var c=(r.title.text.match(d.BR_TAG_ALL)||[]).length;s+=c*r.title.font.size*A}return{x:0,y:r._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(o.margin.b,s),pad:x.extraPad+a._offsetShift*2}}}}),A9=Ze({"src/components/rangeslider/defaults.js"(Z,q){"use strict";var d=ca(),x=Dl(),A=$c(),M=O2(),e=G5();q.exports=function(r,o,a){var i=r[a],n=o[a];if(!(i.rangeslider||o._requestRangeslider[n._id]))return;d.isPlainObject(i.rangeslider)||(i.rangeslider={});var s=i.rangeslider,c=x.newContainer(n,"rangeslider");function f(m,h){return d.coerce(s,c,M,m,h)}var g,v;function T(m,h){return d.coerce(g,v,e,m,h)}var l=f("visible");if(l){f("bgcolor",o.plot_bgcolor),f("bordercolor"),f("borderwidth"),f("thickness"),f("autorange",!n.isValidRange(s.range)),f("range");var _=o._subplots;if(_)for(var w=_.cartesian.filter(function(m){return m.substr(0,m.indexOf("y"))===A.name2id(a)}).map(function(m){return m.substr(m.indexOf("y"),m.length)}),S=d.simpleMap(w,A.id2name),E=0;E<S.length;E++){var y=S[E];g=s[y]||{},v=x.newContainer(c,y,"yaxis");var b=o[y],p;g.range&&b.isValidRange(g.range)&&(p="fixed");var u=T("rangemode",p);u!=="match"&&T("range",b.range.slice())}c._input=s}}}}),S9=Ze({"src/components/rangeslider/calc_autorange.js"(Z,q){"use strict";var d=$c().list,x=Yd().getAutoRange,A=B2();q.exports=function(e){for(var t=d(e,"x",!0),r=0;r<t.length;r++){var o=t[r],a=o[A.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=x(e,o))}}}}),M9=Ze({"src/components/rangeslider/draw.js"(Z,q){"use strict";var d=On(),x=oo(),A=xc(),M=ca(),e=M.strTranslate,t=as(),r=Yn(),o=Z0(),a=Zf(),i=$c(),n=Tp(),s=Kd(),c=B2();q.exports=function(p){for(var u=p._fullLayout,m=u._rangeSliderData,h=0;h<m.length;h++){var P=m[h][c.name];P._clipId=P._id+"-"+u._uid}function L(F){return F._name}var z=u._infolayer.selectAll("g."+c.containerClassName).data(m,L);z.exit().each(function(F){var B=F[c.name];u._topdefs.select("#"+B._clipId).remove()}).remove(),m.length!==0&&(z.enter().append("g").classed(c.containerClassName,!0).attr("pointer-events","all"),z.each(function(F){var B=d.select(this),O=F[c.name],I=u[i.id2name(F.anchor)],N=O[i.id2name(F.anchor)];if(O.range){var U=M.simpleMap(O.range,F.r2l),W=M.simpleMap(F.range,F.r2l),Q;W[0]<W[1]?Q=[Math.min(U[0],W[0]),Math.max(U[1],W[1])]:Q=[Math.max(U[0],W[0]),Math.min(U[1],W[1])],O.range=O._input.range=M.simpleMap(Q,F.l2r)}F.cleanRange("rangeslider.range");var ue=u._size,le=F.domain;O._width=ue.w*(le[1]-le[0]);var he=Math.round(ue.l+ue.w*le[0]),G=Math.round(ue.t+ue.h*(1-F._counterDomainMin)+(F.side==="bottom"?F._depth:0)+O._offsetShift+c.extraPad);B.attr("transform",e(he,G)),O._rl=M.simpleMap(O.range,F.r2l);var $=O._rl[0],J=O._rl[1],X=J-$;if(O.p2d=function(Re){return Re/O._width*X+$},O.d2p=function(Re){return(Re-$)/X*O._width},F.rangebreaks){var oe=F.locateBreaks($,J);if(oe.length){var ie,j,ee=0;for(ie=0;ie<oe.length;ie++)j=oe[ie],ee+=j.max-j.min;var re=O._width/(J-$-ee),ce=[-re*$];for(ie=0;ie<oe.length;ie++)j=oe[ie],ce.push(ce[ce.length-1]-re*(j.max-j.min));for(O.d2p=function(Re){for(var Xe=ce[0],it=0;it<oe.length;it++){var ot=oe[it];if(Re>=ot.max)Xe=ce[it+1];else if(Re<ot.min)break}return Xe+re*Re},ie=0;ie<oe.length;ie++)j=oe[ie],j.pmin=O.d2p(j.min),j.pmax=O.d2p(j.max);O.p2d=function(Re){for(var Xe=ce[0],it=0;it<oe.length;it++){var ot=oe[it];if(Re>=ot.pmax)Xe=ce[it+1];else if(Re<ot.pmin)break}return(Re-Xe)/re}}}if(N.rangemode!=="match"){var be=I.r2l(N.range[0]),Ae=I.r2l(N.range[1]),ze=Ae-be;O.d2pOppAxis=function(Re){return(Re-be)/ze*O._height}}B.call(l,p,F,O).call(_,p,F,O).call(w,p,F,O).call(E,p,F,O,N).call(y,p,F,O).call(b,p,F,O),g(B,p,F,O),T(B,p,F,O,I,N),F.side==="bottom"&&o.draw(p,F._id+"title",{propContainer:F,propName:F._name+".title",placeholder:u._dfltTitle.x,attributes:{x:F._offset+F._length/2,y:G+O._height+O._offsetShift+10+1.5*F.title.font.size,"text-anchor":"middle"}})}))};function f(p){return typeof p.clientX=="number"?p.clientX:p.touches&&p.touches.length>0?p.touches[0].clientX:0}function g(p,u,m,h){if(u._context.staticPlot)return;var P=p.select("rect."+c.slideBoxClassName).node(),L=p.select("rect."+c.grabAreaMinClassName).node(),z=p.select("rect."+c.grabAreaMaxClassName).node();function F(){var B=d.event,O=B.target,I=f(B),N=I-p.node().getBoundingClientRect().left,U=h.d2p(m._rl[0]),W=h.d2p(m._rl[1]),Q=n.coverSlip();this.addEventListener("touchmove",ue),this.addEventListener("touchend",le),Q.addEventListener("mousemove",ue),Q.addEventListener("mouseup",le);function ue(he){var G=f(he),$=+G-I,J,X,oe;switch(O){case P:if(oe="ew-resize",U+$>m._length||W+$<0)return;J=U+$,X=W+$;break;case L:if(oe="col-resize",U+$>m._length)return;J=U+$,X=W;break;case z:if(oe="col-resize",W+$<0)return;J=U,X=W+$;break;default:oe="ew-resize",J=N,X=N+$;break}if(X<J){var ie=X;X=J,J=ie}h._pixelMin=J,h._pixelMax=X,s(d.select(Q),oe),v(p,u,m,h)}function le(){Q.removeEventListener("mousemove",ue),Q.removeEventListener("mouseup",le),this.removeEventListener("touchmove",ue),this.removeEventListener("touchend",le),M.removeElement(Q)}}p.on("mousedown",F),p.on("touchstart",F)}function v(p,u,m,h){function P(F){return m.l2r(M.constrain(F,h._rl[0],h._rl[1]))}var L=P(h.p2d(h._pixelMin)),z=P(h.p2d(h._pixelMax));window.requestAnimationFrame(function(){x.call("_guiRelayout",u,m._name+".range",[L,z])})}function T(p,u,m,h,P,L){var z=c.handleWidth/2;function F(he){return M.constrain(he,0,h._width)}function B(he){return M.constrain(he,0,h._height)}function O(he){return M.constrain(he,-z,h._width+z)}var I=F(h.d2p(m._rl[0])),N=F(h.d2p(m._rl[1]));if(p.select("rect."+c.slideBoxClassName).attr("x",I).attr("width",N-I),p.select("rect."+c.maskMinClassName).attr("width",I),p.select("rect."+c.maskMaxClassName).attr("x",N).attr("width",h._width-N),L.rangemode!=="match"){var U=h._height-B(h.d2pOppAxis(P._rl[1])),W=h._height-B(h.d2pOppAxis(P._rl[0]));p.select("rect."+c.maskMinOppAxisClassName).attr("x",I).attr("height",U).attr("width",N-I),p.select("rect."+c.maskMaxOppAxisClassName).attr("x",I).attr("y",W).attr("height",h._height-W).attr("width",N-I),p.select("rect."+c.slideBoxClassName).attr("y",U).attr("height",W-U)}var Q=.5,ue=Math.round(O(I-z))-Q,le=Math.round(O(N-z))+Q;p.select("g."+c.grabberMinClassName).attr("transform",e(ue,Q)),p.select("g."+c.grabberMaxClassName).attr("transform",e(le,Q))}function l(p,u,m,h){var P=M.ensureSingle(p,"rect",c.bgClassName,function(B){B.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),L=h.borderwidth%2===0?h.borderwidth:h.borderwidth-1,z=-h._offsetShift,F=t.crispRound(u,h.borderwidth);P.attr({width:h._width+L,height:h._height+L,transform:e(z,z),"stroke-width":F}).call(r.stroke,h.bordercolor).call(r.fill,h.bgcolor)}function _(p,u,m,h){var P=u._fullLayout,L=M.ensureSingleById(P._topdefs,"clipPath",h._clipId,function(z){z.append("rect").attr({x:0,y:0})});L.select("rect").attr({width:h._width,height:h._height})}function w(p,u,m,h){var P=u.calcdata,L=p.selectAll("g."+c.rangePlotClassName).data(m._subplotsWith,M.identity);L.enter().append("g").attr("class",function(F){return c.rangePlotClassName+" "+F}).call(t.setClipUrl,h._clipId,u),L.order(),L.exit().remove();var z;L.each(function(F,B){var O=d.select(this),I=B===0,N=i.getFromId(u,F,"y"),U=N._name,W=h[U],Q={data:[],layout:{xaxis:{type:m.type,domain:[0,1],range:h.range.slice(),calendar:m.calendar},width:h._width,height:h._height,margin:{t:0,b:0,l:0,r:0}},_context:u._context};m.rangebreaks&&(Q.layout.xaxis.rangebreaks=m.rangebreaks),Q.layout[U]={type:N.type,domain:[0,1],range:W.rangemode!=="match"?W.range.slice():N.range.slice(),calendar:N.calendar},N.rangebreaks&&(Q.layout[U].rangebreaks=N.rangebreaks),A.supplyDefaults(Q);var ue=Q._fullLayout.xaxis,le=Q._fullLayout[U];ue.clearCalc(),ue.setScale(),le.clearCalc(),le.setScale();var he={id:F,plotgroup:O,xaxis:ue,yaxis:le,isRangePlot:!0};I?z=he:(he.mainplot="xy",he.mainplotinfo=z),a.rangePlot(u,he,S(P,F))})}function S(p,u){for(var m=[],h=0;h<p.length;h++){var P=p[h],L=P[0].trace;L.xaxis+L.yaxis===u&&m.push(P)}return m}function E(p,u,m,h,P){var L=M.ensureSingle(p,"rect",c.maskMinClassName,function(O){O.attr({x:0,y:0,"shape-rendering":"crispEdges"})});L.attr("height",h._height).call(r.fill,c.maskColor);var z=M.ensureSingle(p,"rect",c.maskMaxClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});if(z.attr("height",h._height).call(r.fill,c.maskColor),P.rangemode!=="match"){var F=M.ensureSingle(p,"rect",c.maskMinOppAxisClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});F.attr("width",h._width).call(r.fill,c.maskOppAxisColor);var B=M.ensureSingle(p,"rect",c.maskMaxOppAxisClassName,function(O){O.attr({y:0,"shape-rendering":"crispEdges"})});B.attr("width",h._width).style("border-top",c.maskOppBorder).call(r.fill,c.maskOppAxisColor)}}function y(p,u,m,h){if(!u._context.staticPlot){var P=M.ensureSingle(p,"rect",c.slideBoxClassName,function(L){L.attr({y:0,cursor:c.slideBoxCursor,"shape-rendering":"crispEdges"})});P.attr({height:h._height,fill:c.slideBoxFill})}}function b(p,u,m,h){var P=M.ensureSingle(p,"g",c.grabberMinClassName),L=M.ensureSingle(p,"g",c.grabberMaxClassName),z={x:0,width:c.handleWidth,rx:c.handleRadius,fill:r.background,stroke:r.defaultLine,"stroke-width":c.handleStrokeWidth,"shape-rendering":"crispEdges"},F={y:Math.round(h._height/4),height:Math.round(h._height/2)},B=M.ensureSingle(P,"rect",c.handleMinClassName,function(W){W.attr(z)});B.attr(F);var O=M.ensureSingle(L,"rect",c.handleMaxClassName,function(W){W.attr(z)});O.attr(F);var I={width:c.grabAreaWidth,x:0,y:0,fill:c.grabAreaFill,cursor:u._context.staticPlot?void 0:c.grabAreaCursor},N=M.ensureSingle(P,"rect",c.grabAreaMinClassName,function(W){W.attr(I)});N.attr("height",h._height);var U=M.ensureSingle(L,"rect",c.grabAreaMaxClassName,function(W){W.attr(I)});U.attr("height",h._height)}}}),E9=Ze({"src/components/rangeslider/index.js"(Z,q){"use strict";var d=ca(),x=O2(),A=G5(),M=T9();q.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:d.extendFlat({},x,{yaxis:A})}}},layoutAttributes:O2(),handleDefaults:A9(),calcAutorange:S9(),draw:M9(),isVisible:M.isVisible,makeData:M.makeData,autoMarginOpts:M.autoMarginOpts}}}),N2=Ze({"src/components/rangeselector/attributes.js"(Z,q){"use strict";var d=tc(),x=oh(),A=Dl().templatedArray,M=A("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"});q.exports={visible:{valType:"boolean",editType:"plot"},buttons:M,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:d({editType:"plot"}),bgcolor:{valType:"color",dflt:x.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}}),H5=Ze({"src/components/rangeselector/constants.js"(Z,q){"use strict";q.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}}),C9=Ze({"src/components/rangeselector/defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Dl(),M=fp(),e=N2(),t=H5();q.exports=function(i,n,s,c,f){var g=i.rangeselector||{},v=A.newContainer(n,"rangeselector");function T(E,y){return d.coerce(g,v,e,E,y)}var l=M(g,v,{name:"buttons",handleItemDefaults:r,calendar:f}),_=T("visible",l.length>0);if(_){var w=o(n,s,c);T("x",w[0]),T("y",w[1]),d.noneOrAll(i,n,["x","y"]),T("xanchor"),T("yanchor"),d.coerceFont(T,"font",s.font);var S=T("bgcolor");T("activecolor",x.contrast(S,t.lightAmount,t.darkAmount)),T("bordercolor"),T("borderwidth")}};function r(a,i,n,s){var c=s.calendar;function f(T,l){return d.coerce(a,i,e.buttons,T,l)}var g=f("visible");if(g){var v=f("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?i.stepmode="backward":f("stepmode"),f("count")),f("label")}}function o(a,i,n){for(var s=n.filter(function(v){return i[v].anchor===a._id}),c=0,f=0;f<s.length;f++){var g=i[s[f]].domain;g&&(c=Math.max(g[1],c))}return[a.domain[0],c+t.yPad]}}}),k9=Ze({"src/components/rangeselector/get_update_object.js"(Z,q){"use strict";var d=$p(),x=ca().titleCase;q.exports=function(e,t){var r=e._name,o={};if(t.step==="all")o[r+".autorange"]=!0;else{var a=A(e,t);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o};function A(M,e){var t=M.range,r=new Date(M.r2l(t[1])),o=e.step,a=d["utc"+x(o)],i=e.count,n;switch(e.stepmode){case"backward":n=M.l2r(+a.offset(r,-i));break;case"todate":var s=a.offset(r,-i);n=M.l2r(+a.ceil(s));break}var c=t[1];return[n,c]}}}),L9=Ze({"src/components/rangeselector/draw.js"(Z,q){"use strict";var d=On(),x=oo(),A=xc(),M=Yn(),e=as(),t=ca(),r=t.strTranslate,o=fu(),a=$c(),i=mh(),n=i.LINE_SPACING,s=i.FROM_TL,c=i.FROM_BR,f=H5(),g=k9();q.exports=function(p){var u=p._fullLayout,m=u._infolayer.selectAll(".rangeselector").data(v(p),T);m.enter().append("g").classed("rangeselector",!0),m.exit().remove(),m.style({cursor:"pointer","pointer-events":"all"}),m.each(function(h){var P=d.select(this),L=h,z=L.rangeselector,F=P.selectAll("g.button").data(t.filterVisible(z.buttons));F.enter().append("g").classed("button",!0),F.exit().remove(),F.each(function(B){var O=d.select(this),I=g(L,B);B._isActive=l(L,B,I),O.call(_,z,B),O.call(S,z,B,p),O.on("click",function(){p._dragged||x.call("_guiRelayout",p,I)}),O.on("mouseover",function(){B._isHovered=!0,O.call(_,z,B)}),O.on("mouseout",function(){B._isHovered=!1,O.call(_,z,B)})}),y(p,F,z,L._name,P)})};function v(b){for(var p=a.list(b,"x",!0),u=[],m=0;m<p.length;m++){var h=p[m];h.rangeselector&&h.rangeselector.visible&&u.push(h)}return u}function T(b){return b._id}function l(b,p,u){if(p.step==="all")return b.autorange===!0;var m=Object.keys(u);return b.range[0]===u[m[0]]&&b.range[1]===u[m[1]]}function _(b,p,u){var m=t.ensureSingle(b,"rect","selector-rect",function(h){h.attr("shape-rendering","crispEdges")});m.attr({rx:f.rx,ry:f.ry}),m.call(M.stroke,p.bordercolor).call(M.fill,w(p,u)).style("stroke-width",p.borderwidth+"px")}function w(b,p){return p._isActive||p._isHovered?b.activecolor:b.bgcolor}function S(b,p,u,m){function h(L){o.convertToTspans(L,m)}var P=t.ensureSingle(b,"text","selector-text",function(L){L.attr("text-anchor","middle")});P.call(e.font,p.font).text(E(u,m._fullLayout._meta)).call(h)}function E(b,p){return b.label?p?t.templateString(b.label,p):b.label:b.step==="all"?"all":b.count+b.step.charAt(0)}function y(b,p,u,m,h){var P=0,L=0,z=u.borderwidth;p.each(function(){var U=d.select(this),W=U.select(".selector-text"),Q=u.font.size*n,ue=Math.max(Q*o.lineCount(W),16)+3;L=Math.max(L,ue)}),p.each(function(){var U=d.select(this),W=U.select(".selector-rect"),Q=U.select(".selector-text"),ue=Q.node()&&e.bBox(Q.node()).width,le=u.font.size*n,he=o.lineCount(Q),G=Math.max(ue+10,f.minButtonWidth);U.attr("transform",r(z+P,z)),W.attr({x:0,y:0,width:G,height:L}),o.positionText(Q,G/2,L/2-(he-1)*le/2+3),P+=G+5});var F=b._fullLayout._size,B=F.l+F.w*u.x,O=F.t+F.h*(1-u.y),I="left";t.isRightAnchor(u)&&(B-=P,I="right"),t.isCenterAnchor(u)&&(B-=P/2,I="center");var N="top";t.isBottomAnchor(u)&&(O-=L,N="bottom"),t.isMiddleAnchor(u)&&(O-=L/2,N="middle"),P=Math.ceil(P),L=Math.ceil(L),B=Math.round(B),O=Math.round(O),A.autoMargin(b,m+"-range-selector",{x:u.x,y:u.y,l:P*s[I],r:P*c[I],b:L*c[N],t:L*s[N]}),h.attr("transform",r(B,O))}}}),P9=Ze({"src/components/rangeselector/index.js"(Z,q){"use strict";q.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:N2()}}},layoutAttributes:N2(),handleDefaults:C9(),draw:L9()}}}),bc=Ze({"src/plots/domain.js"(Z){"use strict";var q=rs().extendFlat;Z.attributes=function(d,x){d=d||{},x=x||{};var A={valType:"info_array",editType:d.editType,items:[{valType:"number",min:0,max:1,editType:d.editType},{valType:"number",min:0,max:1,editType:d.editType}],dflt:[0,1]},M=d.name?d.name+" ":"",e=d.trace?"trace ":"subplot ",t=x.description?" "+x.description:"",r={x:q({},A,{}),y:q({},A,{}),editType:d.editType};return d.noGridCell||(r.row={valType:"integer",min:0,dflt:0,editType:d.editType},r.column={valType:"integer",min:0,dflt:0,editType:d.editType}),r},Z.defaults=function(d,x,A,M){var e=M&&M.x||[0,1],t=M&&M.y||[0,1],r=x.grid;if(r){var o=A("domain.column");o!==void 0&&(o<r.columns?e=r._domains.x[o]:delete d.domain.column);var a=A("domain.row");a!==void 0&&(a<r.rows?t=r._domains.y[a]:delete d.domain.row)}var i=A("domain.x",e),n=A("domain.y",t);i[0]<i[1]||(d.domain.x=e.slice()),n[0]<n[1]||(d.domain.y=t.slice())}}}),W5=Ze({"src/components/grid/index.js"(Z,q){"use strict";var d=ca(),x=Jy().counter,A=bc().attributes,M=kh().idRegex,e=Dl(),t={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:[x("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[M.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[M.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:A({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 r(s,c,f){var g=c[f+"axes"],v=Object.keys((s._splomAxes||{})[f]||{});if(Array.isArray(g))return g;if(v.length)return v}function o(s,c){var f=s.grid||{},g=r(c,f,"x"),v=r(c,f,"y");if(!s.grid&&!g&&!v)return;var T=Array.isArray(f.subplots)&&Array.isArray(f.subplots[0]),l=Array.isArray(g),_=Array.isArray(v),w=l&&g!==f.xaxes&&_&&v!==f.yaxes,S,E;T?(S=f.subplots.length,E=f.subplots[0].length):(_&&(S=v.length),l&&(E=g.length));var y=e.newContainer(c,"grid");function b(O,I){return d.coerce(f,y,t,O,I)}var p=b("rows",S),u=b("columns",E);if(!(p*u>1)){delete c.grid;return}if(!T&&!l&&!_){var m=b("pattern")==="independent";m&&(T=!0)}y._hasSubplotGrid=T;var h=b("roworder"),P=h==="top to bottom",L=T?.2:.1,z=T?.3:.1,F,B;w&&c._splomGridDflt&&(F=c._splomGridDflt.xside,B=c._splomGridDflt.yside),y._domains={x:a("x",b,L,F,u),y:a("y",b,z,B,p,P)}}function a(s,c,f,g,v,T){var l=c(s+"gap",f),_=c("domain."+s);c(s+"side",g);for(var w=new Array(v),S=_[0],E=(_[1]-S)/(v-l),y=E*(1-l),b=0;b<v;b++){var p=S+E*b;w[T?v-1-b:b]=[p,p+y]}return w}function i(s,c){var f=c.grid;if(!(!f||!f._domains)){var g=s.grid||{},v=c._subplots,T=f._hasSubplotGrid,l=f.rows,_=f.columns,w=f.pattern==="independent",S,E,y,b,p,u,m,h=f._axisMap={};if(T){var P=g.subplots||[];u=f.subplots=new Array(l);var L=1;for(S=0;S<l;S++){var z=u[S]=new Array(_),F=P[S]||[];for(E=0;E<_;E++)if(w?(p=L===1?"xy":"x"+L+"y"+L,L++):p=F[E],z[E]="",v.cartesian.indexOf(p)!==-1){if(m=p.indexOf("y"),y=p.slice(0,m),b=p.slice(m),h[y]!==void 0&&h[y]!==E||h[b]!==void 0&&h[b]!==S)continue;z[E]=p,h[y]=E,h[b]=S}}}else{var B=r(c,g,"x"),O=r(c,g,"y");f.xaxes=n(B,v.xaxis,_,h,"x"),f.yaxes=n(O,v.yaxis,l,h,"y")}var I=f._anchors={},N=f.roworder==="top to bottom";for(var U in h){var W=U.charAt(0),Q=f[W+"side"],ue,le,he;if(Q.length<8)I[U]="free";else if(W==="x"){if(Q.charAt(0)==="t"===N?(ue=0,le=1,he=l):(ue=l-1,le=-1,he=-1),T){var G=h[U];for(S=ue;S!==he;S+=le)if(p=u[S][G],!!p&&(m=p.indexOf("y"),p.slice(0,m)===U)){I[U]=p.slice(m);break}}else for(S=ue;S!==he;S+=le)if(b=f.yaxes[S],v.cartesian.indexOf(U+b)!==-1){I[U]=b;break}}else if(Q.charAt(0)==="l"?(ue=0,le=1,he=_):(ue=_-1,le=-1,he=-1),T){var $=h[U];for(S=ue;S!==he;S+=le)if(p=u[$][S],!!p&&(m=p.indexOf("y"),p.slice(m)===U)){I[U]=p.slice(0,m);break}}else for(S=ue;S!==he;S+=le)if(y=f.xaxes[S],v.cartesian.indexOf(y+U)!==-1){I[U]=y;break}}}}function n(s,c,f,g,v){var T=new Array(f),l;function _(w,S){c.indexOf(S)!==-1&&g[S]===void 0?(T[w]=S,g[S]=w):T[w]=""}if(Array.isArray(s))for(l=0;l<f;l++)_(l,s[l]);else for(_(0,v),l=1;l<f;l++)_(l,v+(l+1));return T}q.exports={moduleType:"component",name:"grid",schema:{layout:{grid:t}},layoutAttributes:t,sizeDefaults:o,contentDefaults:i}}}),X5=Ze({"src/components/errorbars/attributes.js"(Z,q){"use strict";q.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"}}}),I9=Ze({"src/components/errorbars/defaults.js"(Z,q){"use strict";var d=ns(),x=oo(),A=ca(),M=Dl(),e=X5();q.exports=function(t,r,o,a){var i="error_"+a.axis,n=M.newContainer(r,i),s=t[i]||{};function c(w,S){return A.coerce(s,n,e,w,S)}var f=s.array!==void 0||s.value!==void 0||s.type==="sqrt",g=c("visible",f);if(g!==!1){var v=c("type","array"in s?"data":"percent"),T=!0;v!=="sqrt"&&(T=c("symmetric",!((v==="data"?"arrayminus":"valueminus")in s))),v==="data"?(c("array"),c("traceref"),T||(c("arrayminus"),c("tracerefminus"))):(v==="percent"||v==="constant")&&(c("value"),T||c("valueminus"));var l="copy_"+a.inherit+"style";if(a.inherit){var _=r["error_"+a.inherit];(_||{}).visible&&c(l,!(s.color||d(s.thickness)||d(s.width)))}(!a.inherit||!n[l])&&(c("color",o),c("thickness"),c("width",x.traceIs(r,"gl3d")?0:4))}}}}),Z5=Ze({"src/components/errorbars/compute_error.js"(Z,q){"use strict";q.exports=function(A){var M=A.type,e=A.symmetric;if(M==="data"){var t=A.array||[];if(e)return function(n,s){var c=+t[s];return[c,c]};var r=A.arrayminus||[];return function(n,s){var c=+t[s],f=+r[s];return!isNaN(c)||!isNaN(f)?[f||0,c||0]:[NaN,NaN]}}else{var o=d(M,A.value),a=d(M,A.valueminus);return e||A.valueminus===void 0?function(n){var s=o(n);return[s,s]}:function(n){return[a(n),o(n)]}}};function d(x,A){if(x==="percent")return function(M){return Math.abs(M*A/100)};if(x==="constant")return function(){return Math.abs(A)};if(x==="sqrt")return function(M){return Math.sqrt(Math.abs(M))}}}}),R9=Ze({"src/components/errorbars/calc.js"(Z,q){"use strict";var d=ns(),x=oo(),A=Wo(),M=ca(),e=Z5();q.exports=function(o){for(var a=o.calcdata,i=0;i<a.length;i++){var n=a[i],s=n[0].trace;if(s.visible===!0&&x.traceIs(s,"errorBarsOK")){var c=A.getFromId(o,s.xaxis),f=A.getFromId(o,s.yaxis);t(n,s,c,"x"),t(n,s,f,"y")}}};function t(r,o,a,i){var n=o["error_"+i]||{},s=n.visible&&["linear","log"].indexOf(a.type)!==-1,c=[];if(s){for(var f=e(n),g=0;g<r.length;g++){var v=r[g],T=v.i;if(T===void 0)T=g;else if(T===null)continue;var l=v[i];if(d(a.c2l(l))){var _=f(l,T);if(d(_[0])&&d(_[1])){var w=v[i+"s"]=l-_[0],S=v[i+"h"]=l+_[1];c.push(w,S)}}}var E=a._id,y=o._extremes[E],b=A.findExtremes(a,c,M.extendFlat({tozero:y.opts.tozero},{padded:!0}));y.min=y.min.concat(b.min),y.max=y.max.concat(b.max)}}}}),D9=Ze({"src/components/errorbars/plot.js"(Z,q){"use strict";var d=On(),x=ns(),A=as(),M=Fu();q.exports=function(r,o,a,i){var n,s=a.xaxis,c=a.yaxis,f=i&&i.duration>0,g=r._context.staticPlot;o.each(function(v){var T=v[0].trace,l=T.error_x||{},_=T.error_y||{},w;T.ids&&(w=function(b){return b.id});var S=M.hasMarkers(T)&&T.marker.maxdisplayed>0;!_.visible&&!l.visible&&(v=[]);var E=d.select(this).selectAll("g.errorbar").data(v,w);if(E.exit().remove(),!!v.length){l.visible||E.selectAll("path.xerror").remove(),_.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var y=E.enter().append("g").classed("errorbar",!0);f&&y.style("opacity",0).transition().duration(i.duration).style("opacity",1),A.setClipUrl(E,a.layerClipId,r),E.each(function(b){var p=d.select(this),u=e(b,s,c);if(!(S&&!b.vis)){var m,h=p.select("path.yerror");if(_.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var P=_.width;m="M"+(u.x-P)+","+u.yh+"h"+2*P+"m-"+P+",0V"+u.ys,u.noYS||(m+="m-"+P+",0h"+2*P),n=!h.size(),n?h=p.append("path").style("vector-effect",g?"none":"non-scaling-stroke").classed("yerror",!0):f&&(h=h.transition().duration(i.duration).ease(i.easing)),h.attr("d",m)}else h.remove();var L=p.select("path.xerror");if(l.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var z=(l.copy_ystyle?_:l).width;m="M"+u.xh+","+(u.y-z)+"v"+2*z+"m0,-"+z+"H"+u.xs,u.noXS||(m+="m0,-"+z+"v"+2*z),n=!L.size(),n?L=p.append("path").style("vector-effect",g?"none":"non-scaling-stroke").classed("xerror",!0):f&&(L=L.transition().duration(i.duration).ease(i.easing)),L.attr("d",m)}else L.remove()}})}})};function e(t,r,o){var a={x:r.c2p(t.x),y:o.c2p(t.y)};return t.yh!==void 0&&(a.yh=o.c2p(t.yh),a.ys=o.c2p(t.ys),x(a.ys)||(a.noYS=!0,a.ys=o.c2p(t.ys,!0))),t.xh!==void 0&&(a.xh=r.c2p(t.xh),a.xs=r.c2p(t.xs),x(a.xs)||(a.noXS=!0,a.xs=r.c2p(t.xs,!0))),a}}}),z9=Ze({"src/components/errorbars/style.js"(Z,q){"use strict";var d=On(),x=Yn();q.exports=function(M){M.each(function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=d.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(x.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(x.stroke,o.color)})}}}),F9=Ze({"src/components/errorbars/index.js"(Z,q){"use strict";var d=ca(),x=pc().overrideAll,A=X5(),M={error_x:d.extendFlat({},A),error_y:d.extendFlat({},A)};delete M.error_x.copy_zstyle,delete M.error_y.copy_zstyle,delete M.error_y.copy_ystyle;var e={error_x:d.extendFlat({},A),error_y:d.extendFlat({},A),error_z:d.extendFlat({},A)};delete e.error_x.copy_ystyle,delete e.error_y.copy_ystyle,delete e.error_z.copy_ystyle,delete e.error_z.copy_zstyle,q.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:M,bar:M,histogram:M,scatter3d:x(e,"calc","nested"),scattergl:x(M,"calc","nested")}},supplyDefaults:I9(),calc:R9(),makeComputeError:Z5(),plot:D9(),style:z9(),hoverInfo:t};function t(r,o,a){(o.error_y||{}).visible&&(a.yerr=r.yh-r.y,o.error_y.symmetric||(a.yerrneg=r.y-r.ys)),(o.error_x||{}).visible&&(a.xerr=r.xh-r.x,o.error_x.symmetric||(a.xerrneg=r.x-r.xs))}}}),O9=Ze({"src/components/colorbar/constants.js"(Z,q){"use strict";q.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"}}}}),B9=Ze({"src/components/colorbar/draw.js"(Z,q){"use strict";var d=On(),x=Ch(),A=xc(),M=oo(),e=Wo(),t=Tp(),r=ca(),o=r.strTranslate,a=rs().extendFlat,i=Kd(),n=as(),s=Yn(),c=Z0(),f=fu(),g=bp().flipScale,v=z_(),T=R2(),l=Wh(),_=mh(),w=_.LINE_SPACING,S=_.FROM_TL,E=_.FROM_BR,y=O9().cn;function b(L){var z=L._fullLayout,F=z._infolayer.selectAll("g."+y.colorbar).data(p(L),function(B){return B._id});F.enter().append("g").attr("class",function(B){return B._id}).classed(y.colorbar,!0),F.each(function(B){var O=d.select(this);r.ensureSingle(O,"rect",y.cbbg),r.ensureSingle(O,"g",y.cbfills),r.ensureSingle(O,"g",y.cblines),r.ensureSingle(O,"g",y.cbaxis,function(N){N.classed(y.crisp,!0)}),r.ensureSingle(O,"g",y.cbtitleunshift,function(N){N.append("g").classed(y.cbtitle,!0)}),r.ensureSingle(O,"rect",y.cboutline);var I=u(O,B,L);I&&I.then&&(L._promises||[]).push(I),L._context.edits.colorbarPosition&&m(O,B,L)}),F.exit().each(function(B){A.autoMargin(L,B._id)}).remove(),F.order()}function p(L){var z=L._fullLayout,F=L.calcdata,B=[],O,I,N,U;function W(j){return a(j,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function Q(){typeof U.calc=="function"?U.calc(L,N,O):(O._fillgradient=I.reversescale?g(I.colorscale):I.colorscale,O._zrange=[I[U.min],I[U.max]])}for(var ue=0;ue<F.length;ue++){var le=F[ue];if(N=le[0].trace,!!N._module){var he=N._module.colorbar;if(N.visible===!0&&he)for(var G=Array.isArray(he),$=G?he:[he],J=0;J<$.length;J++){U=$[J];var X=U.container;I=X?N[X]:N,I&&I.showscale&&(O=W(I.colorbar),O._id="cb"+N.uid+(G&&X?"-"+X:""),O._traceIndex=N.index,O._propPrefix=(X?X+".":"")+"colorbar.",O._meta=N._meta,Q(),B.push(O))}}}for(var oe in z._colorAxes)if(I=z[oe],I.showscale){var ie=z._colorAxes[oe];O=W(I.colorbar),O._id="cb"+oe,O._propPrefix=oe+".colorbar.",O._meta=z._meta,U={min:"cmin",max:"cmax"},ie[0]!=="heatmap"&&(N=ie[1],U.calc=N._module.colorbar.calc),Q(),B.push(O)}return B}function u(L,z,F){var B=z.orientation==="v",O=z.len,I=z.lenmode,N=z.thickness,U=z.thicknessmode,W=z.outlinewidth,Q=z.borderwidth,ue=z.bgcolor,le=z.xanchor,he=z.yanchor,G=z.xpad,$=z.ypad,J=z.x,X=B?z.y:1-z.y,oe=z.yref==="paper",ie=z.xref==="paper",j=F._fullLayout,ee=j._size,re=z._fillcolor,ce=z._line,be=z.title,Ae=be.side,ze=z._zrange||d.extent((typeof re=="function"?re:ce.color).domain()),Re=typeof ce.color=="function"?ce.color:function(){return ce.color},Xe=typeof re=="function"?re:function(){return re},it=z._levels,ot=h(F,z,ze),tt=ot.fill,lt=ot.line,Ee=Math.round(N*(U==="fraction"?B?ee.w:ee.h:1)),_e=Ee/(B?ee.w:ee.h),fe=Math.round(O*(I==="fraction"?B?ee.h:ee.w:1)),Fe=fe/(B?ee.h:ee.w),rt=ie?ee.w:F._fullLayout.width,st=oe?ee.h:F._fullLayout.height,Qe=Math.round(B?J*rt+G:X*st+$),Lt={center:.5,right:1}[le]||0,kt={top:1,middle:.5}[he]||0,Vt=B?J-Lt*_e:X-kt*_e,Zt=B?X-kt*Fe:J-Lt*Fe,Sr=Math.round(B?st*(1-Zt):rt*Zt);z._lenFrac=Fe,z._thickFrac=_e,z._uFrac=Vt,z._vFrac=Zt;var xr=z._axis=P(F,z,ze);xr.position=_e+(B?J+G/ee.w:X+$/ee.h);var jr=["top","bottom"].indexOf(Ae)!==-1;if(B&&jr&&(xr.title.side=Ae,xr.titlex=J+G/ee.w,xr.titley=Zt+(be.side==="top"?Fe-$/ee.h:$/ee.h)),!B&&!jr&&(xr.title.side=Ae,xr.titley=X+$/ee.h,xr.titlex=Zt+G/ee.w),ce.color&&z.tickmode==="auto"){xr.tickmode="linear",xr.tick0=it.start;var wr=it.size,Ir=r.constrain(fe/50,4,15)+1,bt=(ze[1]-ze[0])/((z.nticks||Ir)*wr);if(bt>1){var Be=Math.pow(10,Math.floor(Math.log(bt)/Math.LN10));wr*=Be*r.roundUp(bt/Be,[2,5,10]),(Math.abs(it.start)/it.size+1e-6)%1<2e-6&&(xr.tick0=0)}xr.dtick=wr}xr.domain=B?[Zt+$/ee.h,Zt+Fe-$/ee.h]:[Zt+G/ee.w,Zt+Fe-G/ee.w],xr.setScale(),L.attr("transform",o(Math.round(ee.l),Math.round(ee.t)));var Ke=L.select("."+y.cbtitleunshift).attr("transform",o(-Math.round(ee.l),-Math.round(ee.t))),Ue=xr.ticklabelposition,Me=xr.title.font.size,qe=L.select("."+y.cbaxis),Ce,Te=0,Pe=0;function at(rr,Qt){var Tr={propContainer:xr,propName:z._propPrefix+"title",traceIndex:z._traceIndex,_meta:z._meta,placeholder:j._dfltTitle.colorbar,containerGroup:L.select("."+y.cbtitle)},la=rr.charAt(0)==="h"?rr.substr(1):"h"+rr;L.selectAll("."+la+",."+la+"-math-group").remove(),c.draw(F,rr,a(Tr,Qt||{}))}function yt(){if(B&&jr||!B&&!jr){var rr,Qt;Ae==="top"&&(rr=G+ee.l+rt*J,Qt=$+ee.t+st*(1-Zt-Fe)+3+Me*.75),Ae==="bottom"&&(rr=G+ee.l+rt*J,Qt=$+ee.t+st*(1-Zt)-3-Me*.25),Ae==="right"&&(Qt=$+ee.t+st*X+3+Me*.75,rr=G+ee.l+rt*Zt),at(xr._id+"title",{attributes:{x:rr,y:Qt,"text-anchor":B?"start":"middle"}})}}function Tt(){if(B&&!jr||!B&&jr){var rr=xr.position||0,Qt=xr._offset+xr._length/2,Tr,la;if(Ae==="right")la=Qt,Tr=ee.l+rt*rr+10+Me*(xr.showticklabels?1:.5);else if(Tr=Qt,Ae==="bottom"&&(la=ee.t+st*rr+10+(Ue.indexOf("inside")===-1?xr.tickfont.size:0)+(xr.ticks!=="inside"&&z.ticklen||0)),Ae==="top"){var Ua=be.text.split("<br>").length;la=ee.t+st*rr+10-Ee-w*Me*Ua}at((B?"h":"v")+xr._id+"title",{avoid:{selection:d.select(F).selectAll("g."+xr._id+"tick"),side:Ae,offsetTop:B?0:ee.t,offsetLeft:B?ee.l:0,maxShift:B?j.width:j.height},attributes:{x:Tr,y:la,"text-anchor":"middle"},transform:{rotate:B?-90:0,offset:0}})}}function Ot(){if(!B&&!jr||B&&jr){var rr=L.select("."+y.cbtitle),Qt=rr.select("text"),Tr=[-W/2,W/2],la=rr.select(".h"+xr._id+"title-math-group").node(),Ua=15.6;Qt.node()&&(Ua=parseInt(Qt.node().style.fontSize,10)*w);var Ba;if(la?(Ba=n.bBox(la),Pe=Ba.width,Te=Ba.height,Te>Ua&&(Tr[1]-=(Te-Ua)/2)):Qt.node()&&!Qt.classed(y.jsPlaceholder)&&(Ba=n.bBox(Qt.node()),Pe=Ba.width,Te=Ba.height),B){if(Te){if(Te+=5,Ae==="top")xr.domain[1]-=Te/ee.h,Tr[1]*=-1;else{xr.domain[0]+=Te/ee.h;var Ra=f.lineCount(Qt);Tr[1]+=(1-Ra)*Ua}rr.attr("transform",o(Tr[0],Tr[1])),xr.setScale()}}else Pe&&(Ae==="right"&&(xr.domain[0]+=(Pe+Me/2)/ee.w),rr.attr("transform",o(Tr[0],Tr[1])),xr.setScale())}L.selectAll("."+y.cbfills+",."+y.cblines).attr("transform",B?o(0,Math.round(ee.h*(1-xr.domain[1]))):o(Math.round(ee.w*xr.domain[0]),0)),qe.attr("transform",B?o(0,Math.round(-ee.t)):o(Math.round(-ee.l),0));var ei=L.select("."+y.cbfills).selectAll("rect."+y.cbfill).attr("style","").data(tt);ei.enter().append("rect").classed(y.cbfill,!0).attr("style",""),ei.exit().remove();var za=ze.map(xr.c2p).map(Math.round).sort(function(Kt,Wt){return Kt-Wt});ei.each(function(Kt,Wt){var Pr=[Wt===0?ze[0]:(tt[Wt]+tt[Wt-1])/2,Wt===tt.length-1?ze[1]:(tt[Wt]+tt[Wt+1])/2].map(xr.c2p).map(Math.round);B&&(Pr[1]=r.constrain(Pr[1]+(Pr[1]>Pr[0])?1:-1,za[0],za[1]));var ta=d.select(this).attr(B?"x":"y",Qe).attr(B?"y":"x",d.min(Pr)).attr(B?"width":"height",Math.max(Ee,2)).attr(B?"height":"width",Math.max(d.max(Pr)-d.min(Pr),2));if(z._fillgradient)n.gradient(ta,F,z._id,B?"vertical":"horizontalreversed",z._fillgradient,"fill");else{var ma=Xe(Kt).replace("e-","");ta.attr("fill",x(ma).toHexString())}});var ti=L.select("."+y.cblines).selectAll("path."+y.cbline).data(ce.color&&ce.width?lt:[]);ti.enter().append("path").classed(y.cbline,!0),ti.exit().remove(),ti.each(function(Kt){var Wt=Qe,Pr=Math.round(xr.c2p(Kt))+ce.width/2%1;d.select(this).attr("d","M"+(B?Wt+","+Pr:Pr+","+Wt)+(B?"h":"v")+Ee).call(n.lineGroupStyle,ce.width,Re(Kt),ce.dash)}),qe.selectAll("g."+xr._id+"tick,path").remove();var Ci=Qe+Ee+(W||0)/2-(z.ticks==="outside"?1:0),Jt=e.calcTicks(xr),Nt=e.getTickSigns(xr)[2];return e.drawTicks(F,xr,{vals:xr.ticks==="inside"?e.clipEnds(xr,Jt):Jt,layer:qe,path:e.makeTickPath(xr,Ci,Nt),transFn:e.makeTransTickFn(xr)}),e.drawLabels(F,xr,{vals:Jt,layer:qe,transFn:e.makeTransTickLabelFn(xr),labelFns:e.makeLabelFns(xr,Ci)})}function Gt(){var rr,Qt=Ee+W/2;Ue.indexOf("inside")===-1&&(rr=n.bBox(qe.node()),Qt+=B?rr.width:rr.height),Ce=Ke.select("text");var Tr=0,la=B&&Ae==="top",Ua=!B&&Ae==="right",Ba=0;if(Ce.node()&&!Ce.classed(y.jsPlaceholder)){var Ra,ei=Ke.select(".h"+xr._id+"title-math-group").node();ei&&(B&&jr||!B&&!jr)?(rr=n.bBox(ei),Tr=rr.width,Ra=rr.height):(rr=n.bBox(Ke.node()),Tr=rr.right-ee.l-(B?Qe:Sr),Ra=rr.bottom-ee.t-(B?Sr:Qe),!B&&Ae==="top"&&(Qt+=rr.height,Ba=rr.height)),Ua&&(Ce.attr("transform",o(Tr/2+Me/2,0)),Tr*=2),Qt=Math.max(Qt,B?Tr:Ra)}var za=(B?G:$)*2+Qt+Q+W/2,ti=0;!B&&be.text&&he==="bottom"&&X<=0&&(ti=za/2,za+=ti,Ba+=ti),j._hColorbarMoveTitle=ti,j._hColorbarMoveCBTitle=Ba;var Ci=Q+W,Jt=(B?Qe:Sr)-Ci/2-(B?G:0),Nt=(B?Sr:Qe)-(B?fe:$+Ba-ti);L.select("."+y.cbbg).attr("x",Jt).attr("y",Nt).attr(B?"width":"height",Math.max(za-ti,2)).attr(B?"height":"width",Math.max(fe+Ci,2)).call(s.fill,ue).call(s.stroke,z.bordercolor).style("stroke-width",Q);var Kt=Ua?Math.max(Tr-10,0):0;L.selectAll("."+y.cboutline).attr("x",(B?Qe:Sr+G)+Kt).attr("y",(B?Sr+$-fe:Qe)+(la?Te:0)).attr(B?"width":"height",Math.max(Ee,2)).attr(B?"height":"width",Math.max(fe-(B?2*$+Te:2*G+Kt),2)).call(s.stroke,z.outlinecolor).style({fill:"none","stroke-width":W});var Wt=B?Lt*za:0,Pr=B?0:(1-kt)*za-Ba;if(Wt=ie?ee.l-Wt:-Wt,Pr=oe?ee.t-Pr:-Pr,L.attr("transform",o(Wt,Pr)),!B&&(Q||x(ue).getAlpha()&&!x.equals(j.paper_bgcolor,ue))){var ta=qe.selectAll("text"),ma=ta[0].length,ra=L.select("."+y.cbbg).node(),Ia=n.bBox(ra),Ha=n.getTranslate(L),$a=2;ta.each(function(Kr,Ur){var aa=0,da=ma-1;if(Ur===aa||Ur===da){var fa=n.bBox(this),It=n.getTranslate(this),dr;if(Ur===da){var kr=fa.right+It.x,ia=Ia.right+Ha.x+Sr-Q-$a+J;dr=ia-kr,dr>0&&(dr=0)}else if(Ur===aa){var Ca=fa.left+It.x,Fa=Ia.left+Ha.x+Sr+Q+$a;dr=Fa-Ca,dr<0&&(dr=0)}dr&&(ma<3?this.setAttribute("transform","translate("+dr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ai={},mi=S[le],xt=E[le],ct=S[he],Nr=E[he],Or=za-Ee;B?(I==="pixels"?(ai.y=X,ai.t=fe*ct,ai.b=fe*Nr):(ai.t=ai.b=0,ai.yt=X+O*ct,ai.yb=X-O*Nr),U==="pixels"?(ai.x=J,ai.l=za*mi,ai.r=za*xt):(ai.l=Or*mi,ai.r=Or*xt,ai.xl=J-N*mi,ai.xr=J+N*xt)):(I==="pixels"?(ai.x=J,ai.l=fe*mi,ai.r=fe*xt):(ai.l=ai.r=0,ai.xl=J+O*mi,ai.xr=J-O*xt),U==="pixels"?(ai.y=1-X,ai.t=za*ct,ai.b=za*Nr):(ai.t=Or*ct,ai.b=Or*Nr,ai.yt=X-N*ct,ai.yb=X+N*Nr));var Rr=z.y<.5?"b":"t",Lr=z.x<.5?"l":"r";F._fullLayout._reservedMargin[z._id]={};var Gr={r:j.width-Jt-Wt,l:Jt+ai.r,b:j.height-Nt-Pr,t:Nt+ai.b};ie&&oe?A.autoMargin(F,z._id,ai):ie?F._fullLayout._reservedMargin[z._id][Rr]=Gr[Rr]:oe||B?F._fullLayout._reservedMargin[z._id][Lr]=Gr[Lr]:F._fullLayout._reservedMargin[z._id][Rr]=Gr[Rr]}return r.syncOrAsync([A.previousPromises,yt,Ot,Tt,A.previousPromises,Gt],F)}function m(L,z,F){var B=z.orientation==="v",O=F._fullLayout,I=O._size,N,U,W;t.init({element:L.node(),gd:F,prepFn:function(){N=L.attr("transform"),i(L)},moveFn:function(Q,ue){L.attr("transform",N+o(Q,ue)),U=t.align((B?z._uFrac:z._vFrac)+Q/I.w,B?z._thickFrac:z._lenFrac,0,1,z.xanchor),W=t.align((B?z._vFrac:1-z._uFrac)-ue/I.h,B?z._lenFrac:z._thickFrac,0,1,z.yanchor);var le=t.getCursor(U,W,z.xanchor,z.yanchor);i(L,le)},doneFn:function(){if(i(L),U!==void 0&&W!==void 0){var Q={};Q[z._propPrefix+"x"]=U,Q[z._propPrefix+"y"]=W,z._traceIndex!==void 0?M.call("_guiRestyle",F,Q,z._traceIndex):M.call("_guiRelayout",F,Q)}}})}function h(L,z,F){var B=z._levels,O=[],I=[],N,U,W=B.end+B.size/100,Q=B.size,ue=1.001*F[0]-.001*F[1],le=1.001*F[1]-.001*F[0];for(U=0;U<1e5&&(N=B.start+U*Q,!(Q>0?N>=W:N<=W));U++)N>ue&&N<le&&O.push(N);if(z._fillgradient)I=[0];else if(typeof z._fillcolor=="function"){var he=z._filllevels;if(he)for(W=he.end+he.size/100,Q=he.size,U=0;U<1e5&&(N=he.start+U*Q,!(Q>0?N>=W:N<=W));U++)N>F[0]&&N<F[1]&&I.push(N);else I=O.map(function(G){return G-B.size/2}),I.push(I[I.length-1]+B.size)}else z._fillcolor&&typeof z._fillcolor=="string"&&(I=[0]);return B.size<0&&(O.reverse(),I.reverse()),{line:O,fill:I}}function P(L,z,F){var B=L._fullLayout,O=z.orientation==="v",I={type:"linear",range:F,tickmode:z.tickmode,nticks:z.nticks,tick0:z.tick0,dtick:z.dtick,tickvals:z.tickvals,ticktext:z.ticktext,ticks:z.ticks,ticklen:z.ticklen,tickwidth:z.tickwidth,tickcolor:z.tickcolor,showticklabels:z.showticklabels,labelalias:z.labelalias,ticklabelposition:z.ticklabelposition,ticklabeloverflow:z.ticklabeloverflow,ticklabelstep:z.ticklabelstep,tickfont:z.tickfont,tickangle:z.tickangle,tickformat:z.tickformat,exponentformat:z.exponentformat,minexponent:z.minexponent,separatethousands:z.separatethousands,showexponent:z.showexponent,showtickprefix:z.showtickprefix,tickprefix:z.tickprefix,showticksuffix:z.showticksuffix,ticksuffix:z.ticksuffix,title:z.title,showline:!0,anchor:"free",side:O?"right":"bottom",position:1},N=O?"y":"x",U={type:"linear",_id:N+z._id},W={letter:N,font:B.font,noAutotickangles:N==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:B.calendar};function Q(ue,le){return r.coerce(I,U,l,ue,le)}return v(I,U,Q,W,B),T(I,U,Q,W),U}q.exports={draw:b}}}),N9=Ze({"src/components/colorbar/index.js"(Z,q){"use strict";q.exports={moduleType:"component",name:"colorbar",attributes:_2(),supplyDefaults:c5(),draw:B9().draw,hasColorbar:s5()}}}),U9=Ze({"src/components/legend/index.js"(Z,q){"use strict";q.exports={moduleType:"component",name:"legend",layoutAttributes:p5(),supplyLayoutDefaults:d5(),draw:g5(),style:m5()}}}),j9=Ze({"src/locale-en.js"(Z,q){"use strict";q.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"}}}}),q9=Ze({"src/locale-en-us.js"(Z,q){"use strict";q.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),Y5=Ze({"src/snapshot/cloneplot.js"(Z,q){"use strict";var d=oo(),x=ca(),A=x.extendFlat,M=x.extendDeep;function e(r){var o;switch(r){case"themes__thumb":o={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":o={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:o={}}return o}function t(r){var o=["xaxis","yaxis","zaxis"];return o.indexOf(r.slice(0,5))>-1}q.exports=function(o,a){var i,n=o.data,s=o.layout,c=M([],n),f=M({},s,e(a.tileClass)),g=o._context||{};if(a.width&&(f.width=a.width),a.height&&(f.height=a.height),a.tileClass==="thumbnail"||a.tileClass==="themes__thumb"){f.annotations=[];var v=Object.keys(f);for(i=0;i<v.length;i++)t(v[i])&&(f[v[i]].title={text:""});for(i=0;i<c.length;i++){var T=c[i];T.showscale=!1,T.marker&&(T.marker.showscale=!1),d.traceIs(T,"pie-like")&&(T.textposition="none")}}if(Array.isArray(a.annotations))for(i=0;i<a.annotations.length;i++)f.annotations.push(a.annotations[i]);var l=Object.keys(f).filter(function(y){return y.match(/^scene\d*$/)});if(l.length){var _={};for(a.tileClass==="thumbnail"&&(_={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),i=0;i<l.length;i++){var w=f[l[i]];w.xaxis||(w.xaxis={}),w.yaxis||(w.yaxis={}),w.zaxis||(w.zaxis={}),A(w.xaxis,_),A(w.yaxis,_),A(w.zaxis,_),w._scene=null}}var S=document.createElement("div");a.tileClass&&(S.className=a.tileClass);var E={gd:S,td:S,layout:f,data:c,config:{staticPlot:a.staticPlot===void 0?!0:a.staticPlot,plotGlPixelRatio:a.plotGlPixelRatio===void 0?2:a.plotGlPixelRatio,displaylogo:a.displaylogo||!1,showLink:a.showLink||!1,showTips:a.showTips||!1,mapboxAccessToken:g.mapboxAccessToken}};return a.setBackground!=="transparent"&&(E.config.setBackground=a.setBackground||"opaque"),E.gd.defaultLayout=e(a.tileClass),E}}}),V9=Ze({"src/snapshot/toimage.js"(Z,q){"use strict";var d=W0().EventEmitter,x=oo(),A=ca(),M=Zv(),e=Y5(),t=k2(),r=L2();function o(a,i){var n=new d,s=e(a,{format:"png"}),c=s.gd;c.style.position="absolute",c.style.left="-5000px",document.body.appendChild(c);function f(){var v=M.getDelay(c._fullLayout);setTimeout(function(){var T=t(c),l=document.createElement("canvas");l.id=A.randstr(),n=r({format:i.format,width:c._fullLayout.width,height:c._fullLayout.height,canvas:l,emitter:n,svg:T}),n.clean=function(){c&&document.body.removeChild(c)}},v)}var g=M.getRedrawFunc(c);return x.call("_doPlot",c,s.data,s.layout,s.config).then(g).then(f).catch(function(v){n.emit("error",v)}),n}q.exports=o}}),G9=Ze({"src/snapshot/index.js"(Z,q){"use strict";var d=Zv(),x={getDelay:d.getDelay,getRedrawFunc:d.getRedrawFunc,clone:Y5(),toSVG:k2(),svgToImg:L2(),toImage:V9(),downloadImage:R5()};q.exports=x}}),H9=Ze({"src/core.js"(Z){"use strict";Z.version=Eh().version,Up(),tz();var q=oo(),d=Z.register=q.register,x=qz(),A=Object.keys(x);for(e=0;e<A.length;e++)M=A[e],M.charAt(0)!=="_"&&(Z[M]=x[M]),d({moduleType:"apiMethod",name:M,fn:x[M]});var M,e;d(Jz()),d([a9(),s9(),Tf(),f9(),v9(),_9(),w9(),E9(),P9(),W5(),F9(),rc(),N9(),U9(),ef(),S5()]),d([j9(),q9()]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(d(window.PlotlyLocales),delete window.PlotlyLocales),Z.Icons=w2();var t=ef(),r=xc();Z.Plots={resize:r.resize,graphJson:r.graphJson,sendDataToCloud:r.sendDataToCloud},Z.Fx={hover:t.hover,unhover:t.unhover,loneHover:t.loneHover,loneUnhover:t.loneUnhover},Z.Snapshot=G9(),Z.PlotSchema=e1()}}),W9=Ze({"lib/core.js"(Z,q){"use strict";q.exports=H9()}}),Q0=Ze({"src/traces/bar/constants.js"(Z,q){"use strict";q.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}}),Sv=Ze({"src/traces/bar/attributes.js"(Z,q){"use strict";var d=tf(),x=Qc().axisHoverFormat,A=Cs().hovertemplateAttrs,M=Cs().texttemplateAttrs,e=Mu(),t=tc(),r=Q0(),o=Gh().pattern,a=rs().extendFlat,i=t({editType:"calc",arrayOk:!0,colorEditType:"style"}),n=d.marker,s=n.line,c=a({},s.width,{dflt:0}),f=a({width:c,editType:"calc"},e("marker.line")),g=a({line:f,editType:"calc"},e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:o,cornerradius:{valType:"any",editType:"calc"}});q.exports={x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),text:d.text,texttemplate:M({editType:"plot"},{keys:r.eventDataKeys}),hovertext:d.hovertext,hovertemplate:A({},{keys:r.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:a({},i,{}),insidetextfont:a({},i,{}),outsidetextfont:a({},i,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:a({},d.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:g,offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:{marker:{opacity:d.selected.marker.opacity,color:d.selected.marker.color,editType:"style"},textfont:d.selected.textfont,editType:"style"},unselected:{marker:{opacity:d.unselected.marker.opacity,color:d.unselected.marker.color,editType:"style"},textfont:d.unselected.textfont,editType:"style"},zorder:d.zorder}}}),U2=Ze({"src/traces/bar/layout_attributes.js"(Z,q){"use strict";q.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"}}}}),j2=Ze({"src/traces/bar/style_defaults.js"(Z,q){"use strict";var d=Yn(),x=bp().hasColorscale,A=gh(),M=ca().coercePattern;q.exports=function(t,r,o,a,i){var n=o("marker.color",a),s=x(t,"marker");s&&A(t,r,i,o,{prefix:"marker.",cLetter:"c"}),o("marker.line.color",d.defaultLine),x(t,"marker.line")&&A(t,r,i,o,{prefix:"marker.line.",cLetter:"c"}),o("marker.line.width"),o("marker.opacity"),M(o,"marker.pattern",n,s),o("selected.marker.color"),o("unselected.marker.color")}}}),gd=Ze({"src/traces/bar/defaults.js"(Z,q){"use strict";var d=ns(),x=ca(),A=Yn(),M=oo(),e=n1(),t=Qd(),r=j2(),o=J0(),a=Sv(),i=x.coerceFont;function n(g,v,T,l){function _(b,p){return x.coerce(g,v,a,b,p)}var w=e(g,v,l,_);if(!w){v.visible=!1;return}t(g,v,l,_),_("xhoverformat"),_("yhoverformat"),_("zorder"),_("orientation",v.x&&!v.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate");var S=_("textposition");f(g,v,l,_,S,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r(g,v,_,T,l);var E=(v.marker.line||{}).color,y=M.getComponentMethod("errorbars","supplyDefaults");y(g,v,E||A.defaultLine,{axis:"y"}),y(g,v,E||A.defaultLine,{axis:"x",inherit:"y"}),x.coerceSelectionMarkerOpacity(v,_)}function s(g,v){var T,l;function _(E,y){return x.coerce(l._input,l,a,E,y)}for(var w=0;w<g.length;w++)if(l=g[w],l.type==="bar"){T=l._input;var S=_("marker.cornerradius",v.barcornerradius);l.marker&&(l.marker.cornerradius=c(S)),o(T,l,v,_,v.barmode)}}function c(g){if(d(g)){if(g=+g,g>=0)return g}else if(typeof g=="string"&&(g=g.trim(),g.slice(-1)==="%"&&d(g.slice(0,-1))&&(g=+g.slice(0,-1),g>=0)))return g+"%"}function f(g,v,T,l,_,w){w=w||{};var S=w.moduleHasSelected!==!1,E=w.moduleHasUnselected!==!1,y=w.moduleHasConstrain!==!1,b=w.moduleHasCliponaxis!==!1,p=w.moduleHasTextangle!==!1,u=w.moduleHasInsideanchor!==!1,m=!!w.hasPathbar,h=Array.isArray(_)||_==="auto",P=h||_==="inside",L=h||_==="outside";if(P||L){var z=i(l,"textfont",T.font),F=x.extendFlat({},z),B=g.textfont&&g.textfont.color,O=!B;if(O&&delete F.color,i(l,"insidetextfont",F),m){var I=x.extendFlat({},z);O&&delete I.color,i(l,"pathbar.textfont",I)}L&&i(l,"outsidetextfont",z),S&&l("selected.textfont.color"),E&&l("unselected.textfont.color"),y&&l("constraintext"),b&&l("cliponaxis"),p&&l("textangle"),l("texttemplate")}P&&u&&l("insidetextanchor")}q.exports={supplyDefaults:n,crossTraceDefaults:s,handleText:f,validateCornerradius:c}}}),K5=Ze({"src/traces/bar/layout_defaults.js"(Z,q){"use strict";var d=oo(),x=Wo(),A=ca(),M=U2(),e=gd().validateCornerradius;q.exports=function(t,r,o){function a(S,E){return A.coerce(t,r,M,S,E)}for(var i=!1,n=!1,s=!1,c={},f=a("barmode"),g=f==="group",v=0;v<o.length;v++){var T=o[v];if(d.traceIs(T,"bar")&&T.visible)i=!0;else continue;var l=T.xaxis+T.yaxis;if(g?(c[l]&&(s=!0),c[l]=!0):(l+=T._input.offsetgroup,c.length>0&&!c[l]&&(s=!0),c[l]=!0),T.visible&&T.type==="histogram"){var _=x.getFromId({_fullLayout:r},T[T.orientation==="v"?"xaxis":"yaxis"]);_.type!=="category"&&(n=!0)}}if(!i){delete r.barmode;return}f!=="overlay"&&a("barnorm"),a("bargap",n&&!s?0:.2),a("bargroupgap");var w=a("barcornerradius");r.barcornerradius=e(w)}}}),O_=Ze({"src/traces/bar/arrays_to_calcdata.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){for(var e=0;e<A.length;e++)A[e].i=e;d.mergeArray(M.text,A,"tx"),d.mergeArray(M.hovertext,A,"htx");var t=M.marker;if(t){d.mergeArray(t.opacity,A,"mo",!0),d.mergeArray(t.color,A,"mc");var r=t.line;r&&(d.mergeArray(r.color,A,"mlc"),d.mergeArrayCastPositive(r.width,A,"mlw"))}}}}),X9=Ze({"src/traces/bar/calc.js"(Z,q){"use strict";var d=Wo(),x=tv(),A=bp().hasColorscale,M=wp(),e=O_(),t=Od();q.exports=function(o,a){var i=d.getFromId(o,a.xaxis||"x"),n=d.getFromId(o,a.yaxis||"y"),s,c,f,g,v,T,l={msUTC:!!(a.base||a.base===0)};a.orientation==="h"?(s=i.makeCalcdata(a,"x",l),f=n.makeCalcdata(a,"y"),g=x(a,n,"y",f),v=!!a.yperiodalignment,T="y"):(s=n.makeCalcdata(a,"y",l),f=i.makeCalcdata(a,"x"),g=x(a,i,"x",f),v=!!a.xperiodalignment,T="x"),c=g.vals;for(var _=Math.min(c.length,s.length),w=new Array(_),S=0;S<_;S++)w[S]={p:c[S],s:s[S]},v&&(w[S].orig_p=f[S],w[S][T+"End"]=g.ends[S],w[S][T+"Start"]=g.starts[S]),a.ids&&(w[S].id=String(a.ids[S]));return A(a,"marker")&&M(o,a,{vals:a.marker.color,containerStr:"marker",cLetter:"c"}),A(a,"marker.line")&&M(o,a,{vals:a.marker.line.color,containerStr:"marker.line",cLetter:"c"}),e(w,a),t(w,a),w}}}),Ap=Ze({"src/traces/bar/uniform_text.js"(Z,q){"use strict";var d=On(),x=ca();function A(r,o,a){var i=r._fullLayout,n=i["_"+a+"Text_minsize"];if(n){var s=i.uniformtext.mode==="hide",c;switch(a){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}o.selectAll(c).each(function(f){var g=f.transform;if(g){g.scale=s&&g.hide?0:n/g.fontSize;var v=d.select(this).select("text");x.setTransormAndDisplay(v,g)}})}}function M(r,o,a){if(a.uniformtext.mode){var i=t(r),n=a.uniformtext.minsize,s=o.scale*o.fontSize;o.hide=s<n,a[i]=a[i]||1/0,o.hide||(a[i]=Math.min(a[i],Math.max(s,n)))}}function e(r,o){var a=t(r);o[a]=void 0}function t(r){return"_"+r+"Text_minsize"}q.exports={recordMinTextSize:M,clearMinTextSize:e,resizeText:A}}}),q2=Ze({"src/traces/bar/helpers.js"(Z){"use strict";var q=ns(),d=Ch(),x=ca().isArrayOrTypedArray;Z.coerceString=function(A,M,e){if(typeof M=="string"){if(M||!A.noBlank)return M}else if((typeof M=="number"||M===!0)&&!A.strict)return String(M);return e!==void 0?e:A.dflt},Z.coerceNumber=function(A,M,e){if(q(M)){M=+M;var t=A.min,r=A.max,o=t!==void 0&&M<t||r!==void 0&&M>r;if(!o)return M}return e!==void 0?e:A.dflt},Z.coerceColor=function(A,M,e){return d(M).isValid()?M:e!==void 0?e:A.dflt},Z.coerceEnumerated=function(A,M,e){return A.coerceNumber&&(M=+M),A.values.indexOf(M)!==-1?M:e!==void 0?e:A.dflt},Z.getValue=function(A,M){var e;return x(A)?M<A.length&&(e=A[M]):e=A,e},Z.getLineWidth=function(A,M){var e=0<M.mlw?M.mlw:x(A.marker.line.width)?0:A.marker.line.width;return e}}}),Nd=Ze({"src/traces/bar/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=as(),M=ca(),e=oo(),t=Ap().resizeText,r=Sv(),o=r.textfont,a=r.insidetextfont,i=r.outsidetextfont,n=q2();function s(b){var p=d.select(b).selectAll('g[class^="barlayer"]').selectAll("g.trace");t(b,p,"bar");var u=p.size(),m=b._fullLayout;p.style("opacity",function(h){return h[0].trace.opacity}).each(function(h){(m.barmode==="stack"&&u>1||m.bargap===0&&m.bargroupgap===0&&!h[0].trace.marker.line.width)&&d.select(this).attr("shape-rendering","crispEdges")}),p.selectAll("g.points").each(function(h){var P=d.select(this),L=h[0].trace;c(P,L,b)}),e.getComponentMethod("errorbars","style")(p)}function c(b,p,u){A.pointStyle(b.selectAll("path"),p,u),f(b,p,u)}function f(b,p,u){b.selectAll("text").each(function(m){var h=d.select(this),P=M.ensureUniformFontSize(u,l(h,m,p,u));A.font(h,P)})}function g(b,p,u){var m=p[0].trace;m.selectedpoints?v(u,m,b):(c(u,m,b),e.getComponentMethod("errorbars","style")(u))}function v(b,p,u){A.selectedPointStyle(b.selectAll("path"),p),T(b.selectAll("text"),p,u)}function T(b,p,u){b.each(function(m){var h=d.select(this),P;if(m.selected){P=M.ensureUniformFontSize(u,l(h,m,p,u));var L=p.selected.textfont&&p.selected.textfont.color;L&&(P.color=L),A.font(h,P)}else A.selectedTextStyle(h,p)})}function l(b,p,u,m){var h=m._fullLayout.font,P=u.textfont;if(b.classed("bartext-inside")){var L=y(p,u);P=w(u,p.i,h,L)}else b.classed("bartext-outside")&&(P=S(u,p.i,h));return P}function _(b,p,u){return E(o,b.textfont,p,u)}function w(b,p,u,m){var h=_(b,p,u),P=b._input.textfont===void 0||b._input.textfont.color===void 0||Array.isArray(b.textfont.color)&&b.textfont.color[p]===void 0;return P&&(h={color:x.contrast(m),family:h.family,size:h.size,weight:h.weight,style:h.style,variant:h.variant,textcase:h.textcase,lineposition:h.lineposition,shadow:h.shadow}),E(a,b.insidetextfont,p,h)}function S(b,p,u){var m=_(b,p,u);return E(i,b.outsidetextfont,p,m)}function E(b,p,u,m){p=p||{};var h=n.getValue(p.family,u),P=n.getValue(p.size,u),L=n.getValue(p.color,u),z=n.getValue(p.weight,u),F=n.getValue(p.style,u),B=n.getValue(p.variant,u),O=n.getValue(p.textcase,u),I=n.getValue(p.lineposition,u),N=n.getValue(p.shadow,u);return{family:n.coerceString(b.family,h,m.family),size:n.coerceNumber(b.size,P,m.size),color:n.coerceColor(b.color,L,m.color),weight:n.coerceString(b.weight,z,m.weight),style:n.coerceString(b.style,F,m.style),variant:n.coerceString(b.variant,B,m.variant),textcase:n.coerceString(b.variant,O,m.textcase),lineposition:n.coerceString(b.variant,I,m.lineposition),shadow:n.coerceString(b.variant,N,m.shadow)}}function y(b,p){return p.type==="waterfall"?p[b.dir].marker.color:b.mcc||b.mc||p.marker.color}q.exports={style:s,styleTextPoints:f,styleOnSelect:g,getInsideTextFont:w,getOutsideTextFont:S,getBarColor:y,resizeText:t}}}),eg=Ze({"src/traces/bar/plot.js"(Z,q){"use strict";var d=On(),x=ns(),A=ca(),M=fu(),e=Yn(),t=as(),r=oo(),o=Wo().tickText,a=Ap(),i=a.recordMinTextSize,n=a.clearMinTextSize,s=Nd(),c=q2(),f=Q0(),g=Sv(),v=g.text,T=g.textposition,l=Qp().appendArrayPointValue,_=f.TEXTPAD;function w(Q){return Q.id}function S(Q){if(Q.ids)return w}function E(Q){return(Q>0)-(Q<0)}function y(Q,ue){return Q<ue?1:-1}function b(Q,ue,le,he){var G=[],$=[],J=he?ue:le,X=he?le:ue;return G[0]=J.c2p(Q.s0,!0),$[0]=X.c2p(Q.p0,!0),G[1]=J.c2p(Q.s1,!0),$[1]=X.c2p(Q.p1,!0),he?[G,$]:[$,G]}function p(Q,ue,le,he){if(!ue.uniformtext.mode&&u(le)){var G;return he&&(G=he()),Q.transition().duration(le.duration).ease(le.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()})}else return Q}function u(Q){return Q&&Q.duration>0}function m(Q,ue,le,he,G,$){var J=ue.xaxis,X=ue.yaxis,oe=Q._fullLayout,ie=Q._context.staticPlot;G||(G={mode:oe.barmode,norm:oe.barmode,gap:oe.bargap,groupgap:oe.bargroupgap},n("bar",oe));var j=A.makeTraceGroups(he,le,"trace bars").each(function(ee){var re=d.select(this),ce=ee[0].trace,be=ee[0].t,Ae=ce.type==="waterfall",ze=ce.type==="funnel",Re=ce.type==="histogram",Xe=ce.type==="bar",it=Xe||ze,ot=0;Ae&&ce.connector.visible&&ce.connector.mode==="between"&&(ot=ce.connector.line.width/2);var tt=ce.orientation==="h",lt=u(G),Ee=A.ensureSingle(re,"g","points"),_e=S(ce),fe=Ee.selectAll("g.point").data(A.identity,_e);fe.enter().append("g").classed("point",!0),fe.exit().remove(),fe.each(function(rt,st){var Qe=d.select(this),Lt=b(rt,J,X,tt),kt=Lt[0][0],Vt=Lt[0][1],Zt=Lt[1][0],Sr=Lt[1][1],xr=(tt?Vt-kt:Sr-Zt)===0;xr&&it&&c.getLineWidth(ce,rt)&&(xr=!1),xr||(xr=!x(kt)||!x(Vt)||!x(Zt)||!x(Sr)),rt.isBlank=xr,xr&&(tt?Vt=kt:Sr=Zt),ot&&!xr&&(tt?(kt-=y(kt,Vt)*ot,Vt+=y(kt,Vt)*ot):(Zt-=y(Zt,Sr)*ot,Sr+=y(Zt,Sr)*ot));var jr,wr;if(ce.type==="waterfall"){if(!xr){var Ir=ce[rt.dir].marker;jr=Ir.line.width,wr=Ir.color}}else jr=c.getLineWidth(ce,rt),wr=rt.mc||ce.marker.color;function bt(Ci){var Jt=d.round(jr/2%1,2);return G.gap===0&&G.groupgap===0?d.round(Math.round(Ci)-Jt,2):Ci}function Be(Ci,Jt,Nt){return Nt&&Ci===Jt?Ci:Math.abs(Ci-Jt)>=2?bt(Ci):Ci>Jt?Math.ceil(Ci):Math.floor(Ci)}var Ke=e.opacity(wr),Ue=Ke<1||jr>.01?bt:Be;Q._context.staticPlot||(kt=Ue(kt,Vt,tt),Vt=Ue(Vt,kt,tt),Zt=Ue(Zt,Sr,!tt),Sr=Ue(Sr,Zt,!tt));var Me=tt?J.c2p:X.c2p,qe;rt.s0>0?qe=rt._sMax:rt.s0<0?qe=rt._sMin:qe=rt.s1>0?rt._sMax:rt._sMin;function Ce(Ci,Jt){if(!Ci)return 0;var Nt=Math.abs(tt?Sr-Zt:Vt-kt),Kt=Math.abs(tt?Vt-kt:Sr-Zt),Wt=Ue(Math.abs(Me(qe,!0)-Me(0,!0))),Pr=rt.hasB?Math.min(Nt/2,Kt/2):Math.min(Nt/2,Wt),ta;if(Jt==="%"){var ma=Math.min(50,Ci);ta=Nt*(ma/100)}else ta=Ci;return Ue(Math.max(Math.min(ta,Pr),0))}var Te=Xe||Re?Ce(be.cornerradiusvalue,be.cornerradiusform):0,Pe,at,yt="M"+kt+","+Zt+"V"+Sr+"H"+Vt+"V"+Zt+"Z",Tt=0;if(Te&&rt.s){var Ot=E(rt.s0)===0||E(rt.s)===E(rt.s0)?rt.s1:rt.s0;if(Tt=Ue(rt.hasB?0:Math.abs(Me(qe,!0)-Me(Ot,!0))),Tt<Te){var Gt=y(kt,Vt),rr=y(Zt,Sr),Qt=Gt===-rr?1:0;if(tt)if(rt.hasB)Pe="M"+(kt+Te*Gt)+","+Zt+"A "+Te+","+Te+" 0 0 "+Qt+" "+kt+","+(Zt+Te*rr)+"V"+(Sr-Te*rr)+"A "+Te+","+Te+" 0 0 "+Qt+" "+(kt+Te*Gt)+","+Sr+"H"+(Vt-Te*Gt)+"A "+Te+","+Te+" 0 0 "+Qt+" "+Vt+","+(Sr-Te*rr)+"V"+(Zt+Te*rr)+"A "+Te+","+Te+" 0 0 "+Qt+" "+(Vt-Te*Gt)+","+Zt+"Z";else{at=Math.abs(Vt-kt)+Tt;var Tr=at<Te?Te-Math.sqrt(at*(2*Te-at)):0,la=Tt>0?Math.sqrt(Tt*(2*Te-Tt)):0,Ua=Gt>0?Math.max:Math.min;Pe="M"+kt+","+Zt+"V"+(Sr-Tr*rr)+"H"+Ua(Vt-(Te-Tt)*Gt,kt)+"A "+Te+","+Te+" 0 0 "+Qt+" "+Vt+","+(Sr-Te*rr-la)+"V"+(Zt+Te*rr+la)+"A "+Te+","+Te+" 0 0 "+Qt+" "+Ua(Vt-(Te-Tt)*Gt,kt)+","+(Zt+Tr*rr)+"Z"}else if(rt.hasB)Pe="M"+(kt+Te*Gt)+","+Zt+"A "+Te+","+Te+" 0 0 "+Qt+" "+kt+","+(Zt+Te*rr)+"V"+(Sr-Te*rr)+"A "+Te+","+Te+" 0 0 "+Qt+" "+(kt+Te*Gt)+","+Sr+"H"+(Vt-Te*Gt)+"A "+Te+","+Te+" 0 0 "+Qt+" "+Vt+","+(Sr-Te*rr)+"V"+(Zt+Te*rr)+"A "+Te+","+Te+" 0 0 "+Qt+" "+(Vt-Te*Gt)+","+Zt+"Z";else{at=Math.abs(Sr-Zt)+Tt;var Ba=at<Te?Te-Math.sqrt(at*(2*Te-at)):0,Ra=Tt>0?Math.sqrt(Tt*(2*Te-Tt)):0,ei=rr>0?Math.max:Math.min;Pe="M"+(kt+Ba*Gt)+","+Zt+"V"+ei(Sr-(Te-Tt)*rr,Zt)+"A "+Te+","+Te+" 0 0 "+Qt+" "+(kt+Te*Gt-Ra)+","+Sr+"H"+(Vt-Te*Gt+Ra)+"A "+Te+","+Te+" 0 0 "+Qt+" "+(Vt-Ba*Gt)+","+ei(Sr-(Te-Tt)*rr,Zt)+"V"+Zt+"Z"}}else Pe=yt}else Pe=yt;var za=p(A.ensureSingle(Qe,"path"),oe,G,$);if(za.style("vector-effect",ie?"none":"non-scaling-stroke").attr("d",isNaN((Vt-kt)*(Sr-Zt))||xr&&Q._context.staticPlot?"M0,0Z":Pe).call(t.setClipUrl,ue.layerClipId,Q),!oe.uniformtext.mode&&lt){var ti=t.makePointStyleFns(ce);t.singlePointStyle(rt,za,ce,ti,Q)}h(Q,ue,Qe,ee,st,kt,Vt,Zt,Sr,Te,Tt,G,$),ue.layerClipId&&t.hideOutsideRangePoint(rt,Qe.select("text"),J,X,ce.xcalendar,ce.ycalendar)});var Fe=ce.cliponaxis===!1;t.setClipUrl(re,Fe?null:ue.layerClipId,Q)});r.getComponentMethod("errorbars","plot")(Q,j,ue,G)}function h(Q,ue,le,he,G,$,J,X,oe,ie,j,ee,re){var ce=ue.xaxis,be=ue.yaxis,Ae=Q._fullLayout,ze;function Re(at,yt,Tt){var Ot=A.ensureSingle(at,"text").text(yt).attr({class:"bartext bartext-"+ze,"text-anchor":"middle","data-notex":1}).call(t.font,Tt).call(M.convertToTspans,Q);return Ot}var Xe=he[0].trace,it=Xe.orientation==="h",ot=I(Ae,he,G,ce,be);ze=N(Xe,G);var tt=ee.mode==="stack"||ee.mode==="relative",lt=he[G],Ee=!tt||lt._outmost,_e=lt.hasB,fe=ie&&ie-j>_;if(!ot||ze==="none"||(lt.isBlank||$===J||X===oe)&&(ze==="auto"||ze==="inside")){le.select("text").remove();return}var Fe=Ae.font,rt=s.getBarColor(he[G],Xe),st=s.getInsideTextFont(Xe,G,Fe,rt),Qe=s.getOutsideTextFont(Xe,G,Fe),Lt=Xe.insidetextanchor||"end",kt=le.datum();it?ce.type==="log"&&kt.s0<=0&&(ce.range[0]<ce.range[1]?$=0:$=ce._length):be.type==="log"&&kt.s0<=0&&(be.range[0]<be.range[1]?X=be._length:X=0);var Vt=Math.abs(J-$),Zt=Math.abs(oe-X),Sr=Vt-2*_,xr=Zt-2*_,jr,wr,Ir,bt,Be;if(ze==="outside"&&!Ee&&!lt.hasB&&(ze="inside"),ze==="auto")if(Ee){ze="inside",Be=A.ensureUniformFontSize(Q,st),jr=Re(le,ot,Be),wr=t.bBox(jr.node()),Ir=wr.width,bt=wr.height;var Ke=Ir>0&&bt>0,Ue;fe?_e?Ue=P(Sr-2*ie,xr,Ir,bt,it)||P(Sr,xr-2*ie,Ir,bt,it):it?Ue=P(Sr-(ie-j),xr,Ir,bt,it)||P(Sr,xr-2*(ie-j),Ir,bt,it):Ue=P(Sr,xr-(ie-j),Ir,bt,it)||P(Sr-2*(ie-j),xr,Ir,bt,it):Ue=P(Sr,xr,Ir,bt,it),Ke&&Ue?ze="inside":(ze="outside",jr.remove(),jr=null)}else ze="inside";if(!jr){Be=A.ensureUniformFontSize(Q,ze==="outside"?Qe:st),jr=Re(le,ot,Be);var Me=jr.attr("transform");if(jr.attr("transform",""),wr=t.bBox(jr.node()),Ir=wr.width,bt=wr.height,jr.attr("transform",Me),Ir<=0||bt<=0){jr.remove();return}}var qe=Xe.textangle,Ce,Te;ze==="outside"?(Te=Xe.constraintext==="both"||Xe.constraintext==="outside",Ce=O($,J,X,oe,wr,{isHorizontal:it,constrained:Te,angle:qe})):(Te=Xe.constraintext==="both"||Xe.constraintext==="inside",Ce=F($,J,X,oe,wr,{isHorizontal:it,constrained:Te,angle:qe,anchor:Lt,hasB:_e,r:ie,overhead:j})),Ce.fontSize=Be.size,i(Xe.type==="histogram"?"bar":Xe.type,Ce,Ae),lt.transform=Ce;var Pe=p(jr,Ae,ee,re);A.setTransormAndDisplay(Pe,Ce)}function P(Q,ue,le,he,G){if(Q<0||ue<0)return!1;var $=le<=Q&&he<=ue,J=le<=ue&&he<=Q,X=G?Q>=le*(ue/he):ue>=he*(Q/le);return $||J||X}function L(Q){return Q==="auto"?0:Q}function z(Q,ue){var le=Math.PI/180*ue,he=Math.abs(Math.sin(le)),G=Math.abs(Math.cos(le));return{x:Q.width*G+Q.height*he,y:Q.width*he+Q.height*G}}function F(Q,ue,le,he,G,$){var J=!!$.isHorizontal,X=!!$.constrained,oe=$.angle||0,ie=$.anchor,j=ie==="end",ee=ie==="start",re=$.leftToRight||0,ce=(re+1)/2,be=1-ce,Ae=$.hasB,ze=$.r,Re=$.overhead,Xe=G.width,it=G.height,ot=Math.abs(ue-Q),tt=Math.abs(he-le),lt=ot>2*_&&tt>2*_?_:0;ot-=2*lt,tt-=2*lt;var Ee=L(oe);oe==="auto"&&!(Xe<=ot&&it<=tt)&&(Xe>ot||it>tt)&&(!(Xe>tt||it>ot)||Xe<it!=ot<tt)&&(Ee+=90);var _e=z(G,Ee),fe,Fe;if(ze&&ze-Re>_){var rt=B(Q,ue,le,he,_e,ze,Re,J,Ae);fe=rt.scale,Fe=rt.pad}else fe=1,X&&(fe=Math.min(1,ot/_e.x,tt/_e.y)),Fe=0;var st=G.left*be+G.right*ce,Qe=(G.top+G.bottom)/2,Lt=(Q+_)*be+(ue-_)*ce,kt=(le+he)/2,Vt=0,Zt=0;if(ee||j){var Sr=(J?_e.x:_e.y)/2;ze&&(j||Ae)&&(lt+=Fe);var xr=J?y(Q,ue):y(le,he);J?ee?(Lt=Q+xr*lt,Vt=-xr*Sr):(Lt=ue-xr*lt,Vt=xr*Sr):ee?(kt=le+xr*lt,Zt=-xr*Sr):(kt=he-xr*lt,Zt=xr*Sr)}return{textX:st,textY:Qe,targetX:Lt,targetY:kt,anchorX:Vt,anchorY:Zt,scale:fe,rotate:Ee}}function B(Q,ue,le,he,G,$,J,X,oe){var ie=Math.max(0,Math.abs(ue-Q)-2*_),j=Math.max(0,Math.abs(he-le)-2*_),ee=$-_,re=J?ee-Math.sqrt(ee*ee-(ee-J)*(ee-J)):ee,ce=oe?ee*2:X?ee-J:2*re,be=oe?ee*2:X?2*re:ee-J,Ae,ze,Re,Xe,it;return G.y/G.x>=j/(ie-ce)?Xe=j/G.y:G.y/G.x<=(j-be)/ie?Xe=ie/G.x:!oe&&X?(Ae=G.x*G.x+G.y*G.y/4,ze=-2*G.x*(ie-ee)-G.y*(j/2-ee),Re=(ie-ee)*(ie-ee)+(j/2-ee)*(j/2-ee)-ee*ee,Xe=(-ze+Math.sqrt(ze*ze-4*Ae*Re))/(2*Ae)):oe?(Ae=(G.x*G.x+G.y*G.y)/4,ze=-G.x*(ie/2-ee)-G.y*(j/2-ee),Re=(ie/2-ee)*(ie/2-ee)+(j/2-ee)*(j/2-ee)-ee*ee,Xe=(-ze+Math.sqrt(ze*ze-4*Ae*Re))/(2*Ae)):(Ae=G.x*G.x/4+G.y*G.y,ze=-G.x*(ie/2-ee)-2*G.y*(j-ee),Re=(ie/2-ee)*(ie/2-ee)+(j-ee)*(j-ee)-ee*ee,Xe=(-ze+Math.sqrt(ze*ze-4*Ae*Re))/(2*Ae)),Xe=Math.min(1,Xe),X?it=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(j-G.y*Xe)/2)*(ee-(j-G.y*Xe)/2)))-J):it=Math.max(0,ee-Math.sqrt(Math.max(0,ee*ee-(ee-(ie-G.x*Xe)/2)*(ee-(ie-G.x*Xe)/2)))-J),{scale:Xe,pad:it}}function O(Q,ue,le,he,G,$){var J=!!$.isHorizontal,X=!!$.constrained,oe=$.angle||0,ie=G.width,j=G.height,ee=Math.abs(ue-Q),re=Math.abs(he-le),ce;J?ce=re>2*_?_:0:ce=ee>2*_?_:0;var be=1;X&&(be=J?Math.min(1,re/j):Math.min(1,ee/ie));var Ae=L(oe),ze=z(G,Ae),Re=(J?ze.x:ze.y)/2,Xe=(G.left+G.right)/2,it=(G.top+G.bottom)/2,ot=(Q+ue)/2,tt=(le+he)/2,lt=0,Ee=0,_e=J?y(ue,Q):y(le,he);return J?(ot=ue-_e*ce,lt=_e*Re):(tt=he+_e*ce,Ee=-_e*Re),{textX:Xe,textY:it,targetX:ot,targetY:tt,anchorX:lt,anchorY:Ee,scale:be,rotate:Ae}}function I(Q,ue,le,he,G){var $=ue[0].trace,J=$.texttemplate,X;return J?X=U(Q,ue,le,he,G):$.textinfo?X=W(ue,le,he,G):X=c.getValue($.text,le),c.coerceString(v,X)}function N(Q,ue){var le=c.getValue(Q.textposition,ue);return c.coerceEnumerated(T,le)}function U(Q,ue,le,he,G){var $=ue[0].trace,J=A.castOption($,le,"texttemplate");if(!J)return"";var X=$.type==="histogram",oe=$.type==="waterfall",ie=$.type==="funnel",j=$.orientation==="h",ee,re,ce,be;j?(ee="y",re=G,ce="x",be=he):(ee="x",re=he,ce="y",be=G);function Ae(lt){return o(re,re.c2l(lt),!0).text}function ze(lt){return o(be,be.c2l(lt),!0).text}var Re=ue[le],Xe={};Xe.label=Re.p,Xe.labelLabel=Xe[ee+"Label"]=Ae(Re.p);var it=A.castOption($,Re.i,"text");(it===0||it)&&(Xe.text=it),Xe.value=Re.s,Xe.valueLabel=Xe[ce+"Label"]=ze(Re.s);var ot={};l(ot,$,Re.i),(X||ot.x===void 0)&&(ot.x=j?Xe.value:Xe.label),(X||ot.y===void 0)&&(ot.y=j?Xe.label:Xe.value),(X||ot.xLabel===void 0)&&(ot.xLabel=j?Xe.valueLabel:Xe.labelLabel),(X||ot.yLabel===void 0)&&(ot.yLabel=j?Xe.labelLabel:Xe.valueLabel),oe&&(Xe.delta=+Re.rawS||Re.s,Xe.deltaLabel=ze(Xe.delta),Xe.final=Re.v,Xe.finalLabel=ze(Xe.final),Xe.initial=Xe.final-Xe.delta,Xe.initialLabel=ze(Xe.initial)),ie&&(Xe.value=Re.s,Xe.valueLabel=ze(Xe.value),Xe.percentInitial=Re.begR,Xe.percentInitialLabel=A.formatPercent(Re.begR),Xe.percentPrevious=Re.difR,Xe.percentPreviousLabel=A.formatPercent(Re.difR),Xe.percentTotal=Re.sumR,Xe.percenTotalLabel=A.formatPercent(Re.sumR));var tt=A.castOption($,Re.i,"customdata");return tt&&(Xe.customdata=tt),A.texttemplateString(J,Xe,Q._d3locale,ot,Xe,$._meta||{})}function W(Q,ue,le,he){var G=Q[0].trace,$=G.orientation==="h",J=G.type==="waterfall",X=G.type==="funnel";function oe(tt){var lt=$?he:le;return o(lt,tt,!0).text}function ie(tt){var lt=$?le:he;return o(lt,+tt,!0).text}var j=G.textinfo,ee=Q[ue],re=j.split("+"),ce=[],be,Ae=function(tt){return re.indexOf(tt)!==-1};if(Ae("label")&&ce.push(oe(Q[ue].p)),Ae("text")&&(be=A.castOption(G,ee.i,"text"),(be===0||be)&&ce.push(be)),J){var ze=+ee.rawS||ee.s,Re=ee.v,Xe=Re-ze;Ae("initial")&&ce.push(ie(Xe)),Ae("delta")&&ce.push(ie(ze)),Ae("final")&&ce.push(ie(Re))}if(X){Ae("value")&&ce.push(ie(ee.s));var it=0;Ae("percent initial")&&it++,Ae("percent previous")&&it++,Ae("percent total")&&it++;var ot=it>1;Ae("percent initial")&&(be=A.formatPercent(ee.begR),ot&&(be+=" of initial"),ce.push(be)),Ae("percent previous")&&(be=A.formatPercent(ee.difR),ot&&(be+=" of previous"),ce.push(be)),Ae("percent total")&&(be=A.formatPercent(ee.sumR),ot&&(be+=" of total"),ce.push(be))}return ce.join("<br>")}q.exports={plot:m,toMoveInsideBar:F}}}),f1=Ze({"src/traces/bar/hover.js"(Z,q){"use strict";var d=ef(),x=oo(),A=Yn(),M=ca().fillText,e=q2().getLineWidth,t=Wo().hoverLabelText,r=qs().BADNUM;function o(n,s,c,f,g){var v=a(n,s,c,f,g);if(v){var T=v.cd,l=T[0].trace,_=T[v.index];return v.color=i(l,_),x.getComponentMethod("errorbars","hoverInfo")(_,l,v),[v]}}function a(n,s,c,f,g){var v=n.cd,T=v[0].trace,l=v[0].t,_=f==="closest",w=T.type==="waterfall",S=n.maxHoverDistance,E=n.maxSpikeDistance,y,b,p,u,m,h,P;T.orientation==="h"?(y=c,b=s,p="y",u="x",m=he,h=Q):(y=s,b=c,p="x",u="y",h=he,m=Q);var L=T[p+"period"],z=_||L;function F(be){return O(be,-1)}function B(be){return O(be,1)}function O(be,Ae){var ze=be.w;return be[p]+Ae*ze/2}function I(be){return be[p+"End"]-be[p+"Start"]}var N=_?F:L?function(be){return be.p-I(be)/2}:function(be){return Math.min(F(be),be.p-l.bardelta/2)},U=_?B:L?function(be){return be.p+I(be)/2}:function(be){return Math.max(B(be),be.p+l.bardelta/2)};function W(be,Ae,ze){return g.finiteRange&&(ze=0),d.inbox(be-y,Ae-y,ze+Math.min(1,Math.abs(Ae-be)/P)-1)}function Q(be){return W(N(be),U(be),S)}function ue(be){return W(F(be),B(be),E)}function le(be){var Ae=be[u];if(w){var ze=Math.abs(be.rawS)||0;b>0?Ae+=ze:b<0&&(Ae-=ze)}return Ae}function he(be){var Ae=b,ze=be.b,Re=le(be);return d.inbox(ze-Ae,Re-Ae,S+(Re-Ae)/(Re-ze)-1)}function G(be){var Ae=b,ze=be.b,Re=le(be);return d.inbox(ze-Ae,Re-Ae,E+(Re-Ae)/(Re-ze)-1)}var $=n[p+"a"],J=n[u+"a"];P=Math.abs($.r2c($.range[1])-$.r2c($.range[0]));function X(be){return(m(be)+h(be))/2}var oe=d.getDistanceFunction(f,m,h,X);if(d.getClosest(v,oe,n),n.index!==!1&&v[n.index].p!==r){z||(N=function(be){return Math.min(F(be),be.p-l.bargroupwidth/2)},U=function(be){return Math.max(B(be),be.p+l.bargroupwidth/2)});var ie=n.index,j=v[ie],ee=T.base?j.b+j.s:j.s;n[u+"0"]=n[u+"1"]=J.c2p(j[u],!0),n[u+"LabelVal"]=ee;var re=l.extents[l.extents.round(j.p)];n[p+"0"]=$.c2p(_?N(j):re[0],!0),n[p+"1"]=$.c2p(_?U(j):re[1],!0);var ce=j.orig_p!==void 0;return n[p+"LabelVal"]=ce?j.orig_p:j.p,n.labelLabel=t($,n[p+"LabelVal"],T[p+"hoverformat"]),n.valueLabel=t(J,n[u+"LabelVal"],T[u+"hoverformat"]),n.baseLabel=t(J,j.b,T[u+"hoverformat"]),n.spikeDistance=(G(j)+ue(j))/2,n[p+"Spike"]=$.c2p(j.p,!0),M(j,T,n),n.hovertemplate=T.hovertemplate,n}}function i(n,s){var c=s.mcc||n.marker.color,f=s.mlcc||n.marker.line.color,g=e(n,s);if(A.opacity(c))return c;if(A.opacity(f)&&g)return f}q.exports={hoverPoints:o,hoverOnBars:a,getTraceColor:i}}}),Z9=Ze({"src/traces/bar/event_data.js"(Z,q){"use strict";q.exports=function(x,A,M){return x.x="xVal"in A?A.xVal:A.x,x.y="yVal"in A?A.yVal:A.y,A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),M.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),h1=Ze({"src/traces/bar/select.js"(Z,q){"use strict";q.exports=function(A,M){var e=A.cd,t=A.xaxis,r=A.yaxis,o=e[0].trace,a=o.type==="funnel",i=o.orientation==="h",n=[],s;if(M===!1)for(s=0;s<e.length;s++)e[s].selected=0;else for(s=0;s<e.length;s++){var c=e[s],f="ct"in c?c.ct:d(c,t,r,i,a);M.contains(f,!1,s,A)?(n.push({pointNumber:s,x:t.c2d(c.x),y:r.c2d(c.y)}),c.selected=1):c.selected=0}return n};function d(x,A,M,e,t){var r=A.c2p(e?x.s0:x.p0,!0),o=A.c2p(e?x.s1:x.p1,!0),a=M.c2p(e?x.p0:x.s0,!0),i=M.c2p(e?x.p1:x.s1,!0);return t?[(r+o)/2,(a+i)/2]:e?[o,(a+i)/2]:[(r+o)/2,i]}}}),Y9=Ze({"src/traces/bar/index.js"(Z,q){"use strict";q.exports={attributes:Sv(),layoutAttributes:U2(),supplyDefaults:gd().supplyDefaults,crossTraceDefaults:gd().crossTraceDefaults,supplyLayoutDefaults:K5(),calc:X9(),crossTraceCalc:$0().crossTraceCalc,colorbar:hp(),arraysToCalcdata:O_(),plot:eg().plot,style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:f1().hoverPoints,eventData:Z9(),selectPoints:h1(),moduleType:"trace",name:"bar",basePlotModule:Zf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}}),K9=Ze({"lib/bar.js"(Z,q){"use strict";q.exports=Y9()}}),B_=Ze({"src/traces/box/attributes.js"(Z,q){"use strict";var d=$d(),x=tf(),A=Sv(),M=oh(),e=Qc().axisHoverFormat,t=Cs().hovertemplateAttrs,r=rs().extendFlat,o=x.marker,a=o.line;q.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:x.xperiod,yperiod:x.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:x.xperiodalignment,yperiodalignment:x.yperiodalignment,xhoverformat:e("x"),yhoverformat:e("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:r({},o.symbol,{arrayOk:!1,editType:"plot"}),opacity:r({},o.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:r({},o.angle,{arrayOk:!1,editType:"calc"}),size:r({},o.size,{arrayOk:!1,editType:"calc"}),color:r({},o.color,{arrayOk:!1,editType:"style"}),line:{color:r({},a.color,{arrayOk:!1,dflt:M.defaultLine,editType:"style"}),width:r({},a.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:d(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup,selected:{marker:x.selected.marker,editType:"style"},unselected:{marker:x.unselected.marker,editType:"style"},text:r({},x.text,{}),hovertext:r({},x.hovertext,{}),hovertemplate:t({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:x.zorder}}}),N_=Ze({"src/traces/box/layout_attributes.js"(Z,q){"use strict";q.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"}}}}),U_=Ze({"src/traces/box/defaults.js"(Z,q){"use strict";var d=ca(),x=oo(),A=Yn(),M=Qd(),e=J0(),t=a1(),r=B_();function o(s,c,f,g){function v(u,m){return d.coerce(s,c,r,u,m)}if(a(s,c,v,g),c.visible!==!1){M(s,c,g,v),v("xhoverformat"),v("yhoverformat");var T=c._hasPreCompStats;T&&(v("lowerfence"),v("upperfence")),v("line.color",(s.marker||{}).color||f),v("line.width"),v("fillcolor",A.addOpacity(c.line.color,.5));var l=!1;if(T){var _=v("mean"),w=v("sd");_&&_.length&&(l=!0,w&&w.length&&(l="sd"))}v("whiskerwidth");var S=v("sizemode"),E;S==="quartiles"&&(E=v("boxmean",l)),v("showwhiskers",S==="quartiles"),(S==="sd"||E==="sd")&&v("sdmultiple"),v("width"),v("quartilemethod");var y=!1;if(T){var b=v("notchspan");b&&b.length&&(y=!0)}else d.validate(s.notchwidth,r.notchwidth)&&(y=!0);var p=v("notched",y);p&&v("notchwidth"),i(s,c,v,{prefix:"box"}),v("zorder")}}function a(s,c,f,g){function v(W){var Q=0;return W&&W.length&&(Q+=1,d.isArrayOrTypedArray(W[0])&&W[0].length&&(Q+=1)),Q}function T(W){return d.validate(s[W],r[W])}var l=f("y"),_=f("x"),w;if(c.type==="box"){var S=f("q1"),E=f("median"),y=f("q3");c._hasPreCompStats=S&&S.length&&E&&E.length&&y&&y.length,w=Math.min(d.minRowLength(S),d.minRowLength(E),d.minRowLength(y))}var b=v(l),p=v(_),u=b&&d.minRowLength(l),m=p&&d.minRowLength(_),h=g.calendar,P={autotypenumbers:g.autotypenumbers},L,z;if(c._hasPreCompStats)switch(String(p)+String(b)){case"00":var F=T("x0")||T("dx"),B=T("y0")||T("dy");B&&!F?L="h":L="v",z=w;break;case"10":L="v",z=Math.min(w,m);break;case"20":L="h",z=Math.min(w,_.length);break;case"01":L="h",z=Math.min(w,u);break;case"02":L="v",z=Math.min(w,l.length);break;case"12":L="v",z=Math.min(w,m,l.length);break;case"21":L="h",z=Math.min(w,_.length,u);break;case"11":z=0;break;case"22":var O=!1,I;for(I=0;I<_.length;I++)if(t(_[I],h,P)==="category"){O=!0;break}if(O)L="v",z=Math.min(w,m,l.length);else{for(I=0;I<l.length;I++)if(t(l[I],h,P)==="category"){O=!0;break}O?(L="h",z=Math.min(w,_.length,u)):(L="v",z=Math.min(w,m,l.length))}break}else b>0?(L="v",p>0?z=Math.min(m,u):z=Math.min(u)):p>0?(L="h",z=Math.min(m)):z=0;if(!z){c.visible=!1;return}c._length=z;var N=f("orientation",L);c._hasPreCompStats?N==="v"&&p===0?(f("x0",0),f("dx",1)):N==="h"&&b===0&&(f("y0",0),f("dy",1)):N==="v"&&p===0?f("x0"):N==="h"&&b===0&&f("y0");var U=x.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],g)}function i(s,c,f,g){var v=g.prefix,T=d.coerce2(s,c,r,"marker.outliercolor"),l=f("marker.line.outliercolor"),_="outliers";c._hasPreCompStats?_="all":(T||l)&&(_="suspectedoutliers");var w=f(v+"points",_);w?(f("jitter",w==="all"?.3:0),f("pointpos",w==="all"?-1.5:0),f("marker.symbol"),f("marker.opacity"),f("marker.size"),f("marker.angle"),f("marker.color",c.line.color),f("marker.line.color"),f("marker.line.width"),w==="suspectedoutliers"&&(f("marker.line.outliercolor",c.marker.color),f("marker.line.outlierwidth")),f("selected.marker.color"),f("unselected.marker.color"),f("selected.marker.size"),f("unselected.marker.size"),f("text"),f("hovertext")):delete c.marker;var S=f("hoveron");(S==="all"||S.indexOf("points")!==-1)&&f("hovertemplate"),d.coerceSelectionMarkerOpacity(c,f)}function n(s,c){var f,g;function v(w){return d.coerce(g._input,g,r,w)}for(var T=0;T<s.length;T++){g=s[T];var l=g.type;if(l==="box"||l==="violin"){f=g._input;var _=c[l+"mode"];_==="group"&&e(f,g,c,v,_)}}}q.exports={supplyDefaults:o,crossTraceDefaults:n,handleSampleDefaults:a,handlePointsDefaults:i}}}),V2=Ze({"src/traces/box/layout_defaults.js"(Z,q){"use strict";var d=oo(),x=ca(),A=N_();function M(t,r,o,a,i){for(var n=i+"Layout",s=!1,c=0;c<o.length;c++){var f=o[c];if(d.traceIs(f,n)){s=!0;break}}s&&(a(i+"mode"),a(i+"gap"),a(i+"groupgap"))}function e(t,r,o){function a(i,n){return x.coerce(t,r,A,i,n)}M(t,r,o,a,"box")}q.exports={supplyLayoutDefaults:e,_supply:M}}}),J5=Ze({"src/traces/box/calc.js"(Z,q){"use strict";var d=ns(),x=Wo(),A=tv(),M=ca(),e=qs().BADNUM,t=M._;q.exports=function(S,E){var y=S._fullLayout,b=x.getFromId(S,E.xaxis||"x"),p=x.getFromId(S,E.yaxis||"y"),u=[],m=E.type==="violin"?"_numViolins":"_numBoxes",h,P,L,z,F,B,O;E.orientation==="h"?(L=b,z="x",F=p,B="y",O=!!E.yperiodalignment):(L=p,z="y",F=b,B="x",O=!!E.xperiodalignment);var I=r(E,B,F,y[m]),N=I[0],U=I[1],W=M.distinctVals(N,F),Q=W.vals,ue=W.minDiff/2,le,he,G,$,J,X,oe=(E.boxpoints||E.points)==="all"?M.identity:function(xr){return xr.v<le.lf||xr.v>le.uf};if(E._hasPreCompStats){var ie=E[z],j=function(xr){return L.d2c((E[xr]||[])[h])},ee=1/0,re=-1/0;for(h=0;h<E._length;h++){var ce=N[h];if(d(ce)){if(le={},le.pos=le[B]=ce,O&&U&&(le.orig_p=U[h]),le.q1=j("q1"),le.med=j("median"),le.q3=j("q3"),he=[],ie&&M.isArrayOrTypedArray(ie[h]))for(P=0;P<ie[h].length;P++)X=L.d2c(ie[h][P]),X!==e&&(J={v:X,i:[h,P]},n(J,E,[h,P]),he.push(J));if(le.pts=he.sort(c),G=le[z]=he.map(f),$=G.length,le.med!==e&&le.q1!==e&&le.q3!==e&&le.med>=le.q1&&le.q3>=le.med){var be=j("lowerfence");le.lf=be!==e&&be<=le.q1?be:g(le,G,$);var Ae=j("upperfence");le.uf=Ae!==e&&Ae>=le.q3?Ae:v(le,G,$);var ze=j("mean");le.mean=ze!==e?ze:$?M.mean(G,$):(le.q1+le.q3)/2;var Re=j("sd");le.sd=ze!==e&&Re>=0?Re:$?M.stdev(G,$,le.mean):le.q3-le.q1,le.lo=T(le),le.uo=l(le);var Xe=j("notchspan");Xe=Xe!==e&&Xe>0?Xe:_(le,$),le.ln=le.med-Xe,le.un=le.med+Xe;var it=le.lf,ot=le.uf;E.boxpoints&&G.length&&(it=Math.min(it,G[0]),ot=Math.max(ot,G[$-1])),E.notched&&(it=Math.min(it,le.ln),ot=Math.max(ot,le.un)),le.min=it,le.max=ot}else{M.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+le.q1,"median = "+le.med,"q3 = "+le.q3].join(`
`));var tt;le.med!==e?tt=le.med:le.q1!==e?le.q3!==e?tt=(le.q1+le.q3)/2:tt=le.q1:le.q3!==e?tt=le.q3:tt=0,le.med=tt,le.q1=le.q3=tt,le.lf=le.uf=tt,le.mean=le.sd=tt,le.ln=le.un=tt,le.min=le.max=tt}ee=Math.min(ee,le.min),re=Math.max(re,le.max),le.pts2=he.filter(oe),u.push(le)}}E._extremes[L._id]=x.findExtremes(L,[ee,re],{padded:!0})}else{var lt=L.makeCalcdata(E,z),Ee=o(Q,ue),_e=Q.length,fe=a(_e);for(h=0;h<E._length;h++)if(X=lt[h],!!d(X)){var Fe=M.findBin(N[h],Ee);Fe>=0&&Fe<_e&&(J={v:X,i:h},n(J,E,h),fe[Fe].push(J))}var rt=1/0,st=-1/0,Qe=E.quartilemethod,Lt=Qe==="exclusive",kt=Qe==="inclusive";for(h=0;h<_e;h++)if(fe[h].length>0){if(le={},le.pos=le[B]=Q[h],he=le.pts=fe[h].sort(c),G=le[z]=he.map(f),$=G.length,le.min=G[0],le.max=G[$-1],le.mean=M.mean(G,$),le.sd=M.stdev(G,$,le.mean)*E.sdmultiple,le.med=M.interp(G,.5),$%2&&(Lt||kt)){var Vt,Zt;Lt?(Vt=G.slice(0,$/2),Zt=G.slice($/2+1)):kt&&(Vt=G.slice(0,$/2+1),Zt=G.slice($/2)),le.q1=M.interp(Vt,.5),le.q3=M.interp(Zt,.5)}else le.q1=M.interp(G,.25),le.q3=M.interp(G,.75);le.lf=g(le,G,$),le.uf=v(le,G,$),le.lo=T(le),le.uo=l(le);var Sr=_(le,$);le.ln=le.med-Sr,le.un=le.med+Sr,rt=Math.min(rt,le.ln),st=Math.max(st,le.un),le.pts2=he.filter(oe),u.push(le)}E.notched&&M.isTypedArray(lt)&&(lt=Array.from(lt)),E._extremes[L._id]=x.findExtremes(L,E.notched?lt.concat([rt,st]):lt,{padded:!0})}return s(u,E),u.length>0?(u[0].t={num:y[m],dPos:ue,posLetter:B,valLetter:z,labels:{med:t(S,"median:"),min:t(S,"min:"),q1:t(S,"q1:"),q3:t(S,"q3:"),max:t(S,"max:"),mean:E.boxmean==="sd"||E.sizemode==="sd"?t(S,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):t(S,"mean:"),lf:t(S,"lower fence:"),uf:t(S,"upper fence:")}},y[m]++,u):[{t:{empty:!0}}]};function r(w,S,E,y){var b=S in w,p=S+"0"in w,u="d"+S in w;if(b||p&&u){var m=E.makeCalcdata(w,S),h=A(w,E,S,m).vals;return[h,m]}var P;p?P=w[S+"0"]:"name"in w&&(E.type==="category"||d(w.name)&&["linear","log"].indexOf(E.type)!==-1||M.isDateTime(w.name)&&E.type==="date")?P=w.name:P=y;for(var L=E.type==="multicategory"?E.r2c_just_indices(P):E.d2c(P,0,w[S+"calendar"]),z=w._length,F=new Array(z),B=0;B<z;B++)F[B]=L;return[F]}function o(w,S){for(var E=w.length,y=new Array(E+1),b=0;b<E;b++)y[b]=w[b]-S;return y[E]=w[E-1]+S,y}function a(w){for(var S=new Array(w),E=0;E<w;E++)S[E]=[];return S}var i={text:"tx",hovertext:"htx"};function n(w,S,E){for(var y in i)M.isArrayOrTypedArray(S[y])&&(Array.isArray(E)?M.isArrayOrTypedArray(S[y][E[0]])&&(w[i[y]]=S[y][E[0]][E[1]]):w[i[y]]=S[y][E])}function s(w,S){if(M.isArrayOrTypedArray(S.selectedpoints))for(var E=0;E<w.length;E++){for(var y=w[E].pts||[],b={},p=0;p<y.length;p++)b[y[p].i]=p;M.tagSelected(y,S,b)}}function c(w,S){return w.v-S.v}function f(w){return w.v}function g(w,S,E){return E===0?w.q1:Math.min(w.q1,S[Math.min(M.findBin(2.5*w.q1-1.5*w.q3,S,!0)+1,E-1)])}function v(w,S,E){return E===0?w.q3:Math.max(w.q3,S[Math.max(M.findBin(2.5*w.q3-1.5*w.q1,S),0)])}function T(w){return 4*w.q1-3*w.q3}function l(w){return 4*w.q3-3*w.q1}function _(w,S){return S===0?0:1.57*(w.q3-w.q1)/Math.sqrt(S)}}}),G2=Ze({"src/traces/box/cross_trace_calc.js"(Z,q){"use strict";var d=Wo(),x=ca(),A=Y0().getAxisGroup,M=["v","h"];function e(r,o){for(var a=r.calcdata,i=o.xaxis,n=o.yaxis,s=0;s<M.length;s++){for(var c=M[s],f=c==="h"?n:i,g=[],v=0;v<a.length;v++){var T=a[v],l=T[0].t,_=T[0].trace;_.visible===!0&&(_.type==="box"||_.type==="candlestick")&&!l.empty&&(_.orientation||"v")===c&&_.xaxis===i._id&&_.yaxis===n._id&&g.push(v)}t("box",r,g,f)}}function t(r,o,a,i){var n=o.calcdata,s=o._fullLayout,c=i._id,f=c.charAt(0),g,v,T,l=[],_=0;for(g=0;g<a.length;g++)for(T=n[a[g]],v=0;v<T.length;v++)l.push(i.c2l(T[v].pos,!0)),_+=(T[v].pts2||[]).length;if(l.length){var w=x.distinctVals(l);(i.type==="category"||i.type==="multicategory")&&(w.minDiff=1);var S=w.minDiff/2;d.minDtick(i,w.minDiff,w.vals[0],!0);var E=r==="violin"?"_numViolins":"_numBoxes",y=s[E],b=s[r+"mode"]==="group"&&y>1,p=1-s[r+"gap"],u=1-s[r+"groupgap"];for(g=0;g<a.length;g++){T=n[a[g]];var m=T[0].trace,h=T[0].t,P=m.width,L=m.side,z,F,B,O;if(P)z=F=O=P/2,B=0;else if(z=S,b){var I=A(s,i._id)+m.orientation,N=s._alignmentOpts[I]||{},U=N[m.alignmentgroup]||{},W=Object.keys(U.offsetGroups||{}).length,Q=W||y,ue=W?m._offsetIndex:h.num;F=z*p*u/Q,B=2*z*(-.5+(ue+.5)/Q)*p,O=z*p/Q}else F=z*p*u,B=0,O=z;h.dPos=z,h.bPos=B,h.bdPos=F,h.wHover=O;var le,he,G=B+F,$,J,X,oe,ie,j,ee=!!P,re=(m.boxpoints||m.points)&&_>0;if(L==="positive"?(le=z*(P?1:.5),$=G,he=$=B):L==="negative"?(le=$=B,he=z*(P?1:.5),J=G):(le=he=z,$=J=G),re){var ce=m.pointpos,be=m.jitter,Ae=m.marker.size/2,ze=0;ce+be>=0&&(ze=G*(ce+be),ze>le?(ee=!0,ie=Ae,X=ze):ze>$&&(ie=Ae,X=le)),ze<=le&&(X=le);var Re=0;ce-be<=0&&(Re=-G*(ce-be),Re>he?(ee=!0,j=Ae,oe=Re):Re>J&&(j=Ae,oe=he)),Re<=he&&(oe=he)}else X=le,oe=he;var Xe=new Array(T.length);for(v=0;v<T.length;v++)Xe[v]=T[v].pos;m._extremes[c]=d.findExtremes(i,Xe,{padded:ee,vpadminus:oe,vpadplus:X,vpadLinearized:!0,ppadminus:{x:j,y:ie}[f],ppadplus:{x:ie,y:j}[f]})}}}q.exports={crossTraceCalc:e,setPositionOffset:t}}}),H2=Ze({"src/traces/box/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=5,e=.01;function t(i,n,s,c){var f=i._context.staticPlot,g=n.xaxis,v=n.yaxis;x.makeTraceGroups(c,s,"trace boxes").each(function(T){var l=d.select(this),_=T[0],w=_.t,S=_.trace;if(w.wdPos=w.bdPos*S.whiskerwidth,S.visible!==!0||w.empty){l.remove();return}var E,y;S.orientation==="h"?(E=v,y=g):(E=g,y=v),r(l,{pos:E,val:y},S,w,f),o(l,{x:g,y:v},S,w),a(l,{pos:E,val:y},S,w)})}function r(i,n,s,c,f){var g=s.orientation==="h",v=n.val,T=n.pos,l=!!T.rangebreaks,_=c.bPos,w=c.wdPos||0,S=c.bPosPxOffset||0,E=s.whiskerwidth||0,y=s.showwhiskers!==!1,b=s.notched||!1,p=b?1-2*s.notchwidth:1,u,m;Array.isArray(c.bdPos)?(u=c.bdPos[0],m=c.bdPos[1]):(u=c.bdPos,m=c.bdPos);var h=i.selectAll("path.box").data(s.type!=="violin"||s.box.visible?x.identity:[]);h.enter().append("path").style("vector-effect",f?"none":"non-scaling-stroke").attr("class","box"),h.exit().remove(),h.each(function(P){if(P.empty)return d.select(this).attr("d","M0,0Z");var L=T.c2l(P.pos+_,!0),z=T.l2p(L-u)+S,F=T.l2p(L+m)+S,B=l?(z+F)/2:T.l2p(L)+S,O=s.whiskerwidth,I=l?z*O+(1-O)*B:T.l2p(L-w)+S,N=l?F*O+(1-O)*B:T.l2p(L+w)+S,U=T.l2p(L-u*p)+S,W=T.l2p(L+m*p)+S,Q=s.sizemode==="sd",ue=v.c2p(Q?P.mean-P.sd:P.q1,!0),le=Q?v.c2p(P.mean+P.sd,!0):v.c2p(P.q3,!0),he=x.constrain(Q?v.c2p(P.mean,!0):v.c2p(P.med,!0),Math.min(ue,le)+1,Math.max(ue,le)-1),G=P.lf===void 0||s.boxpoints===!1||Q,$=v.c2p(G?P.min:P.lf,!0),J=v.c2p(G?P.max:P.uf,!0),X=v.c2p(P.ln,!0),oe=v.c2p(P.un,!0);g?d.select(this).attr("d","M"+he+","+U+"V"+W+"M"+ue+","+z+"V"+F+(b?"H"+X+"L"+he+","+W+"L"+oe+","+F:"")+"H"+le+"V"+z+(b?"H"+oe+"L"+he+","+U+"L"+X+","+z:"")+"Z"+(y?"M"+ue+","+B+"H"+$+"M"+le+","+B+"H"+J+(E===0?"":"M"+$+","+I+"V"+N+"M"+J+","+I+"V"+N):"")):d.select(this).attr("d","M"+U+","+he+"H"+W+"M"+z+","+ue+"H"+F+(b?"V"+X+"L"+W+","+he+"L"+F+","+oe:"")+"V"+le+"H"+z+(b?"V"+oe+"L"+U+","+he+"L"+z+","+X:"")+"Z"+(y?"M"+B+","+ue+"V"+$+"M"+B+","+le+"V"+J+(E===0?"":"M"+I+","+$+"H"+N+"M"+I+","+J+"H"+N):""))})}function o(i,n,s,c){var f=n.x,g=n.y,v=c.bdPos,T=c.bPos,l=s.boxpoints||s.points;x.seedPseudoRandom();var _=function(E){return E.forEach(function(y){y.t=c,y.trace=s}),E},w=i.selectAll("g.points").data(l?_:[]);w.enter().append("g").attr("class","points"),w.exit().remove();var S=w.selectAll("path").data(function(E){var y,b=E.pts2,p=Math.max((E.max-E.min)/10,E.q3-E.q1),u=p*1e-9,m=p*e,h=[],P=0,L;if(s.jitter){if(p===0)for(P=1,h=new Array(b.length),y=0;y<b.length;y++)h[y]=1;else for(y=0;y<b.length;y++){var z=Math.max(0,y-M),F=b[z].v,B=Math.min(b.length-1,y+M),O=b[B].v;l!=="all"&&(b[y].v<E.lf?O=Math.min(O,E.lf):F=Math.max(F,E.uf));var I=Math.sqrt(m*(B-z)/(O-F+u))||0;I=x.constrain(Math.abs(I),0,1),h.push(I),P=Math.max(I,P)}L=s.jitter*2/(P||1)}for(y=0;y<b.length;y++){var N=b[y],U=N.v,W=s.jitter?L*h[y]*(x.pseudoRandom()-.5):0,Q=E.pos+T+v*(s.pointpos+W);s.orientation==="h"?(N.y=Q,N.x=U):(N.x=Q,N.y=U),l==="suspectedoutliers"&&U<E.uo&&U>E.lo&&(N.so=!0)}return b});S.enter().append("path").classed("point",!0),S.exit().remove(),S.call(A.translatePoints,f,g)}function a(i,n,s,c){var f=n.val,g=n.pos,v=!!g.rangebreaks,T=c.bPos,l=c.bPosPxOffset||0,_=s.boxmean||(s.meanline||{}).visible,w,S;Array.isArray(c.bdPos)?(w=c.bdPos[0],S=c.bdPos[1]):(w=c.bdPos,S=c.bdPos);var E=i.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(y){var b=g.c2l(y.pos+T,!0),p=g.l2p(b-w)+l,u=g.l2p(b+S)+l,m=v?(p+u)/2:g.l2p(b)+l,h=f.c2p(y.mean,!0),P=f.c2p(y.mean-y.sd,!0),L=f.c2p(y.mean+y.sd,!0);s.orientation==="h"?d.select(this).attr("d","M"+h+","+p+"V"+u+(_==="sd"?"m0,0L"+P+","+m+"L"+h+","+p+"L"+L+","+m+"Z":"")):d.select(this).attr("d","M"+p+","+h+"H"+u+(_==="sd"?"m0,0L"+m+","+P+"L"+p+","+h+"L"+m+","+L+"Z":""))})}q.exports={plot:t,plotBoxAndWhiskers:r,plotPoints:o,plotBoxMean:a}}}),W2=Ze({"src/traces/box/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=as();function M(t,r,o){var a=o||d.select(t).selectAll("g.trace.boxes");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var n=d.select(this),s=i[0].trace,c=s.line.width;function f(T,l,_,w){T.style("stroke-width",l+"px").call(x.stroke,_).call(x.fill,w)}var g=n.selectAll("path.box");if(s.type==="candlestick")g.each(function(T){if(!T.empty){var l=d.select(this),_=s[T.dir];f(l,_.line.width,_.line.color,_.fillcolor),l.style("opacity",s.selectedpoints&&!T.selected?.3:1)}});else{f(g,c,s.line.color,s.fillcolor),n.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(x.stroke,s.line.color);var v=n.selectAll("path.point");A.pointStyle(v,s,t)}})}function e(t,r,o){var a=r[0].trace,i=o.selectAll("path.point");a.selectedpoints?A.selectedPointStyle(i,a):A.pointStyle(i,a,t)}q.exports={style:M,styleOnSelect:e}}}),$5=Ze({"src/traces/box/hover.js"(Z,q){"use strict";var d=Wo(),x=ca(),A=ef(),M=Yn(),e=x.fillText;function t(a,i,n,s){var c=a.cd,f=c[0].trace,g=f.hoveron,v=[],T;return g.indexOf("boxes")!==-1&&(v=v.concat(r(a,i,n,s))),g.indexOf("points")!==-1&&(T=o(a,i,n)),s==="closest"?T?[T]:v:(T&&v.push(T),v)}function r(a,i,n,s){var c=a.cd,f=a.xa,g=a.ya,v=c[0].trace,T=c[0].t,l=v.type==="violin",_,w,S,E,y,b,p,u,m,h,P,L=T.bdPos,z,F,B=T.wHover,O=function(Re){return S.c2l(Re.pos)+T.bPos-S.c2l(b)};l&&v.side!=="both"?(v.side==="positive"&&(m=function(Re){var Xe=O(Re);return A.inbox(Xe,Xe+B,h)},z=L,F=0),v.side==="negative"&&(m=function(Re){var Xe=O(Re);return A.inbox(Xe-B,Xe,h)},z=0,F=L)):(m=function(Re){var Xe=O(Re);return A.inbox(Xe-B,Xe+B,h)},z=F=L);var I;l?I=function(Re){return A.inbox(Re.span[0]-y,Re.span[1]-y,h)}:I=function(Re){return A.inbox(Re.min-y,Re.max-y,h)},v.orientation==="h"?(y=i,b=n,p=I,u=m,_="y",S=g,w="x",E=f):(y=n,b=i,p=m,u=I,_="x",S=f,w="y",E=g);var N=Math.min(1,L/Math.abs(S.r2c(S.range[1])-S.r2c(S.range[0])));h=a.maxHoverDistance-N,P=a.maxSpikeDistance-N;function U(Re){return(p(Re)+u(Re))/2}var W=A.getDistanceFunction(s,p,u,U);if(A.getClosest(c,W,a),a.index===!1)return[];var Q=c[a.index],ue=v.line.color,le=(v.marker||{}).color;M.opacity(ue)&&v.line.width?a.color=ue:M.opacity(le)&&v.boxpoints?a.color=le:a.color=v.fillcolor,a[_+"0"]=S.c2p(Q.pos+T.bPos-F,!0),a[_+"1"]=S.c2p(Q.pos+T.bPos+z,!0),a[_+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var he=_+"Spike";a.spikeDistance=U(Q)*P/h,a[he]=S.c2p(Q.pos,!0);var G=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,$=v.boxpoints||v.points,J=$&&G?["max","uf","q3","med","mean","q1","lf","min"]:$&&!G?["max","uf","q3","med","q1","lf","min"]:!$&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],X=E.range[1]<E.range[0];v.orientation===(X?"v":"h")&&J.reverse();for(var oe=a.spikeDistance,ie=a[he],j=[],ee=0;ee<J.length;ee++){var re=J[ee];if(re in Q){var ce=Q[re],be=E.c2p(ce,!0),Ae=x.extendFlat({},a);Ae.attr=re,Ae[w+"0"]=Ae[w+"1"]=be,Ae[w+"LabelVal"]=ce,Ae[w+"Label"]=(T.labels?T.labels[re]+" ":"")+d.hoverLabelText(E,ce,v[w+"hoverformat"]),Ae.hoverOnBox=!0,re==="mean"&&"sd"in Q&&(v.boxmean==="sd"||v.sizemode==="sd")&&(Ae[w+"err"]=Q.sd),Ae.hovertemplate=!1,j.push(Ae)}}a.name="",a.spikeDistance=void 0,a[he]=void 0;for(var ze=0;ze<j.length;ze++)j[ze].attr!=="med"?(j[ze].name="",j[ze].spikeDistance=void 0,j[ze][he]=void 0):(j[ze].spikeDistance=oe,j[ze][he]=ie);return j}function o(a,i,n){for(var s=a.cd,c=a.xa,f=a.ya,g=s[0].trace,v=c.c2p(i),T=f.c2p(n),l,_=function(I){var N=Math.max(3,I.mrc||0);return Math.max(Math.abs(c.c2p(I.x)-v)-N,1-3/N)},w=function(I){var N=Math.max(3,I.mrc||0);return Math.max(Math.abs(f.c2p(I.y)-T)-N,1-3/N)},S=A.quadrature(_,w),E=!1,y,b,p=0;p<s.length;p++){y=s[p];for(var u=0;u<(y.pts||[]).length;u++){b=y.pts[u];var m=S(b);m<=a.distance&&(a.distance=m,E=[p,u])}}if(!E)return!1;y=s[E[0]],b=y.pts[E[1]];var h=c.c2p(b.x,!0),P=f.c2p(b.y,!0),L=b.mrc||1;l=x.extendFlat({},a,{index:b.i,color:(g.marker||{}).color,name:g.name,x0:h-L,x1:h+L,y0:P-L,y1:P+L,spikeDistance:a.distance,hovertemplate:g.hovertemplate});var z=y.orig_p,F=z!==void 0?z:y.pos,B;g.orientation==="h"?(B=f,l.xLabelVal=b.x,l.yLabelVal=F):(B=c,l.xLabelVal=F,l.yLabelVal=b.y);var O=B._id.charAt(0);return l[O+"Spike"]=B.c2p(y.pos,!0),e(b,g,l),l}q.exports={hoverPoints:t,hoverOnBoxes:r,hoverOnPoints:o}}}),J9=Ze({"src/traces/box/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return A.hoverOnBox&&(x.hoverOnBox=A.hoverOnBox),"xVal"in A&&(x.x=A.xVal),"yVal"in A&&(x.y=A.yVal),A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),x}}}),Q5=Ze({"src/traces/box/select.js"(Z,q){"use strict";q.exports=function(x,A){var M=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a;if(A===!1)for(o=0;o<M.length;o++)for(a=0;a<(M[o].pts||[]).length;a++)M[o].pts[a].selected=0;else for(o=0;o<M.length;o++)for(a=0;a<(M[o].pts||[]).length;a++){var i=M[o].pts[a],n=e.c2p(i.x),s=t.c2p(i.y);A.contains([n,s],null,i.i,x)?(r.push({pointNumber:i.i,x:e.c2d(i.x),y:t.c2d(i.y)}),i.selected=1):i.selected=0}return r}}}),$9=Ze({"src/traces/box/index.js"(Z,q){"use strict";q.exports={attributes:B_(),layoutAttributes:N_(),supplyDefaults:U_().supplyDefaults,crossTraceDefaults:U_().crossTraceDefaults,supplyLayoutDefaults:V2().supplyLayoutDefaults,calc:J5(),crossTraceCalc:G2().crossTraceCalc,plot:H2().plot,style:W2().style,styleOnSelect:W2().styleOnSelect,hoverPoints:$5().hoverPoints,eventData:J9(),selectPoints:Q5(),moduleType:"trace",name:"box",basePlotModule:Zf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}}),Q9=Ze({"lib/box.js"(Z,q){"use strict";q.exports=$9()}}),p1=Ze({"src/traces/heatmap/attributes.js"(Z,q){"use strict";var d=tf(),x=eu(),A=tc(),M=Qc().axisHoverFormat,e=Cs().hovertemplateAttrs,t=Cs().texttemplateAttrs,r=Mu(),o=rs().extendFlat;q.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},d.x,{impliedEdits:{xtype:"array"}}),x0:o({},d.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},d.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},d.y,{impliedEdits:{ytype:"array"}}),y0:o({},d.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},d.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:o({},d.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:o({},d.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:o({},d.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:o({},d.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:o({},d.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:o({},d.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:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:e(),texttemplate:t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:A({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:o({},x.showlegend,{dflt:!1}),zorder:d.zorder},r("",{cLetter:"z",autoColorDflt:!1}))}}),X2=Ze({"src/traces/heatmap/xyz_defaults.js"(Z,q){"use strict";var d=ns(),x=ca(),A=oo();q.exports=function(r,o,a,i,n,s){var c=a("z");n=n||"x",s=s||"y";var f,g;if(c===void 0||!c.length)return 0;if(x.isArray1D(c)){f=a(n),g=a(s);var v=x.minRowLength(f),T=x.minRowLength(g);if(v===0||T===0)return 0;o._length=Math.min(v,T,c.length)}else{if(f=M(n,a),g=M(s,a),!e(c))return 0;a("transpose"),o._length=null}var l=A.getComponentMethod("calendars","handleTraceDefaults");return l(r,o,[n,s],i),!0};function M(t,r){var o=r(t),a=o?r(t+"type","array"):"scaled";return a==="scaled"&&(r(t+"0"),r("d"+t)),o}function e(t){for(var r=!0,o=!1,a=!1,i,n=0;n<t.length;n++){if(i=t[n],!x.isArrayOrTypedArray(i)){r=!1;break}i.length>0&&(o=!0);for(var s=0;s<i.length;s++)if(d(i[s])){a=!0;break}}return r&&o&&a}}}),j_=Ze({"src/traces/heatmap/label_defaults.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){A("texttemplate");var e=d.extendFlat({},M.font,{color:"auto",size:"auto"});d.coerceFont(A,"textfont",e)}}}),eS=Ze({"src/traces/heatmap/style_defaults.js"(Z,q){"use strict";q.exports=function(x,A,M){var e=M("zsmooth");e===!1&&(M("xgap"),M("ygap")),M("zhoverformat")}}}),eF=Ze({"src/traces/heatmap/defaults.js"(Z,q){"use strict";var d=ca(),x=X2(),A=j_(),M=Qd(),e=eS(),t=gh(),r=p1();q.exports=function(a,i,n,s){function c(g,v){return d.coerce(a,i,r,g,v)}var f=x(a,i,c,s);if(!f){i.visible=!1;return}M(a,i,s,c),c("xhoverformat"),c("yhoverformat"),c("text"),c("hovertext"),c("hovertemplate"),A(c,s),e(a,i,c,s),c("hoverongaps"),c("connectgaps",d.isArray1D(i.z)&&i.zsmooth!==!1),t(a,i,s,c,{prefix:"",cLetter:"z"}),c("zorder")}}}),tS=Ze({"src/traces/histogram/bin_functions.js"(Z,q){"use strict";var d=ns();q.exports={count:function(x,A,M){return M[x]++,1},sum:function(x,A,M,e){var t=e[A];return d(t)?(t=Number(t),M[x]+=t,t):0},avg:function(x,A,M,e,t){var r=e[A];return d(r)&&(r=Number(r),M[x]+=r,t[x]++),0},min:function(x,A,M,e){var t=e[A];if(d(t))if(t=Number(t),d(M[x])){if(M[x]>t){var r=t-M[x];return M[x]=t,r}}else return M[x]=t,t;return 0},max:function(x,A,M,e){var t=e[A];if(d(t))if(t=Number(t),d(M[x])){if(M[x]<t){var r=t-M[x];return M[x]=t,r}}else return M[x]=t,t;return 0}}}}),rS=Ze({"src/traces/histogram/norm_functions.js"(Z,q){"use strict";q.exports={percent:function(d,x){for(var A=d.length,M=100/x,e=0;e<A;e++)d[e]*=M},probability:function(d,x){for(var A=d.length,M=0;M<A;M++)d[M]/=x},density:function(d,x,A,M){var e=d.length;M=M||1;for(var t=0;t<e;t++)d[t]*=A[t]*M},"probability density":function(d,x,A,M){var e=d.length;M&&(x/=M);for(var t=0;t<e;t++)d[t]*=A[t]/x}}}}),aS=Ze({"src/traces/histogram/average.js"(Z,q){"use strict";q.exports=function(x,A){for(var M=x.length,e=0,t=0;t<M;t++)A[t]?(x[t]/=A[t],e+=x[t]):x[t]=null;return e}}}),iS=Ze({"src/traces/histogram/bin_label_vals.js"(Z,q){"use strict";var d=qs(),x=d.ONEAVGYEAR,A=d.ONEAVGMONTH,M=d.ONEDAY,e=d.ONEHOUR,t=d.ONEMIN,r=d.ONESEC,o=Wo().tickIncrement;q.exports=function(f,g,v,T,l){var _=-1.1*g,w=-.1*g,S=f-w,E=v[0],y=v[1],b=Math.min(a(E+w,E+S,T,l),a(y+w,y+S,T,l)),p=Math.min(a(E+_,E+w,T,l),a(y+_,y+w,T,l)),u,m;if(b>p&&p<Math.abs(y-E)/4e3?(u=b,m=!1):(u=Math.min(b,p),m=!0),T.type==="date"&&u>M){var h=u===x?1:6,P=u===x?"M12":"M1";return function(L,z){var F=T.c2d(L,x,l),B=F.indexOf("-",h);B>0&&(F=F.substr(0,B));var O=T.d2c(F,0,l);if(O<L){var I=o(O,P,!1,l);(O+I)/2<L+f&&(O=I)}return z&&m?o(O,P,!0,l):O}}return function(L,z){var F=u*Math.round(L/u);return F+u/10<L&&F+u*.9<L+f&&(F+=u),z&&m&&(F-=u),F}};function a(c,f,g,v){if(c*f<=0)return 1/0;for(var T=Math.abs(f-c),l=g.type==="date",_=i(T,l),w=0;w<10;w++){var S=i(_*80,l);if(_===S)break;if(n(S,c,f,l,g,v))_=S;else break}return _}function i(c,f){return f&&c>r?c>M?c>x*1.1?x:c>A*1.1?A:M:c>e?e:c>t?t:r:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function n(c,f,g,v,T,l){if(v&&c>M){var _=s(f,T,l),w=s(g,T,l),S=c===x?0:1;return _[S]!==w[S]}return Math.floor(g/c)-Math.floor(f/c)>.1}function s(c,f,g){var v=f.c2d(c,x,g).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}}),nS=Ze({"src/traces/histogram/calc.js"(Z,q){"use strict";var d=ns(),x=ca(),A=oo(),M=Wo(),{hasColorscale:e}=bp(),t=wp(),r=O_(),o=tS(),a=rS(),i=aS(),n=iS();function s(T,l){var _=[],w=[],S=l.orientation==="h",E=M.getFromId(T,S?l.yaxis:l.xaxis),y=S?"y":"x",b={x:"y",y:"x"}[y],p=l[y+"calendar"],u=l.cumulative,m,h=c(T,l,E,y),P=h[0],L=h[1],z=typeof P.size=="string",F=[],B=z?F:P,O=[],I=[],N=[],U=0,W=l.histnorm,Q=l.histfunc,ue=W.indexOf("density")!==-1,le,he,G;u.enabled&&ue&&(W=W.replace(/ ?density$/,""),ue=!1);var $=Q==="max"||Q==="min",J=$?null:0,X=o.count,oe=a[W],ie=!1,j=function(Fe){return E.r2c(Fe,0,p)},ee;for(x.isArrayOrTypedArray(l[b])&&Q!=="count"&&(ee=l[b],ie=Q==="avg",X=o[Q]),m=j(P.start),he=j(P.end)+(m-M.tickIncrement(m,P.size,!1,p))/1e6;m<he&&_.length<1e6&&(le=M.tickIncrement(m,P.size,!1,p),_.push((m+le)/2),w.push(J),N.push([]),F.push(m),ue&&O.push(1/(le-m)),ie&&I.push(0),!(le<=m));)m=le;F.push(m),!z&&E.type==="date"&&(B={start:j(B.start),end:j(B.end),size:B.size}),T._fullLayout._roundFnOpts||(T._fullLayout._roundFnOpts={});var re=l["_"+y+"bingroup"],ce={leftGap:1/0,rightGap:1/0};re&&(T._fullLayout._roundFnOpts[re]||(T._fullLayout._roundFnOpts[re]=ce),ce=T._fullLayout._roundFnOpts[re]);var be=w.length,Ae=!0,ze=ce.leftGap,Re=ce.rightGap,Xe={};for(m=0;m<L.length;m++){var it=L[m];G=x.findBin(it,B),G>=0&&G<be&&(U+=X(G,m,w,ee,I),Ae&&N[G].length&&it!==L[N[G][0]]&&(Ae=!1),N[G].push(m),Xe[m]=G,ze=Math.min(ze,it-F[G]),Re=Math.min(Re,F[G+1]-it))}ce.leftGap=ze,ce.rightGap=Re;var ot;Ae||(ot=function(Fe,rt){return function(){var st=T._fullLayout._roundFnOpts[re];return n(st.leftGap,st.rightGap,F,E,p)(Fe,rt)}}),ie&&(U=i(w,I)),oe&&oe(w,U,O),u.enabled&&v(w,u.direction,u.currentbin);var tt=Math.min(_.length,w.length),lt=[],Ee=0,_e=tt-1;for(m=0;m<tt;m++)if(w[m]){Ee=m;break}for(m=tt-1;m>=Ee;m--)if(w[m]){_e=m;break}for(m=Ee;m<=_e;m++)if(d(_[m])&&d(w[m])){var fe={p:_[m],s:w[m],b:0};u.enabled||(fe.pts=N[m],Ae?fe.ph0=fe.ph1=N[m].length?L[N[m][0]]:_[m]:(l._computePh=!0,fe.ph0=ot(F[m]),fe.ph1=ot(F[m+1],!0))),lt.push(fe)}return lt.length===1&&(lt[0].width1=M.tickIncrement(lt[0].p,P.size,!1,p)-lt[0].p),e(l,"marker")&&t(T,l,{vals:l.marker.color,containerStr:"marker",cLetter:"c"}),e(l,"marker.line")&&t(T,l,{vals:l.marker.line.color,containerStr:"marker.line",cLetter:"c"}),r(lt,l),x.isArrayOrTypedArray(l.selectedpoints)&&x.tagSelected(lt,l,Xe),lt}function c(T,l,_,w,S){var E=w+"bins",y=T._fullLayout,b=l["_"+w+"bingroup"],p=y._histogramBinOpts[b],u=y.barmode==="overlay",m,h,P,L,z,F,B,O=function(it){return _.r2c(it,0,L)},I=function(it){return _.c2r(it,0,L)},N=_.type==="date"?function(it){return it||it===0?x.cleanDate(it,null,L):null}:function(it){return d(it)?Number(it):null};function U(it,ot,tt){ot[it+"Found"]?(ot[it]=N(ot[it]),ot[it]===null&&(ot[it]=tt[it])):(F[it]=ot[it]=tt[it],x.nestedProperty(h[0],E+"."+it).set(tt[it]))}if(l["_"+w+"autoBinFinished"])delete l["_"+w+"autoBinFinished"];else{h=p.traces;var W=[],Q=!0,ue=!1,le=!1;for(m=0;m<h.length;m++)if(P=h[m],P.visible){var he=p.dirs[m];z=P["_"+he+"pos0"]=_.makeCalcdata(P,he),W=x.concat(W,z),delete P["_"+w+"autoBinFinished"],l.visible===!0&&(Q?Q=!1:(delete P._autoBin,P["_"+w+"autoBinFinished"]=1),A.traceIs(P,"2dMap")&&(ue=!0),P.type==="histogram2dcontour"&&(le=!0))}L=h[0][w+"calendar"];var G=M.autoBin(W,_,p.nbins,ue,L,p.sizeFound&&p.size),$=h[0]._autoBin={};if(F=$[p.dirs[0]]={},le&&(p.size||(G.start=I(M.tickIncrement(O(G.start),G.size,!0,L))),p.end===void 0&&(G.end=I(M.tickIncrement(O(G.end),G.size,!1,L)))),u&&!A.traceIs(l,"2dMap")&&G._dataSpan===0&&_.type!=="category"&&_.type!=="multicategory"&&l.bingroup===""&&typeof l.xbins>"u"){if(S)return[G,z,!0];G=f(T,l,_,w,E)}B=P.cumulative||{},B.enabled&&B.currentbin!=="include"&&(B.direction==="decreasing"?G.start=I(M.tickIncrement(O(G.start),G.size,!0,L)):G.end=I(M.tickIncrement(O(G.end),G.size,!1,L))),p.size=G.size,p.sizeFound||(F.size=G.size,x.nestedProperty(h[0],E+".size").set(G.size)),U("start",p,G),U("end",p,G)}z=l["_"+w+"pos0"],delete l["_"+w+"pos0"];var J=l._input[E]||{},X=x.extendFlat({},p),oe=p.start,ie=_.r2l(J.start),j=ie!==void 0;if((p.startFound||j)&&ie!==_.r2l(oe)){var ee=j?ie:x.aggNums(Math.min,null,z),re={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:p.size,tick0:oe,calendar:L,range:[ee,M.tickIncrement(ee,p.size,!1,L)].map(_.l2r)},ce=M.tickFirst(re);ce>_.r2l(ee)&&(ce=M.tickIncrement(ce,p.size,!0,L)),X.start=_.l2r(ce),j||x.nestedProperty(l,E+".start").set(X.start)}var be=p.end,Ae=_.r2l(J.end),ze=Ae!==void 0;if((p.endFound||ze)&&Ae!==_.r2l(be)){var Re=ze?Ae:x.aggNums(Math.max,null,z);X.end=_.l2r(Re),ze||x.nestedProperty(l,E+".start").set(X.end)}var Xe="autobin"+w;return l._input[Xe]===!1&&(l._input[E]=x.extendFlat({},l[E]||{}),delete l._input[Xe],delete l[Xe]),[X,z]}function f(T,l,_,w,S){var E=T._fullLayout,y=g(T,l),b=!1,p=1/0,u=[l],m,h,P;for(m=0;m<y.length;m++)if(h=y[m],h===l)b=!0;else if(!b)P=E._histogramBinOpts[h["_"+w+"bingroup"]],p=Math.min(p,P.size||h[S].size);else{var L=c(T,h,_,w,!0),z=L[0],F=L[2];h["_"+w+"autoBinFinished"]=1,h["_"+w+"pos0"]=L[1],F?u.push(h):p=Math.min(p,z.size)}var B=new Array(u.length);for(m=0;m<u.length;m++)for(var O=u[m]["_"+w+"pos0"],I=0;I<O.length;I++)if(O[I]!==void 0){B[m]=O[I];break}for(isFinite(p)||(p=x.distinctVals(B).minDiff),m=0;m<u.length;m++){h=u[m];var N=h[w+"calendar"],U={start:_.c2r(B[m]-p/2,0,N),end:_.c2r(B[m]+p/2,0,N),size:p};h._input[S]=h[S]=U,P=E._histogramBinOpts[h["_"+w+"bingroup"]],P&&x.extendFlat(P,U)}return l[S]}function g(T,l){for(var _=l.xaxis,w=l.yaxis,S=l.orientation,E=[],y=T._fullData,b=0;b<y.length;b++){var p=y[b];p.type==="histogram"&&p.visible===!0&&p.orientation===S&&p.xaxis===_&&p.yaxis===w&&E.push(p)}return E}function v(T,l,_){var w,S,E;function y(p){E=T[p],T[p]/=2}function b(p){S=T[p],T[p]=E+S/2,E+=S}if(_==="half")if(l==="increasing")for(y(0),w=1;w<T.length;w++)b(w);else for(y(T.length-1),w=T.length-2;w>=0;w--)b(w);else if(l==="increasing"){for(w=1;w<T.length;w++)T[w]+=T[w-1];_==="exclude"&&(T.unshift(0),T.pop())}else{for(w=T.length-2;w>=0;w--)T[w]+=T[w+1];_==="exclude"&&(T.push(0),T.shift())}}q.exports={calc:s,calcAllAutoBins:c}}}),tF=Ze({"src/traces/histogram2d/calc.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=tS(),M=rS(),e=aS(),t=iS(),r=nS().calcAllAutoBins;q.exports=function(s,c){var f=x.getFromId(s,c.xaxis),g=x.getFromId(s,c.yaxis),v=c.xcalendar,T=c.ycalendar,l=function(Be){return f.r2c(Be,0,v)},_=function(Be){return g.r2c(Be,0,T)},w=function(Be){return f.c2r(Be,0,v)},S=function(Be){return g.c2r(Be,0,T)},E,y,b,p,u=r(s,c,f,"x"),m=u[0],h=u[1],P=r(s,c,g,"y"),L=P[0],z=P[1],F=c._length;h.length>F&&h.splice(F,h.length-F),z.length>F&&z.splice(F,z.length-F);var B=[],O=[],I=[],N=typeof m.size=="string",U=typeof L.size=="string",W=[],Q=[],ue=N?W:m,le=U?Q:L,he=0,G=[],$=[],J=c.histnorm,X=c.histfunc,oe=J.indexOf("density")!==-1,ie=X==="max"||X==="min",j=ie?null:0,ee=A.count,re=M[J],ce=!1,be=[],Ae=[],ze="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";ze&&X!=="count"&&(ce=X==="avg",ee=A[X]);var Re=m.size,Xe=l(m.start),it=l(m.end)+(Xe-x.tickIncrement(Xe,Re,!1,v))/1e6;for(E=Xe;E<it;E=x.tickIncrement(E,Re,!1,v))O.push(j),W.push(E),ce&&I.push(0);W.push(E);var ot=O.length,tt=(E-Xe)/ot,lt=w(Xe+tt/2),Ee=L.size,_e=_(L.start),fe=_(L.end)+(_e-x.tickIncrement(_e,Ee,!1,T))/1e6;for(E=_e;E<fe;E=x.tickIncrement(E,Ee,!1,T)){B.push(O.slice()),Q.push(E);var Fe=new Array(ot);for(y=0;y<ot;y++)Fe[y]=[];$.push(Fe),ce&&G.push(I.slice())}Q.push(E);var rt=B.length,st=(E-_e)/rt,Qe=S(_e+st/2);oe&&(be=o(O.length,ue,tt,N),Ae=o(B.length,le,st,U)),!N&&f.type==="date"&&(ue=a(l,ue)),!U&&g.type==="date"&&(le=a(_,le));var Lt=!0,kt=!0,Vt=new Array(ot),Zt=new Array(rt),Sr=1/0,xr=1/0,jr=1/0,wr=1/0;for(E=0;E<F;E++){var Ir=h[E],bt=z[E];b=d.findBin(Ir,ue),p=d.findBin(bt,le),b>=0&&b<ot&&p>=0&&p<rt&&(he+=ee(b,E,B[p],ze,G[p]),$[p][b].push(E),Lt&&(Vt[b]===void 0?Vt[b]=Ir:Vt[b]!==Ir&&(Lt=!1)),kt&&(Zt[p]===void 0?Zt[p]=bt:Zt[p]!==bt&&(kt=!1)),Sr=Math.min(Sr,Ir-W[b]),xr=Math.min(xr,W[b+1]-Ir),jr=Math.min(jr,bt-Q[p]),wr=Math.min(wr,Q[p+1]-bt))}if(ce)for(p=0;p<rt;p++)he+=e(B[p],G[p]);if(re)for(p=0;p<rt;p++)re(B[p],he,be,Ae[p]);return{x:h,xRanges:i(W,Lt&&Vt,Sr,xr,f,v),x0:lt,dx:tt,y:z,yRanges:i(Q,kt&&Zt,jr,wr,g,T),y0:Qe,dy:st,z:B,pts:$}};function o(n,s,c,f){var g=new Array(n),v;if(f)for(v=0;v<n;v++)g[v]=1/(s[v+1]-s[v]);else{var T=1/c;for(v=0;v<n;v++)g[v]=T}return g}function a(n,s){return{start:n(s.start),end:n(s.end),size:s.size}}function i(n,s,c,f,g,v){var T,l=n.length-1,_=new Array(l),w=t(c,f,n,g,v);for(T=0;T<l;T++){var S=(s||[])[T];_[T]=S===void 0?[w(n[T]),w(n[T+1],!0)]:[S,S]}return _}}}),Z2=Ze({"src/traces/heatmap/convert_column_xyz.js"(Z,q){"use strict";var d=ca(),x=qs().BADNUM,A=tv();q.exports=function(e,t,r,o,a,i){var n=e._length,s=t.makeCalcdata(e,o),c=r.makeCalcdata(e,a);s=A(e,t,o,s).vals,c=A(e,r,a,c).vals;var f=e.text,g=f!==void 0&&d.isArray1D(f),v=e.hovertext,T=v!==void 0&&d.isArray1D(v),l,_,w=d.distinctVals(s),S=w.vals,E=d.distinctVals(c),y=E.vals,b=[],p,u,m=y.length,h=S.length;for(l=0;l<i.length;l++)b[l]=d.init2dArray(m,h);g&&(p=d.init2dArray(m,h)),T&&(u=d.init2dArray(m,h));var P=d.init2dArray(m,h);for(l=0;l<n;l++)if(s[l]!==x&&c[l]!==x){var L=d.findBin(s[l]+w.minDiff/2,S),z=d.findBin(c[l]+E.minDiff/2,y);for(_=0;_<i.length;_++){var F=i[_],B=e[F],O=b[_];O[z][L]=B[l],P[z][L]=l}g&&(p[z][L]=f[l]),T&&(u[z][L]=v[l])}for(e["_"+o]=S,e["_"+a]=y,_=0;_<i.length;_++)e["_"+i[_]]=b[_];g&&(e._text=p),T&&(e._hovertext=u),t&&t.type==="category"&&(e["_"+o+"CategoryMap"]=S.map(function(I){return t._categories[I]})),r&&r.type==="category"&&(e["_"+a+"CategoryMap"]=y.map(function(I){return r._categories[I]})),e._after2before=P}}}),Y2=Ze({"src/traces/heatmap/clean_2d_array.js"(Z,q){"use strict";var d=ns(),x=ca(),A=qs().BADNUM;q.exports=function(e,t,r,o){var a,i,n,s,c,f;function g(S){if(d(S))return+S}if(t&&t.transpose){for(a=0,c=0;c<e.length;c++)a=Math.max(a,e[c].length);if(a===0)return!1;n=function(S){return S.length},s=function(S,E,y){return(S[y]||[])[E]}}else a=e.length,n=function(S,E){return S[E].length},s=function(S,E,y){return(S[E]||[])[y]};var v=function(S,E,y){return E===A||y===A?A:s(S,E,y)};function T(S){if(t&&t.type!=="carpet"&&t.type!=="contourcarpet"&&S&&S.type==="category"&&t["_"+S._id.charAt(0)].length){var E=S._id.charAt(0),y={},b=t["_"+E+"CategoryMap"]||t[E];for(c=0;c<b.length;c++)y[b[c]]=c;return function(p){var u=y[S._categories[p]];return u+1?u:A}}else return x.identity}var l=T(r),_=T(o);o&&o.type==="category"&&(a=o._categories.length);var w=new Array(a);for(c=0;c<a;c++)for(r&&r.type==="category"?i=r._categories.length:i=n(e,c),w[c]=new Array(i),f=0;f<i;f++)w[c][f]=g(v(e,_(c),l(f)));return w}}}),K2=Ze({"src/traces/heatmap/interp2d.js"(Z,q){"use strict";var d=ca(),x=.01,A=[[-1,0],[1,0],[0,-1],[0,1]];function M(t){return .5-.25*Math.min(1,t*.5)}q.exports=function(r,o){var a=1,i;for(e(r,o),i=0;i<o.length&&!(o[i][2]<4);i++);for(o=o.slice(i),i=0;i<100&&a>x;i++)a=e(r,o,M(a));return a>x&&d.log("interp2d didn't converge quickly",a),r};function e(t,r,o){var a=0,i,n,s,c,f,g,v,T,l,_,w,S,E;for(c=0;c<r.length;c++){for(i=r[c],n=i[0],s=i[1],w=t[n][s],_=0,l=0,f=0;f<4;f++)g=A[f],v=t[n+g[0]],v&&(T=v[s+g[1]],T!==void 0&&(_===0?S=E=T:(S=Math.min(S,T),E=Math.max(E,T)),l++,_+=T));if(l===0)throw"iterateInterp2d order is wrong: no defined neighbors";t[n][s]=_/l,w===void 0?l<4&&(a=1):(t[n][s]=(1+o)*t[n][s]-o*w,E>S&&(a=Math.max(a,Math.abs(t[n][s]-w)/(E-S))))}return a}}}),J2=Ze({"src/traces/heatmap/find_empties.js"(Z,q){"use strict";var d=ca().maxRowLength;q.exports=function(A){var M=[],e={},t=[],r=A[0],o=[],a=[0,0,0],i=d(A),n,s,c,f,g,v,T,l;for(s=0;s<A.length;s++)for(n=o,o=r,r=A[s+1]||[],c=0;c<i;c++)o[c]===void 0&&(v=(o[c-1]!==void 0?1:0)+(o[c+1]!==void 0?1:0)+(n[c]!==void 0?1:0)+(r[c]!==void 0?1:0),v?(s===0&&v++,c===0&&v++,s===A.length-1&&v++,c===o.length-1&&v++,v<4&&(e[[s,c]]=[s,c,v]),M.push([s,c,v])):t.push([s,c]));for(;t.length;){for(T={},l=!1,g=t.length-1;g>=0;g--)f=t[g],s=f[0],c=f[1],v=((e[[s-1,c]]||a)[2]+(e[[s+1,c]]||a)[2]+(e[[s,c-1]]||a)[2]+(e[[s,c+1]]||a)[2])/20,v&&(T[f]=[s,c,v],t.splice(g,1),l=!0);if(!l)throw"findEmpties iterated with no new neighbors";for(f in T)e[f]=T[f],M.push(T[f])}return M.sort(function(_,w){return w[2]-_[2]})}}}),oS=Ze({"src/traces/heatmap/make_bound_array.js"(Z,q){"use strict";var d=oo(),x=ca().isArrayOrTypedArray;q.exports=function(M,e,t,r,o,a){var i=[],n=d.traceIs(M,"contour"),s=d.traceIs(M,"histogram"),c,f,g,v=x(e)&&e.length>1;if(v&&!s&&a.type!=="category"){var T=e.length;if(T<=o){if(n)i=Array.from(e).slice(0,o);else if(o===1)a.type==="log"?i=[.5*e[0],2*e[0]]:i=[e[0]-.5,e[0]+.5];else if(a.type==="log"){for(i=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],g=1;g<T;g++)i.push(Math.sqrt(e[g-1]*e[g]));i.push(Math.pow(e[T-1],1.5)/Math.pow(e[T-2],.5))}else{for(i=[1.5*e[0]-.5*e[1]],g=1;g<T;g++)i.push((e[g-1]+e[g])*.5);i.push(1.5*e[T-1]-.5*e[T-2])}if(T<o){var l=i[i.length-1],_;if(a.type==="log")for(_=l/i[i.length-2],g=T;g<o;g++)l*=_,i.push(l);else for(_=l-i[i.length-2],g=T;g<o;g++)l+=_,i.push(l)}}else return n?e.slice(0,o):e.slice(0,o+1)}else{var w=M[a._id.charAt(0)+"calendar"];if(s)c=a.r2c(t,0,w);else if(x(e)&&e.length===1)c=e[0];else if(t===void 0)c=0;else{var S=a.type==="log"?a.d2c:a.r2c;c=S(t,0,w)}for(f=r||1,g=n?0:-.5;g<o;g++)i.push(c+f*g)}return i}}}),$2=Ze({"src/traces/heatmap/calc.js"(Z,q){"use strict";var d=oo(),x=ca(),A=Wo(),M=tv(),e=tF(),t=wp(),r=Z2(),o=Y2(),a=K2(),i=J2(),n=oS(),s=qs().BADNUM;q.exports=function(v,T){var l=A.getFromId(v,T.xaxis||"x"),_=A.getFromId(v,T.yaxis||"y"),w=d.traceIs(T,"contour"),S=d.traceIs(T,"histogram"),E=w?"best":T.zsmooth,y,b,p,u,m,h,P,L,z,F,B;if(l._minDtick=0,_._minDtick=0,S)B=e(v,T),u=B.orig_x,y=B.x,b=B.x0,p=B.dx,L=B.orig_y,m=B.y,h=B.y0,P=B.dy,z=B.z;else{var O=T.z;x.isArray1D(O)?(r(T,l,_,"x","y",["z"]),y=T._x,m=T._y,O=T._z):(u=T.x?l.makeCalcdata(T,"x"):[],L=T.y?_.makeCalcdata(T,"y"):[],y=M(T,l,"x",u).vals,m=M(T,_,"y",L).vals,T._x=y,T._y=m),b=T.x0,p=T.dx,h=T.y0,P=T.dy,z=o(O,T,l,_)}(l.rangebreaks||_.rangebreaks)&&(z=f(y,m,z),S||(y=c(y),m=c(m),T._x=y,T._y=m)),!S&&(w||T.connectgaps)&&(T._emptypoints=i(z),a(z,T._emptypoints));function I($){E=T._input.zsmooth=T.zsmooth=!1,x.warn('cannot use zsmooth: "fast": '+$)}function N($){if($.length>1){var J=($[$.length-1]-$[0])/($.length-1),X=Math.abs(J/100);for(F=0;F<$.length-1;F++)if(Math.abs($[F+1]-$[F]-J)>X)return!1}return!0}T._islinear=!1,l.type==="log"||_.type==="log"?E==="fast"&&I("log axis found"):N(y)?N(m)?T._islinear=!0:E==="fast"&&I("y scale is not linear"):E==="fast"&&I("x scale is not linear");var U=x.maxRowLength(z),W=T.xtype==="scaled"?"":y,Q=n(T,W,b,p,U,l),ue=T.ytype==="scaled"?"":m,le=n(T,ue,h,P,z.length,_);T._extremes[l._id]=A.findExtremes(l,Q),T._extremes[_._id]=A.findExtremes(_,le);var he={x:Q,y:le,z,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&u&&(he.orig_x=u),T.yperiodalignment&&L&&(he.orig_y=L),W&&W.length===Q.length-1&&(he.xCenter=W),ue&&ue.length===le.length-1&&(he.yCenter=ue),S&&(he.xRanges=B.xRanges,he.yRanges=B.yRanges,he.pts=B.pts),w||t(v,T,{vals:z,cLetter:"z"}),w&&T.contours&&T.contours.coloring==="heatmap"){var G={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};he.xfill=n(G,W,b,p,U,l),he.yfill=n(G,ue,h,P,z.length,_)}return[he]};function c(g){for(var v=[],T=g.length,l=0;l<T;l++){var _=g[l];_!==s&&v.push(_)}return v}function f(g,v,T){for(var l=[],_=-1,w=0;w<T.length;w++)if(v[w]!==s){_++,l[_]=[];for(var S=0;S<T[w].length;S++)g[S]!==s&&l[_].push(T[w][S])}return l}}}),Q2=Ze({"src/constants/pixelated_image.js"(Z){"use strict";Z.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"]],Z.STYLE=Z.CSS_DECLARATIONS.map(function(q){return q.join(": ")+"; "}).join("")}}),sS=Ze({"src/lib/supports_pixelated_image.js"(Z,q){"use strict";var d=Q2(),x=as(),A=ca(),M=null;function e(){if(M!==null)return M;M=!1;var t=A.isSafari()||A.isMacWKWebView()||A.isIOS();if(window.navigator.userAgent&&!t){var r=Array.from(d.CSS_DECLARATIONS).reverse(),o=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof o=="function")M=r.some(function(s){return o.apply(null,s)});else{var a=x.tester.append("image").attr("style",d.STYLE),i=window.getComputedStyle(a.node()),n=i.imageRendering;M=r.some(function(s){var c=s[1];return n===c||n===c.toLowerCase()}),a.remove()}}return M}q.exports=e}}),e3=Ze({"src/traces/heatmap/plot.js"(Z,q){"use strict";var d=On(),x=Ch(),A=oo(),M=as(),e=Wo(),t=ca(),r=fu(),o=P2(),a=Yn(),i=rc().extractOpts,n=rc().makeColorScaleFuncFromTrace,s=vd(),c=mh(),f=c.LINE_SPACING,g=sS(),v=Q2().STYLE,T="heatmap-label";function l(y){return y.selectAll("g."+T)}function _(y){l(y).remove()}q.exports=function(y,b,p,u){var m=b.xaxis,h=b.yaxis;t.makeTraceGroups(u,p,"hm").each(function(P){var L=d.select(this),z=P[0],F=z.trace,B=F.xgap||0,O=F.ygap||0,I=z.z,N=z.x,U=z.y,W=z.xCenter,Q=z.yCenter,ue=A.traceIs(F,"contour"),le=ue?"best":F.zsmooth,he=I.length,G=t.maxRowLength(I),$=!1,J=!1,X,oe,ie,j,ee,re,ce,be;for(re=0;X===void 0&&re<N.length-1;)X=m.c2p(N[re]),re++;for(re=N.length-1;oe===void 0&&re>0;)oe=m.c2p(N[re]),re--;for(oe<X&&(ie=oe,oe=X,X=ie,$=!0),re=0;j===void 0&&re<U.length-1;)j=h.c2p(U[re]),re++;for(re=U.length-1;ee===void 0&&re>0;)ee=h.c2p(U[re]),re--;ee<j&&(ie=j,j=ee,ee=ie,J=!0),ue&&(W=N,Q=U,N=z.xfill,U=z.yfill);var Ae="default";if(le?Ae=le==="best"?"smooth":"fast":F._islinear&&B===0&&O===0&&g()&&(Ae="fast"),Ae!=="fast"){var ze=le==="best"?0:.5;X=Math.max(-ze*m._length,X),oe=Math.min((1+ze)*m._length,oe),j=Math.max(-ze*h._length,j),ee=Math.min((1+ze)*h._length,ee)}var Re=Math.round(oe-X),Xe=Math.round(ee-j),it=X>=m._length||oe<=0||j>=h._length||ee<=0;if(it){var ot=L.selectAll("image").data([]);ot.exit().remove(),_(L);return}var tt,lt;Ae==="fast"?(tt=G,lt=he):(tt=Re,lt=Xe);var Ee=document.createElement("canvas");Ee.width=tt,Ee.height=lt;var _e=Ee.getContext("2d",{willReadFrequently:!0}),fe=n(F,{noNumericCheck:!0,returnArray:!0}),Fe,rt;Ae==="fast"?(Fe=$?function(Da){return G-1-Da}:t.identity,rt=J?function(Da){return he-1-Da}:t.identity):(Fe=function(Da){return t.constrain(Math.round(m.c2p(N[Da])-X),0,Re)},rt=function(Da){return t.constrain(Math.round(h.c2p(U[Da])-j),0,Xe)});var st=rt(0),Qe=[st,st],Lt=$?0:1,kt=J?0:1,Vt=0,Zt=0,Sr=0,xr=0,jr,wr,Ir,bt,Be;function Ke(Da,Xi){if(Da!==void 0){var Li=fe(Da);return Li[0]=Math.round(Li[0]),Li[1]=Math.round(Li[1]),Li[2]=Math.round(Li[2]),Vt+=Xi,Zt+=Li[0]*Xi,Sr+=Li[1]*Xi,xr+=Li[2]*Xi,Li}return[0,0,0,0]}function Ue(Da,Xi,Li,fn){var An=Da[Li.bin0];if(An===void 0)return Ke(void 0,1);var kn=Da[Li.bin1],zn=Xi[Li.bin0],Xn=Xi[Li.bin1],to=kn-An||0,mo=zn-An||0,pn;return kn===void 0?Xn===void 0?pn=0:zn===void 0?pn=2*(Xn-An):pn=(2*Xn-zn-An)*2/3:Xn===void 0?zn===void 0?pn=0:pn=(2*An-kn-zn)*2/3:zn===void 0?pn=(2*Xn-kn-An)*2/3:pn=Xn+An-kn-zn,Ke(An+Li.frac*to+fn.frac*(mo+Li.frac*pn))}if(Ae!=="default"){var Me=0,qe;try{qe=new Uint8Array(tt*lt*4)}catch{qe=new Array(tt*lt*4)}if(Ae==="smooth"){var Ce=W||N,Te=Q||U,Pe=new Array(Ce.length),at=new Array(Te.length),yt=new Array(Re),Tt=W?S:w,Ot=Q?S:w,Gt,rr,Qt;for(re=0;re<Ce.length;re++)Pe[re]=Math.round(m.c2p(Ce[re])-X);for(re=0;re<Te.length;re++)at[re]=Math.round(h.c2p(Te[re])-j);for(re=0;re<Re;re++)yt[re]=Tt(re,Pe);for(ce=0;ce<Xe;ce++)for(Gt=Ot(ce,at),rr=I[Gt.bin0],Qt=I[Gt.bin1],re=0;re<Re;re++,Me+=4)Be=Ue(rr,Qt,yt[re],Gt),E(qe,Me,Be)}else for(ce=0;ce<he;ce++)for(bt=I[ce],Qe=rt(ce),re=0;re<G;re++)Be=Ke(bt[re],1),Me=(Qe*G+Fe(re))*4,E(qe,Me,Be);var Tr=_e.createImageData(tt,lt);try{Tr.data.set(qe)}catch{var la=Tr.data,Ua=la.length;for(ce=0;ce<Ua;ce++)la[ce]=qe[ce]}_e.putImageData(Tr,0,0)}else{var Ba=Math.floor(B/2),Ra=Math.floor(O/2);for(ce=0;ce<he;ce++)if(bt=I[ce],Qe.reverse(),Qe[kt]=rt(ce+1),!(Qe[0]===Qe[1]||Qe[0]===void 0||Qe[1]===void 0))for(wr=Fe(0),jr=[wr,wr],re=0;re<G;re++)jr.reverse(),jr[Lt]=Fe(re+1),!(jr[0]===jr[1]||jr[0]===void 0||jr[1]===void 0)&&(Ir=bt[re],Be=Ke(Ir,(jr[1]-jr[0])*(Qe[1]-Qe[0])),_e.fillStyle="rgba("+Be.join(",")+")",_e.fillRect(jr[0]+Ba,Qe[0]+Ra,jr[1]-jr[0]-B,Qe[1]-Qe[0]-O))}Zt=Math.round(Zt/Vt),Sr=Math.round(Sr/Vt),xr=Math.round(xr/Vt);var ei=x("rgb("+Zt+","+Sr+","+xr+")");y._hmpixcount=(y._hmpixcount||0)+Vt,y._hmlumcount=(y._hmlumcount||0)+Vt*ei.getLuminance();var za=L.selectAll("image").data(P);za.enter().append("svg:image").attr({xmlns:s.svg,preserveAspectRatio:"none"}),za.attr({height:Xe,width:Re,x:X,y:j,"xlink:href":Ee.toDataURL("image/png")}),Ae==="fast"&&!le&&za.attr("style",v),_(L);var ti=F.texttemplate;if(ti){var Ci=i(F),Jt={type:"linear",range:[Ci.min,Ci.max],_separators:m._separators,_numFormat:m._numFormat},Nt=F.type==="histogram2dcontour",Kt=F.type==="contour",Wt=Kt?1:0,Pr=Kt?he-1:he,ta=Kt?1:0,ma=Kt?G-1:G,ra=[];for(re=Wt;re<Pr;re++){var Ia;if(Kt)Ia=z.y[re];else if(Nt){if(re===0||re===he-1)continue;Ia=z.y[re]}else if(z.yCenter)Ia=z.yCenter[re];else{if(re+1===he&&z.y[re+1]===void 0)continue;Ia=(z.y[re]+z.y[re+1])/2}var Ha=Math.round(h.c2p(Ia));if(!(0>Ha||Ha>h._length))for(ce=ta;ce<ma;ce++){var $a;if(Kt)$a=z.x[ce];else if(Nt){if(ce===0||ce===G-1)continue;$a=z.x[ce]}else if(z.xCenter)$a=z.xCenter[ce];else{if(ce+1===G&&z.x[ce+1]===void 0)continue;$a=(z.x[ce]+z.x[ce+1])/2}var ai=Math.round(m.c2p($a));if(!(0>ai||ai>m._length)){var mi=o({x:$a,y:Ia},F,y._fullLayout);mi.x=$a,mi.y=Ia;var xt=z.z[re][ce];xt===void 0?(mi.z="",mi.zLabel=""):(mi.z=xt,mi.zLabel=e.tickText(Jt,xt,"hover").text);var ct=z.text&&z.text[re]&&z.text[re][ce];(ct===void 0||ct===!1)&&(ct=""),mi.text=ct;var Nr=t.texttemplateString(ti,mi,y._fullLayout._d3locale,mi,F._meta||{});if(Nr){var Or=Nr.split("<br>"),Rr=Or.length,Lr=0;for(be=0;be<Rr;be++)Lr=Math.max(Lr,Or[be].length);ra.push({l:Rr,c:Lr,t:Nr,x:ai,y:Ha,z:xt})}}}}var Gr=F.textfont,Kr=Gr.size,Ur=y._fullLayout.font.size;if(!Kr||Kr==="auto"){var aa=1/0,da=1/0,fa=0,It=0;for(be=0;be<ra.length;be++){var dr=ra[be];if(fa=Math.max(fa,dr.l),It=Math.max(It,dr.c),be<ra.length-1){var kr=ra[be+1],ia=Math.abs(kr.x-dr.x),Ca=Math.abs(kr.y-dr.y);ia&&(aa=Math.min(aa,ia)),Ca&&(da=Math.min(da,Ca))}}!isFinite(aa)||!isFinite(da)?Kr=Ur:(aa-=B,da-=O,aa/=It,da/=fa,aa/=f/2,da/=f,Kr=Math.min(Math.floor(aa),Math.floor(da),Ur))}if(Kr<=0||!isFinite(Kr))return;var Fa=function(Da){return Da.x},Ya=function(Da){return Da.y-Kr*(Da.l*f/2-1)},ha=l(L).data(ra);ha.enter().append("g").classed(T,1).append("text").attr("text-anchor","middle").each(function(Da){var Xi=d.select(this),Li=Gr.color;(!Li||Li==="auto")&&(Li=a.contrast(Da.z===void 0?y._fullLayout.plot_bgcolor:"rgba("+fe(Da.z).join()+")")),Xi.attr("data-notex",1).call(r.positionText,Fa(Da),Ya(Da)).call(M.font,{family:Gr.family,size:Kr,color:Li,weight:Gr.weight,style:Gr.style,variant:Gr.variant,textcase:Gr.textcase,lineposition:Gr.lineposition,shadow:Gr.shadow}).text(Da.t).call(r.convertToTspans,y)})}})};function w(y,b){var p=b.length-2,u=t.constrain(t.findBin(y,b),0,p),m=b[u],h=b[u+1],P=t.constrain(u+(y-m)/(h-m)-.5,0,p),L=Math.round(P),z=Math.abs(P-L);return!P||P===p||!z?{bin0:L,bin1:L,frac:0}:{bin0:L,frac:z,bin1:Math.round(L+z/(P-L))}}function S(y,b){var p=b.length-1,u=t.constrain(t.findBin(y,b),0,p),m=b[u],h=b[u+1],P=(y-m)/(h-m)||0;return P<=0?{bin0:u,bin1:u,frac:0}:P<.5?{bin0:u,bin1:u+1,frac:P}:{bin0:u+1,bin1:u,frac:1-P}}function E(y,b,p){y[b]=p[0],y[b+1]=p[1],y[b+2]=p[2],y[b+3]=Math.round(p[3]*255)}}}),a0=Ze({"src/traces/heatmap/colorbar.js"(Z,q){"use strict";q.exports={min:"zmin",max:"zmax"}}}),t3=Ze({"src/traces/heatmap/style.js"(Z,q){"use strict";var d=On();q.exports=function(A){d.select(A).selectAll(".hm image").style("opacity",function(M){return M.trace.opacity})}}}),r3=Ze({"src/traces/heatmap/hover.js"(Z,q){"use strict";var d=ef(),x=ca(),A=x.isArrayOrTypedArray,M=Wo(),e=rc().extractOpts;q.exports=function(r,o,a,i,n){n||(n={});var s=n.isContour,c=r.cd[0],f=c.trace,g=r.xa,v=r.ya,T=c.x,l=c.y,_=c.z,w=c.xCenter,S=c.yCenter,E=c.zmask,y=f.zhoverformat,b=T,p=l,u,m,h,P;if(r.index!==!1){try{h=Math.round(r.index[1]),P=Math.round(r.index[0])}catch{x.error("Error hovering on heatmap, pointNumber must be [row,col], found:",r.index);return}if(h<0||h>=_[0].length||P<0||P>_.length)return}else{if(d.inbox(o-T[0],o-T[T.length-1],0)>0||d.inbox(a-l[0],a-l[l.length-1],0)>0)return;if(s){var L;for(b=[2*T[0]-T[1]],L=1;L<T.length;L++)b.push((T[L]+T[L-1])/2);for(b.push([2*T[T.length-1]-T[T.length-2]]),p=[2*l[0]-l[1]],L=1;L<l.length;L++)p.push((l[L]+l[L-1])/2);p.push([2*l[l.length-1]-l[l.length-2]])}h=Math.max(0,Math.min(b.length-2,x.findBin(o,b))),P=Math.max(0,Math.min(p.length-2,x.findBin(a,p)))}var z=g.c2p(T[h]),F=g.c2p(T[h+1]),B=v.c2p(l[P]),O=v.c2p(l[P+1]),I,N;s?(I=c.orig_x||T,N=c.orig_y||l,F=z,u=I[h],O=B,m=N[P]):(I=c.orig_x||w||T,N=c.orig_y||S||l,u=w?I[h]:(I[h]+I[h+1])/2,m=S?N[P]:(N[P]+N[P+1])/2,g&&g.type==="category"&&(u=T[h]),v&&v.type==="category"&&(m=l[P]),f.zsmooth&&(z=F=g.c2p(u),B=O=v.c2p(m)));var U=_[P][h];if(E&&!E[P][h]&&(U=void 0),!(U===void 0&&!f.hoverongaps)){var W;A(c.hovertext)&&A(c.hovertext[P])?W=c.hovertext[P][h]:A(c.text)&&A(c.text[P])&&(W=c.text[P][h]);var Q=e(f),ue={type:"linear",range:[Q.min,Q.max],hoverformat:y,_separators:g._separators,_numFormat:g._numFormat},le=M.tickText(ue,U,"hover").text;return[x.extendFlat(r,{index:f._after2before?f._after2before[P][h]:[P,h],distance:r.maxHoverDistance,spikeDistance:r.maxSpikeDistance,x0:z,x1:F,y0:B,y1:O,xLabelVal:u,yLabelVal:m,zLabelVal:U,zLabel:le,text:W})]}}}}),rF=Ze({"src/traces/heatmap/index.js"(Z,q){"use strict";q.exports={attributes:p1(),supplyDefaults:eF(),calc:$2(),plot:e3(),colorbar:a0(),style:t3(),hoverPoints:r3(),moduleType:"trace",name:"heatmap",basePlotModule:Zf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}}),aF=Ze({"lib/heatmap.js"(Z,q){"use strict";q.exports=rF()}}),lS=Ze({"src/traces/histogram/bin_attributes.js"(Z,q){"use strict";q.exports=function(x,A){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}}),iF=Ze({"src/traces/histogram/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["binNumber"]}}}),a3=Ze({"src/traces/histogram/attributes.js"(Z,q){"use strict";var d=Sv(),x=Qc().axisHoverFormat,A=Cs().hovertemplateAttrs,M=Cs().texttemplateAttrs,e=tc(),t=lS(),r=iF(),o=rs().extendFlat;q.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:x("x"),yhoverformat:x("y"),text:o({},d.text,{}),hovertext:o({},d.hovertext,{}),orientation:d.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:t("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:t("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:A({},{keys:r.eventDataKeys}),texttemplate:M({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:o({},d.textposition,{arrayOk:!1}),textfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:e({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:d.insidetextanchor,textangle:d.textangle,cliponaxis:d.cliponaxis,constraintext:d.constraintext,marker:d.marker,offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:d.selected,unselected:d.unselected,zorder:d.zorder}}}),nF=Ze({"src/traces/histogram/defaults.js"(Z,q){"use strict";var d=oo(),x=ca(),A=Yn(),M=gd().handleText,e=j2(),t=a3();q.exports=function(o,a,i,n){function s(p,u){return x.coerce(o,a,t,p,u)}var c=s("x"),f=s("y"),g=s("cumulative.enabled");g&&(s("cumulative.direction"),s("cumulative.currentbin")),s("text");var v=s("textposition");M(o,a,n,s,v,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s("hovertext"),s("hovertemplate"),s("xhoverformat"),s("yhoverformat");var T=s("orientation",f&&!c?"h":"v"),l=T==="v"?"x":"y",_=T==="v"?"y":"x",w=c&&f?Math.min(x.minRowLength(c)&&x.minRowLength(f)):x.minRowLength(a[l]||[]);if(!w){a.visible=!1;return}a._length=w;var S=d.getComponentMethod("calendars","handleTraceDefaults");S(o,a,["x","y"],n);var E=a[_];E&&s("histfunc"),s("histnorm"),s("autobin"+l),e(o,a,s,i,n),x.coerceSelectionMarkerOpacity(a,s);var y=(a.marker.line||{}).color,b=d.getComponentMethod("errorbars","supplyDefaults");b(o,a,y||A.defaultLine,{axis:"y"}),b(o,a,y||A.defaultLine,{axis:"x",inherit:"y"}),s("zorder")}}}),i3=Ze({"src/traces/histogram/cross_trace_defaults.js"(Z,q){"use strict";var d=ca(),x=$c(),A=oo().traceIs,M=J0(),e=gd().validateCornerradius,t=d.nestedProperty,r=Y0().getAxisGroup,o=[{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"}],a=["x","y"];q.exports=function(n,s){var c=s._histogramBinOpts={},f=[],g={},v=[],T,l,_,w,S,E,y;function b(le,he){return d.coerce(T._input,T,T._module.attributes,le,he)}function p(le){return le.orientation==="v"?"x":"y"}function u(le,he){var G=x.getFromTrace({_fullLayout:s},le,he);return G.type}function m(le,he,G){var $=le.uid+"__"+G;he||(he=$);var J=u(le,G),X=le[G+"calendar"]||"",oe=c[he],ie=!0;oe&&(J===oe.axType&&X===oe.calendar?(ie=!1,oe.traces.push(le),oe.dirs.push(G)):(he=$,J!==oe.axType&&d.warn(["Attempted to group the bins of trace",le.index,"set on a","type:"+J,"axis","with bins on","type:"+oe.axType,"axis."].join(" ")),X!==oe.calendar&&d.warn(["Attempted to group the bins of trace",le.index,"set with a",X,"calendar","with bins",oe.calendar?"on a "+oe.calendar+" calendar":"w/o a set calendar"].join(" ")))),ie&&(c[he]={traces:[le],dirs:[G],axType:J,calendar:le[G+"calendar"]||""}),le["_"+G+"bingroup"]=he}for(S=0;S<n.length;S++)if(T=n[S],A(T,"histogram")){if(f.push(T),delete T._xautoBinFinished,delete T._yautoBinFinished,T.type==="histogram"){var h=b("marker.cornerradius",s.barcornerradius);T.marker&&(T.marker.cornerradius=e(h))}A(T,"2dMap")||M(T._input,T,s,b,s.barmode)}var P=s._alignmentOpts||{};for(S=0;S<f.length;S++){if(T=f[S],_="",!A(T,"2dMap")){if(w=p(T),s.barmode==="group"&&T.alignmentgroup){var L=T[w+"axis"],z=r(s,L)+T.orientation;(P[z]||{})[T.alignmentgroup]&&(_=z)}!_&&s.barmode!=="overlay"&&(_=r(s,T.xaxis)+r(s,T.yaxis)+p(T))}_?(g[_]||(g[_]=[]),g[_].push(T)):v.push(T)}for(_ in g){if(l=g[_],l.length===1){v.push(l[0]);continue}var F=!1;for(l.length&&(T=l[0],F=b("bingroup")),_=F||_,S=0;S<l.length;S++){T=l[S];var B=T._input.bingroup;B&&B!==_&&d.warn(["Trace",T.index,"must match","within bingroup",_+".","Ignoring its bingroup:",B,"setting."].join(" ")),T.bingroup=_,m(T,_,p(T))}}for(S=0;S<v.length;S++){T=v[S];var O=b("bingroup");if(A(T,"2dMap"))for(y=0;y<2;y++){w=a[y];var I=b(w+"bingroup",O?O+"__"+w:null);m(T,I,w)}else m(T,O,p(T))}for(_ in c){var N=c[_];for(l=N.traces,E=0;E<o.length;E++){var U=o[E],W=U.name,Q,ue;if(!(W==="nbins"&&N.sizeFound)){for(S=0;S<l.length;S++){if(T=l[S],w=N.dirs[S],Q=U.aStr[w],t(T._input,Q).get()!==void 0){N[W]=b(Q),N[W+"Found"]=!0;break}ue=(T._autoBin||{})[w]||{},ue[W]&&t(T,Q).set(ue[W])}if(W==="start"||W==="end")for(;S<l.length;S++)T=l[S],T["_"+w+"bingroup"]&&(ue=(T._autoBin||{})[w]||{},b(Q,ue[W]));W==="nbins"&&!N.sizeFound&&!N.nbinsFound&&(T=l[0],N[W]=b(Q))}}}}}}),oF=Ze({"src/traces/histogram/hover.js"(Z,q){"use strict";var d=f1().hoverPoints,x=Wo().hoverLabelText;q.exports=function(M,e,t,r,o){var a=d(M,e,t,r,o);if(a){M=a[0];var i=M.cd[M.index],n=M.cd[0].trace;if(!n.cumulative.enabled){var s=n.orientation==="h"?"y":"x";M[s+"Label"]=x(M[s+"a"],[i.ph0,i.ph1],n[s+"hoverformat"])}return a}}}}),uS=Ze({"src/traces/histogram/event_data.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t){if(x.x="xVal"in A?A.xVal:A.x,x.y="yVal"in A?A.yVal:A.y,"zLabelVal"in A&&(x.z=A.zLabelVal),A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),!(M.cumulative||{}).enabled){var r=Array.isArray(t)?e[0].pts[t[0]][t[1]]:e[t].pts;x.pointNumbers=r,x.binNumber=x.pointNumber,delete x.pointNumber,delete x.pointIndex;var o;if(M._indexToPoints){o=[];for(var a=0;a<r.length;a++)o=o.concat(M._indexToPoints[r[a]])}else o=r;x.pointIndices=o}return x}}}),sF=Ze({"src/traces/histogram/index.js"(Z,q){"use strict";q.exports={attributes:a3(),layoutAttributes:U2(),supplyDefaults:nF(),crossTraceDefaults:i3(),supplyLayoutDefaults:K5(),calc:nS().calc,crossTraceCalc:$0().crossTraceCalc,plot:eg().plot,layerName:"barlayer",style:Nd().style,styleOnSelect:Nd().styleOnSelect,colorbar:hp(),hoverPoints:oF(),selectPoints:h1(),eventData:uS(),moduleType:"trace",name:"histogram",basePlotModule:Zf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}}),lF=Ze({"lib/histogram.js"(Z,q){"use strict";q.exports=sF()}}),n3=Ze({"src/traces/histogram2d/attributes.js"(Z,q){"use strict";var d=a3(),x=lS(),A=p1(),M=eu(),e=Qc().axisHoverFormat,t=Cs().hovertemplateAttrs,r=Cs().texttemplateAttrs,o=Mu(),a=rs().extendFlat;q.exports=a({x:d.x,y:d.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:x("x"),nbinsy:d.nbinsy,ybins:x("y"),autobinx:d.autobinx,autobiny:d.autobiny,bingroup:a({},d.bingroup,{}),xbingroup:a({},d.bingroup,{}),ybingroup:a({},d.bingroup,{}),xgap:A.xgap,ygap:A.ygap,zsmooth:A.zsmooth,xhoverformat:e("x"),yhoverformat:e("y"),zhoverformat:e("z",1),hovertemplate:t({},{keys:"z"}),texttemplate:r({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:A.textfont,showlegend:a({},M.showlegend,{dflt:!1})},o("",{cLetter:"z",autoColorDflt:!1}))}}),cS=Ze({"src/traces/histogram2d/sample_defaults.js"(Z,q){"use strict";var d=oo(),x=ca();q.exports=function(M,e,t,r){var o=t("x"),a=t("y"),i=x.minRowLength(o),n=x.minRowLength(a);if(!i||!n){e.visible=!1;return}e._length=Math.min(i,n);var s=d.getComponentMethod("calendars","handleTraceDefaults");s(M,e,["x","y"],r);var c=t("z")||t("marker.color");c&&t("histfunc"),t("histnorm"),t("autobinx"),t("autobiny")}}}),uF=Ze({"src/traces/histogram2d/defaults.js"(Z,q){"use strict";var d=ca(),x=cS(),A=eS(),M=gh(),e=j_(),t=n3();q.exports=function(o,a,i,n){function s(c,f){return d.coerce(o,a,t,c,f)}x(o,a,s,n),a.visible!==!1&&(A(o,a,s,n),M(o,a,n,s,{prefix:"",cLetter:"z"}),s("hovertemplate"),e(s,n),s("xhoverformat"),s("yhoverformat"))}}}),cF=Ze({"src/traces/histogram2d/hover.js"(Z,q){"use strict";var d=r3(),x=Wo().hoverLabelText;q.exports=function(M,e,t,r,o){var a=d(M,e,t,r,o);if(a){M=a[0];var i=M.index,n=i[0],s=i[1],c=M.cd[0],f=c.trace,g=c.xRanges[s],v=c.yRanges[n];return M.xLabel=x(M.xa,[g[0],g[1]],f.xhoverformat),M.yLabel=x(M.ya,[v[0],v[1]],f.yhoverformat),a}}}}),fF=Ze({"src/traces/histogram2d/index.js"(Z,q){"use strict";q.exports={attributes:n3(),supplyDefaults:uF(),crossTraceDefaults:i3(),calc:$2(),plot:e3(),layerName:"heatmaplayer",colorbar:a0(),style:t3(),hoverPoints:cF(),eventData:uS(),moduleType:"trace",name:"histogram2d",basePlotModule:Zf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}}),hF=Ze({"lib/histogram2d.js"(Z,q){"use strict";q.exports=fF()}}),o3=Ze({"src/constants/filter_ops.js"(Z,q){"use strict";q.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),q_=Ze({"src/traces/contour/attributes.js"(Z,q){"use strict";var d=p1(),x=tf(),A=Qc(),M=A.axisHoverFormat,e=A.descriptionOnlyNumbers,t=Mu(),r=Gh().dash,o=tc(),a=rs().extendFlat,i=o3(),n=i.COMPARISON_OPS2,s=i.INTERVAL_OPS,c=x.line;q.exports=a({z:d.z,x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,text:d.text,hovertext:d.hovertext,transpose:d.transpose,xtype:d.xtype,ytype:d.ytype,xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:d.hovertemplate,texttemplate:a({},d.texttemplate,{}),textfont:a({},d.textfont,{}),hoverongaps:d.hoverongaps,connectgaps:a({},d.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:o({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:e("contour label")},operation:{valType:"enumerated",values:[].concat(n).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:r,smoothing:a({},c.smoothing,{}),editType:"plot"},zorder:x.zorder},t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),fS=Ze({"src/traces/histogram2dcontour/attributes.js"(Z,q){"use strict";var d=n3(),x=q_(),A=Mu(),M=Qc().axisHoverFormat,e=rs().extendFlat;q.exports=e({x:d.x,y:d.y,z:d.z,marker:d.marker,histnorm:d.histnorm,histfunc:d.histfunc,nbinsx:d.nbinsx,xbins:d.xbins,nbinsy:d.nbinsy,ybins:d.ybins,autobinx:d.autobinx,autobiny:d.autobiny,bingroup:d.bingroup,xbingroup:d.xbingroup,ybingroup:d.ybingroup,autocontour:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:e({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z",1),hovertemplate:d.hovertemplate,texttemplate:x.texttemplate,textfont:x.textfont},A("",{cLetter:"z",editTypeOverride:"calc"}))}}),s3=Ze({"src/traces/contour/contours_defaults.js"(Z,q){"use strict";q.exports=function(x,A,M,e){var t=e("contours.start"),r=e("contours.end"),o=t===!1||r===!1,a=M("contours.size"),i;o?i=A.autocontour=!0:i=M("autocontour",!1),(i||!a)&&M("ncontours")}}}),hS=Ze({"src/traces/contour/label_defaults.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M,e,t){t||(t={});var r=A("contours.showlabels");if(r){var o=M.font;d.coerceFont(A,"contours.labelfont",o,{overrideDflt:{color:e}}),A("contours.labelformat")}t.hasHover!==!1&&A("zhoverformat")}}}),l3=Ze({"src/traces/contour/style_defaults.js"(Z,q){"use strict";var d=gh(),x=hS();q.exports=function(M,e,t,r,o){var a=t("contours.coloring"),i,n="";a==="fill"&&(i=t("contours.showlines")),i!==!1&&(a!=="lines"&&(n=t("line.color","#000")),t("line.width",.5),t("line.dash")),a!=="none"&&(M.showlegend!==!0&&(e.showlegend=!1),e._dfltShowLegend=!1,d(M,e,r,t,{prefix:"",cLetter:"z"})),t("line.smoothing"),x(t,r,n,o)}}}),pF=Ze({"src/traces/histogram2dcontour/defaults.js"(Z,q){"use strict";var d=ca(),x=cS(),A=s3(),M=l3(),e=j_(),t=fS();q.exports=function(o,a,i,n){function s(f,g){return d.coerce(o,a,t,f,g)}function c(f){return d.coerce2(o,a,t,f)}x(o,a,s,n),a.visible!==!1&&(A(o,a,s,c),M(o,a,s,n),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),a.contours&&a.contours.coloring==="heatmap"&&e(s,n))}}}),pS=Ze({"src/traces/contour/set_contours.js"(Z,q){"use strict";var d=Wo(),x=ca();q.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,a=e.zmax;(e.zauto||o===void 0)&&(o=x.aggNums(Math.min,null,t)),(e.zauto||a===void 0)&&(a=x.aggNums(Math.max,null,t));var i=A(o,a,e.ncontours);r.size=i.dtick,r.start=d.tickFirst(i),i.range.reverse(),r.end=d.tickFirst(i),r.start===o&&(r.start+=r.size),r.end===a&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),x.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if(r.type!=="constraint"){var n=r.start,s=r.end,c=e._input.contours;if(n>s&&(r.start=c.start=s,s=r.end=c.end=n,n=r.start),!(r.size>0)){var f;n===s?f=1:f=A(n,s,e.ncontours).dtick,c.size=r.size=f}}};function A(M,e,t){var r={type:"linear",range:[M,e]};return d.autoTicks(r,(e-M)/(t||15)),r}}}),V_=Ze({"src/traces/contour/end_plus.js"(Z,q){"use strict";q.exports=function(x){return x.end+x.size/1e6}}}),dS=Ze({"src/traces/contour/calc.js"(Z,q){"use strict";var d=rc(),x=$2(),A=pS(),M=V_();q.exports=function(t,r){var o=x(t,r),a=o[0].z;A(r,a);var i=r.contours,n=d.extractOpts(r),s;if(i.coloring==="heatmap"&&n.auto&&r.autocontour===!1){var c=i.start,f=M(i),g=i.size||1,v=Math.floor((f-c)/g)+1;isFinite(g)||(g=1,v=1);var T=c-g/2,l=T+v*g;s=[T,l]}else s=a;return d.calc(t,r,{vals:s,cLetter:"z"}),o}}}),G_=Ze({"src/traces/contour/constants.js"(Z,q){"use strict";q.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}}}}),vS=Ze({"src/traces/contour/make_crossings.js"(Z,q){"use strict";var d=G_();q.exports=function(M){var e=M[0].z,t=e.length,r=e[0].length,o=t===2||r===2,a,i,n,s,c,f,g,v,T;for(i=0;i<t-1;i++)for(s=[],i===0&&(s=s.concat(d.BOTTOMSTART)),i===t-2&&(s=s.concat(d.TOPSTART)),a=0;a<r-1;a++)for(n=s.slice(),a===0&&(n=n.concat(d.LEFTSTART)),a===r-2&&(n=n.concat(d.RIGHTSTART)),c=a+","+i,f=[[e[i][a],e[i][a+1]],[e[i+1][a],e[i+1][a+1]]],T=0;T<M.length;T++)v=M[T],g=x(v.level,f),g&&(v.crossings[c]=g,n.indexOf(g)!==-1&&(v.starts.push([a,i]),o&&n.indexOf(g,n.indexOf(g)+1)!==-1&&v.starts.push([a,i])))};function x(A,M){var e=(M[0][0]>A?0:1)+(M[0][1]>A?0:2)+(M[1][1]>A?0:4)+(M[1][0]>A?0:8);if(e===5||e===10){var t=(M[0][0]+M[0][1]+M[1][0]+M[1][1])/4;return A>t?e===5?713:1114:e===5?104:208}return e===15?0:e}}}),mS=Ze({"src/traces/contour/find_all_paths.js"(Z,q){"use strict";var d=ca(),x=G_();q.exports=function(a,i,n){var s,c,f,g,v;for(i=i||.01,n=n||.01,f=0;f<a.length;f++){for(g=a[f],v=0;v<g.starts.length;v++)c=g.starts[v],e(g,c,"edge",i,n);for(s=0;Object.keys(g.crossings).length&&s<1e4;)s++,c=Object.keys(g.crossings)[0].split(",").map(Number),e(g,c,void 0,i,n);s===1e4&&d.log("Infinite loop in contour?")}};function A(o,a,i,n){return Math.abs(o[0]-a[0])<i&&Math.abs(o[1]-a[1])<n}function M(o,a){var i=o[2]-a[2],n=o[3]-a[3];return Math.sqrt(i*i+n*n)}function e(o,a,i,n,s){var c=a.join(","),f=o.crossings[c],g=t(f,i,a),v=[r(o,a,[-g[0],-g[1]])],T=o.z.length,l=o.z[0].length,_=a.slice(),w=g.slice(),S;for(S=0;S<1e4;S++){if(f>20?(f=x.CHOOSESADDLE[f][(g[0]||g[1])<0?0:1],o.crossings[c]=x.SADDLEREMAINDER[f]):delete o.crossings[c],g=x.NEWDELTA[f],!g){d.log("Found bad marching index:",f,a,o.level);break}v.push(r(o,a,g)),a[0]+=g[0],a[1]+=g[1],c=a.join(","),A(v[v.length-1],v[v.length-2],n,s)&&v.pop();var E=g[0]&&(a[0]<0||a[0]>l-2)||g[1]&&(a[1]<0||a[1]>T-2),y=a[0]===_[0]&&a[1]===_[1]&&g[0]===w[0]&&g[1]===w[1];if(y||i&&E)break;f=o.crossings[c]}S===1e4&&d.log("Infinite loop in contour?");var b=A(v[0],v[v.length-1],n,s),p=0,u=.2*o.smoothing,m=[],h=0,P,L,z,F,B,O,I,N,U,W,Q;for(S=1;S<v.length;S++)I=M(v[S],v[S-1]),p+=I,m.push(I);var ue=p/m.length*u;function le($){return v[$%v.length]}for(S=v.length-2;S>=h;S--)if(P=m[S],P<ue){for(z=0,L=S-1;L>=h&&P+m[L]<ue;L--)P+=m[L];if(b&&S===v.length-2)for(z=0;z<L&&P+m[z]<ue;z++)P+=m[z];B=S-L+z+1,O=Math.floor((S+L+z+2)/2),!b&&S===v.length-2?F=v[v.length-1]:!b&&L===-1?F=v[0]:B%2?F=le(O):F=[(le(O)[0]+le(O+1)[0])/2,(le(O)[1]+le(O+1)[1])/2],v.splice(L+1,S-L+1,F),S=L+1,z&&(h=z),b&&(S===v.length-2?v[z]=v[v.length-1]:S===0&&(v[v.length-1]=v[0]))}for(v.splice(0,h),S=0;S<v.length;S++)v[S].length=2;if(!(v.length<2))if(b)v.pop(),o.paths.push(v);else{i||d.log("Unclosed interior contour?",o.level,_.join(","),v.join("L"));var he=!1;for(N=0;N<o.edgepaths.length;N++)if(W=o.edgepaths[N],!he&&A(W[0],v[v.length-1],n,s)){v.pop(),he=!0;var G=!1;for(U=0;U<o.edgepaths.length;U++)if(Q=o.edgepaths[U],A(Q[Q.length-1],v[0],n,s)){G=!0,v.shift(),o.edgepaths.splice(N,1),U===N?o.paths.push(v.concat(Q)):(U>N&&U--,o.edgepaths[U]=Q.concat(v,W));break}G||(o.edgepaths[N]=v.concat(W))}for(N=0;N<o.edgepaths.length&&!he;N++)W=o.edgepaths[N],A(W[W.length-1],v[0],n,s)&&(v.shift(),o.edgepaths[N]=W.concat(v),he=!0);he||o.edgepaths.push(v)}}function t(o,a,i){var n=0,s=0;return o>20&&a?o===208||o===1114?n=i[0]===0?1:-1:s=i[1]===0?1:-1:x.BOTTOMSTART.indexOf(o)!==-1?s=1:x.LEFTSTART.indexOf(o)!==-1?n=1:x.TOPSTART.indexOf(o)!==-1?s=-1:n=-1,[n,s]}function r(o,a,i){var n=a[0]+Math.max(i[0],0),s=a[1]+Math.max(i[1],0),c=o.z[s][n],f=o.xaxis,g=o.yaxis;if(i[1]){var v=(o.level-c)/(o.z[s][n+1]-c),T=(v!==1?(1-v)*f.c2l(o.x[n]):0)+(v!==0?v*f.c2l(o.x[n+1]):0);return[f.c2p(f.l2c(T),!0),g.c2p(o.y[s],!0),n+v,s]}else{var l=(o.level-c)/(o.z[s+1][n]-c),_=(l!==1?(1-l)*g.c2l(o.y[s]):0)+(l!==0?l*g.c2l(o.y[s+1]):0);return[f.c2p(o.x[n],!0),g.c2p(g.l2c(_),!0),n,s+l]}}}}),dF=Ze({"src/traces/contour/constraint_mapping.js"(Z,q){"use strict";var d=o3(),x=ns();q.exports={"[]":M("[]"),"][":M("]["),">":e(">"),"<":e("<"),"=":e("=")};function A(t,r){var o=Array.isArray(r),a;function i(n){return x(n)?+n:null}return d.COMPARISON_OPS2.indexOf(t)!==-1?a=i(o?r[0]:r):d.INTERVAL_OPS.indexOf(t)!==-1?a=o?[i(r[0]),i(r[1])]:[i(r),i(r)]:d.SET_OPS.indexOf(t)!==-1&&(a=o?r.map(i):[i(r)]),a}function M(t){return function(r){r=A(t,r);var o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return{start:o,end:a,size:a-o}}}function e(t){return function(r){return r=A(t,r),{start:r,end:1/0,size:1/0}}}}}),gS=Ze({"src/traces/contour/empty_pathinfo.js"(Z,q){"use strict";var d=ca(),x=dF(),A=V_();q.exports=function(e,t,r){for(var o=e.type==="constraint"?x[e._operation](e.value):e,a=o.size,i=[],n=A(o),s=r.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},f=o.start;f<n;f+=a)if(i.push(d.extendFlat({level:f,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},c)),i.length>1e3){d.warn("Too many contours, clipping at 1000",e);break}return i}}}),yS=Ze({"src/traces/contour/convert_to_constraints.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){var e,t,r,o=function(n){return n.reverse()},a=function(n){return n};switch(M){case"=":case"<":return A;case">":for(A.length!==1&&d.warn("Contour data invalid for the specified inequality operation."),t=A[0],e=0;e<t.edgepaths.length;e++)t.edgepaths[e]=o(t.edgepaths[e]);for(e=0;e<t.paths.length;e++)t.paths[e]=o(t.paths[e]);for(e=0;e<t.starts.length;e++)t.starts[e]=o(t.starts[e]);return A;case"][":var i=o;o=a,a=i;case"[]":for(A.length!==2&&d.warn("Contour data invalid for the specified inequality range operation."),t=x(A[0]),r=x(A[1]),e=0;e<t.edgepaths.length;e++)t.edgepaths[e]=o(t.edgepaths[e]);for(e=0;e<t.paths.length;e++)t.paths[e]=o(t.paths[e]);for(e=0;e<t.starts.length;e++)t.starts[e]=o(t.starts[e]);for(;r.edgepaths.length;)t.edgepaths.push(a(r.edgepaths.shift()));for(;r.paths.length;)t.paths.push(a(r.paths.shift()));for(;r.starts.length;)t.starts.push(a(r.starts.shift()));return[t]}};function x(A){return d.extendFlat({},A,{edgepaths:d.extendDeep([],A.edgepaths),paths:d.extendDeep([],A.paths),starts:d.extendDeep([],A.starts)})}}}),_S=Ze({"src/traces/contour/close_boundaries.js"(Z,q){"use strict";q.exports=function(d,x){var A=d[0],M=A.z,e;switch(x.type){case"levels":var t=Math.min(M[0][0],M[0][1]);for(e=0;e<d.length;e++){var r=d[e];r.prefixBoundary=!r.edgepaths.length&&(t>r.level||r.starts.length&&t===r.level)}break;case"constraint":if(A.prefixBoundary=!1,A.edgepaths.length)return;var o=A.x.length,a=A.y.length,i=-1/0,n=1/0;for(e=0;e<a;e++)n=Math.min(n,M[e][0]),n=Math.min(n,M[e][o-1]),i=Math.max(i,M[e][0]),i=Math.max(i,M[e][o-1]);for(e=1;e<o-1;e++)n=Math.min(n,M[0][e]),n=Math.min(n,M[a-1][e]),i=Math.max(i,M[0][e]),i=Math.max(i,M[a-1][e]);var s=x.value,c,f;switch(x._operation){case">":s>i&&(A.prefixBoundary=!0);break;case"<":(s<n||A.starts.length&&s===n)&&(A.prefixBoundary=!0);break;case"[]":c=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),(f<n||c>i||A.starts.length&&f===n)&&(A.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),f=Math.max(s[0],s[1]),c<n&&f>i&&(A.prefixBoundary=!0);break}break}}}}),u3=Ze({"src/traces/contour/plot.js"(Z){"use strict";var q=On(),d=ca(),x=as(),A=rc(),M=fu(),e=Wo(),t=wv(),r=e3(),o=vS(),a=mS(),i=gS(),n=yS(),s=_S(),c=G_(),f=c.LABELOPTIMIZER;Z.plot=function(y,b,p,u){var m=b.xaxis,h=b.yaxis;d.makeTraceGroups(u,p,"contour").each(function(P){var L=q.select(this),z=P[0],F=z.trace,B=z.x,O=z.y,I=F.contours,N=i(I,b,z),U=d.ensureSingle(L,"g","heatmapcoloring"),W=[];I.coloring==="heatmap"&&(W=[P]),r(y,b,W,U),o(N),a(N);var Q=m.c2p(B[0],!0),ue=m.c2p(B[B.length-1],!0),le=h.c2p(O[0],!0),he=h.c2p(O[O.length-1],!0),G=[[Q,he],[ue,he],[ue,le],[Q,le]],$=N;I.type==="constraint"&&($=n(N,I._operation)),g(L,G,I),v(L,$,G,I),l(L,N,y,z,I),w(L,b,y,z,G)})};function g(E,y,b){var p=d.ensureSingle(E,"g","contourbg"),u=p.selectAll("path").data(b.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+y.join("L")+"Z").style("stroke","none")}function v(E,y,b,p){var u=p.coloring==="fill"||p.type==="constraint"&&p._operation!=="=",m="M"+b.join("L")+"Z";u&&s(y,p);var h=d.ensureSingle(E,"g","contourfill"),P=h.selectAll("path").data(u?y:[]);P.enter().append("path"),P.exit().remove(),P.each(function(L){var z=(L.prefixBoundary?m:"")+T(L,b);z?q.select(this).attr("d",z).style("stroke","none"):q.select(this).remove()})}function T(E,y){var b="",p=0,u=E.edgepaths.map(function(Q,ue){return ue}),m=!0,h,P,L,z,F,B;function O(Q){return Math.abs(Q[1]-y[0][1])<.01}function I(Q){return Math.abs(Q[1]-y[2][1])<.01}function N(Q){return Math.abs(Q[0]-y[0][0])<.01}function U(Q){return Math.abs(Q[0]-y[2][0])<.01}for(;u.length;){for(B=x.smoothopen(E.edgepaths[p],E.smoothing),b+=m?B:B.replace(/^M/,"L"),u.splice(u.indexOf(p),1),h=E.edgepaths[p][E.edgepaths[p].length-1],z=-1,L=0;L<4;L++){if(!h){d.log("Missing end?",p,E);break}for(O(h)&&!U(h)?P=y[1]:N(h)?P=y[0]:I(h)?P=y[3]:U(h)&&(P=y[2]),F=0;F<E.edgepaths.length;F++){var W=E.edgepaths[F][0];Math.abs(h[0]-P[0])<.01?Math.abs(h[0]-W[0])<.01&&(W[1]-h[1])*(P[1]-W[1])>=0&&(P=W,z=F):Math.abs(h[1]-P[1])<.01?Math.abs(h[1]-W[1])<.01&&(W[0]-h[0])*(P[0]-W[0])>=0&&(P=W,z=F):d.log("endpt to newendpt is not vert. or horz.",h,P,W)}if(h=P,z>=0)break;b+="L"+P}if(z===E.edgepaths.length){d.log("unclosed perimeter path");break}p=z,m=u.indexOf(p)===-1,m&&(p=u[0],b+="Z")}for(p=0;p<E.paths.length;p++)b+=x.smoothclosed(E.paths[p],E.smoothing);return b}function l(E,y,b,p,u){var m=b._context.staticPlot,h=d.ensureSingle(E,"g","contourlines"),P=u.showlines!==!1,L=u.showlabels,z=P&&L,F=Z.createLines(h,P||L,y,m),B=Z.createLineClip(h,z,b,p.trace.uid),O=E.selectAll("g.contourlabels").data(L?[0]:[]);if(O.exit().remove(),O.enter().append("g").classed("contourlabels",!0),L){var I=[],N=[];d.clearLocationCache();var U=Z.labelFormatter(b,p),W=x.tester.append("text").attr("data-notex",1).call(x.font,u.labelfont),Q=y[0].xaxis,ue=y[0].yaxis,le=Q._length,he=ue._length,G=Q.range,$=ue.range,J=d.aggNums(Math.min,null,p.x),X=d.aggNums(Math.max,null,p.x),oe=d.aggNums(Math.min,null,p.y),ie=d.aggNums(Math.max,null,p.y),j=Math.max(Q.c2p(J,!0),0),ee=Math.min(Q.c2p(X,!0),le),re=Math.max(ue.c2p(ie,!0),0),ce=Math.min(ue.c2p(oe,!0),he),be={};G[0]<G[1]?(be.left=j,be.right=ee):(be.left=ee,be.right=j),$[0]<$[1]?(be.top=re,be.bottom=ce):(be.top=ce,be.bottom=re),be.middle=(be.top+be.bottom)/2,be.center=(be.left+be.right)/2,I.push([[be.left,be.top],[be.right,be.top],[be.right,be.bottom],[be.left,be.bottom]]);var Ae=Math.sqrt(le*le+he*he),ze=c.LABELDISTANCE*Ae/Math.max(1,y.length/c.LABELINCREASE);F.each(function(Re){var Xe=Z.calcTextOpts(Re.level,U,W,b);q.select(this).selectAll("path").each(function(){var it=this,ot=d.getVisibleSegment(it,be,Xe.height/2);if(ot&&!(ot.len<(Xe.width+Xe.height)*c.LABELMIN))for(var tt=Math.min(Math.ceil(ot.len/ze),c.LABELMAX),lt=0;lt<tt;lt++){var Ee=Z.findBestTextLocation(it,ot,Xe,N,be);if(!Ee)break;Z.addLabelData(Ee,Xe,N,I)}})}),W.remove(),Z.drawLabels(O,N,b,B,z?I:null)}L&&!P&&F.remove()}Z.createLines=function(E,y,b,p){var u=b[0].smoothing,m=E.selectAll("g.contourlevel").data(y?b:[]);if(m.exit().remove(),m.enter().append("g").classed("contourlevel",!0),y){var h=m.selectAll("path.openline").data(function(L){return L.pedgepaths||L.edgepaths});h.exit().remove(),h.enter().append("path").classed("openline",!0),h.attr("d",function(L){return x.smoothopen(L,u)}).style("stroke-miterlimit",1).style("vector-effect",p?"none":"non-scaling-stroke");var P=m.selectAll("path.closedline").data(function(L){return L.ppaths||L.paths});P.exit().remove(),P.enter().append("path").classed("closedline",!0),P.attr("d",function(L){return x.smoothclosed(L,u)}).style("stroke-miterlimit",1).style("vector-effect",p?"none":"non-scaling-stroke")}return m},Z.createLineClip=function(E,y,b,p){var u=b._fullLayout._clips,m=y?"clipline"+p:null,h=u.selectAll("#"+m).data(y?[0]:[]);return h.exit().remove(),h.enter().append("clipPath").classed("contourlineclip",!0).attr("id",m),x.setClipUrl(E,m,b),h},Z.labelFormatter=function(E,y){var b=E._fullLayout,p=y.trace,u=p.contours,m={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(u.labelformat)m.tickformat=u.labelformat,t(m,b);else{var h=A.extractOpts(p);if(h&&h.colorbar&&h.colorbar._axis)m=h.colorbar._axis;else{if(u.type==="constraint"){var P=u.value;d.isArrayOrTypedArray(P)?m.range=[P[0],P[P.length-1]]:m.range=[P,P]}else m.range=[u.start,u.end],m.nticks=(u.end-u.start)/u.size;m.range[0]===m.range[1]&&(m.range[1]+=m.range[0]||1),m.nticks||(m.nticks=1e3),t(m,b),e.prepTicks(m),m._tmin=null,m._tmax=null}}return function(L){return e.tickText(m,L).text}},Z.calcTextOpts=function(E,y,b,p){var u=y(E);b.text(u).call(M.convertToTspans,p);var m=b.node(),h=x.bBox(m,!0);return{text:u,width:h.width,height:h.height,fontSize:+m.style["font-size"].replace("px",""),level:E,dy:(h.top+h.bottom)/2}},Z.findBestTextLocation=function(E,y,b,p,u){var m=b.width,h,P,L,z,F;y.isClosed?(P=y.len/f.INITIALSEARCHPOINTS,h=y.min+P/2,L=y.max):(P=(y.len-m)/(f.INITIALSEARCHPOINTS+1),h=y.min+P+m/2,L=y.max-(P+m)/2);for(var B=1/0,O=0;O<f.ITERATIONS;O++){for(var I=h;I<L;I+=P){var N=d.getTextLocation(E,y.total,I,m),U=_(N,b,p,u);U<B&&(B=U,F=N,z=I)}if(B>f.MAXCOST*2)break;O&&(P/=2),h=z-P/2,L=h+P*1.5}if(B<=f.MAXCOST)return F};function _(E,y,b,p){var u=y.width/2,m=y.height/2,h=E.x,P=E.y,L=E.theta,z=Math.cos(L)*u,F=Math.sin(L)*u,B=(h>p.center?p.right-h:h-p.left)/(z+Math.abs(Math.sin(L)*m)),O=(P>p.middle?p.bottom-P:P-p.top)/(Math.abs(F)+Math.cos(L)*m);if(B<1||O<1)return 1/0;var I=f.EDGECOST*(1/(B-1)+1/(O-1));I+=f.ANGLECOST*L*L;for(var N=h-z,U=P-F,W=h+z,Q=P+F,ue=0;ue<b.length;ue++){var le=b[ue],he=Math.cos(le.theta)*le.width/2,G=Math.sin(le.theta)*le.width/2,$=d.segmentDistance(N,U,W,Q,le.x-he,le.y-G,le.x+he,le.y+G)*2/(y.height+le.height),J=le.level===y.level,X=J?f.SAMELEVELDISTANCE:1;if($<=X)return 1/0;var oe=f.NEIGHBORCOST*(J?f.SAMELEVELFACTOR:1);I+=oe/($-X)}return I}Z.addLabelData=function(E,y,b,p){var u=y.fontSize,m=y.width+u/3,h=Math.max(0,y.height-u/3),P=E.x,L=E.y,z=E.theta,F=Math.sin(z),B=Math.cos(z),O=function(N,U){return[P+N*B-U*F,L+N*F+U*B]},I=[O(-m/2,-h/2),O(-m/2,h/2),O(m/2,h/2),O(m/2,-h/2)];b.push({text:y.text,x:P,y:L,dy:y.dy,theta:z,level:y.level,width:m,height:h}),p.push(I)},Z.drawLabels=function(E,y,b,p,u){var m=E.selectAll("text").data(y,function(z){return z.text+","+z.x+","+z.y+","+z.theta});if(m.exit().remove(),m.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(z){var F=z.x+Math.sin(z.theta)*z.dy,B=z.y-Math.cos(z.theta)*z.dy;q.select(this).text(z.text).attr({x:F,y:B,transform:"rotate("+180*z.theta/Math.PI+" "+F+" "+B+")"}).call(M.convertToTspans,b)}),u){for(var h="",P=0;P<u.length;P++)h+="M"+u[P].join("L")+"Z";var L=d.ensureSingle(p,"path","");L.attr("d",h)}};function w(E,y,b,p,u){var m=p.trace,h=b._fullLayout._clips,P="clip"+m.uid,L=h.selectAll("#"+P).data(m.connectgaps?[]:[0]);if(L.enter().append("clipPath").classed("contourclip",!0).attr("id",P),L.exit().remove(),m.connectgaps===!1){var z={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:y.xaxis,yaxis:y.yaxis,x:p.x,y:p.y,z:S(p),smoothing:0};o([z]),a([z]),s([z],{type:"levels"});var F=d.ensureSingle(L,"path","");F.attr("d",(z.prefixBoundary?"M"+u.join("L")+"Z":"")+T(z,u))}else P=null;x.setClipUrl(E,P,b)}function S(E){var y=E.trace._emptypoints,b=[],p=E.z.length,u=E.z[0].length,m,h=[],P;for(m=0;m<u;m++)h.push(1);for(m=0;m<p;m++)b.push(h.slice());for(m=0;m<y.length;m++)P=y[m],b[P[0]][P[1]]=0;return E.zmask=b,b}}}),xS=Ze({"src/traces/contour/make_color_map.js"(Z,q){"use strict";var d=On(),x=rc(),A=V_();q.exports=function(e){var t=e.contours,r=t.start,o=A(t),a=t.size||1,i=Math.floor((o-r)/a)+1,n=t.coloring==="lines"?0:1,s=x.extractOpts(e);isFinite(a)||(a=1,i=1);var c=s.reversescale?x.flipScale(s.colorscale):s.colorscale,f=c.length,g=new Array(f),v=new Array(f),T,l,_=s.min,w=s.max;if(t.coloring==="heatmap"){for(l=0;l<f;l++)T=c[l],g[l]=T[0]*(w-_)+_,v[l]=T[1];var S=d.extent([_,w,t.start,t.start+a*(i-1)]),E=S[_<w?0:1],y=S[_<w?1:0];E!==_&&(g.splice(0,0,E),v.splice(0,0,v[0])),y!==w&&(g.push(y),v.push(v[v.length-1]))}else{var b=e._input&&typeof e._input.zmin=="number"&&typeof e._input.zmax=="number";for(b&&(r<=_||o>=w)&&(r<=_&&(r=_),o>=w&&(o=w),i=Math.floor((o-r)/a)+1,n=0),l=0;l<f;l++)T=c[l],g[l]=(T[0]*(i+n-1)-n/2)*a+r,v[l]=T[1];(b||e.autocontour)&&(g[0]>_&&(g.unshift(_),v.unshift(v[0])),g[g.length-1]<w&&(g.push(w),v.push(v[v.length-1])))}return x.makeColorScaleFunc({domain:g,range:v},{noNumericCheck:!0})}}}),c3=Ze({"src/traces/contour/style.js"(Z,q){"use strict";var d=On(),x=as(),A=t3(),M=xS();q.exports=function(t){var r=d.select(t).selectAll("g.contour");r.style("opacity",function(o){return o[0].trace.opacity}),r.each(function(o){var a=d.select(this),i=o[0].trace,n=i.contours,s=i.line,c=n.size||1,f=n.start,g=n.type==="constraint",v=!g&&n.coloring==="lines",T=!g&&n.coloring==="fill",l=v||T?M(i):null;a.selectAll("g.contourlevel").each(function(S){d.select(this).selectAll("path").call(x.lineGroupStyle,s.width,v?l(S.level):s.color,s.dash)});var _=n.labelfont;if(a.selectAll("g.contourlabels text").each(function(S){x.font(d.select(this),{weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow,family:_.family,size:_.size,color:_.color||(v?l(S.level):s.color)})}),g)a.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(T){var w;a.selectAll("g.contourfill path").style("fill",function(S){return w===void 0&&(w=S.level),l(S.level+.5*c)}),w===void 0&&(w=f),a.selectAll("g.contourbg path").style("fill",l(w-.5*c))}}),A(t)}}}),f3=Ze({"src/traces/contour/colorbar.js"(Z,q){"use strict";var d=rc(),x=xS(),A=V_();function M(e,t,r){var o=t.contours,a=t.line,i=o.size||1,n=o.coloring,s=x(t,{isColorbar:!0});if(n==="heatmap"){var c=d.extractOpts(t);r._fillgradient=c.reversescale?d.flipScale(c.colorscale):c.colorscale,r._zrange=[c.min,c.max]}else n==="fill"&&(r._fillcolor=s);r._line={color:n==="lines"?s:a.color,width:o.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:o.start,end:A(o),size:i}}q.exports={min:"zmin",max:"zmax",calc:M}}}),bS=Ze({"src/traces/contour/hover.js"(Z,q){"use strict";var d=Yn(),x=r3();q.exports=function(M,e,t,r,o){o||(o={}),o.isContour=!0;var a=x(M,e,t,r,o);return a&&a.forEach(function(i){var n=i.trace;n.contours.type==="constraint"&&(n.fillcolor&&d.opacity(n.fillcolor)?i.color=d.addOpacity(n.fillcolor,1):n.contours.showlines&&d.opacity(n.line.color)&&(i.color=d.addOpacity(n.line.color,1)))}),a}}}),vF=Ze({"src/traces/histogram2dcontour/index.js"(Z,q){"use strict";q.exports={attributes:fS(),supplyDefaults:pF(),crossTraceDefaults:i3(),calc:dS(),plot:u3().plot,layerName:"contourlayer",style:c3(),colorbar:f3(),hoverPoints:bS(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Zf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}}),mF=Ze({"lib/histogram2dcontour.js"(Z,q){"use strict";q.exports=vF()}}),wS=Ze({"src/traces/contour/constraint_defaults.js"(Z,q){"use strict";var d=ns(),x=hS(),A=Yn(),M=A.addOpacity,e=A.opacity,t=o3(),r=ca().isArrayOrTypedArray,o=t.CONSTRAINT_REDUCTION,a=t.COMPARISON_OPS2;q.exports=function(s,c,f,g,v,T){var l=c.contours,_,w,S,E=f("contours.operation");if(l._operation=o[E],i(f,l),E==="="?_=l.showlines=!0:(_=f("contours.showlines"),S=f("fillcolor",M((s.line||{}).color||v,.5))),_){var y=S&&e(S)?M(c.fillcolor,1):v;w=f("line.color",y),f("line.width",2),f("line.dash")}f("line.smoothing"),x(f,g,w,T)};function i(n,s){var c;a.indexOf(s.operation)===-1?(n("contours.value",[0,1]),r(s.value)?s.value.length>2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:d(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(n("contours.value",0),d(s.value)||(r(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),gF=Ze({"src/traces/contour/defaults.js"(Z,q){"use strict";var d=ca(),x=X2(),A=Qd(),M=wS(),e=s3(),t=l3(),r=j_(),o=q_();q.exports=function(i,n,s,c){function f(l,_){return d.coerce(i,n,o,l,_)}function g(l){return d.coerce2(i,n,o,l)}var v=x(i,n,f,c);if(!v){n.visible=!1;return}A(i,n,c,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate");var T=f("contours.type")==="constraint";f("connectgaps",d.isArray1D(n.z)),T?M(i,n,f,c,s):(e(i,n,f,g),t(i,n,f,c)),n.contours&&n.contours.coloring==="heatmap"&&r(f,c),f("zorder")}}}),yF=Ze({"src/traces/contour/index.js"(Z,q){"use strict";q.exports={attributes:q_(),supplyDefaults:gF(),calc:dS(),plot:u3().plot,style:c3(),colorbar:f3(),hoverPoints:bS(),moduleType:"trace",name:"contour",basePlotModule:Zf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),_F=Ze({"lib/contour.js"(Z,q){"use strict";q.exports=yF()}}),TS=Ze({"src/traces/scatterternary/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=$d(),M=tf(),e=eu(),t=Mu(),r=Gh().dash,o=rs().extendFlat,a=M.marker,i=M.line,n=a.line;q.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:o({},M.mode,{dflt:"markers"}),text:o({},M.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:o({},M.hovertext,{}),line:{color:i.color,width:i.width,dash:r,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:M.connectgaps,cliponaxis:M.cliponaxis,fill:o({},M.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:A(),marker:o({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:n.width,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:M.textfont,textposition:M.textposition,selected:M.selected,unselected:M.unselected,hoverinfo:o({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:M.hoveron,hovertemplate:d()}}}),xF=Ze({"src/traces/scatterternary/defaults.js"(Z,q){"use strict";var d=ca(),x=Tv(),A=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=TS();q.exports=function(n,s,c,f){function g(E,y){return d.coerce(n,s,a,E,y)}var v=g("a"),T=g("b"),l=g("c"),_;if(v?(_=v.length,T?(_=Math.min(_,T.length),l&&(_=Math.min(_,l.length))):l?_=Math.min(_,l.length):_=0):T&&l&&(_=Math.min(T.length,l.length)),!_){s.visible=!1;return}s._length=_,g("sum"),g("text"),g("hovertext"),s.hoveron!=="fills"&&g("hovertemplate");var w=_<x.PTS_LINESONLY?"lines+markers":"lines";g("mode",w),A.hasMarkers(s)&&M(n,s,c,f,g,{gradient:!0}),A.hasLines(s)&&(e(n,s,c,f,g,{backoff:!0}),t(n,s,g),g("connectgaps")),A.hasText(s)&&(g("texttemplate"),r(n,s,f,g));var S=[];(A.hasMarkers(s)||A.hasText(s))&&(g("cliponaxis"),g("marker.maxdisplayed"),S.push("points")),g("fill"),s.fill!=="none"&&(o(n,s,c,g),A.hasLines(s)||t(n,s,g)),(s.fill==="tonext"||s.fill==="toself")&&S.push("fills"),g("hoveron",S.join("+")||"points"),d.coerceSelectionMarkerOpacity(s,g)}}}),bF=Ze({"src/traces/scatterternary/format_labels.js"(Z,q){"use strict";var d=Wo();q.exports=function(A,M,e){var t={},r=e[M.subplot]._subplot;return t.aLabel=d.tickText(r.aaxis,A.a,!0).text,t.bLabel=d.tickText(r.baxis,A.b,!0).text,t.cLabel=d.tickText(r.caxis,A.c,!0).text,t}}}),wF=Ze({"src/traces/scatterternary/calc.js"(Z,q){"use strict";var d=ns(),x=Fd(),A=Av(),M=Od(),e=Bd().calcMarkerSize,t=["a","b","c"],r={a:["b","c"],b:["a","c"],c:["a","b"]};q.exports=function(a,i){var n=a._fullLayout[i.subplot],s=n.sum,c=i.sum||s,f={a:i.a,b:i.b,c:i.c},g=i.ids,v,T,l,_,w,S;for(v=0;v<t.length;v++)if(l=t[v],!f[l]){for(w=f[r[l][0]],S=f[r[l][1]],_=new Array(w.length),T=0;T<w.length;T++)_[T]=c-w[T]-S[T];f[l]=_}var E=i._length,y=new Array(E),b,p,u,m,h,P;for(v=0;v<E;v++)b=f.a[v],p=f.b[v],u=f.c[v],d(b)&&d(p)&&d(u)?(b=+b,p=+p,u=+u,m=s/(b+p+u),m!==1&&(b*=m,p*=m,u*=m),P=b,h=u-p,y[v]={x:h,y:P,a:b,b:p,c:u},g&&(y[v].id=g[v])):y[v]={x:!1,y:!1};return e(i,E),x(a,i),A(y,i),M(y,i),y}}}),TF=Ze({"src/traces/scatterternary/plot.js"(Z,q){"use strict";var d=s1();q.exports=function(A,M,e){var t=M.plotContainer;t.select(".scatterlayer").selectAll("*").remove();for(var r=M.xaxis,o=M.yaxis,a={xaxis:r,yaxis:o,plot:t,layerClipId:M._hasClipOnAxisFalse?M.clipIdRelative:null},i=M.layers.frontplot.select("g.scatterlayer"),n=0;n<e.length;n++){var s=e[n];s.length&&(s[0].trace._xA=r,s[0].trace._yA=o)}d(A,a,e,i)}}}),AF=Ze({"src/traces/scatterternary/hover.js"(Z,q){"use strict";var d=u1();q.exports=function(A,M,e,t){var r=d(A,M,e,t);if(!r||r[0].index===!1)return;var o=r[0];if(o.index===void 0){var a=1-o.y0/A.ya._length,i=A.xa._length,n=i*a/2,s=i-n;return o.x0=Math.max(Math.min(o.x0,s),n),o.x1=Math.max(Math.min(o.x1,s),n),r}var c=o.cd[o.index],f=o.trace,g=o.subplot;o.a=c.a,o.b=c.b,o.c=c.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[f.subplot]={_subplot:g};var T=f._module.formatLabels(c,f,v);o.aLabel=T.aLabel,o.bLabel=T.bLabel,o.cLabel=T.cLabel;var l=c.hi||f.hoverinfo,_=[];function w(E,y){_.push(E._hovertitle+": "+y)}if(!f.hovertemplate){var S=l.split("+");S.indexOf("all")!==-1&&(S=["a","b","c"]),S.indexOf("a")!==-1&&w(g.aaxis,o.aLabel),S.indexOf("b")!==-1&&w(g.baxis,o.bLabel),S.indexOf("c")!==-1&&w(g.caxis,o.cLabel)}return o.extraText=_.join("<br>"),o.hovertemplate=f.hovertemplate,r}}}),SF=Ze({"src/traces/scatterternary/event_data.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t){if(A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),e[t]){var r=e[t];x.a=r.a,x.b=r.b,x.c=r.c}else x.a=A.a,x.b=A.b,x.c=A.c;return x}}}),MF=Ze({"src/plots/ternary/ternary.js"(Z,q){"use strict";var d=On(),x=Ch(),A=oo(),M=ca(),e=M.strTranslate,t=M._,r=Yn(),o=as(),a=wv(),i=rs().extendFlat,n=xc(),s=Wo(),c=Tp(),f=ef(),g=Jd(),v=g.freeMode,T=g.rectMode,l=Z0(),_=Tf().prepSelect,w=Tf().selectOnClick,S=Tf().clearOutline,E=Tf().clearSelectionsCache,y=kh();function b(I,N){this.id=I.id,this.graphDiv=I.graphDiv,this.init(N),this.makeFramework(N),this.updateFx(N),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}q.exports=b;var p=b.prototype;p.init=function(I){this.container=I._ternarylayer,this.defs=I._defs,this.layoutId=I._uid,this.traceHash={},this.layers={}},p.plot=function(I,N){var U=this,W=N[U.id],Q=N._size;U._hasClipOnAxisFalse=!1;for(var ue=0;ue<I.length;ue++){var le=I[ue][0].trace;if(le.cliponaxis===!1){U._hasClipOnAxisFalse=!0;break}}U.updateLayers(W),U.adjustLayout(W,Q),n.generalUpdatePerTraceModule(U.graphDiv,U,I,W),U.layers.plotbg.select("path").call(r.fill,W.bgcolor)},p.makeFramework=function(I){var N=this,U=N.graphDiv,W=I[N.id],Q=N.clipId="clip"+N.layoutId+N.id,ue=N.clipIdRelative="clip-relative"+N.layoutId+N.id;N.clipDef=M.ensureSingleById(I._clips,"clipPath",Q,function(le){le.append("path").attr("d","M0,0Z")}),N.clipDefRelative=M.ensureSingleById(I._clips,"clipPath",ue,function(le){le.append("path").attr("d","M0,0Z")}),N.plotContainer=M.ensureSingle(N.container,"g",N.id),N.updateLayers(W),o.setClipUrl(N.layers.backplot,Q,U),o.setClipUrl(N.layers.grids,Q,U)},p.updateFx=function(I){I._ternarylayer.selectAll("g.toplevel").style("cursor",I.dragmode==="pan"?"move":"crosshair")},p.updateLayers=function(I){var N=this,U=N.layers,W=["draglayer","plotbg","backplot","grids"];I.aaxis.layer==="below traces"&&W.push("aaxis","aline"),I.baxis.layer==="below traces"&&W.push("baxis","bline"),I.caxis.layer==="below traces"&&W.push("caxis","cline"),W.push("frontplot"),I.aaxis.layer==="above traces"&&W.push("aaxis","aline"),I.baxis.layer==="above traces"&&W.push("baxis","bline"),I.caxis.layer==="above traces"&&W.push("caxis","cline");var Q=N.plotContainer.selectAll("g.toplevel").data(W,String),ue=["agrid","bgrid","cgrid"];Q.enter().append("g").attr("class",function(le){return"toplevel "+le}).each(function(le){var he=d.select(this);U[le]=he,le==="frontplot"?he.append("g").classed("scatterlayer",!0):le==="backplot"?he.append("g").classed("maplayer",!0):le==="plotbg"?he.append("path").attr("d","M0,0Z"):le==="aline"||le==="bline"||le==="cline"?he.append("path"):le==="grids"&&ue.forEach(function(G){U[G]=he.append("g").classed("grid "+G,!0)})}),Q.order()};var u=Math.sqrt(4/3);p.adjustLayout=function(I,N){var U=this,W=I.domain,Q=(W.x[0]+W.x[1])/2,ue=(W.y[0]+W.y[1])/2,le=W.x[1]-W.x[0],he=W.y[1]-W.y[0],G=le*N.w,$=he*N.h,J=I.sum,X=I.aaxis.min,oe=I.baxis.min,ie=I.caxis.min,j,ee,re,ce,be,Ae;G>u*$?(ce=$,re=ce*u):(re=G,ce=re/u),be=le*re/G,Ae=he*ce/$,j=N.l+N.w*Q-re/2,ee=N.t+N.h*(1-ue)-ce/2,U.x0=j,U.y0=ee,U.w=re,U.h=ce,U.sum=J,U.xaxis={type:"linear",range:[X+2*ie-J,J-X-2*oe],domain:[Q-be/2,Q+be/2],_id:"x"},a(U.xaxis,U.graphDiv._fullLayout),U.xaxis.setScale(),U.xaxis.isPtWithinRange=function(Fe){return Fe.a>=U.aaxis.range[0]&&Fe.a<=U.aaxis.range[1]&&Fe.b>=U.baxis.range[1]&&Fe.b<=U.baxis.range[0]&&Fe.c>=U.caxis.range[1]&&Fe.c<=U.caxis.range[0]},U.yaxis={type:"linear",range:[X,J-oe-ie],domain:[ue-Ae/2,ue+Ae/2],_id:"y"},a(U.yaxis,U.graphDiv._fullLayout),U.yaxis.setScale(),U.yaxis.isPtWithinRange=function(){return!0};var ze=U.yaxis.domain[0],Re=U.aaxis=i({},I.aaxis,{range:[X,J-oe-ie],side:"left",tickangle:(+I.aaxis.tickangle||0)-30,domain:[ze,ze+Ae*u],anchor:"free",position:0,_id:"y",_length:re});a(Re,U.graphDiv._fullLayout),Re.setScale();var Xe=U.baxis=i({},I.baxis,{range:[J-X-ie,oe],side:"bottom",domain:U.xaxis.domain,anchor:"free",position:0,_id:"x",_length:re});a(Xe,U.graphDiv._fullLayout),Xe.setScale();var it=U.caxis=i({},I.caxis,{range:[J-X-oe,ie],side:"right",tickangle:(+I.caxis.tickangle||0)+30,domain:[ze,ze+Ae*u],anchor:"free",position:0,_id:"y",_length:re});a(it,U.graphDiv._fullLayout),it.setScale();var ot="M"+j+","+(ee+ce)+"h"+re+"l-"+re/2+",-"+ce+"Z";U.clipDef.select("path").attr("d",ot),U.layers.plotbg.select("path").attr("d",ot);var tt="M0,"+ce+"h"+re+"l-"+re/2+",-"+ce+"Z";U.clipDefRelative.select("path").attr("d",tt);var lt=e(j,ee);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",lt),U.clipDefRelative.select("path").attr("transform",null);var Ee=e(j-Xe._offset,ee+ce);U.layers.baxis.attr("transform",Ee),U.layers.bgrid.attr("transform",Ee);var _e=e(j+re/2,ee)+"rotate(30)"+e(0,-Re._offset);U.layers.aaxis.attr("transform",_e),U.layers.agrid.attr("transform",_e);var fe=e(j+re/2,ee)+"rotate(-30)"+e(0,-it._offset);U.layers.caxis.attr("transform",fe),U.layers.cgrid.attr("transform",fe),U.drawAxes(!0),U.layers.aline.select("path").attr("d",Re.showline?"M"+j+","+(ee+ce)+"l"+re/2+",-"+ce:"M0,0").call(r.stroke,Re.linecolor||"#000").style("stroke-width",(Re.linewidth||0)+"px"),U.layers.bline.select("path").attr("d",Xe.showline?"M"+j+","+(ee+ce)+"h"+re:"M0,0").call(r.stroke,Xe.linecolor||"#000").style("stroke-width",(Xe.linewidth||0)+"px"),U.layers.cline.select("path").attr("d",it.showline?"M"+(j+re/2)+","+ee+"l"+re/2+","+ce:"M0,0").call(r.stroke,it.linecolor||"#000").style("stroke-width",(it.linewidth||0)+"px"),U.graphDiv._context.staticPlot||U.initInteractions(),o.setClipUrl(U.layers.frontplot,U._hasClipOnAxisFalse?null:U.clipId,U.graphDiv)},p.drawAxes=function(I){var N=this,U=N.graphDiv,W=N.id.substr(7)+"title",Q=N.layers,ue=N.aaxis,le=N.baxis,he=N.caxis;if(N.drawAx(ue),N.drawAx(le),N.drawAx(he),I){var G=Math.max(ue.showticklabels?ue.tickfont.size/2:0,(he.showticklabels?he.tickfont.size*.75:0)+(he.ticks==="outside"?he.ticklen*.87:0)),$=(le.showticklabels?le.tickfont.size:0)+(le.ticks==="outside"?le.ticklen:0)+3;Q["a-title"]=l.draw(U,"a"+W,{propContainer:ue,propName:N.id+".aaxis.title",placeholder:t(U,"Click to enter Component A title"),attributes:{x:N.x0+N.w/2,y:N.y0-ue.title.font.size/3-G,"text-anchor":"middle"}}),Q["b-title"]=l.draw(U,"b"+W,{propContainer:le,propName:N.id+".baxis.title",placeholder:t(U,"Click to enter Component B title"),attributes:{x:N.x0-$,y:N.y0+N.h+le.title.font.size*.83+$,"text-anchor":"middle"}}),Q["c-title"]=l.draw(U,"c"+W,{propContainer:he,propName:N.id+".caxis.title",placeholder:t(U,"Click to enter Component C title"),attributes:{x:N.x0+N.w+$,y:N.y0+N.h+he.title.font.size*.83+$,"text-anchor":"middle"}})}},p.drawAx=function(I){var N=this,U=N.graphDiv,W=I._name,Q=W.charAt(0),ue=I._id,le=N.layers[W],he=30,G=Q+"tickLayout",$=m(I);N[G]!==$&&(le.selectAll("."+ue+"tick").remove(),N[G]=$),I.setScale();var J=s.calcTicks(I),X=s.clipEnds(I,J),oe=s.makeTransTickFn(I),ie=s.getTickSigns(I)[2],j=M.deg2rad(he),ee=ie*(I.linewidth||1)/2,re=ie*I.ticklen,ce=N.w,be=N.h,Ae=Q==="b"?"M0,"+ee+"l"+Math.sin(j)*re+","+Math.cos(j)*re:"M"+ee+",0l"+Math.cos(j)*re+","+-Math.sin(j)*re,ze={a:"M0,0l"+be+",-"+ce/2,b:"M0,0l-"+ce/2+",-"+be,c:"M0,0l-"+be+","+ce/2}[Q];s.drawTicks(U,I,{vals:I.ticks==="inside"?X:J,layer:le,path:Ae,transFn:oe,crisp:!1}),s.drawGrid(U,I,{vals:X,layer:N.layers[Q+"grid"],path:ze,transFn:oe,crisp:!1}),s.drawLabels(U,I,{vals:J,layer:le,transFn:oe,labelFns:s.makeLabelFns(I,0,he)})};function m(I){return I.ticks+String(I.ticklen)+String(I.showticklabels)}var h=y.MINZOOM/2+.87,P="m-0.87,.5h"+h+"v3h-"+(h+5.2)+"l"+(h/2+2.6)+",-"+(h*.87+4.5)+"l2.6,1.5l-"+h/2+","+h*.87+"Z",L="m0.87,.5h-"+h+"v3h"+(h+5.2)+"l-"+(h/2+2.6)+",-"+(h*.87+4.5)+"l-2.6,1.5l"+h/2+","+h*.87+"Z",z="m0,1l"+h/2+","+h*.87+"l2.6,-1.5l-"+(h/2+2.6)+",-"+(h*.87+4.5)+"l-"+(h/2+2.6)+","+(h*.87+4.5)+"l2.6,1.5l"+h/2+",-"+h*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",B=!0;p.clearOutline=function(){E(this.dragOptions),S(this.dragOptions.gd)},p.initInteractions=function(){var I=this,N=I.layers.plotbg.select("path").node(),U=I.graphDiv,W=U._fullLayout._zoomlayer,Q,ue;this.dragOptions={element:N,gd:U,plotinfo:{id:I.id,domain:U._fullLayout[I.id].domain,xaxis:I.xaxis,yaxis:I.yaxis},subplot:I.id,prepFn:function(Ee,_e,fe){I.dragOptions.xaxes=[I.xaxis],I.dragOptions.yaxes=[I.yaxis],Q=U._fullLayout._invScaleX,ue=U._fullLayout._invScaleY;var Fe=I.dragOptions.dragmode=U._fullLayout.dragmode;v(Fe)?I.dragOptions.minDrag=1:I.dragOptions.minDrag=void 0,Fe==="zoom"?(I.dragOptions.moveFn=Xe,I.dragOptions.clickFn=ce,I.dragOptions.doneFn=it,be(Ee,_e,fe)):Fe==="pan"?(I.dragOptions.moveFn=tt,I.dragOptions.clickFn=ce,I.dragOptions.doneFn=lt,ot(),I.clearOutline(U)):(T(Fe)||v(Fe))&&_(Ee,_e,fe,I.dragOptions,Fe)}};var le,he,G,$,J,X,oe,ie,j,ee;function re(Ee){var _e={};return _e[I.id+".aaxis.min"]=Ee.a,_e[I.id+".baxis.min"]=Ee.b,_e[I.id+".caxis.min"]=Ee.c,_e}function ce(Ee,_e){var fe=U._fullLayout.clickmode;O(U),Ee===2&&(U.emit("plotly_doubleclick",null),A.call("_guiRelayout",U,re({a:0,b:0,c:0}))),fe.indexOf("select")>-1&&Ee===1&&w(_e,U,[I.xaxis],[I.yaxis],I.id,I.dragOptions),fe.indexOf("event")>-1&&f.click(U,_e,I.id)}function be(Ee,_e,fe){var Fe=N.getBoundingClientRect();le=_e-Fe.left,he=fe-Fe.top,U._fullLayout._calcInverseTransform(U);var rt=U._fullLayout._invTransform,st=M.apply3DTransform(rt)(le,he);le=st[0],he=st[1],G={a:I.aaxis.range[0],b:I.baxis.range[1],c:I.caxis.range[1]},J=G,$=I.aaxis.range[1]-G.a,X=x(I.graphDiv._fullLayout[I.id].bgcolor).getLuminance(),oe="M0,"+I.h+"L"+I.w/2+", 0L"+I.w+","+I.h+"Z",ie=!1,j=W.append("path").attr("class","zoombox").attr("transform",e(I.x0,I.y0)).style({fill:X>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",oe),ee=W.append("path").attr("class","zoombox-corners").attr("transform",e(I.x0,I.y0)).style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),I.clearOutline(U)}function Ae(Ee,_e){return 1-_e/I.h}function ze(Ee,_e){return 1-(Ee+(I.h-_e)/Math.sqrt(3))/I.w}function Re(Ee,_e){return(Ee-(I.h-_e)/Math.sqrt(3))/I.w}function Xe(Ee,_e){var fe=le+Ee*Q,Fe=he+_e*ue,rt=Math.max(0,Math.min(1,Ae(le,he),Ae(fe,Fe))),st=Math.max(0,Math.min(1,ze(le,he),ze(fe,Fe))),Qe=Math.max(0,Math.min(1,Re(le,he),Re(fe,Fe))),Lt=(rt/2+Qe)*I.w,kt=(1-rt/2-st)*I.w,Vt=(Lt+kt)/2,Zt=kt-Lt,Sr=(1-rt)*I.h,xr=Sr-Zt/u;Zt<y.MINZOOM?(J=G,j.attr("d",oe),ee.attr("d","M0,0Z")):(J={a:G.a+rt*$,b:G.b+st*$,c:G.c+Qe*$},j.attr("d",oe+"M"+Lt+","+Sr+"H"+kt+"L"+Vt+","+xr+"L"+Lt+","+Sr+"Z"),ee.attr("d","M"+le+","+he+F+"M"+Lt+","+Sr+P+"M"+kt+","+Sr+L+"M"+Vt+","+xr+z)),ie||(j.transition().style("fill",X>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200),ie=!0),U.emit("plotly_relayouting",re(J))}function it(){O(U),J!==G&&(A.call("_guiRelayout",U,re(J)),B&&U.data&&U._context.showTips&&(M.notifier(t(U,"Double-click to zoom back out"),"long"),B=!1))}function ot(){G={a:I.aaxis.range[0],b:I.baxis.range[1],c:I.caxis.range[1]},J=G}function tt(Ee,_e){var fe=Ee/I.xaxis._m,Fe=_e/I.yaxis._m;J={a:G.a-Fe,b:G.b+(fe+Fe)/2,c:G.c-(fe-Fe)/2};var rt=[J.a,J.b,J.c].sort(M.sorterAsc),st={a:rt.indexOf(J.a),b:rt.indexOf(J.b),c:rt.indexOf(J.c)};rt[0]<0&&(rt[1]+rt[0]/2<0?(rt[2]+=rt[0]+rt[1],rt[0]=rt[1]=0):(rt[2]+=rt[0]/2,rt[1]+=rt[0]/2,rt[0]=0),J={a:rt[st.a],b:rt[st.b],c:rt[st.c]},_e=(G.a-J.a)*I.yaxis._m,Ee=(G.c-J.c-G.b+J.b)*I.xaxis._m);var Qe=e(I.x0+Ee,I.y0+_e);I.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Qe);var Lt=e(-Ee,-_e);I.clipDefRelative.select("path").attr("transform",Lt),I.aaxis.range=[J.a,I.sum-J.b-J.c],I.baxis.range=[I.sum-J.a-J.c,J.b],I.caxis.range=[I.sum-J.a-J.b,J.c],I.drawAxes(!1),I._hasClipOnAxisFalse&&I.plotContainer.select(".scatterlayer").selectAll(".trace").call(o.hideOutsideRangePoints,I),U.emit("plotly_relayouting",re(J))}function lt(){A.call("_guiRelayout",U,re(J))}N.onmousemove=function(Ee){f.hover(U,Ee,I.id),U._fullLayout._lasthover=N,U._fullLayout._hoversubplot=I.id},N.onmouseout=function(Ee){U._dragging||c.unhover(U,Ee)},c.init(this.dragOptions)};function O(I){d.select(I).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),AS=Ze({"src/plots/ternary/layout_attributes.js"(Z,q){"use strict";var d=oh(),x=bc().attributes,A=Wh(),M=pc().overrideAll,e=rs().extendFlat,t={title:{text:A.title.text,font:A.title.font},color:A.color,tickmode:A.minor.tickmode,nticks:e({},A.nticks,{dflt:6,min:1}),tick0:A.tick0,dtick:A.dtick,tickvals:A.tickvals,ticktext:A.ticktext,ticks:A.ticks,ticklen:A.ticklen,tickwidth:A.tickwidth,tickcolor:A.tickcolor,ticklabelstep:A.ticklabelstep,showticklabels:A.showticklabels,labelalias:A.labelalias,showtickprefix:A.showtickprefix,tickprefix:A.tickprefix,showticksuffix:A.showticksuffix,ticksuffix:A.ticksuffix,showexponent:A.showexponent,exponentformat:A.exponentformat,minexponent:A.minexponent,separatethousands:A.separatethousands,tickfont:A.tickfont,tickangle:A.tickangle,tickformat:A.tickformat,tickformatstops:A.tickformatstops,hoverformat:A.hoverformat,showline:e({},A.showline,{dflt:!0}),linecolor:A.linecolor,linewidth:A.linewidth,showgrid:e({},A.showgrid,{dflt:!0}),gridcolor:A.gridcolor,gridwidth:A.gridwidth,griddash:A.griddash,layer:A.layer,min:{valType:"number",dflt:0,min:0}},r=q.exports=M({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:d.background},sum:{valType:"number",dflt:1,min:0},aaxis:t,baxis:t,caxis:t},"plot","from-root");r.uirevision={valType:"any",editType:"none"},r.aaxis.uirevision=r.baxis.uirevision=r.caxis.uirevision={valType:"any",editType:"none"}}}),i0=Ze({"src/plots/subplot_defaults.js"(Z,q){"use strict";var d=ca(),x=Dl(),A=bc().defaults;q.exports=function(e,t,r,o){var a=o.type,i=o.attributes,n=o.handleDefaults,s=o.partition||"x",c=t._subplots[a],f=c.length,g=f&&c[0].replace(/\d+$/,""),v,T;function l(E,y){return d.coerce(v,T,i,E,y)}for(var _=0;_<f;_++){var w=c[_];e[w]?v=e[w]:v=e[w]={},T=x.newContainer(t,w,g),o.noUirevision||l("uirevision",t.uirevision);var S={};S[s]=[_/f,(_+1)/f],A(T,t,l,S),o.id=w,n(v,T,l,o)}}}}),EF=Ze({"src/plots/ternary/layout_defaults.js"(Z,q){"use strict";var d=Yn(),x=Dl(),A=ca(),M=i0(),e=$m(),t=Qm(),r=t1(),o=X0(),a=D_(),i=AS(),n=["aaxis","baxis","caxis"];q.exports=function(g,v,T){M(g,v,T,{type:"ternary",attributes:i,handleDefaults:s,font:v.font,paper_bgcolor:v.paper_bgcolor})};function s(f,g,v,T){var l=v("bgcolor"),_=v("sum");T.bgColor=d.combine(l,T.paper_bgcolor);for(var w,S,E,y=0;y<n.length;y++)w=n[y],S=f[w]||{},E=x.newContainer(g,w),E._name=w,c(S,E,T,g);var b=g.aaxis,p=g.baxis,u=g.caxis;b.min+p.min+u.min>=_&&(b.min=0,p.min=0,u.min=0,f.aaxis&&delete f.aaxis.min,f.baxis&&delete f.baxis.min,f.caxis&&delete f.caxis.min)}function c(f,g,v,T){var l=i[g._name];function _(m,h){return A.coerce(f,g,l,m,h)}_("uirevision",T.uirevision),g.type="linear";var w=_("color"),S=w!==l.color.dflt?w:v.font.color,E=g._name,y=E.charAt(0).toUpperCase(),b="Component "+y,p=_("title.text",b);g._hovertitle=p===b?p:y,A.coerceFont(_,"title.font",v.font,{overrideDflt:{size:A.bigFont(v.font.size),color:S}}),_("min"),o(f,g,_,"linear"),t(f,g,_,"linear"),e(f,g,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),r(f,g,_,{outerTicks:!0});var u=_("showticklabels");u&&(A.coerceFont(_,"tickfont",v.font,{overrideDflt:{color:S}}),_("tickangle"),_("tickformat")),a(f,g,_,{dfltColor:w,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:l}),_("hoverformat"),_("layer")}}}),CF=Ze({"src/plots/ternary/index.js"(Z){"use strict";var q=MF(),d=Hh().getSubplotCalcData,x=ca().counterRegex,A="ternary";Z.name=A;var M=Z.attr="subplot";Z.idRoot=A,Z.idRegex=Z.attrRegex=x(A);var e=Z.attributes={};e[M]={valType:"subplotid",dflt:"ternary",editType:"calc"},Z.layoutAttributes=AS(),Z.supplyLayoutDefaults=EF(),Z.plot=function(r){for(var o=r._fullLayout,a=r.calcdata,i=o._subplots[A],n=0;n<i.length;n++){var s=i[n],c=d(a,A,s),f=o[s]._subplot;f||(f=new q({id:s,graphDiv:r,container:o._ternarylayer.node()},o),o[s]._subplot=f),f.plot(c,o,r._promises)}},Z.clean=function(t,r,o,a){for(var i=a._subplots[A]||[],n=0;n<i.length;n++){var s=i[n],c=a[s]._subplot;!r[s]&&c&&(c.plotContainer.remove(),c.clipDef.remove(),c.clipDefRelative.remove(),c.layers["a-title"].remove(),c.layers["b-title"].remove(),c.layers["c-title"].remove())}},Z.updateFx=function(t){var r=t._fullLayout;r._ternarylayer.selectAll("g.toplevel").style("cursor",r.dragmode==="pan"?"move":"crosshair")}}}),kF=Ze({"src/traces/scatterternary/index.js"(Z,q){"use strict";q.exports={attributes:TS(),supplyDefaults:xF(),colorbar:hp(),formatLabels:bF(),calc:wF(),plot:TF(),style:ed().style,styleOnSelect:ed().styleOnSelect,hoverPoints:AF(),selectPoints:c1(),eventData:SF(),moduleType:"trace",name:"scatterternary",basePlotModule:CF(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}}),LF=Ze({"lib/scatterternary.js"(Z,q){"use strict";q.exports=kF()}}),SS=Ze({"src/traces/violin/attributes.js"(Z,q){"use strict";var d=B_(),x=rs().extendFlat,A=Qc().axisHoverFormat;q.exports={y:d.y,x:d.x,x0:d.x0,y0:d.y0,xhoverformat:A("x"),yhoverformat:A("y"),name:x({},d.name,{}),orientation:x({},d.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:d.fillcolor,points:x({},d.boxpoints,{}),jitter:x({},d.jitter,{}),pointpos:x({},d.pointpos,{}),width:x({},d.width,{}),marker:d.marker,text:d.text,hovertext:d.hovertext,hovertemplate:d.hovertemplate,quartilemethod:d.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:d.offsetgroup,alignmentgroup:d.alignmentgroup,selected:d.selected,unselected:d.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:d.zorder}}}),MS=Ze({"src/traces/violin/layout_attributes.js"(Z,q){"use strict";var d=N_(),x=ca().extendFlat;q.exports={violinmode:x({},d.boxmode,{}),violingap:x({},d.boxgap,{}),violingroupgap:x({},d.boxgroupgap,{})}}}),PF=Ze({"src/traces/violin/defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=U_(),M=SS();q.exports=function(t,r,o,a){function i(u,m){return d.coerce(t,r,M,u,m)}function n(u,m){return d.coerce2(t,r,M,u,m)}if(A.handleSampleDefaults(t,r,i,a),r.visible!==!1){i("bandwidth"),i("side");var s=i("width");s||(i("scalegroup",r.name),i("scalemode"));var c=i("span"),f;Array.isArray(c)&&(f="manual"),i("spanmode",f);var g=i("line.color",(t.marker||{}).color||o),v=i("line.width"),T=i("fillcolor",x.addOpacity(r.line.color,.5));A.handlePointsDefaults(t,r,i,{prefix:""});var l=n("box.width"),_=n("box.fillcolor",T),w=n("box.line.color",g),S=n("box.line.width",v),E=i("box.visible",!!(l||_||w||S));E||(r.box={visible:!1});var y=n("meanline.color",g),b=n("meanline.width",v),p=i("meanline.visible",!!(y||b));p||(r.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}}}),IF=Ze({"src/traces/violin/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=MS(),A=V2();q.exports=function(e,t,r){function o(a,i){return d.coerce(e,t,x,a,i)}A._supply(e,t,r,o,"violin")}}}),h3=Ze({"src/traces/violin/helpers.js"(Z){"use strict";var q=ca(),d={gaussian:function(x){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*x*x)}};Z.makeKDE=function(x,A,M){var e=M.length,t=d.gaussian,r=x.bandwidth,o=1/(e*r);return function(a){for(var i=0,n=0;n<e;n++)i+=t((a-M[n])/r);return o*i}},Z.getPositionOnKdePath=function(x,A,M){var e,t;A.orientation==="h"?(e="y",t="x"):(e="x",t="y");var r=q.findPointOnPath(x.path,M,t,{pathLength:x.pathLength}),o=x.posCenterPx,a=r[e],i=A.side==="both"?2*o-a:o;return[a,i]},Z.getKdeValue=function(x,A,M){var e=x.pts.map(Z.extractVal),t=Z.makeKDE(x,A,e);return t(M)/x.posDensityScale},Z.extractVal=function(x){return x.v}}}),RF=Ze({"src/traces/violin/calc.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=J5(),M=h3(),e=qs().BADNUM;q.exports=function(i,n){var s=A(i,n);if(s[0].t.empty)return s;for(var c=i._fullLayout,f=x.getFromId(i,n[n.orientation==="h"?"xaxis":"yaxis"]),g=1/0,v=-1/0,T=0,l=0,_=0;_<s.length;_++){var w=s[_],S=w.pts.map(M.extractVal),E=w.bandwidth=r(n,w,S),y=w.span=o(n,w,f,E);if(w.min===w.max&&E===0)y=w.span=[w.min,w.max],w.density=[{v:1,t:y[0]}],w.bandwidth=E,T=Math.max(T,1);else{var b=y[1]-y[0],p=Math.ceil(b/(E/3)),u=b/p;if(!isFinite(u)||!isFinite(p))return d.error("Something went wrong with computing the violin span"),s[0].t.empty=!0,s;var m=M.makeKDE(w,n,S);w.density=new Array(p);for(var h=0,P=y[0];P<y[1]+u/2;h++,P+=u){var L=m(P);w.density[h]={v:L,t:P},T=Math.max(T,L)}}l=Math.max(l,S.length),g=Math.min(g,y[0]),v=Math.max(v,y[1])}var z=x.findExtremes(f,[g,v],{padded:!0});if(n._extremes[f._id]=z,n.width)s[0].t.maxKDE=T;else{var F=c._violinScaleGroupStats,B=n.scalegroup,O=F[B];O?(O.maxKDE=Math.max(O.maxKDE,T),O.maxCount=Math.max(O.maxCount,l)):F[B]={maxKDE:T,maxCount:l}}return s[0].t.labels.kde=d._(i,"kde:"),s};function t(a,i,n){var s=Math.min(i,n/1.349);return 1.059*s*Math.pow(a,-.2)}function r(a,i,n){var s=i.max-i.min;if(!s)return a.bandwidth?a.bandwidth:0;if(a.bandwidth)return Math.max(a.bandwidth,s/1e4);var c=n.length,f=d.stdev(n,c-1,i.mean);return Math.max(t(c,f,i.q3-i.q1),s/100)}function o(a,i,n,s){var c=a.spanmode,f=a.span||[],g=[i.min,i.max],v=[i.min-2*s,i.max+2*s],T;function l(w){var S=f[w],E=n.type==="multicategory"?n.r2c(S):n.d2c(S,0,a[i.valLetter+"calendar"]);return E===e?v[w]:E}c==="soft"?T=v:c==="hard"?T=g:T=[l(0),l(1)];var _={type:"linear",range:T};return x.setConvert(_),_.cleanRange(),T}}}),DF=Ze({"src/traces/violin/cross_trace_calc.js"(Z,q){"use strict";var d=G2().setPositionOffset,x=["v","h"];q.exports=function(M,e){for(var t=M.calcdata,r=e.xaxis,o=e.yaxis,a=0;a<x.length;a++){for(var i=x[a],n=i==="h"?o:r,s=[],c=0;c<t.length;c++){var f=t[c],g=f[0].t,v=f[0].trace;v.visible===!0&&v.type==="violin"&&!g.empty&&v.orientation===i&&v.xaxis===r._id&&v.yaxis===o._id&&s.push(c)}d("violin",M,s,n)}}}}),zF=Ze({"src/traces/violin/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=H2(),e=z5(),t=h3();q.exports=function(o,a,i,n){var s=o._context.staticPlot,c=o._fullLayout,f=a.xaxis,g=a.yaxis;function v(T,l){var _=e(T,{xaxis:f,yaxis:g,trace:l,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return A.smoothopen(_[0],1)}x.makeTraceGroups(n,i,"trace violins").each(function(T){var l=d.select(this),_=T[0],w=_.t,S=_.trace;if(S.visible!==!0||w.empty){l.remove();return}var E=w.bPos,y=w.bdPos,b=a[w.valLetter+"axis"],p=a[w.posLetter+"axis"],u=S.side==="both",m=u||S.side==="positive",h=u||S.side==="negative",P=l.selectAll("path.violin").data(x.identity);P.enter().append("path").style("vector-effect",s?"none":"non-scaling-stroke").attr("class","violin"),P.exit().remove(),P.each(function(U){var W=d.select(this),Q=U.density,ue=Q.length,le=p.c2l(U.pos+E,!0),he=p.l2p(le),G;if(S.width)G=w.maxKDE/y;else{var $=c._violinScaleGroupStats[S.scalegroup];G=S.scalemode==="count"?$.maxKDE/y*($.maxCount/U.pts.length):$.maxKDE/y}var J,X,oe,ie,j,ee,re;if(m){for(ee=new Array(ue),ie=0;ie<ue;ie++)re=ee[ie]={},re[w.posLetter]=le+Q[ie].v/G,re[w.valLetter]=b.c2l(Q[ie].t,!0);J=v(ee,S)}if(h){for(ee=new Array(ue),j=0,ie=ue-1;j<ue;j++,ie--)re=ee[j]={},re[w.posLetter]=le-Q[ie].v/G,re[w.valLetter]=b.c2l(Q[ie].t,!0);X=v(ee,S)}if(u)oe=J+"L"+X.substr(1)+"Z";else{var ce=[he,b.c2p(Q[0].t)],be=[he,b.c2p(Q[ue-1].t)];S.orientation==="h"&&(ce.reverse(),be.reverse()),m?oe="M"+ce+"L"+J.substr(1)+"L"+be:oe="M"+be+"L"+X.substr(1)+"L"+ce}W.attr("d",oe),U.posCenterPx=he,U.posDensityScale=G*y,U.path=W.node(),U.pathLength=U.path.getTotalLength()/(u?2:1)});var L=S.box,z=L.width,F=(L.line||{}).width,B,O;u?(B=y*z,O=0):m?(B=[0,y*z/2],O=F*{x:1,y:-1}[w.posLetter]):(B=[y*z/2,0],O=F*{x:-1,y:1}[w.posLetter]),M.plotBoxAndWhiskers(l,{pos:p,val:b},S,{bPos:E,bdPos:B,bPosPxOffset:O}),M.plotBoxMean(l,{pos:p,val:b},S,{bPos:E,bdPos:B,bPosPxOffset:O});var I;!S.box.visible&&S.meanline.visible&&(I=x.identity);var N=l.selectAll("path.meanline").data(I||[]);N.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",s?"none":"non-scaling-stroke"),N.exit().remove(),N.each(function(U){var W=b.c2p(U.mean,!0),Q=t.getPositionOnKdePath(U,S,W);d.select(this).attr("d",S.orientation==="h"?"M"+W+","+Q[0]+"V"+Q[1]:"M"+Q[0]+","+W+"H"+Q[1])}),M.plotPoints(l,{x:f,y:g},S,w)})}}}),FF=Ze({"src/traces/violin/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=ed().stylePoints;q.exports=function(e){var t=d.select(e).selectAll("g.trace.violins");t.style("opacity",function(r){return r[0].trace.opacity}),t.each(function(r){var o=r[0].trace,a=d.select(this),i=o.box||{},n=i.line||{},s=o.meanline||{},c=s.width;a.selectAll("path.violin").style("stroke-width",o.line.width+"px").call(x.stroke,o.line.color).call(x.fill,o.fillcolor),a.selectAll("path.box").style("stroke-width",n.width+"px").call(x.stroke,n.color).call(x.fill,i.fillcolor);var f={"stroke-width":c+"px","stroke-dasharray":2*c+"px,"+c+"px"};a.selectAll("path.mean").style(f).call(x.stroke,s.color),a.selectAll("path.meanline").style(f).call(x.stroke,s.color),A(a,o,e)})}}}),OF=Ze({"src/traces/violin/hover.js"(Z,q){"use strict";var d=Yn(),x=ca(),A=Wo(),M=$5(),e=h3();q.exports=function(r,o,a,i,n){n||(n={});var s=n.hoverLayer,c=r.cd,f=c[0].trace,g=f.hoveron,v=g.indexOf("violins")!==-1,T=g.indexOf("kde")!==-1,l=[],_,w;if(v||T){var S=M.hoverOnBoxes(r,o,a,i);if(T&&S.length>0){var E=r.xa,y=r.ya,b,p,u,m,h;f.orientation==="h"?(h=o,b="y",u=y,p="x",m=E):(h=a,b="x",u=E,p="y",m=y);var P=c[r.index];if(h>=P.span[0]&&h<=P.span[1]){var L=x.extendFlat({},r),z=m.c2p(h,!0),F=e.getKdeValue(P,f,h),B=e.getPositionOnKdePath(P,f,z),O=u._offset,I=u._length;L[b+"0"]=B[0],L[b+"1"]=B[1],L[p+"0"]=L[p+"1"]=z,L[p+"Label"]=p+": "+A.hoverLabelText(m,h,f[p+"hoverformat"])+", "+c[0].t.labels.kde+" "+F.toFixed(3);for(var N=0,U=0;U<S.length;U++)if(S[U].attr==="med"){N=U;break}L.spikeDistance=S[N].spikeDistance;var W=b+"Spike";L[W]=S[N][W],S[N].spikeDistance=void 0,S[N][W]=void 0,L.hovertemplate=!1,l.push(L),w={},w[b+"1"]=x.constrain(O+B[0],O,O+I),w[b+"2"]=x.constrain(O+B[1],O,O+I),w[p+"1"]=w[p+"2"]=m._offset+z}}v&&(l=l.concat(S))}g.indexOf("points")!==-1&&(_=M.hoverOnPoints(r,o,a));var Q=s.selectAll(".violinline-"+f.uid).data(w?[0]:[]);return Q.enter().append("line").classed("violinline-"+f.uid,!0).attr("stroke-width",1.5),Q.exit().remove(),Q.attr(w).call(d.stroke,r.color),i==="closest"?_?[_]:l:(_&&l.push(_),l)}}}),BF=Ze({"src/traces/violin/index.js"(Z,q){"use strict";q.exports={attributes:SS(),layoutAttributes:MS(),supplyDefaults:PF(),crossTraceDefaults:U_().crossTraceDefaults,supplyLayoutDefaults:IF(),calc:RF(),crossTraceCalc:DF(),plot:zF(),style:FF(),styleOnSelect:ed().styleOnSelect,hoverPoints:OF(),selectPoints:Q5(),moduleType:"trace",name:"violin",basePlotModule:Zf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}}),NF=Ze({"lib/violin.js"(Z,q){"use strict";q.exports=BF()}}),UF=Ze({"src/traces/funnel/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}}),ES=Ze({"src/traces/funnel/attributes.js"(Z,q){"use strict";var d=Sv(),x=tf().line,A=eu(),M=Qc().axisHoverFormat,e=Cs().hovertemplateAttrs,t=Cs().texttemplateAttrs,r=UF(),o=rs().extendFlat,a=Yn();q.exports={x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),hovertext:d.hovertext,hovertemplate:e({},{keys:r.eventDataKeys}),hoverinfo:o({},A.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:t({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),text:d.text,textposition:d.textposition,insidetextanchor:o({},d.insidetextanchor,{dflt:"middle"}),textangle:o({},d.textangle,{dflt:0}),textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:o({},d.orientation,{}),offset:o({},d.offset,{arrayOk:!1}),width:o({},d.width,{arrayOk:!1}),marker:i(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:o({},x.color,{dflt:a.defaultLine}),width:o({},x.width,{dflt:0,editType:"plot"}),dash:x.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,zorder:d.zorder};function i(){var n=o({},d.marker);return delete n.pattern,delete n.cornerradius,n}}}),CS=Ze({"src/traces/funnel/layout_attributes.js"(Z,q){"use strict";q.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"}}}}),kS=Ze({"src/traces/funnel/defaults.js"(Z,q){"use strict";var d=ca(),x=J0(),A=gd().handleText,M=n1(),e=Qd(),t=ES(),r=Yn();function o(n,s,c,f){function g(E,y){return d.coerce(n,s,t,E,y)}var v=M(n,s,f,g);if(!v){s.visible=!1;return}e(n,s,f,g),g("xhoverformat"),g("yhoverformat"),g("orientation",s.y&&!s.x?"v":"h"),g("offset"),g("width");var T=g("text");g("hovertext"),g("hovertemplate");var l=g("textposition");A(n,s,f,g,l,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s.textposition!=="none"&&!s.texttemplate&&g("textinfo",d.isArrayOrTypedArray(T)?"text+value":"value");var _=g("marker.color",c);g("marker.line.color",r.defaultLine),g("marker.line.width");var w=g("connector.visible");if(w){g("connector.fillcolor",a(_));var S=g("connector.line.width");S&&(g("connector.line.color"),g("connector.line.dash"))}g("zorder")}function a(n){var s=d.isArrayOrTypedArray(n)?"#000":n;return r.addOpacity(s,.5*r.opacity(s))}function i(n,s){var c,f;function g(T){return d.coerce(f._input,f,t,T)}for(var v=0;v<n.length;v++)f=n[v],f.type==="funnel"&&(c=f._input,x(c,f,s,g,s.funnelmode))}q.exports={supplyDefaults:o,crossTraceDefaults:i}}}),jF=Ze({"src/traces/funnel/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=CS();q.exports=function(A,M,e){var t=!1;function r(i,n){return d.coerce(A,M,x,i,n)}for(var o=0;o<e.length;o++){var a=e[o];if(a.visible&&a.type==="funnel"){t=!0;break}}t&&(r("funnelmode"),r("funnelgap",.2),r("funnelgroupgap"))}}}),qF=Ze({"src/traces/funnel/arrays_to_calcdata.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){for(var e=0;e<A.length;e++)A[e].i=e;d.mergeArray(M.text,A,"tx"),d.mergeArray(M.hovertext,A,"htx");var t=M.marker;if(t){d.mergeArray(t.opacity,A,"mo"),d.mergeArray(t.color,A,"mc");var r=t.line;r&&(d.mergeArray(r.color,A,"mlc"),d.mergeArrayCastPositive(r.width,A,"mlw"))}}}}),VF=Ze({"src/traces/funnel/calc.js"(Z,q){"use strict";var d=Wo(),x=tv(),A=qF(),M=Od(),e=qs().BADNUM;q.exports=function(o,a){var i=d.getFromId(o,a.xaxis||"x"),n=d.getFromId(o,a.yaxis||"y"),s,c,f,g,v,T,l,_;a.orientation==="h"?(s=i.makeCalcdata(a,"x"),f=n.makeCalcdata(a,"y"),g=x(a,n,"y",f),v=!!a.yperiodalignment,T="y"):(s=n.makeCalcdata(a,"y"),f=i.makeCalcdata(a,"x"),g=x(a,i,"x",f),v=!!a.xperiodalignment,T="x"),c=g.vals;var w=Math.min(c.length,s.length),S=new Array(w);for(a._base=[],l=0;l<w;l++){s[l]<0&&(s[l]=e);var E=!1;s[l]!==e&&l+1<w&&s[l+1]!==e&&(E=!0),_=S[l]={p:c[l],s:s[l],cNext:E},a._base[l]=-.5*_.s,v&&(S[l].orig_p=f[l],S[l][T+"End"]=g.ends[l],S[l][T+"Start"]=g.starts[l]),a.ids&&(_.id=String(a.ids[l])),l===0&&(S[0].vTotal=0),S[0].vTotal+=t(_.s),_.begR=t(_.s)/t(S[0].s)}var y;for(l=0;l<w;l++)_=S[l],_.s!==e&&(_.sumR=_.s/S[0].vTotal,_.difR=y!==void 0?_.s/y:1,y=_.s);return A(S,a),M(S,a),S};function t(r){return r===e?0:r}}}),GF=Ze({"src/traces/funnel/cross_trace_calc.js"(Z,q){"use strict";var d=$0().setGroupPositions;q.exports=function(A,M){var e=A._fullLayout,t=A._fullData,r=A.calcdata,o=M.xaxis,a=M.yaxis,i=[],n=[],s=[],c,f;for(f=0;f<t.length;f++){var g=t[f],v=g.orientation==="h";g.visible===!0&&g.xaxis===o._id&&g.yaxis===a._id&&g.type==="funnel"&&(c=r[f],v?s.push(c):n.push(c),i.push(c))}var T={mode:e.funnelmode,norm:e.funnelnorm,gap:e.funnelgap,groupgap:e.funnelgroupgap};for(d(A,o,a,n,T),d(A,a,o,s,T),f=0;f<i.length;f++){c=i[f];for(var l=0;l<c.length;l++)l+1<c.length&&(c[l].nextP0=c[l+1].p0,c[l].nextS0=c[l+1].s0,c[l].nextP1=c[l+1].p1,c[l].nextS1=c[l+1].s1)}}}}),HF=Ze({"src/traces/funnel/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=qs().BADNUM,e=eg(),t=Ap().clearMinTextSize;q.exports=function(n,s,c,f){var g=n._fullLayout;t("funnel",g),r(n,s,c,f),o(n,s,c,f),e.plot(n,s,c,f,{mode:g.funnelmode,norm:g.funnelmode,gap:g.funnelgap,groupgap:g.funnelgroupgap})};function r(i,n,s,c){var f=n.xaxis,g=n.yaxis;x.makeTraceGroups(c,s,"trace bars").each(function(v){var T=d.select(this),l=v[0].trace,_=x.ensureSingle(T,"g","regions");if(!l.connector||!l.connector.visible){_.remove();return}var w=l.orientation==="h",S=_.selectAll("g.region").data(x.identity);S.enter().append("g").classed("region",!0),S.exit().remove();var E=S.size();S.each(function(y,b){if(!(b!==E-1&&!y.cNext)){var p=a(y,f,g,w),u=p[0],m=p[1],h="";u[0]!==M&&m[0]!==M&&u[1]!==M&&m[1]!==M&&u[2]!==M&&m[2]!==M&&u[3]!==M&&m[3]!==M&&(w?h+="M"+u[0]+","+m[1]+"L"+u[2]+","+m[2]+"H"+u[3]+"L"+u[1]+","+m[1]+"Z":h+="M"+u[1]+","+m[1]+"L"+u[2]+","+m[3]+"V"+m[2]+"L"+u[1]+","+m[0]+"Z"),h===""&&(h="M0,0Z"),x.ensureSingle(d.select(this),"path").attr("d",h).call(A.setClipUrl,n.layerClipId,i)}})})}function o(i,n,s,c){var f=n.xaxis,g=n.yaxis;x.makeTraceGroups(c,s,"trace bars").each(function(v){var T=d.select(this),l=v[0].trace,_=x.ensureSingle(T,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){_.remove();return}var w=l.orientation==="h",S=_.selectAll("g.line").data(x.identity);S.enter().append("g").classed("line",!0),S.exit().remove();var E=S.size();S.each(function(y,b){if(!(b!==E-1&&!y.cNext)){var p=a(y,f,g,w),u=p[0],m=p[1],h="";u[3]!==void 0&&m[3]!==void 0&&(w?(h+="M"+u[0]+","+m[1]+"L"+u[2]+","+m[2],h+="M"+u[1]+","+m[1]+"L"+u[3]+","+m[2]):(h+="M"+u[1]+","+m[1]+"L"+u[2]+","+m[3],h+="M"+u[1]+","+m[0]+"L"+u[2]+","+m[2])),h===""&&(h="M0,0Z"),x.ensureSingle(d.select(this),"path").attr("d",h).call(A.setClipUrl,n.layerClipId,i)}})})}function a(i,n,s,c){var f=[],g=[],v=c?n:s,T=c?s:n;return f[0]=v.c2p(i.s0,!0),g[0]=T.c2p(i.p0,!0),f[1]=v.c2p(i.s1,!0),g[1]=T.c2p(i.p1,!0),f[2]=v.c2p(i.nextS0,!0),g[2]=T.c2p(i.nextP0,!0),f[3]=v.c2p(i.nextS1,!0),g[3]=T.c2p(i.nextP1,!0),c?[f,g]:[g,f]}}}),WF=Ze({"src/traces/funnel/style.js"(Z,q){"use strict";var d=On(),x=as(),A=Yn(),M=Zm().DESELECTDIM,e=Nd(),t=Ap().resizeText,r=e.styleTextPoints;function o(a,i,n){var s=n||d.select(a).selectAll('g[class^="funnellayer"]').selectAll("g.trace");t(a,s,"funnel"),s.style("opacity",function(c){return c[0].trace.opacity}),s.each(function(c){var f=d.select(this),g=c[0].trace;f.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=g.marker;d.select(this).call(A.fill,v.mc||T.color).call(A.stroke,v.mlc||T.line.color).call(x.dashLine,T.line.dash,v.mlw||T.line.width).style("opacity",g.selectedpoints&&!v.selected?M:1)}}),r(f,g,a),f.selectAll(".regions").each(function(){d.select(this).selectAll("path").style("stroke-width",0).call(A.fill,g.connector.fillcolor)}),f.selectAll(".lines").each(function(){var v=g.connector.line;x.lineGroupStyle(d.select(this).selectAll("path"),v.width,v.color,v.dash)})})}q.exports={style:o}}}),XF=Ze({"src/traces/funnel/hover.js"(Z,q){"use strict";var d=Yn().opacity,x=f1().hoverOnBars,A=ca().formatPercent;q.exports=function(t,r,o,a,i){var n=x(t,r,o,a,i);if(n){var s=n.cd,c=s[0].trace,f=c.orientation==="h",g=n.index,v=s[g],T=f?"x":"y";n[T+"LabelVal"]=v.s,n.percentInitial=v.begR,n.percentInitialLabel=A(v.begR,1),n.percentPrevious=v.difR,n.percentPreviousLabel=A(v.difR,1),n.percentTotal=v.sumR,n.percentTotalLabel=A(v.sumR,1);var l=v.hi||c.hoverinfo,_=[];if(l&&l!=="none"&&l!=="skip"){var w=l==="all",S=l.split("+"),E=function(y){return w||S.indexOf(y)!==-1};E("percent initial")&&_.push(n.percentInitialLabel+" of initial"),E("percent previous")&&_.push(n.percentPreviousLabel+" of previous"),E("percent total")&&_.push(n.percentTotalLabel+" of total")}return n.extraText=_.join("<br>"),n.color=M(c,v),[n]}};function M(e,t){var r=e.marker,o=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(d(o))return o;if(d(a)&&i)return a}}}),ZF=Ze({"src/traces/funnel/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return x.x="xVal"in A?A.xVal:A.x,x.y="yVal"in A?A.yVal:A.y,"percentInitial"in A&&(x.percentInitial=A.percentInitial),"percentPrevious"in A&&(x.percentPrevious=A.percentPrevious),"percentTotal"in A&&(x.percentTotal=A.percentTotal),A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),x}}}),YF=Ze({"src/traces/funnel/index.js"(Z,q){"use strict";q.exports={attributes:ES(),layoutAttributes:CS(),supplyDefaults:kS().supplyDefaults,crossTraceDefaults:kS().crossTraceDefaults,supplyLayoutDefaults:jF(),calc:VF(),crossTraceCalc:GF(),plot:HF(),style:WF().style,hoverPoints:XF(),eventData:ZF(),selectPoints:h1(),moduleType:"trace",name:"funnel",basePlotModule:Zf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),KF=Ze({"lib/funnel.js"(Z,q){"use strict";q.exports=YF()}}),JF=Ze({"src/traces/waterfall/constants.js"(Z,q){"use strict";q.exports={eventDataKeys:["initial","delta","final"]}}}),LS=Ze({"src/traces/waterfall/attributes.js"(Z,q){"use strict";var d=Sv(),x=tf().line,A=eu(),M=Qc().axisHoverFormat,e=Cs().hovertemplateAttrs,t=Cs().texttemplateAttrs,r=JF(),o=rs().extendFlat,a=Yn();function i(n){return{marker:{color:o({},d.marker.color,{arrayOk:!1,editType:"style"}),line:{color:o({},d.marker.line.color,{arrayOk:!1,editType:"style"}),width:o({},d.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}q.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:d.x,x0:d.x0,dx:d.dx,y:d.y,y0:d.y0,dy:d.dy,xperiod:d.xperiod,yperiod:d.yperiod,xperiod0:d.xperiod0,yperiod0:d.yperiod0,xperiodalignment:d.xperiodalignment,yperiodalignment:d.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),hovertext:d.hovertext,hovertemplate:e({},{keys:r.eventDataKeys}),hoverinfo:o({},A.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:t({editType:"plot"},{keys:r.eventDataKeys.concat(["label"])}),text:d.text,textposition:d.textposition,insidetextanchor:d.insidetextanchor,textangle:d.textangle,textfont:d.textfont,insidetextfont:d.insidetextfont,outsidetextfont:d.outsidetextfont,constraintext:d.constraintext,cliponaxis:d.cliponaxis,orientation:d.orientation,offset:d.offset,width:d.width,increasing:i("increasing"),decreasing:i("decreasing"),totals:i("intermediate sums and total"),connector:{line:{color:o({},x.color,{dflt:a.defaultLine}),width:o({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:d.offsetgroup,alignmentgroup:d.alignmentgroup,zorder:d.zorder}}}),PS=Ze({"src/traces/waterfall/layout_attributes.js"(Z,q){"use strict";q.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"}}}}),d1=Ze({"src/constants/delta.js"(Z,q){"use strict";q.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),IS=Ze({"src/traces/waterfall/defaults.js"(Z,q){"use strict";var d=ca(),x=J0(),A=gd().handleText,M=n1(),e=Qd(),t=LS(),r=Yn(),o=d1(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n="#4499FF";function s(g,v,T){g(v+".marker.color",T),g(v+".marker.line.color",r.defaultLine),g(v+".marker.line.width")}function c(g,v,T,l){function _(b,p){return d.coerce(g,v,t,b,p)}var w=M(g,v,l,_);if(!w){v.visible=!1;return}e(g,v,l,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",v.x&&!v.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate");var S=_("textposition");A(g,v,l,_,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(_("texttemplate"),v.texttemplate||_("textinfo")),s(_,"increasing",a),s(_,"decreasing",i),s(_,"totals",n);var E=_("connector.visible");if(E){_("connector.mode");var y=_("connector.line.width");y&&(_("connector.line.color"),_("connector.line.dash"))}_("zorder")}function f(g,v){var T,l;function _(S){return d.coerce(l._input,l,t,S)}if(v.waterfallmode==="group")for(var w=0;w<g.length;w++)l=g[w],T=l._input,x(T,l,v,_,v.waterfallmode)}q.exports={supplyDefaults:c,crossTraceDefaults:f}}}),$F=Ze({"src/traces/waterfall/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=PS();q.exports=function(A,M,e){var t=!1;function r(i,n){return d.coerce(A,M,x,i,n)}for(var o=0;o<e.length;o++){var a=e[o];if(a.visible&&a.type==="waterfall"){t=!0;break}}t&&(r("waterfallmode"),r("waterfallgap",.2),r("waterfallgroupgap"))}}}),QF=Ze({"src/traces/waterfall/calc.js"(Z,q){"use strict";var d=Wo(),x=tv(),A=ca().mergeArray,M=Od(),e=qs().BADNUM;function t(o){return o==="a"||o==="absolute"}function r(o){return o==="t"||o==="total"}q.exports=function(a,i){var n=d.getFromId(a,i.xaxis||"x"),s=d.getFromId(a,i.yaxis||"y"),c,f,g,v,T,l;i.orientation==="h"?(c=n.makeCalcdata(i,"x"),g=s.makeCalcdata(i,"y"),v=x(i,s,"y",g),T=!!i.yperiodalignment,l="y"):(c=s.makeCalcdata(i,"y"),g=n.makeCalcdata(i,"x"),v=x(i,n,"x",g),T=!!i.xperiodalignment,l="x"),f=v.vals;for(var _=Math.min(f.length,c.length),w=new Array(_),S=0,E,y=!1,b=0;b<_;b++){var p=c[b]||0,u=!1;(c[b]!==e||r(i.measure[b])||t(i.measure[b]))&&b+1<_&&(c[b+1]!==e||r(i.measure[b+1])||t(i.measure[b+1]))&&(u=!0);var m=w[b]={i:b,p:f[b],s:p,rawS:p,cNext:u};t(i.measure[b])?(S=m.s,m.isSum=!0,m.dir="totals",m.s=S):r(i.measure[b])?(m.isSum=!0,m.dir="totals",m.s=S):(m.isSum=!1,m.dir=m.rawS<0?"decreasing":"increasing",E=m.s,m.s=S+E,S+=E),m.dir==="totals"&&(y=!0),T&&(w[b].orig_p=g[b],w[b][l+"End"]=v.ends[b],w[b][l+"Start"]=v.starts[b]),i.ids&&(m.id=String(i.ids[b])),m.v=(i.base||0)+S}return w.length&&(w[0].hasTotals=y),A(i.text,w,"tx"),A(i.hovertext,w,"htx"),M(w,i),w}}}),eO=Ze({"src/traces/waterfall/cross_trace_calc.js"(Z,q){"use strict";var d=$0().setGroupPositions;q.exports=function(A,M){var e=A._fullLayout,t=A._fullData,r=A.calcdata,o=M.xaxis,a=M.yaxis,i=[],n=[],s=[],c,f;for(f=0;f<t.length;f++){var g=t[f];g.visible===!0&&g.xaxis===o._id&&g.yaxis===a._id&&g.type==="waterfall"&&(c=r[f],g.orientation==="h"?s.push(c):n.push(c),i.push(c))}var v={mode:e.waterfallmode,norm:e.waterfallnorm,gap:e.waterfallgap,groupgap:e.waterfallgroupgap};for(d(A,o,a,n,v),d(A,a,o,s,v),f=0;f<i.length;f++){c=i[f];for(var T=0;T<c.length;T++){var l=c[T];l.isSum===!1&&(l.s0+=T===0?0:c[T-1].s),T+1<c.length&&(c[T].nextP0=c[T+1].p0,c[T].nextS0=c[T+1].s0)}}}}}),tO=Ze({"src/traces/waterfall/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=qs().BADNUM,e=eg(),t=Ap().clearMinTextSize;q.exports=function(i,n,s,c){var f=i._fullLayout;t("waterfall",f),e.plot(i,n,s,c,{mode:f.waterfallmode,norm:f.waterfallmode,gap:f.waterfallgap,groupgap:f.waterfallgroupgap}),r(i,n,s,c)};function r(a,i,n,s){var c=i.xaxis,f=i.yaxis;x.makeTraceGroups(s,n,"trace bars").each(function(g){var v=d.select(this),T=g[0].trace,l=x.ensureSingle(v,"g","lines");if(!T.connector||!T.connector.visible){l.remove();return}var _=T.orientation==="h",w=T.connector.mode,S=l.selectAll("g.line").data(x.identity);S.enter().append("g").classed("line",!0),S.exit().remove();var E=S.size();S.each(function(y,b){if(!(b!==E-1&&!y.cNext)){var p=o(y,c,f,_),u=p[0],m=p[1],h="";u[0]!==M&&m[0]!==M&&u[1]!==M&&m[1]!==M&&(w==="spanning"&&!y.isSum&&b>0&&(_?h+="M"+u[0]+","+m[1]+"V"+m[0]:h+="M"+u[1]+","+m[0]+"H"+u[0]),w!=="between"&&(y.isSum||b<E-1)&&(_?h+="M"+u[1]+","+m[0]+"V"+m[1]:h+="M"+u[0]+","+m[1]+"H"+u[1]),u[2]!==M&&m[2]!==M&&(_?h+="M"+u[1]+","+m[1]+"V"+m[2]:h+="M"+u[1]+","+m[1]+"H"+u[2])),h===""&&(h="M0,0Z"),x.ensureSingle(d.select(this),"path").attr("d",h).call(A.setClipUrl,i.layerClipId,a)}})})}function o(a,i,n,s){var c=[],f=[],g=s?i:n,v=s?n:i;return c[0]=g.c2p(a.s0,!0),f[0]=v.c2p(a.p0,!0),c[1]=g.c2p(a.s1,!0),f[1]=v.c2p(a.p1,!0),c[2]=g.c2p(a.nextS0,!0),f[2]=v.c2p(a.nextP0,!0),s?[c,f]:[f,c]}}}),rO=Ze({"src/traces/waterfall/style.js"(Z,q){"use strict";var d=On(),x=as(),A=Yn(),M=Zm().DESELECTDIM,e=Nd(),t=Ap().resizeText,r=e.styleTextPoints;function o(a,i,n){var s=n||d.select(a).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");t(a,s,"waterfall"),s.style("opacity",function(c){return c[0].trace.opacity}),s.each(function(c){var f=d.select(this),g=c[0].trace;f.selectAll(".point > path").each(function(v){if(!v.isBlank){var T=g[v.dir].marker;d.select(this).call(A.fill,T.color).call(A.stroke,T.line.color).call(x.dashLine,T.line.dash,T.line.width).style("opacity",g.selectedpoints&&!v.selected?M:1)}}),r(f,g,a),f.selectAll(".lines").each(function(){var v=g.connector.line;x.lineGroupStyle(d.select(this).selectAll("path"),v.width,v.color,v.dash)})})}q.exports={style:o}}}),aO=Ze({"src/traces/waterfall/hover.js"(Z,q){"use strict";var d=Wo().hoverLabelText,x=Yn().opacity,A=f1().hoverOnBars,M=d1(),e={increasing:M.INCREASING.SYMBOL,decreasing:M.DECREASING.SYMBOL};q.exports=function(o,a,i,n,s){var c=A(o,a,i,n,s);if(!c)return;var f=c.cd,g=f[0].trace,v=g.orientation==="h",T=v?"x":"y",l=v?o.xa:o.ya;function _(P){return d(l,P,g[T+"hoverformat"])}var w=c.index,S=f[w],E=S.isSum?S.b+S.s:S.rawS;c.initial=S.b+S.s-E,c.delta=E,c.final=c.initial+c.delta;var y=_(Math.abs(c.delta));c.deltaLabel=E<0?"("+y+")":y,c.finalLabel=_(c.final),c.initialLabel=_(c.initial);var b=S.hi||g.hoverinfo,p=[];if(b&&b!=="none"&&b!=="skip"){var u=b==="all",m=b.split("+"),h=function(P){return u||m.indexOf(P)!==-1};S.isSum||(h("final")&&(v?!h("x"):!h("y"))&&p.push(c.finalLabel),h("delta")&&(E<0?p.push(c.deltaLabel+" "+e.decreasing):p.push(c.deltaLabel+" "+e.increasing)),h("initial")&&p.push("Initial: "+c.initialLabel))}return p.length&&(c.extraText=p.join("<br>")),c.color=t(g,S),[c]};function t(r,o){var a=r[o.dir].marker,i=a.color,n=a.line.color,s=a.line.width;if(x(i))return i;if(x(n)&&s)return n}}}),iO=Ze({"src/traces/waterfall/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return x.x="xVal"in A?A.xVal:A.x,x.y="yVal"in A?A.yVal:A.y,"initial"in A&&(x.initial=A.initial),"delta"in A&&(x.delta=A.delta),"final"in A&&(x.final=A.final),A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),x}}}),nO=Ze({"src/traces/waterfall/index.js"(Z,q){"use strict";q.exports={attributes:LS(),layoutAttributes:PS(),supplyDefaults:IS().supplyDefaults,crossTraceDefaults:IS().crossTraceDefaults,supplyLayoutDefaults:$F(),calc:QF(),crossTraceCalc:eO(),plot:tO(),style:rO().style,hoverPoints:aO(),eventData:iO(),selectPoints:h1(),moduleType:"trace",name:"waterfall",basePlotModule:Zf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),oO=Ze({"lib/waterfall.js"(Z,q){"use strict";q.exports=nO()}}),v1=Ze({"src/traces/image/constants.js"(Z,q){"use strict";q.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(d){return d.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(d){return d.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(d){return d.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(d){var x=d.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(d){var x=d.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),RS=Ze({"src/traces/image/attributes.js"(Z,q){"use strict";var d=eu(),x=tf().zorder,A=Cs().hovertemplateAttrs,M=rs().extendFlat,e=v1().colormodel,t=["rgb","rgba","rgba256","hsl","hsla"],r=[],o=[];for(i=0;i<t.length;i++)a=e[t[i]],r.push("For the `"+t[i]+"` colormodel, it is ["+(a.zminDflt||a.min).join(", ")+"]."),o.push("For the `"+t[i]+"` colormodel, it is ["+(a.zmaxDflt||a.max).join(", ")+"].");var a,i;q.exports=M({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:t,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:M({},d.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:A({},{keys:["z","color","colormodel"]}),zorder:x})}}),sO=Ze({"src/traces/image/defaults.js"(Z,q){"use strict";var d=ca(),x=RS(),A=v1(),M=Zv().IMAGE_URL_PREFIX;q.exports=function(t,r){function o(n,s){return d.coerce(t,r,x,n,s)}o("source"),r.source&&!r.source.match(M)&&delete r.source,r._hasSource=!!r.source;var a=o("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}o("x0"),o("y0"),o("dx"),o("dy");var i;r._hasZ?(o("colormodel","rgb"),i=A.colormodel[r.colormodel],o("zmin",i.zminDflt||i.min),o("zmax",i.zmaxDflt||i.max)):r._hasSource&&(r.colormodel="rgba256",i=A.colormodel[r.colormodel],r.zmin=i.zminDflt,r.zmax=i.zmaxDflt),o("zsmooth"),o("text"),o("hovertext"),o("hovertemplate"),r._length=null,o("zorder")}}}),Yv=Ze({"node_modules/inherits/inherits_browser.js"(Z,q){typeof Object.create=="function"?q.exports=function(x,A){A&&(x.super_=A,x.prototype=Object.create(A.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(x,A){if(A){x.super_=A;var M=function(){};M.prototype=A.prototype,x.prototype=new M,x.prototype.constructor=x}}}}),DS=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(Z,q){q.exports=W0().EventEmitter}}),lO=Ze({"node_modules/base64-js/index.js"(Z){"use strict";Z.byteLength=r,Z.toByteArray=a,Z.fromByteArray=s;var q=[],d=[],x=typeof Uint8Array<"u"?Uint8Array:Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(M=0,e=A.length;M<e;++M)q[M]=A[M],d[A.charCodeAt(M)]=M;var M,e;d[45]=62,d[95]=63;function t(c){var f=c.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=c.indexOf("=");g===-1&&(g=f);var v=g===f?0:4-g%4;return[g,v]}function r(c){var f=t(c),g=f[0],v=f[1];return(g+v)*3/4-v}function o(c,f,g){return(f+g)*3/4-g}function a(c){var f,g=t(c),v=g[0],T=g[1],l=new x(o(c,v,T)),_=0,w=T>0?v-4:v,S;for(S=0;S<w;S+=4)f=d[c.charCodeAt(S)]<<18|d[c.charCodeAt(S+1)]<<12|d[c.charCodeAt(S+2)]<<6|d[c.charCodeAt(S+3)],l[_++]=f>>16&255,l[_++]=f>>8&255,l[_++]=f&255;return T===2&&(f=d[c.charCodeAt(S)]<<2|d[c.charCodeAt(S+1)]>>4,l[_++]=f&255),T===1&&(f=d[c.charCodeAt(S)]<<10|d[c.charCodeAt(S+1)]<<4|d[c.charCodeAt(S+2)]>>2,l[_++]=f>>8&255,l[_++]=f&255),l}function i(c){return q[c>>18&63]+q[c>>12&63]+q[c>>6&63]+q[c&63]}function n(c,f,g){for(var v,T=[],l=f;l<g;l+=3)v=(c[l]<<16&16711680)+(c[l+1]<<8&65280)+(c[l+2]&255),T.push(i(v));return T.join("")}function s(c){for(var f,g=c.length,v=g%3,T=[],l=16383,_=0,w=g-v;_<w;_+=l)T.push(n(c,_,_+l>w?w:_+l));return v===1?(f=c[g-1],T.push(q[f>>2]+q[f<<4&63]+"==")):v===2&&(f=(c[g-2]<<8)+c[g-1],T.push(q[f>>10]+q[f>>4&63]+q[f<<2&63]+"=")),T.join("")}}}),uO=Ze({"node_modules/ieee754/index.js"(Z){Z.read=function(q,d,x,A,M){var e,t,r=M*8-A-1,o=(1<<r)-1,a=o>>1,i=-7,n=x?M-1:0,s=x?-1:1,c=q[d+n];for(n+=s,e=c&(1<<-i)-1,c>>=-i,i+=r;i>0;e=e*256+q[d+n],n+=s,i-=8);for(t=e&(1<<-i)-1,e>>=-i,i+=A;i>0;t=t*256+q[d+n],n+=s,i-=8);if(e===0)e=1-a;else{if(e===o)return t?NaN:(c?-1:1)*(1/0);t=t+Math.pow(2,A),e=e-a}return(c?-1:1)*t*Math.pow(2,e-A)},Z.write=function(q,d,x,A,M,e){var t,r,o,a=e*8-M-1,i=(1<<a)-1,n=i>>1,s=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=A?0:e-1,f=A?1:-1,g=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(r=isNaN(d)?1:0,t=i):(t=Math.floor(Math.log(d)/Math.LN2),d*(o=Math.pow(2,-t))<1&&(t--,o*=2),t+n>=1?d+=s/o:d+=s*Math.pow(2,1-n),d*o>=2&&(t++,o/=2),t+n>=i?(r=0,t=i):t+n>=1?(r=(d*o-1)*Math.pow(2,M),t=t+n):(r=d*Math.pow(2,n-1)*Math.pow(2,M),t=0));M>=8;q[x+c]=r&255,c+=f,r/=256,M-=8);for(t=t<<M|r,a+=M;a>0;q[x+c]=t&255,c+=f,t/=256,a-=8);q[x+c-f]|=g*128}}}),tg=Ze({"node_modules/buffer/index.js"(Z){"use strict";var q=lO(),d=uO(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Z.Buffer=t,Z.SlowBuffer=T,Z.INSPECT_MAX_BYTES=50;var A=2147483647;Z.kMaxLength=A,t.TYPED_ARRAY_SUPPORT=M(),!t.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&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 M(){try{let Ee=new Uint8Array(1),_e={foo:function(){return 42}};return Object.setPrototypeOf(_e,Uint8Array.prototype),Object.setPrototypeOf(Ee,_e),Ee.foo()===42}catch{return!1}}Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}});function e(Ee){if(Ee>A)throw new RangeError('The value "'+Ee+'" is invalid for option "size"');let _e=new Uint8Array(Ee);return Object.setPrototypeOf(_e,t.prototype),_e}function t(Ee,_e,fe){if(typeof Ee=="number"){if(typeof _e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(Ee)}return r(Ee,_e,fe)}t.poolSize=8192;function r(Ee,_e,fe){if(typeof Ee=="string")return n(Ee,_e);if(ArrayBuffer.isView(Ee))return c(Ee);if(Ee==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ee);if(Xe(Ee,ArrayBuffer)||Ee&&Xe(Ee.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xe(Ee,SharedArrayBuffer)||Ee&&Xe(Ee.buffer,SharedArrayBuffer)))return f(Ee,_e,fe);if(typeof Ee=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Fe=Ee.valueOf&&Ee.valueOf();if(Fe!=null&&Fe!==Ee)return t.from(Fe,_e,fe);let rt=g(Ee);if(rt)return rt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ee[Symbol.toPrimitive]=="function")return t.from(Ee[Symbol.toPrimitive]("string"),_e,fe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ee)}t.from=function(Ee,_e,fe){return r(Ee,_e,fe)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array);function o(Ee){if(typeof Ee!="number")throw new TypeError('"size" argument must be of type number');if(Ee<0)throw new RangeError('The value "'+Ee+'" is invalid for option "size"')}function a(Ee,_e,fe){return o(Ee),Ee<=0?e(Ee):_e!==void 0?typeof fe=="string"?e(Ee).fill(_e,fe):e(Ee).fill(_e):e(Ee)}t.alloc=function(Ee,_e,fe){return a(Ee,_e,fe)};function i(Ee){return o(Ee),e(Ee<0?0:v(Ee)|0)}t.allocUnsafe=function(Ee){return i(Ee)},t.allocUnsafeSlow=function(Ee){return i(Ee)};function n(Ee,_e){if((typeof _e!="string"||_e==="")&&(_e="utf8"),!t.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);let fe=l(Ee,_e)|0,Fe=e(fe),rt=Fe.write(Ee,_e);return rt!==fe&&(Fe=Fe.slice(0,rt)),Fe}function s(Ee){let _e=Ee.length<0?0:v(Ee.length)|0,fe=e(_e);for(let Fe=0;Fe<_e;Fe+=1)fe[Fe]=Ee[Fe]&255;return fe}function c(Ee){if(Xe(Ee,Uint8Array)){let _e=new Uint8Array(Ee);return f(_e.buffer,_e.byteOffset,_e.byteLength)}return s(Ee)}function f(Ee,_e,fe){if(_e<0||Ee.byteLength<_e)throw new RangeError('"offset" is outside of buffer bounds');if(Ee.byteLength<_e+(fe||0))throw new RangeError('"length" is outside of buffer bounds');let Fe;return _e===void 0&&fe===void 0?Fe=new Uint8Array(Ee):fe===void 0?Fe=new Uint8Array(Ee,_e):Fe=new Uint8Array(Ee,_e,fe),Object.setPrototypeOf(Fe,t.prototype),Fe}function g(Ee){if(t.isBuffer(Ee)){let _e=v(Ee.length)|0,fe=e(_e);return fe.length===0||Ee.copy(fe,0,0,_e),fe}if(Ee.length!==void 0)return typeof Ee.length!="number"||it(Ee.length)?e(0):s(Ee);if(Ee.type==="Buffer"&&Array.isArray(Ee.data))return s(Ee.data)}function v(Ee){if(Ee>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return Ee|0}function T(Ee){return+Ee!=Ee&&(Ee=0),t.alloc(+Ee)}t.isBuffer=function(_e){return _e!=null&&_e._isBuffer===!0&&_e!==t.prototype},t.compare=function(_e,fe){if(Xe(_e,Uint8Array)&&(_e=t.from(_e,_e.offset,_e.byteLength)),Xe(fe,Uint8Array)&&(fe=t.from(fe,fe.offset,fe.byteLength)),!t.isBuffer(_e)||!t.isBuffer(fe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_e===fe)return 0;let Fe=_e.length,rt=fe.length;for(let st=0,Qe=Math.min(Fe,rt);st<Qe;++st)if(_e[st]!==fe[st]){Fe=_e[st],rt=fe[st];break}return Fe<rt?-1:rt<Fe?1:0},t.isEncoding=function(_e){switch(String(_e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(_e,fe){if(!Array.isArray(_e))throw new TypeError('"list" argument must be an Array of Buffers');if(_e.length===0)return t.alloc(0);let Fe;if(fe===void 0)for(fe=0,Fe=0;Fe<_e.length;++Fe)fe+=_e[Fe].length;let rt=t.allocUnsafe(fe),st=0;for(Fe=0;Fe<_e.length;++Fe){let Qe=_e[Fe];if(Xe(Qe,Uint8Array))st+Qe.length>rt.length?(t.isBuffer(Qe)||(Qe=t.from(Qe)),Qe.copy(rt,st)):Uint8Array.prototype.set.call(rt,Qe,st);else if(t.isBuffer(Qe))Qe.copy(rt,st);else throw new TypeError('"list" argument must be an Array of Buffers');st+=Qe.length}return rt};function l(Ee,_e){if(t.isBuffer(Ee))return Ee.length;if(ArrayBuffer.isView(Ee)||Xe(Ee,ArrayBuffer))return Ee.byteLength;if(typeof Ee!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ee);let fe=Ee.length,Fe=arguments.length>2&&arguments[2]===!0;if(!Fe&&fe===0)return 0;let rt=!1;for(;;)switch(_e){case"ascii":case"latin1":case"binary":return fe;case"utf8":case"utf-8":return ce(Ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe*2;case"hex":return fe>>>1;case"base64":return ze(Ee).length;default:if(rt)return Fe?-1:ce(Ee).length;_e=(""+_e).toLowerCase(),rt=!0}}t.byteLength=l;function _(Ee,_e,fe){let Fe=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((fe===void 0||fe>this.length)&&(fe=this.length),fe<=0)||(fe>>>=0,_e>>>=0,fe<=_e))return"";for(Ee||(Ee="utf8");;)switch(Ee){case"hex":return O(this,_e,fe);case"utf8":case"utf-8":return P(this,_e,fe);case"ascii":return F(this,_e,fe);case"latin1":case"binary":return B(this,_e,fe);case"base64":return h(this,_e,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,_e,fe);default:if(Fe)throw new TypeError("Unknown encoding: "+Ee);Ee=(Ee+"").toLowerCase(),Fe=!0}}t.prototype._isBuffer=!0;function w(Ee,_e,fe){let Fe=Ee[_e];Ee[_e]=Ee[fe],Ee[fe]=Fe}t.prototype.swap16=function(){let _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let fe=0;fe<_e;fe+=2)w(this,fe,fe+1);return this},t.prototype.swap32=function(){let _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let fe=0;fe<_e;fe+=4)w(this,fe,fe+3),w(this,fe+1,fe+2);return this},t.prototype.swap64=function(){let _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let fe=0;fe<_e;fe+=8)w(this,fe,fe+7),w(this,fe+1,fe+6),w(this,fe+2,fe+5),w(this,fe+3,fe+4);return this},t.prototype.toString=function(){let _e=this.length;return _e===0?"":arguments.length===0?P(this,0,_e):_.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(_e){if(!t.isBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:t.compare(this,_e)===0},t.prototype.inspect=function(){let _e="",fe=Z.INSPECT_MAX_BYTES;return _e=this.toString("hex",0,fe).replace(/(.{2})/g,"$1 ").trim(),this.length>fe&&(_e+=" ... "),"<Buffer "+_e+">"},x&&(t.prototype[x]=t.prototype.inspect),t.prototype.compare=function(_e,fe,Fe,rt,st){if(Xe(_e,Uint8Array)&&(_e=t.from(_e,_e.offset,_e.byteLength)),!t.isBuffer(_e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _e);if(fe===void 0&&(fe=0),Fe===void 0&&(Fe=_e?_e.length:0),rt===void 0&&(rt=0),st===void 0&&(st=this.length),fe<0||Fe>_e.length||rt<0||st>this.length)throw new RangeError("out of range index");if(rt>=st&&fe>=Fe)return 0;if(rt>=st)return-1;if(fe>=Fe)return 1;if(fe>>>=0,Fe>>>=0,rt>>>=0,st>>>=0,this===_e)return 0;let Qe=st-rt,Lt=Fe-fe,kt=Math.min(Qe,Lt),Vt=this.slice(rt,st),Zt=_e.slice(fe,Fe);for(let Sr=0;Sr<kt;++Sr)if(Vt[Sr]!==Zt[Sr]){Qe=Vt[Sr],Lt=Zt[Sr];break}return Qe<Lt?-1:Lt<Qe?1:0};function S(Ee,_e,fe,Fe,rt){if(Ee.length===0)return-1;if(typeof fe=="string"?(Fe=fe,fe=0):fe>2147483647?fe=2147483647:fe<-2147483648&&(fe=-2147483648),fe=+fe,it(fe)&&(fe=rt?0:Ee.length-1),fe<0&&(fe=Ee.length+fe),fe>=Ee.length){if(rt)return-1;fe=Ee.length-1}else if(fe<0)if(rt)fe=0;else return-1;if(typeof _e=="string"&&(_e=t.from(_e,Fe)),t.isBuffer(_e))return _e.length===0?-1:E(Ee,_e,fe,Fe,rt);if(typeof _e=="number")return _e=_e&255,typeof Uint8Array.prototype.indexOf=="function"?rt?Uint8Array.prototype.indexOf.call(Ee,_e,fe):Uint8Array.prototype.lastIndexOf.call(Ee,_e,fe):E(Ee,[_e],fe,Fe,rt);throw new TypeError("val must be string, number or Buffer")}function E(Ee,_e,fe,Fe,rt){let st=1,Qe=Ee.length,Lt=_e.length;if(Fe!==void 0&&(Fe=String(Fe).toLowerCase(),Fe==="ucs2"||Fe==="ucs-2"||Fe==="utf16le"||Fe==="utf-16le")){if(Ee.length<2||_e.length<2)return-1;st=2,Qe/=2,Lt/=2,fe/=2}function kt(Zt,Sr){return st===1?Zt[Sr]:Zt.readUInt16BE(Sr*st)}let Vt;if(rt){let Zt=-1;for(Vt=fe;Vt<Qe;Vt++)if(kt(Ee,Vt)===kt(_e,Zt===-1?0:Vt-Zt)){if(Zt===-1&&(Zt=Vt),Vt-Zt+1===Lt)return Zt*st}else Zt!==-1&&(Vt-=Vt-Zt),Zt=-1}else for(fe+Lt>Qe&&(fe=Qe-Lt),Vt=fe;Vt>=0;Vt--){let Zt=!0;for(let Sr=0;Sr<Lt;Sr++)if(kt(Ee,Vt+Sr)!==kt(_e,Sr)){Zt=!1;break}if(Zt)return Vt}return-1}t.prototype.includes=function(_e,fe,Fe){return this.indexOf(_e,fe,Fe)!==-1},t.prototype.indexOf=function(_e,fe,Fe){return S(this,_e,fe,Fe,!0)},t.prototype.lastIndexOf=function(_e,fe,Fe){return S(this,_e,fe,Fe,!1)};function y(Ee,_e,fe,Fe){fe=Number(fe)||0;let rt=Ee.length-fe;Fe?(Fe=Number(Fe),Fe>rt&&(Fe=rt)):Fe=rt;let st=_e.length;Fe>st/2&&(Fe=st/2);let Qe;for(Qe=0;Qe<Fe;++Qe){let Lt=parseInt(_e.substr(Qe*2,2),16);if(it(Lt))return Qe;Ee[fe+Qe]=Lt}return Qe}function b(Ee,_e,fe,Fe){return Re(ce(_e,Ee.length-fe),Ee,fe,Fe)}function p(Ee,_e,fe,Fe){return Re(be(_e),Ee,fe,Fe)}function u(Ee,_e,fe,Fe){return Re(ze(_e),Ee,fe,Fe)}function m(Ee,_e,fe,Fe){return Re(Ae(_e,Ee.length-fe),Ee,fe,Fe)}t.prototype.write=function(_e,fe,Fe,rt){if(fe===void 0)rt="utf8",Fe=this.length,fe=0;else if(Fe===void 0&&typeof fe=="string")rt=fe,Fe=this.length,fe=0;else if(isFinite(fe))fe=fe>>>0,isFinite(Fe)?(Fe=Fe>>>0,rt===void 0&&(rt="utf8")):(rt=Fe,Fe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let st=this.length-fe;if((Fe===void 0||Fe>st)&&(Fe=st),_e.length>0&&(Fe<0||fe<0)||fe>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");let Qe=!1;for(;;)switch(rt){case"hex":return y(this,_e,fe,Fe);case"utf8":case"utf-8":return b(this,_e,fe,Fe);case"ascii":case"latin1":case"binary":return p(this,_e,fe,Fe);case"base64":return u(this,_e,fe,Fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,_e,fe,Fe);default:if(Qe)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),Qe=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function h(Ee,_e,fe){return _e===0&&fe===Ee.length?q.fromByteArray(Ee):q.fromByteArray(Ee.slice(_e,fe))}function P(Ee,_e,fe){fe=Math.min(Ee.length,fe);let Fe=[],rt=_e;for(;rt<fe;){let st=Ee[rt],Qe=null,Lt=st>239?4:st>223?3:st>191?2:1;if(rt+Lt<=fe){let kt,Vt,Zt,Sr;switch(Lt){case 1:st<128&&(Qe=st);break;case 2:kt=Ee[rt+1],(kt&192)===128&&(Sr=(st&31)<<6|kt&63,Sr>127&&(Qe=Sr));break;case 3:kt=Ee[rt+1],Vt=Ee[rt+2],(kt&192)===128&&(Vt&192)===128&&(Sr=(st&15)<<12|(kt&63)<<6|Vt&63,Sr>2047&&(Sr<55296||Sr>57343)&&(Qe=Sr));break;case 4:kt=Ee[rt+1],Vt=Ee[rt+2],Zt=Ee[rt+3],(kt&192)===128&&(Vt&192)===128&&(Zt&192)===128&&(Sr=(st&15)<<18|(kt&63)<<12|(Vt&63)<<6|Zt&63,Sr>65535&&Sr<1114112&&(Qe=Sr))}}Qe===null?(Qe=65533,Lt=1):Qe>65535&&(Qe-=65536,Fe.push(Qe>>>10&1023|55296),Qe=56320|Qe&1023),Fe.push(Qe),rt+=Lt}return z(Fe)}var L=4096;function z(Ee){let _e=Ee.length;if(_e<=L)return String.fromCharCode.apply(String,Ee);let fe="",Fe=0;for(;Fe<_e;)fe+=String.fromCharCode.apply(String,Ee.slice(Fe,Fe+=L));return fe}function F(Ee,_e,fe){let Fe="";fe=Math.min(Ee.length,fe);for(let rt=_e;rt<fe;++rt)Fe+=String.fromCharCode(Ee[rt]&127);return Fe}function B(Ee,_e,fe){let Fe="";fe=Math.min(Ee.length,fe);for(let rt=_e;rt<fe;++rt)Fe+=String.fromCharCode(Ee[rt]);return Fe}function O(Ee,_e,fe){let Fe=Ee.length;(!_e||_e<0)&&(_e=0),(!fe||fe<0||fe>Fe)&&(fe=Fe);let rt="";for(let st=_e;st<fe;++st)rt+=ot[Ee[st]];return rt}function I(Ee,_e,fe){let Fe=Ee.slice(_e,fe),rt="";for(let st=0;st<Fe.length-1;st+=2)rt+=String.fromCharCode(Fe[st]+Fe[st+1]*256);return rt}t.prototype.slice=function(_e,fe){let Fe=this.length;_e=~~_e,fe=fe===void 0?Fe:~~fe,_e<0?(_e+=Fe,_e<0&&(_e=0)):_e>Fe&&(_e=Fe),fe<0?(fe+=Fe,fe<0&&(fe=0)):fe>Fe&&(fe=Fe),fe<_e&&(fe=_e);let rt=this.subarray(_e,fe);return Object.setPrototypeOf(rt,t.prototype),rt};function N(Ee,_e,fe){if(Ee%1!==0||Ee<0)throw new RangeError("offset is not uint");if(Ee+_e>fe)throw new RangeError("Trying to access beyond buffer length")}t.prototype.readUintLE=t.prototype.readUIntLE=function(_e,fe,Fe){_e=_e>>>0,fe=fe>>>0,Fe||N(_e,fe,this.length);let rt=this[_e],st=1,Qe=0;for(;++Qe<fe&&(st*=256);)rt+=this[_e+Qe]*st;return rt},t.prototype.readUintBE=t.prototype.readUIntBE=function(_e,fe,Fe){_e=_e>>>0,fe=fe>>>0,Fe||N(_e,fe,this.length);let rt=this[_e+--fe],st=1;for(;fe>0&&(st*=256);)rt+=this[_e+--fe]*st;return rt},t.prototype.readUint8=t.prototype.readUInt8=function(_e,fe){return _e=_e>>>0,fe||N(_e,1,this.length),this[_e]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(_e,fe){return _e=_e>>>0,fe||N(_e,2,this.length),this[_e]|this[_e+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(_e,fe){return _e=_e>>>0,fe||N(_e,2,this.length),this[_e]<<8|this[_e+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(_e,fe){return _e=_e>>>0,fe||N(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(_e,fe){return _e=_e>>>0,fe||N(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])},t.prototype.readBigUInt64LE=tt(function(_e){_e=_e>>>0,ie(_e,"offset");let fe=this[_e],Fe=this[_e+7];(fe===void 0||Fe===void 0)&&j(_e,this.length-8);let rt=fe+this[++_e]*2**8+this[++_e]*2**16+this[++_e]*2**24,st=this[++_e]+this[++_e]*2**8+this[++_e]*2**16+Fe*2**24;return BigInt(rt)+(BigInt(st)<<BigInt(32))}),t.prototype.readBigUInt64BE=tt(function(_e){_e=_e>>>0,ie(_e,"offset");let fe=this[_e],Fe=this[_e+7];(fe===void 0||Fe===void 0)&&j(_e,this.length-8);let rt=fe*2**24+this[++_e]*2**16+this[++_e]*2**8+this[++_e],st=this[++_e]*2**24+this[++_e]*2**16+this[++_e]*2**8+Fe;return(BigInt(rt)<<BigInt(32))+BigInt(st)}),t.prototype.readIntLE=function(_e,fe,Fe){_e=_e>>>0,fe=fe>>>0,Fe||N(_e,fe,this.length);let rt=this[_e],st=1,Qe=0;for(;++Qe<fe&&(st*=256);)rt+=this[_e+Qe]*st;return st*=128,rt>=st&&(rt-=Math.pow(2,8*fe)),rt},t.prototype.readIntBE=function(_e,fe,Fe){_e=_e>>>0,fe=fe>>>0,Fe||N(_e,fe,this.length);let rt=fe,st=1,Qe=this[_e+--rt];for(;rt>0&&(st*=256);)Qe+=this[_e+--rt]*st;return st*=128,Qe>=st&&(Qe-=Math.pow(2,8*fe)),Qe},t.prototype.readInt8=function(_e,fe){return _e=_e>>>0,fe||N(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]},t.prototype.readInt16LE=function(_e,fe){_e=_e>>>0,fe||N(_e,2,this.length);let Fe=this[_e]|this[_e+1]<<8;return Fe&32768?Fe|4294901760:Fe},t.prototype.readInt16BE=function(_e,fe){_e=_e>>>0,fe||N(_e,2,this.length);let Fe=this[_e+1]|this[_e]<<8;return Fe&32768?Fe|4294901760:Fe},t.prototype.readInt32LE=function(_e,fe){return _e=_e>>>0,fe||N(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24},t.prototype.readInt32BE=function(_e,fe){return _e=_e>>>0,fe||N(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]},t.prototype.readBigInt64LE=tt(function(_e){_e=_e>>>0,ie(_e,"offset");let fe=this[_e],Fe=this[_e+7];(fe===void 0||Fe===void 0)&&j(_e,this.length-8);let rt=this[_e+4]+this[_e+5]*2**8+this[_e+6]*2**16+(Fe<<24);return(BigInt(rt)<<BigInt(32))+BigInt(fe+this[++_e]*2**8+this[++_e]*2**16+this[++_e]*2**24)}),t.prototype.readBigInt64BE=tt(function(_e){_e=_e>>>0,ie(_e,"offset");let fe=this[_e],Fe=this[_e+7];(fe===void 0||Fe===void 0)&&j(_e,this.length-8);let rt=(fe<<24)+this[++_e]*2**16+this[++_e]*2**8+this[++_e];return(BigInt(rt)<<BigInt(32))+BigInt(this[++_e]*2**24+this[++_e]*2**16+this[++_e]*2**8+Fe)}),t.prototype.readFloatLE=function(_e,fe){return _e=_e>>>0,fe||N(_e,4,this.length),d.read(this,_e,!0,23,4)},t.prototype.readFloatBE=function(_e,fe){return _e=_e>>>0,fe||N(_e,4,this.length),d.read(this,_e,!1,23,4)},t.prototype.readDoubleLE=function(_e,fe){return _e=_e>>>0,fe||N(_e,8,this.length),d.read(this,_e,!0,52,8)},t.prototype.readDoubleBE=function(_e,fe){return _e=_e>>>0,fe||N(_e,8,this.length),d.read(this,_e,!1,52,8)};function U(Ee,_e,fe,Fe,rt,st){if(!t.isBuffer(Ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>rt||_e<st)throw new RangeError('"value" argument is out of bounds');if(fe+Fe>Ee.length)throw new RangeError("Index out of range")}t.prototype.writeUintLE=t.prototype.writeUIntLE=function(_e,fe,Fe,rt){if(_e=+_e,fe=fe>>>0,Fe=Fe>>>0,!rt){let Lt=Math.pow(2,8*Fe)-1;U(this,_e,fe,Fe,Lt,0)}let st=1,Qe=0;for(this[fe]=_e&255;++Qe<Fe&&(st*=256);)this[fe+Qe]=_e/st&255;return fe+Fe},t.prototype.writeUintBE=t.prototype.writeUIntBE=function(_e,fe,Fe,rt){if(_e=+_e,fe=fe>>>0,Fe=Fe>>>0,!rt){let Lt=Math.pow(2,8*Fe)-1;U(this,_e,fe,Fe,Lt,0)}let st=Fe-1,Qe=1;for(this[fe+st]=_e&255;--st>=0&&(Qe*=256);)this[fe+st]=_e/Qe&255;return fe+Fe},t.prototype.writeUint8=t.prototype.writeUInt8=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,1,255,0),this[fe]=_e&255,fe+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,2,65535,0),this[fe]=_e&255,this[fe+1]=_e>>>8,fe+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,2,65535,0),this[fe]=_e>>>8,this[fe+1]=_e&255,fe+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,4,4294967295,0),this[fe+3]=_e>>>24,this[fe+2]=_e>>>16,this[fe+1]=_e>>>8,this[fe]=_e&255,fe+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,4,4294967295,0),this[fe]=_e>>>24,this[fe+1]=_e>>>16,this[fe+2]=_e>>>8,this[fe+3]=_e&255,fe+4};function W(Ee,_e,fe,Fe,rt){oe(_e,Fe,rt,Ee,fe,7);let st=Number(_e&BigInt(4294967295));Ee[fe++]=st,st=st>>8,Ee[fe++]=st,st=st>>8,Ee[fe++]=st,st=st>>8,Ee[fe++]=st;let Qe=Number(_e>>BigInt(32)&BigInt(4294967295));return Ee[fe++]=Qe,Qe=Qe>>8,Ee[fe++]=Qe,Qe=Qe>>8,Ee[fe++]=Qe,Qe=Qe>>8,Ee[fe++]=Qe,fe}function Q(Ee,_e,fe,Fe,rt){oe(_e,Fe,rt,Ee,fe,7);let st=Number(_e&BigInt(4294967295));Ee[fe+7]=st,st=st>>8,Ee[fe+6]=st,st=st>>8,Ee[fe+5]=st,st=st>>8,Ee[fe+4]=st;let Qe=Number(_e>>BigInt(32)&BigInt(4294967295));return Ee[fe+3]=Qe,Qe=Qe>>8,Ee[fe+2]=Qe,Qe=Qe>>8,Ee[fe+1]=Qe,Qe=Qe>>8,Ee[fe]=Qe,fe+8}t.prototype.writeBigUInt64LE=tt(function(_e,fe=0){return W(this,_e,fe,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeBigUInt64BE=tt(function(_e,fe=0){return Q(this,_e,fe,BigInt(0),BigInt("0xffffffffffffffff"))}),t.prototype.writeIntLE=function(_e,fe,Fe,rt){if(_e=+_e,fe=fe>>>0,!rt){let kt=Math.pow(2,8*Fe-1);U(this,_e,fe,Fe,kt-1,-kt)}let st=0,Qe=1,Lt=0;for(this[fe]=_e&255;++st<Fe&&(Qe*=256);)_e<0&&Lt===0&&this[fe+st-1]!==0&&(Lt=1),this[fe+st]=(_e/Qe>>0)-Lt&255;return fe+Fe},t.prototype.writeIntBE=function(_e,fe,Fe,rt){if(_e=+_e,fe=fe>>>0,!rt){let kt=Math.pow(2,8*Fe-1);U(this,_e,fe,Fe,kt-1,-kt)}let st=Fe-1,Qe=1,Lt=0;for(this[fe+st]=_e&255;--st>=0&&(Qe*=256);)_e<0&&Lt===0&&this[fe+st+1]!==0&&(Lt=1),this[fe+st]=(_e/Qe>>0)-Lt&255;return fe+Fe},t.prototype.writeInt8=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,1,127,-128),_e<0&&(_e=255+_e+1),this[fe]=_e&255,fe+1},t.prototype.writeInt16LE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,2,32767,-32768),this[fe]=_e&255,this[fe+1]=_e>>>8,fe+2},t.prototype.writeInt16BE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,2,32767,-32768),this[fe]=_e>>>8,this[fe+1]=_e&255,fe+2},t.prototype.writeInt32LE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,4,2147483647,-2147483648),this[fe]=_e&255,this[fe+1]=_e>>>8,this[fe+2]=_e>>>16,this[fe+3]=_e>>>24,fe+4},t.prototype.writeInt32BE=function(_e,fe,Fe){return _e=+_e,fe=fe>>>0,Fe||U(this,_e,fe,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),this[fe]=_e>>>24,this[fe+1]=_e>>>16,this[fe+2]=_e>>>8,this[fe+3]=_e&255,fe+4},t.prototype.writeBigInt64LE=tt(function(_e,fe=0){return W(this,_e,fe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),t.prototype.writeBigInt64BE=tt(function(_e,fe=0){return Q(this,_e,fe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ue(Ee,_e,fe,Fe,rt,st){if(fe+Fe>Ee.length)throw new RangeError("Index out of range");if(fe<0)throw new RangeError("Index out of range")}function le(Ee,_e,fe,Fe,rt){return _e=+_e,fe=fe>>>0,rt||ue(Ee,_e,fe,4,34028234663852886e22,-34028234663852886e22),d.write(Ee,_e,fe,Fe,23,4),fe+4}t.prototype.writeFloatLE=function(_e,fe,Fe){return le(this,_e,fe,!0,Fe)},t.prototype.writeFloatBE=function(_e,fe,Fe){return le(this,_e,fe,!1,Fe)};function he(Ee,_e,fe,Fe,rt){return _e=+_e,fe=fe>>>0,rt||ue(Ee,_e,fe,8,17976931348623157e292,-17976931348623157e292),d.write(Ee,_e,fe,Fe,52,8),fe+8}t.prototype.writeDoubleLE=function(_e,fe,Fe){return he(this,_e,fe,!0,Fe)},t.prototype.writeDoubleBE=function(_e,fe,Fe){return he(this,_e,fe,!1,Fe)},t.prototype.copy=function(_e,fe,Fe,rt){if(!t.isBuffer(_e))throw new TypeError("argument should be a Buffer");if(Fe||(Fe=0),!rt&&rt!==0&&(rt=this.length),fe>=_e.length&&(fe=_e.length),fe||(fe=0),rt>0&&rt<Fe&&(rt=Fe),rt===Fe||_e.length===0||this.length===0)return 0;if(fe<0)throw new RangeError("targetStart out of bounds");if(Fe<0||Fe>=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),_e.length-fe<rt-Fe&&(rt=_e.length-fe+Fe);let st=rt-Fe;return this===_e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(fe,Fe,rt):Uint8Array.prototype.set.call(_e,this.subarray(Fe,rt),fe),st},t.prototype.fill=function(_e,fe,Fe,rt){if(typeof _e=="string"){if(typeof fe=="string"?(rt=fe,fe=0,Fe=this.length):typeof Fe=="string"&&(rt=Fe,Fe=this.length),rt!==void 0&&typeof rt!="string")throw new TypeError("encoding must be a string");if(typeof rt=="string"&&!t.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);if(_e.length===1){let Qe=_e.charCodeAt(0);(rt==="utf8"&&Qe<128||rt==="latin1")&&(_e=Qe)}}else typeof _e=="number"?_e=_e&255:typeof _e=="boolean"&&(_e=Number(_e));if(fe<0||this.length<fe||this.length<Fe)throw new RangeError("Out of range index");if(Fe<=fe)return this;fe=fe>>>0,Fe=Fe===void 0?this.length:Fe>>>0,_e||(_e=0);let st;if(typeof _e=="number")for(st=fe;st<Fe;++st)this[st]=_e;else{let Qe=t.isBuffer(_e)?_e:t.from(_e,rt),Lt=Qe.length;if(Lt===0)throw new TypeError('The value "'+_e+'" is invalid for argument "value"');for(st=0;st<Fe-fe;++st)this[st+fe]=Qe[st%Lt]}return this};var G={};function $(Ee,_e,fe){G[Ee]=class extends fe{constructor(){super(),Object.defineProperty(this,"message",{value:_e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ee}]`,this.stack,delete this.name}get code(){return Ee}set code(rt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:rt,writable:!0})}toString(){return`${this.name} [${Ee}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(Ee){return Ee?`${Ee} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(Ee,_e){return`The "${Ee}" argument must be of type number. Received type ${typeof _e}`},TypeError),$("ERR_OUT_OF_RANGE",function(Ee,_e,fe){let Fe=`The value of "${Ee}" is out of range.`,rt=fe;return Number.isInteger(fe)&&Math.abs(fe)>2**32?rt=J(String(fe)):typeof fe=="bigint"&&(rt=String(fe),(fe>BigInt(2)**BigInt(32)||fe<-(BigInt(2)**BigInt(32)))&&(rt=J(rt)),rt+="n"),Fe+=` It must be ${_e}. Received ${rt}`,Fe},RangeError);function J(Ee){let _e="",fe=Ee.length,Fe=Ee[0]==="-"?1:0;for(;fe>=Fe+4;fe-=3)_e=`_${Ee.slice(fe-3,fe)}${_e}`;return`${Ee.slice(0,fe)}${_e}`}function X(Ee,_e,fe){ie(_e,"offset"),(Ee[_e]===void 0||Ee[_e+fe]===void 0)&&j(_e,Ee.length-(fe+1))}function oe(Ee,_e,fe,Fe,rt,st){if(Ee>fe||Ee<_e){let Qe=typeof _e=="bigint"?"n":"",Lt;throw st>3?_e===0||_e===BigInt(0)?Lt=`>= 0${Qe} and < 2${Qe} ** ${(st+1)*8}${Qe}`:Lt=`>= -(2${Qe} ** ${(st+1)*8-1}${Qe}) and < 2 ** ${(st+1)*8-1}${Qe}`:Lt=`>= ${_e}${Qe} and <= ${fe}${Qe}`,new G.ERR_OUT_OF_RANGE("value",Lt,Ee)}X(Fe,rt,st)}function ie(Ee,_e){if(typeof Ee!="number")throw new G.ERR_INVALID_ARG_TYPE(_e,"number",Ee)}function j(Ee,_e,fe){throw Math.floor(Ee)!==Ee?(ie(Ee,fe),new G.ERR_OUT_OF_RANGE(fe||"offset","an integer",Ee)):_e<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(fe||"offset",`>= ${fe?1:0} and <= ${_e}`,Ee)}var ee=/[^+/0-9A-Za-z-_]/g;function re(Ee){if(Ee=Ee.split("=")[0],Ee=Ee.trim().replace(ee,""),Ee.length<2)return"";for(;Ee.length%4!==0;)Ee=Ee+"=";return Ee}function ce(Ee,_e){_e=_e||1/0;let fe,Fe=Ee.length,rt=null,st=[];for(let Qe=0;Qe<Fe;++Qe){if(fe=Ee.charCodeAt(Qe),fe>55295&&fe<57344){if(!rt){if(fe>56319){(_e-=3)>-1&&st.push(239,191,189);continue}else if(Qe+1===Fe){(_e-=3)>-1&&st.push(239,191,189);continue}rt=fe;continue}if(fe<56320){(_e-=3)>-1&&st.push(239,191,189),rt=fe;continue}fe=(rt-55296<<10|fe-56320)+65536}else rt&&(_e-=3)>-1&&st.push(239,191,189);if(rt=null,fe<128){if((_e-=1)<0)break;st.push(fe)}else if(fe<2048){if((_e-=2)<0)break;st.push(fe>>6|192,fe&63|128)}else if(fe<65536){if((_e-=3)<0)break;st.push(fe>>12|224,fe>>6&63|128,fe&63|128)}else if(fe<1114112){if((_e-=4)<0)break;st.push(fe>>18|240,fe>>12&63|128,fe>>6&63|128,fe&63|128)}else throw new Error("Invalid code point")}return st}function be(Ee){let _e=[];for(let fe=0;fe<Ee.length;++fe)_e.push(Ee.charCodeAt(fe)&255);return _e}function Ae(Ee,_e){let fe,Fe,rt,st=[];for(let Qe=0;Qe<Ee.length&&!((_e-=2)<0);++Qe)fe=Ee.charCodeAt(Qe),Fe=fe>>8,rt=fe%256,st.push(rt),st.push(Fe);return st}function ze(Ee){return q.toByteArray(re(Ee))}function Re(Ee,_e,fe,Fe){let rt;for(rt=0;rt<Fe&&!(rt+fe>=_e.length||rt>=Ee.length);++rt)_e[rt+fe]=Ee[rt];return rt}function Xe(Ee,_e){return Ee instanceof _e||Ee!=null&&Ee.constructor!=null&&Ee.constructor.name!=null&&Ee.constructor.name===_e.name}function it(Ee){return Ee!==Ee}var ot=function(){let Ee="0123456789abcdef",_e=new Array(256);for(let fe=0;fe<16;++fe){let Fe=fe*16;for(let rt=0;rt<16;++rt)_e[Fe+rt]=Ee[fe]+Ee[rt]}return _e}();function tt(Ee){return typeof BigInt>"u"?lt:Ee}function lt(){throw new Error("BigInt not supported")}}}),p3=Ze({"node_modules/has-symbols/shams.js"(Z,q){"use strict";q.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},A=Symbol("test"),M=Object(A);if(typeof A=="string"||Object.prototype.toString.call(A)!=="[object Symbol]"||Object.prototype.toString.call(M)!=="[object Symbol]")return!1;var e=42;x[A]=e;for(var t in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var r=Object.getOwnPropertySymbols(x);if(r.length!==1||r[0]!==A||!Object.prototype.propertyIsEnumerable.call(x,A))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(x,A);if(o.value!==e||o.enumerable!==!0)return!1}return!0}}}),H_=Ze({"node_modules/has-tostringtag/shams.js"(Z,q){"use strict";var d=p3();q.exports=function(){return d()&&!!Symbol.toStringTag}}}),zS=Ze({"node_modules/es-object-atoms/index.js"(Z,q){"use strict";q.exports=Object}}),cO=Ze({"node_modules/es-errors/index.js"(Z,q){"use strict";q.exports=Error}}),fO=Ze({"node_modules/es-errors/eval.js"(Z,q){"use strict";q.exports=EvalError}}),hO=Ze({"node_modules/es-errors/range.js"(Z,q){"use strict";q.exports=RangeError}}),pO=Ze({"node_modules/es-errors/ref.js"(Z,q){"use strict";q.exports=ReferenceError}}),FS=Ze({"node_modules/es-errors/syntax.js"(Z,q){"use strict";q.exports=SyntaxError}}),m1=Ze({"node_modules/es-errors/type.js"(Z,q){"use strict";q.exports=TypeError}}),dO=Ze({"node_modules/es-errors/uri.js"(Z,q){"use strict";q.exports=URIError}}),vO=Ze({"node_modules/math-intrinsics/abs.js"(Z,q){"use strict";q.exports=Math.abs}}),mO=Ze({"node_modules/math-intrinsics/floor.js"(Z,q){"use strict";q.exports=Math.floor}}),gO=Ze({"node_modules/math-intrinsics/max.js"(Z,q){"use strict";q.exports=Math.max}}),yO=Ze({"node_modules/math-intrinsics/min.js"(Z,q){"use strict";q.exports=Math.min}}),_O=Ze({"node_modules/math-intrinsics/pow.js"(Z,q){"use strict";q.exports=Math.pow}}),xO=Ze({"node_modules/math-intrinsics/round.js"(Z,q){"use strict";q.exports=Math.round}}),bO=Ze({"node_modules/math-intrinsics/isNaN.js"(Z,q){"use strict";q.exports=Number.isNaN||function(x){return x!==x}}}),wO=Ze({"node_modules/math-intrinsics/sign.js"(Z,q){"use strict";var d=bO();q.exports=function(A){return d(A)||A===0?A:A<0?-1:1}}}),TO=Ze({"node_modules/gopd/gOPD.js"(Z,q){"use strict";q.exports=Object.getOwnPropertyDescriptor}}),rg=Ze({"node_modules/gopd/index.js"(Z,q){"use strict";var d=TO();if(d)try{d([],"length")}catch{d=null}q.exports=d}}),W_=Ze({"node_modules/es-define-property/index.js"(Z,q){"use strict";var d=Object.defineProperty||!1;if(d)try{d({},"a",{value:1})}catch{d=!1}q.exports=d}}),AO=Ze({"node_modules/has-symbols/index.js"(Z,q){"use strict";var d=typeof Symbol<"u"&&Symbol,x=p3();q.exports=function(){return typeof d!="function"||typeof Symbol!="function"||typeof d("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),OS=Ze({"node_modules/get-proto/Reflect.getPrototypeOf.js"(Z,q){"use strict";q.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),BS=Ze({"node_modules/get-proto/Object.getPrototypeOf.js"(Z,q){"use strict";var d=zS();q.exports=d.getPrototypeOf||null}}),SO=Ze({"node_modules/function-bind/implementation.js"(Z,q){"use strict";var d="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,A=Math.max,M="[object Function]",e=function(a,i){for(var n=[],s=0;s<a.length;s+=1)n[s]=a[s];for(var c=0;c<i.length;c+=1)n[c+a.length]=i[c];return n},t=function(a,i){for(var n=[],s=i||0,c=0;s<a.length;s+=1,c+=1)n[c]=a[s];return n},r=function(o,a){for(var i="",n=0;n<o.length;n+=1)i+=o[n],n+1<o.length&&(i+=a);return i};q.exports=function(a){var i=this;if(typeof i!="function"||x.apply(i)!==M)throw new TypeError(d+i);for(var n=t(arguments,1),s,c=function(){if(this instanceof s){var l=i.apply(this,e(n,arguments));return Object(l)===l?l:this}return i.apply(a,e(n,arguments))},f=A(0,i.length-n.length),g=[],v=0;v<f;v++)g[v]="$"+v;if(s=Function("binder","return function ("+r(g,",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var T=function(){};T.prototype=i.prototype,s.prototype=new T,T.prototype=null}return s}}}),g1=Ze({"node_modules/function-bind/index.js"(Z,q){"use strict";var d=SO();q.exports=Function.prototype.bind||d}}),d3=Ze({"node_modules/call-bind-apply-helpers/functionCall.js"(Z,q){"use strict";q.exports=Function.prototype.call}}),NS=Ze({"node_modules/call-bind-apply-helpers/functionApply.js"(Z,q){"use strict";q.exports=Function.prototype.apply}}),MO=Ze({"node_modules/call-bind-apply-helpers/reflectApply.js"(Z,q){"use strict";q.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}}),EO=Ze({"node_modules/call-bind-apply-helpers/actualApply.js"(Z,q){"use strict";var d=g1(),x=NS(),A=d3(),M=MO();q.exports=M||d.call(A,x)}}),CO=Ze({"node_modules/call-bind-apply-helpers/index.js"(Z,q){"use strict";var d=g1(),x=m1(),A=d3(),M=EO();q.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new x("a function is required");return M(d,A,t)}}}),kO=Ze({"node_modules/dunder-proto/get.js"(Z,q){"use strict";var d=CO(),x=rg(),A;try{A=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var M=!!A&&x&&x(Object.prototype,"__proto__"),e=Object,t=e.getPrototypeOf;q.exports=M&&typeof M.get=="function"?d([M.get]):typeof t=="function"?function(o){return t(o==null?o:e(o))}:!1}}),LO=Ze({"node_modules/get-proto/index.js"(Z,q){"use strict";var d=OS(),x=BS(),A=kO();q.exports=d?function(e){return d(e)}:x?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return x(e)}:A?function(e){return A(e)}:null}}),PO=Ze({"node_modules/hasown/index.js"(Z,q){"use strict";var d=Function.prototype.call,x=Object.prototype.hasOwnProperty,A=g1();q.exports=A.call(d,x)}}),v3=Ze({"node_modules/get-intrinsic/index.js"(Z,q){"use strict";var d,x=zS(),A=cO(),M=fO(),e=hO(),t=pO(),r=FS(),o=m1(),a=dO(),i=vO(),n=mO(),s=gO(),c=yO(),f=_O(),g=xO(),v=wO(),T=Function,l=function(X){try{return T('"use strict"; return ('+X+").constructor;")()}catch{}},_=rg(),w=W_(),S=function(){throw new o},E=_?function(){try{return arguments.callee,S}catch{try{return _(arguments,"callee").get}catch{return S}}}():S,y=AO()(),b=LO(),p=BS(),u=OS(),m=NS(),h=d3(),P={},L=typeof Uint8Array>"u"||!b?d:b(Uint8Array),z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?d:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?d:ArrayBuffer,"%ArrayIteratorPrototype%":y&&b?b([][Symbol.iterator]()):d,"%AsyncFromSyncIteratorPrototype%":d,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":typeof Atomics>"u"?d:Atomics,"%BigInt%":typeof BigInt>"u"?d:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?d:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?d:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?d:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":A,"%eval%":eval,"%EvalError%":M,"%Float16Array%":typeof Float16Array>"u"?d:Float16Array,"%Float32Array%":typeof Float32Array>"u"?d:Float32Array,"%Float64Array%":typeof Float64Array>"u"?d:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?d:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":P,"%Int8Array%":typeof Int8Array>"u"?d:Int8Array,"%Int16Array%":typeof Int16Array>"u"?d:Int16Array,"%Int32Array%":typeof Int32Array>"u"?d:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&b?b(b([][Symbol.iterator]())):d,"%JSON%":typeof JSON=="object"?JSON:d,"%Map%":typeof Map>"u"?d:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!b?d:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?d:Promise,"%Proxy%":typeof Proxy>"u"?d:Proxy,"%RangeError%":e,"%ReferenceError%":t,"%Reflect%":typeof Reflect>"u"?d:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?d:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!b?d:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?d:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&b?b(""[Symbol.iterator]()):d,"%Symbol%":y?Symbol:d,"%SyntaxError%":r,"%ThrowTypeError%":E,"%TypedArray%":L,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?d:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?d:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?d:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?d:Uint32Array,"%URIError%":a,"%WeakMap%":typeof WeakMap>"u"?d:WeakMap,"%WeakRef%":typeof WeakRef>"u"?d:WeakRef,"%WeakSet%":typeof WeakSet>"u"?d:WeakSet,"%Function.prototype.call%":h,"%Function.prototype.apply%":m,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":p,"%Math.abs%":i,"%Math.floor%":n,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":f,"%Math.round%":g,"%Math.sign%":v,"%Reflect.getPrototypeOf%":u};if(b)try{null.error}catch(X){F=b(b(X)),z["%Error.prototype%"]=F}var F,B=function X(oe){var ie;if(oe==="%AsyncFunction%")ie=l("async function () {}");else if(oe==="%GeneratorFunction%")ie=l("function* () {}");else if(oe==="%AsyncGeneratorFunction%")ie=l("async function* () {}");else if(oe==="%AsyncGenerator%"){var j=X("%AsyncGeneratorFunction%");j&&(ie=j.prototype)}else if(oe==="%AsyncIteratorPrototype%"){var ee=X("%AsyncGenerator%");ee&&b&&(ie=b(ee.prototype))}return z[oe]=ie,ie},O={__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"]},I=g1(),N=PO(),U=I.call(h,Array.prototype.concat),W=I.call(m,Array.prototype.splice),Q=I.call(h,String.prototype.replace),ue=I.call(h,String.prototype.slice),le=I.call(h,RegExp.prototype.exec),he=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,$=function(oe){var ie=ue(oe,0,1),j=ue(oe,-1);if(ie==="%"&&j!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&ie!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(oe,he,function(re,ce,be,Ae){ee[ee.length]=be?Q(Ae,G,"$1"):ce||re}),ee},J=function(oe,ie){var j=oe,ee;if(N(O,j)&&(ee=O[j],j="%"+ee[0]+"%"),N(z,j)){var re=z[j];if(re===P&&(re=B(j)),typeof re>"u"&&!ie)throw new o("intrinsic "+oe+" exists, but is not available. Please file an issue!");return{alias:ee,name:j,value:re}}throw new r("intrinsic "+oe+" does not exist!")};q.exports=function(oe,ie){if(typeof oe!="string"||oe.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new o('"allowMissing" argument must be a boolean');if(le(/^%?[^%]*%?$/,oe)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=$(oe),ee=j.length>0?j[0]:"",re=J("%"+ee+"%",ie),ce=re.name,be=re.value,Ae=!1,ze=re.alias;ze&&(ee=ze[0],W(j,U([0,1],ze)));for(var Re=1,Xe=!0;Re<j.length;Re+=1){var it=j[Re],ot=ue(it,0,1),tt=ue(it,-1);if((ot==='"'||ot==="'"||ot==="`"||tt==='"'||tt==="'"||tt==="`")&&ot!==tt)throw new r("property names with quotes must have matching quotes");if((it==="constructor"||!Xe)&&(Ae=!0),ee+="."+it,ce="%"+ee+"%",N(z,ce))be=z[ce];else if(be!=null){if(!(it in be)){if(!ie)throw new o("base intrinsic for "+oe+" exists, but the property is not available.");return}if(_&&Re+1>=j.length){var lt=_(be,it);Xe=!!lt,Xe&&"get"in lt&&!("originalValue"in lt.get)?be=lt.get:be=be[it]}else Xe=N(be,it),be=be[it];Xe&&!Ae&&(z[ce]=be)}}return be}}}),IO=Ze({"node_modules/define-data-property/index.js"(Z,q){"use strict";var d=W_(),x=FS(),A=m1(),M=rg();q.exports=function(t,r,o){if(!t||typeof t!="object"&&typeof t!="function")throw new A("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new A("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new A("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new A("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new A("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new A("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,n=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!M&&M(t,r);if(d)d(t,r,{configurable:n===null&&c?c.configurable:!n,enumerable:a===null&&c?c.enumerable:!a,value:o,writable:i===null&&c?c.writable:!i});else if(s||!a&&!i&&!n)t[r]=o;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),US=Ze({"node_modules/has-property-descriptors/index.js"(Z,q){"use strict";var d=W_(),x=function(){return!!d};x.hasArrayLengthDefineBug=function(){if(!d)return null;try{return d([],"length",{value:1}).length!==1}catch{return!0}},q.exports=x}}),RO=Ze({"node_modules/set-function-length/index.js"(Z,q){"use strict";var d=v3(),x=IO(),A=US()(),M=rg(),e=m1(),t=d("%Math.floor%");q.exports=function(o,a){if(typeof o!="function")throw new e("`fn` is not a function");if(typeof a!="number"||a<0||a>4294967295||t(a)!==a)throw new e("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in o&&M){var c=M(o,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(s=!1)}return(n||s||!i)&&(A?x(o,"length",a,!0,!0):x(o,"length",a)),o}}}),X_=Ze({"node_modules/call-bind/index.js"(Z,q){"use strict";var d=g1(),x=v3(),A=RO(),M=m1(),e=x("%Function.prototype.apply%"),t=x("%Function.prototype.call%"),r=x("%Reflect.apply%",!0)||d.call(t,e),o=W_(),a=x("%Math.max%");q.exports=function(s){if(typeof s!="function")throw new M("a function is required");var c=r(d,t,arguments);return A(c,1+a(0,s.length-(arguments.length-1)),!0)};var i=function(){return r(d,e,arguments)};o?o(q.exports,"apply",{value:i}):q.exports.apply=i}}),y1=Ze({"node_modules/call-bind/callBound.js"(Z,q){"use strict";var d=v3(),x=X_(),A=x(d("String.prototype.indexOf"));q.exports=function(e,t){var r=d(e,!!t);return typeof r=="function"&&A(e,".prototype.")>-1?x(r):r}}}),DO=Ze({"node_modules/is-arguments/index.js"(Z,q){"use strict";var d=H_()(),x=y1(),A=x("Object.prototype.toString"),M=function(o){return d&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:A(o)==="[object Arguments]"},e=function(o){return M(o)?!0:o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&A(o)!=="[object Array]"&&A(o.callee)==="[object Function]"},t=function(){return M(arguments)}();M.isLegacyArguments=e,q.exports=t?M:e}}),zO=Ze({"node_modules/is-generator-function/index.js"(Z,q){"use strict";var d=Object.prototype.toString,x=Function.prototype.toString,A=/^\s*(?:function)?\*/,M=H_()(),e=Object.getPrototypeOf,t=function(){if(!M)return!1;try{return Function("return function*() {}")()}catch{}},r;q.exports=function(a){if(typeof a!="function")return!1;if(A.test(x.call(a)))return!0;if(!M){var i=d.call(a);return i==="[object GeneratorFunction]"}if(!e)return!1;if(typeof r>"u"){var n=t();r=n?e(n):!1}return e(a)===r}}}),FO=Ze({"node_modules/is-callable/index.js"(Z,q){"use strict";var d=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,A,M;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{A=Object.defineProperty({},"length",{get:function(){throw M}}),M={},x(function(){throw 42},null,A)}catch(_){_!==M&&(x=null)}else x=null;var e=/^\s*class\b/,t=function(w){try{var S=d.call(w);return e.test(S)}catch{return!1}},r=function(w){try{return t(w)?!1:(d.call(w),!0)}catch{return!1}},o=Object.prototype.toString,a="[object Object]",i="[object Function]",n="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",f="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),T=function(){return!1};typeof document=="object"&&(l=document.all,o.call(l)===o.call(document.all)&&(T=function(w){if((v||!w)&&(typeof w>"u"||typeof w=="object"))try{var S=o.call(w);return(S===s||S===c||S===f||S===a)&&w("")==null}catch{}return!1}));var l;q.exports=x?function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;try{x(w,null,A)}catch(S){if(S!==M)return!1}return!t(w)&&r(w)}:function(w){if(T(w))return!0;if(!w||typeof w!="function"&&typeof w!="object")return!1;if(g)return r(w);if(t(w))return!1;var S=o.call(w);return S!==i&&S!==n&&!/^\[object HTML/.test(S)?!1:r(w)}}}),jS=Ze({"node_modules/for-each/index.js"(Z,q){"use strict";var d=FO(),x=Object.prototype.toString,A=Object.prototype.hasOwnProperty,M=function(a,i,n){for(var s=0,c=a.length;s<c;s++)A.call(a,s)&&(n==null?i(a[s],s,a):i.call(n,a[s],s,a))},e=function(a,i,n){for(var s=0,c=a.length;s<c;s++)n==null?i(a.charAt(s),s,a):i.call(n,a.charAt(s),s,a)},t=function(a,i,n){for(var s in a)A.call(a,s)&&(n==null?i(a[s],s,a):i.call(n,a[s],s,a))},r=function(a,i,n){if(!d(i))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=n),x.call(a)==="[object Array]"?M(a,i,s):typeof a=="string"?e(a,i,s):t(a,i,s)};q.exports=r}}),qS=Ze({"node_modules/available-typed-arrays/index.js"(Z,q){"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],x=typeof globalThis>"u"?window:globalThis;q.exports=function(){for(var M=[],e=0;e<d.length;e++)typeof x[d[e]]=="function"&&(M[M.length]=d[e]);return M}}}),OO=Ze({"node_modules/which-typed-array/index.js"(Z,q){"use strict";var d=jS(),x=qS(),A=X_(),M=y1(),e=rg(),t=M("Object.prototype.toString"),r=H_()(),o=typeof globalThis>"u"?window:globalThis,a=x(),i=M("String.prototype.slice"),n=Object.getPrototypeOf,s=M("Array.prototype.indexOf",!0)||function(T,l){for(var _=0;_<T.length;_+=1)if(T[_]===l)return _;return-1},c={__proto__:null};r&&e&&n?d(a,function(v){var T=new o[v];if(Symbol.toStringTag in T){var l=n(T),_=e(l,Symbol.toStringTag);if(!_){var w=n(l);_=e(w,Symbol.toStringTag)}c["$"+v]=A(_.get)}}):d(a,function(v){var T=new o[v],l=T.slice||T.set;l&&(c["$"+v]=A(l))});var f=function(T){var l=!1;return d(c,function(_,w){if(!l)try{"$"+_(T)===w&&(l=i(w,1))}catch{}}),l},g=function(T){var l=!1;return d(c,function(_,w){if(!l)try{_(T),l=i(w,1)}catch{}}),l};q.exports=function(T){if(!T||typeof T!="object")return!1;if(!r){var l=i(t(T),8,-1);return s(a,l)>-1?l:l!=="Object"?!1:g(T)}return e?f(T):null}}}),BO=Ze({"node_modules/is-typed-array/index.js"(Z,q){"use strict";var d=jS(),x=qS(),A=y1(),M=A("Object.prototype.toString"),e=H_()(),t=rg(),r=typeof globalThis>"u"?window:globalThis,o=x(),a=A("Array.prototype.indexOf",!0)||function(g,v){for(var T=0;T<g.length;T+=1)if(g[T]===v)return T;return-1},i=A("String.prototype.slice"),n={},s=Object.getPrototypeOf;e&&t&&s&&d(o,function(f){var g=new r[f];if(Symbol.toStringTag in g){var v=s(g),T=t(v,Symbol.toStringTag);if(!T){var l=s(v);T=t(l,Symbol.toStringTag)}n[f]=T.get}});var c=function(g){var v=!1;return d(n,function(T,l){if(!v)try{v=T.call(g)===l}catch{}}),v};q.exports=function(g){if(!g||typeof g!="object")return!1;if(!e||!(Symbol.toStringTag in g)){var v=i(M(g),8,-1);return a(o,v)>-1}return t?c(g):!1}}}),VS=Ze({"node_modules/util/support/types.js"(Z){"use strict";var q=DO(),d=zO(),x=OO(),A=BO();function M(Ae){return Ae.call.bind(Ae)}var e=typeof BigInt<"u",t=typeof Symbol<"u",r=M(Object.prototype.toString),o=M(Number.prototype.valueOf),a=M(String.prototype.valueOf),i=M(Boolean.prototype.valueOf);e&&(n=M(BigInt.prototype.valueOf));var n;t&&(s=M(Symbol.prototype.valueOf));var s;function c(Ae,ze){if(typeof Ae!="object")return!1;try{return ze(Ae),!0}catch{return!1}}Z.isArgumentsObject=q,Z.isGeneratorFunction=d,Z.isTypedArray=A;function f(Ae){return typeof Promise<"u"&&Ae instanceof Promise||Ae!==null&&typeof Ae=="object"&&typeof Ae.then=="function"&&typeof Ae.catch=="function"}Z.isPromise=f;function g(Ae){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Ae):A(Ae)||W(Ae)}Z.isArrayBufferView=g;function v(Ae){return x(Ae)==="Uint8Array"}Z.isUint8Array=v;function T(Ae){return x(Ae)==="Uint8ClampedArray"}Z.isUint8ClampedArray=T;function l(Ae){return x(Ae)==="Uint16Array"}Z.isUint16Array=l;function _(Ae){return x(Ae)==="Uint32Array"}Z.isUint32Array=_;function w(Ae){return x(Ae)==="Int8Array"}Z.isInt8Array=w;function S(Ae){return x(Ae)==="Int16Array"}Z.isInt16Array=S;function E(Ae){return x(Ae)==="Int32Array"}Z.isInt32Array=E;function y(Ae){return x(Ae)==="Float32Array"}Z.isFloat32Array=y;function b(Ae){return x(Ae)==="Float64Array"}Z.isFloat64Array=b;function p(Ae){return x(Ae)==="BigInt64Array"}Z.isBigInt64Array=p;function u(Ae){return x(Ae)==="BigUint64Array"}Z.isBigUint64Array=u;function m(Ae){return r(Ae)==="[object Map]"}m.working=typeof Map<"u"&&m(new Map);function h(Ae){return typeof Map>"u"?!1:m.working?m(Ae):Ae instanceof Map}Z.isMap=h;function P(Ae){return r(Ae)==="[object Set]"}P.working=typeof Set<"u"&&P(new Set);function L(Ae){return typeof Set>"u"?!1:P.working?P(Ae):Ae instanceof Set}Z.isSet=L;function z(Ae){return r(Ae)==="[object WeakMap]"}z.working=typeof WeakMap<"u"&&z(new WeakMap);function F(Ae){return typeof WeakMap>"u"?!1:z.working?z(Ae):Ae instanceof WeakMap}Z.isWeakMap=F;function B(Ae){return r(Ae)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function O(Ae){return B(Ae)}Z.isWeakSet=O;function I(Ae){return r(Ae)==="[object ArrayBuffer]"}I.working=typeof ArrayBuffer<"u"&&I(new ArrayBuffer);function N(Ae){return typeof ArrayBuffer>"u"?!1:I.working?I(Ae):Ae instanceof ArrayBuffer}Z.isArrayBuffer=N;function U(Ae){return r(Ae)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function W(Ae){return typeof DataView>"u"?!1:U.working?U(Ae):Ae instanceof DataView}Z.isDataView=W;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ue(Ae){return r(Ae)==="[object SharedArrayBuffer]"}function le(Ae){return typeof Q>"u"?!1:(typeof ue.working>"u"&&(ue.working=ue(new Q)),ue.working?ue(Ae):Ae instanceof Q)}Z.isSharedArrayBuffer=le;function he(Ae){return r(Ae)==="[object AsyncFunction]"}Z.isAsyncFunction=he;function G(Ae){return r(Ae)==="[object Map Iterator]"}Z.isMapIterator=G;function $(Ae){return r(Ae)==="[object Set Iterator]"}Z.isSetIterator=$;function J(Ae){return r(Ae)==="[object Generator]"}Z.isGeneratorObject=J;function X(Ae){return r(Ae)==="[object WebAssembly.Module]"}Z.isWebAssemblyCompiledModule=X;function oe(Ae){return c(Ae,o)}Z.isNumberObject=oe;function ie(Ae){return c(Ae,a)}Z.isStringObject=ie;function j(Ae){return c(Ae,i)}Z.isBooleanObject=j;function ee(Ae){return e&&c(Ae,n)}Z.isBigIntObject=ee;function re(Ae){return t&&c(Ae,s)}Z.isSymbolObject=re;function ce(Ae){return oe(Ae)||ie(Ae)||j(Ae)||ee(Ae)||re(Ae)}Z.isBoxedPrimitive=ce;function be(Ae){return typeof Uint8Array<"u"&&(N(Ae)||le(Ae))}Z.isAnyArrayBuffer=be,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Ae){Object.defineProperty(Z,Ae,{enumerable:!1,value:function(){throw new Error(Ae+" is not supported in userland")}})})}}),GS=Ze({"node_modules/util/support/isBufferBrowser.js"(Z,q){q.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),HS=Ze({"(disabled):node_modules/util/util.js"(Z){var q=Object.getOwnPropertyDescriptors||function(W){for(var Q=Object.keys(W),ue={},le=0;le<Q.length;le++)ue[Q[le]]=Object.getOwnPropertyDescriptor(W,Q[le]);return ue},d=/%[sdj%]/g;Z.format=function(U){if(!w(U)){for(var W=[],Q=0;Q<arguments.length;Q++)W.push(e(arguments[Q]));return W.join(" ")}for(var Q=1,ue=arguments,le=ue.length,he=String(U).replace(d,function($){if($==="%%")return"%";if(Q>=le)return $;switch($){case"%s":return String(ue[Q++]);case"%d":return Number(ue[Q++]);case"%j":try{return JSON.stringify(ue[Q++])}catch{return"[Circular]"}default:return $}}),G=ue[Q];Q<le;G=ue[++Q])T(G)||!b(G)?he+=" "+G:he+=" "+e(G);return he},Z.deprecate=function(U,W){if(typeof process<"u"&&process.noDeprecation===!0)return U;if(typeof process>"u")return function(){return Z.deprecate(U,W).apply(this,arguments)};var Q=!1;function ue(){if(!Q){if(process.throwDeprecation)throw new Error(W);process.traceDeprecation?console.trace(W):console.error(W),Q=!0}return U.apply(this,arguments)}return ue};var x={},A=/^$/;M="false",M=M.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),A=new RegExp("^"+M+"$","i");var M;Z.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(A.test(U)){var W=process.pid;x[U]=function(){var Q=Z.format.apply(Z,arguments);console.error("%s %d: %s",U,W,Q)}}else x[U]=function(){};return x[U]};function e(U,W){var Q={seen:[],stylize:r};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v(W)?Q.showHidden=W:W&&Z._extend(Q,W),E(Q.showHidden)&&(Q.showHidden=!1),E(Q.depth)&&(Q.depth=2),E(Q.colors)&&(Q.colors=!1),E(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=t),a(Q,U,Q.depth)}Z.inspect=e,e.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]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(U,W){var Q=e.styles[W];return Q?"\x1B["+e.colors[Q][0]+"m"+U+"\x1B["+e.colors[Q][1]+"m":U}function r(U,W){return U}function o(U){var W={};return U.forEach(function(Q,ue){W[Q]=!0}),W}function a(U,W,Q){if(U.customInspect&&W&&m(W.inspect)&&W.inspect!==Z.inspect&&!(W.constructor&&W.constructor.prototype===W)){var ue=W.inspect(Q,U);return w(ue)||(ue=a(U,ue,Q)),ue}var le=i(U,W);if(le)return le;var he=Object.keys(W),G=o(he);if(U.showHidden&&(he=Object.getOwnPropertyNames(W)),u(W)&&(he.indexOf("message")>=0||he.indexOf("description")>=0))return n(W);if(he.length===0){if(m(W)){var $=W.name?": "+W.name:"";return U.stylize("[Function"+$+"]","special")}if(y(W))return U.stylize(RegExp.prototype.toString.call(W),"regexp");if(p(W))return U.stylize(Date.prototype.toString.call(W),"date");if(u(W))return n(W)}var J="",X=!1,oe=["{","}"];if(g(W)&&(X=!0,oe=["[","]"]),m(W)){var ie=W.name?": "+W.name:"";J=" [Function"+ie+"]"}if(y(W)&&(J=" "+RegExp.prototype.toString.call(W)),p(W)&&(J=" "+Date.prototype.toUTCString.call(W)),u(W)&&(J=" "+n(W)),he.length===0&&(!X||W.length==0))return oe[0]+J+oe[1];if(Q<0)return y(W)?U.stylize(RegExp.prototype.toString.call(W),"regexp"):U.stylize("[Object]","special");U.seen.push(W);var j;return X?j=s(U,W,Q,G,he):j=he.map(function(ee){return c(U,W,Q,G,ee,X)}),U.seen.pop(),f(j,J,oe)}function i(U,W){if(E(W))return U.stylize("undefined","undefined");if(w(W)){var Q="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(_(W))return U.stylize(""+W,"number");if(v(W))return U.stylize(""+W,"boolean");if(T(W))return U.stylize("null","null")}function n(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,W,Q,ue,le){for(var he=[],G=0,$=W.length;G<$;++G)B(W,String(G))?he.push(c(U,W,Q,ue,String(G),!0)):he.push("");return le.forEach(function(J){J.match(/^\d+$/)||he.push(c(U,W,Q,ue,J,!0))}),he}function c(U,W,Q,ue,le,he){var G,$,J;if(J=Object.getOwnPropertyDescriptor(W,le)||{value:W[le]},J.get?J.set?$=U.stylize("[Getter/Setter]","special"):$=U.stylize("[Getter]","special"):J.set&&($=U.stylize("[Setter]","special")),B(ue,le)||(G="["+le+"]"),$||(U.seen.indexOf(J.value)<0?(T(Q)?$=a(U,J.value,null):$=a(U,J.value,Q-1),$.indexOf(`
`)>-1&&(he?$=$.split(`
`).map(function(X){return" "+X}).join(`
`).slice(2):$=`
`+$.split(`
`).map(function(X){return" "+X}).join(`
`))):$=U.stylize("[Circular]","special")),E(G)){if(he&&le.match(/^\d+$/))return $;G=JSON.stringify(""+le),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+$}function f(U,W,Q){var ue=0,le=U.reduce(function(he,G){return ue++,G.indexOf(`
`)>=0&&ue++,he+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?Q[0]+(W===""?"":W+`
`)+" "+U.join(`,
`)+" "+Q[1]:Q[0]+W+" "+U.join(", ")+" "+Q[1]}Z.types=VS();function g(U){return Array.isArray(U)}Z.isArray=g;function v(U){return typeof U=="boolean"}Z.isBoolean=v;function T(U){return U===null}Z.isNull=T;function l(U){return U==null}Z.isNullOrUndefined=l;function _(U){return typeof U=="number"}Z.isNumber=_;function w(U){return typeof U=="string"}Z.isString=w;function S(U){return typeof U=="symbol"}Z.isSymbol=S;function E(U){return U===void 0}Z.isUndefined=E;function y(U){return b(U)&&P(U)==="[object RegExp]"}Z.isRegExp=y,Z.types.isRegExp=y;function b(U){return typeof U=="object"&&U!==null}Z.isObject=b;function p(U){return b(U)&&P(U)==="[object Date]"}Z.isDate=p,Z.types.isDate=p;function u(U){return b(U)&&(P(U)==="[object Error]"||U instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function m(U){return typeof U=="function"}Z.isFunction=m;function h(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}Z.isPrimitive=h,Z.isBuffer=GS();function P(U){return Object.prototype.toString.call(U)}function L(U){return U<10?"0"+U.toString(10):U.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var U=new Date,W=[L(U.getHours()),L(U.getMinutes()),L(U.getSeconds())].join(":");return[U.getDate(),z[U.getMonth()],W].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Yv(),Z._extend=function(U,W){if(!W||!b(W))return U;for(var Q=Object.keys(W),ue=Q.length;ue--;)U[Q[ue]]=W[Q[ue]];return U};function B(U,W){return Object.prototype.hasOwnProperty.call(U,W)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&W[O]){var Q=W[O];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,O,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var ue,le,he=new Promise(function(J,X){ue=J,le=X}),G=[],$=0;$<arguments.length;$++)G.push(arguments[$]);G.push(function(J,X){J?le(J):ue(X)});try{W.apply(this,G)}catch(J){le(J)}return he}return Object.setPrototypeOf(Q,Object.getPrototypeOf(W)),O&&Object.defineProperty(Q,O,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Q,q(W))},Z.promisify.custom=O;function I(U,W){if(!U){var Q=new Error("Promise was rejected with a falsy value");Q.reason=U,U=Q}return W(U)}function N(U){if(typeof U!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var Q=[],ue=0;ue<arguments.length;ue++)Q.push(arguments[ue]);var le=Q.pop();if(typeof le!="function")throw new TypeError("The last argument must be of type Function");var he=this,G=function(){return le.apply(he,arguments)};U.apply(this,Q).then(function($){process.nextTick(G.bind(null,null,$))},function($){process.nextTick(I.bind(null,$,G))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(U)),Object.defineProperties(W,q(U)),W}Z.callbackify=N}}),NO=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(Z,q){"use strict";function d(c,f){var g=Object.keys(c);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(c);f&&(v=v.filter(function(T){return Object.getOwnPropertyDescriptor(c,T).enumerable})),g.push.apply(g,v)}return g}function x(c){for(var f=1;f<arguments.length;f++){var g=arguments[f]!=null?arguments[f]:{};f%2?d(Object(g),!0).forEach(function(v){A(c,v,g[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(g)):d(Object(g)).forEach(function(v){Object.defineProperty(c,v,Object.getOwnPropertyDescriptor(g,v))})}return c}function A(c,f,g){return f in c?Object.defineProperty(c,f,{value:g,enumerable:!0,configurable:!0,writable:!0}):c[f]=g,c}function M(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")}function e(c,f){for(var g=0;g<f.length;g++){var v=f[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(c,v.key,v)}}function t(c,f,g){return f&&e(c.prototype,f),g&&e(c,g),c}var r=tg(),o=r.Buffer,a=HS(),i=a.inspect,n=i&&i.custom||"inspect";function s(c,f,g){o.prototype.copy.call(c,f,g)}q.exports=function(){function c(){M(this,c),this.head=null,this.tail=null,this.length=0}return t(c,[{key:"push",value:function(g){var v={data:g,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(g){var v={data:g,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var v=this.head,T=""+v.data;v=v.next;)T+=g+v.data;return T}},{key:"concat",value:function(g){if(this.length===0)return o.alloc(0);for(var v=o.allocUnsafe(g>>>0),T=this.head,l=0;T;)s(T.data,v,l),l+=T.data.length,T=T.next;return v}},{key:"consume",value:function(g,v){var T;return g<this.head.data.length?(T=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?T=this.shift():T=v?this._getString(g):this._getBuffer(g),T}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var v=this.head,T=1,l=v.data;for(g-=l.length;v=v.next;){var _=v.data,w=g>_.length?_.length:g;if(w===_.length?l+=_:l+=_.slice(0,g),g-=w,g===0){w===_.length?(++T,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=_.slice(w));break}++T}return this.length-=T,l}},{key:"_getBuffer",value:function(g){var v=o.allocUnsafe(g),T=this.head,l=1;for(T.data.copy(v),g-=T.data.length;T=T.next;){var _=T.data,w=g>_.length?_.length:g;if(_.copy(v,v.length-g,0,w),g-=w,g===0){w===_.length?(++l,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=_.slice(w));break}++l}return this.length-=l,v}},{key:n,value:function(g,v){return i(this,x({},v,{depth:0,customInspect:!1}))}}]),c}()}}),WS=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(Z,q){"use strict";function d(r,o){var a=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(o?o(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(e,this,r)):process.nextTick(e,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(s){!o&&s?a._writableState?a._writableState.errorEmitted?process.nextTick(A,a):(a._writableState.errorEmitted=!0,process.nextTick(x,a,s)):process.nextTick(x,a,s):o?(process.nextTick(A,a),o(s)):process.nextTick(A,a)}),this)}function x(r,o){e(r,o),A(r)}function A(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function M(){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 e(r,o){r.emit("error",o)}function t(r,o){var a=r._readableState,i=r._writableState;a&&a.autoDestroy||i&&i.autoDestroy?r.destroy(o):r.emit("error",o)}q.exports={destroy:d,undestroy:M,errorOrDestroy:t}}}),ag=Ze({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(Z,q){"use strict";function d(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a}var x={};function A(o,a,i){i||(i=Error);function n(c,f,g){return typeof a=="string"?a:a(c,f,g)}var s=function(c){d(f,c);function f(g,v,T){return c.call(this,n(g,v,T))||this}return f}(i);s.prototype.name=i.name,s.prototype.code=o,x[o]=s}function M(o,a){if(Array.isArray(o)){var i=o.length;return o=o.map(function(n){return String(n)}),i>2?"one of ".concat(a," ").concat(o.slice(0,i-1).join(", "),", or ")+o[i-1]:i===2?"one of ".concat(a," ").concat(o[0]," or ").concat(o[1]):"of ".concat(a," ").concat(o[0])}else return"of ".concat(a," ").concat(String(o))}function e(o,a,i){return o.substr(!i||i<0?0:+i,a.length)===a}function t(o,a,i){return(i===void 0||i>o.length)&&(i=o.length),o.substring(i-a.length,i)===a}function r(o,a,i){return typeof i!="number"&&(i=0),i+a.length>o.length?!1:o.indexOf(a,i)!==-1}A("ERR_INVALID_OPT_VALUE",function(o,a){return'The value "'+a+'" is invalid for option "'+o+'"'},TypeError),A("ERR_INVALID_ARG_TYPE",function(o,a,i){var n;typeof a=="string"&&e(a,"not ")?(n="must not be",a=a.replace(/^not /,"")):n="must be";var s;if(t(o," argument"))s="The ".concat(o," ").concat(n," ").concat(M(a,"type"));else{var c=r(o,".")?"property":"argument";s='The "'.concat(o,'" ').concat(c," ").concat(n," ").concat(M(a,"type"))}return s+=". Received type ".concat(typeof i),s},TypeError),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),A("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),A("ERR_STREAM_PREMATURE_CLOSE","Premature close"),A("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),A("ERR_STREAM_WRITE_AFTER_END","write after end"),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.codes=x}}),XS=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(Z,q){"use strict";var d=ag().codes.ERR_INVALID_OPT_VALUE;function x(M,e,t){return M.highWaterMark!=null?M.highWaterMark:e?M[t]:null}function A(M,e,t,r){var o=x(e,r,t);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=r?t:"highWaterMark";throw new d(a,o)}return Math.floor(o)}return M.objectMode?16:16*1024}q.exports={getHighWaterMark:A}}}),UO=Ze({"node_modules/util-deprecate/browser.js"(Z,q){q.exports=d;function d(A,M){if(x("noDeprecation"))return A;var e=!1;function t(){if(!e){if(x("throwDeprecation"))throw new Error(M);x("traceDeprecation")?console.trace(M):console.warn(M),e=!0}return A.apply(this,arguments)}return t}function x(A){try{if(!window.localStorage)return!1}catch{return!1}var M=window.localStorage[A];return M==null?!1:String(M).toLowerCase()==="true"}}}),ZS=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(Z,q){"use strict";q.exports=p;function d(G){var $=this;this.next=null,this.entry=null,this.finish=function(){he($,G)}}var x;p.WritableState=y;var A={deprecate:UO()},M=DS(),e=tg().Buffer,t=window.Uint8Array||function(){};function r(G){return e.from(G)}function o(G){return e.isBuffer(G)||G instanceof t}var a=WS(),i=XS(),n=i.getHighWaterMark,s=ag().codes,c=s.ERR_INVALID_ARG_TYPE,f=s.ERR_METHOD_NOT_IMPLEMENTED,g=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,T=s.ERR_STREAM_DESTROYED,l=s.ERR_STREAM_NULL_VALUES,_=s.ERR_STREAM_WRITE_AFTER_END,w=s.ERR_UNKNOWN_ENCODING,S=a.errorOrDestroy;Yv()(p,M);function E(){}function y(G,$,J){x=x||ig(),G=G||{},typeof J!="boolean"&&(J=$ instanceof x),this.objectMode=!!G.objectMode,J&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=n(this,G,"writableHighWaterMark",J),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var X=G.decodeStrings===!1;this.decodeStrings=!X,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){B($,oe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}y.prototype.getBuffer=function(){for(var $=this.bufferedRequest,J=[];$;)J.push($),$=$.next;return J},function(){try{Object.defineProperty(y.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var b;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function($){return b.call(this,$)?!0:this!==p?!1:$&&$._writableState instanceof y}})):b=function($){return $ instanceof this};function p(G){x=x||ig();var $=this instanceof x;if(!$&&!b.call(p,this))return new p(G);this._writableState=new y(G,this,$),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),M.call(this)}p.prototype.pipe=function(){S(this,new v)};function u(G,$){var J=new _;S(G,J),process.nextTick($,J)}function m(G,$,J,X){var oe;return J===null?oe=new l:typeof J!="string"&&!$.objectMode&&(oe=new c("chunk",["string","Buffer"],J)),oe?(S(G,oe),process.nextTick(X,oe),!1):!0}p.prototype.write=function(G,$,J){var X=this._writableState,oe=!1,ie=!X.objectMode&&o(G);return ie&&!e.isBuffer(G)&&(G=r(G)),typeof $=="function"&&(J=$,$=null),ie?$="buffer":$||($=X.defaultEncoding),typeof J!="function"&&(J=E),X.ending?u(this,J):(ie||m(this,X,G,J))&&(X.pendingcb++,oe=P(this,X,ie,G,$,J)),oe},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&N(this,G))},p.prototype.setDefaultEncoding=function($){if(typeof $=="string"&&($=$.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf(($+"").toLowerCase())>-1))throw new w($);return this._writableState.defaultEncoding=$,this},Object.defineProperty(p.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function h(G,$,J){return!G.objectMode&&G.decodeStrings!==!1&&typeof $=="string"&&($=e.from($,J)),$}Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function P(G,$,J,X,oe,ie){if(!J){var j=h($,X,oe);X!==j&&(J=!0,oe="buffer",X=j)}var ee=$.objectMode?1:X.length;$.length+=ee;var re=$.length<$.highWaterMark;if(re||($.needDrain=!0),$.writing||$.corked){var ce=$.lastBufferedRequest;$.lastBufferedRequest={chunk:X,encoding:oe,isBuf:J,callback:ie,next:null},ce?ce.next=$.lastBufferedRequest:$.bufferedRequest=$.lastBufferedRequest,$.bufferedRequestCount+=1}else L(G,$,!1,ee,X,oe,ie);return re}function L(G,$,J,X,oe,ie,j){$.writelen=X,$.writecb=j,$.writing=!0,$.sync=!0,$.destroyed?$.onwrite(new T("write")):J?G._writev(oe,$.onwrite):G._write(oe,ie,$.onwrite),$.sync=!1}function z(G,$,J,X,oe){--$.pendingcb,J?(process.nextTick(oe,X),process.nextTick(ue,G,$),G._writableState.errorEmitted=!0,S(G,X)):(oe(X),G._writableState.errorEmitted=!0,S(G,X),ue(G,$))}function F(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}function B(G,$){var J=G._writableState,X=J.sync,oe=J.writecb;if(typeof oe!="function")throw new g;if(F(J),$)z(G,J,X,$,oe);else{var ie=U(J)||G.destroyed;!ie&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest&&N(G,J),X?process.nextTick(O,G,J,ie,oe):O(G,J,ie,oe)}}function O(G,$,J,X){J||I(G,$),$.pendingcb--,X(),ue(G,$)}function I(G,$){$.length===0&&$.needDrain&&($.needDrain=!1,G.emit("drain"))}function N(G,$){$.bufferProcessing=!0;var J=$.bufferedRequest;if(G._writev&&J&&J.next){var X=$.bufferedRequestCount,oe=new Array(X),ie=$.corkedRequestsFree;ie.entry=J;for(var j=0,ee=!0;J;)oe[j]=J,J.isBuf||(ee=!1),J=J.next,j+=1;oe.allBuffers=ee,L(G,$,!0,$.length,oe,"",ie.finish),$.pendingcb++,$.lastBufferedRequest=null,ie.next?($.corkedRequestsFree=ie.next,ie.next=null):$.corkedRequestsFree=new d($),$.bufferedRequestCount=0}else{for(;J;){var re=J.chunk,ce=J.encoding,be=J.callback,Ae=$.objectMode?1:re.length;if(L(G,$,!1,Ae,re,ce,be),J=J.next,$.bufferedRequestCount--,$.writing)break}J===null&&($.lastBufferedRequest=null)}$.bufferedRequest=J,$.bufferProcessing=!1}p.prototype._write=function(G,$,J){J(new f("_write()"))},p.prototype._writev=null,p.prototype.end=function(G,$,J){var X=this._writableState;return typeof G=="function"?(J=G,G=null,$=null):typeof $=="function"&&(J=$,$=null),G!=null&&this.write(G,$),X.corked&&(X.corked=1,this.uncork()),X.ending||le(this,X,J),this},Object.defineProperty(p.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function U(G){return G.ending&&G.length===0&&G.bufferedRequest===null&&!G.finished&&!G.writing}function W(G,$){G._final(function(J){$.pendingcb--,J&&S(G,J),$.prefinished=!0,G.emit("prefinish"),ue(G,$)})}function Q(G,$){!$.prefinished&&!$.finalCalled&&(typeof G._final=="function"&&!$.destroyed?($.pendingcb++,$.finalCalled=!0,process.nextTick(W,G,$)):($.prefinished=!0,G.emit("prefinish")))}function ue(G,$){var J=U($);if(J&&(Q(G,$),$.pendingcb===0&&($.finished=!0,G.emit("finish"),$.autoDestroy))){var X=G._readableState;(!X||X.autoDestroy&&X.endEmitted)&&G.destroy()}return J}function le(G,$,J){$.ending=!0,ue(G,$),J&&($.finished?process.nextTick(J):G.once("finish",J)),$.ended=!0,G.writable=!1}function he(G,$,J){var X=G.entry;for(G.entry=null;X;){var oe=X.callback;$.pendingcb--,oe(J),X=X.next}$.corkedRequestsFree.next=G}Object.defineProperty(p.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function($){this._writableState&&(this._writableState.destroyed=$)}}),p.prototype.destroy=a.destroy,p.prototype._undestroy=a.undestroy,p.prototype._destroy=function(G,$){$(G)}}}),ig=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(Z,q){"use strict";var d=Object.keys||function(i){var n=[];for(var s in i)n.push(s);return n};q.exports=r;var x=KS(),A=ZS();for(Yv()(r,x),M=d(A.prototype),t=0;t<M.length;t++)e=M[t],r.prototype[e]||(r.prototype[e]=A.prototype[e]);var M,e,t;function r(i){if(!(this instanceof r))return new r(i);x.call(this,i),A.call(this,i),this.allowHalfOpen=!0,i&&(i.readable===!1&&(this.readable=!1),i.writable===!1&&(this.writable=!1),i.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",o)))}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(r.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function o(){this._writableState.ended||process.nextTick(a,this)}function a(i){i.end()}Object.defineProperty(r.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(n){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=n,this._writableState.destroyed=n)}})}}),jO=Ze({"node_modules/safe-buffer/index.js"(Z,q){var d=tg(),x=d.Buffer;function A(e,t){for(var r in e)t[r]=e[r]}x.from&&x.alloc&&x.allocUnsafe&&x.allocUnsafeSlow?q.exports=d:(A(d,Z),Z.Buffer=M);function M(e,t,r){return x(e,t,r)}M.prototype=Object.create(x.prototype),A(x,M),M.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return x(e,t,r)},M.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=x(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o},M.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return x(e)},M.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return d.SlowBuffer(e)}}}),YS=Ze({"node_modules/stream-browserify/node_modules/string_decoder/lib/string_decoder.js"(Z){"use strict";var q=jO().Buffer,d=q.isEncoding||function(T){switch(T=""+T,T&&T.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 x(T){if(!T)return"utf8";for(var l;;)switch(T){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 T;default:if(l)return;T=(""+T).toLowerCase(),l=!0}}function A(T){var l=x(T);if(typeof l!="string"&&(q.isEncoding===d||!d(T)))throw new Error("Unknown encoding: "+T);return l||T}Z.StringDecoder=M;function M(T){this.encoding=A(T);var l;switch(this.encoding){case"utf16le":this.text=n,this.end=s,l=4;break;case"utf8":this.fillLast=o,l=4;break;case"base64":this.text=c,this.end=f,l=3;break;default:this.write=g,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=q.allocUnsafe(l)}M.prototype.write=function(T){if(T.length===0)return"";var l,_;if(this.lastNeed){if(l=this.fillLast(T),l===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<T.length?l?l+this.text(T,_):this.text(T,_):l||""},M.prototype.end=i,M.prototype.text=a,M.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function e(T){return T<=127?0:T>>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function t(T,l,_){var w=l.length-1;if(w<_)return 0;var S=e(l[w]);return S>=0?(S>0&&(T.lastNeed=S-1),S):--w<_||S===-2?0:(S=e(l[w]),S>=0?(S>0&&(T.lastNeed=S-2),S):--w<_||S===-2?0:(S=e(l[w]),S>=0?(S>0&&(S===2?S=0:T.lastNeed=S-3),S):0))}function r(T,l,_){if((l[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function o(T){var l=this.lastTotal-this.lastNeed,_=r(this,T,l);if(_!==void 0)return _;if(this.lastNeed<=T.length)return T.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,l,0,T.length),this.lastNeed-=T.length}function a(T,l){var _=t(this,T,l);if(!this.lastNeed)return T.toString("utf8",l);this.lastTotal=_;var w=T.length-(_-this.lastNeed);return T.copy(this.lastChar,0,w),T.toString("utf8",l,w)}function i(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+"\uFFFD":l}function n(T,l){if((T.length-l)%2===0){var _=T.toString("utf16le",l);if(_){var w=_.charCodeAt(_.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",l,T.length-1)}function s(T){var l=T&&T.length?this.write(T):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,_)}return l}function c(T,l){var _=(T.length-l)%3;return _===0?T.toString("base64",l):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",l,T.length-_))}function f(T){var l=T&&T.length?this.write(T):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function g(T){return T.toString(this.encoding)}function v(T){return T&&T.length?this.write(T):""}}}),m3=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(Z,q){"use strict";var d=ag().codes.ERR_STREAM_PREMATURE_CLOSE;function x(t){var r=!1;return function(){if(!r){r=!0;for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];t.apply(this,a)}}}function A(){}function M(t){return t.setHeader&&typeof t.abort=="function"}function e(t,r,o){if(typeof r=="function")return e(t,null,r);r||(r={}),o=x(o||A);var a=r.readable||r.readable!==!1&&t.readable,i=r.writable||r.writable!==!1&&t.writable,n=function(){t.writable||c()},s=t._writableState&&t._writableState.finished,c=function(){i=!1,s=!0,a||o.call(t)},f=t._readableState&&t._readableState.endEmitted,g=function(){a=!1,f=!0,i||o.call(t)},v=function(w){o.call(t,w)},T=function(){var w;if(a&&!f)return(!t._readableState||!t._readableState.ended)&&(w=new d),o.call(t,w);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(w=new d),o.call(t,w)},l=function(){t.req.on("finish",c)};return M(t)?(t.on("complete",c),t.on("abort",T),t.req?l():t.on("request",l)):i&&!t._writableState&&(t.on("end",n),t.on("close",n)),t.on("end",g),t.on("finish",c),r.error!==!1&&t.on("error",v),t.on("close",T),function(){t.removeListener("complete",c),t.removeListener("abort",T),t.removeListener("request",l),t.req&&t.req.removeListener("finish",c),t.removeListener("end",n),t.removeListener("close",n),t.removeListener("finish",c),t.removeListener("end",g),t.removeListener("error",v),t.removeListener("close",T)}}q.exports=e}}),qO=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(Z,q){"use strict";var d;function x(l,_,w){return _ in l?Object.defineProperty(l,_,{value:w,enumerable:!0,configurable:!0,writable:!0}):l[_]=w,l}var A=m3(),M=Symbol("lastResolve"),e=Symbol("lastReject"),t=Symbol("error"),r=Symbol("ended"),o=Symbol("lastPromise"),a=Symbol("handlePromise"),i=Symbol("stream");function n(l,_){return{value:l,done:_}}function s(l){var _=l[M];if(_!==null){var w=l[i].read();w!==null&&(l[o]=null,l[M]=null,l[e]=null,_(n(w,!1)))}}function c(l){process.nextTick(s,l)}function f(l,_){return function(w,S){l.then(function(){if(_[r]){w(n(void 0,!0));return}_[a](w,S)},S)}}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((d={get stream(){return this[i]},next:function(){var _=this,w=this[t];if(w!==null)return Promise.reject(w);if(this[r])return Promise.resolve(n(void 0,!0));if(this[i].destroyed)return new Promise(function(b,p){process.nextTick(function(){_[t]?p(_[t]):b(n(void 0,!0))})});var S=this[o],E;if(S)E=new Promise(f(S,this));else{var y=this[i].read();if(y!==null)return Promise.resolve(n(y,!1));E=new Promise(this[a])}return this[o]=E,E}},x(d,Symbol.asyncIterator,function(){return this}),x(d,"return",function(){var _=this;return new Promise(function(w,S){_[i].destroy(null,function(E){if(E){S(E);return}w(n(void 0,!0))})})}),d),g),T=function(_){var w,S=Object.create(v,(w={},x(w,i,{value:_,writable:!0}),x(w,M,{value:null,writable:!0}),x(w,e,{value:null,writable:!0}),x(w,t,{value:null,writable:!0}),x(w,r,{value:_._readableState.endEmitted,writable:!0}),x(w,a,{value:function(y,b){var p=S[i].read();p?(S[o]=null,S[M]=null,S[e]=null,y(n(p,!1))):(S[M]=y,S[e]=b)},writable:!0}),w));return S[o]=null,A(_,function(E){if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE"){var y=S[e];y!==null&&(S[o]=null,S[M]=null,S[e]=null,y(E)),S[t]=E;return}var b=S[M];b!==null&&(S[o]=null,S[M]=null,S[e]=null,b(n(void 0,!0))),S[r]=!0}),_.on("readable",c.bind(null,S)),S};q.exports=T}}),VO=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js"(Z,q){q.exports=function(){throw new Error("Readable.from is not available in the browser")}}}),KS=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js"(Z,q){"use strict";q.exports=m;var d;m.ReadableState=u;var x=W0().EventEmitter,A=function(ee,re){return ee.listeners(re).length},M=DS(),e=tg().Buffer,t=window.Uint8Array||function(){};function r(j){return e.from(j)}function o(j){return e.isBuffer(j)||j instanceof t}var a=HS(),i;a&&a.debuglog?i=a.debuglog("stream"):i=function(){};var n=NO(),s=WS(),c=XS(),f=c.getHighWaterMark,g=ag().codes,v=g.ERR_INVALID_ARG_TYPE,T=g.ERR_STREAM_PUSH_AFTER_EOF,l=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,S,E;Yv()(m,M);var y=s.errorOrDestroy,b=["error","close","destroy","pause","resume"];function p(j,ee,re){if(typeof j.prependListener=="function")return j.prependListener(ee,re);!j._events||!j._events[ee]?j.on(ee,re):Array.isArray(j._events[ee])?j._events[ee].unshift(re):j._events[ee]=[re,j._events[ee]]}function u(j,ee,re){d=d||ig(),j=j||{},typeof re!="boolean"&&(re=ee instanceof d),this.objectMode=!!j.objectMode,re&&(this.objectMode=this.objectMode||!!j.readableObjectMode),this.highWaterMark=f(this,j,"readableHighWaterMark",re),this.buffer=new n,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=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.destroyed=!1,this.defaultEncoding=j.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,j.encoding&&(w||(w=YS().StringDecoder),this.decoder=new w(j.encoding),this.encoding=j.encoding)}function m(j){if(d=d||ig(),!(this instanceof m))return new m(j);var ee=this instanceof d;this._readableState=new u(j,this,ee),this.readable=!0,j&&(typeof j.read=="function"&&(this._read=j.read),typeof j.destroy=="function"&&(this._destroy=j.destroy)),M.call(this)}Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ee){this._readableState&&(this._readableState.destroyed=ee)}}),m.prototype.destroy=s.destroy,m.prototype._undestroy=s.undestroy,m.prototype._destroy=function(j,ee){ee(j)},m.prototype.push=function(j,ee){var re=this._readableState,ce;return re.objectMode?ce=!0:typeof j=="string"&&(ee=ee||re.defaultEncoding,ee!==re.encoding&&(j=e.from(j,ee),ee=""),ce=!0),h(this,j,ee,!1,ce)},m.prototype.unshift=function(j){return h(this,j,null,!0,!1)};function h(j,ee,re,ce,be){i("readableAddChunk",ee);var Ae=j._readableState;if(ee===null)Ae.reading=!1,O(j,Ae);else{var ze;if(be||(ze=L(Ae,ee)),ze)y(j,ze);else if(Ae.objectMode||ee&&ee.length>0)if(typeof ee!="string"&&!Ae.objectMode&&Object.getPrototypeOf(ee)!==e.prototype&&(ee=r(ee)),ce)Ae.endEmitted?y(j,new _):P(j,Ae,ee,!0);else if(Ae.ended)y(j,new T);else{if(Ae.destroyed)return!1;Ae.reading=!1,Ae.decoder&&!re?(ee=Ae.decoder.write(ee),Ae.objectMode||ee.length!==0?P(j,Ae,ee,!1):U(j,Ae)):P(j,Ae,ee,!1)}else ce||(Ae.reading=!1,U(j,Ae))}return!Ae.ended&&(Ae.length<Ae.highWaterMark||Ae.length===0)}function P(j,ee,re,ce){ee.flowing&&ee.length===0&&!ee.sync?(ee.awaitDrain=0,j.emit("data",re)):(ee.length+=ee.objectMode?1:re.length,ce?ee.buffer.unshift(re):ee.buffer.push(re),ee.needReadable&&I(j)),U(j,ee)}function L(j,ee){var re;return!o(ee)&&typeof ee!="string"&&ee!==void 0&&!j.objectMode&&(re=new v("chunk",["string","Buffer","Uint8Array"],ee)),re}m.prototype.isPaused=function(){return this._readableState.flowing===!1},m.prototype.setEncoding=function(j){w||(w=YS().StringDecoder);var ee=new w(j);this._readableState.decoder=ee,this._readableState.encoding=this._readableState.decoder.encoding;for(var re=this._readableState.buffer.head,ce="";re!==null;)ce+=ee.write(re.data),re=re.next;return this._readableState.buffer.clear(),ce!==""&&this._readableState.buffer.push(ce),this._readableState.length=ce.length,this};var z=1073741824;function F(j){return j>=z?j=z:(j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,j++),j}function B(j,ee){return j<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:j!==j?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(j>ee.highWaterMark&&(ee.highWaterMark=F(j)),j<=ee.length?j:ee.ended?ee.length:(ee.needReadable=!0,0))}m.prototype.read=function(j){i("read",j),j=parseInt(j,10);var ee=this._readableState,re=j;if(j!==0&&(ee.emittedReadable=!1),j===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return i("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?X(this):I(this),null;if(j=B(j,ee),j===0&&ee.ended)return ee.length===0&&X(this),null;var ce=ee.needReadable;i("need readable",ce),(ee.length===0||ee.length-j<ee.highWaterMark)&&(ce=!0,i("length less than watermark",ce)),ee.ended||ee.reading?(ce=!1,i("reading or ended",ce)):ce&&(i("do read"),ee.reading=!0,ee.sync=!0,ee.length===0&&(ee.needReadable=!0),this._read(ee.highWaterMark),ee.sync=!1,ee.reading||(j=B(re,ee)));var be;return j>0?be=J(j,ee):be=null,be===null?(ee.needReadable=ee.length<=ee.highWaterMark,j=0):(ee.length-=j,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),re!==j&&ee.ended&&X(this)),be!==null&&this.emit("data",be),be};function O(j,ee){if(i("onEofChunk"),!ee.ended){if(ee.decoder){var re=ee.decoder.end();re&&re.length&&(ee.buffer.push(re),ee.length+=ee.objectMode?1:re.length)}ee.ended=!0,ee.sync?I(j):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,N(j)))}}function I(j){var ee=j._readableState;i("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(i("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(N,j))}function N(j){var ee=j._readableState;i("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(j.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,$(j)}function U(j,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick(W,j,ee))}function W(j,ee){for(;!ee.reading&&!ee.ended&&(ee.length<ee.highWaterMark||ee.flowing&&ee.length===0);){var re=ee.length;if(i("maybeReadMore read 0"),j.read(0),re===ee.length)break}ee.readingMore=!1}m.prototype._read=function(j){y(this,new l("_read()"))},m.prototype.pipe=function(j,ee){var re=this,ce=this._readableState;switch(ce.pipesCount){case 0:ce.pipes=j;break;case 1:ce.pipes=[ce.pipes,j];break;default:ce.pipes.push(j);break}ce.pipesCount+=1,i("pipe count=%d opts=%j",ce.pipesCount,ee);var be=(!ee||ee.end!==!1)&&j!==process.stdout&&j!==process.stderr,Ae=be?Re:fe;ce.endEmitted?process.nextTick(Ae):re.once("end",Ae),j.on("unpipe",ze);function ze(Fe,rt){i("onunpipe"),Fe===re&&rt&&rt.hasUnpiped===!1&&(rt.hasUnpiped=!0,ot())}function Re(){i("onend"),j.end()}var Xe=Q(re);j.on("drain",Xe);var it=!1;function ot(){i("cleanup"),j.removeListener("close",Ee),j.removeListener("finish",_e),j.removeListener("drain",Xe),j.removeListener("error",lt),j.removeListener("unpipe",ze),re.removeListener("end",Re),re.removeListener("end",fe),re.removeListener("data",tt),it=!0,ce.awaitDrain&&(!j._writableState||j._writableState.needDrain)&&Xe()}re.on("data",tt);function tt(Fe){i("ondata");var rt=j.write(Fe);i("dest.write",rt),rt===!1&&((ce.pipesCount===1&&ce.pipes===j||ce.pipesCount>1&&ie(ce.pipes,j)!==-1)&&!it&&(i("false write response, pause",ce.awaitDrain),ce.awaitDrain++),re.pause())}function lt(Fe){i("onerror",Fe),fe(),j.removeListener("error",lt),A(j,"error")===0&&y(j,Fe)}p(j,"error",lt);function Ee(){j.removeListener("finish",_e),fe()}j.once("close",Ee);function _e(){i("onfinish"),j.removeListener("close",Ee),fe()}j.once("finish",_e);function fe(){i("unpipe"),re.unpipe(j)}return j.emit("pipe",re),ce.flowing||(i("pipe resume"),re.resume()),j};function Q(j){return function(){var re=j._readableState;i("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&A(j,"data")&&(re.flowing=!0,$(j))}}m.prototype.unpipe=function(j){var ee=this._readableState,re={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return j&&j!==ee.pipes?this:(j||(j=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,j&&j.emit("unpipe",this,re),this);if(!j){var ce=ee.pipes,be=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var Ae=0;Ae<be;Ae++)ce[Ae].emit("unpipe",this,{hasUnpiped:!1});return this}var ze=ie(ee.pipes,j);return ze===-1?this:(ee.pipes.splice(ze,1),ee.pipesCount-=1,ee.pipesCount===1&&(ee.pipes=ee.pipes[0]),j.emit("unpipe",this,re),this)},m.prototype.on=function(j,ee){var re=M.prototype.on.call(this,j,ee),ce=this._readableState;return j==="data"?(ce.readableListening=this.listenerCount("readable")>0,ce.flowing!==!1&&this.resume()):j==="readable"&&!ce.endEmitted&&!ce.readableListening&&(ce.readableListening=ce.needReadable=!0,ce.flowing=!1,ce.emittedReadable=!1,i("on readable",ce.length,ce.reading),ce.length?I(this):ce.reading||process.nextTick(le,this)),re},m.prototype.addListener=m.prototype.on,m.prototype.removeListener=function(j,ee){var re=M.prototype.removeListener.call(this,j,ee);return j==="readable"&&process.nextTick(ue,this),re},m.prototype.removeAllListeners=function(j){var ee=M.prototype.removeAllListeners.apply(this,arguments);return(j==="readable"||j===void 0)&&process.nextTick(ue,this),ee};function ue(j){var ee=j._readableState;ee.readableListening=j.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:j.listenerCount("data")>0&&j.resume()}function le(j){i("readable nexttick read 0"),j.read(0)}m.prototype.resume=function(){var j=this._readableState;return j.flowing||(i("resume"),j.flowing=!j.readableListening,he(this,j)),j.paused=!1,this};function he(j,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(G,j,ee))}function G(j,ee){i("resume",ee.reading),ee.reading||j.read(0),ee.resumeScheduled=!1,j.emit("resume"),$(j),ee.flowing&&!ee.reading&&j.read(0)}m.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function $(j){var ee=j._readableState;for(i("flow",ee.flowing);ee.flowing&&j.read()!==null;);}m.prototype.wrap=function(j){var ee=this,re=this._readableState,ce=!1;j.on("end",function(){if(i("wrapped end"),re.decoder&&!re.ended){var ze=re.decoder.end();ze&&ze.length&&ee.push(ze)}ee.push(null)}),j.on("data",function(ze){if(i("wrapped data"),re.decoder&&(ze=re.decoder.write(ze)),!(re.objectMode&&ze==null)&&!(!re.objectMode&&(!ze||!ze.length))){var Re=ee.push(ze);Re||(ce=!0,j.pause())}});for(var be in j)this[be]===void 0&&typeof j[be]=="function"&&(this[be]=function(Re){return function(){return j[Re].apply(j,arguments)}}(be));for(var Ae=0;Ae<b.length;Ae++)j.on(b[Ae],this.emit.bind(this,b[Ae]));return this._read=function(ze){i("wrapped _read",ze),ce&&(ce=!1,j.resume())},this},typeof Symbol=="function"&&(m.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=qO()),S(this)}),Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(m.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(m.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ee){this._readableState&&(this._readableState.flowing=ee)}}),m._fromList=J,Object.defineProperty(m.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function J(j,ee){if(ee.length===0)return null;var re;return ee.objectMode?re=ee.buffer.shift():!j||j>=ee.length?(ee.decoder?re=ee.buffer.join(""):ee.buffer.length===1?re=ee.buffer.first():re=ee.buffer.concat(ee.length),ee.buffer.clear()):re=ee.buffer.consume(j,ee.decoder),re}function X(j){var ee=j._readableState;i("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(oe,ee,j))}function oe(j,ee){if(i("endReadableNT",j.endEmitted,j.length),!j.endEmitted&&j.length===0&&(j.endEmitted=!0,ee.readable=!1,ee.emit("end"),j.autoDestroy)){var re=ee._writableState;(!re||re.autoDestroy&&re.finished)&&ee.destroy()}}typeof Symbol=="function"&&(m.from=function(j,ee){return E===void 0&&(E=VO()),E(m,j,ee)});function ie(j,ee){for(var re=0,ce=j.length;re<ce;re++)if(j[re]===ee)return re;return-1}}}),JS=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(Z,q){"use strict";q.exports=o;var d=ag().codes,x=d.ERR_METHOD_NOT_IMPLEMENTED,A=d.ERR_MULTIPLE_CALLBACK,M=d.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=d.ERR_TRANSFORM_WITH_LENGTH_0,t=ig();Yv()(o,t);function r(n,s){var c=this._transformState;c.transforming=!1;var f=c.writecb;if(f===null)return this.emit("error",new A);c.writechunk=null,c.writecb=null,s!=null&&this.push(s),f(n);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function o(n){if(!(this instanceof o))return new o(n);t.call(this,n),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,n&&(typeof n.transform=="function"&&(this._transform=n.transform),typeof n.flush=="function"&&(this._flush=n.flush)),this.on("prefinish",a)}function a(){var n=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(s,c){i(n,s,c)}):i(this,null,null)}o.prototype.push=function(n,s){return this._transformState.needTransform=!1,t.prototype.push.call(this,n,s)},o.prototype._transform=function(n,s,c){c(new x("_transform()"))},o.prototype._write=function(n,s,c){var f=this._transformState;if(f.writecb=c,f.writechunk=n,f.writeencoding=s,!f.transforming){var g=this._readableState;(f.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},o.prototype._read=function(n){var s=this._transformState;s.writechunk!==null&&!s.transforming?(s.transforming=!0,this._transform(s.writechunk,s.writeencoding,s.afterTransform)):s.needTransform=!0},o.prototype._destroy=function(n,s){t.prototype._destroy.call(this,n,function(c){s(c)})};function i(n,s,c){if(s)return n.emit("error",s);if(c!=null&&n.push(c),n._writableState.length)throw new e;if(n._transformState.transforming)throw new M;return n.push(null)}}}),GO=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js"(Z,q){"use strict";q.exports=x;var d=JS();Yv()(x,d);function x(A){if(!(this instanceof x))return new x(A);d.call(this,A)}x.prototype._transform=function(A,M,e){e(null,A)}}}),HO=Ze({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js"(Z,q){"use strict";var d;function x(c){var f=!1;return function(){f||(f=!0,c.apply(void 0,arguments))}}var A=ag().codes,M=A.ERR_MISSING_ARGS,e=A.ERR_STREAM_DESTROYED;function t(c){if(c)throw c}function r(c){return c.setHeader&&typeof c.abort=="function"}function o(c,f,g,v){v=x(v);var T=!1;c.on("close",function(){T=!0}),d===void 0&&(d=m3()),d(c,{readable:f,writable:g},function(_){if(_)return v(_);T=!0,v()});var l=!1;return function(_){if(!T&&!l){if(l=!0,r(c))return c.abort();if(typeof c.destroy=="function")return c.destroy();v(_||new e("pipe"))}}}function a(c){c()}function i(c,f){return c.pipe(f)}function n(c){return!c.length||typeof c[c.length-1]!="function"?t:c.pop()}function s(){for(var c=arguments.length,f=new Array(c),g=0;g<c;g++)f[g]=arguments[g];var v=n(f);if(Array.isArray(f[0])&&(f=f[0]),f.length<2)throw new M("streams");var T,l=f.map(function(_,w){var S=w<f.length-1,E=w>0;return o(_,S,E,function(y){T||(T=y),y&&l.forEach(a),!S&&(l.forEach(a),v(T))})});return f.reduce(i)}q.exports=s}}),WO=Ze({"node_modules/stream-browserify/index.js"(Z,q){q.exports=A;var d=W0().EventEmitter,x=Yv();x(A,d),A.Readable=KS(),A.Writable=ZS(),A.Duplex=ig(),A.Transform=JS(),A.PassThrough=GO(),A.finished=m3(),A.pipeline=HO(),A.Stream=A;function A(){d.call(this)}A.prototype.pipe=function(M,e){var t=this;function r(f){M.writable&&M.write(f)===!1&&t.pause&&t.pause()}t.on("data",r);function o(){t.readable&&t.resume&&t.resume()}M.on("drain",o),!M._isStdio&&(!e||e.end!==!1)&&(t.on("end",i),t.on("close",n));var a=!1;function i(){a||(a=!0,M.end())}function n(){a||(a=!0,typeof M.destroy=="function"&&M.destroy())}function s(f){if(c(),d.listenerCount(this,"error")===0)throw f}t.on("error",s),M.on("error",s);function c(){t.removeListener("data",r),M.removeListener("drain",o),t.removeListener("end",i),t.removeListener("close",n),t.removeListener("error",s),M.removeListener("error",s),t.removeListener("end",c),t.removeListener("close",c),M.removeListener("close",c)}return t.on("end",c),t.on("close",c),M.on("close",c),M.emit("pipe",t),M}}}),_1=Ze({"node_modules/util/util.js"(Z){var q=Object.getOwnPropertyDescriptors||function(W){for(var Q=Object.keys(W),ue={},le=0;le<Q.length;le++)ue[Q[le]]=Object.getOwnPropertyDescriptor(W,Q[le]);return ue},d=/%[sdj%]/g;Z.format=function(U){if(!w(U)){for(var W=[],Q=0;Q<arguments.length;Q++)W.push(e(arguments[Q]));return W.join(" ")}for(var Q=1,ue=arguments,le=ue.length,he=String(U).replace(d,function($){if($==="%%")return"%";if(Q>=le)return $;switch($){case"%s":return String(ue[Q++]);case"%d":return Number(ue[Q++]);case"%j":try{return JSON.stringify(ue[Q++])}catch{return"[Circular]"}default:return $}}),G=ue[Q];Q<le;G=ue[++Q])T(G)||!b(G)?he+=" "+G:he+=" "+e(G);return he},Z.deprecate=function(U,W){if(typeof process<"u"&&process.noDeprecation===!0)return U;if(typeof process>"u")return function(){return Z.deprecate(U,W).apply(this,arguments)};var Q=!1;function ue(){if(!Q){if(process.throwDeprecation)throw new Error(W);process.traceDeprecation?console.trace(W):console.error(W),Q=!0}return U.apply(this,arguments)}return ue};var x={},A=/^$/;M="false",M=M.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),A=new RegExp("^"+M+"$","i");var M;Z.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(A.test(U)){var W=process.pid;x[U]=function(){var Q=Z.format.apply(Z,arguments);console.error("%s %d: %s",U,W,Q)}}else x[U]=function(){};return x[U]};function e(U,W){var Q={seen:[],stylize:r};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v(W)?Q.showHidden=W:W&&Z._extend(Q,W),E(Q.showHidden)&&(Q.showHidden=!1),E(Q.depth)&&(Q.depth=2),E(Q.colors)&&(Q.colors=!1),E(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=t),a(Q,U,Q.depth)}Z.inspect=e,e.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]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(U,W){var Q=e.styles[W];return Q?"\x1B["+e.colors[Q][0]+"m"+U+"\x1B["+e.colors[Q][1]+"m":U}function r(U,W){return U}function o(U){var W={};return U.forEach(function(Q,ue){W[Q]=!0}),W}function a(U,W,Q){if(U.customInspect&&W&&m(W.inspect)&&W.inspect!==Z.inspect&&!(W.constructor&&W.constructor.prototype===W)){var ue=W.inspect(Q,U);return w(ue)||(ue=a(U,ue,Q)),ue}var le=i(U,W);if(le)return le;var he=Object.keys(W),G=o(he);if(U.showHidden&&(he=Object.getOwnPropertyNames(W)),u(W)&&(he.indexOf("message")>=0||he.indexOf("description")>=0))return n(W);if(he.length===0){if(m(W)){var $=W.name?": "+W.name:"";return U.stylize("[Function"+$+"]","special")}if(y(W))return U.stylize(RegExp.prototype.toString.call(W),"regexp");if(p(W))return U.stylize(Date.prototype.toString.call(W),"date");if(u(W))return n(W)}var J="",X=!1,oe=["{","}"];if(g(W)&&(X=!0,oe=["[","]"]),m(W)){var ie=W.name?": "+W.name:"";J=" [Function"+ie+"]"}if(y(W)&&(J=" "+RegExp.prototype.toString.call(W)),p(W)&&(J=" "+Date.prototype.toUTCString.call(W)),u(W)&&(J=" "+n(W)),he.length===0&&(!X||W.length==0))return oe[0]+J+oe[1];if(Q<0)return y(W)?U.stylize(RegExp.prototype.toString.call(W),"regexp"):U.stylize("[Object]","special");U.seen.push(W);var j;return X?j=s(U,W,Q,G,he):j=he.map(function(ee){return c(U,W,Q,G,ee,X)}),U.seen.pop(),f(j,J,oe)}function i(U,W){if(E(W))return U.stylize("undefined","undefined");if(w(W)){var Q="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(_(W))return U.stylize(""+W,"number");if(v(W))return U.stylize(""+W,"boolean");if(T(W))return U.stylize("null","null")}function n(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,W,Q,ue,le){for(var he=[],G=0,$=W.length;G<$;++G)B(W,String(G))?he.push(c(U,W,Q,ue,String(G),!0)):he.push("");return le.forEach(function(J){J.match(/^\d+$/)||he.push(c(U,W,Q,ue,J,!0))}),he}function c(U,W,Q,ue,le,he){var G,$,J;if(J=Object.getOwnPropertyDescriptor(W,le)||{value:W[le]},J.get?J.set?$=U.stylize("[Getter/Setter]","special"):$=U.stylize("[Getter]","special"):J.set&&($=U.stylize("[Setter]","special")),B(ue,le)||(G="["+le+"]"),$||(U.seen.indexOf(J.value)<0?(T(Q)?$=a(U,J.value,null):$=a(U,J.value,Q-1),$.indexOf(`
`)>-1&&(he?$=$.split(`
`).map(function(X){return" "+X}).join(`
`).slice(2):$=`
`+$.split(`
`).map(function(X){return" "+X}).join(`
`))):$=U.stylize("[Circular]","special")),E(G)){if(he&&le.match(/^\d+$/))return $;G=JSON.stringify(""+le),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+$}function f(U,W,Q){var ue=0,le=U.reduce(function(he,G){return ue++,G.indexOf(`
`)>=0&&ue++,he+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return le>60?Q[0]+(W===""?"":W+`
`)+" "+U.join(`,
`)+" "+Q[1]:Q[0]+W+" "+U.join(", ")+" "+Q[1]}Z.types=VS();function g(U){return Array.isArray(U)}Z.isArray=g;function v(U){return typeof U=="boolean"}Z.isBoolean=v;function T(U){return U===null}Z.isNull=T;function l(U){return U==null}Z.isNullOrUndefined=l;function _(U){return typeof U=="number"}Z.isNumber=_;function w(U){return typeof U=="string"}Z.isString=w;function S(U){return typeof U=="symbol"}Z.isSymbol=S;function E(U){return U===void 0}Z.isUndefined=E;function y(U){return b(U)&&P(U)==="[object RegExp]"}Z.isRegExp=y,Z.types.isRegExp=y;function b(U){return typeof U=="object"&&U!==null}Z.isObject=b;function p(U){return b(U)&&P(U)==="[object Date]"}Z.isDate=p,Z.types.isDate=p;function u(U){return b(U)&&(P(U)==="[object Error]"||U instanceof Error)}Z.isError=u,Z.types.isNativeError=u;function m(U){return typeof U=="function"}Z.isFunction=m;function h(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}Z.isPrimitive=h,Z.isBuffer=GS();function P(U){return Object.prototype.toString.call(U)}function L(U){return U<10?"0"+U.toString(10):U.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var U=new Date,W=[L(U.getHours()),L(U.getMinutes()),L(U.getSeconds())].join(":");return[U.getDate(),z[U.getMonth()],W].join(" ")}Z.log=function(){console.log("%s - %s",F(),Z.format.apply(Z,arguments))},Z.inherits=Yv(),Z._extend=function(U,W){if(!W||!b(W))return U;for(var Q=Object.keys(W),ue=Q.length;ue--;)U[Q[ue]]=W[Q[ue]];return U};function B(U,W){return Object.prototype.hasOwnProperty.call(U,W)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Z.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&W[O]){var Q=W[O];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,O,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var ue,le,he=new Promise(function(J,X){ue=J,le=X}),G=[],$=0;$<arguments.length;$++)G.push(arguments[$]);G.push(function(J,X){J?le(J):ue(X)});try{W.apply(this,G)}catch(J){le(J)}return he}return Object.setPrototypeOf(Q,Object.getPrototypeOf(W)),O&&Object.defineProperty(Q,O,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Q,q(W))},Z.promisify.custom=O;function I(U,W){if(!U){var Q=new Error("Promise was rejected with a falsy value");Q.reason=U,U=Q}return W(U)}function N(U){if(typeof U!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var Q=[],ue=0;ue<arguments.length;ue++)Q.push(arguments[ue]);var le=Q.pop();if(typeof le!="function")throw new TypeError("The last argument must be of type Function");var he=this,G=function(){return le.apply(he,arguments)};U.apply(this,Q).then(function($){process.nextTick(G.bind(null,null,$))},function($){process.nextTick(I.bind(null,$,G))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(U)),Object.defineProperties(W,q(U)),W}Z.callbackify=N}}),$S=Ze({"node_modules/assert/build/internal/errors.js"(Z,q){"use strict";function d(E){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},d(E)}function x(E,y){for(var b=0;b<y.length;b++){var p=y[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(E,M(p.key),p)}}function A(E,y,b){return y&&x(E.prototype,y),b&&x(E,b),Object.defineProperty(E,"prototype",{writable:!1}),E}function M(E){var y=e(E,"string");return d(y)==="symbol"?y:String(y)}function e(E,y){if(d(E)!=="object"||E===null)return E;var b=E[Symbol.toPrimitive];if(b!==void 0){var p=b.call(E,y||"default");if(d(p)!=="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(E)}function t(E,y){if(!(E instanceof y))throw new TypeError("Cannot call a class as a function")}function r(E,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(y&&y.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),y&&o(E,y)}function o(E,y){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,u){return p.__proto__=u,p},o(E,y)}function a(E){var y=s();return function(){var p=c(E),u;if(y){var m=c(this).constructor;u=Reflect.construct(p,arguments,m)}else u=p.apply(this,arguments);return i(this,u)}}function i(E,y){if(y&&(d(y)==="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(E)}function n(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function s(){if(typeof Reflect>"u"||!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{return!1}}function c(E){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(b){return b.__proto__||Object.getPrototypeOf(b)},c(E)}var f={},g,v;function T(E,y,b){b||(b=Error);function p(m,h,P){return typeof y=="string"?y:y(m,h,P)}var u=function(m){r(P,m);var h=a(P);function P(L,z,F){var B;return t(this,P),B=h.call(this,p(L,z,F)),B.code=E,B}return A(P)}(b);f[E]=u}function l(E,y){if(Array.isArray(E)){var b=E.length;return E=E.map(function(p){return String(p)}),b>2?"one of ".concat(y," ").concat(E.slice(0,b-1).join(", "),", or ")+E[b-1]:b===2?"one of ".concat(y," ").concat(E[0]," or ").concat(E[1]):"of ".concat(y," ").concat(E[0])}else return"of ".concat(y," ").concat(String(E))}function _(E,y,b){return E.substr(!b||b<0?0:+b,y.length)===y}function w(E,y,b){return(b===void 0||b>E.length)&&(b=E.length),E.substring(b-y.length,b)===y}function S(E,y,b){return typeof b!="number"&&(b=0),b+y.length>E.length?!1:E.indexOf(y,b)!==-1}T("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),T("ERR_INVALID_ARG_TYPE",function(E,y,b){g===void 0&&(g=Y_()),g(typeof E=="string","'name' must be a string");var p;typeof y=="string"&&_(y,"not ")?(p="must not be",y=y.replace(/^not /,"")):p="must be";var u;if(w(E," argument"))u="The ".concat(E," ").concat(p," ").concat(l(y,"type"));else{var m=S(E,".")?"property":"argument";u='The "'.concat(E,'" ').concat(m," ").concat(p," ").concat(l(y,"type"))}return u+=". Received type ".concat(d(b)),u},TypeError),T("ERR_INVALID_ARG_VALUE",function(E,y){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=_1());var p=v.inspect(y);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(E,"' ").concat(b,". Received ").concat(p)},TypeError,RangeError),T("ERR_INVALID_RETURN_VALUE",function(E,y,b){var p;return b&&b.constructor&&b.constructor.name?p="instance of ".concat(b.constructor.name):p="type ".concat(d(b)),"Expected ".concat(E,' to be returned from the "').concat(y,'"')+" function but got ".concat(p,".")},TypeError),T("ERR_MISSING_ARGS",function(){for(var E=arguments.length,y=new Array(E),b=0;b<E;b++)y[b]=arguments[b];g===void 0&&(g=Y_()),g(y.length>0,"At least one arg needs to be specified");var p="The ",u=y.length;switch(y=y.map(function(m){return'"'.concat(m,'"')}),u){case 1:p+="".concat(y[0]," argument");break;case 2:p+="".concat(y[0]," and ").concat(y[1]," arguments");break;default:p+=y.slice(0,u-1).join(", "),p+=", and ".concat(y[u-1]," arguments");break}return"".concat(p," must be specified")},TypeError),q.exports.codes=f}}),XO=Ze({"node_modules/assert/build/internal/assert/assertion_error.js"(Z,q){"use strict";function d(N,U){var W=Object.keys(N);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(N);U&&(Q=Q.filter(function(ue){return Object.getOwnPropertyDescriptor(N,ue).enumerable})),W.push.apply(W,Q)}return W}function x(N){for(var U=1;U<arguments.length;U++){var W=arguments[U]!=null?arguments[U]:{};U%2?d(Object(W),!0).forEach(function(Q){A(N,Q,W[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(W)):d(Object(W)).forEach(function(Q){Object.defineProperty(N,Q,Object.getOwnPropertyDescriptor(W,Q))})}return N}function A(N,U,W){return U=r(U),U in N?Object.defineProperty(N,U,{value:W,enumerable:!0,configurable:!0,writable:!0}):N[U]=W,N}function M(N,U){if(!(N instanceof U))throw new TypeError("Cannot call a class as a function")}function e(N,U){for(var W=0;W<U.length;W++){var Q=U[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(N,r(Q.key),Q)}}function t(N,U,W){return U&&e(N.prototype,U),W&&e(N,W),Object.defineProperty(N,"prototype",{writable:!1}),N}function r(N){var U=o(N,"string");return _(U)==="symbol"?U:String(U)}function o(N,U){if(_(N)!=="object"||N===null)return N;var W=N[Symbol.toPrimitive];if(W!==void 0){var Q=W.call(N,U||"default");if(_(Q)!=="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(N)}function a(N,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(U&&U.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),U&&T(N,U)}function i(N){var U=g();return function(){var Q=l(N),ue;if(U){var le=l(this).constructor;ue=Reflect.construct(Q,arguments,le)}else ue=Q.apply(this,arguments);return n(this,ue)}}function n(N,U){if(U&&(_(U)==="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(N)}function s(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function c(N){var U=typeof Map=="function"?new Map:void 0;return c=function(Q){if(Q===null||!v(Q))return Q;if(typeof Q!="function")throw new TypeError("Super expression must either be null or a function");if(typeof U<"u"){if(U.has(Q))return U.get(Q);U.set(Q,ue)}function ue(){return f(Q,arguments,l(this).constructor)}return ue.prototype=Object.create(Q.prototype,{constructor:{value:ue,enumerable:!1,writable:!0,configurable:!0}}),T(ue,Q)},c(N)}function f(N,U,W){return g()?f=Reflect.construct.bind():f=function(ue,le,he){var G=[null];G.push.apply(G,le);var $=Function.bind.apply(ue,G),J=new $;return he&&T(J,he.prototype),J},f.apply(null,arguments)}function g(){if(typeof Reflect>"u"||!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{return!1}}function v(N){return Function.toString.call(N).indexOf("[native code]")!==-1}function T(N,U){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,ue){return Q.__proto__=ue,Q},T(N,U)}function l(N){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(W){return W.__proto__||Object.getPrototypeOf(W)},l(N)}function _(N){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},_(N)}var w=_1(),S=w.inspect,E=$S(),y=E.codes.ERR_INVALID_ARG_TYPE;function b(N,U,W){return(W===void 0||W>N.length)&&(W=N.length),N.substring(W-U.length,W)===U}function p(N,U){if(U=Math.floor(U),N.length==0||U==0)return"";var W=N.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)N+=N,U--;return N+=N.substring(0,W-N.length),N}var u="",m="",h="",P="",L={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:"},z=10;function F(N){var U=Object.keys(N),W=Object.create(Object.getPrototypeOf(N));return U.forEach(function(Q){W[Q]=N[Q]}),Object.defineProperty(W,"message",{value:N.message}),W}function B(N){return S(N,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function O(N,U,W){var Q="",ue="",le=0,he="",G=!1,$=B(N),J=$.split(`
`),X=B(U).split(`
`),oe=0,ie="";if(W==="strictEqual"&&_(N)==="object"&&_(U)==="object"&&N!==null&&U!==null&&(W="strictEqualObject"),J.length===1&&X.length===1&&J[0]!==X[0]){var j=J[0].length+X[0].length;if(j<=z){if((_(N)!=="object"||N===null)&&(_(U)!=="object"||U===null)&&(N!==0||U!==0))return"".concat(L[W],`
`)+"".concat(J[0]," !== ").concat(X[0],`
`)}else if(W!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(j<ee){for(;J[0][oe]===X[0][oe];)oe++;oe>2&&(ie=`
`.concat(p(" ",oe),"^"),oe=0)}}}for(var re=J[J.length-1],ce=X[X.length-1];re===ce&&(oe++<2?he=`
`.concat(re).concat(he):Q=re,J.pop(),X.pop(),!(J.length===0||X.length===0));)re=J[J.length-1],ce=X[X.length-1];var be=Math.max(J.length,X.length);if(be===0){var Ae=$.split(`
`);if(Ae.length>30)for(Ae[26]="".concat(u,"...").concat(P);Ae.length>27;)Ae.pop();return"".concat(L.notIdentical,`
`).concat(Ae.join(`
`),`
`)}oe>3&&(he=`
`.concat(u,"...").concat(P).concat(he),G=!0),Q!==""&&(he=`
`.concat(Q).concat(he),Q="");var ze=0,Re=L[W]+`
`.concat(m,"+ actual").concat(P," ").concat(h,"- expected").concat(P),Xe=" ".concat(u,"...").concat(P," Lines skipped");for(oe=0;oe<be;oe++){var it=oe-le;if(J.length<oe+1)it>1&&oe>2&&(it>4?(ue+=`
`.concat(u,"...").concat(P),G=!0):it>3&&(ue+=`
`.concat(X[oe-2]),ze++),ue+=`
`.concat(X[oe-1]),ze++),le=oe,Q+=`
`.concat(h,"-").concat(P," ").concat(X[oe]),ze++;else if(X.length<oe+1)it>1&&oe>2&&(it>4?(ue+=`
`.concat(u,"...").concat(P),G=!0):it>3&&(ue+=`
`.concat(J[oe-2]),ze++),ue+=`
`.concat(J[oe-1]),ze++),le=oe,ue+=`
`.concat(m,"+").concat(P," ").concat(J[oe]),ze++;else{var ot=X[oe],tt=J[oe],lt=tt!==ot&&(!b(tt,",")||tt.slice(0,-1)!==ot);lt&&b(ot,",")&&ot.slice(0,-1)===tt&&(lt=!1,tt+=","),lt?(it>1&&oe>2&&(it>4?(ue+=`
`.concat(u,"...").concat(P),G=!0):it>3&&(ue+=`
`.concat(J[oe-2]),ze++),ue+=`
`.concat(J[oe-1]),ze++),le=oe,ue+=`
`.concat(m,"+").concat(P," ").concat(tt),Q+=`
`.concat(h,"-").concat(P," ").concat(ot),ze+=2):(ue+=Q,Q="",(it===1||oe===0)&&(ue+=`
`.concat(tt),ze++))}if(ze>20&&oe<be-2)return"".concat(Re).concat(Xe,`
`).concat(ue,`
`).concat(u,"...").concat(P).concat(Q,`
`)+"".concat(u,"...").concat(P)}return"".concat(Re).concat(G?Xe:"",`
`).concat(ue).concat(Q).concat(he).concat(ie)}var I=function(N,U){a(Q,N);var W=i(Q);function Q(ue){var le;if(M(this,Q),_(ue)!=="object"||ue===null)throw new y("options","Object",ue);var he=ue.message,G=ue.operator,$=ue.stackStartFn,J=ue.actual,X=ue.expected,oe=Error.stackTraceLimit;if(Error.stackTraceLimit=0,he!=null)le=W.call(this,String(he));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(u="\x1B[34m",m="\x1B[32m",P="\x1B[39m",h="\x1B[31m"):(u="",m="",P="",h="")),_(J)==="object"&&J!==null&&_(X)==="object"&&X!==null&&"stack"in J&&J instanceof Error&&"stack"in X&&X instanceof Error&&(J=F(J),X=F(X)),G==="deepStrictEqual"||G==="strictEqual")le=W.call(this,O(J,X,G));else if(G==="notDeepStrictEqual"||G==="notStrictEqual"){var ie=L[G],j=B(J).split(`
`);if(G==="notStrictEqual"&&_(J)==="object"&&J!==null&&(ie=L.notStrictEqualObject),j.length>30)for(j[26]="".concat(u,"...").concat(P);j.length>27;)j.pop();j.length===1?le=W.call(this,"".concat(ie," ").concat(j[0])):le=W.call(this,"".concat(ie,`
`).concat(j.join(`
`),`
`))}else{var ee=B(J),re="",ce=L[G];G==="notDeepEqual"||G==="notEqual"?(ee="".concat(L[G],`
`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(re="".concat(B(X)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),re.length>512&&(re="".concat(re.slice(0,509),"...")),G==="deepEqual"||G==="equal"?ee="".concat(ce,`
`).concat(ee,`
should equal
`):re=" ".concat(G," ").concat(re)),le=W.call(this,"".concat(ee).concat(re))}return Error.stackTraceLimit=oe,le.generatedMessage=!he,Object.defineProperty(s(le),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),le.code="ERR_ASSERTION",le.actual=J,le.expected=X,le.operator=G,Error.captureStackTrace&&Error.captureStackTrace(s(le),$),le.stack,le.name="AssertionError",n(le)}return t(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:U,value:function(le,he){return S(this,x(x({},he),{},{customInspect:!1,depth:0}))}}]),Q}(c(Error),S.custom);q.exports=I}}),QS=Ze({"node_modules/object-keys/isArguments.js"(Z,q){"use strict";var d=Object.prototype.toString;q.exports=function(A){var M=d.call(A),e=M==="[object Arguments]";return e||(e=M!=="[object Array]"&&A!==null&&typeof A=="object"&&typeof A.length=="number"&&A.length>=0&&d.call(A.callee)==="[object Function]"),e}}}),ZO=Ze({"node_modules/object-keys/implementation.js"(Z,q){"use strict";var d;Object.keys||(x=Object.prototype.hasOwnProperty,A=Object.prototype.toString,M=QS(),e=Object.prototype.propertyIsEnumerable,t=!e.call({toString:null},"toString"),r=e.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(c){var f=c.constructor;return f&&f.prototype===c},i={$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},n=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!i["$"+c]&&x.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{a(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!n)return a(c);try{return a(c)}catch{return!1}},d=function(f){var g=f!==null&&typeof f=="object",v=A.call(f)==="[object Function]",T=M(f),l=g&&A.call(f)==="[object String]",_=[];if(!g&&!v&&!T)throw new TypeError("Object.keys called on a non-object");var w=r&&v;if(l&&f.length>0&&!x.call(f,0))for(var S=0;S<f.length;++S)_.push(String(S));if(T&&f.length>0)for(var E=0;E<f.length;++E)_.push(String(E));else for(var y in f)!(w&&y==="prototype")&&x.call(f,y)&&_.push(String(y));if(t)for(var b=s(f),p=0;p<o.length;++p)!(b&&o[p]==="constructor")&&x.call(f,o[p])&&_.push(o[p]);return _});var x,A,M,e,t,r,o,a,i,n,s;q.exports=d}}),eM=Ze({"node_modules/object-keys/index.js"(Z,q){"use strict";var d=Array.prototype.slice,x=QS(),A=Object.keys,M=A?function(r){return A(r)}:ZO(),e=Object.keys;M.shim=function(){if(Object.keys){var r=function(){var o=Object.keys(arguments);return o&&o.length===arguments.length}(1,2);r||(Object.keys=function(a){return x(a)?e(d.call(a)):e(a)})}else Object.keys=M;return Object.keys||M},q.exports=M}}),YO=Ze({"node_modules/object.assign/implementation.js"(Z,q){"use strict";var d=eM(),x=p3()(),A=y1(),M=Object,e=A("Array.prototype.push"),t=A("Object.prototype.propertyIsEnumerable"),r=x?Object.getOwnPropertySymbols:null;q.exports=function(a,i){if(a==null)throw new TypeError("target must be an object");var n=M(a);if(arguments.length===1)return n;for(var s=1;s<arguments.length;++s){var c=M(arguments[s]),f=d(c),g=x&&(Object.getOwnPropertySymbols||r);if(g)for(var v=g(c),T=0;T<v.length;++T){var l=v[T];t(c,l)&&e(f,l)}for(var _=0;_<f.length;++_){var w=f[_];if(t(c,w)){var S=c[w];n[w]=S}}}return n}}}),KO=Ze({"node_modules/object.assign/polyfill.js"(Z,q){"use strict";var d=YO(),x=function(){if(!Object.assign)return!1;for(var M="abcdefghijklmnopqrst",e=M.split(""),t={},r=0;r<e.length;++r)t[e[r]]=e[r];var o=Object.assign({},t),a="";for(var i in o)a+=i;return M!==a},A=function(){if(!Object.assign||!Object.preventExtensions)return!1;var M=Object.preventExtensions({1:2});try{Object.assign(M,"xy")}catch{return M[1]==="y"}return!1};q.exports=function(){return!Object.assign||x()||A()?d:Object.assign}}}),tM=Ze({"node_modules/object-is/implementation.js"(Z,q){"use strict";var d=function(x){return x!==x};q.exports=function(A,M){return A===0&&M===0?1/A===1/M:!!(A===M||d(A)&&d(M))}}}),g3=Ze({"node_modules/object-is/polyfill.js"(Z,q){"use strict";var d=tM();q.exports=function(){return typeof Object.is=="function"?Object.is:d}}}),Z_=Ze({"node_modules/define-properties/index.js"(Z,q){"use strict";var d=eM(),x=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",A=Object.prototype.toString,M=Array.prototype.concat,e=Object.defineProperty,t=function(n){return typeof n=="function"&&A.call(n)==="[object Function]"},r=US()(),o=e&&r,a=function(n,s,c,f){if(s in n){if(f===!0){if(n[s]===c)return}else if(!t(f)||!f())return}o?e(n,s,{configurable:!0,enumerable:!1,value:c,writable:!0}):n[s]=c},i=function(n,s){var c=arguments.length>2?arguments[2]:{},f=d(s);x&&(f=M.call(f,Object.getOwnPropertySymbols(s)));for(var g=0;g<f.length;g+=1)a(n,f[g],s[f[g]],c[f[g]])};i.supportsDescriptors=!!o,q.exports=i}}),JO=Ze({"node_modules/object-is/shim.js"(Z,q){"use strict";var d=g3(),x=Z_();q.exports=function(){var M=d();return x(Object,{is:M},{is:function(){return Object.is!==M}}),M}}}),$O=Ze({"node_modules/object-is/index.js"(Z,q){"use strict";var d=Z_(),x=X_(),A=tM(),M=g3(),e=JO(),t=x(M(),Object);d(t,{getPolyfill:M,implementation:A,shim:e}),q.exports=t}}),rM=Ze({"node_modules/is-nan/implementation.js"(Z,q){"use strict";q.exports=function(x){return x!==x}}}),aM=Ze({"node_modules/is-nan/polyfill.js"(Z,q){"use strict";var d=rM();q.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:d}}}),QO=Ze({"node_modules/is-nan/shim.js"(Z,q){"use strict";var d=Z_(),x=aM();q.exports=function(){var M=x();return d(Number,{isNaN:M},{isNaN:function(){return Number.isNaN!==M}}),M}}}),eB=Ze({"node_modules/is-nan/index.js"(Z,q){"use strict";var d=X_(),x=Z_(),A=rM(),M=aM(),e=QO(),t=d(M(),Number);x(t,{getPolyfill:M,implementation:A,shim:e}),q.exports=t}}),tB=Ze({"node_modules/assert/build/internal/util/comparisons.js"(Z,q){"use strict";function d(Ee,_e){return t(Ee)||e(Ee,_e)||A(Ee,_e)||x()}function x(){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 A(Ee,_e){if(Ee){if(typeof Ee=="string")return M(Ee,_e);var fe=Object.prototype.toString.call(Ee).slice(8,-1);if(fe==="Object"&&Ee.constructor&&(fe=Ee.constructor.name),fe==="Map"||fe==="Set")return Array.from(Ee);if(fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fe))return M(Ee,_e)}}function M(Ee,_e){(_e==null||_e>Ee.length)&&(_e=Ee.length);for(var fe=0,Fe=new Array(_e);fe<_e;fe++)Fe[fe]=Ee[fe];return Fe}function e(Ee,_e){var fe=Ee==null?null:typeof Symbol<"u"&&Ee[Symbol.iterator]||Ee["@@iterator"];if(fe!=null){var Fe,rt,st,Qe,Lt=[],kt=!0,Vt=!1;try{if(st=(fe=fe.call(Ee)).next,_e===0){if(Object(fe)!==fe)return;kt=!1}else for(;!(kt=(Fe=st.call(fe)).done)&&(Lt.push(Fe.value),Lt.length!==_e);kt=!0);}catch(Zt){Vt=!0,rt=Zt}finally{try{if(!kt&&fe.return!=null&&(Qe=fe.return(),Object(Qe)!==Qe))return}finally{if(Vt)throw rt}}return Lt}}function t(Ee){if(Array.isArray(Ee))return Ee}function r(Ee){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},r(Ee)}var o=/a/g.flags!==void 0,a=function(_e){var fe=[];return _e.forEach(function(Fe){return fe.push(Fe)}),fe},i=function(_e){var fe=[];return _e.forEach(function(Fe,rt){return fe.push([rt,Fe])}),fe},n=Object.is?Object.is:$O(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},c=Number.isNaN?Number.isNaN:eB();function f(Ee){return Ee.call.bind(Ee)}var g=f(Object.prototype.hasOwnProperty),v=f(Object.prototype.propertyIsEnumerable),T=f(Object.prototype.toString),l=_1().types,_=l.isAnyArrayBuffer,w=l.isArrayBufferView,S=l.isDate,E=l.isMap,y=l.isRegExp,b=l.isSet,p=l.isNativeError,u=l.isBoxedPrimitive,m=l.isNumberObject,h=l.isStringObject,P=l.isBooleanObject,L=l.isBigIntObject,z=l.isSymbolObject,F=l.isFloat32Array,B=l.isFloat64Array;function O(Ee){if(Ee.length===0||Ee.length>10)return!0;for(var _e=0;_e<Ee.length;_e++){var fe=Ee.charCodeAt(_e);if(fe<48||fe>57)return!0}return Ee.length===10&&Ee>=Math.pow(2,32)}function I(Ee){return Object.keys(Ee).filter(O).concat(s(Ee).filter(Object.prototype.propertyIsEnumerable.bind(Ee)))}function N(Ee,_e){if(Ee===_e)return 0;for(var fe=Ee.length,Fe=_e.length,rt=0,st=Math.min(fe,Fe);rt<st;++rt)if(Ee[rt]!==_e[rt]){fe=Ee[rt],Fe=_e[rt];break}return fe<Fe?-1:Fe<fe?1:0}var U=void 0,W=!0,Q=!1,ue=0,le=1,he=2,G=3;function $(Ee,_e){return o?Ee.source===_e.source&&Ee.flags===_e.flags:RegExp.prototype.toString.call(Ee)===RegExp.prototype.toString.call(_e)}function J(Ee,_e){if(Ee.byteLength!==_e.byteLength)return!1;for(var fe=0;fe<Ee.byteLength;fe++)if(Ee[fe]!==_e[fe])return!1;return!0}function X(Ee,_e){return Ee.byteLength!==_e.byteLength?!1:N(new Uint8Array(Ee.buffer,Ee.byteOffset,Ee.byteLength),new Uint8Array(_e.buffer,_e.byteOffset,_e.byteLength))===0}function oe(Ee,_e){return Ee.byteLength===_e.byteLength&&N(new Uint8Array(Ee),new Uint8Array(_e))===0}function ie(Ee,_e){return m(Ee)?m(_e)&&n(Number.prototype.valueOf.call(Ee),Number.prototype.valueOf.call(_e)):h(Ee)?h(_e)&&String.prototype.valueOf.call(Ee)===String.prototype.valueOf.call(_e):P(Ee)?P(_e)&&Boolean.prototype.valueOf.call(Ee)===Boolean.prototype.valueOf.call(_e):L(Ee)?L(_e)&&BigInt.prototype.valueOf.call(Ee)===BigInt.prototype.valueOf.call(_e):z(_e)&&Symbol.prototype.valueOf.call(Ee)===Symbol.prototype.valueOf.call(_e)}function j(Ee,_e,fe,Fe){if(Ee===_e)return Ee!==0?!0:fe?n(Ee,_e):!0;if(fe){if(r(Ee)!=="object")return typeof Ee=="number"&&c(Ee)&&c(_e);if(r(_e)!=="object"||Ee===null||_e===null||Object.getPrototypeOf(Ee)!==Object.getPrototypeOf(_e))return!1}else{if(Ee===null||r(Ee)!=="object")return _e===null||r(_e)!=="object"?Ee==_e:!1;if(_e===null||r(_e)!=="object")return!1}var rt=T(Ee),st=T(_e);if(rt!==st)return!1;if(Array.isArray(Ee)){if(Ee.length!==_e.length)return!1;var Qe=I(Ee,U),Lt=I(_e,U);return Qe.length!==Lt.length?!1:re(Ee,_e,fe,Fe,le,Qe)}if(rt==="[object Object]"&&(!E(Ee)&&E(_e)||!b(Ee)&&b(_e)))return!1;if(S(Ee)){if(!S(_e)||Date.prototype.getTime.call(Ee)!==Date.prototype.getTime.call(_e))return!1}else if(y(Ee)){if(!y(_e)||!$(Ee,_e))return!1}else if(p(Ee)||Ee instanceof Error){if(Ee.message!==_e.message||Ee.name!==_e.name)return!1}else if(w(Ee)){if(!fe&&(F(Ee)||B(Ee))){if(!J(Ee,_e))return!1}else if(!X(Ee,_e))return!1;var kt=I(Ee,U),Vt=I(_e,U);return kt.length!==Vt.length?!1:re(Ee,_e,fe,Fe,ue,kt)}else{if(b(Ee))return!b(_e)||Ee.size!==_e.size?!1:re(Ee,_e,fe,Fe,he);if(E(Ee))return!E(_e)||Ee.size!==_e.size?!1:re(Ee,_e,fe,Fe,G);if(_(Ee)){if(!oe(Ee,_e))return!1}else if(u(Ee)&&!ie(Ee,_e))return!1}return re(Ee,_e,fe,Fe,ue)}function ee(Ee,_e){return _e.filter(function(fe){return v(Ee,fe)})}function re(Ee,_e,fe,Fe,rt,st){if(arguments.length===5){st=Object.keys(Ee);var Qe=Object.keys(_e);if(st.length!==Qe.length)return!1}for(var Lt=0;Lt<st.length;Lt++)if(!g(_e,st[Lt]))return!1;if(fe&&arguments.length===5){var kt=s(Ee);if(kt.length!==0){var Vt=0;for(Lt=0;Lt<kt.length;Lt++){var Zt=kt[Lt];if(v(Ee,Zt)){if(!v(_e,Zt))return!1;st.push(Zt),Vt++}else if(v(_e,Zt))return!1}var Sr=s(_e);if(kt.length!==Sr.length&&ee(_e,Sr).length!==Vt)return!1}else{var xr=s(_e);if(xr.length!==0&&ee(_e,xr).length!==0)return!1}}if(st.length===0&&(rt===ue||rt===le&&Ee.length===0||Ee.size===0))return!0;if(Fe===void 0)Fe={val1:new Map,val2:new Map,position:0};else{var jr=Fe.val1.get(Ee);if(jr!==void 0){var wr=Fe.val2.get(_e);if(wr!==void 0)return jr===wr}Fe.position++}Fe.val1.set(Ee,Fe.position),Fe.val2.set(_e,Fe.position);var Ir=ot(Ee,_e,fe,st,Fe,rt);return Fe.val1.delete(Ee),Fe.val2.delete(_e),Ir}function ce(Ee,_e,fe,Fe){for(var rt=a(Ee),st=0;st<rt.length;st++){var Qe=rt[st];if(j(_e,Qe,fe,Fe))return Ee.delete(Qe),!0}return!1}function be(Ee){switch(r(Ee)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Ee=+Ee;case"number":if(c(Ee))return!1}return!0}function Ae(Ee,_e,fe){var Fe=be(fe);return Fe??(_e.has(Fe)&&!Ee.has(Fe))}function ze(Ee,_e,fe,Fe,rt){var st=be(fe);if(st!=null)return st;var Qe=_e.get(st);return Qe===void 0&&!_e.has(st)||!j(Fe,Qe,!1,rt)?!1:!Ee.has(st)&&j(Fe,Qe,!1,rt)}function Re(Ee,_e,fe,Fe){for(var rt=null,st=a(Ee),Qe=0;Qe<st.length;Qe++){var Lt=st[Qe];if(r(Lt)==="object"&&Lt!==null)rt===null&&(rt=new Set),rt.add(Lt);else if(!_e.has(Lt)){if(fe||!Ae(Ee,_e,Lt))return!1;rt===null&&(rt=new Set),rt.add(Lt)}}if(rt!==null){for(var kt=a(_e),Vt=0;Vt<kt.length;Vt++){var Zt=kt[Vt];if(r(Zt)==="object"&&Zt!==null){if(!ce(rt,Zt,fe,Fe))return!1}else if(!fe&&!Ee.has(Zt)&&!ce(rt,Zt,fe,Fe))return!1}return rt.size===0}return!0}function Xe(Ee,_e,fe,Fe,rt,st){for(var Qe=a(Ee),Lt=0;Lt<Qe.length;Lt++){var kt=Qe[Lt];if(j(fe,kt,rt,st)&&j(Fe,_e.get(kt),rt,st))return Ee.delete(kt),!0}return!1}function it(Ee,_e,fe,Fe){for(var rt=null,st=i(Ee),Qe=0;Qe<st.length;Qe++){var Lt=d(st[Qe],2),kt=Lt[0],Vt=Lt[1];if(r(kt)==="object"&&kt!==null)rt===null&&(rt=new Set),rt.add(kt);else{var Zt=_e.get(kt);if(Zt===void 0&&!_e.has(kt)||!j(Vt,Zt,fe,Fe)){if(fe||!ze(Ee,_e,kt,Vt,Fe))return!1;rt===null&&(rt=new Set),rt.add(kt)}}}if(rt!==null){for(var Sr=i(_e),xr=0;xr<Sr.length;xr++){var jr=d(Sr[xr],2),wr=jr[0],Ir=jr[1];if(r(wr)==="object"&&wr!==null){if(!Xe(rt,Ee,wr,Ir,fe,Fe))return!1}else if(!fe&&(!Ee.has(wr)||!j(Ee.get(wr),Ir,!1,Fe))&&!Xe(rt,Ee,wr,Ir,!1,Fe))return!1}return rt.size===0}return!0}function ot(Ee,_e,fe,Fe,rt,st){var Qe=0;if(st===he){if(!Re(Ee,_e,fe,rt))return!1}else if(st===G){if(!it(Ee,_e,fe,rt))return!1}else if(st===le)for(;Qe<Ee.length;Qe++)if(g(Ee,Qe)){if(!g(_e,Qe)||!j(Ee[Qe],_e[Qe],fe,rt))return!1}else{if(g(_e,Qe))return!1;for(var Lt=Object.keys(Ee);Qe<Lt.length;Qe++){var kt=Lt[Qe];if(!g(_e,kt)||!j(Ee[kt],_e[kt],fe,rt))return!1}return Lt.length===Object.keys(_e).length}for(Qe=0;Qe<Fe.length;Qe++){var Vt=Fe[Qe];if(!j(Ee[Vt],_e[Vt],fe,rt))return!1}return!0}function tt(Ee,_e){return j(Ee,_e,Q)}function lt(Ee,_e){return j(Ee,_e,W)}q.exports={isDeepEqual:tt,isDeepStrictEqual:lt}}}),Y_=Ze({"node_modules/assert/build/assert.js"(Z,q){"use strict";function d($){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},d($)}function x($,J){for(var X=0;X<J.length;X++){var oe=J[X];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty($,M(oe.key),oe)}}function A($,J,X){return J&&x($.prototype,J),X&&x($,X),Object.defineProperty($,"prototype",{writable:!1}),$}function M($){var J=e($,"string");return d(J)==="symbol"?J:String(J)}function e($,J){if(d($)!=="object"||$===null)return $;var X=$[Symbol.toPrimitive];if(X!==void 0){var oe=X.call($,J||"default");if(d(oe)!=="object")return oe;throw new TypeError("@@toPrimitive must return a primitive value.")}return(J==="string"?String:Number)($)}function t($,J){if(!($ instanceof J))throw new TypeError("Cannot call a class as a function")}var r=$S(),o=r.codes,a=o.ERR_AMBIGUOUS_ARGUMENT,i=o.ERR_INVALID_ARG_TYPE,n=o.ERR_INVALID_ARG_VALUE,s=o.ERR_INVALID_RETURN_VALUE,c=o.ERR_MISSING_ARGS,f=XO(),g=_1(),v=g.inspect,T=_1().types,l=T.isPromise,_=T.isRegExp,w=KO()(),S=g3()(),E=y1()("RegExp.prototype.test"),y,b;function p(){var $=tB();y=$.isDeepEqual,b=$.isDeepStrictEqual}var u=!1,m=q.exports=F,h={};function P($){throw $.message instanceof Error?$.message:new f($)}function L($,J,X,oe,ie){var j=arguments.length,ee;if(j===0)ee="Failed";else if(j===1)X=$,$=void 0;else{if(u===!1){u=!0;var re=process.emitWarning?process.emitWarning:console.warn.bind(console);re("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}j===2&&(oe="!=")}if(X instanceof Error)throw X;var ce={actual:$,expected:J,operator:oe===void 0?"fail":oe,stackStartFn:ie||L};X!==void 0&&(ce.message=X);var be=new f(ce);throw ee&&(be.message=ee,be.generatedMessage=!0),be}m.fail=L,m.AssertionError=f;function z($,J,X,oe){if(!X){var ie=!1;if(J===0)ie=!0,oe="No value argument passed to `assert.ok()`";else if(oe instanceof Error)throw oe;var j=new f({actual:X,expected:!0,message:oe,operator:"==",stackStartFn:$});throw j.generatedMessage=ie,j}}function F(){for(var $=arguments.length,J=new Array($),X=0;X<$;X++)J[X]=arguments[X];z.apply(void 0,[F,J.length].concat(J))}m.ok=F,m.equal=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");J!=X&&P({actual:J,expected:X,message:oe,operator:"==",stackStartFn:$})},m.notEqual=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");J==X&&P({actual:J,expected:X,message:oe,operator:"!=",stackStartFn:$})},m.deepEqual=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");y===void 0&&p(),y(J,X)||P({actual:J,expected:X,message:oe,operator:"deepEqual",stackStartFn:$})},m.notDeepEqual=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");y===void 0&&p(),y(J,X)&&P({actual:J,expected:X,message:oe,operator:"notDeepEqual",stackStartFn:$})},m.deepStrictEqual=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");y===void 0&&p(),b(J,X)||P({actual:J,expected:X,message:oe,operator:"deepStrictEqual",stackStartFn:$})},m.notDeepStrictEqual=B;function B($,J,X){if(arguments.length<2)throw new c("actual","expected");y===void 0&&p(),b($,J)&&P({actual:$,expected:J,message:X,operator:"notDeepStrictEqual",stackStartFn:B})}m.strictEqual=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");S(J,X)||P({actual:J,expected:X,message:oe,operator:"strictEqual",stackStartFn:$})},m.notStrictEqual=function $(J,X,oe){if(arguments.length<2)throw new c("actual","expected");S(J,X)&&P({actual:J,expected:X,message:oe,operator:"notStrictEqual",stackStartFn:$})};var O=A(function $(J,X,oe){var ie=this;t(this,$),X.forEach(function(j){j in J&&(oe!==void 0&&typeof oe[j]=="string"&&_(J[j])&&E(J[j],oe[j])?ie[j]=oe[j]:ie[j]=J[j])})});function I($,J,X,oe,ie,j){if(!(X in $)||!b($[X],J[X])){if(!oe){var ee=new O($,ie),re=new O(J,ie,$),ce=new f({actual:ee,expected:re,operator:"deepStrictEqual",stackStartFn:j});throw ce.actual=$,ce.expected=J,ce.operator=j.name,ce}P({actual:$,expected:J,message:oe,operator:j.name,stackStartFn:j})}}function N($,J,X,oe){if(typeof J!="function"){if(_(J))return E(J,$);if(arguments.length===2)throw new i("expected",["Function","RegExp"],J);if(d($)!=="object"||$===null){var ie=new f({actual:$,expected:J,message:X,operator:"deepStrictEqual",stackStartFn:oe});throw ie.operator=oe.name,ie}var j=Object.keys(J);if(J instanceof Error)j.push("name","message");else if(j.length===0)throw new n("error",J,"may not be an empty object");return y===void 0&&p(),j.forEach(function(ee){typeof $[ee]=="string"&&_(J[ee])&&E(J[ee],$[ee])||I($,J,ee,X,j,oe)}),!0}return J.prototype!==void 0&&$ instanceof J?!0:Error.isPrototypeOf(J)?!1:J.call({},$)===!0}function U($){if(typeof $!="function")throw new i("fn","Function",$);try{$()}catch(J){return J}return h}function W($){return l($)||$!==null&&d($)==="object"&&typeof $.then=="function"&&typeof $.catch=="function"}function Q($){return Promise.resolve().then(function(){var J;if(typeof $=="function"){if(J=$(),!W(J))throw new s("instance of Promise","promiseFn",J)}else if(W($))J=$;else throw new i("promiseFn",["Function","Promise"],$);return Promise.resolve().then(function(){return J}).then(function(){return h}).catch(function(X){return X})})}function ue($,J,X,oe){if(typeof X=="string"){if(arguments.length===4)throw new i("error",["Object","Error","Function","RegExp"],X);if(d(J)==="object"&&J!==null){if(J.message===X)throw new a("error/message",'The error message "'.concat(J.message,'" is identical to the message.'))}else if(J===X)throw new a("error/message",'The error "'.concat(J,'" is identical to the message.'));oe=X,X=void 0}else if(X!=null&&d(X)!=="object"&&typeof X!="function")throw new i("error",["Object","Error","Function","RegExp"],X);if(J===h){var ie="";X&&X.name&&(ie+=" (".concat(X.name,")")),ie+=oe?": ".concat(oe):".";var j=$.name==="rejects"?"rejection":"exception";P({actual:void 0,expected:X,operator:$.name,message:"Missing expected ".concat(j).concat(ie),stackStartFn:$})}if(X&&!N(J,X,oe,$))throw J}function le($,J,X,oe){if(J!==h){if(typeof X=="string"&&(oe=X,X=void 0),!X||N(J,X)){var ie=oe?": ".concat(oe):".",j=$.name==="doesNotReject"?"rejection":"exception";P({actual:J,expected:X,operator:$.name,message:"Got unwanted ".concat(j).concat(ie,`
`)+'Actual message: "'.concat(J&&J.message,'"'),stackStartFn:$})}throw J}}m.throws=function $(J){for(var X=arguments.length,oe=new Array(X>1?X-1:0),ie=1;ie<X;ie++)oe[ie-1]=arguments[ie];ue.apply(void 0,[$,U(J)].concat(oe))},m.rejects=function $(J){for(var X=arguments.length,oe=new Array(X>1?X-1:0),ie=1;ie<X;ie++)oe[ie-1]=arguments[ie];return Q(J).then(function(j){return ue.apply(void 0,[$,j].concat(oe))})},m.doesNotThrow=function $(J){for(var X=arguments.length,oe=new Array(X>1?X-1:0),ie=1;ie<X;ie++)oe[ie-1]=arguments[ie];le.apply(void 0,[$,U(J)].concat(oe))},m.doesNotReject=function $(J){for(var X=arguments.length,oe=new Array(X>1?X-1:0),ie=1;ie<X;ie++)oe[ie-1]=arguments[ie];return Q(J).then(function(j){return le.apply(void 0,[$,j].concat(oe))})},m.ifError=function $(J){if(J!=null){var X="ifError got unwanted exception: ";d(J)==="object"&&typeof J.message=="string"?J.message.length===0&&J.constructor?X+=J.constructor.name:X+=J.message:X+=v(J);var oe=new f({actual:J,expected:null,operator:"ifError",message:X,stackStartFn:$}),ie=J.stack;if(typeof ie=="string"){var j=ie.split(`
`);j.shift();for(var ee=oe.stack.split(`
`),re=0;re<j.length;re++){var ce=ee.indexOf(j[re]);if(ce!==-1){ee=ee.slice(0,ce);break}}oe.stack="".concat(ee.join(`
`),`
`).concat(j.join(`
`))}throw oe}};function he($,J,X,oe,ie){if(!_(J))throw new i("regexp","RegExp",J);var j=ie==="match";if(typeof $!="string"||E(J,$)!==j){if(X instanceof Error)throw X;var ee=!X;X=X||(typeof $!="string"?'The "string" argument must be of type string. Received type '+"".concat(d($)," (").concat(v($),")"):(j?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(v(J),`. Input:
`).concat(v($),`
`));var re=new f({actual:$,expected:J,message:X,operator:ie,stackStartFn:oe});throw re.generatedMessage=ee,re}}m.match=function $(J,X,oe){he(J,X,oe,$,"match")},m.doesNotMatch=function $(J,X,oe){he(J,X,oe,$,"doesNotMatch")};function G(){for(var $=arguments.length,J=new Array($),X=0;X<$;X++)J[X]=arguments[X];z.apply(void 0,[G,J.length].concat(J))}m.strict=w(G,m,{equal:m.strictEqual,deepEqual:m.deepStrictEqual,notEqual:m.notStrictEqual,notDeepEqual:m.notDeepStrictEqual}),m.strict.strict=m.strict}}),rB=Ze({"node_modules/stream-parser/node_modules/ms/index.js"(Z,q){var d=1e3,x=d*60,A=x*60,M=A*24,e=M*365.25;q.exports=function(i,n){n=n||{};var s=typeof i;if(s==="string"&&i.length>0)return t(i);if(s==="number"&&isNaN(i)===!1)return n.long?o(i):r(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function t(i){if(i=String(i),!(i.length>100)){var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(i);if(n){var s=parseFloat(n[1]),c=(n[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*e;case"days":case"day":case"d":return s*M;case"hours":case"hour":case"hrs":case"hr":case"h":return s*A;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*d;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function r(i){return i>=M?Math.round(i/M)+"d":i>=A?Math.round(i/A)+"h":i>=x?Math.round(i/x)+"m":i>=d?Math.round(i/d)+"s":i+"ms"}function o(i){return a(i,M,"day")||a(i,A,"hour")||a(i,x,"minute")||a(i,d,"second")||i+" ms"}function a(i,n,s){if(!(i<n))return i<n*1.5?Math.floor(i/n)+" "+s:Math.ceil(i/n)+" "+s+"s"}}}),aB=Ze({"node_modules/stream-parser/node_modules/debug/src/debug.js"(Z,q){Z=q.exports=A.debug=A.default=A,Z.coerce=r,Z.disable=e,Z.enable=M,Z.enabled=t,Z.humanize=rB(),Z.names=[],Z.skips=[],Z.formatters={};var d;function x(o){var a=0,i;for(i in o)a=(a<<5)-a+o.charCodeAt(i),a|=0;return Z.colors[Math.abs(a)%Z.colors.length]}function A(o){function a(){if(a.enabled){var i=a,n=+new Date,s=n-(d||n);i.diff=s,i.prev=d,i.curr=n,d=n;for(var c=new Array(arguments.length),f=0;f<c.length;f++)c[f]=arguments[f];c[0]=Z.coerce(c[0]),typeof c[0]!="string"&&c.unshift("%O");var g=0;c[0]=c[0].replace(/%([a-zA-Z%])/g,function(T,l){if(T==="%%")return T;g++;var _=Z.formatters[l];if(typeof _=="function"){var w=c[g];T=_.call(i,w),c.splice(g,1),g--}return T}),Z.formatArgs.call(i,c);var v=a.log||Z.log||console.log.bind(console);v.apply(i,c)}}return a.namespace=o,a.enabled=Z.enabled(o),a.useColors=Z.useColors(),a.color=x(o),typeof Z.init=="function"&&Z.init(a),a}function M(o){Z.save(o),Z.names=[],Z.skips=[];for(var a=(typeof o=="string"?o:"").split(/[\s,]+/),i=a.length,n=0;n<i;n++)a[n]&&(o=a[n].replace(/\*/g,".*?"),o[0]==="-"?Z.skips.push(new RegExp("^"+o.substr(1)+"$")):Z.names.push(new RegExp("^"+o+"$")))}function e(){Z.enable("")}function t(o){var a,i;for(a=0,i=Z.skips.length;a<i;a++)if(Z.skips[a].test(o))return!1;for(a=0,i=Z.names.length;a<i;a++)if(Z.names[a].test(o))return!0;return!1}function r(o){return o instanceof Error?o.stack||o.message:o}}}),iB=Ze({"node_modules/stream-parser/node_modules/debug/src/browser.js"(Z,q){Z=q.exports=aB(),Z.log=A,Z.formatArgs=x,Z.save=M,Z.load=e,Z.useColors=d,Z.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:t(),Z.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function d(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Z.formatters.j=function(r){try{return JSON.stringify(r)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}};function x(r){var o=this.useColors;if(r[0]=(o?"%c":"")+this.namespace+(o?" %c":" ")+r[0]+(o?"%c ":" ")+"+"+Z.humanize(this.diff),!!o){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var i=0,n=0;r[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(i++,s==="%c"&&(n=i))}),r.splice(n,0,a)}}function A(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function M(r){try{r==null?Z.storage.removeItem("debug"):Z.storage.debug=r}catch{}}function e(){var r;try{r=Z.storage.debug}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}Z.enable(e());function t(){try{return window.localStorage}catch{}}}}),nB=Ze({"node_modules/stream-parser/index.js"(Z,q){var d=Y_(),x=iB()("stream-parser");q.exports=r;var A=-1,M=0,e=1,t=2;function r(l){var _=l&&typeof l._transform=="function",w=l&&typeof l._write=="function";if(!_&&!w)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),l._bytes=a,l._skipBytes=i,_&&(l._passthrough=n),_?l._transform=c:l._write=s}function o(l){x("initializing parser stream"),l._parserBytesLeft=0,l._parserBuffers=[],l._parserBuffered=0,l._parserState=A,l._parserCallback=null,typeof l.push=="function"&&(l._parserOutput=l.push.bind(l)),l._parserInit=!0}function a(l,_){d(!this._parserCallback,'there is already a "callback" set!'),d(isFinite(l)&&l>0,'can only buffer a finite number of bytes > 0, got "'+l+'"'),this._parserInit||o(this),x("buffering %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=M}function i(l,_){d(!this._parserCallback,'there is already a "callback" set!'),d(l>0,'can only skip > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("skipping %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=e}function n(l,_){d(!this._parserCallback,'There is already a "callback" set!'),d(l>0,'can only pass through > 0 bytes, got "'+l+'"'),this._parserInit||o(this),x("passing through %o bytes",l),this._parserBytesLeft=l,this._parserCallback=_,this._parserState=t}function s(l,_,w){this._parserInit||o(this),x("write(%o bytes)",l.length),typeof _=="function"&&(w=_),v(this,l,null,w)}function c(l,_,w){this._parserInit||o(this),x("transform(%o bytes)",l.length),typeof _!="function"&&(_=this._parserOutput),v(this,l,_,w)}function f(l,_,w,S){return l._parserBytesLeft<=0?S(new Error("got data but not currently parsing anything")):_.length<=l._parserBytesLeft?function(){return g(l,_,w,S)}:function(){var E=_.slice(0,l._parserBytesLeft);return g(l,E,w,function(y){if(y)return S(y);if(_.length>E.length)return function(){return f(l,_.slice(E.length),w,S)}})}}function g(l,_,w,S){if(l._parserBytesLeft-=_.length,x("%o bytes left for stream piece",l._parserBytesLeft),l._parserState===M?(l._parserBuffers.push(_),l._parserBuffered+=_.length):l._parserState===t&&w(_),l._parserBytesLeft===0){var E=l._parserCallback;if(E&&l._parserState===M&&l._parserBuffers.length>1&&(_=Buffer.concat(l._parserBuffers,l._parserBuffered)),l._parserState!==M&&(_=null),l._parserCallback=null,l._parserBuffered=0,l._parserState=A,l._parserBuffers.splice(0),E){var y=[];_&&y.push(_),w&&y.push(w);var b=E.length>y.length;b&&y.push(T(S));var p=E.apply(l,y);if(!b||S===p)return S}}else return S}var v=T(f);function T(l){return function(){for(var _=l.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),ac=Ze({"node_modules/probe-image-size/lib/common.js"(Z){"use strict";var q=WO().Transform,d=nB();function x(){q.call(this,{readableObjectMode:!0})}x.prototype=Object.create(q.prototype),x.prototype.constructor=x,d(x.prototype),Z.ParserStream=x,Z.sliceEq=function(M,e,t){for(var r=e,o=0;o<t.length;)if(M[r++]!==t[o++])return!1;return!0},Z.str2arr=function(M,e){var t=[],r=0;if(e&&e==="hex")for(;r<M.length;)t.push(parseInt(M.slice(r,r+2),16)),r+=2;else for(;r<M.length;r++)t.push(M.charCodeAt(r)&255);return t},Z.readUInt16LE=function(M,e){return M[e]|M[e+1]<<8},Z.readUInt16BE=function(M,e){return M[e+1]|M[e]<<8},Z.readUInt32LE=function(M,e){return M[e]|M[e+1]<<8|M[e+2]<<16|M[e+3]*16777216},Z.readUInt32BE=function(M,e){return M[e+3]|M[e+2]<<8|M[e+1]<<16|M[e]*16777216};function A(M,e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=M,e&&(this.code=e),t&&(this.statusCode=t)}A.prototype=Object.create(Error.prototype),A.prototype.constructor=A,Z.ProbeError=A}}),oB=Ze({"node_modules/probe-image-size/lib/miaf_utils.js"(Z,q){"use strict";var d=ac().readUInt16BE,x=ac().readUInt32BE;function A(n,s){if(n.length<4+s)return null;var c=x(n,s);return n.length<c+s||c<8?null:{boxtype:String.fromCharCode.apply(null,n.slice(s+4,s+8)),data:n.slice(s+8,s+c),end:s+c}}q.exports.unbox=A;function M(n,s){for(var c=0;;){var f=A(n,c);if(!f)break;switch(f.boxtype){case"ispe":s.sizes.push({width:x(f.data,4),height:x(f.data,8)});break;case"irot":s.transforms.push({type:"irot",value:f.data[0]&3});break;case"imir":s.transforms.push({type:"imir",value:f.data[0]&1});break}c=f.end}}function e(n,s,c){for(var f=0,g=0;g<c;g++)f=f*256+(n[s+g]||0);return f}function t(n,s){for(var c=n[4]>>4&15,f=n[4]&15,g=n[5]>>4&15,v=d(n,6),T=8,l=0;l<v;l++){var _=d(n,T);T+=2;var w=d(n,T);T+=2;var S=e(n,T,g);T+=g;var E=d(n,T);if(T+=2,w===0&&E===1){var y=e(n,T,c),b=e(n,T+c,f);s.item_loc[_]={length:b,offset:y+S}}T+=E*(c+f)}}function r(n,s){for(var c=d(n,4),f=6,g=0;g<c;g++){var v=A(n,f);if(!v)break;if(v.boxtype==="infe"){for(var T=d(v.data,4),l="",_=8;_<v.data.length&&v.data[_];_++)l+=String.fromCharCode(v.data[_]);s.item_inf[l]=T}f=v.end}}function o(n,s){for(var c=0;;){var f=A(n,c);if(!f)break;f.boxtype==="ipco"&&M(f.data,s),c=f.end}}function a(n,s){for(var c=4;;){var f=A(n,c);if(!f)break;f.boxtype==="iprp"&&o(f.data,s),f.boxtype==="iloc"&&t(f.data,s),f.boxtype==="iinf"&&r(f.data,s),c=f.end}}function i(n){var s=n.reduce(function(g,v){return g.width>v.width||g.width===v.width&&g.height>v.height?g:v}),c=n.reduce(function(g,v){return g.height>v.height||g.height===v.height&&g.width>v.width?g:v}),f;return s.width>c.height||s.width===c.height&&s.height>c.width?f=s:f=c,f}q.exports.readSizeFromMeta=function(n){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(a(n,s),!!s.sizes.length){var c=i(s.sizes),f=1;s.transforms.forEach(function(v){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},l={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?f=l[f]:(f=l[f],f=T[f],f=T[f])),v.type==="irot")for(var _=0;_<v.value;_++)f=T[f]});var g=null;return s.item_inf.Exif&&(g=s.item_loc[s.item_inf.Exif]),{width:c.width,height:c.height,orientation:s.transforms.length?f:null,variants:s.sizes,exif_location:g}}},q.exports.getMimeType=function(n){var s=String.fromCharCode.apply(null,n.slice(0,4)),c={};c[s]=!0;for(var f=8;f<n.length;f+=4)c[String.fromCharCode.apply(null,n.slice(f,f+4))]=!0;if(!(!c.mif1&&!c.msf1&&!c.miaf))return s==="avif"||s==="avis"||s==="avio"?{type:"avif",mime:"image/avif"}:s==="heic"||s==="heix"?{type:"heic",mime:"image/heic"}:s==="hevc"||s==="hevx"?{type:"heic",mime:"image/heic-sequence"}:c.avif||c.avis?{type:"avif",mime:"image/avif"}:c.heic||c.heix||c.hevc||c.hevx||c.heis?c.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}}}),y3=Ze({"node_modules/probe-image-size/lib/exif_utils.js"(Z,q){"use strict";function d(M,e){var t=new Error(M);return t.code=e,t}function x(M){try{return decodeURIComponent(escape(M))}catch{return M}}function A(M,e,t){this.input=M.subarray(e,t),this.start=e;var r=String.fromCharCode.apply(null,this.input.subarray(0,4));if(r!=="II*\0"&&r!=="MM\0*")throw d("invalid TIFF signature","EBADDATA");this.big_endian=r[0]==="M"}A.prototype.each=function(M){this.aborted=!1;var e=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:e}];this.ifds_to_read.length>0&&!this.aborted;){var t=this.ifds_to_read.shift();t.offset&&this.scan_ifd(t.id,t.offset,M)}},A.prototype.read_uint16=function(M){var e=this.input;if(M+2>e.length)throw d("unexpected EOF","EBADDATA");return this.big_endian?e[M]*256+e[M+1]:e[M]+e[M+1]*256},A.prototype.read_uint32=function(M){var e=this.input;if(M+4>e.length)throw d("unexpected EOF","EBADDATA");return this.big_endian?e[M]*16777216+e[M+1]*65536+e[M+2]*256+e[M+3]:e[M]+e[M+1]*256+e[M+2]*65536+e[M+3]*16777216},A.prototype.is_subifd_link=function(M,e){return M===0&&e===34665||M===0&&e===34853||M===34665&&e===40965},A.prototype.exif_format_length=function(M){switch(M){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}},A.prototype.exif_format_read=function(M,e){var t;switch(M){case 1:case 2:return t=this.input[e],t;case 6:return t=this.input[e],t|(t&128)*33554430;case 3:return t=this.read_uint16(e),t;case 8:return t=this.read_uint16(e),t|(t&32768)*131070;case 4:return t=this.read_uint32(e),t;case 9:return t=this.read_uint32(e),t|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},A.prototype.scan_ifd=function(M,e,t){var r=this.read_uint16(e);e+=2;for(var o=0;o<r;o++){var a=this.read_uint16(e),i=this.read_uint16(e+2),n=this.read_uint32(e+4),s=this.exif_format_length(i),c=n*s,f=c<=4?e+8:this.read_uint32(e+8),g=!1;if(f+c>this.input.length)throw d("unexpected EOF","EBADDATA");for(var v=[],T=f,l=0;l<n;l++,T+=s){var _=this.exif_format_read(i,T);if(_===null){v=null;break}v.push(_)}Array.isArray(v)&&i===2&&(v=x(String.fromCharCode.apply(null,v)),v&&v[v.length-1]==="\0"&&(v=v.slice(0,-1))),this.is_subifd_link(M,a)&&Array.isArray(v)&&Number.isInteger(v[0])&&v[0]>0&&(this.ifds_to_read.push({id:a,offset:v[0]}),g=!0);var w={is_big_endian:this.big_endian,ifd:M,tag:a,format:i,count:n,entry_offset:e+this.start,data_length:c,data_offset:f+this.start,value:v,is_subifd_link:g};if(t(w)===!1){this.aborted=!0;return}e+=12}M===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},q.exports.ExifParser=A,q.exports.get_orientation=function(M){var e=0;try{return new A(M,0,M.length).each(function(t){if(t.ifd===0&&t.tag===274&&Array.isArray(t.value))return e=t.value[0],!1}),e}catch{return-1}}}}),sB=Ze({"node_modules/probe-image-size/lib/parse_sync/avif.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt32BE,M=oB(),e=y3(),t=d("ftyp");q.exports=function(r){if(x(r,4,t)){var o=M.unbox(r,0);if(o){var a=M.getMimeType(o.data);if(a){for(var i,n=o.end;;){var s=M.unbox(r,n);if(!s)break;if(n=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){i=s.data;break}}if(i){var c=M.readSizeFromMeta(i);if(c){var f={width:c.width,height:c.height,type:a.type,mime:a.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(f.variants=c.variants),c.orientation&&(f.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=r.length){var g=A(r,c.exif_location.offset),v=r.slice(c.exif_location.offset+g+4,c.exif_location.offset+c.exif_location.length),T=e.get_orientation(v);T>0&&(f.orientation=T)}return f}}}}}}}}),lB=Ze({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt16LE,M=d("BM");q.exports=function(e){if(!(e.length<26)&&x(e,0,M))return{width:A(e,18),height:A(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),uB=Ze({"node_modules/probe-image-size/lib/parse_sync/gif.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt16LE,M=d("GIF87a"),e=d("GIF89a");q.exports=function(t){if(!(t.length<10)&&!(!x(t,0,M)&&!x(t,0,e)))return{width:A(t,6),height:A(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),cB=Ze({"node_modules/probe-image-size/lib/parse_sync/ico.js"(Z,q){"use strict";var d=ac().readUInt16LE,x=0,A=1,M=16;q.exports=function(e){var t=d(e,0),r=d(e,2),o=d(e,4);if(!(t!==x||r!==A||!o)){for(var a=[],i={width:0,height:0},n=0;n<o;n++){var s=e[6+M*n]||256,c=e[6+M*n+1]||256,f={width:s,height:c};a.push(f),(s>i.width||c>i.height)&&(i=f)}return{width:i.width,height:i.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),fB=Ze({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(Z,q){"use strict";var d=ac().readUInt16BE,x=ac().str2arr,A=ac().sliceEq,M=y3(),e=x("Exif\0\0");q.exports=function(t){if(!(t.length<2)&&!(t[0]!==255||t[1]!==216||t[2]!==255))for(var r=2;;){for(;;){if(t.length-r<2)return;if(t[r++]===255)break}for(var o=t[r++],a;o===255;)o=t[r++];if(208<=o&&o<=217||o===1)a=0;else if(192<=o&&o<=254){if(t.length-r<2)return;a=d(t,r)-2,r+=2}else return;if(o===217||o===218)return;var i;if(o===225&&a>=10&&A(t,r,e)&&(i=M.get_orientation(t.slice(r+6,r+a))),a>=5&&192<=o&&o<=207&&o!==196&&o!==200&&o!==204){if(t.length-r<a)return;var n={width:d(t,r+3),height:d(t,r+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return i>0&&(n.orientation=i),n}r+=a}}}}),hB=Ze({"node_modules/probe-image-size/lib/parse_sync/png.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt32BE,M=d(`\x89PNG\r

`),e=d("IHDR");q.exports=function(t){if(!(t.length<24)&&x(t,0,M)&&x(t,12,e))return{width:A(t,16),height:A(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),pB=Ze({"node_modules/probe-image-size/lib/parse_sync/psd.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt32BE,M=d("8BPS\0");q.exports=function(e){if(!(e.length<22)&&x(e,0,M))return{width:A(e,18),height:A(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),dB=Ze({"node_modules/probe-image-size/lib/parse_sync/svg.js"(Z,q){"use strict";function d(s){return s===32||s===9||s===13||s===10}function x(s){return typeof s=="number"&&isFinite(s)&&s>0}function A(s){var c=0,f=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c<f&&d(s[c]);)c++;return c===f?!1:s[c]===60}var M=/<[-_.:a-zA-Z0-9][^>]*>/,e=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,r=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,a=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function i(s){var c=s.match(t),f=s.match(r),g=s.match(o);return{width:c&&(c[1]||c[2]),height:f&&(f[1]||f[2]),viewbox:g&&(g[1]||g[2])}}function n(s){return a.test(s)?s.match(a)[0]:"px"}q.exports=function(s){if(A(s)){for(var c="",f=0;f<s.length;f++)c+=String.fromCharCode(s[f]);var g=(c.match(M)||[""])[0];if(e.test(g)){var v=i(g),T=parseFloat(v.width),l=parseFloat(v.height);if(v.width&&v.height)return!x(T)||!x(l)?void 0:{width:T,height:l,type:"svg",mime:"image/svg+xml",wUnits:n(v.width),hUnits:n(v.height)};var _=(v.viewbox||"").split(" "),w={width:_[2],height:_[3]},S=parseFloat(w.width),E=parseFloat(w.height);if(!(!x(S)||!x(E))&&n(w.width)===n(w.height)){var y=S/E;return v.width?x(T)?{width:T,height:T/y,type:"svg",mime:"image/svg+xml",wUnits:n(v.width),hUnits:n(v.width)}:void 0:v.height?x(l)?{width:l*y,height:l,type:"svg",mime:"image/svg+xml",wUnits:n(v.height),hUnits:n(v.height)}:void 0:{width:S,height:E,type:"svg",mime:"image/svg+xml",wUnits:n(w.width),hUnits:n(w.height)}}}}}}}),vB=Ze({"node_modules/probe-image-size/lib/parse_sync/tiff.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt16LE,M=ac().readUInt16BE,e=ac().readUInt32LE,t=ac().readUInt32BE,r=d("II*\0"),o=d("MM\0*");function a(s,c,f){return f?M(s,c):A(s,c)}function i(s,c,f){return f?t(s,c):e(s,c)}function n(s,c,f){var g=a(s,c+2,f),v=i(s,c+4,f);return v!==1||g!==3&&g!==4?null:g===3?a(s,c+8,f):i(s,c+8,f)}q.exports=function(s){if(!(s.length<8)&&!(!x(s,0,r)&&!x(s,0,o))){var c=s[0]===77,f=i(s,4,c)-8;if(!(f<0)){var g=f+8;if(!(s.length-g<2)){var v=a(s,g+0,c)*12;if(!(v<=0)&&(g+=2,!(s.length-g<v))){var T,l,_,w;for(T=0;T<v;T+=12)w=a(s,g+T,c),w===256?l=n(s,g+T,c):w===257&&(_=n(s,g+T,c));if(l&&_)return{width:l,height:_,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}}}),mB=Ze({"node_modules/probe-image-size/lib/parse_sync/webp.js"(Z,q){"use strict";var d=ac().str2arr,x=ac().sliceEq,A=ac().readUInt16LE,M=ac().readUInt32LE,e=y3(),t=d("RIFF"),r=d("WEBP");function o(n,s){if(!(n[s+3]!==157||n[s+4]!==1||n[s+5]!==42))return{width:A(n,s+6)&16383,height:A(n,s+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function a(n,s){if(n[s]===47){var c=M(n,s+1);return{width:(c&16383)+1,height:(c>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function i(n,s){return{width:(n[s+6]<<16|n[s+5]<<8|n[s+4])+1,height:(n[s+9]<<s|n[s+8]<<8|n[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}q.exports=function(n){if(!(n.length<16)&&!(!x(n,0,t)&&!x(n,8,r))){var s=12,c=null,f=0,g=M(n,4)+8;if(!(g>n.length)){for(;s+8<g;){if(n[s]===0){s++;continue}var v=String.fromCharCode.apply(null,n.slice(s,s+4)),T=M(n,s+4);v==="VP8 "&&T>=10?c=c||o(n,s+8):v==="VP8L"&&T>=9?c=c||a(n,s+8):v==="VP8X"&&T>=10?c=c||i(n,s+8):v==="EXIF"&&(f=e.get_orientation(n.slice(s+8,s+8+T)),s=1/0),s+=8+T}if(c)return f>0&&(c.orientation=f),c}}}}}),gB=Ze({"node_modules/probe-image-size/lib/parsers_sync.js"(Z,q){"use strict";q.exports={avif:sB(),bmp:lB(),gif:uB(),ico:cB(),jpeg:fB(),png:hB(),psd:pB(),svg:dB(),tiff:vB(),webp:mB()}}}),yB=Ze({"node_modules/probe-image-size/sync.js"(Z,q){"use strict";var d=gB();function x(A){for(var M=Object.keys(d),e=0;e<M.length;e++){var t=d[M[e]](A);if(t)return t}return null}q.exports=function(M){return x(M)},q.exports.parsers=d}}),_B=Ze({"src/traces/image/helpers.js"(Z){"use strict";var q=yB(),d=Zv().IMAGE_URL_PREFIX,x=tg().Buffer;Z.getImageSize=function(A){var M=A.replace(d,""),e=new x(M,"base64");return q(e)}}}),xB=Ze({"src/traces/image/calc.js"(Z,q){"use strict";var d=ca(),x=v1(),A=ns(),M=Wo(),e=ca().maxRowLength,t=_B().getImageSize;q.exports=function(n,s){var c,f;if(s._hasZ)c=s.z.length,f=e(s.z);else if(s._hasSource){var g=t(s.source);c=g.height,f=g.width}var v=M.getFromId(n,s.xaxis||"x"),T=M.getFromId(n,s.yaxis||"y"),l=v.d2c(s.x0)-s.dx/2,_=T.d2c(s.y0)-s.dy/2,w,S=[l,l+f*s.dx],E=[_,_+c*s.dy];if(v&&v.type==="log")for(w=0;w<f;w++)S.push(l+w*s.dx);if(T&&T.type==="log")for(w=0;w<c;w++)E.push(_+w*s.dy);s._extremes[v._id]=M.findExtremes(v,S),s._extremes[T._id]=M.findExtremes(T,E),s._scaler=a(s);var y={x0:l,y0:_,z:s.z,w:f,h:c};return[y]};function r(i,n,s,c){return function(f){return d.constrain((f-i)*n,s,c)}}function o(i,n){return function(s){return d.constrain(s,i,n)}}function a(i){var n=x.colormodel[i.colormodel],s=n.colormodel||i.colormodel,c=s.length;i._sArray=[];for(var f=0;f<c;f++)n.min[f]!==i.zmin[f]||n.max[f]!==i.zmax[f]?i._sArray.push(r(i.zmin[f],(n.max[f]-n.min[f])/(i.zmax[f]-i.zmin[f]),n.min[f],n.max[f])):i._sArray.push(o(n.min[f],n.max[f]));return function(g){for(var v=g.slice(0,c),T=0;T<c;T++){var l=v[T];if(!A(l))return!1;v[T]=i._sArray[T](l)}return v}}}}),bB=Ze({"src/traces/image/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=x.strTranslate,M=vd(),e=v1(),t=sS(),r=Q2().STYLE;q.exports=function(a,i,n,s){var c=i.xaxis,f=i.yaxis,g=!a._context._exportedPlot&&t();x.makeTraceGroups(s,n,"im").each(function(v){var T=d.select(this),l=v[0],_=l.trace,w=(_.zsmooth==="fast"||_.zsmooth===!1&&g)&&!_._hasZ&&_._hasSource&&c.type==="linear"&&f.type==="linear";_._realImage=w;var S=l.z,E=l.x0,y=l.y0,b=l.w,p=l.h,u=_.dx,m=_.dy,h,P,L,z,F,B;for(B=0;h===void 0&&B<b;)h=c.c2p(E+B*u),B++;for(B=b;P===void 0&&B>0;)P=c.c2p(E+B*u),B--;for(B=0;z===void 0&&B<p;)z=f.c2p(y+B*m),B++;for(B=p;F===void 0&&B>0;)F=f.c2p(y+B*m),B--;if(P<h&&(L=P,P=h,h=L),F<z&&(L=z,z=F,F=L),!w){var O=.5;h=Math.max(-O*c._length,h),P=Math.min((1+O)*c._length,P),z=Math.max(-O*f._length,z),F=Math.min((1+O)*f._length,F)}var I=Math.round(P-h),N=Math.round(F-z),U=I<=0||N<=0;if(U){var W=T.selectAll("image").data([]);W.exit().remove();return}function Q(j){var ee=document.createElement("canvas");ee.width=I,ee.height=N;var re=ee.getContext("2d",{willReadFrequently:!0}),ce=function(_e){return x.constrain(Math.round(c.c2p(E+_e*u)-h),0,I)},be=function(_e){return x.constrain(Math.round(f.c2p(y+_e*m)-z),0,N)},Ae=e.colormodel[_.colormodel],ze=Ae.colormodel||_.colormodel,Re=Ae.fmt,Xe;for(B=0;B<l.w;B++){var it=ce(B),ot=ce(B+1);if(!(ot===it||isNaN(ot)||isNaN(it)))for(var tt=0;tt<l.h;tt++){var lt=be(tt),Ee=be(tt+1);Ee===lt||isNaN(Ee)||isNaN(lt)||!j(B,tt)||(Xe=_._scaler(j(B,tt)),Xe?re.fillStyle=ze+"("+Re(Xe).join(",")+")":re.fillStyle="rgba(0,0,0,0)",re.fillRect(it,lt,ot-it,Ee-lt))}}return ee}var ue=T.selectAll("image").data([v]);ue.enter().append("svg:image").attr({xmlns:M.svg,preserveAspectRatio:"none"}),ue.exit().remove();var le=_.zsmooth===!1?r:"";if(w){var he=x.simpleMap(c.range,c.r2l),G=x.simpleMap(f.range,f.r2l),$=he[1]<he[0],J=G[1]>G[0];if($||J){var X=h+I/2,oe=z+N/2;le+="transform:"+A(X+"px",oe+"px")+"scale("+($?-1:1)+","+(J?-1:1)+")"+A(-X+"px",-oe+"px")+";"}}ue.attr("style",le);var ie=new Promise(function(j){if(_._hasZ)j();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===b&&_._canvas.el.height===p&&_._canvas.source===_.source)j();else{var ee=document.createElement("canvas");ee.width=b,ee.height=p;var re=ee.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var ce=_._image;ce.onload=function(){re.drawImage(ce,0,0),_._canvas={el:ee,source:_.source},j()},ce.setAttribute("src",_.source)}}).then(function(){var j,ee;if(_._hasZ)ee=Q(function(be,Ae){var ze=S[Ae][be];return x.isTypedArray(ze)&&(ze=Array.from(ze)),ze}),j=ee.toDataURL("image/png");else if(_._hasSource)if(w)j=_.source;else{var re=_._canvas.el.getContext("2d",{willReadFrequently:!0}),ce=re.getImageData(0,0,b,p).data;ee=Q(function(be,Ae){var ze=4*(Ae*b+be);return[ce[ze],ce[ze+1],ce[ze+2],ce[ze+3]]}),j=ee.toDataURL("image/png")}ue.attr({"xlink:href":j,height:N,width:I,x:h,y:z})});a._promises.push(ie)})}}}),wB=Ze({"src/traces/image/style.js"(Z,q){"use strict";var d=On();q.exports=function(A){d.select(A).selectAll(".im image").style("opacity",function(M){return M[0].trace.opacity})}}}),TB=Ze({"src/traces/image/hover.js"(Z,q){"use strict";var d=ef(),x=ca(),A=x.isArrayOrTypedArray,M=v1();q.exports=function(t,r,o){var a=t.cd[0],i=a.trace,n=t.xa,s=t.ya;if(!(d.inbox(r-a.x0,r-(a.x0+a.w*i.dx),0)>0||d.inbox(o-a.y0,o-(a.y0+a.h*i.dy),0)>0)){var c=Math.floor((r-a.x0)/i.dx),f=Math.floor(Math.abs(o-a.y0)/i.dy),g;if(i._hasZ?g=a.z[f][c]:i._hasSource&&(g=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,f,1,1).data),!!g){var v=a.hi||i.hoverinfo,T;if(v){var l=v.split("+");l.indexOf("all")!==-1&&(l=["color"]),l.indexOf("color")!==-1&&(T=!0)}var _=M.colormodel[i.colormodel],w=_.colormodel||i.colormodel,S=w.length,E=i._scaler(g),y=_.suffix,b=[];(i.hovertemplate||T)&&(b.push("["+[E[0]+y[0],E[1]+y[1],E[2]+y[2]].join(", ")),S===4&&b.push(", "+E[3]+y[3]),b.push("]"),b=b.join(""),t.extraText=w.toUpperCase()+": "+b);var p;A(i.hovertext)&&A(i.hovertext[f])?p=i.hovertext[f][c]:A(i.text)&&A(i.text[f])&&(p=i.text[f][c]);var u=s.c2p(a.y0+(f+.5)*i.dy),m=a.x0+(c+.5)*i.dx,h=a.y0+(f+.5)*i.dy,P="["+g.slice(0,i.colormodel.length).join(", ")+"]";return[x.extendFlat(t,{index:[f,c],x0:n.c2p(a.x0+c*i.dx),x1:n.c2p(a.x0+(c+1)*i.dx),y0:u,y1:u,color:E,xVal:m,xLabelVal:m,yVal:h,yLabelVal:h,zLabelVal:P,text:p,hovertemplateLabels:{zLabel:P,colorLabel:b,"color[0]Label":E[0]+y[0],"color[1]Label":E[1]+y[1],"color[2]Label":E[2]+y[2],"color[3]Label":E[3]+y[3]}})]}}}}}),AB=Ze({"src/traces/image/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return"xVal"in A&&(x.x=A.xVal),"yVal"in A&&(x.y=A.yVal),A.xa&&(x.xaxis=A.xa),A.ya&&(x.yaxis=A.ya),x.color=A.color,x.colormodel=A.trace.colormodel,x.z||(x.z=A.color),x}}}),SB=Ze({"src/traces/image/index.js"(Z,q){"use strict";q.exports={attributes:RS(),supplyDefaults:sO(),calc:xB(),plot:bB(),style:wB(),hoverPoints:TB(),eventData:AB(),moduleType:"trace",name:"image",basePlotModule:Zf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),MB=Ze({"lib/image.js"(Z,q){"use strict";q.exports=SB()}}),ng=Ze({"src/traces/pie/attributes.js"(Z,q){"use strict";var d=eu(),x=bc().attributes,A=tc(),M=oh(),e=Cs().hovertemplateAttrs,t=Cs().texttemplateAttrs,r=rs().extendFlat,o=Gh().pattern,a=A({editType:"plot",arrayOk:!0,colorEditType:"plot"});q.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:M.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:o,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:r({},d.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:e({},{keys:["label","color","value","percent","text"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:r({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:r({},a,{}),outsidetextfont:r({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:r({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({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"}}}}),og=Ze({"src/traces/pie/defaults.js"(Z,q){"use strict";var d=ns(),x=ca(),A=ng(),M=bc().defaults,e=gd().handleText,t=ca().coercePattern;function r(i,n){var s=x.isArrayOrTypedArray(i),c=x.isArrayOrTypedArray(n),f=Math.min(s?i.length:1/0,c?n.length:1/0);if(isFinite(f)||(f=0),f&&c){for(var g,v=0;v<f;v++){var T=n[v];if(d(T)&&T>0){g=!0;break}}g||(f=0)}return{hasLabels:s,hasValues:c,len:f}}function o(i,n,s,c,f){var g=c("marker.line.width");g&&c("marker.line.color",f?void 0:s.paper_bgcolor);var v=c("marker.colors");t(c,"marker.pattern",v),i.marker&&!n.marker.pattern.fgcolor&&(n.marker.pattern.fgcolor=i.marker.colors),n.marker.pattern.bgcolor||(n.marker.pattern.bgcolor=s.paper_bgcolor)}function a(i,n,s,c){function f(h,P){return x.coerce(i,n,A,h,P)}var g=f("labels"),v=f("values"),T=r(g,v),l=T.len;if(n._hasLabels=T.hasLabels,n._hasValues=T.hasValues,!n._hasLabels&&n._hasValues&&(f("label0"),f("dlabel")),!l){n.visible=!1;return}n._length=l,o(i,n,c,f,!0),f("scalegroup");var _=f("text"),w=f("texttemplate"),S;if(w||(S=f("textinfo",x.isArrayOrTypedArray(_)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),w||S&&S!=="none"){var E=f("textposition");e(i,n,c,f,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var y=Array.isArray(E)||E==="auto",b=y||E==="outside";b&&f("automargin"),(E==="inside"||E==="auto"||Array.isArray(E))&&f("insidetextorientation")}else S==="none"&&f("textposition","none");M(n,c,f);var p=f("hole"),u=f("title.text");if(u){var m=f("title.position",p?"middle center":"top center");!p&&m==="middle center"&&(n.title.position="top center"),x.coerceFont(f,"title.font",c.font)}f("sort"),f("direction"),f("rotation"),f("pull")}q.exports={handleLabelsAndValues:r,handleMarkerDefaults:o,supplyDefaults:a}}}),_3=Ze({"src/traces/pie/layout_attributes.js"(Z,q){"use strict";q.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),EB=Ze({"src/traces/pie/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=_3();q.exports=function(M,e){function t(r,o){return d.coerce(M,e,x,r,o)}t("hiddenlabels"),t("piecolorway",e.colorway),t("extendpiecolors")}}}),x1=Ze({"src/traces/pie/calc.js"(Z,q){"use strict";var d=ns(),x=Ch(),A=Yn(),M={};function e(a,i){var n=[],s=a._fullLayout,c=s.hiddenlabels||[],f=i.labels,g=i.marker.colors||[],v=i.values,T=i._length,l=i._hasValues&&T,_,w;if(i.dlabel)for(f=new Array(T),_=0;_<T;_++)f[_]=String(i.label0+_*i.dlabel);var S={},E=t(s["_"+i.type+"colormap"]),y=0,b=!1;for(_=0;_<T;_++){var p,u,m;if(l){if(p=v[_],!d(p))continue;p=+p}else p=1;u=f[_],(u===void 0||u==="")&&(u=_),u=String(u);var h=S[u];h===void 0?(S[u]=n.length,m=c.indexOf(u)!==-1,m||(y+=p),n.push({v:p,label:u,color:E(g[_],u),i:_,pts:[_],hidden:m})):(b=!0,w=n[h],w.v+=p,w.pts.push(_),w.hidden||(y+=p),w.color===!1&&g[_]&&(w.color=E(g[_],u)))}n=n.filter(function(L){return L.v>=0});var P=i.type==="funnelarea"?b:i.sort;return P&&n.sort(function(L,z){return z.v-L.v}),n[0]&&(n[0].vTotal=y),n}function t(a){return function(n,s){return!n||(n=x(n),!n.isValid())?!1:(n=A.addOpacity(n,n.getAlpha()),a[s]||(a[s]=n),n)}}function r(a,i){var n=(i||{}).type;n||(n="pie");var s=a._fullLayout,c=a.calcdata,f=s[n+"colorway"],g=s["_"+n+"colormap"];s["extend"+n+"colors"]&&(f=o(f,M));for(var v=0,T=0;T<c.length;T++){var l=c[T],_=l[0].trace.type;if(_===n)for(var w=0;w<l.length;w++){var S=l[w];S.color===!1&&(g[S.label]?S.color=g[S.label]:(g[S.label]=S.color=f[v%f.length],v++))}}}function o(a,i){var n,s=JSON.stringify(a),c=i[s];if(!c){for(c=a.slice(),n=0;n<a.length;n++)c.push(x(a[n]).lighten(20).toHexString());for(n=0;n<a.length;n++)c.push(x(a[n]).darken(20).toHexString());i[s]=c}return c}q.exports={calc:e,crossTraceCalc:r,makePullColorFn:t,generateExtendedColors:o}}}),CB=Ze({"src/traces/pie/event_data.js"(Z,q){"use strict";var d=Qp().appendArrayMultiPointValues;q.exports=function(A,M){var e={curveNumber:M.index,pointNumbers:A.pts,data:M._input,fullData:M,label:A.label,color:A.color,value:A.v,percent:A.percent,text:A.text,bbox:A.bbox,v:A.v};return A.pts.length===1&&(e.pointNumber=e.i=A.pts[0]),d(e,M,A.pts),M.type==="funnelarea"&&(delete e.v,delete e.i),e}}}),x3=Ze({"src/traces/pie/plot.js"(Z,q){"use strict";var d=On(),x=xc(),A=ef(),M=Yn(),e=as(),t=ca(),r=t.strScale,o=t.strTranslate,a=fu(),i=Ap(),n=i.recordMinTextSize,s=i.clearMinTextSize,c=Q0().TEXTPAD,f=e0(),g=CB(),v=ca().isValidTextValue;function T($,J){var X=$._context.staticPlot,oe=$._fullLayout,ie=oe._size;s("pie",oe),E(J,$),W(J,ie);var j=t.makeTraceGroups(oe._pielayer,J,"trace").each(function(ee){var re=d.select(this),ce=ee[0],be=ce.trace;ue(ee),re.attr("stroke-linejoin","round"),re.each(function(){var Ae=d.select(this).selectAll("g.slice").data(ee);Ae.enter().append("g").classed("slice",!0),Ae.exit().remove();var ze=[[[],[]],[[],[]]],Re=!1;Ae.each(function(fe,Fe){if(fe.hidden){d.select(this).selectAll("path,g").remove();return}fe.pointNumber=fe.i,fe.curveNumber=be.index,ze[fe.pxmid[1]<0?0:1][fe.pxmid[0]<0?0:1].push(fe);var rt=ce.cx,st=ce.cy,Qe=d.select(this),Lt=Qe.selectAll("path.surface").data([fe]);if(Lt.enter().append("path").classed("surface",!0).style({"pointer-events":X?"none":"all"}),Qe.call(_,$,ee),be.pull){var kt=+f.castOption(be.pull,fe.pts)||0;kt>0&&(rt+=kt*fe.pxmid[0],st+=kt*fe.pxmid[1])}fe.cxFinal=rt,fe.cyFinal=st;function Vt(bt,Be,Ke,Ue){var Me=Ue*(Be[0]-bt[0]),qe=Ue*(Be[1]-bt[1]);return"a"+Ue*ce.r+","+Ue*ce.r+" 0 "+fe.largeArc+(Ke?" 1 ":" 0 ")+Me+","+qe}var Zt=be.hole;if(fe.v===ce.vTotal){var Sr="M"+(rt+fe.px0[0])+","+(st+fe.px0[1])+Vt(fe.px0,fe.pxmid,!0,1)+Vt(fe.pxmid,fe.px0,!0,1)+"Z";Zt?Lt.attr("d","M"+(rt+Zt*fe.px0[0])+","+(st+Zt*fe.px0[1])+Vt(fe.px0,fe.pxmid,!1,Zt)+Vt(fe.pxmid,fe.px0,!1,Zt)+"Z"+Sr):Lt.attr("d",Sr)}else{var xr=Vt(fe.px0,fe.px1,!0,1);if(Zt){var jr=1-Zt;Lt.attr("d","M"+(rt+Zt*fe.px1[0])+","+(st+Zt*fe.px1[1])+Vt(fe.px1,fe.px0,!1,Zt)+"l"+jr*fe.px0[0]+","+jr*fe.px0[1]+xr+"Z")}else Lt.attr("d","M"+rt+","+st+"l"+fe.px0[0]+","+fe.px0[1]+xr+"Z")}he($,fe,ce);var wr=f.castOption(be.textposition,fe.pts),Ir=Qe.selectAll("g.slicetext").data(fe.text&&wr!=="none"?[0]:[]);Ir.enter().append("g").classed("slicetext",!0),Ir.exit().remove(),Ir.each(function(){var bt=t.ensureSingle(d.select(this),"text","",function(Pe){Pe.attr("data-notex",1)}),Be=t.ensureUniformFontSize($,wr==="outside"?w(be,fe,oe.font):S(be,fe,oe.font));bt.text(fe.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(e.font,Be).call(a.convertToTspans,$);var Ke=e.bBox(bt.node()),Ue;if(wr==="outside")Ue=z(Ke,fe);else if(Ue=y(Ke,fe,ce),wr==="auto"&&Ue.scale<1){var Me=t.ensureUniformFontSize($,be.outsidetextfont);bt.call(e.font,Me),Ke=e.bBox(bt.node()),Ue=z(Ke,fe)}var qe=Ue.textPosAngle,Ce=qe===void 0?fe.pxmid:le(ce.r,qe);if(Ue.targetX=rt+Ce[0]*Ue.rCenter+(Ue.x||0),Ue.targetY=st+Ce[1]*Ue.rCenter+(Ue.y||0),G(Ue,Ke),Ue.outside){var Te=Ue.targetY;fe.yLabelMin=Te-Ke.height/2,fe.yLabelMid=Te,fe.yLabelMax=Te+Ke.height/2,fe.labelExtraX=0,fe.labelExtraY=0,Re=!0}Ue.fontSize=Be.size,n(be.type,Ue,oe),ee[Fe].transform=Ue,t.setTransormAndDisplay(bt,Ue)})});var Xe=d.select(this).selectAll("g.titletext").data(be.title.text?[0]:[]);if(Xe.enter().append("g").classed("titletext",!0),Xe.exit().remove(),Xe.each(function(){var fe=t.ensureSingle(d.select(this),"text","",function(st){st.attr("data-notex",1)}),Fe=be.title.text;be._meta&&(Fe=t.templateString(Fe,be._meta)),fe.text(Fe).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(e.font,be.title.font).call(a.convertToTspans,$);var rt;be.title.position==="middle center"?rt=F(ce):rt=B(ce,ie),fe.attr("transform",o(rt.x,rt.y)+r(Math.min(1,rt.scale))+o(rt.tx,rt.ty))}),Re&&U(ze,be),l(Ae,be),Re&&be.automargin){var it=e.bBox(re.node()),ot=be.domain,tt=ie.w*(ot.x[1]-ot.x[0]),lt=ie.h*(ot.y[1]-ot.y[0]),Ee=(.5*tt-ce.r)/ie.w,_e=(.5*lt-ce.r)/ie.h;x.autoMargin($,"pie."+be.uid+".automargin",{xl:ot.x[0]-Ee,xr:ot.x[1]+Ee,yb:ot.y[0]-_e,yt:ot.y[1]+_e,l:Math.max(ce.cx-ce.r-it.left,0),r:Math.max(it.right-(ce.cx+ce.r),0),b:Math.max(it.bottom-(ce.cy+ce.r),0),t:Math.max(ce.cy-ce.r-it.top,0),pad:5})}})});setTimeout(function(){j.selectAll("tspan").each(function(){var ee=d.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function l($,J){$.each(function(X){var oe=d.select(this);if(!X.labelExtraX&&!X.labelExtraY){oe.select("path.textline").remove();return}var ie=oe.select("g.slicetext text");X.transform.targetX+=X.labelExtraX,X.transform.targetY+=X.labelExtraY,t.setTransormAndDisplay(ie,X.transform);var j=X.cxFinal+X.pxmid[0],ee=X.cyFinal+X.pxmid[1],re="M"+j+","+ee,ce=(X.yLabelMax-X.yLabelMin)*(X.pxmid[0]<0?-1:1)/4;if(X.labelExtraX){var be=X.labelExtraX*X.pxmid[1]/X.pxmid[0],Ae=X.yLabelMid+X.labelExtraY-(X.cyFinal+X.pxmid[1]);Math.abs(be)>Math.abs(Ae)?re+="l"+Ae*X.pxmid[0]/X.pxmid[1]+","+Ae+"H"+(j+X.labelExtraX+ce):re+="l"+X.labelExtraX+","+be+"v"+(Ae-be)+"h"+ce}else re+="V"+(X.yLabelMid+X.labelExtraY)+"h"+ce;t.ensureSingle(oe,"path","textline").call(M.stroke,J.outsidetextfont.color).attr({"stroke-width":Math.min(2,J.outsidetextfont.size/8),d:re,fill:"none"})})}function _($,J,X){var oe=X[0],ie=oe.cx,j=oe.cy,ee=oe.trace,re=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),$.on("mouseover",function(ce){var be=J._fullLayout,Ae=J._fullData[ee.index];if(!(J._dragging||be.hovermode===!1)){var ze=Ae.hoverinfo;if(Array.isArray(ze)&&(ze=A.castHoverinfo({hoverinfo:[f.castOption(ze,ce.pts)],_module:ee._module},be,0)),ze==="all"&&(ze="label+text+value+percent+name"),Ae.hovertemplate||ze!=="none"&&ze!=="skip"&&ze){var Re=ce.rInscribed||0,Xe=ie+ce.pxmid[0]*(1-Re),it=j+ce.pxmid[1]*(1-Re),ot=be.separators,tt=[];if(ze&&ze.indexOf("label")!==-1&&tt.push(ce.label),ce.text=f.castOption(Ae.hovertext||Ae.text,ce.pts),ze&&ze.indexOf("text")!==-1){var lt=ce.text;t.isValidTextValue(lt)&&tt.push(lt)}ce.value=ce.v,ce.valueLabel=f.formatPieValue(ce.v,ot),ze&&ze.indexOf("value")!==-1&&tt.push(ce.valueLabel),ce.percent=ce.v/oe.vTotal,ce.percentLabel=f.formatPiePercent(ce.percent,ot),ze&&ze.indexOf("percent")!==-1&&tt.push(ce.percentLabel);var Ee=Ae.hoverlabel,_e=Ee.font,fe=[];A.loneHover({trace:ee,x0:Xe-Re*oe.r,x1:Xe+Re*oe.r,y:it,_x0:re?ie+ce.TL[0]:Xe-Re*oe.r,_x1:re?ie+ce.TR[0]:Xe+Re*oe.r,_y0:re?j+ce.TL[1]:it-Re*oe.r,_y1:re?j+ce.BL[1]:it+Re*oe.r,text:tt.join("<br>"),name:Ae.hovertemplate||ze.indexOf("name")!==-1?Ae.name:void 0,idealAlign:ce.pxmid[0]<0?"left":"right",color:f.castOption(Ee.bgcolor,ce.pts)||ce.color,borderColor:f.castOption(Ee.bordercolor,ce.pts),fontFamily:f.castOption(_e.family,ce.pts),fontSize:f.castOption(_e.size,ce.pts),fontColor:f.castOption(_e.color,ce.pts),nameLength:f.castOption(Ee.namelength,ce.pts),textAlign:f.castOption(Ee.align,ce.pts),hovertemplate:f.castOption(Ae.hovertemplate,ce.pts),hovertemplateLabels:ce,eventData:[g(ce,Ae)]},{container:be._hoverlayer.node(),outerContainer:be._paper.node(),gd:J,inOut_bbox:fe}),ce.bbox=fe[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,J.emit("plotly_hover",{points:[g(ce,Ae)],event:d.event})}}),$.on("mouseout",function(ce){var be=J._fullLayout,Ae=J._fullData[ee.index],ze=d.select(this).datum();ee._hasHoverEvent&&(ce.originalEvent=d.event,J.emit("plotly_unhover",{points:[g(ze,Ae)],event:d.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(A.loneUnhover(be._hoverlayer.node()),ee._hasHoverLabel=!1)}),$.on("click",function(ce){var be=J._fullLayout,Ae=J._fullData[ee.index];J._dragging||be.hovermode===!1||(J._hoverdata=[g(ce,Ae)],A.click(J,d.event))})}function w($,J,X){var oe=f.castOption($.outsidetextfont.color,J.pts)||f.castOption($.textfont.color,J.pts)||X.color,ie=f.castOption($.outsidetextfont.family,J.pts)||f.castOption($.textfont.family,J.pts)||X.family,j=f.castOption($.outsidetextfont.size,J.pts)||f.castOption($.textfont.size,J.pts)||X.size,ee=f.castOption($.outsidetextfont.weight,J.pts)||f.castOption($.textfont.weight,J.pts)||X.weight,re=f.castOption($.outsidetextfont.style,J.pts)||f.castOption($.textfont.style,J.pts)||X.style,ce=f.castOption($.outsidetextfont.variant,J.pts)||f.castOption($.textfont.variant,J.pts)||X.variant,be=f.castOption($.outsidetextfont.textcase,J.pts)||f.castOption($.textfont.textcase,J.pts)||X.textcase,Ae=f.castOption($.outsidetextfont.lineposition,J.pts)||f.castOption($.textfont.lineposition,J.pts)||X.lineposition,ze=f.castOption($.outsidetextfont.shadow,J.pts)||f.castOption($.textfont.shadow,J.pts)||X.shadow;return{color:oe,family:ie,size:j,weight:ee,style:re,variant:ce,textcase:be,lineposition:Ae,shadow:ze}}function S($,J,X){var oe=f.castOption($.insidetextfont.color,J.pts);!oe&&$._input.textfont&&(oe=f.castOption($._input.textfont.color,J.pts));var ie=f.castOption($.insidetextfont.family,J.pts)||f.castOption($.textfont.family,J.pts)||X.family,j=f.castOption($.insidetextfont.size,J.pts)||f.castOption($.textfont.size,J.pts)||X.size,ee=f.castOption($.insidetextfont.weight,J.pts)||f.castOption($.textfont.weight,J.pts)||X.weight,re=f.castOption($.insidetextfont.style,J.pts)||f.castOption($.textfont.style,J.pts)||X.style,ce=f.castOption($.insidetextfont.variant,J.pts)||f.castOption($.textfont.variant,J.pts)||X.variant,be=f.castOption($.insidetextfont.textcase,J.pts)||f.castOption($.textfont.textcase,J.pts)||X.textcase,Ae=f.castOption($.insidetextfont.lineposition,J.pts)||f.castOption($.textfont.lineposition,J.pts)||X.lineposition,ze=f.castOption($.insidetextfont.shadow,J.pts)||f.castOption($.textfont.shadow,J.pts)||X.shadow;return{color:oe||M.contrast(J.color),family:ie,size:j,weight:ee,style:re,variant:ce,textcase:be,lineposition:Ae,shadow:ze}}function E($,J){for(var X,oe,ie=0;ie<$.length;ie++)if(X=$[ie][0],oe=X.trace,oe.title.text){var j=oe.title.text;oe._meta&&(j=t.templateString(j,oe._meta));var ee=e.tester.append("text").attr("data-notex",1).text(j).call(e.font,oe.title.font).call(a.convertToTspans,J),re=e.bBox(ee.node(),!0);X.titleBox={width:re.width,height:re.height},ee.remove()}}function y($,J,X){var oe=X.r||J.rpx1,ie=J.rInscribed,j=J.startangle===J.stopangle;if(j)return{rCenter:1-ie,scale:0,rotate:0,textPosAngle:0};var ee=J.ring,re=ee===1&&Math.abs(J.startangle-J.stopangle)===Math.PI*2,ce=J.halfangle,be=J.midangle,Ae=X.trace.insidetextorientation,ze=Ae==="horizontal",Re=Ae==="tangential",Xe=Ae==="radial",it=Ae==="auto",ot=[],tt;if(!it){var lt=function(Qe,Lt){if(b(J,Qe)){var kt=Math.abs(Qe-J.startangle),Vt=Math.abs(Qe-J.stopangle),Zt=kt<Vt?kt:Vt;Lt==="tan"?tt=u($,oe,ee,Zt,0):tt=p($,oe,ee,Zt,Math.PI/2),tt.textPosAngle=Qe,ot.push(tt)}},Ee;if(ze||Re){for(Ee=4;Ee>=-4;Ee-=2)lt(Math.PI*Ee,"tan");for(Ee=4;Ee>=-4;Ee-=2)lt(Math.PI*(Ee+1),"tan")}if(ze||Xe){for(Ee=4;Ee>=-4;Ee-=2)lt(Math.PI*(Ee+1.5),"rad");for(Ee=4;Ee>=-4;Ee-=2)lt(Math.PI*(Ee+.5),"rad")}}if(re||it||ze){var _e=Math.sqrt($.width*$.width+$.height*$.height);if(tt={scale:ie*oe*2/_e,rCenter:1-ie,rotate:0},tt.textPosAngle=(J.startangle+J.stopangle)/2,tt.scale>=1)return tt;ot.push(tt)}(it||Xe)&&(tt=p($,oe,ee,ce,be),tt.textPosAngle=(J.startangle+J.stopangle)/2,ot.push(tt)),(it||Re)&&(tt=u($,oe,ee,ce,be),tt.textPosAngle=(J.startangle+J.stopangle)/2,ot.push(tt));for(var fe=0,Fe=0,rt=0;rt<ot.length;rt++){var st=ot[rt].scale;if(Fe<st&&(Fe=st,fe=rt),!it&&Fe>=1)break}return ot[fe]}function b($,J){var X=$.startangle,oe=$.stopangle;return X>J&&J>oe||X<J&&J<oe}function p($,J,X,oe,ie){J=Math.max(0,J-2*c);var j=$.width/$.height,ee=P(j,oe,J,X);return{scale:ee*2/$.height,rCenter:m(j,ee/J),rotate:h(ie)}}function u($,J,X,oe,ie){J=Math.max(0,J-2*c);var j=$.height/$.width,ee=P(j,oe,J,X);return{scale:ee*2/$.width,rCenter:m(j,ee/J),rotate:h(ie+Math.PI/2)}}function m($,J){return Math.cos(J)-$*J}function h($){return(180/Math.PI*$+720)%180-90}function P($,J,X,oe){var ie=$+1/(2*Math.tan(J));return X*Math.min(1/(Math.sqrt(ie*ie+.5)+ie),oe/(Math.sqrt($*$+oe/2)+$))}function L($,J){return $.v===J.vTotal&&!J.trace.hole?1:Math.min(1/(1+1/Math.sin($.halfangle)),$.ring/2)}function z($,J){var X=J.pxmid[0],oe=J.pxmid[1],ie=$.width/2,j=$.height/2;return X<0&&(ie*=-1),oe<0&&(j*=-1),{scale:1,rCenter:1,rotate:0,x:ie+Math.abs(j)*(ie>0?1:-1)/2,y:j/(1+X*X/(oe*oe)),outside:!0}}function F($){var J=Math.sqrt($.titleBox.width*$.titleBox.width+$.titleBox.height*$.titleBox.height);return{x:$.cx,y:$.cy,scale:$.trace.hole*$.r*2/J,tx:0,ty:-$.titleBox.height/2+$.trace.title.font.size}}function B($,J){var X=1,oe=1,ie,j=$.trace,ee={x:$.cx,y:$.cy},re={tx:0,ty:0};re.ty+=j.title.font.size,ie=N(j),j.title.position.indexOf("top")!==-1?(ee.y-=(1+ie)*$.r,re.ty-=$.titleBox.height):j.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+ie)*$.r);var ce=O($.r,$.trace.aspectratio),be=J.w*(j.domain.x[1]-j.domain.x[0])/2;return j.title.position.indexOf("left")!==-1?(be=be+ce,ee.x-=(1+ie)*ce,re.tx+=$.titleBox.width/2):j.title.position.indexOf("center")!==-1?be*=2:j.title.position.indexOf("right")!==-1&&(be=be+ce,ee.x+=(1+ie)*ce,re.tx-=$.titleBox.width/2),X=be/$.titleBox.width,oe=I($,J)/$.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(X,oe),tx:re.tx,ty:re.ty}}function O($,J){return $/(J===void 0?1:J)}function I($,J){var X=$.trace,oe=J.h*(X.domain.y[1]-X.domain.y[0]);return Math.min($.titleBox.height,oe/2)}function N($){var J=$.pull;if(!J)return 0;var X;if(t.isArrayOrTypedArray(J))for(J=0,X=0;X<$.pull.length;X++)$.pull[X]>J&&(J=$.pull[X]);return J}function U($,J){var X,oe,ie,j,ee,re,ce,be,Ae,ze,Re,Xe,it;function ot(_e,fe){return _e.pxmid[1]-fe.pxmid[1]}function tt(_e,fe){return fe.pxmid[1]-_e.pxmid[1]}function lt(_e,fe){fe||(fe={});var Fe=fe.labelExtraY+(oe?fe.yLabelMax:fe.yLabelMin),rt=oe?_e.yLabelMin:_e.yLabelMax,st=oe?_e.yLabelMax:_e.yLabelMin,Qe=_e.cyFinal+ee(_e.px0[1],_e.px1[1]),Lt=Fe-rt,kt,Vt,Zt,Sr,xr,jr;if(Lt*ce>0&&(_e.labelExtraY=Lt),!!t.isArrayOrTypedArray(J.pull))for(Vt=0;Vt<ze.length;Vt++)Zt=ze[Vt],!(Zt===_e||(f.castOption(J.pull,_e.pts)||0)>=(f.castOption(J.pull,Zt.pts)||0))&&((_e.pxmid[1]-Zt.pxmid[1])*ce>0?(Sr=Zt.cyFinal+ee(Zt.px0[1],Zt.px1[1]),Lt=Sr-rt-_e.labelExtraY,Lt*ce>0&&(_e.labelExtraY+=Lt)):(st+_e.labelExtraY-Qe)*ce>0&&(kt=3*re*Math.abs(Vt-ze.indexOf(_e)),xr=Zt.cxFinal+j(Zt.px0[0],Zt.px1[0]),jr=xr+kt-(_e.cxFinal+_e.pxmid[0])-_e.labelExtraX,jr*re>0&&(_e.labelExtraX+=jr)))}for(oe=0;oe<2;oe++)for(ie=oe?ot:tt,ee=oe?Math.max:Math.min,ce=oe?1:-1,X=0;X<2;X++){for(j=X?Math.max:Math.min,re=X?1:-1,be=$[oe][X],be.sort(ie),Ae=$[1-oe][X],ze=Ae.concat(be),Xe=[],Re=0;Re<be.length;Re++)be[Re].yLabelMid!==void 0&&Xe.push(be[Re]);for(it=!1,Re=0;oe&&Re<Ae.length;Re++)if(Ae[Re].yLabelMid!==void 0){it=Ae[Re];break}for(Re=0;Re<Xe.length;Re++){var Ee=Re&&Xe[Re-1];it&&!Re&&(Ee=it),lt(Xe[Re],Ee)}}}function W($,J){for(var X=[],oe=0;oe<$.length;oe++){var ie=$[oe][0],j=ie.trace,ee=j.domain,re=J.w*(ee.x[1]-ee.x[0]),ce=J.h*(ee.y[1]-ee.y[0]);j.title.text&&j.title.position!=="middle center"&&(ce-=I(ie,J));var be=re/2,Ae=ce/2;j.type==="funnelarea"&&!j.scalegroup&&(Ae/=j.aspectratio),ie.r=Math.min(be,Ae)/(1+N(j)),ie.cx=J.l+J.w*(j.domain.x[1]+j.domain.x[0])/2,ie.cy=J.t+J.h*(1-j.domain.y[0])-ce/2,j.title.text&&j.title.position.indexOf("bottom")!==-1&&(ie.cy-=I(ie,J)),j.scalegroup&&X.indexOf(j.scalegroup)===-1&&X.push(j.scalegroup)}Q($,X)}function Q($,J){for(var X,oe,ie,j=0;j<J.length;j++){var ee=1/0,re=J[j];for(oe=0;oe<$.length;oe++)if(X=$[oe][0],ie=X.trace,ie.scalegroup===re){var ce;if(ie.type==="pie")ce=X.r*X.r;else if(ie.type==="funnelarea"){var be,Ae;ie.aspectratio>1?(be=X.r,Ae=be/ie.aspectratio):(Ae=X.r,be=Ae*ie.aspectratio),be*=(1+ie.baseratio)/2,ce=be*Ae}ee=Math.min(ee,ce/X.vTotal)}for(oe=0;oe<$.length;oe++)if(X=$[oe][0],ie=X.trace,ie.scalegroup===re){var ze=ee*X.vTotal;ie.type==="funnelarea"&&(ze/=(1+ie.baseratio)/2,ze/=ie.aspectratio),X.r=Math.sqrt(ze)}}}function ue($){var J=$[0],X=J.r,oe=J.trace,ie=f.getRotationAngle(oe.rotation),j=2*Math.PI/J.vTotal,ee="px0",re="px1",ce,be,Ae;if(oe.direction==="counterclockwise"){for(ce=0;ce<$.length&&$[ce].hidden;ce++);if(ce===$.length)return;ie+=j*$[ce].v,j*=-1,ee="px1",re="px0"}for(Ae=le(X,ie),ce=0;ce<$.length;ce++)be=$[ce],!be.hidden&&(be[ee]=Ae,be.startangle=ie,ie+=j*be.v/2,be.pxmid=le(X,ie),be.midangle=ie,ie+=j*be.v/2,Ae=le(X,ie),be.stopangle=ie,be[re]=Ae,be.largeArc=be.v>J.vTotal/2?1:0,be.halfangle=Math.PI*Math.min(be.v/J.vTotal,.5),be.ring=1-oe.hole,be.rInscribed=L(be,J))}function le($,J){return[$*Math.sin(J),-$*Math.cos(J)]}function he($,J,X){var oe=$._fullLayout,ie=X.trace,j=ie.texttemplate,ee=ie.textinfo;if(!j&&ee&&ee!=="none"){var re=ee.split("+"),ce=function(fe){return re.indexOf(fe)!==-1},be=ce("label"),Ae=ce("text"),ze=ce("value"),Re=ce("percent"),Xe=oe.separators,it;if(it=be?[J.label]:[],Ae){var ot=f.getFirstFilled(ie.text,J.pts);v(ot)&&it.push(ot)}ze&&it.push(f.formatPieValue(J.v,Xe)),Re&&it.push(f.formatPiePercent(J.v/X.vTotal,Xe)),J.text=it.join("<br>")}function tt(fe){return{label:fe.label,value:fe.v,valueLabel:f.formatPieValue(fe.v,oe.separators),percent:fe.v/X.vTotal,percentLabel:f.formatPiePercent(fe.v/X.vTotal,oe.separators),color:fe.color,text:fe.text,customdata:t.castOption(ie,fe.i,"customdata")}}if(j){var lt=t.castOption(ie,J.i,"texttemplate");if(!lt)J.text="";else{var Ee=tt(J),_e=f.getFirstFilled(ie.text,J.pts);(v(_e)||_e==="")&&(Ee.text=_e),J.text=t.texttemplateString(lt,Ee,$._fullLayout._d3locale,Ee,ie._meta||{})}}}function G($,J){var X=$.rotate*Math.PI/180,oe=Math.cos(X),ie=Math.sin(X),j=(J.left+J.right)/2,ee=(J.top+J.bottom)/2;$.textX=j*oe-ee*ie,$.textY=j*ie+ee*oe,$.noCenter=!0}q.exports={plot:T,formatSliceLabel:he,transformInsideText:y,determineInsideTextFont:S,positionTitleOutside:B,prerenderTitles:E,layoutAreas:W,attachFxHandlers:_,computeTransform:G}}}),kB=Ze({"src/traces/pie/style.js"(Z,q){"use strict";var d=On(),x=i1(),A=Ap().resizeText;q.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");A(e,t,"pie"),t.each(function(r){var o=r[0],a=o.trace,i=d.select(this);i.style({opacity:a.opacity}),i.selectAll("path.surface").each(function(n){d.select(this).call(x,n,a,e)})})}}}),LB=Ze({"src/traces/pie/base_plot.js"(Z){"use strict";var q=xc();Z.name="pie",Z.plot=function(d,x,A,M){q.plotBasePlot(Z.name,d,x,A,M)},Z.clean=function(d,x,A,M){q.cleanBasePlot(Z.name,d,x,A,M)}}}),PB=Ze({"src/traces/pie/index.js"(Z,q){"use strict";q.exports={attributes:ng(),supplyDefaults:og().supplyDefaults,supplyLayoutDefaults:EB(),layoutAttributes:_3(),calc:x1().calc,crossTraceCalc:x1().crossTraceCalc,plot:x3().plot,style:kB(),styleOne:i1(),moduleType:"trace",name:"pie",basePlotModule:LB(),categories:["pie-like","pie","showLegend"],meta:{}}}}),IB=Ze({"lib/pie.js"(Z,q){"use strict";q.exports=PB()}}),RB=Ze({"src/traces/sunburst/base_plot.js"(Z){"use strict";var q=xc();Z.name="sunburst",Z.plot=function(d,x,A,M){q.plotBasePlot(Z.name,d,x,A,M)},Z.clean=function(d,x,A,M){q.cleanBasePlot(Z.name,d,x,A,M)}}}),iM=Ze({"src/traces/sunburst/constants.js"(Z,q){"use strict";q.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),K_=Ze({"src/traces/sunburst/attributes.js"(Z,q){"use strict";var d=eu(),x=Cs().hovertemplateAttrs,A=Cs().texttemplateAttrs,M=Mu(),e=bc().attributes,t=ng(),r=iM(),o=rs().extendFlat,a=Gh().pattern;q.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:o({colors:{valType:"data_array",editType:"calc"},line:{color:o({},t.marker.line.color,{dflt:null}),width:o({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},M("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:A({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),hovertext:t.hovertext,hoverinfo:o({},d.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:r.eventDataKeys}),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:o({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),nM=Ze({"src/traces/sunburst/layout_attributes.js"(Z,q){"use strict";q.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),DB=Ze({"src/traces/sunburst/defaults.js"(Z,q){"use strict";var d=ca(),x=K_(),A=bc().defaults,M=gd().handleText,e=og().handleMarkerDefaults,t=rc(),r=t.hasColorscale,o=t.handleDefaults;q.exports=function(i,n,s,c){function f(S,E){return d.coerce(i,n,x,S,E)}var g=f("labels"),v=f("parents");if(!g||!g.length||!v||!v.length){n.visible=!1;return}var T=f("values");T&&T.length?f("branchvalues"):f("count"),f("level"),f("maxdepth"),e(i,n,c,f);var l=n._hasColorscale=r(i,"marker","colors")||(i.marker||{}).coloraxis;l&&o(i,n,c,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",l?1:.7);var _=f("text");f("texttemplate"),n.texttemplate||f("textinfo",d.isArrayOrTypedArray(_)?"text+label":"label"),f("hovertext"),f("hovertemplate");var w="auto";M(i,n,c,f,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("insidetextorientation"),f("sort"),f("rotation"),f("root.color"),A(n,c,f),n._length=null}}}),zB=Ze({"src/traces/sunburst/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=nM();q.exports=function(M,e){function t(r,o){return d.coerce(M,e,x,r,o)}t("sunburstcolorway",e.colorway),t("extendsunburstcolors")}}}),J_=Ze({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(Ue,Me){return Ue.parent===Me.parent?1:2}function A(Ue){return Ue.reduce(M,0)/Ue.length}function M(Ue,Me){return Ue+Me.x}function e(Ue){return 1+Ue.reduce(t,0)}function t(Ue,Me){return Math.max(Ue,Me.y)}function r(Ue){for(var Me;Me=Ue.children;)Ue=Me[0];return Ue}function o(Ue){for(var Me;Me=Ue.children;)Ue=Me[Me.length-1];return Ue}function a(){var Ue=x,Me=1,qe=1,Ce=!1;function Te(Pe){var at,yt=0;Pe.eachAfter(function(Qt){var Tr=Qt.children;Tr?(Qt.x=A(Tr),Qt.y=e(Tr)):(Qt.x=at?yt+=Ue(Qt,at):0,Qt.y=0,at=Qt)});var Tt=r(Pe),Ot=o(Pe),Gt=Tt.x-Ue(Tt,Ot)/2,rr=Ot.x+Ue(Ot,Tt)/2;return Pe.eachAfter(Ce?function(Qt){Qt.x=(Qt.x-Pe.x)*Me,Qt.y=(Pe.y-Qt.y)*qe}:function(Qt){Qt.x=(Qt.x-Gt)/(rr-Gt)*Me,Qt.y=(1-(Pe.y?Qt.y/Pe.y:1))*qe})}return Te.separation=function(Pe){return arguments.length?(Ue=Pe,Te):Ue},Te.size=function(Pe){return arguments.length?(Ce=!1,Me=+Pe[0],qe=+Pe[1],Te):Ce?null:[Me,qe]},Te.nodeSize=function(Pe){return arguments.length?(Ce=!0,Me=+Pe[0],qe=+Pe[1],Te):Ce?[Me,qe]:null},Te}function i(Ue){var Me=0,qe=Ue.children,Ce=qe&&qe.length;if(!Ce)Me=1;else for(;--Ce>=0;)Me+=qe[Ce].value;Ue.value=Me}function n(){return this.eachAfter(i)}function s(Ue){var Me=this,qe,Ce=[Me],Te,Pe,at;do for(qe=Ce.reverse(),Ce=[];Me=qe.pop();)if(Ue(Me),Te=Me.children,Te)for(Pe=0,at=Te.length;Pe<at;++Pe)Ce.push(Te[Pe]);while(Ce.length);return this}function c(Ue){for(var Me=this,qe=[Me],Ce,Te;Me=qe.pop();)if(Ue(Me),Ce=Me.children,Ce)for(Te=Ce.length-1;Te>=0;--Te)qe.push(Ce[Te]);return this}function f(Ue){for(var Me=this,qe=[Me],Ce=[],Te,Pe,at;Me=qe.pop();)if(Ce.push(Me),Te=Me.children,Te)for(Pe=0,at=Te.length;Pe<at;++Pe)qe.push(Te[Pe]);for(;Me=Ce.pop();)Ue(Me);return this}function g(Ue){return this.eachAfter(function(Me){for(var qe=+Ue(Me.data)||0,Ce=Me.children,Te=Ce&&Ce.length;--Te>=0;)qe+=Ce[Te].value;Me.value=qe})}function v(Ue){return this.eachBefore(function(Me){Me.children&&Me.children.sort(Ue)})}function T(Ue){for(var Me=this,qe=l(Me,Ue),Ce=[Me];Me!==qe;)Me=Me.parent,Ce.push(Me);for(var Te=Ce.length;Ue!==qe;)Ce.splice(Te,0,Ue),Ue=Ue.parent;return Ce}function l(Ue,Me){if(Ue===Me)return Ue;var qe=Ue.ancestors(),Ce=Me.ancestors(),Te=null;for(Ue=qe.pop(),Me=Ce.pop();Ue===Me;)Te=Ue,Ue=qe.pop(),Me=Ce.pop();return Te}function _(){for(var Ue=this,Me=[Ue];Ue=Ue.parent;)Me.push(Ue);return Me}function w(){var Ue=[];return this.each(function(Me){Ue.push(Me)}),Ue}function S(){var Ue=[];return this.eachBefore(function(Me){Me.children||Ue.push(Me)}),Ue}function E(){var Ue=this,Me=[];return Ue.each(function(qe){qe!==Ue&&Me.push({source:qe.parent,target:qe})}),Me}function y(Ue,Me){var qe=new h(Ue),Ce=+Ue.value&&(qe.value=Ue.value),Te,Pe=[qe],at,yt,Tt,Ot;for(Me==null&&(Me=p);Te=Pe.pop();)if(Ce&&(Te.value=+Te.data.value),(yt=Me(Te.data))&&(Ot=yt.length))for(Te.children=new Array(Ot),Tt=Ot-1;Tt>=0;--Tt)Pe.push(at=Te.children[Tt]=new h(yt[Tt])),at.parent=Te,at.depth=Te.depth+1;return qe.eachBefore(m)}function b(){return y(this).eachBefore(u)}function p(Ue){return Ue.children}function u(Ue){Ue.data=Ue.data.data}function m(Ue){var Me=0;do Ue.height=Me;while((Ue=Ue.parent)&&Ue.height<++Me)}function h(Ue){this.data=Ue,this.depth=this.height=0,this.parent=null}h.prototype=y.prototype={constructor:h,count:n,each:s,eachAfter:f,eachBefore:c,sum:g,sort:v,path:T,ancestors:_,descendants:w,leaves:S,links:E,copy:b};var P=Array.prototype.slice;function L(Ue){for(var Me=Ue.length,qe,Ce;Me;)Ce=Math.random()*Me--|0,qe=Ue[Me],Ue[Me]=Ue[Ce],Ue[Ce]=qe;return Ue}function z(Ue){for(var Me=0,qe=(Ue=L(P.call(Ue))).length,Ce=[],Te,Pe;Me<qe;)Te=Ue[Me],Pe&&O(Pe,Te)?++Me:(Pe=N(Ce=F(Ce,Te)),Me=0);return Pe}function F(Ue,Me){var qe,Ce;if(I(Me,Ue))return[Me];for(qe=0;qe<Ue.length;++qe)if(B(Me,Ue[qe])&&I(W(Ue[qe],Me),Ue))return[Ue[qe],Me];for(qe=0;qe<Ue.length-1;++qe)for(Ce=qe+1;Ce<Ue.length;++Ce)if(B(W(Ue[qe],Ue[Ce]),Me)&&B(W(Ue[qe],Me),Ue[Ce])&&B(W(Ue[Ce],Me),Ue[qe])&&I(Q(Ue[qe],Ue[Ce],Me),Ue))return[Ue[qe],Ue[Ce],Me];throw new Error}function B(Ue,Me){var qe=Ue.r-Me.r,Ce=Me.x-Ue.x,Te=Me.y-Ue.y;return qe<0||qe*qe<Ce*Ce+Te*Te}function O(Ue,Me){var qe=Ue.r-Me.r+1e-6,Ce=Me.x-Ue.x,Te=Me.y-Ue.y;return qe>0&&qe*qe>Ce*Ce+Te*Te}function I(Ue,Me){for(var qe=0;qe<Me.length;++qe)if(!O(Ue,Me[qe]))return!1;return!0}function N(Ue){switch(Ue.length){case 1:return U(Ue[0]);case 2:return W(Ue[0],Ue[1]);case 3:return Q(Ue[0],Ue[1],Ue[2])}}function U(Ue){return{x:Ue.x,y:Ue.y,r:Ue.r}}function W(Ue,Me){var qe=Ue.x,Ce=Ue.y,Te=Ue.r,Pe=Me.x,at=Me.y,yt=Me.r,Tt=Pe-qe,Ot=at-Ce,Gt=yt-Te,rr=Math.sqrt(Tt*Tt+Ot*Ot);return{x:(qe+Pe+Tt/rr*Gt)/2,y:(Ce+at+Ot/rr*Gt)/2,r:(rr+Te+yt)/2}}function Q(Ue,Me,qe){var Ce=Ue.x,Te=Ue.y,Pe=Ue.r,at=Me.x,yt=Me.y,Tt=Me.r,Ot=qe.x,Gt=qe.y,rr=qe.r,Qt=Ce-at,Tr=Ce-Ot,la=Te-yt,Ua=Te-Gt,Ba=Tt-Pe,Ra=rr-Pe,ei=Ce*Ce+Te*Te-Pe*Pe,za=ei-at*at-yt*yt+Tt*Tt,ti=ei-Ot*Ot-Gt*Gt+rr*rr,Ci=Tr*la-Qt*Ua,Jt=(la*ti-Ua*za)/(Ci*2)-Ce,Nt=(Ua*Ba-la*Ra)/Ci,Kt=(Tr*za-Qt*ti)/(Ci*2)-Te,Wt=(Qt*Ra-Tr*Ba)/Ci,Pr=Nt*Nt+Wt*Wt-1,ta=2*(Pe+Jt*Nt+Kt*Wt),ma=Jt*Jt+Kt*Kt-Pe*Pe,ra=-(Pr?(ta+Math.sqrt(ta*ta-4*Pr*ma))/(2*Pr):ma/ta);return{x:Ce+Jt+Nt*ra,y:Te+Kt+Wt*ra,r:ra}}function ue(Ue,Me,qe){var Ce=Ue.x-Me.x,Te,Pe,at=Ue.y-Me.y,yt,Tt,Ot=Ce*Ce+at*at;Ot?(Pe=Me.r+qe.r,Pe*=Pe,Tt=Ue.r+qe.r,Tt*=Tt,Pe>Tt?(Te=(Ot+Tt-Pe)/(2*Ot),yt=Math.sqrt(Math.max(0,Tt/Ot-Te*Te)),qe.x=Ue.x-Te*Ce-yt*at,qe.y=Ue.y-Te*at+yt*Ce):(Te=(Ot+Pe-Tt)/(2*Ot),yt=Math.sqrt(Math.max(0,Pe/Ot-Te*Te)),qe.x=Me.x+Te*Ce-yt*at,qe.y=Me.y+Te*at+yt*Ce)):(qe.x=Me.x+qe.r,qe.y=Me.y)}function le(Ue,Me){var qe=Ue.r+Me.r-1e-6,Ce=Me.x-Ue.x,Te=Me.y-Ue.y;return qe>0&&qe*qe>Ce*Ce+Te*Te}function he(Ue){var Me=Ue._,qe=Ue.next._,Ce=Me.r+qe.r,Te=(Me.x*qe.r+qe.x*Me.r)/Ce,Pe=(Me.y*qe.r+qe.y*Me.r)/Ce;return Te*Te+Pe*Pe}function G(Ue){this._=Ue,this.next=null,this.previous=null}function $(Ue){if(!(Te=Ue.length))return 0;var Me,qe,Ce,Te,Pe,at,yt,Tt,Ot,Gt,rr;if(Me=Ue[0],Me.x=0,Me.y=0,!(Te>1))return Me.r;if(qe=Ue[1],Me.x=-qe.r,qe.x=Me.r,qe.y=0,!(Te>2))return Me.r+qe.r;ue(qe,Me,Ce=Ue[2]),Me=new G(Me),qe=new G(qe),Ce=new G(Ce),Me.next=Ce.previous=qe,qe.next=Me.previous=Ce,Ce.next=qe.previous=Me;e:for(yt=3;yt<Te;++yt){ue(Me._,qe._,Ce=Ue[yt]),Ce=new G(Ce),Tt=qe.next,Ot=Me.previous,Gt=qe._.r,rr=Me._.r;do if(Gt<=rr){if(le(Tt._,Ce._)){qe=Tt,Me.next=qe,qe.previous=Me,--yt;continue e}Gt+=Tt._.r,Tt=Tt.next}else{if(le(Ot._,Ce._)){Me=Ot,Me.next=qe,qe.previous=Me,--yt;continue e}rr+=Ot._.r,Ot=Ot.previous}while(Tt!==Ot.next);for(Ce.previous=Me,Ce.next=qe,Me.next=qe.previous=qe=Ce,Pe=he(Me);(Ce=Ce.next)!==qe;)(at=he(Ce))<Pe&&(Me=Ce,Pe=at);qe=Me.next}for(Me=[qe._],Ce=qe;(Ce=Ce.next)!==qe;)Me.push(Ce._);for(Ce=z(Me),yt=0;yt<Te;++yt)Me=Ue[yt],Me.x-=Ce.x,Me.y-=Ce.y;return Ce.r}function J(Ue){return $(Ue),Ue}function X(Ue){return Ue==null?null:oe(Ue)}function oe(Ue){if(typeof Ue!="function")throw new Error;return Ue}function ie(){return 0}function j(Ue){return function(){return Ue}}function ee(Ue){return Math.sqrt(Ue.value)}function re(){var Ue=null,Me=1,qe=1,Ce=ie;function Te(Pe){return Pe.x=Me/2,Pe.y=qe/2,Ue?Pe.eachBefore(ce(Ue)).eachAfter(be(Ce,.5)).eachBefore(Ae(1)):Pe.eachBefore(ce(ee)).eachAfter(be(ie,1)).eachAfter(be(Ce,Pe.r/Math.min(Me,qe))).eachBefore(Ae(Math.min(Me,qe)/(2*Pe.r))),Pe}return Te.radius=function(Pe){return arguments.length?(Ue=X(Pe),Te):Ue},Te.size=function(Pe){return arguments.length?(Me=+Pe[0],qe=+Pe[1],Te):[Me,qe]},Te.padding=function(Pe){return arguments.length?(Ce=typeof Pe=="function"?Pe:j(+Pe),Te):Ce},Te}function ce(Ue){return function(Me){Me.children||(Me.r=Math.max(0,+Ue(Me)||0))}}function be(Ue,Me){return function(qe){if(Ce=qe.children){var Ce,Te,Pe=Ce.length,at=Ue(qe)*Me||0,yt;if(at)for(Te=0;Te<Pe;++Te)Ce[Te].r+=at;if(yt=$(Ce),at)for(Te=0;Te<Pe;++Te)Ce[Te].r-=at;qe.r=yt+at}}}function Ae(Ue){return function(Me){var qe=Me.parent;Me.r*=Ue,qe&&(Me.x=qe.x+Ue*Me.x,Me.y=qe.y+Ue*Me.y)}}function ze(Ue){Ue.x0=Math.round(Ue.x0),Ue.y0=Math.round(Ue.y0),Ue.x1=Math.round(Ue.x1),Ue.y1=Math.round(Ue.y1)}function Re(Ue,Me,qe,Ce,Te){for(var Pe=Ue.children,at,yt=-1,Tt=Pe.length,Ot=Ue.value&&(Ce-Me)/Ue.value;++yt<Tt;)at=Pe[yt],at.y0=qe,at.y1=Te,at.x0=Me,at.x1=Me+=at.value*Ot}function Xe(){var Ue=1,Me=1,qe=0,Ce=!1;function Te(at){var yt=at.height+1;return at.x0=at.y0=qe,at.x1=Ue,at.y1=Me/yt,at.eachBefore(Pe(Me,yt)),Ce&&at.eachBefore(ze),at}function Pe(at,yt){return function(Tt){Tt.children&&Re(Tt,Tt.x0,at*(Tt.depth+1)/yt,Tt.x1,at*(Tt.depth+2)/yt);var Ot=Tt.x0,Gt=Tt.y0,rr=Tt.x1-qe,Qt=Tt.y1-qe;rr<Ot&&(Ot=rr=(Ot+rr)/2),Qt<Gt&&(Gt=Qt=(Gt+Qt)/2),Tt.x0=Ot,Tt.y0=Gt,Tt.x1=rr,Tt.y1=Qt}}return Te.round=function(at){return arguments.length?(Ce=!!at,Te):Ce},Te.size=function(at){return arguments.length?(Ue=+at[0],Me=+at[1],Te):[Ue,Me]},Te.padding=function(at){return arguments.length?(qe=+at,Te):qe},Te}var it="$",ot={depth:-1},tt={};function lt(Ue){return Ue.id}function Ee(Ue){return Ue.parentId}function _e(){var Ue=lt,Me=Ee;function qe(Ce){var Te,Pe,at=Ce.length,yt,Tt,Ot,Gt=new Array(at),rr,Qt,Tr={};for(Pe=0;Pe<at;++Pe)Te=Ce[Pe],Ot=Gt[Pe]=new h(Te),(rr=Ue(Te,Pe,Ce))!=null&&(rr+="")&&(Qt=it+(Ot.id=rr),Tr[Qt]=Qt in Tr?tt:Ot);for(Pe=0;Pe<at;++Pe)if(Ot=Gt[Pe],rr=Me(Ce[Pe],Pe,Ce),rr==null||!(rr+="")){if(yt)throw new Error("multiple roots");yt=Ot}else{if(Tt=Tr[it+rr],!Tt)throw new Error("missing: "+rr);if(Tt===tt)throw new Error("ambiguous: "+rr);Tt.children?Tt.children.push(Ot):Tt.children=[Ot],Ot.parent=Tt}if(!yt)throw new Error("no root");if(yt.parent=ot,yt.eachBefore(function(la){la.depth=la.parent.depth+1,--at}).eachBefore(m),yt.parent=null,at>0)throw new Error("cycle");return yt}return qe.id=function(Ce){return arguments.length?(Ue=oe(Ce),qe):Ue},qe.parentId=function(Ce){return arguments.length?(Me=oe(Ce),qe):Me},qe}function fe(Ue,Me){return Ue.parent===Me.parent?1:2}function Fe(Ue){var Me=Ue.children;return Me?Me[0]:Ue.t}function rt(Ue){var Me=Ue.children;return Me?Me[Me.length-1]:Ue.t}function st(Ue,Me,qe){var Ce=qe/(Me.i-Ue.i);Me.c-=Ce,Me.s+=qe,Ue.c+=Ce,Me.z+=qe,Me.m+=qe}function Qe(Ue){for(var Me=0,qe=0,Ce=Ue.children,Te=Ce.length,Pe;--Te>=0;)Pe=Ce[Te],Pe.z+=Me,Pe.m+=Me,Me+=Pe.s+(qe+=Pe.c)}function Lt(Ue,Me,qe){return Ue.a.parent===Me.parent?Ue.a:qe}function kt(Ue,Me){this._=Ue,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=Me}kt.prototype=Object.create(h.prototype);function Vt(Ue){for(var Me=new kt(Ue,0),qe,Ce=[Me],Te,Pe,at,yt;qe=Ce.pop();)if(Pe=qe._.children)for(qe.children=new Array(yt=Pe.length),at=yt-1;at>=0;--at)Ce.push(Te=qe.children[at]=new kt(Pe[at],at)),Te.parent=qe;return(Me.parent=new kt(null,0)).children=[Me],Me}function Zt(){var Ue=fe,Me=1,qe=1,Ce=null;function Te(Ot){var Gt=Vt(Ot);if(Gt.eachAfter(Pe),Gt.parent.m=-Gt.z,Gt.eachBefore(at),Ce)Ot.eachBefore(Tt);else{var rr=Ot,Qt=Ot,Tr=Ot;Ot.eachBefore(function(ei){ei.x<rr.x&&(rr=ei),ei.x>Qt.x&&(Qt=ei),ei.depth>Tr.depth&&(Tr=ei)});var la=rr===Qt?1:Ue(rr,Qt)/2,Ua=la-rr.x,Ba=Me/(Qt.x+la+Ua),Ra=qe/(Tr.depth||1);Ot.eachBefore(function(ei){ei.x=(ei.x+Ua)*Ba,ei.y=ei.depth*Ra})}return Ot}function Pe(Ot){var Gt=Ot.children,rr=Ot.parent.children,Qt=Ot.i?rr[Ot.i-1]:null;if(Gt){Qe(Ot);var Tr=(Gt[0].z+Gt[Gt.length-1].z)/2;Qt?(Ot.z=Qt.z+Ue(Ot._,Qt._),Ot.m=Ot.z-Tr):Ot.z=Tr}else Qt&&(Ot.z=Qt.z+Ue(Ot._,Qt._));Ot.parent.A=yt(Ot,Qt,Ot.parent.A||rr[0])}function at(Ot){Ot._.x=Ot.z+Ot.parent.m,Ot.m+=Ot.parent.m}function yt(Ot,Gt,rr){if(Gt){for(var Qt=Ot,Tr=Ot,la=Gt,Ua=Qt.parent.children[0],Ba=Qt.m,Ra=Tr.m,ei=la.m,za=Ua.m,ti;la=rt(la),Qt=Fe(Qt),la&&Qt;)Ua=Fe(Ua),Tr=rt(Tr),Tr.a=Ot,ti=la.z+ei-Qt.z-Ba+Ue(la._,Qt._),ti>0&&(st(Lt(la,Ot,rr),Ot,ti),Ba+=ti,Ra+=ti),ei+=la.m,Ba+=Qt.m,za+=Ua.m,Ra+=Tr.m;la&&!rt(Tr)&&(Tr.t=la,Tr.m+=ei-Ra),Qt&&!Fe(Ua)&&(Ua.t=Qt,Ua.m+=Ba-za,rr=Ot)}return rr}function Tt(Ot){Ot.x*=Me,Ot.y=Ot.depth*qe}return Te.separation=function(Ot){return arguments.length?(Ue=Ot,Te):Ue},Te.size=function(Ot){return arguments.length?(Ce=!1,Me=+Ot[0],qe=+Ot[1],Te):Ce?null:[Me,qe]},Te.nodeSize=function(Ot){return arguments.length?(Ce=!0,Me=+Ot[0],qe=+Ot[1],Te):Ce?[Me,qe]:null},Te}function Sr(Ue,Me,qe,Ce,Te){for(var Pe=Ue.children,at,yt=-1,Tt=Pe.length,Ot=Ue.value&&(Te-qe)/Ue.value;++yt<Tt;)at=Pe[yt],at.x0=Me,at.x1=Ce,at.y0=qe,at.y1=qe+=at.value*Ot}var xr=(1+Math.sqrt(5))/2;function jr(Ue,Me,qe,Ce,Te,Pe){for(var at=[],yt=Me.children,Tt,Ot,Gt=0,rr=0,Qt=yt.length,Tr,la,Ua=Me.value,Ba,Ra,ei,za,ti,Ci,Jt;Gt<Qt;){Tr=Te-qe,la=Pe-Ce;do Ba=yt[rr++].value;while(!Ba&&rr<Qt);for(Ra=ei=Ba,Ci=Math.max(la/Tr,Tr/la)/(Ua*Ue),Jt=Ba*Ba*Ci,ti=Math.max(ei/Jt,Jt/Ra);rr<Qt;++rr){if(Ba+=Ot=yt[rr].value,Ot<Ra&&(Ra=Ot),Ot>ei&&(ei=Ot),Jt=Ba*Ba*Ci,za=Math.max(ei/Jt,Jt/Ra),za>ti){Ba-=Ot;break}ti=za}at.push(Tt={value:Ba,dice:Tr<la,children:yt.slice(Gt,rr)}),Tt.dice?Re(Tt,qe,Ce,Te,Ua?Ce+=la*Ba/Ua:Pe):Sr(Tt,qe,Ce,Ua?qe+=Tr*Ba/Ua:Te,Pe),Ua-=Ba,Gt=rr}return at}var wr=function Ue(Me){function qe(Ce,Te,Pe,at,yt){jr(Me,Ce,Te,Pe,at,yt)}return qe.ratio=function(Ce){return Ue((Ce=+Ce)>1?Ce:1)},qe}(xr);function Ir(){var Ue=wr,Me=!1,qe=1,Ce=1,Te=[0],Pe=ie,at=ie,yt=ie,Tt=ie,Ot=ie;function Gt(Qt){return Qt.x0=Qt.y0=0,Qt.x1=qe,Qt.y1=Ce,Qt.eachBefore(rr),Te=[0],Me&&Qt.eachBefore(ze),Qt}function rr(Qt){var Tr=Te[Qt.depth],la=Qt.x0+Tr,Ua=Qt.y0+Tr,Ba=Qt.x1-Tr,Ra=Qt.y1-Tr;Ba<la&&(la=Ba=(la+Ba)/2),Ra<Ua&&(Ua=Ra=(Ua+Ra)/2),Qt.x0=la,Qt.y0=Ua,Qt.x1=Ba,Qt.y1=Ra,Qt.children&&(Tr=Te[Qt.depth+1]=Pe(Qt)/2,la+=Ot(Qt)-Tr,Ua+=at(Qt)-Tr,Ba-=yt(Qt)-Tr,Ra-=Tt(Qt)-Tr,Ba<la&&(la=Ba=(la+Ba)/2),Ra<Ua&&(Ua=Ra=(Ua+Ra)/2),Ue(Qt,la,Ua,Ba,Ra))}return Gt.round=function(Qt){return arguments.length?(Me=!!Qt,Gt):Me},Gt.size=function(Qt){return arguments.length?(qe=+Qt[0],Ce=+Qt[1],Gt):[qe,Ce]},Gt.tile=function(Qt){return arguments.length?(Ue=oe(Qt),Gt):Ue},Gt.padding=function(Qt){return arguments.length?Gt.paddingInner(Qt).paddingOuter(Qt):Gt.paddingInner()},Gt.paddingInner=function(Qt){return arguments.length?(Pe=typeof Qt=="function"?Qt:j(+Qt),Gt):Pe},Gt.paddingOuter=function(Qt){return arguments.length?Gt.paddingTop(Qt).paddingRight(Qt).paddingBottom(Qt).paddingLeft(Qt):Gt.paddingTop()},Gt.paddingTop=function(Qt){return arguments.length?(at=typeof Qt=="function"?Qt:j(+Qt),Gt):at},Gt.paddingRight=function(Qt){return arguments.length?(yt=typeof Qt=="function"?Qt:j(+Qt),Gt):yt},Gt.paddingBottom=function(Qt){return arguments.length?(Tt=typeof Qt=="function"?Qt:j(+Qt),Gt):Tt},Gt.paddingLeft=function(Qt){return arguments.length?(Ot=typeof Qt=="function"?Qt:j(+Qt),Gt):Ot},Gt}function bt(Ue,Me,qe,Ce,Te){var Pe=Ue.children,at,yt=Pe.length,Tt,Ot=new Array(yt+1);for(Ot[0]=Tt=at=0;at<yt;++at)Ot[at+1]=Tt+=Pe[at].value;Gt(0,yt,Ue.value,Me,qe,Ce,Te);function Gt(rr,Qt,Tr,la,Ua,Ba,Ra){if(rr>=Qt-1){var ei=Pe[rr];ei.x0=la,ei.y0=Ua,ei.x1=Ba,ei.y1=Ra;return}for(var za=Ot[rr],ti=Tr/2+za,Ci=rr+1,Jt=Qt-1;Ci<Jt;){var Nt=Ci+Jt>>>1;Ot[Nt]<ti?Ci=Nt+1:Jt=Nt}ti-Ot[Ci-1]<Ot[Ci]-ti&&rr+1<Ci&&--Ci;var Kt=Ot[Ci]-za,Wt=Tr-Kt;if(Ba-la>Ra-Ua){var Pr=(la*Wt+Ba*Kt)/Tr;Gt(rr,Ci,Kt,la,Ua,Pr,Ra),Gt(Ci,Qt,Wt,Pr,Ua,Ba,Ra)}else{var ta=(Ua*Wt+Ra*Kt)/Tr;Gt(rr,Ci,Kt,la,Ua,Ba,ta),Gt(Ci,Qt,Wt,la,ta,Ba,Ra)}}}function Be(Ue,Me,qe,Ce,Te){(Ue.depth&1?Sr:Re)(Ue,Me,qe,Ce,Te)}var Ke=function Ue(Me){function qe(Ce,Te,Pe,at,yt){if((Tt=Ce._squarify)&&Tt.ratio===Me)for(var Tt,Ot,Gt,rr,Qt=-1,Tr,la=Tt.length,Ua=Ce.value;++Qt<la;){for(Ot=Tt[Qt],Gt=Ot.children,rr=Ot.value=0,Tr=Gt.length;rr<Tr;++rr)Ot.value+=Gt[rr].value;Ot.dice?Re(Ot,Te,Pe,at,Pe+=(yt-Pe)*Ot.value/Ua):Sr(Ot,Te,Pe,Te+=(at-Te)*Ot.value/Ua,yt),Ua-=Ot.value}else Ce._squarify=Tt=jr(Me,Ce,Te,Pe,at,yt),Tt.ratio=Me}return qe.ratio=function(Ce){return Ue((Ce=+Ce)>1?Ce:1)},qe}(xr);d.cluster=a,d.hierarchy=y,d.pack=re,d.packEnclose=z,d.packSiblings=J,d.partition=Xe,d.stratify=_e,d.tree=Zt,d.treemap=Ir,d.treemapBinary=bt,d.treemapDice=Re,d.treemapResquarify=Ke,d.treemapSlice=Sr,d.treemapSliceDice=Be,d.treemapSquarify=wr,Object.defineProperty(d,"__esModule",{value:!0})})}}),$_=Ze({"src/traces/sunburst/calc.js"(Z){"use strict";var q=J_(),d=ns(),x=ca(),A=rc().makeColorScaleFuncFromTrace,M=x1().makePullColorFn,e=x1().generateExtendedColors,t=rc().calc,r=qs().ALMOST_EQUAL,o={},a={},i={};Z.calc=function(s,c){var f=s._fullLayout,g=c.ids,v=x.isArrayOrTypedArray(g),T=c.labels,l=c.parents,_=c.values,w=x.isArrayOrTypedArray(_),S=[],E={},y={},b=function(J,X){E[J]?E[J].push(X):E[J]=[X],y[X]=1},p=function(J){return J||typeof J=="number"},u=function(J){return!w||d(_[J])&&_[J]>=0},m,h,P;v?(m=Math.min(g.length,l.length),h=function(J){return p(g[J])&&u(J)},P=function(J){return String(g[J])}):(m=Math.min(T.length,l.length),h=function(J){return p(T[J])&&u(J)},P=function(J){return String(T[J])}),w&&(m=Math.min(m,_.length));for(var L=0;L<m;L++)if(h(L)){var z=P(L),F=p(l[L])?String(l[L]):"",B={i:L,id:z,pid:F,label:p(T[L])?String(T[L]):""};w&&(B.v=+_[L]),S.push(B),b(F,z)}if(E[""]){if(E[""].length>1){for(var N=x.randstr(),U=0;U<S.length;U++)S[U].pid===""&&(S[U].pid=N);S.unshift({hasMultipleRoots:!0,id:N,pid:"",label:""})}}else{var O=[],I;for(I in E)y[I]||O.push(I);if(O.length===1)I=O[0],S.unshift({hasImpliedRoot:!0,id:I,pid:"",label:I});else return x.warn(["Multiple implied roots, cannot build",c.type,"hierarchy of",c.name+".","These roots include:",O.join(", ")].join(" "))}var W;try{W=q.stratify().id(function(J){return J.id}).parentId(function(J){return J.pid})(S)}catch(J){return x.warn(["Failed to build",c.type,"hierarchy of",c.name+".","Error:",J.message].join(" "))}var Q=q.hierarchy(W),ue=!1;if(w)switch(c.branchvalues){case"remainder":Q.sum(function(J){return J.data.v});break;case"total":Q.each(function(J){var X=J.data.data,oe=X.v;if(J.children){var ie=J.children.reduce(function(j,ee){return j+ee.data.data.v},0);if((X.hasImpliedRoot||X.hasMultipleRoots)&&(oe=ie),oe<ie*r)return ue=!0,x.warn(["Total value for node",J.data.data.id,"of",c.name,"is smaller than the sum of its children.",`
parent value =`,oe,`
children sum =`,ie].join(" "))}J.value=oe});break}else n(Q,c,{branches:c.count.indexOf("branches")!==-1,leaves:c.count.indexOf("leaves")!==-1});if(!ue){c.sort&&Q.sort(function(J,X){return X.value-J.value});var le,he,G=c.marker.colors||[],$=!!G.length;return c._hasColorscale?($||(G=w?c.values:c._values),t(s,c,{vals:G,containerStr:"marker",cLetter:"c"}),he=A(c.marker)):le=M(f["_"+c.type+"colormap"]),Q.each(function(J){var X=J.data.data;X.color=c._hasColorscale?he(G[X.i]):le(G[X.i],X.id)}),S[0].hierarchy=Q,S}},Z._runCrossTraceCalc=function(s,c){var f=c._fullLayout,g=c.calcdata,v=f[s+"colorway"],T=f["_"+s+"colormap"];f["extend"+s+"colors"]&&(v=e(v,s==="icicle"?i:s==="treemap"?a:o));var l=0,_;function w(b){var p=b.data.data,u=p.id;p.color===!1&&(T[u]?p.color=T[u]:b.parent?b.parent.parent?p.color=b.parent.data.data.color:(T[u]=p.color=v[l%v.length],l++):p.color=_)}for(var S=0;S<g.length;S++){var E=g[S],y=E[0];y.trace.type===s&&y.hierarchy&&(_=y.trace.root.color,y.hierarchy.each(w))}},Z.crossTraceCalc=function(s){return Z._runCrossTraceCalc("sunburst",s)};function n(s,c,f){var g=0,v=s.children;if(v){for(var T=v.length,l=0;l<T;l++)g+=n(v[l],c,f);f.branches&&g++}else f.leaves&&g++;return s.value=s.data.data.value=g,c._values||(c._values=[]),c._values[s.data.data.i]=g,g}}});function sg(Z,q,d){Z.prototype=q.prototype=d,d.constructor=Z}function b1(Z,q){var d=Object.create(Z.prototype);for(var x in q)d[x]=q[x];return d}var b3=wo({"node_modules/d3-color/src/define.js"(){}});function Kv(){}function oM(){return this.rgb().formatHex()}function FB(){return this.rgb().formatHex8()}function OB(){return hM(this).formatHsl()}function sM(){return this.rgb().formatRgb()}function w1(Z){var q,d;return Z=(Z+"").trim().toLowerCase(),(q=dM.exec(Z))?(d=q[1].length,q=parseInt(q[1],16),d===6?lM(q):d===3?new Xh(q>>8&15|q>>4&240,q>>4&15|q&240,(q&15)<<4|q&15,1):d===8?Q_(q>>24&255,q>>16&255,q>>8&255,(q&255)/255):d===4?Q_(q>>12&15|q>>8&240,q>>8&15|q>>4&240,q>>4&15|q&240,((q&15)<<4|q&15)/255):null):(q=vM.exec(Z))?new Xh(q[1],q[2],q[3],1):(q=mM.exec(Z))?new Xh(q[1]*255/100,q[2]*255/100,q[3]*255/100,1):(q=gM.exec(Z))?Q_(q[1],q[2],q[3],q[4]):(q=yM.exec(Z))?Q_(q[1]*255/100,q[2]*255/100,q[3]*255/100,q[4]):(q=_M.exec(Z))?fM(q[1],q[2]/100,q[3]/100,1):(q=xM.exec(Z))?fM(q[1],q[2]/100,q[3]/100,q[4]):S3.hasOwnProperty(Z)?lM(S3[Z]):Z==="transparent"?new Xh(NaN,NaN,NaN,0):null}function lM(Z){return new Xh(Z>>16&255,Z>>8&255,Z&255,1)}function Q_(Z,q,d,x){return x<=0&&(Z=q=d=NaN),new Xh(Z,q,d,x)}function w3(Z){return Z instanceof Kv||(Z=w1(Z)),Z?(Z=Z.rgb(),new Xh(Z.r,Z.g,Z.b,Z.opacity)):new Xh}function ex(Z,q,d,x){return arguments.length===1?w3(Z):new Xh(Z,q,d,x??1)}function Xh(Z,q,d,x){this.r=+Z,this.g=+q,this.b=+d,this.opacity=+x}function uM(){return`#${o0(this.r)}${o0(this.g)}${o0(this.b)}`}function BB(){return`#${o0(this.r)}${o0(this.g)}${o0(this.b)}${o0((isNaN(this.opacity)?1:this.opacity)*255)}`}function cM(){let Z=tx(this.opacity);return`${Z===1?"rgb(":"rgba("}${n0(this.r)}, ${n0(this.g)}, ${n0(this.b)}${Z===1?")":`, ${Z})`}`}function tx(Z){return isNaN(Z)?1:Math.max(0,Math.min(1,Z))}function n0(Z){return Math.max(0,Math.min(255,Math.round(Z)||0))}function o0(Z){return Z=n0(Z),(Z<16?"0":"")+Z.toString(16)}function fM(Z,q,d,x){return x<=0?Z=q=d=NaN:d<=0||d>=1?Z=q=NaN:q<=0&&(Z=NaN),new Ud(Z,q,d,x)}function hM(Z){if(Z instanceof Ud)return new Ud(Z.h,Z.s,Z.l,Z.opacity);if(Z instanceof Kv||(Z=w1(Z)),!Z)return new Ud;if(Z instanceof Ud)return Z;Z=Z.rgb();var q=Z.r/255,d=Z.g/255,x=Z.b/255,A=Math.min(q,d,x),M=Math.max(q,d,x),e=NaN,t=M-A,r=(M+A)/2;return t?(q===M?e=(d-x)/t+(d<x)*6:d===M?e=(x-q)/t+2:e=(q-d)/t+4,t/=r<.5?M+A:2-M-A,e*=60):t=r>0&&r<1?0:e,new Ud(e,t,r,Z.opacity)}function T3(Z,q,d,x){return arguments.length===1?hM(Z):new Ud(Z,q,d,x??1)}function Ud(Z,q,d,x){this.h=+Z,this.s=+q,this.l=+d,this.opacity=+x}function pM(Z){return Z=(Z||0)%360,Z<0?Z+360:Z}function rx(Z){return Math.max(0,Math.min(1,Z||0))}function A3(Z,q,d){return(Z<60?q+(d-q)*Z/60:Z<180?d:Z<240?q+(d-q)*(240-Z)/60:q)*255}var Jv,s0,l0,lg,jd,dM,vM,mM,gM,yM,_M,xM,S3,M3=wo({"node_modules/d3-color/src/color.js"(){b3(),Jv=.7,s0=1/Jv,l0="\\s*([+-]?\\d+)\\s*",lg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dM=/^#([0-9a-f]{3,8})$/,vM=new RegExp(`^rgb\\(${l0},${l0},${l0}\\)$`),mM=new RegExp(`^rgb\\(${jd},${jd},${jd}\\)$`),gM=new RegExp(`^rgba\\(${l0},${l0},${l0},${lg}\\)$`),yM=new RegExp(`^rgba\\(${jd},${jd},${jd},${lg}\\)$`),_M=new RegExp(`^hsl\\(${lg},${jd},${jd}\\)$`),xM=new RegExp(`^hsla\\(${lg},${jd},${jd},${lg}\\)$`),S3={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},sg(Kv,w1,{copy(Z){return Object.assign(new this.constructor,this,Z)},displayable(){return this.rgb().displayable()},hex:oM,formatHex:oM,formatHex8:FB,formatHsl:OB,formatRgb:sM,toString:sM}),sg(Xh,ex,b1(Kv,{brighter(Z){return Z=Z==null?s0:Math.pow(s0,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},darker(Z){return Z=Z==null?Jv:Math.pow(Jv,Z),new Xh(this.r*Z,this.g*Z,this.b*Z,this.opacity)},rgb(){return this},clamp(){return new Xh(n0(this.r),n0(this.g),n0(this.b),tx(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:uM,formatHex:uM,formatHex8:BB,formatRgb:cM,toString:cM})),sg(Ud,T3,b1(Kv,{brighter(Z){return Z=Z==null?s0:Math.pow(s0,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},darker(Z){return Z=Z==null?Jv:Math.pow(Jv,Z),new Ud(this.h,this.s,this.l*Z,this.opacity)},rgb(){var Z=this.h%360+(this.h<0)*360,q=isNaN(Z)||isNaN(this.s)?0:this.s,d=this.l,x=d+(d<.5?d:1-d)*q,A=2*d-x;return new Xh(A3(Z>=240?Z-240:Z+120,A,x),A3(Z,A,x),A3(Z<120?Z+240:Z-120,A,x),this.opacity)},clamp(){return new Ud(pM(this.h),rx(this.s),rx(this.l),tx(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 Z=tx(this.opacity);return`${Z===1?"hsl(":"hsla("}${pM(this.h)}, ${rx(this.s)*100}%, ${rx(this.l)*100}%${Z===1?")":`, ${Z})`}`}}))}}),E3,C3,bM=wo({"node_modules/d3-color/src/math.js"(){E3=Math.PI/180,C3=180/Math.PI}});function wM(Z){if(Z instanceof rv)return new rv(Z.l,Z.a,Z.b,Z.opacity);if(Z instanceof Mv)return TM(Z);Z instanceof Xh||(Z=w3(Z));var q=R3(Z.r),d=R3(Z.g),x=R3(Z.b),A=L3((.2225045*q+.7168786*d+.0606169*x)/F3),M,e;return q===d&&d===x?M=e=A:(M=L3((.4360747*q+.3850649*d+.1430804*x)/z3),e=L3((.0139322*q+.0971045*d+.7141733*x)/O3)),new rv(116*A-16,500*(M-A),200*(A-e),Z.opacity)}function k3(Z,q,d,x){return arguments.length===1?wM(Z):new rv(Z,q,d,x??1)}function rv(Z,q,d,x){this.l=+Z,this.a=+q,this.b=+d,this.opacity=+x}function L3(Z){return Z>AM?Math.pow(Z,.3333333333333333):Z/N3+B3}function P3(Z){return Z>u0?Z*Z*Z:N3*(Z-B3)}function I3(Z){return 255*(Z<=.0031308?12.92*Z:1.055*Math.pow(Z,.4166666666666667)-.055)}function R3(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function NB(Z){if(Z instanceof Mv)return new Mv(Z.h,Z.c,Z.l,Z.opacity);if(Z instanceof rv||(Z=wM(Z)),Z.a===0&&Z.b===0)return new Mv(NaN,0<Z.l&&Z.l<100?0:NaN,Z.l,Z.opacity);var q=Math.atan2(Z.b,Z.a)*C3;return new Mv(q<0?q+360:q,Math.sqrt(Z.a*Z.a+Z.b*Z.b),Z.l,Z.opacity)}function D3(Z,q,d,x){return arguments.length===1?NB(Z):new Mv(Z,q,d,x??1)}function Mv(Z,q,d,x){this.h=+Z,this.c=+q,this.l=+d,this.opacity=+x}function TM(Z){if(isNaN(Z.h))return new rv(Z.l,0,0,Z.opacity);var q=Z.h*E3;return new rv(Z.l,Math.cos(q)*Z.c,Math.sin(q)*Z.c,Z.opacity)}var T1,z3,F3,O3,B3,u0,N3,AM,UB=wo({"node_modules/d3-color/src/lab.js"(){b3(),M3(),bM(),T1=18,z3=.96422,F3=1,O3=.82521,B3=4/29,u0=6/29,N3=3*u0*u0,AM=u0*u0*u0,sg(rv,k3,b1(Kv,{brighter(Z){return new rv(this.l+T1*(Z??1),this.a,this.b,this.opacity)},darker(Z){return new rv(this.l-T1*(Z??1),this.a,this.b,this.opacity)},rgb(){var Z=(this.l+16)/116,q=isNaN(this.a)?Z:Z+this.a/500,d=isNaN(this.b)?Z:Z-this.b/200;return q=z3*P3(q),Z=F3*P3(Z),d=O3*P3(d),new Xh(I3(3.1338561*q-1.6168667*Z-.4906146*d),I3(-.9787684*q+1.9161415*Z+.033454*d),I3(.0719453*q-.2289914*Z+1.4052427*d),this.opacity)}})),sg(Mv,D3,b1(Kv,{brighter(Z){return new Mv(this.h,this.c,this.l+T1*(Z??1),this.opacity)},darker(Z){return new Mv(this.h,this.c,this.l-T1*(Z??1),this.opacity)},rgb(){return TM(this).rgb()}}))}});function jB(Z){if(Z instanceof c0)return new c0(Z.h,Z.s,Z.l,Z.opacity);Z instanceof Xh||(Z=w3(Z));var q=Z.r/255,d=Z.g/255,x=Z.b/255,A=(G3*x+q3*q-V3*d)/(G3+q3-V3),M=x-A,e=(ug*(d-A)-ix*M)/A1,t=Math.sqrt(e*e+M*M)/(ug*A*(1-A)),r=t?Math.atan2(e,M)*C3-120:NaN;return new c0(r<0?r+360:r,t,A,Z.opacity)}function U3(Z,q,d,x){return arguments.length===1?jB(Z):new c0(Z,q,d,x??1)}function c0(Z,q,d,x){this.h=+Z,this.s=+q,this.l=+d,this.opacity=+x}var j3,ax,ix,A1,ug,q3,V3,G3,qB=wo({"node_modules/d3-color/src/cubehelix.js"(){b3(),M3(),bM(),j3=-.14861,ax=1.78277,ix=-.29227,A1=-.90649,ug=1.97294,q3=ug*A1,V3=ug*ax,G3=ax*ix-A1*j3,sg(c0,U3,b1(Kv,{brighter(Z){return Z=Z==null?s0:Math.pow(s0,Z),new c0(this.h,this.s,this.l*Z,this.opacity)},darker(Z){return Z=Z==null?Jv:Math.pow(Jv,Z),new c0(this.h,this.s,this.l*Z,this.opacity)},rgb(){var Z=isNaN(this.h)?0:(this.h+120)*E3,q=+this.l,d=isNaN(this.s)?0:this.s*q*(1-q),x=Math.cos(Z),A=Math.sin(Z);return new Xh(255*(q+d*(j3*x+ax*A)),255*(q+d*(ix*x+A1*A)),255*(q+d*(ug*x)),this.opacity)}}))}}),cg=wo({"node_modules/d3-color/src/index.js"(){M3(),UB(),qB()}});function SM(Z,q,d,x,A){var M=Z*Z,e=M*Z;return((1-3*Z+3*M-e)*q+(4-6*M+3*e)*d+(1+3*Z+3*M-3*e)*x+e*A)/6}function MM(Z){var q=Z.length-1;return function(d){var x=d<=0?d=0:d>=1?(d=1,q-1):Math.floor(d*q),A=Z[x],M=Z[x+1],e=x>0?Z[x-1]:2*A-M,t=x<q-1?Z[x+2]:2*M-A;return SM((d-x/q)*q,e,A,M,t)}}var H3=wo({"node_modules/d3-interpolate/src/basis.js"(){}});function EM(Z){var q=Z.length;return function(d){var x=Math.floor(((d%=1)<0?++d:d)*q),A=Z[(x+q-1)%q],M=Z[x%q],e=Z[(x+1)%q],t=Z[(x+2)%q];return SM((d-x/q)*q,A,M,e,t)}}var CM=wo({"node_modules/d3-interpolate/src/basisClosed.js"(){H3()}}),S1,kM=wo({"node_modules/d3-interpolate/src/constant.js"(){S1=Z=>()=>Z}});function LM(Z,q){return function(d){return Z+d*q}}function VB(Z,q,d){return Z=Math.pow(Z,d),q=Math.pow(q,d)-Z,d=1/d,function(x){return Math.pow(Z+x*q,d)}}function nx(Z,q){var d=q-Z;return d?LM(Z,d>180||d<-180?d-360*Math.round(d/360):d):S1(isNaN(Z)?q:Z)}function GB(Z){return(Z=+Z)==1?Zh:function(q,d){return d-q?VB(q,d,Z):S1(isNaN(q)?d:q)}}function Zh(Z,q){var d=q-Z;return d?LM(Z,d):S1(isNaN(Z)?q:Z)}var fg=wo({"node_modules/d3-interpolate/src/color.js"(){kM()}});function PM(Z){return function(q){var d=q.length,x=new Array(d),A=new Array(d),M=new Array(d),e,t;for(e=0;e<d;++e)t=ex(q[e]),x[e]=t.r||0,A[e]=t.g||0,M[e]=t.b||0;return x=Z(x),A=Z(A),M=Z(M),t.opacity=1,function(r){return t.r=x(r),t.g=A(r),t.b=M(r),t+""}}}var ox,IM,RM,DM=wo({"node_modules/d3-interpolate/src/rgb.js"(){cg(),H3(),CM(),fg(),ox=function Z(q){var d=GB(q);function x(A,M){var e=d((A=ex(A)).r,(M=ex(M)).r),t=d(A.g,M.g),r=d(A.b,M.b),o=Zh(A.opacity,M.opacity);return function(a){return A.r=e(a),A.g=t(a),A.b=r(a),A.opacity=o(a),A+""}}return x.gamma=Z,x}(1),IM=PM(MM),RM=PM(EM)}});function W3(Z,q){q||(q=[]);var d=Z?Math.min(q.length,Z.length):0,x=q.slice(),A;return function(M){for(A=0;A<d;++A)x[A]=Z[A]*(1-M)+q[A]*M;return x}}function zM(Z){return ArrayBuffer.isView(Z)&&!(Z instanceof DataView)}var X3=wo({"node_modules/d3-interpolate/src/numberArray.js"(){}});function HB(Z,q){return(zM(q)?W3:FM)(Z,q)}function FM(Z,q){var d=q?q.length:0,x=Z?Math.min(d,Z.length):0,A=new Array(x),M=new Array(d),e;for(e=0;e<x;++e)A[e]=cx(Z[e],q[e]);for(;e<d;++e)M[e]=q[e];return function(t){for(e=0;e<x;++e)M[e]=A[e](t);return M}}var OM=wo({"node_modules/d3-interpolate/src/array.js"(){fx(),X3()}});function BM(Z,q){var d=new Date;return Z=+Z,q=+q,function(x){return d.setTime(Z*(1-x)+q*x),d}}var NM=wo({"node_modules/d3-interpolate/src/date.js"(){}});function av(Z,q){return Z=+Z,q=+q,function(d){return Z*(1-d)+q*d}}var sx=wo({"node_modules/d3-interpolate/src/number.js"(){}});function UM(Z,q){var d={},x={},A;(Z===null||typeof Z!="object")&&(Z={}),(q===null||typeof q!="object")&&(q={});for(A in q)A in Z?d[A]=cx(Z[A],q[A]):x[A]=q[A];return function(M){for(A in d)x[A]=d[A](M);return x}}var jM=wo({"node_modules/d3-interpolate/src/object.js"(){fx()}});function WB(Z){return function(){return Z}}function XB(Z){return function(q){return Z(q)+""}}function qM(Z,q){var d=lx.lastIndex=ux.lastIndex=0,x,A,M,e=-1,t=[],r=[];for(Z=Z+"",q=q+"";(x=lx.exec(Z))&&(A=ux.exec(q));)(M=A.index)>d&&(M=q.slice(d,M),t[e]?t[e]+=M:t[++e]=M),(x=x[0])===(A=A[0])?t[e]?t[e]+=A:t[++e]=A:(t[++e]=null,r.push({i:e,x:av(x,A)})),d=ux.lastIndex;return d<q.length&&(M=q.slice(d),t[e]?t[e]+=M:t[++e]=M),t.length<2?r[0]?XB(r[0].x):WB(q):(q=r.length,function(o){for(var a=0,i;a<q;++a)t[(i=r[a]).i]=i.x(o);return t.join("")})}var lx,ux,VM=wo({"node_modules/d3-interpolate/src/string.js"(){sx(),lx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ux=new RegExp(lx.source,"g")}});function cx(Z,q){var d=typeof q,x;return q==null||d==="boolean"?S1(q):(d==="number"?av:d==="string"?(x=w1(q))?(q=x,ox):qM:q instanceof w1?ox:q instanceof Date?BM:zM(q)?W3:Array.isArray(q)?FM:typeof q.valueOf!="function"&&typeof q.toString!="function"||isNaN(q)?UM:av)(Z,q)}var fx=wo({"node_modules/d3-interpolate/src/value.js"(){cg(),DM(),OM(),NM(),sx(),jM(),VM(),kM(),X3()}});function ZB(Z){var q=Z.length;return function(d){return Z[Math.max(0,Math.min(q-1,Math.floor(d*q)))]}}var YB=wo({"node_modules/d3-interpolate/src/discrete.js"(){}});function KB(Z,q){var d=nx(+Z,+q);return function(x){var A=d(x);return A-360*Math.floor(A/360)}}var JB=wo({"node_modules/d3-interpolate/src/hue.js"(){fg()}});function $B(Z,q){return Z=+Z,q=+q,function(d){return Math.round(Z*(1-d)+q*d)}}var QB=wo({"node_modules/d3-interpolate/src/round.js"(){}});function GM(Z,q,d,x,A,M){var e,t,r;return(e=Math.sqrt(Z*Z+q*q))&&(Z/=e,q/=e),(r=Z*d+q*x)&&(d-=Z*r,x-=q*r),(t=Math.sqrt(d*d+x*x))&&(d/=t,x/=t,r/=t),Z*x<q*d&&(Z=-Z,q=-q,r=-r,e=-e),{translateX:A,translateY:M,rotate:Math.atan2(q,Z)*Z3,skewX:Math.atan(r)*Z3,scaleX:e,scaleY:t}}var Z3,hx,eN=wo({"node_modules/d3-interpolate/src/transform/decompose.js"(){Z3=180/Math.PI,hx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}});function tN(Z){let q=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(Z+"");return q.isIdentity?hx:GM(q.a,q.b,q.c,q.d,q.e,q.f)}function rN(Z){return Z==null||(px||(px=document.createElementNS("http://www.w3.org/2000/svg","g")),px.setAttribute("transform",Z),!(Z=px.transform.baseVal.consolidate()))?hx:(Z=Z.matrix,GM(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f))}var px,aN=wo({"node_modules/d3-interpolate/src/transform/parse.js"(){eN()}});function HM(Z,q,d,x){function A(o){return o.length?o.pop()+" ":""}function M(o,a,i,n,s,c){if(o!==i||a!==n){var f=s.push("translate(",null,q,null,d);c.push({i:f-4,x:av(o,i)},{i:f-2,x:av(a,n)})}else(i||n)&&s.push("translate("+i+q+n+d)}function e(o,a,i,n){o!==a?(o-a>180?a+=360:a-o>180&&(o+=360),n.push({i:i.push(A(i)+"rotate(",null,x)-2,x:av(o,a)})):a&&i.push(A(i)+"rotate("+a+x)}function t(o,a,i,n){o!==a?n.push({i:i.push(A(i)+"skewX(",null,x)-2,x:av(o,a)}):a&&i.push(A(i)+"skewX("+a+x)}function r(o,a,i,n,s,c){if(o!==i||a!==n){var f=s.push(A(s)+"scale(",null,",",null,")");c.push({i:f-4,x:av(o,i)},{i:f-2,x:av(a,n)})}else(i!==1||n!==1)&&s.push(A(s)+"scale("+i+","+n+")")}return function(o,a){var i=[],n=[];return o=Z(o),a=Z(a),M(o.translateX,o.translateY,a.translateX,a.translateY,i,n),e(o.rotate,a.rotate,i,n),t(o.skewX,a.skewX,i,n),r(o.scaleX,o.scaleY,a.scaleX,a.scaleY,i,n),o=a=null,function(s){for(var c=-1,f=n.length,g;++c<f;)i[(g=n[c]).i]=g.x(s);return i.join("")}}}var WM,XM,iN=wo({"node_modules/d3-interpolate/src/transform/index.js"(){sx(),aN(),WM=HM(tN,"px, ","px)","deg)"),XM=HM(rN,", ",")",")")}});function ZM(Z){return((Z=Math.exp(Z))+1/Z)/2}function nN(Z){return((Z=Math.exp(Z))-1/Z)/2}function oN(Z){return((Z=Math.exp(2*Z))-1)/(Z+1)}var YM,KM,sN=wo({"node_modules/d3-interpolate/src/zoom.js"(){YM=1e-12,KM=function Z(q,d,x){function A(M,e){var t=M[0],r=M[1],o=M[2],a=e[0],i=e[1],n=e[2],s=a-t,c=i-r,f=s*s+c*c,g,v;if(f<YM)v=Math.log(n/o)/q,g=function(E){return[t+E*s,r+E*c,o*Math.exp(q*E*v)]};else{var T=Math.sqrt(f),l=(n*n-o*o+x*f)/(2*o*d*T),_=(n*n-o*o-x*f)/(2*n*d*T),w=Math.log(Math.sqrt(l*l+1)-l),S=Math.log(Math.sqrt(_*_+1)-_);v=(S-w)/q,g=function(E){var y=E*v,b=ZM(w),p=o/(d*T)*(b*oN(q*y+w)-nN(w));return[t+p*s,r+p*c,o*b/ZM(q*y+w)]}}return g.duration=v*1e3*q/Math.SQRT2,g}return A.rho=function(M){var e=Math.max(.001,+M),t=e*e,r=t*t;return Z(e,t,r)},A}(Math.SQRT2,2,4)}});function JM(Z){return function(q,d){var x=Z((q=T3(q)).h,(d=T3(d)).h),A=Zh(q.s,d.s),M=Zh(q.l,d.l),e=Zh(q.opacity,d.opacity);return function(t){return q.h=x(t),q.s=A(t),q.l=M(t),q.opacity=e(t),q+""}}}var $M,QM,lN=wo({"node_modules/d3-interpolate/src/hsl.js"(){cg(),fg(),$M=JM(nx),QM=JM(Zh)}});function uN(Z,q){var d=Zh((Z=k3(Z)).l,(q=k3(q)).l),x=Zh(Z.a,q.a),A=Zh(Z.b,q.b),M=Zh(Z.opacity,q.opacity);return function(e){return Z.l=d(e),Z.a=x(e),Z.b=A(e),Z.opacity=M(e),Z+""}}var cN=wo({"node_modules/d3-interpolate/src/lab.js"(){cg(),fg()}});function eE(Z){return function(q,d){var x=Z((q=D3(q)).h,(d=D3(d)).h),A=Zh(q.c,d.c),M=Zh(q.l,d.l),e=Zh(q.opacity,d.opacity);return function(t){return q.h=x(t),q.c=A(t),q.l=M(t),q.opacity=e(t),q+""}}}var tE,rE,fN=wo({"node_modules/d3-interpolate/src/hcl.js"(){cg(),fg(),tE=eE(nx),rE=eE(Zh)}});function aE(Z){return function q(d){d=+d;function x(A,M){var e=Z((A=U3(A)).h,(M=U3(M)).h),t=Zh(A.s,M.s),r=Zh(A.l,M.l),o=Zh(A.opacity,M.opacity);return function(a){return A.h=e(a),A.s=t(a),A.l=r(Math.pow(a,d)),A.opacity=o(a),A+""}}return x.gamma=q,x}(1)}var iE,nE,hN=wo({"node_modules/d3-interpolate/src/cubehelix.js"(){cg(),fg(),iE=aE(nx),nE=aE(Zh)}});function pN(Z,q){q===void 0&&(q=Z,Z=cx);for(var d=0,x=q.length-1,A=q[0],M=new Array(x<0?0:x);d<x;)M[d]=Z(A,A=q[++d]);return function(e){var t=Math.max(0,Math.min(x-1,Math.floor(e*=x)));return M[t](e-t)}}var dN=wo({"node_modules/d3-interpolate/src/piecewise.js"(){fx()}});function vN(Z,q){for(var d=new Array(q),x=0;x<q;++x)d[x]=Z(x/(q-1));return d}var mN=wo({"node_modules/d3-interpolate/src/quantize.js"(){}}),f0={};Ws(f0,{interpolate:()=>cx,interpolateArray:()=>HB,interpolateBasis:()=>MM,interpolateBasisClosed:()=>EM,interpolateCubehelix:()=>iE,interpolateCubehelixLong:()=>nE,interpolateDate:()=>BM,interpolateDiscrete:()=>ZB,interpolateHcl:()=>tE,interpolateHclLong:()=>rE,interpolateHsl:()=>$M,interpolateHslLong:()=>QM,interpolateHue:()=>KB,interpolateLab:()=>uN,interpolateNumber:()=>av,interpolateNumberArray:()=>W3,interpolateObject:()=>UM,interpolateRgb:()=>ox,interpolateRgbBasis:()=>IM,interpolateRgbBasisClosed:()=>RM,interpolateRound:()=>$B,interpolateString:()=>qM,interpolateTransformCss:()=>WM,interpolateTransformSvg:()=>XM,interpolateZoom:()=>KM,piecewise:()=>pN,quantize:()=>vN});var hg=wo({"node_modules/d3-interpolate/src/index.js"(){fx(),OM(),H3(),CM(),NM(),YB(),JB(),sx(),X3(),jM(),QB(),VM(),iN(),sN(),DM(),lN(),cN(),fN(),hN(),dN(),mN()}}),Y3=Ze({"src/traces/sunburst/fill_one.js"(Z,q){"use strict";var d=as(),x=Yn();q.exports=function(M,e,t,r,o){var a=e.data.data,i=a.i,n=o||a.color;if(i>=0){e.i=a.i;var s=t.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=n,e.color=n):(s.color=n,e.color=n),d.pointStyle(M,t,r,e)}else x.fill(M,n)}}}),oE=Ze({"src/traces/sunburst/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=ca(),M=Ap().resizeText,e=Y3();function t(o){var a=o._fullLayout._sunburstlayer.selectAll(".trace");M(o,a,"sunburst"),a.each(function(i){var n=d.select(this),s=i[0],c=s.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(f){d.select(this).call(r,f,c,o)})})}function r(o,a,i,n){var s=a.data.data,c=!a.children,f=s.i,g=A.castOption(i,f,"marker.line.color")||x.defaultLine,v=A.castOption(i,f,"marker.line.width")||0;o.call(e,a,i,n).style("stroke-width",v).call(x.stroke,g).style("opacity",c?i.leaf.opacity:null)}q.exports={style:t,styleOne:r}}}),$v=Ze({"src/traces/sunburst/helpers.js"(Z){"use strict";var q=ca(),d=Yn(),x=Kd(),A=e0();Z.findEntryWithLevel=function(r,o){var a;return o&&r.eachAfter(function(i){if(Z.getPtId(i)===o)return a=i.copy()}),a||r},Z.findEntryWithChild=function(r,o){var a;return r.eachAfter(function(i){for(var n=i.children||[],s=0;s<n.length;s++){var c=n[s];if(Z.getPtId(c)===o)return a=i.copy()}}),a||r},Z.isEntry=function(r){return!r.parent},Z.isLeaf=function(r){return!r.children},Z.getPtId=function(r){return r.data.data.id},Z.getPtLabel=function(r){return r.data.data.label},Z.getValue=function(r){return r.value},Z.isHierarchyRoot=function(r){return t(r)===""},Z.setSliceCursor=function(r,o,a){var i=a.isTransitioning;if(!i){var n=r.datum();i=a.hideOnRoot&&Z.isHierarchyRoot(n)||a.hideOnLeaves&&Z.isLeaf(n)}x(r,i?null:"pointer")};function M(r,o,a){return{color:Z.getOutsideTextFontKey("color",r,o,a),family:Z.getOutsideTextFontKey("family",r,o,a),size:Z.getOutsideTextFontKey("size",r,o,a),weight:Z.getOutsideTextFontKey("weight",r,o,a),style:Z.getOutsideTextFontKey("style",r,o,a),variant:Z.getOutsideTextFontKey("variant",r,o,a),textcase:Z.getOutsideTextFontKey("textcase",r,o,a),lineposition:Z.getOutsideTextFontKey("lineposition",r,o,a),shadow:Z.getOutsideTextFontKey("shadow",r,o,a)}}function e(r,o,a,i){var n=(i||{}).onPathbar,s=o.data.data,c=s.i,f=q.castOption(r,c,(n?"pathbar.textfont":"insidetextfont")+".color");return!f&&r._input.textfont&&(f=q.castOption(r._input,c,"textfont.color")),{color:f||d.contrast(s.color),family:Z.getInsideTextFontKey("family",r,o,a,i),size:Z.getInsideTextFontKey("size",r,o,a,i),weight:Z.getInsideTextFontKey("weight",r,o,a,i),style:Z.getInsideTextFontKey("style",r,o,a,i),variant:Z.getInsideTextFontKey("variant",r,o,a,i),textcase:Z.getInsideTextFontKey("textcase",r,o,a,i),lineposition:Z.getInsideTextFontKey("lineposition",r,o,a,i),shadow:Z.getInsideTextFontKey("shadow",r,o,a,i)}}Z.getInsideTextFontKey=function(r,o,a,i,n){var s=(n||{}).onPathbar,c=s?"pathbar.textfont":"insidetextfont",f=a.data.data.i;return q.castOption(o,f,c+"."+r)||q.castOption(o,f,"textfont."+r)||i.size},Z.getOutsideTextFontKey=function(r,o,a,i){var n=a.data.data.i;return q.castOption(o,n,"outsidetextfont."+r)||q.castOption(o,n,"textfont."+r)||i.size},Z.isOutsideText=function(r,o){return!r._hasColorscale&&Z.isHierarchyRoot(o)},Z.determineTextFont=function(r,o,a,i){return Z.isOutsideText(r,o)?M(r,o,a):e(r,o,a,i)},Z.hasTransition=function(r){return!!(r&&r.duration>0)},Z.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},Z.isHeader=function(r,o){return!(Z.isLeaf(r)||r.depth===o._maxDepth-1)};function t(r){return r.data.data.pid}Z.getParent=function(r,o){return Z.findEntryWithLevel(r,t(o))},Z.listPath=function(r,o){var a=r.parent;if(!a)return[];var i=o?[a.data[o]]:[a];return Z.listPath(a,o).concat(i)},Z.getPath=function(r){return Z.listPath(r,"label").join("/")+"/"},Z.formatValue=A.formatPieValue,Z.formatPercent=function(r,o){var a=q.formatPercent(r,0);return a==="0%"&&(a=A.formatPiePercent(r,o)),a}}}),dx=Ze({"src/traces/sunburst/fx.js"(Z,q){"use strict";var d=On(),x=oo(),A=Qp().appendArrayPointValue,M=ef(),e=ca(),t=Qy(),r=$v(),o=e0(),a=o.formatPieValue;q.exports=function(s,c,f,g,v){var T=g[0],l=T.trace,_=T.hierarchy,w=l.type==="sunburst",S=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var E=function(p){var u=f._fullLayout;if(!(f._dragging||u.hovermode===!1)){var m=f._fullData[l.index],h=p.data.data,P=h.i,L=r.isHierarchyRoot(p),z=r.getParent(_,p),F=r.getValue(p),B=function(ee){return e.castOption(m,P,ee)},O=B("hovertemplate"),I=M.castHoverinfo(m,u,P),N=u.separators,U;if(O||I&&I!=="none"&&I!=="skip"){var W,Q;w&&(W=T.cx+p.pxmid[0]*(1-p.rInscribed),Q=T.cy+p.pxmid[1]*(1-p.rInscribed)),S&&(W=p._hoverX,Q=p._hoverY);var ue={},le=[],he=[],G=function(ee){return le.indexOf(ee)!==-1};I&&(le=I==="all"?m._module.attributes.hoverinfo.flags:I.split("+")),ue.label=h.label,G("label")&&ue.label&&he.push(ue.label),h.hasOwnProperty("v")&&(ue.value=h.v,ue.valueLabel=a(ue.value,N),G("value")&&he.push(ue.valueLabel)),ue.currentPath=p.currentPath=r.getPath(p.data),G("current path")&&!L&&he.push(ue.currentPath);var $,J=[],X=function(){J.indexOf($)===-1&&(he.push($),J.push($))};ue.percentParent=p.percentParent=F/r.getValue(z),ue.parent=p.parentString=r.getPtLabel(z),G("percent parent")&&($=r.formatPercent(ue.percentParent,N)+" of "+ue.parent,X()),ue.percentEntry=p.percentEntry=F/r.getValue(c),ue.entry=p.entry=r.getPtLabel(c),G("percent entry")&&!L&&!p.onPathbar&&($=r.formatPercent(ue.percentEntry,N)+" of "+ue.entry,X()),ue.percentRoot=p.percentRoot=F/r.getValue(_),ue.root=p.root=r.getPtLabel(_),G("percent root")&&!L&&($=r.formatPercent(ue.percentRoot,N)+" of "+ue.root,X()),ue.text=B("hovertext")||B("text"),G("text")&&($=ue.text,e.isValidTextValue($)&&he.push($)),U=[i(p,m,v.eventDataKeys)];var oe={trace:m,y:Q,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:he.join("<br>"),name:O||G("name")?m.name:void 0,color:B("hoverlabel.bgcolor")||h.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:O,hovertemplateLabels:ue,eventData:U};w&&(oe.x0=W-p.rInscribed*p.rpx1,oe.x1=W+p.rInscribed*p.rpx1,oe.idealAlign=p.pxmid[0]<0?"left":"right"),S&&(oe.x=W,oe.idealAlign=W<0?"left":"right");var ie=[];M.loneHover(oe,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:f,inOut_bbox:ie}),U[0].bbox=ie[0],l._hasHoverLabel=!0}if(S){var j=s.select("path.surface");v.styleOne(j,p,m,f,{hovered:!0})}l._hasHoverEvent=!0,f.emit("plotly_hover",{points:U||[i(p,m,v.eventDataKeys)],event:d.event})}},y=function(p){var u=f._fullLayout,m=f._fullData[l.index],h=d.select(this).datum();if(l._hasHoverEvent&&(p.originalEvent=d.event,f.emit("plotly_unhover",{points:[i(h,m,v.eventDataKeys)],event:d.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(M.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1),S){var P=s.select("path.surface");v.styleOne(P,h,m,f,{hovered:!1})}},b=function(p){var u=f._fullLayout,m=f._fullData[l.index],h=w&&(r.isHierarchyRoot(p)||r.isLeaf(p)),P=r.getPtId(p),L=r.isEntry(p)?r.findEntryWithChild(_,P):r.findEntryWithLevel(_,P),z=r.getPtId(L),F={points:[i(p,m,v.eventDataKeys)],event:d.event};h||(F.nextLevel=z);var B=t.triggerHandler(f,"plotly_"+l.type+"click",F);if(B!==!1&&u.hovermode&&(f._hoverdata=[i(p,m,v.eventDataKeys)],M.click(f,d.event)),!h&&B!==!1&&!f._dragging&&!f._transitioning){x.call("_storeDirectGUIEdit",m,u._tracePreGUI[m.uid],{level:m.level});var O={data:[{level:z}],traces:[l.index]},I={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};M.loneUnhover(u._hoverlayer.node()),x.call("animate",f,O,I)}};s.on("mouseover",E),s.on("mouseout",y),s.on("click",b)};function i(n,s,c){for(var f=n.data.data,g={curveNumber:s.index,pointNumber:f.i,data:s._input,fullData:s},v=0;v<c.length;v++){var T=c[v];T in n&&(g[T]=n[T])}return"parentString"in n&&!r.isHierarchyRoot(n)&&(g.parent=n.parentString),A(g,s,f.i),g}}}),K3=Ze({"src/traces/sunburst/plot.js"(Z){"use strict";var q=On(),d=J_(),x=(hg(),nh(f0)).interpolate,A=as(),M=ca(),e=fu(),t=Ap(),r=t.recordMinTextSize,o=t.clearMinTextSize,a=x3(),i=e0().getRotationAngle,n=a.computeTransform,s=a.transformInsideText,c=oE().styleOne,f=Nd().resizeText,g=dx(),v=iM(),T=$v();Z.plot=function(y,b,p,u){var m=y._fullLayout,h=m._sunburstlayer,P,L,z=!p,F=!m.uniformtext.mode&&T.hasTransition(p);if(o("sunburst",m),P=h.selectAll("g.trace.sunburst").data(b,function(O){return O[0].trace.uid}),P.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),P.order(),F){u&&(L=u());var B=q.transition().duration(p.duration).ease(p.easing).each("end",function(){L&&L()}).each("interrupt",function(){L&&L()});B.each(function(){h.selectAll("g.trace").each(function(O){l(y,O,this,p)})})}else P.each(function(O){l(y,O,this,p)}),m.uniformtext.mode&&f(y,m._sunburstlayer.selectAll(".trace"),"sunburst");z&&P.exit().remove()};function l(y,b,p,u){var m=y._context.staticPlot,h=y._fullLayout,P=!h.uniformtext.mode&&T.hasTransition(u),L=q.select(p),z=L.selectAll("g.slice"),F=b[0],B=F.trace,O=F.hierarchy,I=T.findEntryWithLevel(O,B.level),N=T.getMaxDepth(B),U=h._size,W=B.domain,Q=U.w*(W.x[1]-W.x[0]),ue=U.h*(W.y[1]-W.y[0]),le=.5*Math.min(Q,ue),he=F.cx=U.l+U.w*(W.x[1]+W.x[0])/2,G=F.cy=U.t+U.h*(1-W.y[0])-ue/2;if(!I)return z.remove();var $=null,J={};P&&z.each(function(fe){J[T.getPtId(fe)]={rpx0:fe.rpx0,rpx1:fe.rpx1,x0:fe.x0,x1:fe.x1,transform:fe.transform},!$&&T.isEntry(fe)&&($=fe)});var X=_(I).descendants(),oe=I.height+1,ie=0,j=N;F.hasMultipleRoots&&T.isHierarchyRoot(I)&&(X=X.slice(1),oe-=1,ie=1,j+=1),X=X.filter(function(fe){return fe.y1<=j});var ee=i(B.rotation);ee&&X.forEach(function(fe){fe.x0+=ee,fe.x1+=ee});var re=Math.min(oe,N),ce=function(fe){return(fe-ie)/re*le},be=function(fe,Fe){return[fe*Math.cos(Fe),-fe*Math.sin(Fe)]},Ae=function(fe){return M.pathAnnulus(fe.rpx0,fe.rpx1,fe.x0,fe.x1,he,G)},ze=function(fe){return he+S(fe)[0]*(fe.transform.rCenter||0)+(fe.transform.x||0)},Re=function(fe){return G+S(fe)[1]*(fe.transform.rCenter||0)+(fe.transform.y||0)};z=z.data(X,T.getPtId),z.enter().append("g").classed("slice",!0),P?z.exit().transition().each(function(){var fe=q.select(this),Fe=fe.select("path.surface");Fe.transition().attrTween("d",function(st){var Qe=tt(st);return function(Lt){return Ae(Qe(Lt))}});var rt=fe.select("g.slicetext");rt.attr("opacity",0)}).remove():z.exit().remove(),z.order();var Xe=null;if(P&&$){var it=T.getPtId($);z.each(function(fe){Xe===null&&T.getPtId(fe)===it&&(Xe=fe.x1)})}var ot=z;P&&(ot=ot.transition().each("end",function(){var fe=q.select(this);T.setSliceCursor(fe,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ot.each(function(fe){var Fe=q.select(this),rt=M.ensureSingle(Fe,"path","surface",function(Zt){Zt.style("pointer-events",m?"none":"all")});fe.rpx0=ce(fe.y0),fe.rpx1=ce(fe.y1),fe.xmid=(fe.x0+fe.x1)/2,fe.pxmid=be(fe.rpx1,fe.xmid),fe.midangle=-(fe.xmid-Math.PI/2),fe.startangle=-(fe.x0-Math.PI/2),fe.stopangle=-(fe.x1-Math.PI/2),fe.halfangle=.5*Math.min(M.angleDelta(fe.x0,fe.x1)||Math.PI,Math.PI),fe.ring=1-fe.rpx0/fe.rpx1,fe.rInscribed=w(fe,B),P?rt.transition().attrTween("d",function(Zt){var Sr=lt(Zt);return function(xr){return Ae(Sr(xr))}}):rt.attr("d",Ae),Fe.call(g,I,y,b,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(T.setSliceCursor,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:y._transitioning}),rt.call(c,fe,B,y);var st=M.ensureSingle(Fe,"g","slicetext"),Qe=M.ensureSingle(st,"text","",function(Zt){Zt.attr("data-notex",1)}),Lt=M.ensureUniformFontSize(y,T.determineTextFont(B,fe,h.font));Qe.text(Z.formatSliceLabel(fe,I,B,b,h)).classed("slicetext",!0).attr("text-anchor","middle").call(A.font,Lt).call(e.convertToTspans,y);var kt=A.bBox(Qe.node());fe.transform=s(kt,fe,F),fe.transform.targetX=ze(fe),fe.transform.targetY=Re(fe);var Vt=function(Zt,Sr){var xr=Zt.transform;return n(xr,Sr),xr.fontSize=Lt.size,r(B.type,xr,h),M.getTextTransform(xr)};P?Qe.transition().attrTween("transform",function(Zt){var Sr=Ee(Zt);return function(xr){return Vt(Sr(xr),kt)}}):Qe.attr("transform",Vt(fe,kt))});function tt(fe){var Fe=T.getPtId(fe),rt=J[Fe],st=J[T.getPtId(I)],Qe;if(st){var Lt=(fe.x1>st.x1?2*Math.PI:0)+ee;Qe=fe.rpx1<st.rpx1?{x0:fe.x0,x1:fe.x1,rpx0:0,rpx1:0}:{x0:Lt,x1:Lt,rpx0:fe.rpx0,rpx1:fe.rpx1}}else{var kt,Vt=T.getPtId(fe.parent);z.each(function(wr){if(T.getPtId(wr)===Vt)return kt=wr});var Zt=kt.children,Sr;Zt.forEach(function(wr,Ir){if(T.getPtId(wr)===Fe)return Sr=Ir});var xr=Zt.length,jr=x(kt.x0,kt.x1);Qe={rpx0:le,rpx1:le,x0:jr(Sr/xr),x1:jr((Sr+1)/xr)}}return x(rt,Qe)}function lt(fe){var Fe=J[T.getPtId(fe)],rt,st={x0:fe.x0,x1:fe.x1,rpx0:fe.rpx0,rpx1:fe.rpx1};if(Fe)rt=Fe;else if($)if(fe.parent)if(Xe){var Qe=(fe.x1>Xe?2*Math.PI:0)+ee;rt={x0:Qe,x1:Qe}}else rt={rpx0:le,rpx1:le},M.extendFlat(rt,_e(fe));else rt={rpx0:0,rpx1:0};else rt={x0:ee,x1:ee};return x(rt,st)}function Ee(fe){var Fe=J[T.getPtId(fe)],rt,st=fe.transform;if(Fe)rt=Fe;else if(rt={rpx1:fe.rpx1,transform:{textPosAngle:st.textPosAngle,scale:0,rotate:st.rotate,rCenter:st.rCenter,x:st.x,y:st.y}},$)if(fe.parent)if(Xe){var Qe=fe.x1>Xe?2*Math.PI:0;rt.x0=rt.x1=Qe}else M.extendFlat(rt,_e(fe));else rt.x0=rt.x1=ee;else rt.x0=rt.x1=ee;var Lt=x(rt.transform.textPosAngle,fe.transform.textPosAngle),kt=x(rt.rpx1,fe.rpx1),Vt=x(rt.x0,fe.x0),Zt=x(rt.x1,fe.x1),Sr=x(rt.transform.scale,st.scale),xr=x(rt.transform.rotate,st.rotate),jr=st.rCenter===0?3:rt.transform.rCenter===0?1/3:1,wr=x(rt.transform.rCenter,st.rCenter),Ir=function(bt){return wr(Math.pow(bt,jr))};return function(bt){var Be=kt(bt),Ke=Vt(bt),Ue=Zt(bt),Me=Ir(bt),qe=be(Be,(Ke+Ue)/2),Ce=Lt(bt),Te={pxmid:qe,rpx1:Be,transform:{textPosAngle:Ce,rCenter:Me,x:st.x,y:st.y}};return r(B.type,st,h),{transform:{targetX:ze(Te),targetY:Re(Te),scale:Sr(bt),rotate:xr(bt),rCenter:Me}}}}function _e(fe){var Fe=fe.parent,rt=J[T.getPtId(Fe)],st={};if(rt){var Qe=Fe.children,Lt=Qe.indexOf(fe),kt=Qe.length,Vt=x(rt.x0,rt.x1);st.x0=Vt(Lt/kt),st.x1=Vt(Lt/kt)}else st.x0=st.x1=0;return st}}function _(y){return d.partition().size([2*Math.PI,y.height+1])(y)}Z.formatSliceLabel=function(y,b,p,u,m){var h=p.texttemplate,P=p.textinfo;if(!h&&(!P||P==="none"))return"";var L=m.separators,z=u[0],F=y.data.data,B=z.hierarchy,O=T.isHierarchyRoot(y),I=T.getParent(B,y),N=T.getValue(y);if(!h){var U=P.split("+"),W=function(ie){return U.indexOf(ie)!==-1},Q=[],ue;if(W("label")&&F.label&&Q.push(F.label),F.hasOwnProperty("v")&&W("value")&&Q.push(T.formatValue(F.v,L)),!O){W("current path")&&Q.push(T.getPath(y.data));var le=0;W("percent parent")&&le++,W("percent entry")&&le++,W("percent root")&&le++;var he=le>1;if(le){var G,$=function(ie){ue=T.formatPercent(G,L),he&&(ue+=" of "+ie),Q.push(ue)};W("percent parent")&&!O&&(G=N/T.getValue(I),$("parent")),W("percent entry")&&(G=N/T.getValue(b),$("entry")),W("percent root")&&(G=N/T.getValue(B),$("root"))}}return W("text")&&(ue=M.castOption(p,F.i,"text"),M.isValidTextValue(ue)&&Q.push(ue)),Q.join("<br>")}var J=M.castOption(p,F.i,"texttemplate");if(!J)return"";var X={};F.label&&(X.label=F.label),F.hasOwnProperty("v")&&(X.value=F.v,X.valueLabel=T.formatValue(F.v,L)),X.currentPath=T.getPath(y.data),O||(X.percentParent=N/T.getValue(I),X.percentParentLabel=T.formatPercent(X.percentParent,L),X.parent=T.getPtLabel(I)),X.percentEntry=N/T.getValue(b),X.percentEntryLabel=T.formatPercent(X.percentEntry,L),X.entry=T.getPtLabel(b),X.percentRoot=N/T.getValue(B),X.percentRootLabel=T.formatPercent(X.percentRoot,L),X.root=T.getPtLabel(B),F.hasOwnProperty("color")&&(X.color=F.color);var oe=M.castOption(p,F.i,"text");return(M.isValidTextValue(oe)||oe==="")&&(X.text=oe),X.customdata=M.castOption(p,F.i,"customdata"),M.texttemplateString(J,X,m._d3locale,X,p._meta||{})};function w(y){return y.rpx0===0&&M.isFullCircle([y.x0,y.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(y.halfangle)),y.ring/2))}function S(y){return E(y.rpx1,y.transform.textPosAngle)}function E(y,b){return[y*Math.sin(b),-y*Math.cos(b)]}}}),gN=Ze({"src/traces/sunburst/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"sunburst",basePlotModule:RB(),categories:[],animatable:!0,attributes:K_(),layoutAttributes:nM(),supplyDefaults:DB(),supplyLayoutDefaults:zB(),calc:$_().calc,crossTraceCalc:$_().crossTraceCalc,plot:K3().plot,style:oE().style,colorbar:hp(),meta:{}}}}),yN=Ze({"lib/sunburst.js"(Z,q){"use strict";q.exports=gN()}}),_N=Ze({"src/traces/treemap/base_plot.js"(Z){"use strict";var q=xc();Z.name="treemap",Z.plot=function(d,x,A,M){q.plotBasePlot(Z.name,d,x,A,M)},Z.clean=function(d,x,A,M){q.cleanBasePlot(Z.name,d,x,A,M)}}}),pg=Ze({"src/traces/treemap/constants.js"(Z,q){"use strict";q.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),J3=Ze({"src/traces/treemap/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=Mu(),M=bc().attributes,e=ng(),t=K_(),r=pg(),o=rs().extendFlat,a=Gh().pattern;q.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.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:o({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:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},A("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:o({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:d({},{keys:r.eventDataKeys}),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:o({},e.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:e.sort,root:t.root,domain:M({name:"treemap",trace:!0,editType:"calc"})}}}),sE=Ze({"src/traces/treemap/layout_attributes.js"(Z,q){"use strict";q.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),xN=Ze({"src/traces/treemap/defaults.js"(Z,q){"use strict";var d=ca(),x=J3(),A=Yn(),M=bc().defaults,e=gd().handleText,t=Q0().TEXTPAD,r=og().handleMarkerDefaults,o=rc(),a=o.hasColorscale,i=o.handleDefaults;q.exports=function(s,c,f,g){function v(m,h){return d.coerce(s,c,x,m,h)}var T=v("labels"),l=v("parents");if(!T||!T.length||!l||!l.length){c.visible=!1;return}var _=v("values");_&&_.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var w=v("tiling.packing");w==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var S=v("text");v("texttemplate"),c.texttemplate||v("textinfo",d.isArrayOrTypedArray(S)?"text+label":"label"),v("hovertext"),v("hovertemplate");var E=v("pathbar.visible"),y="auto";e(s,c,g,v,y,{hasPathbar:E,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var b=c.textposition.indexOf("bottom")!==-1;r(s,c,g,v);var p=c._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;p?i(s,c,g,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;v("marker.pad.t",b?u/4:u),v("marker.pad.l",u/4),v("marker.pad.r",u/4),v("marker.pad.b",b?u:u/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:A.contrast(g.paper_bgcolor)}}},E&&(v("pathbar.thickness",c.pathbar.textfont.size+2*t),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),M(c,g,v),c._length=null}}}),bN=Ze({"src/traces/treemap/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=sE();q.exports=function(M,e){function t(r,o){return d.coerce(M,e,x,r,o)}t("treemapcolorway",e.colorway),t("extendtreemapcolors")}}}),lE=Ze({"src/traces/treemap/calc.js"(Z){"use strict";var q=$_();Z.calc=function(d,x){return q.calc(d,x)},Z.crossTraceCalc=function(d){return q._runCrossTraceCalc("treemap",d)}}}),uE=Ze({"src/traces/treemap/flip_tree.js"(Z,q){"use strict";q.exports=function d(x,A,M){var e;M.swapXY&&(e=x.x0,x.x0=x.y0,x.y0=e,e=x.x1,x.x1=x.y1,x.y1=e),M.flipX&&(e=x.x0,x.x0=A[0]-x.x1,x.x1=A[0]-e),M.flipY&&(e=x.y0,x.y0=A[1]-x.y1,x.y1=A[1]-e);var t=x.children;if(t)for(var r=0;r<t.length;r++)d(t[r],A,M)}}}),cE=Ze({"src/traces/treemap/partition.js"(Z,q){"use strict";var d=J_(),x=uE();q.exports=function(e,t,r){var o=r.flipX,a=r.flipY,i=r.packing==="dice-slice",n=r.pad[a?"bottom":"top"],s=r.pad[o?"right":"left"],c=r.pad[o?"left":"right"],f=r.pad[a?"top":"bottom"],g;i&&(g=s,s=n,n=g,g=c,c=f,f=g);var v=d.treemap().tile(A(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(s).paddingRight(c).paddingTop(n).paddingBottom(f).size(i?[t[1],t[0]]:t)(e);return(i||o||a)&&x(v,t,{swapXY:i,flipX:o,flipY:a}),v};function A(M,e){switch(M){case"squarify":return d.treemapSquarify.ratio(e);case"binary":return d.treemapBinary;case"dice":return d.treemapDice;case"slice":return d.treemapSlice;default:return d.treemapSliceDice}}}}),$3=Ze({"src/traces/treemap/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=ca(),M=$v(),e=Ap().resizeText,t=Y3();function r(a){var i=a._fullLayout._treemaplayer.selectAll(".trace");e(a,i,"treemap"),i.each(function(n){var s=d.select(this),c=n[0],f=c.trace;s.style("opacity",f.opacity),s.selectAll("path.surface").each(function(g){d.select(this).call(o,g,f,a,{hovered:!1})})})}function o(a,i,n,s,c){var f=(c||{}).hovered,g=i.data.data,v=g.i,T,l,_=g.color,w=M.isHierarchyRoot(i),S=1;if(f)T=n._hovered.marker.line.color,l=n._hovered.marker.line.width;else if(w&&_===n.root.color)S=100,T="rgba(0,0,0,0)",l=0;else if(T=A.castOption(n,v,"marker.line.color")||x.defaultLine,l=A.castOption(n,v,"marker.line.width")||0,!n._hasColorscale&&!i.onPathbar){var E=n.marker.depthfade;if(E){var y=x.combine(x.addOpacity(n._backgroundColor,.75),_),b;if(E===!0){var p=M.getMaxDepth(n);isFinite(p)?M.isLeaf(i)?b=0:b=n._maxVisibleLayers-(i.data.depth-n._entryDepth):b=i.data.height+1}else b=i.data.depth-n._entryDepth,n._atRootLevel||b++;if(b>0)for(var u=0;u<b;u++){var m=.5*u/b;_=x.combine(x.addOpacity(y,m),_)}}}a.call(t,i,n,s,_).style("stroke-width",l).call(x.stroke,T).style("opacity",S)}q.exports={style:r,styleOne:o}}}),wN=Ze({"src/traces/treemap/draw_ancestors.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=fu(),e=cE(),t=$3().styleOne,r=pg(),o=$v(),a=dx(),i=!0;q.exports=function(s,c,f,g,v){var T=v.barDifY,l=v.width,_=v.height,w=v.viewX,S=v.viewY,E=v.pathSlice,y=v.toMoveInsideSlice,b=v.strTransform,p=v.hasTransition,u=v.handleSlicesExit,m=v.makeUpdateSliceInterpolator,h=v.makeUpdateTextInterpolator,P={},L=s._context.staticPlot,z=s._fullLayout,F=c[0],B=F.trace,O=F.hierarchy,I=l/B._entryDepth,N=o.listPath(f.data,"id"),U=e(O.copy(),[l,_],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();U=U.filter(function(Q){var ue=N.indexOf(Q.data.id);return ue===-1?!1:(Q.x0=I*ue,Q.x1=I*(ue+1),Q.y0=T,Q.y1=T+_,Q.onPathbar=!0,!0)}),U.reverse(),g=g.data(U,o.getPtId),g.enter().append("g").classed("pathbar",!0),u(g,i,P,[l,_],E),g.order();var W=g;p&&(W=W.transition().each("end",function(){var Q=d.select(this);o.setSliceCursor(Q,s,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),W.each(function(Q){Q._x0=w(Q.x0),Q._x1=w(Q.x1),Q._y0=S(Q.y0),Q._y1=S(Q.y1),Q._hoverX=w(Q.x1-Math.min(l,_)/2),Q._hoverY=S(Q.y1-_/2);var ue=d.select(this),le=x.ensureSingle(ue,"path","surface",function(J){J.style("pointer-events",L?"none":"all")});p?le.transition().attrTween("d",function(J){var X=m(J,i,P,[l,_]);return function(oe){return E(X(oe))}}):le.attr("d",E),ue.call(a,f,s,c,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,s,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:s._transitioning}),le.call(t,Q,B,s,{hovered:!1}),Q._text=(o.getPtLabel(Q)||"").split("<br>").join(" ")||"";var he=x.ensureSingle(ue,"g","slicetext"),G=x.ensureSingle(he,"text","",function(J){J.attr("data-notex",1)}),$=x.ensureUniformFontSize(s,o.determineTextFont(B,Q,z.font,{onPathbar:!0}));G.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(A.font,$).call(M.convertToTspans,s),Q.textBB=A.bBox(G.node()),Q.transform=y(Q,{fontSize:$.size,onPathbar:!0}),Q.transform.fontSize=$.size,p?G.transition().attrTween("transform",function(J){var X=h(J,i,P,[l,_]);return function(oe){return b(X(oe))}}):G.attr("transform",b(Q))})}}}),TN=Ze({"src/traces/treemap/plot_one.js"(Z,q){"use strict";var d=On(),x=(hg(),nh(f0)).interpolate,A=$v(),M=ca(),e=Q0().TEXTPAD,t=eg(),r=t.toMoveInsideBar,o=Ap(),a=o.recordMinTextSize,i=pg(),n=wN();function s(c){return A.isHierarchyRoot(c)?"":A.getPtId(c)}q.exports=function(f,g,v,T,l){var _=f._fullLayout,w=g[0],S=w.trace,E=S.type,y=E==="icicle",b=w.hierarchy,p=A.findEntryWithLevel(b,S.level),u=d.select(v),m=u.selectAll("g.pathbar"),h=u.selectAll("g.slice");if(!p){m.remove(),h.remove();return}var P=A.isHierarchyRoot(p),L=!_.uniformtext.mode&&A.hasTransition(T),z=A.getMaxDepth(S),F=function(wr){return wr.data.depth-p.data.depth<z},B=_._size,O=S.domain,I=B.w*(O.x[1]-O.x[0]),N=B.h*(O.y[1]-O.y[0]),U=I,W=S.pathbar.thickness,Q=S.marker.line.width+i.gapWithPathbar,ue=S.pathbar.visible?S.pathbar.side.indexOf("bottom")>-1?N+Q:-(W+Q):0,le={x0:U,x1:U,y0:ue,y1:ue+W},he=function(wr,Ir,bt){var Be=S.tiling.pad,Ke=function(Ce){return Ce-Be<=Ir.x0},Ue=function(Ce){return Ce+Be>=Ir.x1},Me=function(Ce){return Ce-Be<=Ir.y0},qe=function(Ce){return Ce+Be>=Ir.y1};return wr.x0===Ir.x0&&wr.x1===Ir.x1&&wr.y0===Ir.y0&&wr.y1===Ir.y1?{x0:wr.x0,x1:wr.x1,y0:wr.y0,y1:wr.y1}:{x0:Ke(wr.x0-Be)?0:Ue(wr.x0-Be)?bt[0]:wr.x0,x1:Ke(wr.x1+Be)?0:Ue(wr.x1+Be)?bt[0]:wr.x1,y0:Me(wr.y0-Be)?0:qe(wr.y0-Be)?bt[1]:wr.y0,y1:Me(wr.y1+Be)?0:qe(wr.y1+Be)?bt[1]:wr.y1}},G=null,$={},J={},X=null,oe=function(wr,Ir){return Ir?$[s(wr)]:J[s(wr)]},ie=function(wr,Ir,bt,Be){if(Ir)return $[s(b)]||le;var Ke=J[S.level]||bt;return F(wr)?he(wr,Ke,Be):{}};w.hasMultipleRoots&&P&&z++,S._maxDepth=z,S._backgroundColor=_.paper_bgcolor,S._entryDepth=p.data.depth,S._atRootLevel=P;var j=-I/2+B.l+B.w*(O.x[1]+O.x[0])/2,ee=-N/2+B.t+B.h*(1-(O.y[1]+O.y[0])/2),re=function(wr){return j+wr},ce=function(wr){return ee+wr},be=ce(0),Ae=re(0),ze=function(wr){return Ae+wr},Re=function(wr){return be+wr};function Xe(wr,Ir){return wr+","+Ir}var it=ze(0),ot=function(wr){wr.x=Math.max(it,wr.x)},tt=S.pathbar.edgeshape,lt=function(wr){var Ir=ze(Math.max(Math.min(wr.x0,wr.x0),0)),bt=ze(Math.min(Math.max(wr.x1,wr.x1),U)),Be=Re(wr.y0),Ke=Re(wr.y1),Ue=W/2,Me={},qe={};Me.x=Ir,qe.x=bt,Me.y=qe.y=(Be+Ke)/2;var Ce={x:Ir,y:Be},Te={x:bt,y:Be},Pe={x:bt,y:Ke},at={x:Ir,y:Ke};return tt===">"?(Ce.x-=Ue,Te.x-=Ue,Pe.x-=Ue,at.x-=Ue):tt==="/"?(Pe.x-=Ue,at.x-=Ue,Me.x-=Ue/2,qe.x-=Ue/2):tt==="\\"?(Ce.x-=Ue,Te.x-=Ue,Me.x-=Ue/2,qe.x-=Ue/2):tt==="<"&&(Me.x-=Ue,qe.x-=Ue),ot(Ce),ot(at),ot(Me),ot(Te),ot(Pe),ot(qe),"M"+Xe(Ce.x,Ce.y)+"L"+Xe(Te.x,Te.y)+"L"+Xe(qe.x,qe.y)+"L"+Xe(Pe.x,Pe.y)+"L"+Xe(at.x,at.y)+"L"+Xe(Me.x,Me.y)+"Z"},Ee=S[y?"tiling":"marker"].pad,_e=function(wr){return S.textposition.indexOf(wr)!==-1},fe=_e("top"),Fe=_e("left"),rt=_e("right"),st=_e("bottom"),Qe=function(wr){var Ir=re(wr.x0),bt=re(wr.x1),Be=ce(wr.y0),Ke=ce(wr.y1),Ue=bt-Ir,Me=Ke-Be;if(!Ue||!Me)return"";var qe=S.marker.cornerradius||0,Ce=Math.min(qe,Ue/2,Me/2);Ce&&wr.data&&wr.data.data&&wr.data.data.label&&(fe&&(Ce=Math.min(Ce,Ee.t)),Fe&&(Ce=Math.min(Ce,Ee.l)),rt&&(Ce=Math.min(Ce,Ee.r)),st&&(Ce=Math.min(Ce,Ee.b)));var Te=function(Pe,at){return Ce?"a"+Xe(Ce,Ce)+" 0 0 1 "+Xe(Pe,at):""};return"M"+Xe(Ir,Be+Ce)+Te(Ce,-Ce)+"L"+Xe(bt-Ce,Be)+Te(Ce,Ce)+"L"+Xe(bt,Ke-Ce)+Te(-Ce,Ce)+"L"+Xe(Ir+Ce,Ke)+Te(-Ce,-Ce)+"Z"},Lt=function(wr,Ir){var bt=wr.x0,Be=wr.x1,Ke=wr.y0,Ue=wr.y1,Me=wr.textBB,qe=fe||Ir.isHeader&&!st,Ce=qe?"start":st?"end":"middle",Te=_e("right"),Pe=_e("left")||Ir.onPathbar,at=Pe?-1:Te?1:0;if(Ir.isHeader){if(bt+=(y?Ee:Ee.l)-e,Be-=(y?Ee:Ee.r)-e,bt>=Be){var yt=(bt+Be)/2;bt=yt,Be=yt}var Tt;st?(Tt=Ue-(y?Ee:Ee.b),Ke<Tt&&Tt<Ue&&(Ke=Tt)):(Tt=Ke+(y?Ee:Ee.t),Ke<Tt&&Tt<Ue&&(Ue=Tt))}var Ot=r(bt,Be,Ke,Ue,Me,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ce,leftToRight:at});return Ot.fontSize=Ir.fontSize,Ot.targetX=re(Ot.targetX),Ot.targetY=ce(Ot.targetY),isNaN(Ot.targetX)||isNaN(Ot.targetY)?{}:(bt!==Be&&Ke!==Ue&&a(S.type,Ot,_),{scale:Ot.scale,rotate:Ot.rotate,textX:Ot.textX,textY:Ot.textY,anchorX:Ot.anchorX,anchorY:Ot.anchorY,targetX:Ot.targetX,targetY:Ot.targetY})},kt=function(wr,Ir){for(var bt,Be=0,Ke=wr;!bt&&Be<z;)Be++,Ke=Ke.parent,Ke?bt=oe(Ke,Ir):Be=z;return bt||{}},Vt=function(wr,Ir,bt,Be){var Ke=oe(wr,Ir),Ue;if(Ir)Ue=le;else{var Me=oe(p,Ir);Me?Ue=he(wr,Me,Be):Ue={}}return x(Ke,Ue)},Zt=function(wr,Ir,bt,Be,Ke){var Ue=oe(wr,Ir),Me;if(Ue)Me=Ue;else if(Ir)Me=le;else if(G)if(wr.parent){var qe=X||bt;qe&&!Ir?Me=he(wr,qe,Be):(Me={},M.extendFlat(Me,kt(wr,Ir)))}else Me=M.extendFlat({},wr),y&&(Ke.orientation==="h"?Ke.flipX?Me.x0=wr.x1:Me.x1=0:Ke.flipY?Me.y0=wr.y1:Me.y1=0);else Me={};return x(Me,{x0:wr.x0,x1:wr.x1,y0:wr.y0,y1:wr.y1})},Sr=function(wr,Ir,bt,Be){var Ke=oe(wr,Ir),Ue={},Me=ie(wr,Ir,bt,Be);M.extendFlat(Ue,{transform:Lt({x0:Me.x0,x1:Me.x1,y0:Me.y0,y1:Me.y1,textBB:wr.textBB,_text:wr._text},{isHeader:A.isHeader(wr,S)})}),Ke?Ue=Ke:wr.parent&&M.extendFlat(Ue,kt(wr,Ir));var qe=wr.transform;return wr.x0!==wr.x1&&wr.y0!==wr.y1&&a(S.type,qe,_),x(Ue,{transform:{scale:qe.scale,rotate:qe.rotate,textX:qe.textX,textY:qe.textY,anchorX:qe.anchorX,anchorY:qe.anchorY,targetX:qe.targetX,targetY:qe.targetY}})},xr=function(wr,Ir,bt,Be,Ke){var Ue=Be[0],Me=Be[1];L?wr.exit().transition().each(function(){var qe=d.select(this),Ce=qe.select("path.surface");Ce.transition().attrTween("d",function(Pe){var at=Vt(Pe,Ir,bt,[Ue,Me]);return function(yt){return Ke(at(yt))}});var Te=qe.select("g.slicetext");Te.attr("opacity",0)}).remove():wr.exit().remove()},jr=function(wr){var Ir=wr.transform;return wr.x0!==wr.x1&&wr.y0!==wr.y1&&a(S.type,Ir,_),M.getTextTransform({textX:Ir.textX,textY:Ir.textY,anchorX:Ir.anchorX,anchorY:Ir.anchorY,targetX:Ir.targetX,targetY:Ir.targetY,scale:Ir.scale,rotate:Ir.rotate})};L&&(m.each(function(wr){$[s(wr)]={x0:wr.x0,x1:wr.x1,y0:wr.y0,y1:wr.y1},wr.transform&&($[s(wr)].transform={textX:wr.transform.textX,textY:wr.transform.textY,anchorX:wr.transform.anchorX,anchorY:wr.transform.anchorY,targetX:wr.transform.targetX,targetY:wr.transform.targetY,scale:wr.transform.scale,rotate:wr.transform.rotate})}),h.each(function(wr){J[s(wr)]={x0:wr.x0,x1:wr.x1,y0:wr.y0,y1:wr.y1},wr.transform&&(J[s(wr)].transform={textX:wr.transform.textX,textY:wr.transform.textY,anchorX:wr.transform.anchorX,anchorY:wr.transform.anchorY,targetX:wr.transform.targetX,targetY:wr.transform.targetY,scale:wr.transform.scale,rotate:wr.transform.rotate}),!G&&A.isEntry(wr)&&(G=wr)})),X=l(f,g,p,h,{width:I,height:N,viewX:re,viewY:ce,pathSlice:Qe,toMoveInsideSlice:Lt,prevEntry:G,makeUpdateSliceInterpolator:Zt,makeUpdateTextInterpolator:Sr,handleSlicesExit:xr,hasTransition:L,strTransform:jr}),S.pathbar.visible?n(f,g,p,m,{barDifY:ue,width:U,height:W,viewX:ze,viewY:Re,pathSlice:lt,toMoveInsideSlice:Lt,makeUpdateSliceInterpolator:Zt,makeUpdateTextInterpolator:Sr,handleSlicesExit:xr,hasTransition:L,strTransform:jr}):m.remove()}}}),fE=Ze({"src/traces/treemap/draw.js"(Z,q){"use strict";var d=On(),x=$v(),A=Ap(),M=A.clearMinTextSize,e=Nd().resizeText,t=TN();q.exports=function(o,a,i,n,s){var c=s.type,f=s.drawDescendants,g=o._fullLayout,v=g["_"+c+"layer"],T,l,_=!i;if(M(c,g),T=v.selectAll("g.trace."+c).data(a,function(S){return S[0].trace.uid}),T.enter().append("g").classed("trace",!0).classed(c,!0),T.order(),!g.uniformtext.mode&&x.hasTransition(i)){n&&(l=n());var w=d.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});w.each(function(){v.selectAll("g.trace").each(function(S){t(o,S,this,i,f)})})}else T.each(function(S){t(o,S,this,i,f)}),g.uniformtext.mode&&e(o,v.selectAll(".trace"),c);_&&T.exit().remove()}}}),AN=Ze({"src/traces/treemap/draw_descendants.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=fu(),e=cE(),t=$3().styleOne,r=pg(),o=$v(),a=dx(),i=K3().formatSliceLabel,n=!1;q.exports=function(c,f,g,v,T){var l=T.width,_=T.height,w=T.viewX,S=T.viewY,E=T.pathSlice,y=T.toMoveInsideSlice,b=T.strTransform,p=T.hasTransition,u=T.handleSlicesExit,m=T.makeUpdateSliceInterpolator,h=T.makeUpdateTextInterpolator,P=T.prevEntry,L={},z=c._context.staticPlot,F=c._fullLayout,B=f[0],O=B.trace,I=O.textposition.indexOf("left")!==-1,N=O.textposition.indexOf("right")!==-1,U=O.textposition.indexOf("bottom")!==-1,W=!U&&!O.marker.pad.t||U&&!O.marker.pad.b,Q=e(g,[l,_],{packing:O.tiling.packing,squarifyratio:O.tiling.squarifyratio,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,pad:{inner:O.tiling.pad,top:O.marker.pad.t,left:O.marker.pad.l,right:O.marker.pad.r,bottom:O.marker.pad.b}}),ue=Q.descendants(),le=1/0,he=-1/0;ue.forEach(function(oe){var ie=oe.depth;ie>=O._maxDepth?(oe.x0=oe.x1=(oe.x0+oe.x1)/2,oe.y0=oe.y1=(oe.y0+oe.y1)/2):(le=Math.min(le,ie),he=Math.max(he,ie))}),v=v.data(ue,o.getPtId),O._maxVisibleLayers=isFinite(he)?he-le+1:0,v.enter().append("g").classed("slice",!0),u(v,n,L,[l,_],E),v.order();var G=null;if(p&&P){var $=o.getPtId(P);v.each(function(oe){G===null&&o.getPtId(oe)===$&&(G={x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1})})}var J=function(){return G||{x0:0,x1:l,y0:0,y1:_}},X=v;return p&&(X=X.transition().each("end",function(){var oe=d.select(this);o.setSliceCursor(oe,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),X.each(function(oe){var ie=o.isHeader(oe,O);oe._x0=w(oe.x0),oe._x1=w(oe.x1),oe._y0=S(oe.y0),oe._y1=S(oe.y1),oe._hoverX=w(oe.x1-O.marker.pad.r),oe._hoverY=S(U?oe.y1-O.marker.pad.b/2:oe.y0+O.marker.pad.t/2);var j=d.select(this),ee=x.ensureSingle(j,"path","surface",function(Re){Re.style("pointer-events",z?"none":"all")});p?ee.transition().attrTween("d",function(Re){var Xe=m(Re,n,J(),[l,_]);return function(it){return E(Xe(it))}}):ee.attr("d",E),j.call(a,g,c,f,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(t,oe,O,c,{hovered:!1}),oe.x0===oe.x1||oe.y0===oe.y1?oe._text="":ie?oe._text=W?"":o.getPtLabel(oe)||"":oe._text=i(oe,g,O,f,F)||"";var re=x.ensureSingle(j,"g","slicetext"),ce=x.ensureSingle(re,"text","",function(Re){Re.attr("data-notex",1)}),be=x.ensureUniformFontSize(c,o.determineTextFont(O,oe,F.font)),Ae=oe._text||" ",ze=ie&&Ae.indexOf("<br>")===-1;ce.text(Ae).classed("slicetext",!0).attr("text-anchor",N?"end":I||ze?"start":"middle").call(A.font,be).call(M.convertToTspans,c),oe.textBB=A.bBox(ce.node()),oe.transform=y(oe,{fontSize:be.size,isHeader:ie}),oe.transform.fontSize=be.size,p?ce.transition().attrTween("transform",function(Re){var Xe=h(Re,n,J(),[l,_]);return function(it){return b(Xe(it))}}):ce.attr("transform",b(oe))}),G}}}),SN=Ze({"src/traces/treemap/plot.js"(Z,q){"use strict";var d=fE(),x=AN();q.exports=function(M,e,t,r){return d(M,e,t,r,{type:"treemap",drawDescendants:x})}}}),MN=Ze({"src/traces/treemap/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"treemap",basePlotModule:_N(),categories:[],animatable:!0,attributes:J3(),layoutAttributes:sE(),supplyDefaults:xN(),supplyLayoutDefaults:bN(),calc:lE().calc,crossTraceCalc:lE().crossTraceCalc,plot:SN(),style:$3().style,colorbar:hp(),meta:{}}}}),EN=Ze({"lib/treemap.js"(Z,q){"use strict";q.exports=MN()}}),CN=Ze({"src/traces/icicle/base_plot.js"(Z){"use strict";var q=xc();Z.name="icicle",Z.plot=function(d,x,A,M){q.plotBasePlot(Z.name,d,x,A,M)},Z.clean=function(d,x,A,M){q.cleanBasePlot(Z.name,d,x,A,M)}}}),hE=Ze({"src/traces/icicle/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=Mu(),M=bc().attributes,e=ng(),t=K_(),r=J3(),o=pg(),a=rs().extendFlat,i=Gh().pattern;q.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:r.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:i,editType:"calc"},A("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:r.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:o.eventDataKeys.concat(["label","value"])}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:d({},{keys:o.eventDataKeys}),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r.outsidetextfont,textposition:r.textposition,sort:e.sort,root:t.root,domain:M({name:"icicle",trace:!0,editType:"calc"})}}}),pE=Ze({"src/traces/icicle/layout_attributes.js"(Z,q){"use strict";q.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),kN=Ze({"src/traces/icicle/defaults.js"(Z,q){"use strict";var d=ca(),x=hE(),A=Yn(),M=bc().defaults,e=gd().handleText,t=Q0().TEXTPAD,r=og().handleMarkerDefaults,o=rc(),a=o.hasColorscale,i=o.handleDefaults;q.exports=function(s,c,f,g){function v(b,p){return d.coerce(s,c,x,b,p)}var T=v("labels"),l=v("parents");if(!T||!T.length||!l||!l.length){c.visible=!1;return}var _=v("values");_&&_.length?v("branchvalues"):v("count"),v("level"),v("maxdepth"),v("tiling.orientation"),v("tiling.flip"),v("tiling.pad");var w=v("text");v("texttemplate"),c.texttemplate||v("textinfo",d.isArrayOrTypedArray(w)?"text+label":"label"),v("hovertext"),v("hovertemplate");var S=v("pathbar.visible"),E="auto";e(s,c,g,v,E,{hasPathbar:S,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition"),r(s,c,g,v);var y=c._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;y&&i(s,c,g,v,{prefix:"marker.",cLetter:"c"}),v("leaf.opacity",y?1:.7),c._hovered={marker:{line:{width:2,color:A.contrast(g.paper_bgcolor)}}},S&&(v("pathbar.thickness",c.pathbar.textfont.size+2*t),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),M(c,g,v),c._length=null}}}),LN=Ze({"src/traces/icicle/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=pE();q.exports=function(M,e){function t(r,o){return d.coerce(M,e,x,r,o)}t("iciclecolorway",e.colorway),t("extendiciclecolors")}}}),dE=Ze({"src/traces/icicle/calc.js"(Z){"use strict";var q=$_();Z.calc=function(d,x){return q.calc(d,x)},Z.crossTraceCalc=function(d){return q._runCrossTraceCalc("icicle",d)}}}),PN=Ze({"src/traces/icicle/partition.js"(Z,q){"use strict";var d=J_(),x=uE();q.exports=function(M,e,t){var r=t.flipX,o=t.flipY,a=t.orientation==="h",i=t.maxDepth,n=e[0],s=e[1];i&&(n=(M.height+1)*e[0]/Math.min(M.height+1,i),s=(M.height+1)*e[1]/Math.min(M.height+1,i));var c=d.partition().padding(t.pad.inner).size(a?[e[1],n]:[e[0],s])(M);return(a||r||o)&&x(c,e,{swapXY:a,flipX:r,flipY:o}),c}}}),vE=Ze({"src/traces/icicle/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=ca(),M=Ap().resizeText,e=Y3();function t(o){var a=o._fullLayout._iciclelayer.selectAll(".trace");M(o,a,"icicle"),a.each(function(i){var n=d.select(this),s=i[0],c=s.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(f){d.select(this).call(r,f,c,o)})})}function r(o,a,i,n){var s=a.data.data,c=!a.children,f=s.i,g=A.castOption(i,f,"marker.line.color")||x.defaultLine,v=A.castOption(i,f,"marker.line.width")||0;o.call(e,a,i,n).style("stroke-width",v).call(x.stroke,g).style("opacity",c?i.leaf.opacity:null)}q.exports={style:t,styleOne:r}}}),IN=Ze({"src/traces/icicle/draw_descendants.js"(Z,q){"use strict";var d=On(),x=ca(),A=as(),M=fu(),e=PN(),t=vE().styleOne,r=pg(),o=$v(),a=dx(),i=K3().formatSliceLabel,n=!1;q.exports=function(c,f,g,v,T){var l=T.width,_=T.height,w=T.viewX,S=T.viewY,E=T.pathSlice,y=T.toMoveInsideSlice,b=T.strTransform,p=T.hasTransition,u=T.handleSlicesExit,m=T.makeUpdateSliceInterpolator,h=T.makeUpdateTextInterpolator,P=T.prevEntry,L={},z=c._context.staticPlot,F=c._fullLayout,B=f[0],O=B.trace,I=O.textposition.indexOf("left")!==-1,N=O.textposition.indexOf("right")!==-1,U=O.textposition.indexOf("bottom")!==-1,W=e(g,[l,_],{flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,orientation:O.tiling.orientation,pad:{inner:O.tiling.pad},maxDepth:O._maxDepth}),Q=W.descendants(),ue=1/0,le=-1/0;Q.forEach(function(X){var oe=X.depth;oe>=O._maxDepth?(X.x0=X.x1=(X.x0+X.x1)/2,X.y0=X.y1=(X.y0+X.y1)/2):(ue=Math.min(ue,oe),le=Math.max(le,oe))}),v=v.data(Q,o.getPtId),O._maxVisibleLayers=isFinite(le)?le-ue+1:0,v.enter().append("g").classed("slice",!0),u(v,n,L,[l,_],E),v.order();var he=null;if(p&&P){var G=o.getPtId(P);v.each(function(X){he===null&&o.getPtId(X)===G&&(he={x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1})})}var $=function(){return he||{x0:0,x1:l,y0:0,y1:_}},J=v;return p&&(J=J.transition().each("end",function(){var X=d.select(this);o.setSliceCursor(X,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),J.each(function(X){X._x0=w(X.x0),X._x1=w(X.x1),X._y0=S(X.y0),X._y1=S(X.y1),X._hoverX=w(X.x1-O.tiling.pad),X._hoverY=S(U?X.y1-O.tiling.pad/2:X.y0+O.tiling.pad/2);var oe=d.select(this),ie=x.ensureSingle(oe,"path","surface",function(ce){ce.style("pointer-events",z?"none":"all")});p?ie.transition().attrTween("d",function(ce){var be=m(ce,n,$(),[l,_],{orientation:O.tiling.orientation,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1});return function(Ae){return E(be(Ae))}}):ie.attr("d",E),oe.call(a,g,c,f,{styleOne:t,eventDataKeys:r.eventDataKeys,transitionTime:r.CLICK_TRANSITION_TIME,transitionEasing:r.CLICK_TRANSITION_EASING}).call(o.setSliceCursor,c,{isTransitioning:c._transitioning}),ie.call(t,X,O,c,{hovered:!1}),X.x0===X.x1||X.y0===X.y1?X._text="":X._text=i(X,g,O,f,F)||"";var j=x.ensureSingle(oe,"g","slicetext"),ee=x.ensureSingle(j,"text","",function(ce){ce.attr("data-notex",1)}),re=x.ensureUniformFontSize(c,o.determineTextFont(O,X,F.font));ee.text(X._text||" ").classed("slicetext",!0).attr("text-anchor",N?"end":I?"start":"middle").call(A.font,re).call(M.convertToTspans,c),X.textBB=A.bBox(ee.node()),X.transform=y(X,{fontSize:re.size}),X.transform.fontSize=re.size,p?ee.transition().attrTween("transform",function(ce){var be=h(ce,n,$(),[l,_]);return function(Ae){return b(be(Ae))}}):ee.attr("transform",b(X))}),he}}}),RN=Ze({"src/traces/icicle/plot.js"(Z,q){"use strict";var d=fE(),x=IN();q.exports=function(M,e,t,r){return d(M,e,t,r,{type:"icicle",drawDescendants:x})}}}),DN=Ze({"src/traces/icicle/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"icicle",basePlotModule:CN(),categories:[],animatable:!0,attributes:hE(),layoutAttributes:pE(),supplyDefaults:kN(),supplyLayoutDefaults:LN(),calc:dE().calc,crossTraceCalc:dE().crossTraceCalc,plot:RN(),style:vE().style,colorbar:hp(),meta:{}}}}),zN=Ze({"lib/icicle.js"(Z,q){"use strict";q.exports=DN()}}),FN=Ze({"src/traces/funnelarea/base_plot.js"(Z){"use strict";var q=xc();Z.name="funnelarea",Z.plot=function(d,x,A,M){q.plotBasePlot(Z.name,d,x,A,M)},Z.clean=function(d,x,A,M){q.cleanBasePlot(Z.name,d,x,A,M)}}}),mE=Ze({"src/traces/funnelarea/attributes.js"(Z,q){"use strict";var d=ng(),x=eu(),A=bc().attributes,M=Cs().hovertemplateAttrs,e=Cs().texttemplateAttrs,t=rs().extendFlat;q.exports={labels:d.labels,label0:d.label0,dlabel:d.dlabel,values:d.values,marker:{colors:d.marker.colors,line:{color:t({},d.marker.line.color,{dflt:null}),width:t({},d.marker.line.width,{dflt:1}),editType:"calc"},pattern:d.marker.pattern,editType:"calc"},text:d.text,hovertext:d.hovertext,scalegroup:t({},d.scalegroup,{}),textinfo:t({},d.textinfo,{flags:["label","text","value","percent"]}),texttemplate:e({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:t({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:M({},{keys:["label","color","value","text","percent"]}),textposition:t({},d.textposition,{values:["inside","none"],dflt:"inside"}),textfont:d.textfont,insidetextfont:d.insidetextfont,title:{text:d.title.text,font:d.title.font,position:t({},d.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:A({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"}}}}),gE=Ze({"src/traces/funnelarea/layout_attributes.js"(Z,q){"use strict";var d=_3().hiddenlabels;q.exports={hiddenlabels:d,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),ON=Ze({"src/traces/funnelarea/defaults.js"(Z,q){"use strict";var d=ca(),x=mE(),A=bc().defaults,M=gd().handleText,e=og().handleLabelsAndValues,t=og().handleMarkerDefaults;q.exports=function(o,a,i,n){function s(E,y){return d.coerce(o,a,x,E,y)}var c=s("labels"),f=s("values"),g=e(c,f),v=g.len;if(a._hasLabels=g.hasLabels,a._hasValues=g.hasValues,!a._hasLabels&&a._hasValues&&(s("label0"),s("dlabel")),!v){a.visible=!1;return}a._length=v,t(o,a,n,s),s("scalegroup");var T=s("text"),l=s("texttemplate"),_;if(l||(_=s("textinfo",Array.isArray(T)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),l||_&&_!=="none"){var w=s("textposition");M(o,a,n,s,w,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else _==="none"&&s("textposition","none");A(a,n,s);var S=s("title.text");S&&(s("title.position"),d.coerceFont(s,"title.font",n.font)),s("aspectratio"),s("baseratio")}}}),BN=Ze({"src/traces/funnelarea/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=gE();q.exports=function(M,e){function t(r,o){return d.coerce(M,e,x,r,o)}t("hiddenlabels"),t("funnelareacolorway",e.colorway),t("extendfunnelareacolors")}}}),yE=Ze({"src/traces/funnelarea/calc.js"(Z,q){"use strict";var d=x1();function x(M,e){return d.calc(M,e)}function A(M){d.crossTraceCalc(M,{type:"funnelarea"})}q.exports={calc:x,crossTraceCalc:A}}}),NN=Ze({"src/traces/funnelarea/plot.js"(Z,q){"use strict";var d=On(),x=as(),A=ca(),M=A.strScale,e=A.strTranslate,t=fu(),r=eg(),o=r.toMoveInsideBar,a=Ap(),i=a.recordMinTextSize,n=a.clearMinTextSize,s=e0(),c=x3(),f=c.attachFxHandlers,g=c.determineInsideTextFont,v=c.layoutAreas,T=c.prerenderTitles,l=c.positionTitleOutside,_=c.formatSliceLabel;q.exports=function(b,p){var u=b._context.staticPlot,m=b._fullLayout;n("funnelarea",m),T(p,b),v(p,m._size),A.makeTraceGroups(m._funnelarealayer,p,"trace").each(function(h){var P=d.select(this),L=h[0],z=L.trace;E(h),P.each(function(){var F=d.select(this).selectAll("g.slice").data(h);F.enter().append("g").classed("slice",!0),F.exit().remove(),F.each(function(O,I){if(O.hidden){d.select(this).selectAll("path,g").remove();return}O.pointNumber=O.i,O.curveNumber=z.index;var N=L.cx,U=L.cy,W=d.select(this),Q=W.selectAll("path.surface").data([O]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),W.call(f,b,h);var ue="M"+(N+O.TR[0])+","+(U+O.TR[1])+w(O.TR,O.BR)+w(O.BR,O.BL)+w(O.BL,O.TL)+"Z";Q.attr("d",ue),_(b,O,L);var le=s.castOption(z.textposition,O.pts),he=W.selectAll("g.slicetext").data(O.text&&le!=="none"?[0]:[]);he.enter().append("g").classed("slicetext",!0),he.exit().remove(),he.each(function(){var G=A.ensureSingle(d.select(this),"text","",function(re){re.attr("data-notex",1)}),$=A.ensureUniformFontSize(b,g(z,O,m.font));G.text(O.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,$).call(t.convertToTspans,b);var J=x.bBox(G.node()),X,oe,ie,j=Math.min(O.BL[1],O.BR[1])+U,ee=Math.max(O.TL[1],O.TR[1])+U;oe=Math.max(O.TL[0],O.BL[0])+N,ie=Math.min(O.TR[0],O.BR[0])+N,X=o(oe,ie,j,ee,J,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),X.fontSize=$.size,i(z.type,X,m),h[I].transform=X,A.setTransormAndDisplay(G,X)})});var B=d.select(this).selectAll("g.titletext").data(z.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var O=A.ensureSingle(d.select(this),"text","",function(U){U.attr("data-notex",1)}),I=z.title.text;z._meta&&(I=A.templateString(I,z._meta)),O.text(I).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,z.title.font).call(t.convertToTspans,b);var N=l(L,m._size);O.attr("transform",e(N.x,N.y)+M(Math.min(1,N.scale))+e(N.tx,N.ty))})})})};function w(y,b){var p=b[0]-y[0],u=b[1]-y[1];return"l"+p+","+u}function S(y,b){return[.5*(y[0]+b[0]),.5*(y[1]+b[1])]}function E(y){if(!y.length)return;var b=y[0],p=b.trace,u=p.aspectratio,m=p.baseratio;m>.999&&(m=.999);var h=Math.pow(m,2),P=b.vTotal,L=P*h/(1-h),z=P,F=L/P;function B(){var ce=Math.sqrt(F);return{x:ce,y:-ce}}function O(){var ce=B();return[ce.x,ce.y]}var I,N=[];N.push(O());var U,W;for(U=y.length-1;U>-1;U--)if(W=y[U],!W.hidden){var Q=W.v/z;F+=Q,N.push(O())}var ue=1/0,le=-1/0;for(U=0;U<N.length;U++)I=N[U],ue=Math.min(ue,I[1]),le=Math.max(le,I[1]);for(U=0;U<N.length;U++)N[U][1]-=(le+ue)/2;var he=N[N.length-1][0],G=b.r,$=(le-ue)/2,J=G/he,X=G/$*u;for(b.r=X*$,U=0;U<N.length;U++)N[U][0]*=J,N[U][1]*=X;I=N[0];var oe=[-I[0],I[1]],ie=[I[0],I[1]],j=0;for(U=y.length-1;U>-1;U--)if(W=y[U],!W.hidden){j+=1;var ee=N[j][0],re=N[j][1];W.TL=[-ee,re],W.TR=[ee,re],W.BL=oe,W.BR=ie,W.pxmid=S(W.TR,W.BR),oe=W.TL,ie=W.TR}}}}),UN=Ze({"src/traces/funnelarea/style.js"(Z,q){"use strict";var d=On(),x=i1(),A=Ap().resizeText;q.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");A(e,t,"funnelarea"),t.each(function(r){var o=r[0],a=o.trace,i=d.select(this);i.style({opacity:a.opacity}),i.selectAll("path.surface").each(function(n){d.select(this).call(x,n,a,e)})})}}}),jN=Ze({"src/traces/funnelarea/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"funnelarea",basePlotModule:FN(),categories:["pie-like","funnelarea","showLegend"],attributes:mE(),layoutAttributes:gE(),supplyDefaults:ON(),supplyLayoutDefaults:BN(),calc:yE().calc,crossTraceCalc:yE().crossTraceCalc,plot:NN(),style:UN(),styleOne:i1(),meta:{}}}}),qN=Ze({"lib/funnelarea.js"(Z,q){"use strict";q.exports=jN()}}),Yh=Ze({"stackgl_modules/index.js"(Z,q){(function(){var d={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){"use strict";var o;function a(Ce,Te){if(!(Ce instanceof Te))throw new TypeError("Cannot call a class as a function")}function i(Ce,Te){for(var Pe=0;Pe<Te.length;Pe++){var at=Te[Pe];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(Ce,s(at.key),at)}}function n(Ce,Te,Pe){return Te&&i(Ce.prototype,Te),Pe&&i(Ce,Pe),Object.defineProperty(Ce,"prototype",{writable:!1}),Ce}function s(Ce){var Te=c(Ce,"string");return S(Te)=="symbol"?Te:Te+""}function c(Ce,Te){if(S(Ce)!="object"||!Ce)return Ce;var Pe=Ce[Symbol.toPrimitive];if(Pe!==void 0){var at=Pe.call(Ce,Te||"default");if(S(at)!="object")return at;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Te==="string"?String:Number)(Ce)}function f(Ce,Te,Pe){return Te=l(Te),g(Ce,T()?Reflect.construct(Te,Pe||[],l(Ce).constructor):Te.apply(Ce,Pe))}function g(Ce,Te){if(Te&&(S(Te)=="object"||typeof Te=="function"))return Te;if(Te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(Ce)}function v(Ce){if(Ce===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ce}function T(){try{var Ce=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T=function(){return!!Ce})()}function l(Ce){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Te){return Te.__proto__||Object.getPrototypeOf(Te)},l(Ce)}function _(Ce,Te){if(typeof Te!="function"&&Te!==null)throw new TypeError("Super expression must either be null or a function");Ce.prototype=Object.create(Te&&Te.prototype,{constructor:{value:Ce,writable:!0,configurable:!0}}),Object.defineProperty(Ce,"prototype",{writable:!1}),Te&&w(Ce,Te)}function w(Ce,Te){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Pe,at){return Pe.__proto__=at,Pe},w(Ce,Te)}function S(Ce){"@babel/helpers - typeof";return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},S(Ce)}var E=r(7507),y=r(3778),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=h,o=Q,t.IS=50;var p=2147483647;o=p,h.TYPED_ARRAY_SUPPORT=u(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&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 u(){try{var Ce=new Uint8Array(1),Te={foo:function(){return 42}};return Object.setPrototypeOf(Te,Uint8Array.prototype),Object.setPrototypeOf(Ce,Te),Ce.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(Ce){if(Ce>p)throw new RangeError('The value "'+Ce+'" is invalid for option "size"');var Te=new Uint8Array(Ce);return Object.setPrototypeOf(Te,h.prototype),Te}function h(Ce,Te,Pe){if(typeof Ce=="number"){if(typeof Te=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(Ce)}return P(Ce,Te,Pe)}h.poolSize=8192;function P(Ce,Te,Pe){if(typeof Ce=="string")return B(Ce,Te);if(ArrayBuffer.isView(Ce))return I(Ce);if(Ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+S(Ce));if(Be(Ce,ArrayBuffer)||Ce&&Be(Ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(Ce,SharedArrayBuffer)||Ce&&Be(Ce.buffer,SharedArrayBuffer)))return N(Ce,Te,Pe);if(typeof Ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var at=Ce.valueOf&&Ce.valueOf();if(at!=null&&at!==Ce)return h.from(at,Te,Pe);var yt=U(Ce);if(yt)return yt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ce[Symbol.toPrimitive]=="function")return h.from(Ce[Symbol.toPrimitive]("string"),Te,Pe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+S(Ce))}h.from=function(Ce,Te,Pe){return P(Ce,Te,Pe)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function L(Ce){if(typeof Ce!="number")throw new TypeError('"size" argument must be of type number');if(Ce<0)throw new RangeError('The value "'+Ce+'" is invalid for option "size"')}function z(Ce,Te,Pe){return L(Ce),Ce<=0?m(Ce):Te!==void 0?typeof Pe=="string"?m(Ce).fill(Te,Pe):m(Ce).fill(Te):m(Ce)}h.alloc=function(Ce,Te,Pe){return z(Ce,Te,Pe)};function F(Ce){return L(Ce),m(Ce<0?0:W(Ce)|0)}h.allocUnsafe=function(Ce){return F(Ce)},h.allocUnsafeSlow=function(Ce){return F(Ce)};function B(Ce,Te){if((typeof Te!="string"||Te==="")&&(Te="utf8"),!h.isEncoding(Te))throw new TypeError("Unknown encoding: "+Te);var Pe=ue(Ce,Te)|0,at=m(Pe),yt=at.write(Ce,Te);return yt!==Pe&&(at=at.slice(0,yt)),at}function O(Ce){for(var Te=Ce.length<0?0:W(Ce.length)|0,Pe=m(Te),at=0;at<Te;at+=1)Pe[at]=Ce[at]&255;return Pe}function I(Ce){if(Be(Ce,Uint8Array)){var Te=new Uint8Array(Ce);return N(Te.buffer,Te.byteOffset,Te.byteLength)}return O(Ce)}function N(Ce,Te,Pe){if(Te<0||Ce.byteLength<Te)throw new RangeError('"offset" is outside of buffer bounds');if(Ce.byteLength<Te+(Pe||0))throw new RangeError('"length" is outside of buffer bounds');var at;return Te===void 0&&Pe===void 0?at=new Uint8Array(Ce):Pe===void 0?at=new Uint8Array(Ce,Te):at=new Uint8Array(Ce,Te,Pe),Object.setPrototypeOf(at,h.prototype),at}function U(Ce){if(h.isBuffer(Ce)){var Te=W(Ce.length)|0,Pe=m(Te);return Pe.length===0||Ce.copy(Pe,0,0,Te),Pe}if(Ce.length!==void 0)return typeof Ce.length!="number"||Ke(Ce.length)?m(0):O(Ce);if(Ce.type==="Buffer"&&Array.isArray(Ce.data))return O(Ce.data)}function W(Ce){if(Ce>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return Ce|0}function Q(Ce){return+Ce!=Ce&&(Ce=0),h.alloc(+Ce)}h.isBuffer=function(Te){return Te!=null&&Te._isBuffer===!0&&Te!==h.prototype},h.compare=function(Te,Pe){if(Be(Te,Uint8Array)&&(Te=h.from(Te,Te.offset,Te.byteLength)),Be(Pe,Uint8Array)&&(Pe=h.from(Pe,Pe.offset,Pe.byteLength)),!h.isBuffer(Te)||!h.isBuffer(Pe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Te===Pe)return 0;for(var at=Te.length,yt=Pe.length,Tt=0,Ot=Math.min(at,yt);Tt<Ot;++Tt)if(Te[Tt]!==Pe[Tt]){at=Te[Tt],yt=Pe[Tt];break}return at<yt?-1:yt<at?1:0},h.isEncoding=function(Te){switch(String(Te).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}},h.concat=function(Te,Pe){if(!Array.isArray(Te))throw new TypeError('"list" argument must be an Array of Buffers');if(Te.length===0)return h.alloc(0);var at;if(Pe===void 0)for(Pe=0,at=0;at<Te.length;++at)Pe+=Te[at].length;var yt=h.allocUnsafe(Pe),Tt=0;for(at=0;at<Te.length;++at){var Ot=Te[at];if(Be(Ot,Uint8Array))Tt+Ot.length>yt.length?(h.isBuffer(Ot)||(Ot=h.from(Ot)),Ot.copy(yt,Tt)):Uint8Array.prototype.set.call(yt,Ot,Tt);else if(h.isBuffer(Ot))Ot.copy(yt,Tt);else throw new TypeError('"list" argument must be an Array of Buffers');Tt+=Ot.length}return yt};function ue(Ce,Te){if(h.isBuffer(Ce))return Ce.length;if(ArrayBuffer.isView(Ce)||Be(Ce,ArrayBuffer))return Ce.byteLength;if(typeof Ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+S(Ce));var Pe=Ce.length,at=arguments.length>2&&arguments[2]===!0;if(!at&&Pe===0)return 0;for(var yt=!1;;)switch(Te){case"ascii":case"latin1":case"binary":return Pe;case"utf8":case"utf-8":return xr(Ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe*2;case"hex":return Pe>>>1;case"base64":return Ir(Ce).length;default:if(yt)return at?-1:xr(Ce).length;Te=(""+Te).toLowerCase(),yt=!0}}h.byteLength=ue;function le(Ce,Te,Pe){var at=!1;if((Te===void 0||Te<0)&&(Te=0),Te>this.length||((Pe===void 0||Pe>this.length)&&(Pe=this.length),Pe<=0)||(Pe>>>=0,Te>>>=0,Pe<=Te))return"";for(Ce||(Ce="utf8");;)switch(Ce){case"hex":return Re(this,Te,Pe);case"utf8":case"utf-8":return re(this,Te,Pe);case"ascii":return Ae(this,Te,Pe);case"latin1":case"binary":return ze(this,Te,Pe);case"base64":return ee(this,Te,Pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,Te,Pe);default:if(at)throw new TypeError("Unknown encoding: "+Ce);Ce=(Ce+"").toLowerCase(),at=!0}}h.prototype._isBuffer=!0;function he(Ce,Te,Pe){var at=Ce[Te];Ce[Te]=Ce[Pe],Ce[Pe]=at}h.prototype.swap16=function(){var Te=this.length;if(Te%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Pe=0;Pe<Te;Pe+=2)he(this,Pe,Pe+1);return this},h.prototype.swap32=function(){var Te=this.length;if(Te%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Pe=0;Pe<Te;Pe+=4)he(this,Pe,Pe+3),he(this,Pe+1,Pe+2);return this},h.prototype.swap64=function(){var Te=this.length;if(Te%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Pe=0;Pe<Te;Pe+=8)he(this,Pe,Pe+7),he(this,Pe+1,Pe+6),he(this,Pe+2,Pe+5),he(this,Pe+3,Pe+4);return this},h.prototype.toString=function(){var Te=this.length;return Te===0?"":arguments.length===0?re(this,0,Te):le.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(Te){if(!h.isBuffer(Te))throw new TypeError("Argument must be a Buffer");return this===Te?!0:h.compare(this,Te)===0},h.prototype.inspect=function(){var Te="",Pe=t.IS;return Te=this.toString("hex",0,Pe).replace(/(.{2})/g,"$1 ").trim(),this.length>Pe&&(Te+=" ... "),"<Buffer "+Te+">"},b&&(h.prototype[b]=h.prototype.inspect),h.prototype.compare=function(Te,Pe,at,yt,Tt){if(Be(Te,Uint8Array)&&(Te=h.from(Te,Te.offset,Te.byteLength)),!h.isBuffer(Te))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+S(Te));if(Pe===void 0&&(Pe=0),at===void 0&&(at=Te?Te.length:0),yt===void 0&&(yt=0),Tt===void 0&&(Tt=this.length),Pe<0||at>Te.length||yt<0||Tt>this.length)throw new RangeError("out of range index");if(yt>=Tt&&Pe>=at)return 0;if(yt>=Tt)return-1;if(Pe>=at)return 1;if(Pe>>>=0,at>>>=0,yt>>>=0,Tt>>>=0,this===Te)return 0;for(var Ot=Tt-yt,Gt=at-Pe,rr=Math.min(Ot,Gt),Qt=this.slice(yt,Tt),Tr=Te.slice(Pe,at),la=0;la<rr;++la)if(Qt[la]!==Tr[la]){Ot=Qt[la],Gt=Tr[la];break}return Ot<Gt?-1:Gt<Ot?1:0};function G(Ce,Te,Pe,at,yt){if(Ce.length===0)return-1;if(typeof Pe=="string"?(at=Pe,Pe=0):Pe>2147483647?Pe=2147483647:Pe<-2147483648&&(Pe=-2147483648),Pe=+Pe,Ke(Pe)&&(Pe=yt?0:Ce.length-1),Pe<0&&(Pe=Ce.length+Pe),Pe>=Ce.length){if(yt)return-1;Pe=Ce.length-1}else if(Pe<0)if(yt)Pe=0;else return-1;if(typeof Te=="string"&&(Te=h.from(Te,at)),h.isBuffer(Te))return Te.length===0?-1:$(Ce,Te,Pe,at,yt);if(typeof Te=="number")return Te=Te&255,typeof Uint8Array.prototype.indexOf=="function"?yt?Uint8Array.prototype.indexOf.call(Ce,Te,Pe):Uint8Array.prototype.lastIndexOf.call(Ce,Te,Pe):$(Ce,[Te],Pe,at,yt);throw new TypeError("val must be string, number or Buffer")}function $(Ce,Te,Pe,at,yt){var Tt=1,Ot=Ce.length,Gt=Te.length;if(at!==void 0&&(at=String(at).toLowerCase(),at==="ucs2"||at==="ucs-2"||at==="utf16le"||at==="utf-16le")){if(Ce.length<2||Te.length<2)return-1;Tt=2,Ot/=2,Gt/=2,Pe/=2}function rr(Ba,Ra){return Tt===1?Ba[Ra]:Ba.readUInt16BE(Ra*Tt)}var Qt;if(yt){var Tr=-1;for(Qt=Pe;Qt<Ot;Qt++)if(rr(Ce,Qt)===rr(Te,Tr===-1?0:Qt-Tr)){if(Tr===-1&&(Tr=Qt),Qt-Tr+1===Gt)return Tr*Tt}else Tr!==-1&&(Qt-=Qt-Tr),Tr=-1}else for(Pe+Gt>Ot&&(Pe=Ot-Gt),Qt=Pe;Qt>=0;Qt--){for(var la=!0,Ua=0;Ua<Gt;Ua++)if(rr(Ce,Qt+Ua)!==rr(Te,Ua)){la=!1;break}if(la)return Qt}return-1}h.prototype.includes=function(Te,Pe,at){return this.indexOf(Te,Pe,at)!==-1},h.prototype.indexOf=function(Te,Pe,at){return G(this,Te,Pe,at,!0)},h.prototype.lastIndexOf=function(Te,Pe,at){return G(this,Te,Pe,at,!1)};function J(Ce,Te,Pe,at){Pe=Number(Pe)||0;var yt=Ce.length-Pe;at?(at=Number(at),at>yt&&(at=yt)):at=yt;var Tt=Te.length;at>Tt/2&&(at=Tt/2);var Ot;for(Ot=0;Ot<at;++Ot){var Gt=parseInt(Te.substr(Ot*2,2),16);if(Ke(Gt))return Ot;Ce[Pe+Ot]=Gt}return Ot}function X(Ce,Te,Pe,at){return bt(xr(Te,Ce.length-Pe),Ce,Pe,at)}function oe(Ce,Te,Pe,at){return bt(jr(Te),Ce,Pe,at)}function ie(Ce,Te,Pe,at){return bt(Ir(Te),Ce,Pe,at)}function j(Ce,Te,Pe,at){return bt(wr(Te,Ce.length-Pe),Ce,Pe,at)}h.prototype.write=function(Te,Pe,at,yt){if(Pe===void 0)yt="utf8",at=this.length,Pe=0;else if(at===void 0&&typeof Pe=="string")yt=Pe,at=this.length,Pe=0;else if(isFinite(Pe))Pe=Pe>>>0,isFinite(at)?(at=at>>>0,yt===void 0&&(yt="utf8")):(yt=at,at=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Tt=this.length-Pe;if((at===void 0||at>Tt)&&(at=Tt),Te.length>0&&(at<0||Pe<0)||Pe>this.length)throw new RangeError("Attempt to write outside buffer bounds");yt||(yt="utf8");for(var Ot=!1;;)switch(yt){case"hex":return J(this,Te,Pe,at);case"utf8":case"utf-8":return X(this,Te,Pe,at);case"ascii":case"latin1":case"binary":return oe(this,Te,Pe,at);case"base64":return ie(this,Te,Pe,at);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,Te,Pe,at);default:if(Ot)throw new TypeError("Unknown encoding: "+yt);yt=(""+yt).toLowerCase(),Ot=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(Ce,Te,Pe){return Te===0&&Pe===Ce.length?E.fromByteArray(Ce):E.fromByteArray(Ce.slice(Te,Pe))}function re(Ce,Te,Pe){Pe=Math.min(Ce.length,Pe);for(var at=[],yt=Te;yt<Pe;){var Tt=Ce[yt],Ot=null,Gt=Tt>239?4:Tt>223?3:Tt>191?2:1;if(yt+Gt<=Pe){var rr=void 0,Qt=void 0,Tr=void 0,la=void 0;switch(Gt){case 1:Tt<128&&(Ot=Tt);break;case 2:rr=Ce[yt+1],(rr&192)===128&&(la=(Tt&31)<<6|rr&63,la>127&&(Ot=la));break;case 3:rr=Ce[yt+1],Qt=Ce[yt+2],(rr&192)===128&&(Qt&192)===128&&(la=(Tt&15)<<12|(rr&63)<<6|Qt&63,la>2047&&(la<55296||la>57343)&&(Ot=la));break;case 4:rr=Ce[yt+1],Qt=Ce[yt+2],Tr=Ce[yt+3],(rr&192)===128&&(Qt&192)===128&&(Tr&192)===128&&(la=(Tt&15)<<18|(rr&63)<<12|(Qt&63)<<6|Tr&63,la>65535&&la<1114112&&(Ot=la))}}Ot===null?(Ot=65533,Gt=1):Ot>65535&&(Ot-=65536,at.push(Ot>>>10&1023|55296),Ot=56320|Ot&1023),at.push(Ot),yt+=Gt}return be(at)}var ce=4096;function be(Ce){var Te=Ce.length;if(Te<=ce)return String.fromCharCode.apply(String,Ce);for(var Pe="",at=0;at<Te;)Pe+=String.fromCharCode.apply(String,Ce.slice(at,at+=ce));return Pe}function Ae(Ce,Te,Pe){var at="";Pe=Math.min(Ce.length,Pe);for(var yt=Te;yt<Pe;++yt)at+=String.fromCharCode(Ce[yt]&127);return at}function ze(Ce,Te,Pe){var at="";Pe=Math.min(Ce.length,Pe);for(var yt=Te;yt<Pe;++yt)at+=String.fromCharCode(Ce[yt]);return at}function Re(Ce,Te,Pe){var at=Ce.length;(!Te||Te<0)&&(Te=0),(!Pe||Pe<0||Pe>at)&&(Pe=at);for(var yt="",Tt=Te;Tt<Pe;++Tt)yt+=Ue[Ce[Tt]];return yt}function Xe(Ce,Te,Pe){for(var at=Ce.slice(Te,Pe),yt="",Tt=0;Tt<at.length-1;Tt+=2)yt+=String.fromCharCode(at[Tt]+at[Tt+1]*256);return yt}h.prototype.slice=function(Te,Pe){var at=this.length;Te=~~Te,Pe=Pe===void 0?at:~~Pe,Te<0?(Te+=at,Te<0&&(Te=0)):Te>at&&(Te=at),Pe<0?(Pe+=at,Pe<0&&(Pe=0)):Pe>at&&(Pe=at),Pe<Te&&(Pe=Te);var yt=this.subarray(Te,Pe);return Object.setPrototypeOf(yt,h.prototype),yt};function it(Ce,Te,Pe){if(Ce%1!==0||Ce<0)throw new RangeError("offset is not uint");if(Ce+Te>Pe)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(Te,Pe,at){Te=Te>>>0,Pe=Pe>>>0,at||it(Te,Pe,this.length);for(var yt=this[Te],Tt=1,Ot=0;++Ot<Pe&&(Tt*=256);)yt+=this[Te+Ot]*Tt;return yt},h.prototype.readUintBE=h.prototype.readUIntBE=function(Te,Pe,at){Te=Te>>>0,Pe=Pe>>>0,at||it(Te,Pe,this.length);for(var yt=this[Te+--Pe],Tt=1;Pe>0&&(Tt*=256);)yt+=this[Te+--Pe]*Tt;return yt},h.prototype.readUint8=h.prototype.readUInt8=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,1,this.length),this[Te]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,2,this.length),this[Te]|this[Te+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,2,this.length),this[Te]<<8|this[Te+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,4,this.length),(this[Te]|this[Te+1]<<8|this[Te+2]<<16)+this[Te+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,4,this.length),this[Te]*16777216+(this[Te+1]<<16|this[Te+2]<<8|this[Te+3])},h.prototype.readBigUInt64LE=Me(function(Te){Te=Te>>>0,kt(Te,"offset");var Pe=this[Te],at=this[Te+7];(Pe===void 0||at===void 0)&&Vt(Te,this.length-8);var yt=Pe+this[++Te]*Math.pow(2,8)+this[++Te]*Math.pow(2,16)+this[++Te]*Math.pow(2,24),Tt=this[++Te]+this[++Te]*Math.pow(2,8)+this[++Te]*Math.pow(2,16)+at*Math.pow(2,24);return BigInt(yt)+(BigInt(Tt)<<BigInt(32))}),h.prototype.readBigUInt64BE=Me(function(Te){Te=Te>>>0,kt(Te,"offset");var Pe=this[Te],at=this[Te+7];(Pe===void 0||at===void 0)&&Vt(Te,this.length-8);var yt=Pe*Math.pow(2,24)+this[++Te]*Math.pow(2,16)+this[++Te]*Math.pow(2,8)+this[++Te],Tt=this[++Te]*Math.pow(2,24)+this[++Te]*Math.pow(2,16)+this[++Te]*Math.pow(2,8)+at;return(BigInt(yt)<<BigInt(32))+BigInt(Tt)}),h.prototype.readIntLE=function(Te,Pe,at){Te=Te>>>0,Pe=Pe>>>0,at||it(Te,Pe,this.length);for(var yt=this[Te],Tt=1,Ot=0;++Ot<Pe&&(Tt*=256);)yt+=this[Te+Ot]*Tt;return Tt*=128,yt>=Tt&&(yt-=Math.pow(2,8*Pe)),yt},h.prototype.readIntBE=function(Te,Pe,at){Te=Te>>>0,Pe=Pe>>>0,at||it(Te,Pe,this.length);for(var yt=Pe,Tt=1,Ot=this[Te+--yt];yt>0&&(Tt*=256);)Ot+=this[Te+--yt]*Tt;return Tt*=128,Ot>=Tt&&(Ot-=Math.pow(2,8*Pe)),Ot},h.prototype.readInt8=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,1,this.length),this[Te]&128?(255-this[Te]+1)*-1:this[Te]},h.prototype.readInt16LE=function(Te,Pe){Te=Te>>>0,Pe||it(Te,2,this.length);var at=this[Te]|this[Te+1]<<8;return at&32768?at|4294901760:at},h.prototype.readInt16BE=function(Te,Pe){Te=Te>>>0,Pe||it(Te,2,this.length);var at=this[Te+1]|this[Te]<<8;return at&32768?at|4294901760:at},h.prototype.readInt32LE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,4,this.length),this[Te]|this[Te+1]<<8|this[Te+2]<<16|this[Te+3]<<24},h.prototype.readInt32BE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,4,this.length),this[Te]<<24|this[Te+1]<<16|this[Te+2]<<8|this[Te+3]},h.prototype.readBigInt64LE=Me(function(Te){Te=Te>>>0,kt(Te,"offset");var Pe=this[Te],at=this[Te+7];(Pe===void 0||at===void 0)&&Vt(Te,this.length-8);var yt=this[Te+4]+this[Te+5]*Math.pow(2,8)+this[Te+6]*Math.pow(2,16)+(at<<24);return(BigInt(yt)<<BigInt(32))+BigInt(Pe+this[++Te]*Math.pow(2,8)+this[++Te]*Math.pow(2,16)+this[++Te]*Math.pow(2,24))}),h.prototype.readBigInt64BE=Me(function(Te){Te=Te>>>0,kt(Te,"offset");var Pe=this[Te],at=this[Te+7];(Pe===void 0||at===void 0)&&Vt(Te,this.length-8);var yt=(Pe<<24)+this[++Te]*Math.pow(2,16)+this[++Te]*Math.pow(2,8)+this[++Te];return(BigInt(yt)<<BigInt(32))+BigInt(this[++Te]*Math.pow(2,24)+this[++Te]*Math.pow(2,16)+this[++Te]*Math.pow(2,8)+at)}),h.prototype.readFloatLE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,4,this.length),y.read(this,Te,!0,23,4)},h.prototype.readFloatBE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,4,this.length),y.read(this,Te,!1,23,4)},h.prototype.readDoubleLE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,8,this.length),y.read(this,Te,!0,52,8)},h.prototype.readDoubleBE=function(Te,Pe){return Te=Te>>>0,Pe||it(Te,8,this.length),y.read(this,Te,!1,52,8)};function ot(Ce,Te,Pe,at,yt,Tt){if(!h.isBuffer(Ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(Te>yt||Te<Tt)throw new RangeError('"value" argument is out of bounds');if(Pe+at>Ce.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(Te,Pe,at,yt){if(Te=+Te,Pe=Pe>>>0,at=at>>>0,!yt){var Tt=Math.pow(2,8*at)-1;ot(this,Te,Pe,at,Tt,0)}var Ot=1,Gt=0;for(this[Pe]=Te&255;++Gt<at&&(Ot*=256);)this[Pe+Gt]=Te/Ot&255;return Pe+at},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(Te,Pe,at,yt){if(Te=+Te,Pe=Pe>>>0,at=at>>>0,!yt){var Tt=Math.pow(2,8*at)-1;ot(this,Te,Pe,at,Tt,0)}var Ot=at-1,Gt=1;for(this[Pe+Ot]=Te&255;--Ot>=0&&(Gt*=256);)this[Pe+Ot]=Te/Gt&255;return Pe+at},h.prototype.writeUint8=h.prototype.writeUInt8=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,1,255,0),this[Pe]=Te&255,Pe+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,2,65535,0),this[Pe]=Te&255,this[Pe+1]=Te>>>8,Pe+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,2,65535,0),this[Pe]=Te>>>8,this[Pe+1]=Te&255,Pe+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,4,4294967295,0),this[Pe+3]=Te>>>24,this[Pe+2]=Te>>>16,this[Pe+1]=Te>>>8,this[Pe]=Te&255,Pe+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,4,4294967295,0),this[Pe]=Te>>>24,this[Pe+1]=Te>>>16,this[Pe+2]=Te>>>8,this[Pe+3]=Te&255,Pe+4};function tt(Ce,Te,Pe,at,yt){Lt(Te,at,yt,Ce,Pe,7);var Tt=Number(Te&BigInt(4294967295));Ce[Pe++]=Tt,Tt=Tt>>8,Ce[Pe++]=Tt,Tt=Tt>>8,Ce[Pe++]=Tt,Tt=Tt>>8,Ce[Pe++]=Tt;var Ot=Number(Te>>BigInt(32)&BigInt(4294967295));return Ce[Pe++]=Ot,Ot=Ot>>8,Ce[Pe++]=Ot,Ot=Ot>>8,Ce[Pe++]=Ot,Ot=Ot>>8,Ce[Pe++]=Ot,Pe}function lt(Ce,Te,Pe,at,yt){Lt(Te,at,yt,Ce,Pe,7);var Tt=Number(Te&BigInt(4294967295));Ce[Pe+7]=Tt,Tt=Tt>>8,Ce[Pe+6]=Tt,Tt=Tt>>8,Ce[Pe+5]=Tt,Tt=Tt>>8,Ce[Pe+4]=Tt;var Ot=Number(Te>>BigInt(32)&BigInt(4294967295));return Ce[Pe+3]=Ot,Ot=Ot>>8,Ce[Pe+2]=Ot,Ot=Ot>>8,Ce[Pe+1]=Ot,Ot=Ot>>8,Ce[Pe]=Ot,Pe+8}h.prototype.writeBigUInt64LE=Me(function(Te){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return tt(this,Te,Pe,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Me(function(Te){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return lt(this,Te,Pe,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(Te,Pe,at,yt){if(Te=+Te,Pe=Pe>>>0,!yt){var Tt=Math.pow(2,8*at-1);ot(this,Te,Pe,at,Tt-1,-Tt)}var Ot=0,Gt=1,rr=0;for(this[Pe]=Te&255;++Ot<at&&(Gt*=256);)Te<0&&rr===0&&this[Pe+Ot-1]!==0&&(rr=1),this[Pe+Ot]=(Te/Gt>>0)-rr&255;return Pe+at},h.prototype.writeIntBE=function(Te,Pe,at,yt){if(Te=+Te,Pe=Pe>>>0,!yt){var Tt=Math.pow(2,8*at-1);ot(this,Te,Pe,at,Tt-1,-Tt)}var Ot=at-1,Gt=1,rr=0;for(this[Pe+Ot]=Te&255;--Ot>=0&&(Gt*=256);)Te<0&&rr===0&&this[Pe+Ot+1]!==0&&(rr=1),this[Pe+Ot]=(Te/Gt>>0)-rr&255;return Pe+at},h.prototype.writeInt8=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,1,127,-128),Te<0&&(Te=255+Te+1),this[Pe]=Te&255,Pe+1},h.prototype.writeInt16LE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,2,32767,-32768),this[Pe]=Te&255,this[Pe+1]=Te>>>8,Pe+2},h.prototype.writeInt16BE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,2,32767,-32768),this[Pe]=Te>>>8,this[Pe+1]=Te&255,Pe+2},h.prototype.writeInt32LE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,4,2147483647,-2147483648),this[Pe]=Te&255,this[Pe+1]=Te>>>8,this[Pe+2]=Te>>>16,this[Pe+3]=Te>>>24,Pe+4},h.prototype.writeInt32BE=function(Te,Pe,at){return Te=+Te,Pe=Pe>>>0,at||ot(this,Te,Pe,4,2147483647,-2147483648),Te<0&&(Te=4294967295+Te+1),this[Pe]=Te>>>24,this[Pe+1]=Te>>>16,this[Pe+2]=Te>>>8,this[Pe+3]=Te&255,Pe+4},h.prototype.writeBigInt64LE=Me(function(Te){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return tt(this,Te,Pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Me(function(Te){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return lt(this,Te,Pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ee(Ce,Te,Pe,at,yt,Tt){if(Pe+at>Ce.length)throw new RangeError("Index out of range");if(Pe<0)throw new RangeError("Index out of range")}function _e(Ce,Te,Pe,at,yt){return Te=+Te,Pe=Pe>>>0,yt||Ee(Ce,Te,Pe,4,34028234663852886e22,-34028234663852886e22),y.write(Ce,Te,Pe,at,23,4),Pe+4}h.prototype.writeFloatLE=function(Te,Pe,at){return _e(this,Te,Pe,!0,at)},h.prototype.writeFloatBE=function(Te,Pe,at){return _e(this,Te,Pe,!1,at)};function fe(Ce,Te,Pe,at,yt){return Te=+Te,Pe=Pe>>>0,yt||Ee(Ce,Te,Pe,8,17976931348623157e292,-17976931348623157e292),y.write(Ce,Te,Pe,at,52,8),Pe+8}h.prototype.writeDoubleLE=function(Te,Pe,at){return fe(this,Te,Pe,!0,at)},h.prototype.writeDoubleBE=function(Te,Pe,at){return fe(this,Te,Pe,!1,at)},h.prototype.copy=function(Te,Pe,at,yt){if(!h.isBuffer(Te))throw new TypeError("argument should be a Buffer");if(at||(at=0),!yt&&yt!==0&&(yt=this.length),Pe>=Te.length&&(Pe=Te.length),Pe||(Pe=0),yt>0&&yt<at&&(yt=at),yt===at||Te.length===0||this.length===0)return 0;if(Pe<0)throw new RangeError("targetStart out of bounds");if(at<0||at>=this.length)throw new RangeError("Index out of range");if(yt<0)throw new RangeError("sourceEnd out of bounds");yt>this.length&&(yt=this.length),Te.length-Pe<yt-at&&(yt=Te.length-Pe+at);var Tt=yt-at;return this===Te&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Pe,at,yt):Uint8Array.prototype.set.call(Te,this.subarray(at,yt),Pe),Tt},h.prototype.fill=function(Te,Pe,at,yt){if(typeof Te=="string"){if(typeof Pe=="string"?(yt=Pe,Pe=0,at=this.length):typeof at=="string"&&(yt=at,at=this.length),yt!==void 0&&typeof yt!="string")throw new TypeError("encoding must be a string");if(typeof yt=="string"&&!h.isEncoding(yt))throw new TypeError("Unknown encoding: "+yt);if(Te.length===1){var Tt=Te.charCodeAt(0);(yt==="utf8"&&Tt<128||yt==="latin1")&&(Te=Tt)}}else typeof Te=="number"?Te=Te&255:typeof Te=="boolean"&&(Te=Number(Te));if(Pe<0||this.length<Pe||this.length<at)throw new RangeError("Out of range index");if(at<=Pe)return this;Pe=Pe>>>0,at=at===void 0?this.length:at>>>0,Te||(Te=0);var Ot;if(typeof Te=="number")for(Ot=Pe;Ot<at;++Ot)this[Ot]=Te;else{var Gt=h.isBuffer(Te)?Te:h.from(Te,yt),rr=Gt.length;if(rr===0)throw new TypeError('The value "'+Te+'" is invalid for argument "value"');for(Ot=0;Ot<at-Pe;++Ot)this[Ot+Pe]=Gt[Ot%rr]}return this};var Fe={};function rt(Ce,Te,Pe){Fe[Ce]=function(at){function yt(){var Tt;return a(this,yt),Tt=f(this,yt),Object.defineProperty(Tt,"message",{value:Te.apply(Tt,arguments),writable:!0,configurable:!0}),Tt.name="".concat(Tt.name," [").concat(Ce,"]"),Tt.stack,delete Tt.name,Tt}return _(yt,at),n(yt,[{key:"code",get:function(){return Ce},set:function(Ot){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ot,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Ce,"]: ").concat(this.message)}}])}(Pe)}rt("ERR_BUFFER_OUT_OF_BOUNDS",function(Ce){return Ce?"".concat(Ce," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),rt("ERR_INVALID_ARG_TYPE",function(Ce,Te){return'The "'.concat(Ce,'" argument must be of type number. Received type ').concat(S(Te))},TypeError),rt("ERR_OUT_OF_RANGE",function(Ce,Te,Pe){var at='The value of "'.concat(Ce,'" is out of range.'),yt=Pe;return Number.isInteger(Pe)&&Math.abs(Pe)>Math.pow(2,32)?yt=st(String(Pe)):typeof Pe=="bigint"&&(yt=String(Pe),(Pe>Math.pow(BigInt(2),BigInt(32))||Pe<-Math.pow(BigInt(2),BigInt(32)))&&(yt=st(yt)),yt+="n"),at+=" It must be ".concat(Te,". Received ").concat(yt),at},RangeError);function st(Ce){for(var Te="",Pe=Ce.length,at=Ce[0]==="-"?1:0;Pe>=at+4;Pe-=3)Te="_".concat(Ce.slice(Pe-3,Pe)).concat(Te);return"".concat(Ce.slice(0,Pe)).concat(Te)}function Qe(Ce,Te,Pe){kt(Te,"offset"),(Ce[Te]===void 0||Ce[Te+Pe]===void 0)&&Vt(Te,Ce.length-(Pe+1))}function Lt(Ce,Te,Pe,at,yt,Tt){if(Ce>Pe||Ce<Te){var Ot=typeof Te=="bigint"?"n":"",Gt;throw Tt>3?Te===0||Te===BigInt(0)?Gt=">= 0".concat(Ot," and < 2").concat(Ot," ** ").concat((Tt+1)*8).concat(Ot):Gt=">= -(2".concat(Ot," ** ").concat((Tt+1)*8-1).concat(Ot,") and < 2 ** ")+"".concat((Tt+1)*8-1).concat(Ot):Gt=">= ".concat(Te).concat(Ot," and <= ").concat(Pe).concat(Ot),new Fe.ERR_OUT_OF_RANGE("value",Gt,Ce)}Qe(at,yt,Tt)}function kt(Ce,Te){if(typeof Ce!="number")throw new Fe.ERR_INVALID_ARG_TYPE(Te,"number",Ce)}function Vt(Ce,Te,Pe){throw Math.floor(Ce)!==Ce?(kt(Ce,Pe),new Fe.ERR_OUT_OF_RANGE(Pe||"offset","an integer",Ce)):Te<0?new Fe.ERR_BUFFER_OUT_OF_BOUNDS:new Fe.ERR_OUT_OF_RANGE(Pe||"offset",">= ".concat(Pe?1:0," and <= ").concat(Te),Ce)}var Zt=/[^+/0-9A-Za-z-_]/g;function Sr(Ce){if(Ce=Ce.split("=")[0],Ce=Ce.trim().replace(Zt,""),Ce.length<2)return"";for(;Ce.length%4!==0;)Ce=Ce+"=";return Ce}function xr(Ce,Te){Te=Te||1/0;for(var Pe,at=Ce.length,yt=null,Tt=[],Ot=0;Ot<at;++Ot){if(Pe=Ce.charCodeAt(Ot),Pe>55295&&Pe<57344){if(!yt){if(Pe>56319){(Te-=3)>-1&&Tt.push(239,191,189);continue}else if(Ot+1===at){(Te-=3)>-1&&Tt.push(239,191,189);continue}yt=Pe;continue}if(Pe<56320){(Te-=3)>-1&&Tt.push(239,191,189),yt=Pe;continue}Pe=(yt-55296<<10|Pe-56320)+65536}else yt&&(Te-=3)>-1&&Tt.push(239,191,189);if(yt=null,Pe<128){if((Te-=1)<0)break;Tt.push(Pe)}else if(Pe<2048){if((Te-=2)<0)break;Tt.push(Pe>>6|192,Pe&63|128)}else if(Pe<65536){if((Te-=3)<0)break;Tt.push(Pe>>12|224,Pe>>6&63|128,Pe&63|128)}else if(Pe<1114112){if((Te-=4)<0)break;Tt.push(Pe>>18|240,Pe>>12&63|128,Pe>>6&63|128,Pe&63|128)}else throw new Error("Invalid code point")}return Tt}function jr(Ce){for(var Te=[],Pe=0;Pe<Ce.length;++Pe)Te.push(Ce.charCodeAt(Pe)&255);return Te}function wr(Ce,Te){for(var Pe,at,yt,Tt=[],Ot=0;Ot<Ce.length&&!((Te-=2)<0);++Ot)Pe=Ce.charCodeAt(Ot),at=Pe>>8,yt=Pe%256,Tt.push(yt),Tt.push(at);return Tt}function Ir(Ce){return E.toByteArray(Sr(Ce))}function bt(Ce,Te,Pe,at){var yt;for(yt=0;yt<at&&!(yt+Pe>=Te.length||yt>=Ce.length);++yt)Te[yt+Pe]=Ce[yt];return yt}function Be(Ce,Te){return Ce instanceof Te||Ce!=null&&Ce.constructor!=null&&Ce.constructor.name!=null&&Ce.constructor.name===Te.name}function Ke(Ce){return Ce!==Ce}var Ue=function(){for(var Ce="0123456789abcdef",Te=new Array(256),Pe=0;Pe<16;++Pe)for(var at=Pe*16,yt=0;yt<16;++yt)Te[at+yt]=Ce[Pe]+Ce[yt];return Te}();function Me(Ce){return typeof BigInt>"u"?qe:Ce}function qe(){throw new Error("BigInt not supported")}},9216:function(e){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var t=/(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,r=/CrOS/,o=/android|ipad|playbook|silk/i;function a(i){i||(i={});var n=i.ua;if(!n&&typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),typeof n!="string")return!1;var s=t.test(n)&&!r.test(n)||!!i.tablet&&o.test(n);return!s&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&n.indexOf("Macintosh")!==-1&&n.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(e,t,r){"use strict";e.exports=c;var o=r(7261),a=r(9977),i=r(1811);function n(f,g){this._controllerNames=Object.keys(f),this._controllerList=this._controllerNames.map(function(v){return f[v]}),this._mode=g,this._active=f[g],this._active||(this._mode="turntable",this._active=f.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=n.prototype;s.flush=function(f){for(var g=this._controllerList,v=0;v<g.length;++v)g[v].flush(f)},s.idle=function(f){for(var g=this._controllerList,v=0;v<g.length;++v)g[v].idle(f)},s.lookAt=function(f,g,v,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].lookAt(f,g,v,T)},s.rotate=function(f,g,v,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].rotate(f,g,v,T)},s.pan=function(f,g,v,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].pan(f,g,v,T)},s.translate=function(f,g,v,T){for(var l=this._controllerList,_=0;_<l.length;++_)l[_].translate(f,g,v,T)},s.setMatrix=function(f,g){for(var v=this._controllerList,T=0;T<v.length;++T)v[T].setMatrix(f,g)},s.setDistanceLimits=function(f,g){for(var v=this._controllerList,T=0;T<v.length;++T)v[T].setDistanceLimits(f,g)},s.setDistance=function(f,g){for(var v=this._controllerList,T=0;T<v.length;++T)v[T].setDistance(f,g)},s.recalcMatrix=function(f){this._active.recalcMatrix(f)},s.getDistance=function(f){return this._active.getDistance(f)},s.getDistanceLimits=function(f){return this._active.getDistanceLimits(f)},s.lastT=function(){return this._active.lastT()},s.setMode=function(f){if(f!==this._mode){var g=this._controllerNames.indexOf(f);if(!(g<0)){var v=this._active,T=this._controllerList[g],l=Math.max(v.lastT(),T.lastT());v.recalcMatrix(l),T.setMatrix(l,v.computedMatrix),this._active=T,this._mode=f,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode};function c(f){f=f||{};var g=f.eye||[0,0,1],v=f.center||[0,0,0],T=f.up||[0,1,0],l=f.distanceLimits||[0,1/0],_=f.mode||"turntable",w=o(),S=a(),E=i();return w.setDistanceLimits(l[0],l[1]),w.lookAt(0,g,v,T),S.setDistanceLimits(l[0],l[1]),S.lookAt(0,g,v,T),E.setDistanceLimits(l[0],l[1]),E.lookAt(0,g,v,T),new n({turntable:w,orbit:S,matrix:E},_)}},7169:function(e,t,r){"use strict";var o=typeof WeakMap>"u"?r(1538):WeakMap,a=r(2762),i=r(8116),n=new o;function s(c){var f=n.get(c),g=f&&(f._triangleBuffer.handle||f._triangleBuffer.buffer);if(!g||!c.isBuffer(g)){var v=a(c,new Float32Array([-1,-1,-1,4,4,-1]));f=i(c,[{buffer:v,type:c.FLOAT,size:2}]),f._triangleBuffer=v,n.set(c,f)}f.bind(),c.drawArrays(c.TRIANGLES,0,3),f.unbind()}e.exports=s},1085:function(e,t,r){var o=r(1371);e.exports=a;function a(i,n,s){n=typeof n=="number"?n:1,s=s||": ";var c=i.split(/\r?\n/),f=String(c.length+n-1).length;return c.map(function(g,v){var T=v+n,l=String(T).length,_=o(T,f-l);return _+s+g}).join(`
`)}},3952:function(e,t,r){"use strict";e.exports=i;var o=r(3250);function a(n,s){for(var c=new Array(s+1),f=0;f<n.length;++f)c[f]=n[f];for(var f=0;f<=n.length;++f){for(var g=n.length;g<=s;++g){for(var v=new Array(s),T=0;T<s;++T)v[T]=Math.pow(g+1-f,T);c[g]=v}var l=o.apply(void 0,c);if(l)return!0}return!1}function i(n){var s=n.length;if(s===0)return[];if(s===1)return[0];for(var c=n[0].length,f=[n[0]],g=[0],v=1;v<s;++v){if(f.push(n[v]),!a(f,c)){f.pop();continue}if(g.push(v),g.length===c+1)return g}return g}},5995:function(e,t,r){"use strict";e.exports=i;var o=r(7642),a=r(6037);function i(n,s){return o(s).filter(function(c){for(var f=new Array(c.length),g=0;g<c.length;++g)f[g]=s[c[g]];return a(f)*n<1})}},3502:function(e,t,r){e.exports=i;var o=r(5995),a=r(9127);function i(n,s){return a(o(n,s))}},6468:function(e){e.exports=function(r){return atob(r)}},2642:function(e,t,r){"use strict";e.exports=i;var o=r(727);function a(n){for(var s=0,c=0;c<n.length;++c)s+=n[c];return s}function i(n,s){for(var c=s.length,f=new Array(c+1),g=0;g<c;++g){for(var v=new Array(c+1),T=0;T<=c;++T)v[T]=n[T][g];f[g]=v}f[c]=new Array(c+1);for(var g=0;g<=c;++g)f[c][g]=1;for(var l=new Array(c+1),g=0;g<c;++g)l[g]=s[g];l[c]=1;var _=o(f,l),w=a(_[c+1]);w===0&&(w=1);for(var S=new Array(c+1),g=0;g<=c;++g)S[g]=a(_[g])/w;return S}},7507:function(e,t){"use strict";t.byteLength=f,t.toByteArray=v,t.fromByteArray=_;for(var r=[],o=[],a=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,s=i.length;n<s;++n)r[n]=i[n],o[i.charCodeAt(n)]=n;o[45]=62,o[95]=63;function c(w){var S=w.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=w.indexOf("=");E===-1&&(E=S);var y=E===S?0:4-E%4;return[E,y]}function f(w){var S=c(w),E=S[0],y=S[1];return(E+y)*3/4-y}function g(w,S,E){return(S+E)*3/4-E}function v(w){var S,E=c(w),y=E[0],b=E[1],p=new a(g(w,y,b)),u=0,m=b>0?y-4:y,h;for(h=0;h<m;h+=4)S=o[w.charCodeAt(h)]<<18|o[w.charCodeAt(h+1)]<<12|o[w.charCodeAt(h+2)]<<6|o[w.charCodeAt(h+3)],p[u++]=S>>16&255,p[u++]=S>>8&255,p[u++]=S&255;return b===2&&(S=o[w.charCodeAt(h)]<<2|o[w.charCodeAt(h+1)]>>4,p[u++]=S&255),b===1&&(S=o[w.charCodeAt(h)]<<10|o[w.charCodeAt(h+1)]<<4|o[w.charCodeAt(h+2)]>>2,p[u++]=S>>8&255,p[u++]=S&255),p}function T(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function l(w,S,E){for(var y,b=[],p=S;p<E;p+=3)y=(w[p]<<16&16711680)+(w[p+1]<<8&65280)+(w[p+2]&255),b.push(T(y));return b.join("")}function _(w){for(var S,E=w.length,y=E%3,b=[],p=16383,u=0,m=E-y;u<m;u+=p)b.push(l(w,u,u+p>m?m:u+p));return y===1?(S=w[E-1],b.push(r[S>>2]+r[S<<4&63]+"==")):y===2&&(S=(w[E-2]<<8)+w[E-1],b.push(r[S>>10]+r[S>>4&63]+r[S<<2&63]+"=")),b.join("")}},3865:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(i,n){return o(i[0].mul(n[1]).add(n[0].mul(i[1])),i[1].mul(n[1]))}},1318:function(e){"use strict";e.exports=t;function t(r,o){return r[0].mul(o[1]).cmp(o[0].mul(r[1]))}},8697:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(i,n){return o(i[0].mul(n[1]),i[1].mul(n[0]))}},7842:function(e,t,r){"use strict";var o=r(6330),a=r(1533),i=r(2651),n=r(6768),s=r(869),c=r(8697);e.exports=f;function f(g,v){if(o(g))return v?c(g,f(v)):[g[0].clone(),g[1].clone()];var T=0,l,_;if(a(g))l=g.clone();else if(typeof g=="string")l=n(g);else{if(g===0)return[i(0),i(1)];if(g===Math.floor(g))l=i(g);else{for(;g!==Math.floor(g);)g=g*Math.pow(2,256),T-=256;l=i(g)}}if(o(v))l.mul(v[1]),_=v[0].clone();else if(a(v))_=v.clone();else if(typeof v=="string")_=n(v);else if(!v)_=i(1);else if(v===Math.floor(v))_=i(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),T+=256;_=i(v)}return T>0?l=l.ushln(T):T<0&&(_=_.ushln(-T)),s(l,_)}},6330:function(e,t,r){"use strict";var o=r(1533);e.exports=a;function a(i){return Array.isArray(i)&&i.length===2&&o(i[0])&&o(i[1])}},5716:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(i){return i.cmp(new o(0))}},1369:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(i){var n=i.length,s=i.words,c=0;if(n===1)c=s[0];else if(n===2)c=s[0]+s[1]*67108864;else for(var f=0;f<n;f++){var g=s[f];c+=g*Math.pow(67108864,f)}return o(i)*c}},4025:function(e,t,r){"use strict";var o=r(2361),a=r(8828).countTrailingZeros;e.exports=i;function i(n){var s=a(o.lo(n));if(s<32)return s;var c=a(o.hi(n));return c>20?52:c+32}},1533:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(i){return i&&typeof i=="object"&&!!i.words}},2651:function(e,t,r){"use strict";var o=r(6859),a=r(2361);e.exports=i;function i(n){var s=a.exponent(n);return s<52?new o(n):new o(n*Math.pow(2,52-s)).ushln(s-52)}},869:function(e,t,r){"use strict";var o=r(2651),a=r(5716);e.exports=i;function i(n,s){var c=a(n),f=a(s);if(c===0)return[o(0),o(1)];if(f===0)return[o(0),o(0)];f<0&&(n=n.neg(),s=s.neg());var g=n.gcd(s);return g.cmpn(1)?[n.div(g),s.div(g)]:[n,s]}},6768:function(e,t,r){"use strict";var o=r(6859);e.exports=a;function a(i){return new o(i)}},6504:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(i,n){return o(i[0].mul(n[0]),i[1].mul(n[1]))}},7721:function(e,t,r){"use strict";var o=r(5716);e.exports=a;function a(i){return o(i[0])*o(i[1])}},5572:function(e,t,r){"use strict";var o=r(869);e.exports=a;function a(i,n){return o(i[0].mul(n[1]).sub(i[1].mul(n[0])),i[1].mul(n[1]))}},946:function(e,t,r){"use strict";var o=r(1369),a=r(4025);e.exports=i;function i(n){var s=n[0],c=n[1];if(s.cmpn(0)===0)return 0;var f=s.abs().divmod(c.abs()),g=f.div,v=o(g),T=f.mod,l=s.negative!==c.negative?-1:1;if(T.cmpn(0)===0)return l*v;if(v){var _=a(v)+4,w=o(T.ushln(_).divRound(c));return l*(v+w*Math.pow(2,-_))}else{var S=c.bitLength()-T.bitLength()+53,w=o(T.ushln(S).divRound(c));return S<1023?l*w*Math.pow(2,-S):(w*=Math.pow(2,-1023),l*w*Math.pow(2,1023-S))}}},2478:function(e){"use strict";function t(s,c,f,g,v){for(var T=v+1;g<=v;){var l=g+v>>>1,_=s[l],w=f!==void 0?f(_,c):_-c;w>=0?(T=l,v=l-1):g=l+1}return T}function r(s,c,f,g,v){for(var T=v+1;g<=v;){var l=g+v>>>1,_=s[l],w=f!==void 0?f(_,c):_-c;w>0?(T=l,v=l-1):g=l+1}return T}function o(s,c,f,g,v){for(var T=g-1;g<=v;){var l=g+v>>>1,_=s[l],w=f!==void 0?f(_,c):_-c;w<0?(T=l,g=l+1):v=l-1}return T}function a(s,c,f,g,v){for(var T=g-1;g<=v;){var l=g+v>>>1,_=s[l],w=f!==void 0?f(_,c):_-c;w<=0?(T=l,g=l+1):v=l-1}return T}function i(s,c,f,g,v){for(;g<=v;){var T=g+v>>>1,l=s[T],_=f!==void 0?f(l,c):l-c;if(_===0)return T;_<=0?g=T+1:v=T-1}return-1}function n(s,c,f,g,v,T){return typeof f=="function"?T(s,c,f,g===void 0?0:g|0,v===void 0?s.length-1:v|0):T(s,c,void 0,f===void 0?0:f|0,g===void 0?s.length-1:g|0)}e.exports={ge:function(s,c,f,g,v){return n(s,c,f,g,v,t)},gt:function(s,c,f,g,v){return n(s,c,f,g,v,r)},lt:function(s,c,f,g,v){return n(s,c,f,g,v,o)},le:function(s,c,f,g,v){return n(s,c,f,g,v,a)},eq:function(s,c,f,g,v){return n(s,c,f,g,v,i)}}},8828:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<<r-1,t.sign=function(i){return(i>0)-(i<0)},t.abs=function(i){var n=i>>r-1;return(i^n)-n},t.min=function(i,n){return n^(i^n)&-(i<n)},t.max=function(i,n){return i^(i^n)&-(i<n)},t.isPow2=function(i){return!(i&i-1)&&!!i},t.log2=function(i){var n,s;return n=(i>65535)<<4,i>>>=n,s=(i>255)<<3,i>>>=s,n|=s,s=(i>15)<<2,i>>>=s,n|=s,s=(i>3)<<1,i>>>=s,n|=s,n|i>>1},t.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},t.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function o(i){var n=32;return i&=-i,i&&n--,i&65535&&(n-=16),i&16711935&&(n-=8),i&252645135&&(n-=4),i&858993459&&(n-=2),i&1431655765&&(n-=1),n}t.countTrailingZeros=o,t.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},t.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},t.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var a=new Array(256);(function(i){for(var n=0;n<256;++n){var s=n,c=n,f=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--f;i[n]=c<<f&255}})(a),t.reverse=function(i){return a[i&255]<<24|a[i>>>8&255]<<16|a[i>>>16&255]<<8|a[i>>>24&255]},t.interleave2=function(i,n){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i|n<<1},t.deinterleave2=function(i,n){return i=i>>>n&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},t.interleave3=function(i,n,s){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i|=n<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,i|s<<2},t.deinterleave3=function(i,n){return i=i>>>n&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},t.nextCombination=function(i){var n=i|i-1;return n+1|(~n&-~n)-1>>>o(i)+1}},6859:function(e,t,r){e=r.nmd(e),function(o,a){"use strict";function i(O,I){if(!O)throw new Error(I||"Assertion failed")}function n(O,I){O.super_=I;var N=function(){};N.prototype=I.prototype,O.prototype=new N,O.prototype.constructor=O}function s(O,I,N){if(s.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((I==="le"||I==="be")&&(N=I,I=10),this._init(O||0,I||10,N||"be"))}typeof o=="object"?o.exports=s:a.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=r(7790).Buffer}catch{}s.isBN=function(I){return I instanceof s?!0:I!==null&&typeof I=="object"&&I.constructor.wordSize===s.wordSize&&Array.isArray(I.words)},s.max=function(I,N){return I.cmp(N)>0?I:N},s.min=function(I,N){return I.cmp(N)<0?I:N},s.prototype._init=function(I,N,U){if(typeof I=="number")return this._initNumber(I,N,U);if(typeof I=="object")return this._initArray(I,N,U);N==="hex"&&(N=16),i(N===(N|0)&&N>=2&&N<=36),I=I.toString().replace(/\s+/g,"");var W=0;I[0]==="-"&&(W++,this.negative=1),W<I.length&&(N===16?this._parseHex(I,W,U):(this._parseBase(I,N,W),U==="le"&&this._initArray(this.toArray(),N,U)))},s.prototype._initNumber=function(I,N,U){I<0&&(this.negative=1,I=-I),I<67108864?(this.words=[I&67108863],this.length=1):I<4503599627370496?(this.words=[I&67108863,I/67108864&67108863],this.length=2):(i(I<9007199254740992),this.words=[I&67108863,I/67108864&67108863,1],this.length=3),U==="le"&&this._initArray(this.toArray(),N,U)},s.prototype._initArray=function(I,N,U){if(i(typeof I.length=="number"),I.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(I.length/3),this.words=new Array(this.length);for(var W=0;W<this.length;W++)this.words[W]=0;var Q,ue,le=0;if(U==="be")for(W=I.length-1,Q=0;W>=0;W-=3)ue=I[W]|I[W-1]<<8|I[W-2]<<16,this.words[Q]|=ue<<le&67108863,this.words[Q+1]=ue>>>26-le&67108863,le+=24,le>=26&&(le-=26,Q++);else if(U==="le")for(W=0,Q=0;W<I.length;W+=3)ue=I[W]|I[W+1]<<8|I[W+2]<<16,this.words[Q]|=ue<<le&67108863,this.words[Q+1]=ue>>>26-le&67108863,le+=24,le>=26&&(le-=26,Q++);return this.strip()};function f(O,I){var N=O.charCodeAt(I);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function g(O,I,N){var U=f(O,N);return N-1>=I&&(U|=f(O,N-1)<<4),U}s.prototype._parseHex=function(I,N,U){this.length=Math.ceil((I.length-N)/6),this.words=new Array(this.length);for(var W=0;W<this.length;W++)this.words[W]=0;var Q=0,ue=0,le;if(U==="be")for(W=I.length-1;W>=N;W-=2)le=g(I,N,W)<<Q,this.words[ue]|=le&67108863,Q>=18?(Q-=18,ue+=1,this.words[ue]|=le>>>26):Q+=8;else{var he=I.length-N;for(W=he%2===0?N+1:N;W<I.length;W+=2)le=g(I,N,W)<<Q,this.words[ue]|=le&67108863,Q>=18?(Q-=18,ue+=1,this.words[ue]|=le>>>26):Q+=8}this.strip()};function v(O,I,N,U){for(var W=0,Q=Math.min(O.length,N),ue=I;ue<Q;ue++){var le=O.charCodeAt(ue)-48;W*=U,le>=49?W+=le-49+10:le>=17?W+=le-17+10:W+=le}return W}s.prototype._parseBase=function(I,N,U){this.words=[0],this.length=1;for(var W=0,Q=1;Q<=67108863;Q*=N)W++;W--,Q=Q/N|0;for(var ue=I.length-U,le=ue%W,he=Math.min(ue,ue-le)+U,G=0,$=U;$<he;$+=W)G=v(I,$,$+W,N),this.imuln(Q),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G);if(le!==0){var J=1;for(G=v(I,$,I.length,N),$=0;$<le;$++)J*=N;this.imuln(J),this.words[0]+G<67108864?this.words[0]+=G:this._iaddn(G)}this.strip()},s.prototype.copy=function(I){I.words=new Array(this.length);for(var N=0;N<this.length;N++)I.words[N]=this.words[N];I.length=this.length,I.negative=this.negative,I.red=this.red},s.prototype.clone=function(){var I=new s(null);return this.copy(I),I},s.prototype._expand=function(I){for(;this.length<I;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var T=["","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"],l=[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],_=[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];s.prototype.toString=function(I,N){I=I||10,N=N|0||1;var U;if(I===16||I==="hex"){U="";for(var W=0,Q=0,ue=0;ue<this.length;ue++){var le=this.words[ue],he=((le<<W|Q)&16777215).toString(16);Q=le>>>24-W&16777215,Q!==0||ue!==this.length-1?U=T[6-he.length]+he+U:U=he+U,W+=2,W>=26&&(W-=26,ue--)}for(Q!==0&&(U=Q.toString(16)+U);U.length%N!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(I===(I|0)&&I>=2&&I<=36){var G=l[I],$=_[I];U="";var J=this.clone();for(J.negative=0;!J.isZero();){var X=J.modn($).toString(I);J=J.idivn($),J.isZero()?U=X+U:U=T[G-X.length]+X+U}for(this.isZero()&&(U="0"+U);U.length%N!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}i(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var I=this.words[0];return this.length===2?I+=this.words[1]*67108864:this.length===3&&this.words[2]===1?I+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-I:I},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(I,N){return i(typeof c<"u"),this.toArrayLike(c,I,N)},s.prototype.toArray=function(I,N){return this.toArrayLike(Array,I,N)},s.prototype.toArrayLike=function(I,N,U){var W=this.byteLength(),Q=U||Math.max(1,W);i(W<=Q,"byte array longer than desired length"),i(Q>0,"Requested array length <= 0"),this.strip();var ue=N==="le",le=new I(Q),he,G,$=this.clone();if(ue){for(G=0;!$.isZero();G++)he=$.andln(255),$.iushrn(8),le[G]=he;for(;G<Q;G++)le[G]=0}else{for(G=0;G<Q-W;G++)le[G]=0;for(G=0;!$.isZero();G++)he=$.andln(255),$.iushrn(8),le[Q-G-1]=he}return le},Math.clz32?s.prototype._countBits=function(I){return 32-Math.clz32(I)}:s.prototype._countBits=function(I){var N=I,U=0;return N>=4096&&(U+=13,N>>>=13),N>=64&&(U+=7,N>>>=7),N>=8&&(U+=4,N>>>=4),N>=2&&(U+=2,N>>>=2),U+N},s.prototype._zeroBits=function(I){if(I===0)return 26;var N=I,U=0;return N&8191||(U+=13,N>>>=13),N&127||(U+=7,N>>>=7),N&15||(U+=4,N>>>=4),N&3||(U+=2,N>>>=2),N&1||U++,U},s.prototype.bitLength=function(){var I=this.words[this.length-1],N=this._countBits(I);return(this.length-1)*26+N};function w(O){for(var I=new Array(O.bitLength()),N=0;N<I.length;N++){var U=N/26|0,W=N%26;I[N]=(O.words[U]&1<<W)>>>W}return I}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var I=0,N=0;N<this.length;N++){var U=this._zeroBits(this.words[N]);if(I+=U,U!==26)break}return I},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(I){return this.negative!==0?this.abs().inotn(I).iaddn(1):this.clone()},s.prototype.fromTwos=function(I){return this.testn(I-1)?this.notn(I).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(I){for(;this.length<I.length;)this.words[this.length++]=0;for(var N=0;N<I.length;N++)this.words[N]=this.words[N]|I.words[N];return this.strip()},s.prototype.ior=function(I){return i((this.negative|I.negative)===0),this.iuor(I)},s.prototype.or=function(I){return this.length>I.length?this.clone().ior(I):I.clone().ior(this)},s.prototype.uor=function(I){return this.length>I.length?this.clone().iuor(I):I.clone().iuor(this)},s.prototype.iuand=function(I){var N;this.length>I.length?N=I:N=this;for(var U=0;U<N.length;U++)this.words[U]=this.words[U]&I.words[U];return this.length=N.length,this.strip()},s.prototype.iand=function(I){return i((this.negative|I.negative)===0),this.iuand(I)},s.prototype.and=function(I){return this.length>I.length?this.clone().iand(I):I.clone().iand(this)},s.prototype.uand=function(I){return this.length>I.length?this.clone().iuand(I):I.clone().iuand(this)},s.prototype.iuxor=function(I){var N,U;this.length>I.length?(N=this,U=I):(N=I,U=this);for(var W=0;W<U.length;W++)this.words[W]=N.words[W]^U.words[W];if(this!==N)for(;W<N.length;W++)this.words[W]=N.words[W];return this.length=N.length,this.strip()},s.prototype.ixor=function(I){return i((this.negative|I.negative)===0),this.iuxor(I)},s.prototype.xor=function(I){return this.length>I.length?this.clone().ixor(I):I.clone().ixor(this)},s.prototype.uxor=function(I){return this.length>I.length?this.clone().iuxor(I):I.clone().iuxor(this)},s.prototype.inotn=function(I){i(typeof I=="number"&&I>=0);var N=Math.ceil(I/26)|0,U=I%26;this._expand(N),U>0&&N--;for(var W=0;W<N;W++)this.words[W]=~this.words[W]&67108863;return U>0&&(this.words[W]=~this.words[W]&67108863>>26-U),this.strip()},s.prototype.notn=function(I){return this.clone().inotn(I)},s.prototype.setn=function(I,N){i(typeof I=="number"&&I>=0);var U=I/26|0,W=I%26;return this._expand(U+1),N?this.words[U]=this.words[U]|1<<W:this.words[U]=this.words[U]&~(1<<W),this.strip()},s.prototype.iadd=function(I){var N;if(this.negative!==0&&I.negative===0)return this.negative=0,N=this.isub(I),this.negative^=1,this._normSign();if(this.negative===0&&I.negative!==0)return I.negative=0,N=this.isub(I),I.negative=1,N._normSign();var U,W;this.length>I.length?(U=this,W=I):(U=I,W=this);for(var Q=0,ue=0;ue<W.length;ue++)N=(U.words[ue]|0)+(W.words[ue]|0)+Q,this.words[ue]=N&67108863,Q=N>>>26;for(;Q!==0&&ue<U.length;ue++)N=(U.words[ue]|0)+Q,this.words[ue]=N&67108863,Q=N>>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;ue<U.length;ue++)this.words[ue]=U.words[ue];return this},s.prototype.add=function(I){var N;return I.negative!==0&&this.negative===0?(I.negative=0,N=this.sub(I),I.negative^=1,N):I.negative===0&&this.negative!==0?(this.negative=0,N=I.sub(this),this.negative=1,N):this.length>I.length?this.clone().iadd(I):I.clone().iadd(this)},s.prototype.isub=function(I){if(I.negative!==0){I.negative=0;var N=this.iadd(I);return I.negative=1,N._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(I),this.negative=1,this._normSign();var U=this.cmp(I);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var W,Q;U>0?(W=this,Q=I):(W=I,Q=this);for(var ue=0,le=0;le<Q.length;le++)N=(W.words[le]|0)-(Q.words[le]|0)+ue,ue=N>>26,this.words[le]=N&67108863;for(;ue!==0&&le<W.length;le++)N=(W.words[le]|0)+ue,ue=N>>26,this.words[le]=N&67108863;if(ue===0&&le<W.length&&W!==this)for(;le<W.length;le++)this.words[le]=W.words[le];return this.length=Math.max(this.length,le),W!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(I){return this.clone().isub(I)};function S(O,I,N){N.negative=I.negative^O.negative;var U=O.length+I.length|0;N.length=U,U=U-1|0;var W=O.words[0]|0,Q=I.words[0]|0,ue=W*Q,le=ue&67108863,he=ue/67108864|0;N.words[0]=le;for(var G=1;G<U;G++){for(var $=he>>>26,J=he&67108863,X=Math.min(G,I.length-1),oe=Math.max(0,G-O.length+1);oe<=X;oe++){var ie=G-oe|0;W=O.words[ie]|0,Q=I.words[oe]|0,ue=W*Q+J,$+=ue/67108864|0,J=ue&67108863}N.words[G]=J|0,he=$|0}return he!==0?N.words[G]=he|0:N.length--,N.strip()}var E=function(I,N,U){var W=I.words,Q=N.words,ue=U.words,le=0,he,G,$,J=W[0]|0,X=J&8191,oe=J>>>13,ie=W[1]|0,j=ie&8191,ee=ie>>>13,re=W[2]|0,ce=re&8191,be=re>>>13,Ae=W[3]|0,ze=Ae&8191,Re=Ae>>>13,Xe=W[4]|0,it=Xe&8191,ot=Xe>>>13,tt=W[5]|0,lt=tt&8191,Ee=tt>>>13,_e=W[6]|0,fe=_e&8191,Fe=_e>>>13,rt=W[7]|0,st=rt&8191,Qe=rt>>>13,Lt=W[8]|0,kt=Lt&8191,Vt=Lt>>>13,Zt=W[9]|0,Sr=Zt&8191,xr=Zt>>>13,jr=Q[0]|0,wr=jr&8191,Ir=jr>>>13,bt=Q[1]|0,Be=bt&8191,Ke=bt>>>13,Ue=Q[2]|0,Me=Ue&8191,qe=Ue>>>13,Ce=Q[3]|0,Te=Ce&8191,Pe=Ce>>>13,at=Q[4]|0,yt=at&8191,Tt=at>>>13,Ot=Q[5]|0,Gt=Ot&8191,rr=Ot>>>13,Qt=Q[6]|0,Tr=Qt&8191,la=Qt>>>13,Ua=Q[7]|0,Ba=Ua&8191,Ra=Ua>>>13,ei=Q[8]|0,za=ei&8191,ti=ei>>>13,Ci=Q[9]|0,Jt=Ci&8191,Nt=Ci>>>13;U.negative=I.negative^N.negative,U.length=19,he=Math.imul(X,wr),G=Math.imul(X,Ir),G=G+Math.imul(oe,wr)|0,$=Math.imul(oe,Ir);var Kt=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,he=Math.imul(j,wr),G=Math.imul(j,Ir),G=G+Math.imul(ee,wr)|0,$=Math.imul(ee,Ir),he=he+Math.imul(X,Be)|0,G=G+Math.imul(X,Ke)|0,G=G+Math.imul(oe,Be)|0,$=$+Math.imul(oe,Ke)|0;var Wt=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,he=Math.imul(ce,wr),G=Math.imul(ce,Ir),G=G+Math.imul(be,wr)|0,$=Math.imul(be,Ir),he=he+Math.imul(j,Be)|0,G=G+Math.imul(j,Ke)|0,G=G+Math.imul(ee,Be)|0,$=$+Math.imul(ee,Ke)|0,he=he+Math.imul(X,Me)|0,G=G+Math.imul(X,qe)|0,G=G+Math.imul(oe,Me)|0,$=$+Math.imul(oe,qe)|0;var Pr=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,he=Math.imul(ze,wr),G=Math.imul(ze,Ir),G=G+Math.imul(Re,wr)|0,$=Math.imul(Re,Ir),he=he+Math.imul(ce,Be)|0,G=G+Math.imul(ce,Ke)|0,G=G+Math.imul(be,Be)|0,$=$+Math.imul(be,Ke)|0,he=he+Math.imul(j,Me)|0,G=G+Math.imul(j,qe)|0,G=G+Math.imul(ee,Me)|0,$=$+Math.imul(ee,qe)|0,he=he+Math.imul(X,Te)|0,G=G+Math.imul(X,Pe)|0,G=G+Math.imul(oe,Te)|0,$=$+Math.imul(oe,Pe)|0;var ta=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(ta>>>26)|0,ta&=67108863,he=Math.imul(it,wr),G=Math.imul(it,Ir),G=G+Math.imul(ot,wr)|0,$=Math.imul(ot,Ir),he=he+Math.imul(ze,Be)|0,G=G+Math.imul(ze,Ke)|0,G=G+Math.imul(Re,Be)|0,$=$+Math.imul(Re,Ke)|0,he=he+Math.imul(ce,Me)|0,G=G+Math.imul(ce,qe)|0,G=G+Math.imul(be,Me)|0,$=$+Math.imul(be,qe)|0,he=he+Math.imul(j,Te)|0,G=G+Math.imul(j,Pe)|0,G=G+Math.imul(ee,Te)|0,$=$+Math.imul(ee,Pe)|0,he=he+Math.imul(X,yt)|0,G=G+Math.imul(X,Tt)|0,G=G+Math.imul(oe,yt)|0,$=$+Math.imul(oe,Tt)|0;var ma=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(ma>>>26)|0,ma&=67108863,he=Math.imul(lt,wr),G=Math.imul(lt,Ir),G=G+Math.imul(Ee,wr)|0,$=Math.imul(Ee,Ir),he=he+Math.imul(it,Be)|0,G=G+Math.imul(it,Ke)|0,G=G+Math.imul(ot,Be)|0,$=$+Math.imul(ot,Ke)|0,he=he+Math.imul(ze,Me)|0,G=G+Math.imul(ze,qe)|0,G=G+Math.imul(Re,Me)|0,$=$+Math.imul(Re,qe)|0,he=he+Math.imul(ce,Te)|0,G=G+Math.imul(ce,Pe)|0,G=G+Math.imul(be,Te)|0,$=$+Math.imul(be,Pe)|0,he=he+Math.imul(j,yt)|0,G=G+Math.imul(j,Tt)|0,G=G+Math.imul(ee,yt)|0,$=$+Math.imul(ee,Tt)|0,he=he+Math.imul(X,Gt)|0,G=G+Math.imul(X,rr)|0,G=G+Math.imul(oe,Gt)|0,$=$+Math.imul(oe,rr)|0;var ra=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(ra>>>26)|0,ra&=67108863,he=Math.imul(fe,wr),G=Math.imul(fe,Ir),G=G+Math.imul(Fe,wr)|0,$=Math.imul(Fe,Ir),he=he+Math.imul(lt,Be)|0,G=G+Math.imul(lt,Ke)|0,G=G+Math.imul(Ee,Be)|0,$=$+Math.imul(Ee,Ke)|0,he=he+Math.imul(it,Me)|0,G=G+Math.imul(it,qe)|0,G=G+Math.imul(ot,Me)|0,$=$+Math.imul(ot,qe)|0,he=he+Math.imul(ze,Te)|0,G=G+Math.imul(ze,Pe)|0,G=G+Math.imul(Re,Te)|0,$=$+Math.imul(Re,Pe)|0,he=he+Math.imul(ce,yt)|0,G=G+Math.imul(ce,Tt)|0,G=G+Math.imul(be,yt)|0,$=$+Math.imul(be,Tt)|0,he=he+Math.imul(j,Gt)|0,G=G+Math.imul(j,rr)|0,G=G+Math.imul(ee,Gt)|0,$=$+Math.imul(ee,rr)|0,he=he+Math.imul(X,Tr)|0,G=G+Math.imul(X,la)|0,G=G+Math.imul(oe,Tr)|0,$=$+Math.imul(oe,la)|0;var Ia=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Ia>>>26)|0,Ia&=67108863,he=Math.imul(st,wr),G=Math.imul(st,Ir),G=G+Math.imul(Qe,wr)|0,$=Math.imul(Qe,Ir),he=he+Math.imul(fe,Be)|0,G=G+Math.imul(fe,Ke)|0,G=G+Math.imul(Fe,Be)|0,$=$+Math.imul(Fe,Ke)|0,he=he+Math.imul(lt,Me)|0,G=G+Math.imul(lt,qe)|0,G=G+Math.imul(Ee,Me)|0,$=$+Math.imul(Ee,qe)|0,he=he+Math.imul(it,Te)|0,G=G+Math.imul(it,Pe)|0,G=G+Math.imul(ot,Te)|0,$=$+Math.imul(ot,Pe)|0,he=he+Math.imul(ze,yt)|0,G=G+Math.imul(ze,Tt)|0,G=G+Math.imul(Re,yt)|0,$=$+Math.imul(Re,Tt)|0,he=he+Math.imul(ce,Gt)|0,G=G+Math.imul(ce,rr)|0,G=G+Math.imul(be,Gt)|0,$=$+Math.imul(be,rr)|0,he=he+Math.imul(j,Tr)|0,G=G+Math.imul(j,la)|0,G=G+Math.imul(ee,Tr)|0,$=$+Math.imul(ee,la)|0,he=he+Math.imul(X,Ba)|0,G=G+Math.imul(X,Ra)|0,G=G+Math.imul(oe,Ba)|0,$=$+Math.imul(oe,Ra)|0;var Ha=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Ha>>>26)|0,Ha&=67108863,he=Math.imul(kt,wr),G=Math.imul(kt,Ir),G=G+Math.imul(Vt,wr)|0,$=Math.imul(Vt,Ir),he=he+Math.imul(st,Be)|0,G=G+Math.imul(st,Ke)|0,G=G+Math.imul(Qe,Be)|0,$=$+Math.imul(Qe,Ke)|0,he=he+Math.imul(fe,Me)|0,G=G+Math.imul(fe,qe)|0,G=G+Math.imul(Fe,Me)|0,$=$+Math.imul(Fe,qe)|0,he=he+Math.imul(lt,Te)|0,G=G+Math.imul(lt,Pe)|0,G=G+Math.imul(Ee,Te)|0,$=$+Math.imul(Ee,Pe)|0,he=he+Math.imul(it,yt)|0,G=G+Math.imul(it,Tt)|0,G=G+Math.imul(ot,yt)|0,$=$+Math.imul(ot,Tt)|0,he=he+Math.imul(ze,Gt)|0,G=G+Math.imul(ze,rr)|0,G=G+Math.imul(Re,Gt)|0,$=$+Math.imul(Re,rr)|0,he=he+Math.imul(ce,Tr)|0,G=G+Math.imul(ce,la)|0,G=G+Math.imul(be,Tr)|0,$=$+Math.imul(be,la)|0,he=he+Math.imul(j,Ba)|0,G=G+Math.imul(j,Ra)|0,G=G+Math.imul(ee,Ba)|0,$=$+Math.imul(ee,Ra)|0,he=he+Math.imul(X,za)|0,G=G+Math.imul(X,ti)|0,G=G+Math.imul(oe,za)|0,$=$+Math.imul(oe,ti)|0;var $a=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+($a>>>26)|0,$a&=67108863,he=Math.imul(Sr,wr),G=Math.imul(Sr,Ir),G=G+Math.imul(xr,wr)|0,$=Math.imul(xr,Ir),he=he+Math.imul(kt,Be)|0,G=G+Math.imul(kt,Ke)|0,G=G+Math.imul(Vt,Be)|0,$=$+Math.imul(Vt,Ke)|0,he=he+Math.imul(st,Me)|0,G=G+Math.imul(st,qe)|0,G=G+Math.imul(Qe,Me)|0,$=$+Math.imul(Qe,qe)|0,he=he+Math.imul(fe,Te)|0,G=G+Math.imul(fe,Pe)|0,G=G+Math.imul(Fe,Te)|0,$=$+Math.imul(Fe,Pe)|0,he=he+Math.imul(lt,yt)|0,G=G+Math.imul(lt,Tt)|0,G=G+Math.imul(Ee,yt)|0,$=$+Math.imul(Ee,Tt)|0,he=he+Math.imul(it,Gt)|0,G=G+Math.imul(it,rr)|0,G=G+Math.imul(ot,Gt)|0,$=$+Math.imul(ot,rr)|0,he=he+Math.imul(ze,Tr)|0,G=G+Math.imul(ze,la)|0,G=G+Math.imul(Re,Tr)|0,$=$+Math.imul(Re,la)|0,he=he+Math.imul(ce,Ba)|0,G=G+Math.imul(ce,Ra)|0,G=G+Math.imul(be,Ba)|0,$=$+Math.imul(be,Ra)|0,he=he+Math.imul(j,za)|0,G=G+Math.imul(j,ti)|0,G=G+Math.imul(ee,za)|0,$=$+Math.imul(ee,ti)|0,he=he+Math.imul(X,Jt)|0,G=G+Math.imul(X,Nt)|0,G=G+Math.imul(oe,Jt)|0,$=$+Math.imul(oe,Nt)|0;var ai=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(ai>>>26)|0,ai&=67108863,he=Math.imul(Sr,Be),G=Math.imul(Sr,Ke),G=G+Math.imul(xr,Be)|0,$=Math.imul(xr,Ke),he=he+Math.imul(kt,Me)|0,G=G+Math.imul(kt,qe)|0,G=G+Math.imul(Vt,Me)|0,$=$+Math.imul(Vt,qe)|0,he=he+Math.imul(st,Te)|0,G=G+Math.imul(st,Pe)|0,G=G+Math.imul(Qe,Te)|0,$=$+Math.imul(Qe,Pe)|0,he=he+Math.imul(fe,yt)|0,G=G+Math.imul(fe,Tt)|0,G=G+Math.imul(Fe,yt)|0,$=$+Math.imul(Fe,Tt)|0,he=he+Math.imul(lt,Gt)|0,G=G+Math.imul(lt,rr)|0,G=G+Math.imul(Ee,Gt)|0,$=$+Math.imul(Ee,rr)|0,he=he+Math.imul(it,Tr)|0,G=G+Math.imul(it,la)|0,G=G+Math.imul(ot,Tr)|0,$=$+Math.imul(ot,la)|0,he=he+Math.imul(ze,Ba)|0,G=G+Math.imul(ze,Ra)|0,G=G+Math.imul(Re,Ba)|0,$=$+Math.imul(Re,Ra)|0,he=he+Math.imul(ce,za)|0,G=G+Math.imul(ce,ti)|0,G=G+Math.imul(be,za)|0,$=$+Math.imul(be,ti)|0,he=he+Math.imul(j,Jt)|0,G=G+Math.imul(j,Nt)|0,G=G+Math.imul(ee,Jt)|0,$=$+Math.imul(ee,Nt)|0;var mi=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(mi>>>26)|0,mi&=67108863,he=Math.imul(Sr,Me),G=Math.imul(Sr,qe),G=G+Math.imul(xr,Me)|0,$=Math.imul(xr,qe),he=he+Math.imul(kt,Te)|0,G=G+Math.imul(kt,Pe)|0,G=G+Math.imul(Vt,Te)|0,$=$+Math.imul(Vt,Pe)|0,he=he+Math.imul(st,yt)|0,G=G+Math.imul(st,Tt)|0,G=G+Math.imul(Qe,yt)|0,$=$+Math.imul(Qe,Tt)|0,he=he+Math.imul(fe,Gt)|0,G=G+Math.imul(fe,rr)|0,G=G+Math.imul(Fe,Gt)|0,$=$+Math.imul(Fe,rr)|0,he=he+Math.imul(lt,Tr)|0,G=G+Math.imul(lt,la)|0,G=G+Math.imul(Ee,Tr)|0,$=$+Math.imul(Ee,la)|0,he=he+Math.imul(it,Ba)|0,G=G+Math.imul(it,Ra)|0,G=G+Math.imul(ot,Ba)|0,$=$+Math.imul(ot,Ra)|0,he=he+Math.imul(ze,za)|0,G=G+Math.imul(ze,ti)|0,G=G+Math.imul(Re,za)|0,$=$+Math.imul(Re,ti)|0,he=he+Math.imul(ce,Jt)|0,G=G+Math.imul(ce,Nt)|0,G=G+Math.imul(be,Jt)|0,$=$+Math.imul(be,Nt)|0;var xt=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(xt>>>26)|0,xt&=67108863,he=Math.imul(Sr,Te),G=Math.imul(Sr,Pe),G=G+Math.imul(xr,Te)|0,$=Math.imul(xr,Pe),he=he+Math.imul(kt,yt)|0,G=G+Math.imul(kt,Tt)|0,G=G+Math.imul(Vt,yt)|0,$=$+Math.imul(Vt,Tt)|0,he=he+Math.imul(st,Gt)|0,G=G+Math.imul(st,rr)|0,G=G+Math.imul(Qe,Gt)|0,$=$+Math.imul(Qe,rr)|0,he=he+Math.imul(fe,Tr)|0,G=G+Math.imul(fe,la)|0,G=G+Math.imul(Fe,Tr)|0,$=$+Math.imul(Fe,la)|0,he=he+Math.imul(lt,Ba)|0,G=G+Math.imul(lt,Ra)|0,G=G+Math.imul(Ee,Ba)|0,$=$+Math.imul(Ee,Ra)|0,he=he+Math.imul(it,za)|0,G=G+Math.imul(it,ti)|0,G=G+Math.imul(ot,za)|0,$=$+Math.imul(ot,ti)|0,he=he+Math.imul(ze,Jt)|0,G=G+Math.imul(ze,Nt)|0,G=G+Math.imul(Re,Jt)|0,$=$+Math.imul(Re,Nt)|0;var ct=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(ct>>>26)|0,ct&=67108863,he=Math.imul(Sr,yt),G=Math.imul(Sr,Tt),G=G+Math.imul(xr,yt)|0,$=Math.imul(xr,Tt),he=he+Math.imul(kt,Gt)|0,G=G+Math.imul(kt,rr)|0,G=G+Math.imul(Vt,Gt)|0,$=$+Math.imul(Vt,rr)|0,he=he+Math.imul(st,Tr)|0,G=G+Math.imul(st,la)|0,G=G+Math.imul(Qe,Tr)|0,$=$+Math.imul(Qe,la)|0,he=he+Math.imul(fe,Ba)|0,G=G+Math.imul(fe,Ra)|0,G=G+Math.imul(Fe,Ba)|0,$=$+Math.imul(Fe,Ra)|0,he=he+Math.imul(lt,za)|0,G=G+Math.imul(lt,ti)|0,G=G+Math.imul(Ee,za)|0,$=$+Math.imul(Ee,ti)|0,he=he+Math.imul(it,Jt)|0,G=G+Math.imul(it,Nt)|0,G=G+Math.imul(ot,Jt)|0,$=$+Math.imul(ot,Nt)|0;var Nr=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,he=Math.imul(Sr,Gt),G=Math.imul(Sr,rr),G=G+Math.imul(xr,Gt)|0,$=Math.imul(xr,rr),he=he+Math.imul(kt,Tr)|0,G=G+Math.imul(kt,la)|0,G=G+Math.imul(Vt,Tr)|0,$=$+Math.imul(Vt,la)|0,he=he+Math.imul(st,Ba)|0,G=G+Math.imul(st,Ra)|0,G=G+Math.imul(Qe,Ba)|0,$=$+Math.imul(Qe,Ra)|0,he=he+Math.imul(fe,za)|0,G=G+Math.imul(fe,ti)|0,G=G+Math.imul(Fe,za)|0,$=$+Math.imul(Fe,ti)|0,he=he+Math.imul(lt,Jt)|0,G=G+Math.imul(lt,Nt)|0,G=G+Math.imul(Ee,Jt)|0,$=$+Math.imul(Ee,Nt)|0;var Or=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Or>>>26)|0,Or&=67108863,he=Math.imul(Sr,Tr),G=Math.imul(Sr,la),G=G+Math.imul(xr,Tr)|0,$=Math.imul(xr,la),he=he+Math.imul(kt,Ba)|0,G=G+Math.imul(kt,Ra)|0,G=G+Math.imul(Vt,Ba)|0,$=$+Math.imul(Vt,Ra)|0,he=he+Math.imul(st,za)|0,G=G+Math.imul(st,ti)|0,G=G+Math.imul(Qe,za)|0,$=$+Math.imul(Qe,ti)|0,he=he+Math.imul(fe,Jt)|0,G=G+Math.imul(fe,Nt)|0,G=G+Math.imul(Fe,Jt)|0,$=$+Math.imul(Fe,Nt)|0;var Rr=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,he=Math.imul(Sr,Ba),G=Math.imul(Sr,Ra),G=G+Math.imul(xr,Ba)|0,$=Math.imul(xr,Ra),he=he+Math.imul(kt,za)|0,G=G+Math.imul(kt,ti)|0,G=G+Math.imul(Vt,za)|0,$=$+Math.imul(Vt,ti)|0,he=he+Math.imul(st,Jt)|0,G=G+Math.imul(st,Nt)|0,G=G+Math.imul(Qe,Jt)|0,$=$+Math.imul(Qe,Nt)|0;var Lr=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,he=Math.imul(Sr,za),G=Math.imul(Sr,ti),G=G+Math.imul(xr,za)|0,$=Math.imul(xr,ti),he=he+Math.imul(kt,Jt)|0,G=G+Math.imul(kt,Nt)|0,G=G+Math.imul(Vt,Jt)|0,$=$+Math.imul(Vt,Nt)|0;var Gr=(le+he|0)+((G&8191)<<13)|0;le=($+(G>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,he=Math.imul(Sr,Jt),G=Math.imul(Sr,Nt),G=G+Math.imul(xr,Jt)|0,$=Math.imul(xr,Nt);var Kr=(le+he|0)+((G&8191)<<13)|0;return le=($+(G>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,ue[0]=Kt,ue[1]=Wt,ue[2]=Pr,ue[3]=ta,ue[4]=ma,ue[5]=ra,ue[6]=Ia,ue[7]=Ha,ue[8]=$a,ue[9]=ai,ue[10]=mi,ue[11]=xt,ue[12]=ct,ue[13]=Nr,ue[14]=Or,ue[15]=Rr,ue[16]=Lr,ue[17]=Gr,ue[18]=Kr,le!==0&&(ue[19]=le,U.length++),U};Math.imul||(E=S);function y(O,I,N){N.negative=I.negative^O.negative,N.length=O.length+I.length;for(var U=0,W=0,Q=0;Q<N.length-1;Q++){var ue=W;W=0;for(var le=U&67108863,he=Math.min(Q,I.length-1),G=Math.max(0,Q-O.length+1);G<=he;G++){var $=Q-G,J=O.words[$]|0,X=I.words[G]|0,oe=J*X,ie=oe&67108863;ue=ue+(oe/67108864|0)|0,ie=ie+le|0,le=ie&67108863,ue=ue+(ie>>>26)|0,W+=ue>>>26,ue&=67108863}N.words[Q]=le,U=ue,ue=W}return U!==0?N.words[Q]=U:N.length--,N.strip()}function b(O,I,N){var U=new p;return U.mulp(O,I,N)}s.prototype.mulTo=function(I,N){var U,W=this.length+I.length;return this.length===10&&I.length===10?U=E(this,I,N):W<63?U=S(this,I,N):W<1024?U=y(this,I,N):U=b(this,I,N),U};function p(O,I){this.x=O,this.y=I}p.prototype.makeRBT=function(I){for(var N=new Array(I),U=s.prototype._countBits(I)-1,W=0;W<I;W++)N[W]=this.revBin(W,U,I);return N},p.prototype.revBin=function(I,N,U){if(I===0||I===U-1)return I;for(var W=0,Q=0;Q<N;Q++)W|=(I&1)<<N-Q-1,I>>=1;return W},p.prototype.permute=function(I,N,U,W,Q,ue){for(var le=0;le<ue;le++)W[le]=N[I[le]],Q[le]=U[I[le]]},p.prototype.transform=function(I,N,U,W,Q,ue){this.permute(ue,I,N,U,W,Q);for(var le=1;le<Q;le<<=1)for(var he=le<<1,G=Math.cos(2*Math.PI/he),$=Math.sin(2*Math.PI/he),J=0;J<Q;J+=he)for(var X=G,oe=$,ie=0;ie<le;ie++){var j=U[J+ie],ee=W[J+ie],re=U[J+ie+le],ce=W[J+ie+le],be=X*re-oe*ce;ce=X*ce+oe*re,re=be,U[J+ie]=j+re,W[J+ie]=ee+ce,U[J+ie+le]=j-re,W[J+ie+le]=ee-ce,ie!==he&&(be=G*X-$*oe,oe=G*oe+$*X,X=be)}},p.prototype.guessLen13b=function(I,N){var U=Math.max(N,I)|1,W=U&1,Q=0;for(U=U/2|0;U;U=U>>>1)Q++;return 1<<Q+1+W},p.prototype.conjugate=function(I,N,U){if(!(U<=1))for(var W=0;W<U/2;W++){var Q=I[W];I[W]=I[U-W-1],I[U-W-1]=Q,Q=N[W],N[W]=-N[U-W-1],N[U-W-1]=-Q}},p.prototype.normalize13b=function(I,N){for(var U=0,W=0;W<N/2;W++){var Q=Math.round(I[2*W+1]/N)*8192+Math.round(I[2*W]/N)+U;I[W]=Q&67108863,Q<67108864?U=0:U=Q/67108864|0}return I},p.prototype.convert13b=function(I,N,U,W){for(var Q=0,ue=0;ue<N;ue++)Q=Q+(I[ue]|0),U[2*ue]=Q&8191,Q=Q>>>13,U[2*ue+1]=Q&8191,Q=Q>>>13;for(ue=2*N;ue<W;++ue)U[ue]=0;i(Q===0),i((Q&-8192)===0)},p.prototype.stub=function(I){for(var N=new Array(I),U=0;U<I;U++)N[U]=0;return N},p.prototype.mulp=function(I,N,U){var W=2*this.guessLen13b(I.length,N.length),Q=this.makeRBT(W),ue=this.stub(W),le=new Array(W),he=new Array(W),G=new Array(W),$=new Array(W),J=new Array(W),X=new Array(W),oe=U.words;oe.length=W,this.convert13b(I.words,I.length,le,W),this.convert13b(N.words,N.length,$,W),this.transform(le,ue,he,G,W,Q),this.transform($,ue,J,X,W,Q);for(var ie=0;ie<W;ie++){var j=he[ie]*J[ie]-G[ie]*X[ie];G[ie]=he[ie]*X[ie]+G[ie]*J[ie],he[ie]=j}return this.conjugate(he,G,W),this.transform(he,G,oe,ue,W,Q),this.conjugate(oe,ue,W),this.normalize13b(oe,W),U.negative=I.negative^N.negative,U.length=I.length+N.length,U.strip()},s.prototype.mul=function(I){var N=new s(null);return N.words=new Array(this.length+I.length),this.mulTo(I,N)},s.prototype.mulf=function(I){var N=new s(null);return N.words=new Array(this.length+I.length),b(this,I,N)},s.prototype.imul=function(I){return this.clone().mulTo(I,this)},s.prototype.imuln=function(I){i(typeof I=="number"),i(I<67108864);for(var N=0,U=0;U<this.length;U++){var W=(this.words[U]|0)*I,Q=(W&67108863)+(N&67108863);N>>=26,N+=W/67108864|0,N+=Q>>>26,this.words[U]=Q&67108863}return N!==0&&(this.words[U]=N,this.length++),this},s.prototype.muln=function(I){return this.clone().imuln(I)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(I){var N=w(I);if(N.length===0)return new s(1);for(var U=this,W=0;W<N.length&&N[W]===0;W++,U=U.sqr());if(++W<N.length)for(var Q=U.sqr();W<N.length;W++,Q=Q.sqr())N[W]!==0&&(U=U.mul(Q));return U},s.prototype.iushln=function(I){i(typeof I=="number"&&I>=0);var N=I%26,U=(I-N)/26,W=67108863>>>26-N<<26-N,Q;if(N!==0){var ue=0;for(Q=0;Q<this.length;Q++){var le=this.words[Q]&W,he=(this.words[Q]|0)-le<<N;this.words[Q]=he|ue,ue=le>>>26-N}ue&&(this.words[Q]=ue,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q<U;Q++)this.words[Q]=0;this.length+=U}return this.strip()},s.prototype.ishln=function(I){return i(this.negative===0),this.iushln(I)},s.prototype.iushrn=function(I,N,U){i(typeof I=="number"&&I>=0);var W;N?W=(N-N%26)/26:W=0;var Q=I%26,ue=Math.min((I-Q)/26,this.length),le=67108863^67108863>>>Q<<Q,he=U;if(W-=ue,W=Math.max(0,W),he){for(var G=0;G<ue;G++)he.words[G]=this.words[G];he.length=ue}if(ue!==0)if(this.length>ue)for(this.length-=ue,G=0;G<this.length;G++)this.words[G]=this.words[G+ue];else this.words[0]=0,this.length=1;var $=0;for(G=this.length-1;G>=0&&($!==0||G>=W);G--){var J=this.words[G]|0;this.words[G]=$<<26-Q|J>>>Q,$=J&le}return he&&$!==0&&(he.words[he.length++]=$),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(I,N,U){return i(this.negative===0),this.iushrn(I,N,U)},s.prototype.shln=function(I){return this.clone().ishln(I)},s.prototype.ushln=function(I){return this.clone().iushln(I)},s.prototype.shrn=function(I){return this.clone().ishrn(I)},s.prototype.ushrn=function(I){return this.clone().iushrn(I)},s.prototype.testn=function(I){i(typeof I=="number"&&I>=0);var N=I%26,U=(I-N)/26,W=1<<N;if(this.length<=U)return!1;var Q=this.words[U];return!!(Q&W)},s.prototype.imaskn=function(I){i(typeof I=="number"&&I>=0);var N=I%26,U=(I-N)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(N!==0&&U++,this.length=Math.min(U,this.length),N!==0){var W=67108863^67108863>>>N<<N;this.words[this.length-1]&=W}return this.strip()},s.prototype.maskn=function(I){return this.clone().imaskn(I)},s.prototype.iaddn=function(I){return i(typeof I=="number"),i(I<67108864),I<0?this.isubn(-I):this.negative!==0?this.length===1&&(this.words[0]|0)<I?(this.words[0]=I-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(I),this.negative=1,this):this._iaddn(I)},s.prototype._iaddn=function(I){this.words[0]+=I;for(var N=0;N<this.length&&this.words[N]>=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},s.prototype.isubn=function(I){if(i(typeof I=="number"),i(I<67108864),I<0)return this.iaddn(-I);if(this.negative!==0)return this.negative=0,this.iaddn(I),this.negative=1,this;if(this.words[0]-=I,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N<this.length&&this.words[N]<0;N++)this.words[N]+=67108864,this.words[N+1]-=1;return this.strip()},s.prototype.addn=function(I){return this.clone().iaddn(I)},s.prototype.subn=function(I){return this.clone().isubn(I)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(I,N,U){var W=I.length+U,Q;this._expand(W);var ue,le=0;for(Q=0;Q<I.length;Q++){ue=(this.words[Q+U]|0)+le;var he=(I.words[Q]|0)*N;ue-=he&67108863,le=(ue>>26)-(he/67108864|0),this.words[Q+U]=ue&67108863}for(;Q<this.length-U;Q++)ue=(this.words[Q+U]|0)+le,le=ue>>26,this.words[Q+U]=ue&67108863;if(le===0)return this.strip();for(i(le===-1),le=0,Q=0;Q<this.length;Q++)ue=-(this.words[Q]|0)+le,le=ue>>26,this.words[Q]=ue&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(I,N){var U=this.length-I.length,W=this.clone(),Q=I,ue=Q.words[Q.length-1]|0,le=this._countBits(ue);U=26-le,U!==0&&(Q=Q.ushln(U),W.iushln(U),ue=Q.words[Q.length-1]|0);var he=W.length-Q.length,G;if(N!=="mod"){G=new s(null),G.length=he+1,G.words=new Array(G.length);for(var $=0;$<G.length;$++)G.words[$]=0}var J=W.clone()._ishlnsubmul(Q,1,he);J.negative===0&&(W=J,G&&(G.words[he]=1));for(var X=he-1;X>=0;X--){var oe=(W.words[Q.length+X]|0)*67108864+(W.words[Q.length+X-1]|0);for(oe=Math.min(oe/ue|0,67108863),W._ishlnsubmul(Q,oe,X);W.negative!==0;)oe--,W.negative=0,W._ishlnsubmul(Q,1,X),W.isZero()||(W.negative^=1);G&&(G.words[X]=oe)}return G&&G.strip(),W.strip(),N!=="div"&&U!==0&&W.iushrn(U),{div:G||null,mod:W}},s.prototype.divmod=function(I,N,U){if(i(!I.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var W,Q,ue;return this.negative!==0&&I.negative===0?(ue=this.neg().divmod(I,N),N!=="mod"&&(W=ue.div.neg()),N!=="div"&&(Q=ue.mod.neg(),U&&Q.negative!==0&&Q.iadd(I)),{div:W,mod:Q}):this.negative===0&&I.negative!==0?(ue=this.divmod(I.neg(),N),N!=="mod"&&(W=ue.div.neg()),{div:W,mod:ue.mod}):this.negative&I.negative?(ue=this.neg().divmod(I.neg(),N),N!=="div"&&(Q=ue.mod.neg(),U&&Q.negative!==0&&Q.isub(I)),{div:ue.div,mod:Q}):I.length>this.length||this.cmp(I)<0?{div:new s(0),mod:this}:I.length===1?N==="div"?{div:this.divn(I.words[0]),mod:null}:N==="mod"?{div:null,mod:new s(this.modn(I.words[0]))}:{div:this.divn(I.words[0]),mod:new s(this.modn(I.words[0]))}:this._wordDiv(I,N)},s.prototype.div=function(I){return this.divmod(I,"div",!1).div},s.prototype.mod=function(I){return this.divmod(I,"mod",!1).mod},s.prototype.umod=function(I){return this.divmod(I,"mod",!0).mod},s.prototype.divRound=function(I){var N=this.divmod(I);if(N.mod.isZero())return N.div;var U=N.div.negative!==0?N.mod.isub(I):N.mod,W=I.ushrn(1),Q=I.andln(1),ue=U.cmp(W);return ue<0||Q===1&&ue===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},s.prototype.modn=function(I){i(I<=67108863);for(var N=(1<<26)%I,U=0,W=this.length-1;W>=0;W--)U=(N*U+(this.words[W]|0))%I;return U},s.prototype.idivn=function(I){i(I<=67108863);for(var N=0,U=this.length-1;U>=0;U--){var W=(this.words[U]|0)+N*67108864;this.words[U]=W/I|0,N=W%I}return this.strip()},s.prototype.divn=function(I){return this.clone().idivn(I)},s.prototype.egcd=function(I){i(I.negative===0),i(!I.isZero());var N=this,U=I.clone();N.negative!==0?N=N.umod(I):N=N.clone();for(var W=new s(1),Q=new s(0),ue=new s(0),le=new s(1),he=0;N.isEven()&&U.isEven();)N.iushrn(1),U.iushrn(1),++he;for(var G=U.clone(),$=N.clone();!N.isZero();){for(var J=0,X=1;!(N.words[0]&X)&&J<26;++J,X<<=1);if(J>0)for(N.iushrn(J);J-- >0;)(W.isOdd()||Q.isOdd())&&(W.iadd(G),Q.isub($)),W.iushrn(1),Q.iushrn(1);for(var oe=0,ie=1;!(U.words[0]&ie)&&oe<26;++oe,ie<<=1);if(oe>0)for(U.iushrn(oe);oe-- >0;)(ue.isOdd()||le.isOdd())&&(ue.iadd(G),le.isub($)),ue.iushrn(1),le.iushrn(1);N.cmp(U)>=0?(N.isub(U),W.isub(ue),Q.isub(le)):(U.isub(N),ue.isub(W),le.isub(Q))}return{a:ue,b:le,gcd:U.iushln(he)}},s.prototype._invmp=function(I){i(I.negative===0),i(!I.isZero());var N=this,U=I.clone();N.negative!==0?N=N.umod(I):N=N.clone();for(var W=new s(1),Q=new s(0),ue=U.clone();N.cmpn(1)>0&&U.cmpn(1)>0;){for(var le=0,he=1;!(N.words[0]&he)&&le<26;++le,he<<=1);if(le>0)for(N.iushrn(le);le-- >0;)W.isOdd()&&W.iadd(ue),W.iushrn(1);for(var G=0,$=1;!(U.words[0]&$)&&G<26;++G,$<<=1);if(G>0)for(U.iushrn(G);G-- >0;)Q.isOdd()&&Q.iadd(ue),Q.iushrn(1);N.cmp(U)>=0?(N.isub(U),W.isub(Q)):(U.isub(N),Q.isub(W))}var J;return N.cmpn(1)===0?J=W:J=Q,J.cmpn(0)<0&&J.iadd(I),J},s.prototype.gcd=function(I){if(this.isZero())return I.abs();if(I.isZero())return this.abs();var N=this.clone(),U=I.clone();N.negative=0,U.negative=0;for(var W=0;N.isEven()&&U.isEven();W++)N.iushrn(1),U.iushrn(1);do{for(;N.isEven();)N.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=N.cmp(U);if(Q<0){var ue=N;N=U,U=ue}else if(Q===0||U.cmpn(1)===0)break;N.isub(U)}while(!0);return U.iushln(W)},s.prototype.invm=function(I){return this.egcd(I).a.umod(I)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(I){return this.words[0]&I},s.prototype.bincn=function(I){i(typeof I=="number");var N=I%26,U=(I-N)/26,W=1<<N;if(this.length<=U)return this._expand(U+1),this.words[U]|=W,this;for(var Q=W,ue=U;Q!==0&&ue<this.length;ue++){var le=this.words[ue]|0;le+=Q,Q=le>>>26,le&=67108863,this.words[ue]=le}return Q!==0&&(this.words[ue]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(I){var N=I<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;this.strip();var U;if(this.length>1)U=1;else{N&&(I=-I),i(I<=67108863,"Number is too big");var W=this.words[0]|0;U=W===I?0:W<I?-1:1}return this.negative!==0?-U|0:U},s.prototype.cmp=function(I){if(this.negative!==0&&I.negative===0)return-1;if(this.negative===0&&I.negative!==0)return 1;var N=this.ucmp(I);return this.negative!==0?-N|0:N},s.prototype.ucmp=function(I){if(this.length>I.length)return 1;if(this.length<I.length)return-1;for(var N=0,U=this.length-1;U>=0;U--){var W=this.words[U]|0,Q=I.words[U]|0;if(W!==Q){W<Q?N=-1:W>Q&&(N=1);break}}return N},s.prototype.gtn=function(I){return this.cmpn(I)===1},s.prototype.gt=function(I){return this.cmp(I)===1},s.prototype.gten=function(I){return this.cmpn(I)>=0},s.prototype.gte=function(I){return this.cmp(I)>=0},s.prototype.ltn=function(I){return this.cmpn(I)===-1},s.prototype.lt=function(I){return this.cmp(I)===-1},s.prototype.lten=function(I){return this.cmpn(I)<=0},s.prototype.lte=function(I){return this.cmp(I)<=0},s.prototype.eqn=function(I){return this.cmpn(I)===0},s.prototype.eq=function(I){return this.cmp(I)===0},s.red=function(I){return new F(I)},s.prototype.toRed=function(I){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),I.convertTo(this)._forceRed(I)},s.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(I){return this.red=I,this},s.prototype.forceRed=function(I){return i(!this.red,"Already a number in reduction context"),this._forceRed(I)},s.prototype.redAdd=function(I){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,I)},s.prototype.redIAdd=function(I){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,I)},s.prototype.redSub=function(I){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,I)},s.prototype.redISub=function(I){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,I)},s.prototype.redShl=function(I){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,I)},s.prototype.redMul=function(I){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,I),this.red.mul(this,I)},s.prototype.redIMul=function(I){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,I),this.red.imul(this,I)},s.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(I){return i(this.red&&!I.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,I)};var u={k256:null,p224:null,p192:null,p25519:null};function m(O,I){this.name=O,this.p=new s(I,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}m.prototype._tmp=function(){var I=new s(null);return I.words=new Array(Math.ceil(this.n/13)),I},m.prototype.ireduce=function(I){var N=I,U;do this.split(N,this.tmp),N=this.imulK(N),N=N.iadd(this.tmp),U=N.bitLength();while(U>this.n);var W=U<this.n?-1:N.ucmp(this.p);return W===0?(N.words[0]=0,N.length=1):W>0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},m.prototype.split=function(I,N){I.iushrn(this.n,0,N)},m.prototype.imulK=function(I){return I.imul(this.k)};function h(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(h,m),h.prototype.split=function(I,N){for(var U=4194303,W=Math.min(I.length,9),Q=0;Q<W;Q++)N.words[Q]=I.words[Q];if(N.length=W,I.length<=9){I.words[0]=0,I.length=1;return}var ue=I.words[9];for(N.words[N.length++]=ue&U,Q=10;Q<I.length;Q++){var le=I.words[Q]|0;I.words[Q-10]=(le&U)<<4|ue>>>22,ue=le}ue>>>=22,I.words[Q-10]=ue,ue===0&&I.length>10?I.length-=10:I.length-=9},h.prototype.imulK=function(I){I.words[I.length]=0,I.words[I.length+1]=0,I.length+=2;for(var N=0,U=0;U<I.length;U++){var W=I.words[U]|0;N+=W*977,I.words[U]=N&67108863,N=W*64+(N/67108864|0)}return I.words[I.length-1]===0&&(I.length--,I.words[I.length-1]===0&&I.length--),I};function P(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(P,m);function L(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(L,m);function z(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(z,m),z.prototype.imulK=function(I){for(var N=0,U=0;U<I.length;U++){var W=(I.words[U]|0)*19+N,Q=W&67108863;W>>>=26,I.words[U]=Q,N=W}return N!==0&&(I.words[I.length++]=N),I},s._prime=function(I){if(u[I])return u[I];var N;if(I==="k256")N=new h;else if(I==="p224")N=new P;else if(I==="p192")N=new L;else if(I==="p25519")N=new z;else throw new Error("Unknown prime "+I);return u[I]=N,N};function F(O){if(typeof O=="string"){var I=s._prime(O);this.m=I.p,this.prime=I}else i(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}F.prototype._verify1=function(I){i(I.negative===0,"red works only with positives"),i(I.red,"red works only with red numbers")},F.prototype._verify2=function(I,N){i((I.negative|N.negative)===0,"red works only with positives"),i(I.red&&I.red===N.red,"red works only with red numbers")},F.prototype.imod=function(I){return this.prime?this.prime.ireduce(I)._forceRed(this):I.umod(this.m)._forceRed(this)},F.prototype.neg=function(I){return I.isZero()?I.clone():this.m.sub(I)._forceRed(this)},F.prototype.add=function(I,N){this._verify2(I,N);var U=I.add(N);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},F.prototype.iadd=function(I,N){this._verify2(I,N);var U=I.iadd(N);return U.cmp(this.m)>=0&&U.isub(this.m),U},F.prototype.sub=function(I,N){this._verify2(I,N);var U=I.sub(N);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},F.prototype.isub=function(I,N){this._verify2(I,N);var U=I.isub(N);return U.cmpn(0)<0&&U.iadd(this.m),U},F.prototype.shl=function(I,N){return this._verify1(I),this.imod(I.ushln(N))},F.prototype.imul=function(I,N){return this._verify2(I,N),this.imod(I.imul(N))},F.prototype.mul=function(I,N){return this._verify2(I,N),this.imod(I.mul(N))},F.prototype.isqr=function(I){return this.imul(I,I.clone())},F.prototype.sqr=function(I){return this.mul(I,I)},F.prototype.sqrt=function(I){if(I.isZero())return I.clone();var N=this.m.andln(3);if(i(N%2===1),N===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(I,U)}for(var W=this.m.subn(1),Q=0;!W.isZero()&&W.andln(1)===0;)Q++,W.iushrn(1);i(!W.isZero());var ue=new s(1).toRed(this),le=ue.redNeg(),he=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,he).cmp(le)!==0;)G.redIAdd(le);for(var $=this.pow(G,W),J=this.pow(I,W.addn(1).iushrn(1)),X=this.pow(I,W),oe=Q;X.cmp(ue)!==0;){for(var ie=X,j=0;ie.cmp(ue)!==0;j++)ie=ie.redSqr();i(j<oe);var ee=this.pow($,new s(1).iushln(oe-j-1));J=J.redMul(ee),$=ee.redSqr(),X=X.redMul($),oe=j}return J},F.prototype.invm=function(I){var N=I._invmp(this.m);return N.negative!==0?(N.negative=0,this.imod(N).redNeg()):this.imod(N)},F.prototype.pow=function(I,N){if(N.isZero())return new s(1).toRed(this);if(N.cmpn(1)===0)return I.clone();var U=4,W=new Array(1<<U);W[0]=new s(1).toRed(this),W[1]=I;for(var Q=2;Q<W.length;Q++)W[Q]=this.mul(W[Q-1],I);var ue=W[0],le=0,he=0,G=N.bitLength()%26;for(G===0&&(G=26),Q=N.length-1;Q>=0;Q--){for(var $=N.words[Q],J=G-1;J>=0;J--){var X=$>>J&1;if(ue!==W[0]&&(ue=this.sqr(ue)),X===0&&le===0){he=0;continue}le<<=1,le|=X,he++,!(he!==U&&(Q!==0||J!==0))&&(ue=this.mul(ue,W[le]),he=0,le=0)}G=26}return ue},F.prototype.convertTo=function(I){var N=I.umod(this.m);return N===I?N.clone():N},F.prototype.convertFrom=function(I){var N=I.clone();return N.red=null,N},s.mont=function(I){return new B(I)};function B(O){F.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}n(B,F),B.prototype.convertTo=function(I){return this.imod(I.ushln(this.shift))},B.prototype.convertFrom=function(I){var N=this.imod(I.mul(this.rinv));return N.red=null,N},B.prototype.imul=function(I,N){if(I.isZero()||N.isZero())return I.words[0]=0,I.length=1,I;var U=I.imul(N),W=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(W).iushrn(this.shift),ue=Q;return Q.cmp(this.m)>=0?ue=Q.isub(this.m):Q.cmpn(0)<0&&(ue=Q.iadd(this.m)),ue._forceRed(this)},B.prototype.mul=function(I,N){if(I.isZero()||N.isZero())return new s(0)._forceRed(this);var U=I.mul(N),W=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(W).iushrn(this.shift),ue=Q;return Q.cmp(this.m)>=0?ue=Q.isub(this.m):Q.cmpn(0)<0&&(ue=Q.iadd(this.m)),ue._forceRed(this)},B.prototype.invm=function(I){var N=this.imod(I._invmp(this.m).mul(this.r2));return N._forceRed(this)}}(e,this)},6204:function(e){"use strict";e.exports=t;function t(r){var o,a,i,n=r.length,s=0;for(o=0;o<n;++o)s+=r[o].length;var c=new Array(s),f=0;for(o=0;o<n;++o){var g=r[o],v=g.length;for(a=0;a<v;++a){var T=c[f++]=new Array(v-1),l=0;for(i=0;i<v;++i)i!==a&&(T[l++]=g[i]);if(a&1){var _=T[1];T[1]=T[0],T[0]=_}}}return c}},6867:function(e,t,r){"use strict";e.exports=l;var o=r(1888),a=r(855),i=r(7150);function n(_,w){for(var S=0;S<_;++S)if(!(w[S]<=w[S+_]))return!0;return!1}function s(_,w,S,E){for(var y=0,b=0,p=0,u=_.length;p<u;++p){var m=_[p];if(!n(w,m)){for(var h=0;h<2*w;++h)S[y++]=m[h];E[b++]=p}}return b}function c(_,w,S,E){var y=_.length,b=w.length;if(!(y<=0||b<=0)){var p=_[0].length>>>1;if(!(p<=0)){var u,m=o.mallocDouble(2*p*y),h=o.mallocInt32(y);if(y=s(_,p,m,h),y>0){if(p===1&&E)a.init(y),u=a.sweepComplete(p,S,0,y,m,h,0,y,m,h);else{var P=o.mallocDouble(2*p*b),L=o.mallocInt32(b);b=s(w,p,P,L),b>0&&(a.init(y+b),p===1?u=a.sweepBipartite(p,S,0,y,m,h,0,b,P,L):u=i(p,S,E,y,m,h,b,P,L),o.free(P),o.free(L))}o.free(m),o.free(h)}return u}}}var f;function g(_,w){f.push([_,w])}function v(_){return f=[],c(_,_,g,!0),f}function T(_,w){return f=[],c(_,w,g,!1),f}function l(_,w,S){switch(arguments.length){case 1:return v(_);case 2:return typeof w=="function"?c(_,_,w,!0):T(_,w);case 3:return c(_,w,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(e,t){"use strict";function r(){function i(c,f,g,v,T,l,_,w,S,E,y){for(var b=2*c,p=v,u=b*v;p<T;++p,u+=b){var m=l[f+u],h=l[f+u+c],P=_[p];e:for(var L=w,z=b*w;L<S;++L,z+=b){var F=E[f+z],B=E[f+z+c],O=y[L];if(!(B<m||h<F)){for(var I=f+1;I<c;++I){var N=l[I+u],U=l[I+c+u],W=E[I+z],Q=E[I+c+z];if(U<W||Q<N)continue e}var ue=g(P,O);if(ue!==void 0)return ue}}}}function n(c,f,g,v,T,l,_,w,S,E,y){for(var b=2*c,p=w,u=b*w;p<S;++p,u+=b){var m=E[f+u],h=E[f+u+c],P=y[p];e:for(var L=v,z=b*v;L<T;++L,z+=b){var F=l[f+z],B=l[f+z+c],O=_[L];if(!(h<F||B<m)){for(var I=f+1;I<c;++I){var N=l[I+z],U=l[I+c+z],W=E[I+u],Q=E[I+c+u];if(U<W||Q<N)continue e}var ue=g(O,P);if(ue!==void 0)return ue}}}}function s(c,f,g,v,T,l,_,w,S,E,y){return T-v>S-w?i(c,f,g,v,T,l,_,w,S,E,y):n(c,f,g,v,T,l,_,w,S,E,y)}return s}function o(){function i(g,v,T,l,_,w,S,E,y,b,p){for(var u=2*g,m=l,h=u*l;m<_;++m,h+=u){var P=w[v+h],L=w[v+h+g],z=S[m];e:for(var F=E,B=u*E;F<y;++F,B+=u){var O=b[v+B],I=p[F];if(!(O<=P||L<O)){for(var N=v+1;N<g;++N){var U=w[N+h],W=w[N+g+h],Q=b[N+B],ue=b[N+g+B];if(W<Q||ue<U)continue e}var le=T(I,z);if(le!==void 0)return le}}}}function n(g,v,T,l,_,w,S,E,y,b,p){for(var u=2*g,m=l,h=u*l;m<_;++m,h+=u){var P=w[v+h],L=w[v+h+g],z=S[m];e:for(var F=E,B=u*E;F<y;++F,B+=u){var O=b[v+B],I=p[F];if(!(O<P||L<O)){for(var N=v+1;N<g;++N){var U=w[N+h],W=w[N+g+h],Q=b[N+B],ue=b[N+g+B];if(W<Q||ue<U)continue e}var le=T(z,I);if(le!==void 0)return le}}}}function s(g,v,T,l,_,w,S,E,y,b,p){for(var u=2*g,m=E,h=u*E;m<y;++m,h+=u){var P=b[v+h],L=p[m];e:for(var z=l,F=u*l;z<_;++z,F+=u){var B=w[v+F],O=w[v+F+g],I=S[z];if(!(P<=B||O<P)){for(var N=v+1;N<g;++N){var U=w[N+F],W=w[N+g+F],Q=b[N+h],ue=b[N+g+h];if(W<Q||ue<U)continue e}var le=T(L,I);if(le!==void 0)return le}}}}function c(g,v,T,l,_,w,S,E,y,b,p){for(var u=2*g,m=E,h=u*E;m<y;++m,h+=u){var P=b[v+h],L=p[m];e:for(var z=l,F=u*l;z<_;++z,F+=u){var B=w[v+F],O=w[v+F+g],I=S[z];if(!(P<B||O<P)){for(var N=v+1;N<g;++N){var U=w[N+F],W=w[N+g+F],Q=b[N+h],ue=b[N+g+h];if(W<Q||ue<U)continue e}var le=T(I,L);if(le!==void 0)return le}}}}function f(g,v,T,l,_,w,S,E,y,b,p,u){return w-_>b-y?l?i(g,v,T,_,w,S,E,y,b,p,u):n(g,v,T,_,w,S,E,y,b,p,u):l?s(g,v,T,_,w,S,E,y,b,p,u):c(g,v,T,_,w,S,E,y,b,p,u)}return f}function a(i){return i?r():o()}t.partial=a(!1),t.full=a(!0)},7150:function(e,t,r){"use strict";e.exports=O;var o=r(1888),a=r(8828),i=r(2455),n=i.partial,s=i.full,c=r(855),f=r(3545),g=r(8105),v=128,T=1<<22,l=1<<22,_=g("!(lo>=p0)&&!(p1>=hi)"),w=g("lo===p0"),S=g("lo<p0"),E=g("hi<=p0"),y=g("lo<=p0&&p0<=hi"),b=g("lo<p0&&p0<=hi"),p=6,u=2,m=1024,h=o.mallocInt32(m),P=o.mallocDouble(m);function L(I,N){var U=8*a.log2(N+1)*(I+1)|0,W=a.nextPow2(p*U);h.length<W&&(o.free(h),h=o.mallocInt32(W));var Q=a.nextPow2(u*U);P.length<Q&&(o.free(P),P=o.mallocDouble(Q))}function z(I,N,U,W,Q,ue,le,he,G){var $=p*I;h[$]=N,h[$+1]=U,h[$+2]=W,h[$+3]=Q,h[$+4]=ue,h[$+5]=le;var J=u*I;P[J]=he,P[J+1]=G}function F(I,N,U,W,Q,ue,le,he,G,$,J){var X=2*I,oe=G*X,ie=$[oe+N];e:for(var j=Q,ee=Q*X;j<ue;++j,ee+=X){var re=le[ee+N],ce=le[ee+N+I];if(!(ie<re||ce<ie)&&!(W&&ie===re)){for(var be=he[j],Ae=N+1;Ae<I;++Ae){var re=le[ee+Ae],ce=le[ee+Ae+I],ze=$[oe+Ae],Re=$[oe+Ae+I];if(ce<ze||Re<re)continue e}var Xe;if(W?Xe=U(J,be):Xe=U(be,J),Xe!==void 0)return Xe}}}function B(I,N,U,W,Q,ue,le,he,G,$){var J=2*I,X=he*J,oe=G[X+N];e:for(var ie=W,j=W*J;ie<Q;++ie,j+=J){var ee=le[ie];if(ee!==$){var re=ue[j+N],ce=ue[j+N+I];if(!(oe<re||ce<oe)){for(var be=N+1;be<I;++be){var re=ue[j+be],ce=ue[j+be+I],Ae=G[X+be],ze=G[X+be+I];if(ce<Ae||ze<re)continue e}var Re=U(ee,$);if(Re!==void 0)return Re}}}}function O(I,N,U,W,Q,ue,le,he,G){L(I,W+le);var $=0,J=2*I,X;for(z($++,0,0,W,0,le,U?16:0,-1/0,1/0),U||z($++,0,0,le,0,W,1,-1/0,1/0);$>0;){$-=1;var oe=$*p,ie=h[oe],j=h[oe+1],ee=h[oe+2],re=h[oe+3],ce=h[oe+4],be=h[oe+5],Ae=$*u,ze=P[Ae],Re=P[Ae+1],Xe=be&1,it=!!(be&16),ot=Q,tt=ue,lt=he,Ee=G;if(Xe&&(ot=he,tt=G,lt=Q,Ee=ue),!(be&2&&(ee=S(I,ie,j,ee,ot,tt,Re),j>=ee))&&!(be&4&&(j=E(I,ie,j,ee,ot,tt,ze),j>=ee))){var _e=ee-j,fe=ce-re;if(it){if(I*_e*(_e+fe)<l){if(X=c.scanComplete(I,ie,N,j,ee,ot,tt,re,ce,lt,Ee),X!==void 0)return X;continue}}else if(I*Math.min(_e,fe)<v){if(X=n(I,ie,N,Xe,j,ee,ot,tt,re,ce,lt,Ee),X!==void 0)return X;continue}else if(I*_e*fe<T){if(X=c.scanBipartite(I,ie,N,Xe,j,ee,ot,tt,re,ce,lt,Ee),X!==void 0)return X;continue}var Fe=_(I,ie,j,ee,ot,tt,ze,Re);if(j<Fe)if(I*(Fe-j)<v){if(X=s(I,ie+1,N,j,Fe,ot,tt,re,ce,lt,Ee),X!==void 0)return X}else if(ie===I-2){if(Xe?X=c.sweepBipartite(I,N,re,ce,lt,Ee,j,Fe,ot,tt):X=c.sweepBipartite(I,N,j,Fe,ot,tt,re,ce,lt,Ee),X!==void 0)return X}else z($++,ie+1,j,Fe,re,ce,Xe,-1/0,1/0),z($++,ie+1,re,ce,j,Fe,Xe^1,-1/0,1/0);if(Fe<ee){var rt=f(I,ie,re,ce,lt,Ee),st=lt[J*rt+ie],Qe=w(I,ie,rt,ce,lt,Ee,st);if(Qe<ce&&z($++,ie,Fe,ee,Qe,ce,(Xe|4)+(it?16:0),st,Re),re<rt&&z($++,ie,Fe,ee,re,rt,(Xe|2)+(it?16:0),ze,st),rt+1===Qe){if(it?X=B(I,ie,N,Fe,ee,ot,tt,rt,lt,Ee[rt]):X=F(I,ie,N,Xe,Fe,ee,ot,tt,rt,lt,Ee[rt]),X!==void 0)return X}else if(rt<Qe){var Lt;if(it){if(Lt=y(I,ie,Fe,ee,ot,tt,st),Fe<Lt){var kt=w(I,ie,Fe,Lt,ot,tt,st);if(ie===I-2){if(Fe<kt&&(X=c.sweepComplete(I,N,Fe,kt,ot,tt,rt,Qe,lt,Ee),X!==void 0)||kt<Lt&&(X=c.sweepBipartite(I,N,kt,Lt,ot,tt,rt,Qe,lt,Ee),X!==void 0))return X}else Fe<kt&&z($++,ie+1,Fe,kt,rt,Qe,16,-1/0,1/0),kt<Lt&&(z($++,ie+1,kt,Lt,rt,Qe,0,-1/0,1/0),z($++,ie+1,rt,Qe,kt,Lt,1,-1/0,1/0))}}else Xe?Lt=b(I,ie,Fe,ee,ot,tt,st):Lt=y(I,ie,Fe,ee,ot,tt,st),Fe<Lt&&(ie===I-2?Xe?X=c.sweepBipartite(I,N,rt,Qe,lt,Ee,Fe,Lt,ot,tt):X=c.sweepBipartite(I,N,Fe,Lt,ot,tt,rt,Qe,lt,Ee):(z($++,ie+1,Fe,Lt,rt,Qe,Xe,-1/0,1/0),z($++,ie+1,rt,Qe,Fe,Lt,Xe^1,-1/0,1/0)))}}}}}},3545:function(e,t,r){"use strict";e.exports=s;var o=r(8105),a=o("lo<p0"),i=8;function n(c,f,g,v,T,l){for(var _=2*c,w=_*(g+1)+f,S=g+1;S<v;++S,w+=_)for(var E=T[w],y=S,b=_*(S-1);y>g&&T[b+f]>E;--y,b-=_){for(var p=b,u=b+_,m=0;m<_;++m,++p,++u){var h=T[p];T[p]=T[u],T[u]=h}var P=l[y];l[y]=l[y-1],l[y-1]=P}}function s(c,f,g,v,T,l){if(v<=g+1)return g;for(var _=g,w=v,S=v+g>>>1,E=2*c,y=S,b=T[E*S+f];_<w;){if(w-_<i){n(c,f,_,w,T,l),b=T[E*S+f];break}var p=w-_,u=Math.random()*p+_|0,m=T[E*u+f],h=Math.random()*p+_|0,P=T[E*h+f],L=Math.random()*p+_|0,z=T[E*L+f];m<=P?z>=P?(y=h,b=P):m>=z?(y=u,b=m):(y=L,b=z):P>=z?(y=h,b=P):z>=m?(y=u,b=m):(y=L,b=z);for(var O=E*(w-1),I=E*y,F=0;F<E;++F,++O,++I){var B=T[O];T[O]=T[I],T[I]=B}var N=l[w-1];l[w-1]=l[y],l[y]=N,y=a(c,f,_,w-1,T,l,b);for(var O=E*(w-1),I=E*y,F=0;F<E;++F,++O,++I){var B=T[O];T[O]=T[I],T[I]=B}var N=l[w-1];if(l[w-1]=l[y],l[y]=N,S<y){for(w=y-1;_<w&&T[E*(w-1)+f]===b;)w-=1;w+=1}else if(y<S)for(_=y+1;_<w&&T[E*_+f]===b;)_+=1;else break}return a(c,f,g,S,T,l,T[E*S+f])}},8105:function(e){"use strict";e.exports=r;var t={"lo===p0":o,"lo<p0":a,"lo<=p0":i,"hi<=p0":n,"lo<p0&&p0<=hi":c,"lo<=p0&&p0<=hi":s,"!(lo>=p0)&&!(p1>=hi)":f};function r(g){return t[g]}function o(g,v,T,l,_,w,S){for(var E=2*g,y=E*T,b=y,p=T,u=v,m=g+v,h=T;l>h;++h,y+=E){var P=_[y+u];if(P===S)if(p===h)p+=1,b+=E;else{for(var L=0;E>L;++L){var z=_[y+L];_[y+L]=_[b],_[b++]=z}var F=w[h];w[h]=w[p],w[p++]=F}}return p}function a(g,v,T,l,_,w,S){for(var E=2*g,y=E*T,b=y,p=T,u=v,m=g+v,h=T;l>h;++h,y+=E){var P=_[y+u];if(P<S)if(p===h)p+=1,b+=E;else{for(var L=0;E>L;++L){var z=_[y+L];_[y+L]=_[b],_[b++]=z}var F=w[h];w[h]=w[p],w[p++]=F}}return p}function i(g,v,T,l,_,w,S){for(var E=2*g,y=E*T,b=y,p=T,u=v,m=g+v,h=T;l>h;++h,y+=E){var P=_[y+m];if(P<=S)if(p===h)p+=1,b+=E;else{for(var L=0;E>L;++L){var z=_[y+L];_[y+L]=_[b],_[b++]=z}var F=w[h];w[h]=w[p],w[p++]=F}}return p}function n(g,v,T,l,_,w,S){for(var E=2*g,y=E*T,b=y,p=T,u=v,m=g+v,h=T;l>h;++h,y+=E){var P=_[y+m];if(P<=S)if(p===h)p+=1,b+=E;else{for(var L=0;E>L;++L){var z=_[y+L];_[y+L]=_[b],_[b++]=z}var F=w[h];w[h]=w[p],w[p++]=F}}return p}function s(g,v,T,l,_,w,S){for(var E=2*g,y=E*T,b=y,p=T,u=v,m=g+v,h=T;l>h;++h,y+=E){var P=_[y+u],L=_[y+m];if(P<=S&&S<=L)if(p===h)p+=1,b+=E;else{for(var z=0;E>z;++z){var F=_[y+z];_[y+z]=_[b],_[b++]=F}var B=w[h];w[h]=w[p],w[p++]=B}}return p}function c(g,v,T,l,_,w,S){for(var E=2*g,y=E*T,b=y,p=T,u=v,m=g+v,h=T;l>h;++h,y+=E){var P=_[y+u],L=_[y+m];if(P<S&&S<=L)if(p===h)p+=1,b+=E;else{for(var z=0;E>z;++z){var F=_[y+z];_[y+z]=_[b],_[b++]=F}var B=w[h];w[h]=w[p],w[p++]=B}}return p}function f(g,v,T,l,_,w,S,E){for(var y=2*g,b=y*T,p=b,u=T,m=v,h=g+v,P=T;l>P;++P,b+=y){var L=_[b+m],z=_[b+h];if(!(L>=S)&&!(E>=z))if(u===P)u+=1,p+=y;else{for(var F=0;y>F;++F){var B=_[b+F];_[b+F]=_[p],_[p++]=B}var O=w[P];w[P]=w[u],w[u++]=O}}return u}},4192:function(e){"use strict";e.exports=r;var t=32;function r(v,T){T<=4*t?o(0,T-1,v):g(0,T-1,v)}function o(v,T,l){for(var _=2*(v+1),w=v+1;w<=T;++w){for(var S=l[_++],E=l[_++],y=w,b=_-2;y-- >v;){var p=l[b-2],u=l[b-1];if(p<S)break;if(p===S&&u<E)break;l[b]=p,l[b+1]=u,b-=2}l[b]=S,l[b+1]=E}}function a(v,T,l){v*=2,T*=2;var _=l[v],w=l[v+1];l[v]=l[T],l[v+1]=l[T+1],l[T]=_,l[T+1]=w}function i(v,T,l){v*=2,T*=2,l[v]=l[T],l[v+1]=l[T+1]}function n(v,T,l,_){v*=2,T*=2,l*=2;var w=_[v],S=_[v+1];_[v]=_[T],_[v+1]=_[T+1],_[T]=_[l],_[T+1]=_[l+1],_[l]=w,_[l+1]=S}function s(v,T,l,_,w){v*=2,T*=2,w[v]=w[T],w[T]=l,w[v+1]=w[T+1],w[T+1]=_}function c(v,T,l){v*=2,T*=2;var _=l[v],w=l[T];return _<w?!1:_===w?l[v+1]>l[T+1]:!0}function f(v,T,l,_){v*=2;var w=_[v];return w<T?!0:w===T?_[v+1]<l:!1}function g(v,T,l){var _=(T-v+1)/6|0,w=v+_,S=T-_,E=v+T>>1,y=E-_,b=E+_,p=w,u=y,m=E,h=b,P=S,L=v+1,z=T-1,F=0;c(p,u,l)&&(F=p,p=u,u=F),c(h,P,l)&&(F=h,h=P,P=F),c(p,m,l)&&(F=p,p=m,m=F),c(u,m,l)&&(F=u,u=m,m=F),c(p,h,l)&&(F=p,p=h,h=F),c(m,h,l)&&(F=m,m=h,h=F),c(u,P,l)&&(F=u,u=P,P=F),c(u,m,l)&&(F=u,u=m,m=F),c(h,P,l)&&(F=h,h=P,P=F);for(var B=l[2*u],O=l[2*u+1],I=l[2*h],N=l[2*h+1],U=2*p,W=2*m,Q=2*P,ue=2*w,le=2*E,he=2*S,G=0;G<2;++G){var $=l[U+G],J=l[W+G],X=l[Q+G];l[ue+G]=$,l[le+G]=J,l[he+G]=X}i(y,v,l),i(b,T,l);for(var oe=L;oe<=z;++oe)if(f(oe,B,O,l))oe!==L&&a(oe,L,l),++L;else if(!f(oe,I,N,l))for(;;)if(f(z,I,N,l)){f(z,B,O,l)?(n(oe,L,z,l),++L,--z):(a(oe,z,l),--z);break}else{if(--z<oe)break;continue}s(v,L-1,B,O,l),s(T,z+1,I,N,l),L-2-v<=t?o(v,L-2,l):g(v,L-2,l),T-(z+2)<=t?o(z+2,T,l):g(z+2,T,l),z-L<=t?o(L,z,l):g(L,z,l)}},855:function(e,t,r){"use strict";e.exports={init:w,sweepBipartite:y,sweepComplete:b,scanBipartite:p,scanComplete:u};var o=r(1888),a=r(8828),i=r(4192),n=1<<28,s=1024,c=o.mallocInt32(s),f=o.mallocInt32(s),g=o.mallocInt32(s),v=o.mallocInt32(s),T=o.mallocInt32(s),l=o.mallocInt32(s),_=o.mallocDouble(s*8);function w(m){var h=a.nextPow2(m);c.length<h&&(o.free(c),c=o.mallocInt32(h)),f.length<h&&(o.free(f),f=o.mallocInt32(h)),g.length<h&&(o.free(g),g=o.mallocInt32(h)),v.length<h&&(o.free(v),v=o.mallocInt32(h)),T.length<h&&(o.free(T),T=o.mallocInt32(h)),l.length<h&&(o.free(l),l=o.mallocInt32(h));var P=8*h;_.length<P&&(o.free(_),_=o.mallocDouble(P))}function S(m,h,P,L){var z=h[L],F=m[P-1];m[z]=F,h[F]=z}function E(m,h,P,L){m[P]=L,h[L]=P}function y(m,h,P,L,z,F,B,O,I,N){for(var U=0,W=2*m,Q=m-1,ue=W-1,le=P;le<L;++le){var he=F[le],G=W*le;_[U++]=z[G+Q],_[U++]=-(he+1),_[U++]=z[G+ue],_[U++]=he}for(var le=B;le<O;++le){var he=N[le]+n,$=W*le;_[U++]=I[$+Q],_[U++]=-he,_[U++]=I[$+ue],_[U++]=he}var J=U>>>1;i(_,J);for(var X=0,oe=0,le=0;le<J;++le){var ie=_[2*le+1]|0;if(ie>=n)ie=ie-n|0,S(g,v,oe--,ie);else if(ie>=0)S(c,f,X--,ie);else if(ie<=-n){ie=-ie-n|0;for(var j=0;j<X;++j){var ee=h(c[j],ie);if(ee!==void 0)return ee}E(g,v,oe++,ie)}else{ie=-ie-1|0;for(var j=0;j<oe;++j){var ee=h(ie,g[j]);if(ee!==void 0)return ee}E(c,f,X++,ie)}}}function b(m,h,P,L,z,F,B,O,I,N){for(var U=0,W=2*m,Q=m-1,ue=W-1,le=P;le<L;++le){var he=F[le]+1<<1,G=W*le;_[U++]=z[G+Q],_[U++]=-he,_[U++]=z[G+ue],_[U++]=he}for(var le=B;le<O;++le){var he=N[le]+1<<1,$=W*le;_[U++]=I[$+Q],_[U++]=-he|1,_[U++]=I[$+ue],_[U++]=he|1}var J=U>>>1;i(_,J);for(var X=0,oe=0,ie=0,le=0;le<J;++le){var j=_[2*le+1]|0,ee=j&1;if(le<J-1&&j>>1===_[2*le+3]>>1&&(ee=2,le+=1),j<0){for(var re=-(j>>1)-1,ce=0;ce<ie;++ce){var be=h(T[ce],re);if(be!==void 0)return be}if(ee!==0)for(var ce=0;ce<X;++ce){var be=h(c[ce],re);if(be!==void 0)return be}if(ee!==1)for(var ce=0;ce<oe;++ce){var be=h(g[ce],re);if(be!==void 0)return be}ee===0?E(c,f,X++,re):ee===1?E(g,v,oe++,re):ee===2&&E(T,l,ie++,re)}else{var re=(j>>1)-1;ee===0?S(c,f,X--,re):ee===1?S(g,v,oe--,re):ee===2&&S(T,l,ie--,re)}}}function p(m,h,P,L,z,F,B,O,I,N,U,W){var Q=0,ue=2*m,le=h,he=h+m,G=1,$=1;L?$=n:G=n;for(var J=z;J<F;++J){var X=J+G,oe=ue*J;_[Q++]=B[oe+le],_[Q++]=-X,_[Q++]=B[oe+he],_[Q++]=X}for(var J=I;J<N;++J){var X=J+$,ie=ue*J;_[Q++]=U[ie+le],_[Q++]=-X}var j=Q>>>1;i(_,j);for(var ee=0,J=0;J<j;++J){var re=_[2*J+1]|0;if(re<0){var X=-re,ce=!1;if(X>=n?(ce=!L,X-=n):(ce=!!L,X-=1),ce)E(c,f,ee++,X);else{var be=W[X],Ae=ue*X,ze=U[Ae+h+1],Re=U[Ae+h+1+m];e:for(var Xe=0;Xe<ee;++Xe){var it=c[Xe],ot=ue*it;if(!(Re<B[ot+h+1]||B[ot+h+1+m]<ze)){for(var tt=h+2;tt<m;++tt)if(U[Ae+tt+m]<B[ot+tt]||B[ot+tt+m]<U[Ae+tt])continue e;var lt=O[it],Ee;if(L?Ee=P(be,lt):Ee=P(lt,be),Ee!==void 0)return Ee}}}}else S(c,f,ee--,re-G)}}function u(m,h,P,L,z,F,B,O,I,N,U){for(var W=0,Q=2*m,ue=h,le=h+m,he=L;he<z;++he){var G=he+n,$=Q*he;_[W++]=F[$+ue],_[W++]=-G,_[W++]=F[$+le],_[W++]=G}for(var he=O;he<I;++he){var G=he+1,J=Q*he;_[W++]=N[J+ue],_[W++]=-G}var X=W>>>1;i(_,X);for(var oe=0,he=0;he<X;++he){var ie=_[2*he+1]|0;if(ie<0){var G=-ie;if(G>=n)c[oe++]=G-n;else{G-=1;var j=U[G],ee=Q*G,re=N[ee+h+1],ce=N[ee+h+1+m];e:for(var be=0;be<oe;++be){var Ae=c[be],ze=B[Ae];if(ze===j)break;var Re=Q*Ae;if(!(ce<F[Re+h+1]||F[Re+h+1+m]<re)){for(var Xe=h+2;Xe<m;++Xe)if(N[ee+Xe+m]<F[Re+Xe]||F[Re+Xe+m]<N[ee+Xe])continue e;var it=P(ze,j);if(it!==void 0)return it}}}}else{for(var G=ie-n,be=oe-1;be>=0;--be)if(c[be]===G){for(var Xe=be+1;Xe<oe;++Xe)c[Xe-1]=c[Xe];break}--oe}}}},2538:function(e,t,r){"use strict";var o=r(8902),a=r(5542),i=r(2272),n=r(5023);e.exports=v;function s(T){return[Math.min(T[0],T[1]),Math.max(T[0],T[1])]}function c(T,l){return T[0]-l[0]||T[1]-l[1]}function f(T){return T.map(s).sort(c)}function g(T,l,_){return l in T?T[l]:_}function v(T,l,_){Array.isArray(l)?(_=_||{},l=l||[]):(_=l||{},l=[]);var w=!!g(_,"delaunay",!0),S=!!g(_,"interior",!0),E=!!g(_,"exterior",!0),y=!!g(_,"infinity",!1);if(!S&&!E||T.length===0)return[];var b=o(T,l);if(w||S!==E||y){for(var p=a(T.length,f(l)),u=0;u<b.length;++u){var m=b[u];p.addTriangle(m[0],m[1],m[2])}return w&&i(T,p),E?S?y?n(p,0,y):p.cells():n(p,1,y):n(p,-1)}else return b}},2272:function(e,t,r){"use strict";var o=r(2646)[4],a=r(2478);e.exports=n;function i(s,c,f,g,v,T){var l=c.opposite(g,v);if(!(l<0)){if(v<g){var _=g;g=v,v=_,_=T,T=l,l=_}c.isConstraint(g,v)||o(s[g],s[v],s[T],s[l])<0&&f.push(g,v)}}function n(s,c){for(var f=[],g=s.length,v=c.stars,T=0;T<g;++T)for(var l=v[T],_=1;_<l.length;_+=2){var w=l[_];if(!(w<T)&&!c.isConstraint(T,w)){for(var S=l[_-1],E=-1,y=1;y<l.length;y+=2)if(l[y-1]===w){E=l[y];break}E<0||o(s[T],s[w],s[S],s[E])<0&&f.push(T,w)}}for(;f.length>0;){for(var w=f.pop(),T=f.pop(),S=-1,E=-1,l=v[T],b=1;b<l.length;b+=2){var p=l[b-1],u=l[b];p===w?E=u:u===w&&(S=p)}S<0||E<0||o(s[T],s[w],s[S],s[E])>=0||(c.flip(T,w),i(s,c,f,S,T,E),i(s,c,f,T,E,S),i(s,c,f,E,w,S),i(s,c,f,w,S,E))}}},5023:function(e,t,r){"use strict";var o=r(2478);e.exports=f;function a(g,v,T,l,_,w,S){this.cells=g,this.neighbor=v,this.flags=l,this.constraint=T,this.active=_,this.next=w,this.boundary=S}var i=a.prototype;function n(g,v){return g[0]-v[0]||g[1]-v[1]||g[2]-v[2]}i.locate=function(){var g=[0,0,0];return function(v,T,l){var _=v,w=T,S=l;return T<l?T<v&&(_=T,w=l,S=v):l<v&&(_=l,w=v,S=T),_<0?-1:(g[0]=_,g[1]=w,g[2]=S,o.eq(this.cells,g,n))}}();function s(g,v){for(var T=g.cells(),l=T.length,_=0;_<l;++_){var w=T[_],S=w[0],E=w[1],y=w[2];E<y?E<S&&(w[0]=E,w[1]=y,w[2]=S):y<S&&(w[0]=y,w[1]=S,w[2]=E)}T.sort(n);for(var b=new Array(l),_=0;_<b.length;++_)b[_]=0;var p=[],u=[],m=new Array(3*l),h=new Array(3*l),P=null;v&&(P=[]);for(var L=new a(T,m,h,b,p,u,P),_=0;_<l;++_)for(var w=T[_],z=0;z<3;++z){var S=w[z],E=w[(z+1)%3],F=m[3*_+z]=L.locate(E,S,g.opposite(E,S)),B=h[3*_+z]=g.isConstraint(S,E);F<0&&(B?u.push(_):(p.push(_),b[_]=1),v&&P.push([E,S,-1]))}return L}function c(g,v,T){for(var l=0,_=0;_<g.length;++_)v[_]===T&&(g[l++]=g[_]);return g.length=l,g}function f(g,v,T){var l=s(g,T);if(v===0)return T?l.cells.concat(l.boundary):l.cells;for(var _=1,w=l.active,S=l.next,E=l.flags,y=l.cells,b=l.constraint,p=l.neighbor;w.length>0||S.length>0;){for(;w.length>0;){var u=w.pop();if(E[u]!==-_){E[u]=_;for(var m=y[u],h=0;h<3;++h){var P=p[3*u+h];P>=0&&E[P]===0&&(b[3*u+h]?S.push(P):(w.push(P),E[P]=_))}}}var L=S;S=w,w=L,S.length=0,_=-_}var z=c(y,E,v);return T?z.concat(l.boundary):z}},8902:function(e,t,r){"use strict";var o=r(2478),a=r(3250)[3],i=0,n=1,s=2;e.exports=S;function c(E,y,b,p,u){this.a=E,this.b=y,this.idx=b,this.lowerIds=p,this.upperIds=u}function f(E,y,b,p){this.a=E,this.b=y,this.type=b,this.idx=p}function g(E,y){var b=E.a[0]-y.a[0]||E.a[1]-y.a[1]||E.type-y.type;return b||E.type!==i&&(b=a(E.a,E.b,y.b),b)?b:E.idx-y.idx}function v(E,y){return a(E.a,E.b,y)}function T(E,y,b,p,u){for(var m=o.lt(y,p,v),h=o.gt(y,p,v),P=m;P<h;++P){for(var L=y[P],z=L.lowerIds,B=z.length;B>1&&a(b[z[B-2]],b[z[B-1]],p)>0;)E.push([z[B-1],z[B-2],u]),B-=1;z.length=B,z.push(u);for(var F=L.upperIds,B=F.length;B>1&&a(b[F[B-2]],b[F[B-1]],p)<0;)E.push([F[B-2],F[B-1],u]),B-=1;F.length=B,F.push(u)}}function l(E,y){var b;return E.a[0]<y.a[0]?b=a(E.a,E.b,y.a):b=a(y.b,y.a,E.a),b||(y.b[0]<E.b[0]?b=a(E.a,E.b,y.b):b=a(y.b,y.a,E.b),b||E.idx-y.idx)}function _(E,y,b){var p=o.le(E,b,l),u=E[p],m=u.upperIds,h=m[m.length-1];u.upperIds=[h],E.splice(p+1,0,new c(b.a,b.b,b.idx,[h],m))}function w(E,y,b){var p=b.a;b.a=b.b,b.b=p;var u=o.eq(E,b,l),m=E[u],h=E[u-1];h.upperIds=m.upperIds,E.splice(u,1)}function S(E,y){for(var b=E.length,p=y.length,u=[],m=0;m<b;++m)u.push(new f(E[m],null,i,m));for(var m=0;m<p;++m){var h=y[m],P=E[h[0]],L=E[h[1]];P[0]<L[0]?u.push(new f(P,L,s,m),new f(L,P,n,m)):P[0]>L[0]&&u.push(new f(L,P,s,m),new f(P,L,n,m))}u.sort(g);for(var z=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),F=[new c([z,1],[z,0],-1,[],[],[],[])],B=[],m=0,O=u.length;m<O;++m){var I=u[m],N=I.type;N===i?T(B,F,E,I.a,I.idx):N===s?_(F,E,I):w(F,E,I)}return B}},5542:function(e,t,r){"use strict";var o=r(2478);e.exports=s;function a(c,f){this.stars=c,this.edges=f}var i=a.prototype;function n(c,f,g){for(var v=1,T=c.length;v<T;v+=2)if(c[v-1]===f&&c[v]===g){c[v-1]=c[T-2],c[v]=c[T-1],c.length=T-2;return}}i.isConstraint=function(){var c=[0,0];function f(g,v){return g[0]-v[0]||g[1]-v[1]}return function(g,v){return c[0]=Math.min(g,v),c[1]=Math.max(g,v),o.eq(this.edges,c,f)>=0}}(),i.removeTriangle=function(c,f,g){var v=this.stars;n(v[c],f,g),n(v[f],g,c),n(v[g],c,f)},i.addTriangle=function(c,f,g){var v=this.stars;v[c].push(f,g),v[f].push(g,c),v[g].push(c,f)},i.opposite=function(c,f){for(var g=this.stars[f],v=1,T=g.length;v<T;v+=2)if(g[v]===c)return g[v-1];return-1},i.flip=function(c,f){var g=this.opposite(c,f),v=this.opposite(f,c);this.removeTriangle(c,f,g),this.removeTriangle(f,c,v),this.addTriangle(c,v,g),this.addTriangle(f,g,v)},i.edges=function(){for(var c=this.stars,f=[],g=0,v=c.length;g<v;++g)for(var T=c[g],l=0,_=T.length;l<_;l+=2)f.push([T[l],T[l+1]]);return f},i.cells=function(){for(var c=this.stars,f=[],g=0,v=c.length;g<v;++g)for(var T=c[g],l=0,_=T.length;l<_;l+=2){var w=T[l],S=T[l+1];g<Math.min(w,S)&&f.push([g,w,S])}return f};function s(c,f){for(var g=new Array(c),v=0;v<c;++v)g[v]=[];return new a(g,f)}},2419:function(e){"use strict";e.exports=t;function t(r){for(var o=1,a=1;a<r.length;++a)for(var i=0;i<a;++i)if(r[a]<r[i])o=-o;else if(r[i]===r[a])return 0;return o}},3628:function(e,t,r){"use strict";var o=r(1338),a=r(727);function i(c,f){for(var g=0,v=c.length,T=0;T<v;++T)g+=c[T]*f[T];return g}function n(c){var f=c.length;if(f===0)return[];var g=c[0].length,v=o([c.length+1,c.length+1],1),T=o([c.length+1],1);v[f][f]=0;for(var l=0;l<f;++l){for(var _=0;_<=l;++_)v[_][l]=v[l][_]=2*i(c[l],c[_]);T[l]=i(c[l],c[l])}for(var w=a(v,T),S=0,E=w[f+1],l=0;l<E.length;++l)S+=E[l];for(var y=new Array(f),l=0;l<f;++l){for(var E=w[l],b=0,_=0;_<E.length;++_)b+=E[_];y[l]=b/S}return y}function s(c){if(c.length===0)return[];for(var f=c[0].length,g=o([f]),v=n(c),T=0;T<c.length;++T)for(var l=0;l<f;++l)g[l]+=c[T][l]*v[T];return g}s.barycenetric=n,e.exports=s},6037:function(e,t,r){e.exports=a;var o=r(3628);function a(i){for(var n=o(i),s=0,c=0;c<i.length;++c)for(var f=i[c],g=0;g<n.length;++g)s+=Math.pow(f[g]-n[g],2);return Math.sqrt(s/i.length)}},332:function(e,t,r){"use strict";e.exports=P;var o=r(1755),a=r(6867),i=r(1125),n=r(7842),s=r(1318),c=r(946),f=r(5838),g=r(1278),v=r(3637);function T(L){var z=c(L);return[g(z,-1/0),g(z,1/0)]}function l(L,z){for(var F=new Array(z.length),B=0;B<z.length;++B){var O=z[B],I=L[O[0]],N=L[O[1]];F[B]=[g(Math.min(I[0],N[0]),-1/0),g(Math.min(I[1],N[1]),-1/0),g(Math.max(I[0],N[0]),1/0),g(Math.max(I[1],N[1]),1/0)]}return F}function _(L){for(var z=new Array(L.length),F=0;F<L.length;++F){var B=L[F];z[F]=[g(B[0],-1/0),g(B[1],-1/0),g(B[0],1/0),g(B[1],1/0)]}return z}function w(L,z,F){var B=[];return a(F,function(O,I){var N=z[O],U=z[I];if(!(N[0]===U[0]||N[0]===U[1]||N[1]===U[0]||N[1]===U[1])){var W=L[N[0]],Q=L[N[1]],ue=L[U[0]],le=L[U[1]];i(W,Q,ue,le)&&B.push([O,I])}}),B}function S(L,z,F,B){var O=[];return a(F,B,function(I,N){var U=z[I];if(!(U[0]===N||U[1]===N)){var W=L[N],Q=L[U[0]],ue=L[U[1]];i(Q,ue,W,W)&&O.push([I,N])}}),O}function E(L,z,F,B,O){var I,N,U=L.map(function(Ae){return[n(Ae[0]),n(Ae[1])]});for(I=0;I<F.length;++I){var W=F[I];N=W[0];var Q=W[1],ue=z[N],le=z[Q],he=v(f(L[ue[0]]),f(L[ue[1]]),f(L[le[0]]),f(L[le[1]]));if(he){var G=L.length;L.push([c(he[0]),c(he[1])]),U.push(he),B.push([N,G],[Q,G])}}for(B.sort(function(Ae,ze){if(Ae[0]!==ze[0])return Ae[0]-ze[0];var Re=U[Ae[1]],Xe=U[ze[1]];return s(Re[0],Xe[0])||s(Re[1],Xe[1])}),I=B.length-1;I>=0;--I){var $=B[I];N=$[0];var J=z[N],X=J[0],oe=J[1],ie=L[X],j=L[oe];if((ie[0]-j[0]||ie[1]-j[1])<0){var ee=X;X=oe,oe=ee}J[0]=X;var re=J[1]=$[1],ce;for(O&&(ce=J[2]);I>0&&B[I-1][0]===N;){var $=B[--I],be=$[1];O?z.push([re,be,ce]):z.push([re,be]),re=be}O?z.push([re,oe,ce]):z.push([re,oe])}return U}function y(L,z,F){for(var B=z.length,O=new o(B),I=[],N=0;N<z.length;++N){var U=z[N],W=T(U[0]),Q=T(U[1]);I.push([g(W[0],-1/0),g(Q[0],-1/0),g(W[1],1/0),g(Q[1],1/0)])}a(I,function($,J){O.link($,J)});for(var ue=!0,le=new Array(B),N=0;N<B;++N){var he=O.find(N);he!==N&&(ue=!1,L[he]=[Math.min(L[N][0],L[he][0]),Math.min(L[N][1],L[he][1])])}if(ue)return null;for(var G=0,N=0;N<B;++N){var he=O.find(N);he===N?(le[N]=G,L[G++]=L[N]):le[N]=-1}L.length=G;for(var N=0;N<B;++N)le[N]<0&&(le[N]=le[O.find(N)]);return le}function b(L,z){return L[0]-z[0]||L[1]-z[1]}function p(L,z){var F=L[0]-z[0]||L[1]-z[1];return F||(L[2]<z[2]?-1:L[2]>z[2]?1:0)}function u(L,z,F){if(L.length!==0){if(z)for(var B=0;B<L.length;++B){var O=L[B],I=z[O[0]],N=z[O[1]];O[0]=Math.min(I,N),O[1]=Math.max(I,N)}else for(var B=0;B<L.length;++B){var O=L[B],I=O[0],N=O[1];O[0]=Math.min(I,N),O[1]=Math.max(I,N)}F?L.sort(p):L.sort(b);for(var U=1,B=1;B<L.length;++B){var W=L[B-1],Q=L[B];Q[0]===W[0]&&Q[1]===W[1]&&(!F||Q[2]===W[2])||(L[U++]=Q)}L.length=U}}function m(L,z,F){var B=y(L,[],_(L));return u(z,B,F),!!B}function h(L,z,F){var B=l(L,z),O=w(L,z,B),I=_(L),N=S(L,z,B,I),U=E(L,z,O,N,F),W=y(L,U,I);return u(z,W,F),W?!0:O.length>0||N.length>0}function P(L,z,F){var B;if(F){B=z;for(var O=new Array(z.length),I=0;I<z.length;++I){var N=z[I];O[I]=[N[0],N[1],F[I]]}z=O}for(var U=m(L,z,!!F);h(L,z,!!F);)U=!0;if(F&&U){B.length=0,F.length=0;for(var I=0;I<z.length;++I){var N=z[I];B.push([N[0],N[1]]),F.push(N[2])}}return U}},3637:function(e,t,r){"use strict";e.exports=v;var o=r(6504),a=r(8697),i=r(5572),n=r(7721),s=r(544),c=r(2653),f=r(8987);function g(T,l){return i(o(T[0],l[1]),o(T[1],l[0]))}function v(T,l,_,w){var S=s(l,T),E=s(w,_),y=g(S,E);if(n(y)===0)return null;var b=s(T,_),p=g(E,b),u=a(p,y),m=f(S,u),h=c(T,m);return h}},3642:function(e){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],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(e,t,r){"use strict";var o=r(3642),a=r(395);e.exports=i;function i(f){var g,v,T,l,_,w,S,E,u,y,b;if(f||(f={}),E=(f.nshades||72)-1,S=f.format||"hex",w=f.colormap,w||(w="jet"),typeof w=="string"){if(w=w.toLowerCase(),!o[w])throw Error(w+" not a supported colorscale");_=o[w]}else if(Array.isArray(w))_=w.slice();else throw Error("unsupported colormap option",w);if(_.length>E+1)throw new Error(w+" map requires nshades to be at least size "+_.length);Array.isArray(f.alpha)?f.alpha.length!==2?y=[1,1]:y=f.alpha.slice():typeof f.alpha=="number"?y=[f.alpha,f.alpha]:y=[1,1],g=_.map(function(P){return Math.round(P.index*E)}),y[0]=Math.min(Math.max(y[0],0),1),y[1]=Math.min(Math.max(y[1],0),1);var p=_.map(function(P,L){var z=_[L].index,F=_[L].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=y[0]+(y[1]-y[0])*z),F}),u=[];for(b=0;b<g.length-1;++b){l=g[b+1]-g[b],v=p[b],T=p[b+1];for(var m=0;m<l;m++){var h=m/l;u.push([Math.round(a(v[0],T[0],h)),Math.round(a(v[1],T[1],h)),Math.round(a(v[2],T[2],h)),a(v[3],T[3],h)])}}return u.push(_[_.length-1].rgb.concat(y[1])),S==="hex"?u=u.map(s):S==="rgbaString"?u=u.map(c):S==="float"&&(u=u.map(n)),u}function n(f){return[f[0]/255,f[1]/255,f[2]/255,f[3]]}function s(f){for(var g,v="#",T=0;T<3;++T)g=f[T],g=g.toString(16),v+=("00"+g).substr(g.length);return v}function c(f){return"rgba("+f.join(",")+")"}},3140:function(e,t,r){"use strict";e.exports=f;var o=r(3250),a=r(8572),i=r(9362),n=r(5382),s=r(8210);function c(g,v,T){var l=i(g[0],-v[0]),_=i(g[1],-v[1]),w=i(T[0],-v[0]),S=i(T[1],-v[1]),E=s(n(l,w),n(_,S));return E[E.length-1]>=0}function f(g,v,T,l){var _=o(v,T,l);if(_===0){var w=a(o(g,v,T)),S=a(o(g,v,l));if(w===S){if(w===0){var E=c(g,v,T),y=c(g,v,l);return E===y?0:E?1:-1}return 0}else{if(S===0)return w>0||c(g,v,l)?-1:1;if(w===0)return S>0||c(g,v,T)?1:-1}return a(S-w)}var b=o(g,v,T);if(b>0)return _>0&&o(g,v,l)>0?1:-1;if(b<0)return _>0||o(g,v,l)>0?1:-1;var p=o(g,v,l);return p>0||c(g,v,T)?1:-1}},8572:function(e){"use strict";e.exports=function(r){return r<0?-1:r>0?1:0}},8507:function(e){e.exports=o;var t=Math.min;function r(a,i){return a-i}function o(a,i){var n=a.length,s=a.length-i.length;if(s)return s;switch(n){case 0:return 0;case 1:return a[0]-i[0];case 2:return a[0]+a[1]-i[0]-i[1]||t(a[0],a[1])-t(i[0],i[1]);case 3:var c=a[0]+a[1],f=i[0]+i[1];if(s=c+a[2]-(f+i[2]),s)return s;var g=t(a[0],a[1]),v=t(i[0],i[1]);return t(g,a[2])-t(v,i[2])||t(g+a[2],c)-t(v+i[2],f);case 4:var T=a[0],l=a[1],_=a[2],w=a[3],S=i[0],E=i[1],y=i[2],b=i[3];return T+l+_+w-(S+E+y+b)||t(T,l,_,w)-t(S,E,y,b,S)||t(T+l,T+_,T+w,l+_,l+w,_+w)-t(S+E,S+y,S+b,E+y,E+b,y+b)||t(T+l+_,T+l+w,T+_+w,l+_+w)-t(S+E+y,S+E+b,S+y+b,E+y+b);default:for(var p=a.slice().sort(r),u=i.slice().sort(r),m=0;m<n;++m)if(s=p[m]-u[m],s)return s;return 0}}},3788:function(e,t,r){"use strict";var o=r(8507),a=r(2419);e.exports=i;function i(n,s){return o(n,s)||a(n)-a(s)}},7352:function(e,t,r){"use strict";var o=r(5721),a=r(4750),i=r(2690);e.exports=n;function n(s){var c=s.length;if(c===0)return[];if(c===1)return[[0]];var f=s[0].length;return f===0?[]:f===1?o(s):f===2?a(s):i(s,f)}},5721:function(e){"use strict";e.exports=t;function t(r){for(var o=0,a=0,i=1;i<r.length;++i)r[i][0]<r[o][0]&&(o=i),r[i][0]>r[a][0]&&(a=i);return o<a?[[o],[a]]:o>a?[[a],[o]]:[[o]]}},4750:function(e,t,r){"use strict";e.exports=a;var o=r(3090);function a(i){var n=o(i),s=n.length;if(s<=2)return[];for(var c=new Array(s),f=n[s-1],g=0;g<s;++g){var v=n[g];c[g]=[f,v],f=v}return c}},2690:function(e,t,r){"use strict";e.exports=s;var o=r(8954),a=r(3952);function i(c,f){for(var g=c.length,v=new Array(g),T=0;T<f.length;++T)v[T]=c[f[T]];for(var l=f.length,T=0;T<g;++T)f.indexOf(T)<0&&(v[l++]=c[T]);return v}function n(c,f){for(var g=c.length,v=f.length,T=0;T<g;++T)for(var l=c[T],_=0;_<l.length;++_){var w=l[_];if(w<v)l[_]=f[w];else{w=w-v;for(var S=0;S<v;++S)w>=f[S]&&(w+=1);l[_]=w}}return c}function s(c,f){try{return o(c,!0)}catch{var g=a(c);if(g.length<=f)return[];var v=i(c,g),T=o(v,!0);return n(T,g)}}},4769:function(e){"use strict";function t(o,a,i,n,s,c){var f=6*s*s-6*s,g=3*s*s-4*s+1,v=-6*s*s+6*s,T=3*s*s-2*s;if(o.length){c||(c=new Array(o.length));for(var l=o.length-1;l>=0;--l)c[l]=f*o[l]+g*a[l]+v*i[l]+T*n[l];return c}return f*o+g*a+v*i[l]+T*n}function r(o,a,i,n,s,c){var f=s-1,g=s*s,v=f*f,T=(1+2*s)*v,l=s*v,_=g*(3-2*s),w=g*f;if(o.length){c||(c=new Array(o.length));for(var S=o.length-1;S>=0;--S)c[S]=T*o[S]+l*a[S]+_*i[S]+w*n[S];return c}return T*o+l*a+_*i+w*n}e.exports=r,e.exports.derivative=t},7642:function(e,t,r){"use strict";var o=r(8954),a=r(1682);e.exports=c;function i(f,g){this.point=f,this.index=g}function n(f,g){for(var v=f.point,T=g.point,l=v.length,_=0;_<l;++_){var w=T[_]-v[_];if(w)return w}return 0}function s(f,g,v){if(f===1)return v?[[-1,0]]:[];var T=g.map(function(E,y){return[E[0],y]});T.sort(function(E,y){return E[0]-y[0]});for(var l=new Array(f-1),_=1;_<f;++_){var w=T[_-1],S=T[_];l[_-1]=[w[1],S[1]]}return v&&l.push([-1,l[0][1]],[l[f-1][1],-1]),l}function c(f,g){var v=f.length;if(v===0)return[];var T=f[0].length;if(T<1)return[];if(T===1)return s(v,f,g);for(var l=new Array(v),_=1,w=0;w<v;++w){for(var S=f[w],E=new Array(T+1),y=0,b=0;b<T;++b){var p=S[b];E[b]=p,y+=p*p}E[T]=y,l[w]=new i(E,w),_=Math.max(y,_)}a(l,n),v=l.length;for(var u=new Array(v+T+1),m=new Array(v+T+1),h=(T+1)*(T+1)*_,P=new Array(T+1),w=0;w<=T;++w)P[w]=0;P[T]=h,u[0]=P.slice(),m[0]=-1;for(var w=0;w<=T;++w){var E=P.slice();E[w]=1,u[w+1]=E,m[w+1]=-1}for(var w=0;w<v;++w){var L=l[w];u[w+T+1]=L.point,m[w+T+1]=L.index}var z=o(u,!1);if(g?z=z.filter(function(F){for(var B=0,O=0;O<=T;++O){var I=m[F[O]];if(I<0&&++B>=2)return!1;F[O]=I}return!0}):z=z.filter(function(F){for(var B=0;B<=T;++B){var O=m[F[B]];if(O<0)return!1;F[B]=O}return!0}),T&1)for(var w=0;w<z.length;++w){var L=z[w],E=L[0];L[0]=L[1],L[1]=E}return z}},2361:function(e){var t=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),o=new Uint32Array(r.buffer);if(r[0]=1,t=!0,o[1]===1072693248){let _=function(E,y){return o[0]=E,o[1]=y,r[0]},w=function(E){return r[0]=E,o[0]},S=function(E){return r[0]=E,o[1]};var a=_,i=w,n=S;e.exports=function(y){return r[0]=y,[o[0],o[1]]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=S}else if(o[0]===1072693248){let _=function(E,y){return o[1]=E,o[0]=y,r[0]},w=function(E){return r[0]=E,o[1]},S=function(E){return r[0]=E,o[0]};var s=_,c=w,f=S;e.exports=function(y){return r[0]=y,[o[1],o[0]]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=S}else t=!1}if(!t){let _=function(E,y){return l.writeUInt32LE(E,0,!0),l.writeUInt32LE(y,4,!0),l.readDoubleLE(0,!0)},w=function(E){return l.writeDoubleLE(E,0,!0),l.readUInt32LE(0,!0)},S=function(E){return l.writeDoubleLE(E,0,!0),l.readUInt32LE(4,!0)};var g=_,v=w,T=S,l=new Buffer(8);e.exports=function(y){return l.writeDoubleLE(y,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},e.exports.pack=_,e.exports.lo=w,e.exports.hi=S}e.exports.sign=function(_){return e.exports.hi(_)>>>31},e.exports.exponent=function(_){var w=e.exports.hi(_);return(w<<1>>>21)-1023},e.exports.fraction=function(_){var w=e.exports.lo(_),S=e.exports.hi(_),E=S&(1<<20)-1;return S&2146435072&&(E+=1048576),[w,E]},e.exports.denormalized=function(_){var w=e.exports.hi(_);return!(w&2146435072)}},1338:function(e){"use strict";function t(a,i,n){var s=a[n]|0;if(s<=0)return[];var c=new Array(s),f;if(n===a.length-1)for(f=0;f<s;++f)c[f]=i;else for(f=0;f<s;++f)c[f]=t(a,i,n+1);return c}function r(a,i){var n,s;for(n=new Array(a),s=0;s<a;++s)n[s]=i;return n}function o(a,i){switch(typeof i>"u"&&(i=0),typeof a){case"number":if(a>0)return r(a|0,i);break;case"object":if(typeof a.length=="number")return t(a,i,0);break}return[]}e.exports=o},3134:function(e,t,r){"use strict";e.exports=a;var o=r(1682);function a(i,n){var s=i.length;if(typeof n!="number"){n=0;for(var c=0;c<s;++c){var f=i[c];n=Math.max(n,f[0],f[1])}n=(n|0)+1}n=n|0;for(var g=new Array(n),c=0;c<n;++c)g[c]=[];for(var c=0;c<s;++c){var f=i[c];g[f[0]].push(f[1]),g[f[1]].push(f[0])}for(var v=0;v<n;++v)o(g[v],function(T,l){return T-l});return g}},5033:function(e){"use strict";e.exports=t;function t(r,o,a){var i=o||0,n=a||1;return[[r[12]+r[0],r[13]+r[1],r[14]+r[2],r[15]+r[3]],[r[12]-r[0],r[13]-r[1],r[14]-r[2],r[15]-r[3]],[r[12]+r[4],r[13]+r[5],r[14]+r[6],r[15]+r[7]],[r[12]-r[4],r[13]-r[5],r[14]-r[6],r[15]-r[7]],[i*r[12]+r[8],i*r[13]+r[9],i*r[14]+r[10],i*r[15]+r[11]],[n*r[12]-r[8],n*r[13]-r[9],n*r[14]-r[10],n*r[15]-r[11]]]}},9215:function(e,t,r){"use strict";e.exports=f;var o=r(4769),a=r(2478);function i(g,v,T){return Math.min(v,Math.max(g,T))}function n(g,v,T){this.dimension=g.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var l=0;l<this.dimension;++l)this.bounds[0][l]=-1/0,this.bounds[1][l]=1/0;this._state=g.slice().reverse(),this._velocity=v.slice().reverse(),this._time=[T],this._scratch=[g.slice(),g.slice(),g.slice(),g.slice(),g.slice()]}var s=n.prototype;s.flush=function(g){var v=a.gt(this._time,g)-1;v<=0||(this._time.splice(0,v),this._state.splice(0,v*this.dimension),this._velocity.splice(0,v*this.dimension))},s.curve=function(g){var v=this._time,T=v.length,l=a.le(v,g),_=this._scratch[0],w=this._state,S=this._velocity,E=this.dimension,y=this.bounds;if(l<0)for(var b=E-1,p=0;p<E;++p,--b)_[p]=w[b];else if(l>=T-1)for(var b=w.length-1,u=g-v[T-1],p=0;p<E;++p,--b)_[p]=w[b]+u*S[b];else{for(var b=E*(l+1)-1,m=v[l],h=v[l+1],P=h-m||1,L=this._scratch[1],z=this._scratch[2],F=this._scratch[3],B=this._scratch[4],O=!0,p=0;p<E;++p,--b)L[p]=w[b],F[p]=S[b]*P,z[p]=w[b+E],B[p]=S[b+E]*P,O=O&&L[p]===z[p]&&F[p]===B[p]&&F[p]===0;if(O)for(var p=0;p<E;++p)_[p]=L[p];else o(L,F,z,B,(g-m)/P,_)}for(var I=y[0],N=y[1],p=0;p<E;++p)_[p]=i(I[p],N[p],_[p]);return _},s.dcurve=function(g){var v=this._time,T=v.length,l=a.le(v,g),_=this._scratch[0],w=this._state,S=this._velocity,E=this.dimension;if(l>=T-1)for(var y=w.length-1,b=g-v[T-1],p=0;p<E;++p,--y)_[p]=S[y];else{for(var y=E*(l+1)-1,u=v[l],m=v[l+1],h=m-u||1,P=this._scratch[1],L=this._scratch[2],z=this._scratch[3],F=this._scratch[4],B=!0,p=0;p<E;++p,--y)P[p]=w[y],z[p]=S[y]*h,L[p]=w[y+E],F[p]=S[y+E]*h,B=B&&P[p]===L[p]&&z[p]===F[p]&&z[p]===0;if(B)for(var p=0;p<E;++p)_[p]=0;else{o.derivative(P,z,L,F,(g-u)/h,_);for(var p=0;p<E;++p)_[p]/=h}}return _},s.lastT=function(){var g=this._time;return g[g.length-1]},s.stable=function(){for(var g=this._velocity,v=g.length,T=this.dimension-1;T>=0;--T)if(g[--v])return!1;return!0},s.jump=function(g){var v=this.lastT(),T=this.dimension;if(!(g<v||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,S=this.bounds,E=S[0],y=S[1];this._time.push(v,g);for(var b=0;b<2;++b)for(var p=0;p<T;++p)l.push(l[w++]),_.push(0);this._time.push(g);for(var p=T;p>0;--p)l.push(i(E[p-1],y[p-1],arguments[p])),_.push(0)}},s.push=function(g){var v=this.lastT(),T=this.dimension;if(!(g<v||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,S=g-v,E=this.bounds,y=E[0],b=E[1],p=S>1e-6?1/S:0;this._time.push(g);for(var u=T;u>0;--u){var m=i(y[u-1],b[u-1],arguments[u]);l.push(m),_.push((m-l[w++])*p)}}},s.set=function(g){var v=this.dimension;if(!(g<this.lastT()||arguments.length!==v+1)){var T=this._state,l=this._velocity,_=this.bounds,w=_[0],S=_[1];this._time.push(g);for(var E=v;E>0;--E)T.push(i(w[E-1],S[E-1],arguments[E])),l.push(0)}},s.move=function(g){var v=this.lastT(),T=this.dimension;if(!(g<=v||arguments.length!==T+1)){var l=this._state,_=this._velocity,w=l.length-this.dimension,S=this.bounds,E=S[0],y=S[1],b=g-v,p=b>1e-6?1/b:0;this._time.push(g);for(var u=T;u>0;--u){var m=arguments[u];l.push(i(E[u-1],y[u-1],l[w++]+m)),_.push(m*p)}}},s.idle=function(g){var v=this.lastT();if(!(g<v)){var T=this.dimension,l=this._state,_=this._velocity,w=l.length-T,S=this.bounds,E=S[0],y=S[1],b=g-v;this._time.push(g);for(var p=T-1;p>=0;--p)l.push(i(E[p],y[p],l[w]+b*_[w])),_.push(0),w+=1}};function c(g){for(var v=new Array(g),T=0;T<g;++T)v[T]=0;return v}function f(g,v,T){switch(arguments.length){case 0:return new n([0],[0],0);case 1:if(typeof g=="number"){var l=c(g);return new n(l,l,0)}else return new n(g,c(g.length),0);case 2:if(typeof v=="number"){var l=c(g.length);return new n(g,l,+v)}else T=0;case 3:if(g.length!==v.length)throw new Error("state and velocity lengths must match");return new n(g,v,T)}}},3840:function(e){"use strict";e.exports=E;var t=0,r=1;function o(y,b,p,u,m,h){this._color=y,this.key=b,this.value=p,this.left=u,this.right=m,this._count=h}function a(y){return new o(y._color,y.key,y.value,y.left,y.right,y._count)}function i(y,b){return new o(y,b.key,b.value,b.left,b.right,b._count)}function n(y){y._count=1+(y.left?y.left._count:0)+(y.right?y.right._count:0)}function s(y,b){this._compare=y,this.root=b}var c=s.prototype;Object.defineProperty(c,"keys",{get:function(){var y=[];return this.forEach(function(b,p){y.push(b)}),y}}),Object.defineProperty(c,"values",{get:function(){var y=[];return this.forEach(function(b,p){y.push(p)}),y}}),Object.defineProperty(c,"length",{get:function(){return this.root?this.root._count:0}}),c.insert=function(y,b){for(var p=this._compare,u=this.root,m=[],h=[];u;){var P=p(y,u.key);m.push(u),h.push(P),P<=0?u=u.left:u=u.right}m.push(new o(t,y,b,null,null,1));for(var L=m.length-2;L>=0;--L){var u=m[L];h[L]<=0?m[L]=new o(u._color,u.key,u.value,m[L+1],u.right,u._count+1):m[L]=new o(u._color,u.key,u.value,u.left,m[L+1],u._count+1)}for(var L=m.length-1;L>1;--L){var z=m[L-1],u=m[L];if(z._color===r||u._color===r)break;var F=m[L-2];if(F.left===z)if(z.left===u){var B=F.right;if(B&&B._color===t)z._color=r,F.right=i(r,B),F._color=t,L-=1;else{if(F._color=t,F.left=z.right,z._color=r,z.right=F,m[L-2]=z,m[L-1]=u,n(F),n(z),L>=3){var O=m[L-3];O.left===F?O.left=z:O.right=z}break}}else{var B=F.right;if(B&&B._color===t)z._color=r,F.right=i(r,B),F._color=t,L-=1;else{if(z.right=u.left,F._color=t,F.left=u.right,u._color=r,u.left=z,u.right=F,m[L-2]=u,m[L-1]=z,n(F),n(z),n(u),L>=3){var O=m[L-3];O.left===F?O.left=u:O.right=u}break}}else if(z.right===u){var B=F.left;if(B&&B._color===t)z._color=r,F.left=i(r,B),F._color=t,L-=1;else{if(F._color=t,F.right=z.left,z._color=r,z.left=F,m[L-2]=z,m[L-1]=u,n(F),n(z),L>=3){var O=m[L-3];O.right===F?O.right=z:O.left=z}break}}else{var B=F.left;if(B&&B._color===t)z._color=r,F.left=i(r,B),F._color=t,L-=1;else{if(z.left=u.right,F._color=t,F.right=u.left,u._color=r,u.right=z,u.left=F,m[L-2]=u,m[L-1]=z,n(F),n(z),n(u),L>=3){var O=m[L-3];O.right===F?O.right=u:O.left=u}break}}}return m[0]._color=r,new s(p,m[0])};function f(y,b){if(b.left){var p=f(y,b.left);if(p)return p}var p=y(b.key,b.value);if(p)return p;if(b.right)return f(y,b.right)}function g(y,b,p,u){var m=b(y,u.key);if(m<=0){if(u.left){var h=g(y,b,p,u.left);if(h)return h}var h=p(u.key,u.value);if(h)return h}if(u.right)return g(y,b,p,u.right)}function v(y,b,p,u,m){var h=p(y,m.key),P=p(b,m.key),L;if(h<=0&&(m.left&&(L=v(y,b,p,u,m.left),L)||P>0&&(L=u(m.key,m.value),L)))return L;if(P>0&&m.right)return v(y,b,p,u,m.right)}c.forEach=function(b,p,u){if(this.root)switch(arguments.length){case 1:return f(b,this.root);case 2:return g(p,this._compare,b,this.root);case 3:return this._compare(p,u)>=0?void 0:v(p,u,this._compare,b,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var y=[],b=this.root;b;)y.push(b),b=b.left;return new T(this,y)}}),Object.defineProperty(c,"end",{get:function(){for(var y=[],b=this.root;b;)y.push(b),b=b.right;return new T(this,y)}}),c.at=function(y){if(y<0)return new T(this,[]);for(var b=this.root,p=[];;){if(p.push(b),b.left){if(y<b.left._count){b=b.left;continue}y-=b.left._count}if(!y)return new T(this,p);if(y-=1,b.right){if(y>=b.right._count)break;b=b.right}else break}return new T(this,[])},c.ge=function(y){for(var b=this._compare,p=this.root,u=[],m=0;p;){var h=b(y,p.key);u.push(p),h<=0&&(m=u.length),h<=0?p=p.left:p=p.right}return u.length=m,new T(this,u)},c.gt=function(y){for(var b=this._compare,p=this.root,u=[],m=0;p;){var h=b(y,p.key);u.push(p),h<0&&(m=u.length),h<0?p=p.left:p=p.right}return u.length=m,new T(this,u)},c.lt=function(y){for(var b=this._compare,p=this.root,u=[],m=0;p;){var h=b(y,p.key);u.push(p),h>0&&(m=u.length),h<=0?p=p.left:p=p.right}return u.length=m,new T(this,u)},c.le=function(y){for(var b=this._compare,p=this.root,u=[],m=0;p;){var h=b(y,p.key);u.push(p),h>=0&&(m=u.length),h<0?p=p.left:p=p.right}return u.length=m,new T(this,u)},c.find=function(y){for(var b=this._compare,p=this.root,u=[];p;){var m=b(y,p.key);if(u.push(p),m===0)return new T(this,u);m<=0?p=p.left:p=p.right}return new T(this,[])},c.remove=function(y){var b=this.find(y);return b?b.remove():this},c.get=function(y){for(var b=this._compare,p=this.root;p;){var u=b(y,p.key);if(u===0)return p.value;u<=0?p=p.left:p=p.right}};function T(y,b){this.tree=y,this._stack=b}var l=T.prototype;Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new T(this.tree,this._stack.slice())};function _(y,b){y.key=b.key,y.value=b.value,y.left=b.left,y.right=b.right,y._color=b._color,y._count=b._count}function w(y){for(var b,p,u,m,h=y.length-1;h>=0;--h){if(b=y[h],h===0){b._color=r;return}if(p=y[h-1],p.left===b){if(u=p.right,u.right&&u.right._color===t){if(u=p.right=a(u),m=u.right=a(u.right),p.right=u.left,u.left=p,u.right=m,u._color=p._color,b._color=r,p._color=r,m._color=r,n(p),n(u),h>1){var P=y[h-2];P.left===p?P.left=u:P.right=u}y[h-1]=u;return}else if(u.left&&u.left._color===t){if(u=p.right=a(u),m=u.left=a(u.left),p.right=m.left,u.left=m.right,m.left=p,m.right=u,m._color=p._color,p._color=r,u._color=r,b._color=r,n(p),n(u),n(m),h>1){var P=y[h-2];P.left===p?P.left=m:P.right=m}y[h-1]=m;return}if(u._color===r)if(p._color===t){p._color=r,p.right=i(t,u);return}else{p.right=i(t,u);continue}else{if(u=a(u),p.right=u.left,u.left=p,u._color=p._color,p._color=t,n(p),n(u),h>1){var P=y[h-2];P.left===p?P.left=u:P.right=u}y[h-1]=u,y[h]=p,h+1<y.length?y[h+1]=b:y.push(b),h=h+2}}else{if(u=p.left,u.left&&u.left._color===t){if(u=p.left=a(u),m=u.left=a(u.left),p.left=u.right,u.right=p,u.left=m,u._color=p._color,b._color=r,p._color=r,m._color=r,n(p),n(u),h>1){var P=y[h-2];P.right===p?P.right=u:P.left=u}y[h-1]=u;return}else if(u.right&&u.right._color===t){if(u=p.left=a(u),m=u.right=a(u.right),p.left=m.right,u.right=m.left,m.right=p,m.left=u,m._color=p._color,p._color=r,u._color=r,b._color=r,n(p),n(u),n(m),h>1){var P=y[h-2];P.right===p?P.right=m:P.left=m}y[h-1]=m;return}if(u._color===r)if(p._color===t){p._color=r,p.left=i(t,u);return}else{p.left=i(t,u);continue}else{if(u=a(u),p.left=u.right,u.right=p,u._color=p._color,p._color=t,n(p),n(u),h>1){var P=y[h-2];P.right===p?P.right=u:P.left=u}y[h-1]=u,y[h]=p,h+1<y.length?y[h+1]=b:y.push(b),h=h+2}}}}l.remove=function(){var y=this._stack;if(y.length===0)return this.tree;var b=new Array(y.length),p=y[y.length-1];b[b.length-1]=new o(p._color,p.key,p.value,p.left,p.right,p._count);for(var u=y.length-2;u>=0;--u){var p=y[u];p.left===y[u+1]?b[u]=new o(p._color,p.key,p.value,b[u+1],p.right,p._count):b[u]=new o(p._color,p.key,p.value,p.left,b[u+1],p._count)}if(p=b[b.length-1],p.left&&p.right){var m=b.length;for(p=p.left;p.right;)b.push(p),p=p.right;var h=b[m-1];b.push(new o(p._color,h.key,h.value,p.left,p.right,p._count)),b[m-1].key=p.key,b[m-1].value=p.value;for(var u=b.length-2;u>=m;--u)p=b[u],b[u]=new o(p._color,p.key,p.value,p.left,b[u+1],p._count);b[m-1].left=b[m]}if(p=b[b.length-1],p._color===t){var P=b[b.length-2];P.left===p?P.left=null:P.right===p&&(P.right=null),b.pop();for(var u=0;u<b.length;++u)b[u]._count--;return new s(this.tree._compare,b[0])}else if(p.left||p.right){p.left?_(p,p.left):p.right&&_(p,p.right),p._color=r;for(var u=0;u<b.length-1;++u)b[u]._count--;return new s(this.tree._compare,b[0])}else{if(b.length===1)return new s(this.tree._compare,null);for(var u=0;u<b.length;++u)b[u]._count--;var L=b[b.length-2];w(b),L.left===p?L.left=null:L.right=null}return new s(this.tree._compare,b[0])},Object.defineProperty(l,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var y=0,b=this._stack;if(b.length===0){var p=this.tree.root;return p?p._count:0}else b[b.length-1].left&&(y=b[b.length-1].left._count);for(var u=b.length-2;u>=0;--u)b[u+1]===b[u].right&&(++y,b[u].left&&(y+=b[u].left._count));return y},enumerable:!0}),l.next=function(){var y=this._stack;if(y.length!==0){var b=y[y.length-1];if(b.right)for(b=b.right;b;)y.push(b),b=b.left;else for(y.pop();y.length>0&&y[y.length-1].right===b;)b=y[y.length-1],y.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].right)return!0;for(var b=y.length-1;b>0;--b)if(y[b-1].left===y[b])return!0;return!1}}),l.update=function(y){var b=this._stack;if(b.length===0)throw new Error("Can't update empty node!");var p=new Array(b.length),u=b[b.length-1];p[p.length-1]=new o(u._color,u.key,y,u.left,u.right,u._count);for(var m=b.length-2;m>=0;--m)u=b[m],u.left===b[m+1]?p[m]=new o(u._color,u.key,u.value,p[m+1],u.right,u._count):p[m]=new o(u._color,u.key,u.value,u.left,p[m+1],u._count);return new s(this.tree._compare,p[0])},l.prev=function(){var y=this._stack;if(y.length!==0){var b=y[y.length-1];if(b.left)for(b=b.left;b;)y.push(b),b=b.right;else for(y.pop();y.length>0&&y[y.length-1].left===b;)b=y[y.length-1],y.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].left)return!0;for(var b=y.length-1;b>0;--b)if(y[b-1].right===y[b])return!0;return!1}});function S(y,b){return y<b?-1:y>b?1:0}function E(y){return new s(y||S,null)}},3837:function(e,t,r){"use strict";e.exports=L;var o=r(4935),a=r(501),i=r(5304),n=r(6429),s=r(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=ArrayBuffer,g=DataView;function v(z){return f.isView(z)&&!(z instanceof g)}function T(z){return Array.isArray(z)||v(z)}function l(z,F){return z[0]=F[0],z[1]=F[1],z[2]=F[2],z}function _(z){this.gl=z,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=i(z)}var w=_.prototype;w.update=function(z){z=z||{};function F(X,oe,ie){if(ie in z){var j=z[ie],ee=this[ie],re;(X?T(j)&&T(j[0]):T(j))?this[ie]=re=[oe(j[0]),oe(j[1]),oe(j[2])]:this[ie]=re=[oe(j),oe(j),oe(j)];for(var ce=0;ce<3;++ce)if(re[ce]!==ee[ce])return!0}return!1}var B=F.bind(this,!1,Number),O=F.bind(this,!1,Boolean),I=F.bind(this,!1,String),N=F.bind(this,!0,function(X){if(T(X)){if(X.length===3)return[+X[0],+X[1],+X[2],1];if(X.length===4)return[+X[0],+X[1],+X[2],+X[3]]}return[0,0,0,1]}),U,W=!1,Q=!1;if("bounds"in z)for(var ue=z.bounds,le=0;le<2;++le)for(var he=0;he<3;++he)ue[le][he]!==this.bounds[le][he]&&(Q=!0),this.bounds[le][he]=ue[le][he];if("ticks"in z){U=z.ticks,W=!0,this.autoTicks=!1;for(var le=0;le<3;++le)this.tickSpacing[le]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in z||"tickSpacing"in z||(this.autoTicks=!0),Q=!0,W=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),W=!0),W){for(var le=0;le<3;++le)U[le].sort(function(oe,ie){return oe.x-ie.x});s.equal(U,this.ticks)?W=!1:this.ticks=U}O("tickEnable"),I("tickFont")&&(W=!0),I("tickFontStyle")&&(W=!0),I("tickFontWeight")&&(W=!0),I("tickFontVariant")&&(W=!0),B("tickSize"),B("tickAngle"),B("tickPad"),N("tickColor");var G=I("labels");I("labelFont")&&(G=!0),I("labelFontStyle")&&(G=!0),I("labelFontWeight")&&(G=!0),I("labelFontVariant")&&(G=!0),O("labelEnable"),B("labelSize"),B("labelPad"),N("labelColor"),O("lineEnable"),O("lineMirror"),B("lineWidth"),N("lineColor"),O("lineTickEnable"),O("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),N("lineTickColor"),O("gridEnable"),B("gridWidth"),N("gridColor"),O("zeroEnable"),N("zeroLineColor"),B("zeroLineWidth"),O("backgroundEnable"),N("backgroundColor");var $=[{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]}],J=[{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&&(G||W)&&this._text.update(this.bounds,this.labels,$,this.ticks,J):this._text=o(this.gl,this.bounds,this.labels,$,this.ticks,J),this._lines&&W&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function S(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var E=[new S,new S,new S];function y(z,F,B,O,I){for(var N=z.primalOffset,U=z.primalMinor,W=z.mirrorOffset,Q=z.mirrorMinor,ue=O[F],le=0;le<3;++le)if(F!==le){var he=N,G=W,$=U,J=Q;ue&1<<le&&(he=W,G=N,$=Q,J=U),he[le]=B[0][le],G[le]=B[1][le],I[le]>0?($[le]=-1,J[le]=0):($[le]=0,J[le]=1)}}var b=[0,0,0],p={model:c,view:c,projection:c,_ortho:!1};w.isOpaque=function(){return!0},w.isTransparent=function(){return!1},w.drawTransparent=function(z){};var u=0,m=[0,0,0],h=[0,0,0],P=[0,0,0];w.draw=function(z){z=z||p;for(var ie=this.gl,F=z.model||c,B=z.view||c,O=z.projection||c,I=this.bounds,N=z._ortho||!1,U=n(F,B,O,I,N),W=U.cubeEdges,Q=U.axis,ue=B[12],le=B[13],he=B[14],G=B[15],$=N?2:1,J=$*this.pixelRatio*(O[3]*ue+O[7]*le+O[11]*he+O[15]*G)/ie.drawingBufferHeight,X=0;X<3;++X)this.lastCubeProps.cubeEdges[X]=W[X],this.lastCubeProps.axis[X]=Q[X];for(var oe=E,X=0;X<3;++X)y(E[X],X,this.bounds,W,Q);for(var ie=this.gl,j=b,X=0;X<3;++X)this.backgroundEnable[X]?j[X]=Q[X]:j[X]=0;this._background.draw(F,B,O,I,j,this.backgroundColor),this._lines.bind(F,B,O,this);for(var X=0;X<3;++X){var ee=[0,0,0];Q[X]>0?ee[X]=I[1][X]:ee[X]=I[0][X];for(var re=0;re<2;++re){var ce=(X+1+re)%3,be=(X+1+(re^1))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,be,this.bounds,ee,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(var re=0;re<2;++re){var ce=(X+1+re)%3,be=(X+1+(re^1))%3;this.zeroEnable[be]&&Math.min(I[0][be],I[1][be])<=0&&Math.max(I[0][be],I[1][be])>=0&&this._lines.drawZero(ce,be,this.bounds,ee,this.zeroLineColor[be],this.zeroLineWidth[be]*this.pixelRatio)}}for(var X=0;X<3;++X){this.lineEnable[X]&&this._lines.drawAxisLine(X,this.bounds,oe[X].primalOffset,this.lineColor[X],this.lineWidth[X]*this.pixelRatio),this.lineMirror[X]&&this._lines.drawAxisLine(X,this.bounds,oe[X].mirrorOffset,this.lineColor[X],this.lineWidth[X]*this.pixelRatio);for(var Ae=l(m,oe[X].primalMinor),ze=l(h,oe[X].mirrorMinor),Re=this.lineTickLength,re=0;re<3;++re){var Xe=J/F[5*re];Ae[re]*=Re[re]*Xe,ze[re]*=Re[re]*Xe}this.lineTickEnable[X]&&this._lines.drawAxisTicks(X,oe[X].primalOffset,Ae,this.lineTickColor[X],this.lineTickWidth[X]*this.pixelRatio),this.lineTickMirror[X]&&this._lines.drawAxisTicks(X,oe[X].mirrorOffset,ze,this.lineTickColor[X],this.lineTickWidth[X]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,B,O,this.pixelRatio);var it,ot=.5,tt,lt;function Ee(Qe){lt=[0,0,0],lt[Qe]=1}function _e(Qe,Lt,kt){var Vt=(Qe+1)%3,Zt=(Qe+2)%3,Sr=Lt[Vt],xr=Lt[Zt],jr=kt[Vt],wr=kt[Zt];if(Sr>0&&wr>0){Ee(Vt);return}else if(Sr>0&&wr<0){Ee(Vt);return}else if(Sr<0&&wr>0){Ee(Vt);return}else if(Sr<0&&wr<0){Ee(Vt);return}else if(xr>0&&jr>0){Ee(Zt);return}else if(xr>0&&jr<0){Ee(Zt);return}else if(xr<0&&jr>0){Ee(Zt);return}else if(xr<0&&jr<0){Ee(Zt);return}}for(var X=0;X<3;++X){for(var fe=oe[X].primalMinor,Fe=oe[X].mirrorMinor,rt=l(P,oe[X].primalOffset),re=0;re<3;++re)this.lineTickEnable[X]&&(rt[re]+=J*fe[re]*Math.max(this.lineTickLength[re],0)/F[5*re]);var st=[0,0,0];if(st[X]=1,this.tickEnable[X]){this.tickAngle[X]===-3600?(this.tickAngle[X]=0,this.tickAlign[X]="auto"):this.tickAlign[X]=-1,tt=1,it=[this.tickAlign[X],ot,tt],it[0]==="auto"?it[0]=u:it[0]=parseInt(""+it[0]),lt=[0,0,0],_e(X,fe,Fe);for(var re=0;re<3;++re)rt[re]+=J*fe[re]*this.tickPad[re]/F[5*re];this._text.drawTicks(X,this.tickSize[X],this.tickAngle[X],rt,this.tickColor[X],st,lt,it)}if(this.labelEnable[X]){tt=0,lt=[0,0,0],this.labels[X].length>4&&(Ee(X),tt=1),it=[this.labelAlign[X],ot,tt],it[0]==="auto"?it[0]=u:it[0]=parseInt(""+it[0]);for(var re=0;re<3;++re)rt[re]+=J*fe[re]*this.labelPad[re]/F[5*re];rt[X]+=.5*(I[0][X]+I[1][X]),this._text.drawLabel(X,this.labelSize[X],this.labelAngle[X],rt,this.labelColor[X],[0,0,0],lt,it)}}this._text.unbind()},w.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function L(z,F){var B=new _(z);return B.update(F),B}},5304:function(e,t,r){"use strict";e.exports=c;var o=r(2762),a=r(8116),i=r(1879).bg;function n(f,g,v,T){this.gl=f,this.buffer=g,this.vao=v,this.shader=T}var s=n.prototype;s.draw=function(f,g,v,T,l,_){for(var w=!1,S=0;S<3;++S)w=w||l[S];if(w){var E=this.gl;E.enable(E.POLYGON_OFFSET_FILL),E.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:f,view:g,projection:v,bounds:T,enable:l,colors:_},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),E.disable(E.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(f){for(var g=[],v=[],T=0,l=0;l<3;++l)for(var _=(l+1)%3,w=(l+2)%3,S=[0,0,0],E=[0,0,0],y=-1;y<=1;y+=2){v.push(T,T+2,T+1,T+1,T+2,T+3),S[l]=y,E[l]=y;for(var b=-1;b<=1;b+=2){S[_]=b;for(var p=-1;p<=1;p+=2)S[w]=p,g.push(S[0],S[1],S[2],E[0],E[1],E[2]),T+=1}var u=_;_=w,w=u}var m=o(f,new Float32Array(g)),h=o(f,new Uint16Array(v),f.ELEMENT_ARRAY_BUFFER),P=a(f,[{buffer:m,type:f.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:f.FLOAT,size:3,offset:12,stride:24}],h),L=i(f);return L.attributes.position.location=0,L.attributes.normal.location=1,new n(f,m,P,L)}},6429:function(e,t,r){"use strict";e.exports=y;var o=r(8828),a=r(6760),i=r(5202),n=r(3250),s=new Array(16),c=new Array(8),f=new Array(8),g=new Array(3),v=[0,0,0];(function(){for(var b=0;b<8;++b)c[b]=[1,1,1,1],f[b]=[1,1,1]})();function T(b,p,u){for(var m=0;m<4;++m){b[m]=u[12+m];for(var h=0;h<3;++h)b[m]+=p[h]*u[4*h+m]}}var l=[[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 _(b){for(var p=0;p<l.length;++p)if(b=i.positive(b,l[p]),b.length<3)return 0;for(var u=b[0],m=u[0]/u[3],h=u[1]/u[3],P=0,p=1;p+1<b.length;++p){var L=b[p],z=b[p+1],F=L[0]/L[3],B=L[1]/L[3],O=z[0]/z[3],I=z[1]/z[3],N=F-m,U=B-h,W=O-m,Q=I-h;P+=Math.abs(N*Q-U*W)}return P}var w=[1,1,1],S=[0,0,0],E={cubeEdges:w,axis:S};function y(b,p,u,m,h){a(s,p,b),a(s,u,s);for(var P=0,L=0;L<2;++L){g[2]=m[L][2];for(var z=0;z<2;++z){g[1]=m[z][1];for(var F=0;F<2;++F)g[0]=m[F][0],T(c[P],g,s),P+=1}}for(var B=-1,L=0;L<8;++L){for(var O=c[L][3],I=0;I<3;++I)f[L][I]=c[L][I]/O;h&&(f[L][2]*=-1),O<0&&(B<0||f[L][2]<f[B][2])&&(B=L)}if(B<0){B=0;for(var N=0;N<3;++N){for(var U=(N+2)%3,W=(N+1)%3,Q=-1,ue=-1,le=0;le<2;++le){var he=le<<N,G=he+(le<<U)+(1-le<<W),$=he+(1-le<<U)+(le<<W);n(f[he],f[G],f[$],v)<0||(le?Q=1:ue=1)}if(Q<0||ue<0){ue>Q&&(B|=1<<N);continue}for(var le=0;le<2;++le){var he=le<<N,G=he+(le<<U)+(1-le<<W),$=he+(1-le<<U)+(le<<W),J=_([c[he],c[G],c[$],c[he+(1<<U)+(1<<W)]]);le?Q=J:ue=J}if(ue>Q){B|=1<<N;continue}}}for(var X=7^B,oe=-1,L=0;L<8;++L)L===B||L===X||(oe<0||f[oe][1]>f[L][1])&&(oe=L);for(var ie=-1,L=0;L<3;++L){var j=oe^1<<L;if(!(j===B||j===X)){ie<0&&(ie=j);var W=f[j];W[0]<f[ie][0]&&(ie=j)}}for(var ee=-1,L=0;L<3;++L){var j=oe^1<<L;if(!(j===B||j===X||j===ie)){ee<0&&(ee=j);var W=f[j];W[0]>f[ee][0]&&(ee=j)}}var re=w;re[0]=re[1]=re[2]=0,re[o.log2(ie^oe)]=oe&ie,re[o.log2(oe^ee)]=oe&ee;var ce=ee^7;ce===B||ce===X?(ce=ie^7,re[o.log2(ee^ce)]=ce&ee):re[o.log2(ie^ce)]=ce&ie;for(var be=S,Ae=B,N=0;N<3;++N)Ae&1<<N?be[N]=-1:be[N]=1;return E}},501:function(e,t,r){"use strict";e.exports=w;var o=r(2762),a=r(8116),i=r(1879).n,n=[0,0,0],s=[0,0,0],c=[0,0,0],f=[0,0,0],g=[1,1];function v(S){return S[0]=S[1]=S[2]=0,S}function T(S,E){return S[0]=E[0],S[1]=E[1],S[2]=E[2],S}function l(S,E,y,b,p,u,m,h){this.gl=S,this.vertBuffer=E,this.vao=y,this.shader=b,this.tickCount=p,this.tickOffset=u,this.gridCount=m,this.gridOffset=h}var _=l.prototype;_.bind=function(S,E,y){this.shader.bind(),this.shader.uniforms.model=S,this.shader.uniforms.view=E,this.shader.uniforms.projection=y,g[0]=this.gl.drawingBufferWidth,g[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=g,this.vao.bind()},_.unbind=function(){this.vao.unbind()},_.drawAxisLine=function(S,E,y,b,p){var u=v(s);this.shader.uniforms.majorAxis=s,u[S]=E[1][S]-E[0][S],this.shader.uniforms.minorAxis=u;var m=T(f,y);m[S]+=E[0][S],this.shader.uniforms.offset=m,this.shader.uniforms.lineWidth=p,this.shader.uniforms.color=b;var h=v(c);h[(S+2)%3]=1,this.shader.uniforms.screenAxis=h,this.vao.draw(this.gl.TRIANGLES,6);var h=v(c);h[(S+1)%3]=1,this.shader.uniforms.screenAxis=h,this.vao.draw(this.gl.TRIANGLES,6)},_.drawAxisTicks=function(S,E,y,b,p){if(this.tickCount[S]){var u=v(n);u[S]=1,this.shader.uniforms.majorAxis=u,this.shader.uniforms.offset=E,this.shader.uniforms.minorAxis=y,this.shader.uniforms.color=b,this.shader.uniforms.lineWidth=p;var m=v(c);m[S]=1,this.shader.uniforms.screenAxis=m,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S])}},_.drawGrid=function(S,E,y,b,p,u){if(this.gridCount[S]){var m=v(s);m[E]=y[1][E]-y[0][E],this.shader.uniforms.minorAxis=m;var h=T(f,b);h[E]+=y[0][E],this.shader.uniforms.offset=h;var P=v(n);P[S]=1,this.shader.uniforms.majorAxis=P;var L=v(c);L[S]=1,this.shader.uniforms.screenAxis=L,this.shader.uniforms.lineWidth=u,this.shader.uniforms.color=p,this.vao.draw(this.gl.TRIANGLES,this.gridCount[S],this.gridOffset[S])}},_.drawZero=function(S,E,y,b,p,u){var m=v(s);this.shader.uniforms.majorAxis=m,m[S]=y[1][S]-y[0][S],this.shader.uniforms.minorAxis=m;var h=T(f,b);h[S]+=y[0][S],this.shader.uniforms.offset=h;var P=v(c);P[E]=1,this.shader.uniforms.screenAxis=P,this.shader.uniforms.lineWidth=u,this.shader.uniforms.color=p,this.vao.draw(this.gl.TRIANGLES,6)},_.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function w(S,E,y){var b=[],p=[0,0,0],u=[0,0,0],m=[0,0,0],h=[0,0,0];b.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var P=0;P<3;++P){for(var F=b.length/3|0,L=0;L<y[P].length;++L){var z=+y[P][L].x;b.push(z,0,1,z,1,1,z,0,-1,z,0,-1,z,1,1,z,1,-1)}var O=b.length/3|0;p[P]=F,u[P]=O-F;for(var F=b.length/3|0,B=0;B<y[P].length;++B){var z=+y[P][B].x;b.push(z,0,1,z,1,1,z,0,-1,z,0,-1,z,1,1,z,1,-1)}var O=b.length/3|0;m[P]=F,h[P]=O-F}var I=o(S,new Float32Array(b)),N=a(S,[{buffer:I,type:S.FLOAT,size:3,stride:0,offset:0}]),U=i(S);return U.attributes.position.location=0,new l(S,I,N,U,u,p,h,m)}},1879:function(e,t,r){"use strict";var o=r(3236),a=r(9405),i=o([`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);
}
`]),n=o([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);t.n=function(v){return a(v,i,n,null,[{name:"position",type:"vec3"}])};var s=o([`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);
}
`]),c=o([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);t.Q=function(v){return a(v,s,c,null,[{name:"position",type:"vec3"}])};var f=o([`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);
}
`]),g=o([`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];
}`]);t.bg=function(v){return a(v,f,g,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){"use strict";e.exports=_;var o=r(2762),a=r(8116),i=r(4359),n=r(1879).Q,s=window||process.global||{},c=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var f=3;function g(w,S,E,y){this.gl=w,this.shader=S,this.buffer=E,this.vao=y,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=g.prototype,T=[0,0];v.bind=function(w,S,E,y){this.vao.bind(),this.shader.bind();var b=this.shader.uniforms;b.model=w,b.view=S,b.projection=E,b.pixelScale=y,T[0]=this.gl.drawingBufferWidth,T[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=T},v.unbind=function(){this.vao.unbind()},v.update=function(w,S,E,y,b){var p=[];function u(N,U,W,Q,ue,le){var he=[W.style,W.weight,W.variant,W.family].join("_"),G=c[he];G||(G=c[he]={});var $=G[U];$||($=G[U]=l(U,{triangles:!0,font:W.family,fontStyle:W.style,fontWeight:W.weight,fontVariant:W.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ue,styletags:le}));for(var J=(Q||12)/12,X=$.positions,oe=$.cells,ie=0,j=oe.length;ie<j;++ie)for(var ee=oe[ie],re=2;re>=0;--re){var ce=X[ee[re]];p.push(J*ce[0],-J*ce[1],N)}}for(var m=[0,0,0],h=[0,0,0],P=[0,0,0],L=[0,0,0],z=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){P[B]=p.length/f|0,u(.5*(w[0][B]+w[1][B]),S[B],E[B],12,z,F),L[B]=(p.length/f|0)-P[B],m[B]=p.length/f|0;for(var O=0;O<y[B].length;++O)if(y[B][O].text){var I={family:y[B][O].font||b[B].family,style:b[B].fontStyle||b[B].style,weight:b[B].fontWeight||b[B].weight,variant:b[B].fontVariant||b[B].variant};u(y[B][O].x,y[B][O].text,I,y[B][O].fontSize||12,z,F)}h[B]=(p.length/f|0)-m[B]}this.buffer.update(p),this.tickOffset=m,this.tickCount=h,this.labelOffset=P,this.labelCount=L},v.drawTicks=function(w,S,E,y,b,p,u,m){this.tickCount[w]&&(this.shader.uniforms.axis=p,this.shader.uniforms.color=b,this.shader.uniforms.angle=E,this.shader.uniforms.scale=S,this.shader.uniforms.offset=y,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=m,this.vao.draw(this.gl.TRIANGLES,this.tickCount[w],this.tickOffset[w]))},v.drawLabel=function(w,S,E,y,b,p,u,m){this.labelCount[w]&&(this.shader.uniforms.axis=p,this.shader.uniforms.color=b,this.shader.uniforms.angle=E,this.shader.uniforms.scale=S,this.shader.uniforms.offset=y,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=m,this.vao.draw(this.gl.TRIANGLES,this.labelCount[w],this.labelOffset[w]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function l(w,S){try{return i(w,S)}catch(E){return console.warn('error vectorizing text:"'+w+'" error:',E),{cells:[],positions:[]}}}function _(w,S,E,y,b,p){var u=o(w),m=a(w,[{buffer:u,size:3}]),h=n(w);h.attributes.position.location=0;var P=new g(w,h,u,m);return P.update(S,E,y,b,p),P}},6444:function(e,t){"use strict";t.create=o,t.equal=a;function r(i,n){var s=i+"",c=s.indexOf("."),f=0;c>=0&&(f=s.length-c-1);var g=Math.pow(10,f),v=Math.round(i*n*g),T=v+"";if(T.indexOf("e")>=0)return T;var l=v/g,_=v%g;v<0?(l=-Math.ceil(l)|0,_=-_|0):(l=Math.floor(l)|0,_=_|0);var w=""+l;if(v<0&&(w="-"+w),f){for(var S=""+_;S.length<f;)S="0"+S;return w+"."+S}else return w}function o(i,n){for(var s=[],c=0;c<3;++c){for(var f=[],g=.5*(i[0][c]+i[1][c]),v=0;v*n[c]<=i[1][c];++v)f.push({x:v*n[c],text:r(n[c],v)});for(var v=-1;v*n[c]>=i[0][c];--v)f.push({x:v*n[c],text:r(n[c],v)});s.push(f)}return s}function a(i,n){for(var s=0;s<3;++s){if(i[s].length!==n[s].length)return!1;for(var c=0;c<i[s].length;++c){var f=i[s][c],g=n[s][c];if(f.x!==g.x||f.text!==g.text||f.font!==g.font||f.fontColor!==g.fontColor||f.fontSize!==g.fontSize||f.dx!==g.dx||f.dy!==g.dy)return!1}}return!0}},5445:function(e,t,r){"use strict";e.exports=E;var o=r(5033),a=r(5202),i=r(6429),n=r(6760),s=r(5665),c=r(5352),f=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=new Float32Array(16);function v(y,b,p){this.lo=y,this.hi=b,this.pixelsPerDataUnit=p}var T=[0,0,0,1],l=[0,0,0,1];function _(y,b,p,u,m){for(var h=0;h<3;++h){for(var P=T,L=l,z=0;z<3;++z)L[z]=P[z]=p[z];L[3]=P[3]=1,L[h]+=1,c(L,L,b),L[3]<0&&(y[h]=1/0),P[h]-=1,c(P,P,b),P[3]<0&&(y[h]=1/0);var F=(P[0]/P[3]-L[0]/L[3])*u,B=(P[1]/P[3]-L[1]/L[3])*m;y[h]=.25*Math.sqrt(F*F+B*B)}return y}var w=[new v(1/0,-1/0,1/0),new v(1/0,-1/0,1/0),new v(1/0,-1/0,1/0)],S=[0,0,0];function E(y,b,p,u,B){var h=b.model||f,P=b.view||f,L=b.projection||f,z=b._ortho||!1,F=y.bounds,B=B||i(h,P,L,F,z),O=B.axis;n(g,P,h),n(g,L,g);for(var I=w,N=0;N<3;++N)I[N].lo=1/0,I[N].hi=-1/0,I[N].pixelsPerDataUnit=1/0;var U=o(s(g,g));s(g,g);for(var W=0;W<3;++W){var Q=(W+1)%3,ue=(W+2)%3,le=S;e:for(var N=0;N<2;++N){var he=[];if(O[W]<0!=!!N){le[W]=F[N][W];for(var G=0;G<2;++G){le[Q]=F[G^N][Q];for(var $=0;$<2;++$)le[ue]=F[$^G^N][ue],he.push(le.slice())}for(var J=z?5:4,G=J;G===J;++G){if(he.length===0)continue e;he=a.positive(he,U[G])}for(var G=0;G<he.length;++G)for(var ue=he[G],X=_(S,g,ue,p,u),$=0;$<3;++$)I[$].lo=Math.min(I[$].lo,ue[$]),I[$].hi=Math.max(I[$].hi,ue[$]),$!==W&&(I[$].pixelsPerDataUnit=Math.min(I[$].pixelsPerDataUnit,Math.abs(X[$])))}}}return I}},2762:function(e,t,r){"use strict";var o=r(1888),a=r(5298),i=r(9618),n=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(l,_,w,S,E){this.gl=l,this.type=_,this.handle=w,this.length=S,this.usage=E}var c=s.prototype;c.bind=function(){this.gl.bindBuffer(this.type,this.handle)},c.unbind=function(){this.gl.bindBuffer(this.type,null)},c.dispose=function(){this.gl.deleteBuffer(this.handle)};function f(l,_,w,S,E,y){var b=E.length*E.BYTES_PER_ELEMENT;if(y<0)return l.bufferData(_,E,S),b;if(b+y>w)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return l.bufferSubData(_,y,E),w}function g(l,_){for(var w=o.malloc(l.length,_),S=l.length,E=0;E<S;++E)w[E]=l[E];return w}function v(l,_){for(var w=1,S=_.length-1;S>=0;--S){if(_[S]!==w)return!1;w*=l[S]}return!0}c.update=function(l,_){if(typeof _!="number"&&(_=-1),this.bind(),typeof l=="object"&&typeof l.shape<"u"){var w=l.dtype;if(n.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&w!=="uint16"?w="uint32":w="uint16"}if(w===l.dtype&&v(l.shape,l.stride))l.offset===0&&l.data.length===l.shape[0]?this.length=f(this.gl,this.type,this.length,this.usage,l.data,_):this.length=f(this.gl,this.type,this.length,this.usage,l.data.subarray(l.offset,l.shape[0]),_);else{var E=o.malloc(l.size,w),y=i(E,l.shape);a.assign(y,l),_<0?this.length=f(this.gl,this.type,this.length,this.usage,E,_):this.length=f(this.gl,this.type,this.length,this.usage,E.subarray(0,l.size),_),o.free(E)}}else if(Array.isArray(l)){var b;this.type===this.gl.ELEMENT_ARRAY_BUFFER?b=g(l,"uint16"):b=g(l,"float32"),_<0?this.length=f(this.gl,this.type,this.length,this.usage,b,_):this.length=f(this.gl,this.type,this.length,this.usage,b.subarray(0,l.length),_),o.free(b)}else if(typeof l=="object"&&typeof l.length=="number")this.length=f(this.gl,this.type,this.length,this.usage,l,_);else if(typeof l=="number"||l===void 0){if(_>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");l=l|0,l<=0&&(l=1),this.gl.bufferData(this.type,l|0,this.usage),this.length=l}else throw new Error("gl-buffer: Invalid data type")};function T(l,_,w,S){if(w=w||l.ARRAY_BUFFER,S=S||l.DYNAMIC_DRAW,w!==l.ARRAY_BUFFER&&w!==l.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(S!==l.DYNAMIC_DRAW&&S!==l.STATIC_DRAW&&S!==l.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 E=l.createBuffer(),y=new s(l,w,E,0,S);return y.update(_),y}e.exports=T},6405:function(e,t,r){"use strict";var o=r(2931);e.exports=function(i,n){var s=i.positions,c=i.vectors,f={positions:[],vertexIntensity:[],vertexIntensityBounds:i.vertexIntensityBounds,vectors:[],cells:[],coneOffset:i.coneOffset,colormap:i.colormap};if(i.positions.length===0)return n&&(n[0]=[0,0,0],n[1]=[0,0,0]),f;for(var g=0,v=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,S=-1/0,E=null,y=null,b=[],p=1/0,u=!1,m=i.coneSizemode==="raw",h=0;h<s.length;h++){var P=s[h];v=Math.min(P[0],v),T=Math.max(P[0],T),l=Math.min(P[1],l),_=Math.max(P[1],_),w=Math.min(P[2],w),S=Math.max(P[2],S);var L=c[h];if(o.length(L)>g&&(g=o.length(L)),h&&!m){var z=2*o.distance(E,P)/(o.length(y)+o.length(L));z?(p=Math.min(p,z),u=!1):u=!0}u||(E=P,y=L),b.push(L)}var F=[v,l,w],B=[T,_,S];n&&(n[0]=F,n[1]=B),g===0&&(g=1);var O=1/g;isFinite(p)||(p=1),f.vectorScale=p;var I=i.coneSize||(m?1:.5);i.absoluteConeSize&&(I=i.absoluteConeSize*O),f.coneScale=I;for(var h=0,N=0;h<s.length;h++)for(var P=s[h],U=P[0],W=P[1],Q=P[2],ue=b[h],le=o.length(ue)*O,he=0,G=8;he<G;he++){f.positions.push([U,W,Q,N++]),f.positions.push([U,W,Q,N++]),f.positions.push([U,W,Q,N++]),f.positions.push([U,W,Q,N++]),f.positions.push([U,W,Q,N++]),f.positions.push([U,W,Q,N++]),f.vectors.push(ue),f.vectors.push(ue),f.vectors.push(ue),f.vectors.push(ue),f.vectors.push(ue),f.vectors.push(ue),f.vertexIntensity.push(le,le,le),f.vertexIntensity.push(le,le,le);var $=f.positions.length;f.cells.push([$-6,$-5,$-4],[$-3,$-2,$-1])}return f};var a=r(614);e.exports.createMesh=r(9060),e.exports.createConeMesh=function(i,n){return e.exports.createMesh(i,n,{shaders:a,traceType:"cone"})}},9060:function(e,t,r){"use strict";var o=r(9405),a=r(2762),i=r(8116),n=r(7766),s=r(6760),c=r(7608),f=r(9618),g=r(6729),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(b,p,u,m,h,P,L,z,F,B,O){this.gl=b,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=p,this.dirty=!0,this.triShader=u,this.pickShader=m,this.trianglePositions=h,this.triangleVectors=P,this.triangleColors=z,this.triangleUVs=F,this.triangleIds=L,this.triangleVAO=B,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=O,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=v,this._view=v,this._projection=v,this._resolution=[1,1]}var l=T.prototype;l.isOpaque=function(){return this.opacity>=1},l.isTransparent=function(){return this.opacity<1},l.pickSlots=1,l.setPickBase=function(b){this.pickId=b};function _(b){for(var p=g({colormap:b,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),m=0;m<256;++m){for(var h=p[m],P=0;P<3;++P)u[4*m+P]=h[P];u[4*m+3]=h[3]*255}return f(u,[256,256,4],[4,0,1])}function w(b){for(var p=b.length,u=new Array(p),m=0;m<p;++m)u[m]=b[m][2];return u}l.update=function(b){b=b||{};var p=this.gl;this.dirty=!0,"lightPosition"in b&&(this.lightPosition=b.lightPosition),"opacity"in b&&(this.opacity=b.opacity),"ambient"in b&&(this.ambientLight=b.ambient),"diffuse"in b&&(this.diffuseLight=b.diffuse),"specular"in b&&(this.specularLight=b.specular),"roughness"in b&&(this.roughness=b.roughness),"fresnel"in b&&(this.fresnel=b.fresnel),b.tubeScale!==void 0&&(this.tubeScale=b.tubeScale),b.vectorScale!==void 0&&(this.vectorScale=b.vectorScale),b.coneScale!==void 0&&(this.coneScale=b.coneScale),b.coneOffset!==void 0&&(this.coneOffset=b.coneOffset),b.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=p.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=p.LINEAR,this.texture.setPixels(_(b.colormap)),this.texture.generateMipmap());var u=b.cells,m=b.positions,h=b.vectors;if(!(!m||!u||!h)){var P=[],L=[],z=[],F=[],B=[];this.cells=u,this.positions=m,this.vectors=h;var O=b.meshColor||[1,1,1,1],I=b.vertexIntensity,N=1/0,U=-1/0;if(I)if(b.vertexIntensityBounds)N=+b.vertexIntensityBounds[0],U=+b.vertexIntensityBounds[1];else for(var W=0;W<I.length;++W){var Q=I[W];N=Math.min(N,Q),U=Math.max(U,Q)}else for(var W=0;W<m.length;++W){var Q=m[W][2];N=Math.min(N,Q),U=Math.max(U,Q)}I?this.intensity=I:this.intensity=w(m),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var W=0;W<m.length;++W)for(var ue=m[W],le=0;le<3;++le)isNaN(ue[le])||!isFinite(ue[le])||(this.bounds[0][le]=Math.min(this.bounds[0][le],ue[le]),this.bounds[1][le]=Math.max(this.bounds[1][le],ue[le]));var he=0;e:for(var W=0;W<u.length;++W){var G=u[W];switch(G.length){case 3:for(var le=0;le<3;++le)for(var $=G[le],ue=m[$],J=0;J<3;++J)if(isNaN(ue[J])||!isFinite(ue[J]))continue e;for(var le=0;le<3;++le){var $=G[2-le],ue=m[$];P.push(ue[0],ue[1],ue[2],ue[3]);var X=h[$];L.push(X[0],X[1],X[2],X[3]||0);var oe=O;oe.length===3?z.push(oe[0],oe[1],oe[2],1):z.push(oe[0],oe[1],oe[2],oe[3]);var ie;I?ie=[(I[$]-N)/(U-N),0]:ie=[(ue[2]-N)/(U-N),0],F.push(ie[0],ie[1]),B.push(W)}he+=1;break;default:break}}this.triangleCount=he,this.trianglePositions.update(P),this.triangleVectors.update(L),this.triangleColors.update(z),this.triangleUVs.update(F),this.triangleIds.update(new Uint32Array(B))}},l.drawTransparent=l.draw=function(b){b=b||{};for(var p=this.gl,u=b.model||v,m=b.view||v,h=b.projection||v,P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)P[0][L]=Math.max(P[0][L],this.clipBounds[0][L]),P[1][L]=Math.min(P[1][L],this.clipBounds[1][L]);var z={model:u,view:m,projection:h,inverseModel:v.slice(),clipBounds:P,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};z.inverseModel=c(z.inverseModel,z.model),p.disable(p.CULL_FACE),this.texture.bind(0);var F=new Array(16);s(F,z.view,z.model),s(F,z.projection,F),c(F,F);for(var L=0;L<3;++L)z.eyePosition[L]=F[12+L]/F[15];for(var B=F[15],L=0;L<3;++L)B+=this.lightPosition[L]*F[4*L+3];for(var L=0;L<3;++L){for(var O=F[12+L],I=0;I<3;++I)O+=F[4*I+L]*this.lightPosition[I];z.lightPosition[L]=O/B}if(this.triangleCount>0){var N=this.triShader;N.bind(),N.uniforms=z,this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},l.drawPick=function(b){b=b||{};for(var p=this.gl,u=b.model||v,m=b.view||v,h=b.projection||v,P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)P[0][L]=Math.max(P[0][L],this.clipBounds[0][L]),P[1][L]=Math.min(P[1][L],this.clipBounds[1][L]);this._model=[].slice.call(u),this._view=[].slice.call(m),this._projection=[].slice.call(h),this._resolution=[p.drawingBufferWidth,p.drawingBufferHeight];var z={model:u,view:m,projection:h,clipBounds:P,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=z,this.triangleCount>0&&(this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},l.pick=function(b){if(!b||b.id!==this.pickId)return null;var p=b.value[0]+256*b.value[1]+65536*b.value[2],u=this.cells[p],m=this.positions[u[1]].slice(0,3),h={position:m,dataCoordinate:m,index:Math.floor(u[1]/48)};return this.traceType==="cone"?h.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(h.intensity=this.intensity[u[1]],h.velocity=this.vectors[u[1]].slice(0,3),h.divergence=this.vectors[u[1]][3],h.index=p),h},l.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 S(b,p){var u=o(b,p.meshShader.vertex,p.meshShader.fragment,null,p.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function E(b,p){var u=o(b,p.pickShader.vertex,p.pickShader.fragment,null,p.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function y(b,p,u){var m=u.shaders;arguments.length===1&&(p=b,b=p.gl);var h=S(b,m),P=E(b,m),L=n(b,f(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=b.LINEAR_MIPMAP_LINEAR,L.magFilter=b.LINEAR;var z=a(b),F=a(b),B=a(b),O=a(b),I=a(b),N=i(b,[{buffer:z,type:b.FLOAT,size:4},{buffer:I,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:b.FLOAT,size:4},{buffer:O,type:b.FLOAT,size:2},{buffer:F,type:b.FLOAT,size:4}]),U=new T(b,L,h,P,z,F,I,B,O,N,u.traceType||"cone");return U.update(p),U}e.exports=y},614:function(e,t,r){var o=r(3236),a=o([`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;
}
`]),i=o([`#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;
}
`]),n=o([`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;
}
`]),s=o([`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);
}`]);t.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:n,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){e.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(e,t,r){var o=r(737);e.exports=function(i){return o[i]}},9165:function(e,t,r){"use strict";e.exports=T;var o=r(2762),a=r(8116),i=r(3436),n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,S){this.gl=l,this.shader=S,this.buffer=_,this.vao=w,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(l){var _=this.gl,w=this.shader.uniforms;this.shader.bind();var S=w.view=l.view||n,E=w.projection=l.projection||n;w.model=l.model||n,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var y=S[12],b=S[13],p=S[14],u=S[15],m=l._ortho||!1,h=m?2:1,P=h*this.pixelRatio*(E[3]*y+E[7]*b+E[11]*p+E[15]*u)/_.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)_.lineWidth(this.lineWidth[L]*this.pixelRatio),w.capSize=this.capSize[L]*P,this.lineCount[L]&&_.drawArrays(_.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};function f(l,_){for(var w=0;w<3;++w)l[0][w]=Math.min(l[0][w],_[w]),l[1][w]=Math.max(l[1][w],_[w])}var g=function(){for(var l=new Array(3),_=0;_<3;++_){for(var w=[],S=1;S<=2;++S)for(var E=-1;E<=1;E+=2){var y=(S+_)%3,b=[0,0,0];b[y]=E,w.push(b)}l[_]=w}return l}();function v(l,_,w,S){for(var E=g[S],y=0;y<E.length;++y){var b=E[y];l.push(_[0],_[1],_[2],w[0],w[1],w[2],w[3],b[0],b[1],b[2])}return E.length}c.update=function(l){l=l||{},"lineWidth"in l&&(this.lineWidth=l.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in l&&(this.capSize=l.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in l&&(this.opacity=+l.opacity,this.opacity<1&&(this.hasAlpha=!0));var _=l.color||[[0,0,0],[0,0,0],[0,0,0]],w=l.position,S=l.error;if(Array.isArray(_[0])||(_=[_,_,_]),w&&S){var E=[],y=w.length,b=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var p=0;p<3;++p){this.lineOffset[p]=b;e:for(var u=0;u<y;++u){for(var m=w[u],h=0;h<3;++h)if(isNaN(m[h])||!isFinite(m[h]))continue e;var P=S[u],L=_[p];if(Array.isArray(L[0])&&(L=_[u]),L.length===3?L=[L[0],L[1],L[2],1]:L.length===4&&(L=[L[0],L[1],L[2],L[3]],!this.hasAlpha&&L[3]<1&&(this.hasAlpha=!0)),!(isNaN(P[0][p])||isNaN(P[1][p]))){if(P[0][p]<0){var z=m.slice();z[p]+=P[0][p],E.push(m[0],m[1],m[2],L[0],L[1],L[2],L[3],0,0,0,z[0],z[1],z[2],L[0],L[1],L[2],L[3],0,0,0),f(this.bounds,z),b+=2+v(E,z,L,p)}if(P[1][p]>0){var z=m.slice();z[p]+=P[1][p],E.push(m[0],m[1],m[2],L[0],L[1],L[2],L[3],0,0,0,z[0],z[1],z[2],L[0],L[1],L[2],L[3],0,0,0),f(this.bounds,z),b+=2+v(E,z,L,p)}}}this.lineCount[p]=b-this.lineOffset[p]}this.buffer.update(E)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function T(l){var _=l.gl,w=o(_),S=a(_,[{buffer:w,type:_.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:_.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:_.FLOAT,size:3,offset:28,stride:40}]),E=i(_);E.attributes.position.location=0,E.attributes.color.location=1,E.attributes.offset.location=2;var y=new s(_,w,S,E);return y.update(l),y}},3436:function(e,t,r){"use strict";var o=r(3236),a=r(9405),i=o([`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;
}`]),n=o([`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;
}`]);e.exports=function(s){return a(s,i,n,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){"use strict";var o=r(7766);e.exports=b;var a=null,i,n,s,c;function f(p){var u=p.getParameter(p.FRAMEBUFFER_BINDING),m=p.getParameter(p.RENDERBUFFER_BINDING),h=p.getParameter(p.TEXTURE_BINDING_2D);return[u,m,h]}function g(p,u){p.bindFramebuffer(p.FRAMEBUFFER,u[0]),p.bindRenderbuffer(p.RENDERBUFFER,u[1]),p.bindTexture(p.TEXTURE_2D,u[2])}function v(p,u){var m=p.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(m+1);for(var h=0;h<=m;++h){for(var P=new Array(m),L=0;L<h;++L)P[L]=p.COLOR_ATTACHMENT0+L;for(var L=h;L<m;++L)P[L]=p.NONE;a[h]=P}}function T(p){switch(p){case i:throw new Error("gl-fbo: Framebuffer unsupported");case n:throw new Error("gl-fbo: Framebuffer incomplete attachment");case s:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case c:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function l(p,u,m,h,P,L){if(!h)return null;var z=o(p,u,m,P,h);return z.magFilter=p.NEAREST,z.minFilter=p.NEAREST,z.mipSamples=1,z.bind(),p.framebufferTexture2D(p.FRAMEBUFFER,L,p.TEXTURE_2D,z.handle,0),z}function _(p,u,m,h,P){var L=p.createRenderbuffer();return p.bindRenderbuffer(p.RENDERBUFFER,L),p.renderbufferStorage(p.RENDERBUFFER,h,u,m),p.framebufferRenderbuffer(p.FRAMEBUFFER,P,p.RENDERBUFFER,L),L}function w(p){var u=f(p.gl),m=p.gl,h=p.handle=m.createFramebuffer(),P=p._shape[0],L=p._shape[1],z=p.color.length,F=p._ext,B=p._useStencil,O=p._useDepth,I=p._colorType;m.bindFramebuffer(m.FRAMEBUFFER,h);for(var N=0;N<z;++N)p.color[N]=l(m,P,L,I,m.RGBA,m.COLOR_ATTACHMENT0+N);z===0?(p._color_rb=_(m,P,L,m.RGBA4,m.COLOR_ATTACHMENT0),F&&F.drawBuffersWEBGL(a[0])):z>1&&F.drawBuffersWEBGL(a[z]);var U=m.getExtension("WEBGL_depth_texture");U?B?p.depth=l(m,P,L,U.UNSIGNED_INT_24_8_WEBGL,m.DEPTH_STENCIL,m.DEPTH_STENCIL_ATTACHMENT):O&&(p.depth=l(m,P,L,m.UNSIGNED_SHORT,m.DEPTH_COMPONENT,m.DEPTH_ATTACHMENT)):O&&B?p._depth_rb=_(m,P,L,m.DEPTH_STENCIL,m.DEPTH_STENCIL_ATTACHMENT):O?p._depth_rb=_(m,P,L,m.DEPTH_COMPONENT16,m.DEPTH_ATTACHMENT):B&&(p._depth_rb=_(m,P,L,m.STENCIL_INDEX,m.STENCIL_ATTACHMENT));var W=m.checkFramebufferStatus(m.FRAMEBUFFER);if(W!==m.FRAMEBUFFER_COMPLETE){p._destroyed=!0,m.bindFramebuffer(m.FRAMEBUFFER,null),m.deleteFramebuffer(p.handle),p.handle=null,p.depth&&(p.depth.dispose(),p.depth=null),p._depth_rb&&(m.deleteRenderbuffer(p._depth_rb),p._depth_rb=null);for(var N=0;N<p.color.length;++N)p.color[N].dispose(),p.color[N]=null;p._color_rb&&(m.deleteRenderbuffer(p._color_rb),p._color_rb=null),g(m,u),T(W)}g(m,u)}function S(p,u,m,h,P,L,z,F){this.gl=p,this._shape=[u|0,m|0],this._destroyed=!1,this._ext=F,this.color=new Array(P);for(var B=0;B<P;++B)this.color[B]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=h,this._useDepth=L,this._useStencil=z;var O=this,I=[u|0,m|0];Object.defineProperties(I,{0:{get:function(){return O._shape[0]},set:function(N){return O.width=N}},1:{get:function(){return O._shape[1]},set:function(N){return O.height=N}}}),this._shapeVector=I,w(this)}var E=S.prototype;function y(p,u,m){if(p._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(p._shape[0]===u&&p._shape[1]===m)){var h=p.gl,P=h.getParameter(h.MAX_RENDERBUFFER_SIZE);if(u<0||u>P||m<0||m>P)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");p._shape[0]=u,p._shape[1]=m;for(var L=f(h),z=0;z<p.color.length;++z)p.color[z].shape=p._shape;p._color_rb&&(h.bindRenderbuffer(h.RENDERBUFFER,p._color_rb),h.renderbufferStorage(h.RENDERBUFFER,h.RGBA4,p._shape[0],p._shape[1])),p.depth&&(p.depth.shape=p._shape),p._depth_rb&&(h.bindRenderbuffer(h.RENDERBUFFER,p._depth_rb),p._useDepth&&p._useStencil?h.renderbufferStorage(h.RENDERBUFFER,h.DEPTH_STENCIL,p._shape[0],p._shape[1]):p._useDepth?h.renderbufferStorage(h.RENDERBUFFER,h.DEPTH_COMPONENT16,p._shape[0],p._shape[1]):p._useStencil&&h.renderbufferStorage(h.RENDERBUFFER,h.STENCIL_INDEX,p._shape[0],p._shape[1])),h.bindFramebuffer(h.FRAMEBUFFER,p.handle);var F=h.checkFramebufferStatus(h.FRAMEBUFFER);F!==h.FRAMEBUFFER_COMPLETE&&(p.dispose(),g(h,L),T(F)),g(h,L)}}Object.defineProperties(E,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(p){if(Array.isArray(p)||(p=[p|0,p|0]),p.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var u=p[0]|0,m=p[1]|0;return y(this,u,m),[u,m]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(p){return p=p|0,y(this,p,this._shape[1]),p},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(p){return p=p|0,y(this,this._shape[0],p),p},enumerable:!1}}),E.bind=function(){if(!this._destroyed){var p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,this.handle),p.viewport(0,0,this._shape[0],this._shape[1])}},E.dispose=function(){if(!this._destroyed){this._destroyed=!0;var p=this.gl;p.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(p.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var u=0;u<this.color.length;++u)this.color[u].dispose(),this.color[u]=null;this._color_rb&&(p.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function b(p,u,m,h){i||(i=p.FRAMEBUFFER_UNSUPPORTED,n=p.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,s=p.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,c=p.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var P=p.getExtension("WEBGL_draw_buffers");if(!a&&P&&v(p,P),Array.isArray(u)&&(h=m,m=u[1]|0,u=u[0]|0),typeof u!="number")throw new Error("gl-fbo: Missing shape parameter");var L=p.getParameter(p.MAX_RENDERBUFFER_SIZE);if(u<0||u>L||m<0||m>L)throw new Error("gl-fbo: Parameters are too large for FBO");h=h||{};var z=1;if("color"in h){if(z=Math.max(h.color|0,0),z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(z>1)if(P){if(z>p.getParameter(P.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+z+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=p.UNSIGNED_BYTE,B=p.getExtension("OES_texture_float");if(h.float&&z>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");F=p.FLOAT}else h.preferFloat&&z>0&&B&&(F=p.FLOAT);var O=!0;"depth"in h&&(O=!!h.depth);var I=!1;return"stencil"in h&&(I=!!h.stencil),new S(p,u,m,F,z,O,I,P)}},2992:function(e,t,r){var o=r(3387).sprintf,a=r(5171),i=r(1848),n=r(1085);e.exports=s;function s(c,f,g){"use strict";var v=i(f)||"of unknown name (see npm glsl-shader-name)",T="unknown type";g!==void 0&&(T=g===a.FRAGMENT_SHADER?"fragment":"vertex");for(var l=o(`Error compiling %s shader %s:
`,T,v),_=o("%s%s",l,c),w=c.split(`
`),S={},E=0;E<w.length;E++){var y=w[E];if(!(y===""||y==="\0")){var b=parseInt(y.split(":")[2]);if(isNaN(b))throw new Error(o("Could not parse error: %s",y));S[b]=y}}for(var p=n(f).split(`
`),E=0;E<p.length;E++)if(!(!S[E+3]&&!S[E+2]&&!S[E+1])){var u=p[E];if(l+=u+`
`,S[E+1]){var m=S[E+1];m=m.substr(m.split(":",3).join(":").length+1).trim(),l+=o(`^^^ %s
`,m)}}return{long:l.trim(),short:_.trim()}}},7319:function(e,t,r){var o=r(3236),a=r(9405),i=o([`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;
}
`]),n=o([`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;
}
`]),s=o([`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);
}`]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(f){return a(f,i,n,null,c)},t.createPickShader=function(f){return a(f,i,s,null,c)}},5714:function(e,t,r){"use strict";e.exports=p;var o=r(2762),a=r(8116),i=r(7766),n=new Uint8Array(4),s=new Float32Array(n.buffer);function c(u,m,h,P){return n[0]=P,n[1]=h,n[2]=m,n[3]=u,s[0]}var f=r(2478),g=r(9618),v=r(7319),T=v.createShader,l=v.createPickShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(u,m){for(var h=0,P=0;P<3;++P){var L=u[P]-m[P];h+=L*L}return Math.sqrt(h)}function S(u){for(var m=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],h=0;h<3;++h)m[0][h]=Math.max(u[0][h],m[0][h]),m[1][h]=Math.min(u[1][h],m[1][h]);return m}function E(u,m,h,P){this.arcLength=u,this.position=m,this.index=h,this.dataCoordinate=P}function y(u,m,h,P,L,z){this.gl=u,this.shader=m,this.pickShader=h,this.buffer=P,this.vao=L,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=z,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=y.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(u){this.pickId=u},b.drawTransparent=b.draw=function(u){if(this.vertexCount){var m=this.gl,h=this.shader,P=this.vao;h.bind(),h.uniforms={model:u.model||_,view:u.view||_,projection:u.projection||_,clipBounds:S(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[m.drawingBufferWidth,m.drawingBufferHeight],pixelRatio:this.pixelRatio},P.bind(),P.draw(m.TRIANGLE_STRIP,this.vertexCount),P.unbind()}},b.drawPick=function(u){if(this.vertexCount){var m=this.gl,h=this.pickShader,P=this.vao;h.bind(),h.uniforms={model:u.model||_,view:u.view||_,projection:u.projection||_,pickId:this.pickId,clipBounds:S(this.clipBounds),screenShape:[m.drawingBufferWidth,m.drawingBufferHeight],pixelRatio:this.pixelRatio},P.bind(),P.draw(m.TRIANGLE_STRIP,this.vertexCount),P.unbind()}},b.update=function(u){var m,h;this.dirty=!0;var P=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var L=[],z=[],F=[],B=0,O=0,I=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=u.position||u.positions;if(N){var U=u.color||u.colors||[0,0,0,1],W=u.lineWidth||1,Q=!1;e:for(m=1;m<N.length;++m){var ue=N[m-1],le=N[m];for(z.push(B),F.push(ue.slice()),h=0;h<3;++h){if(isNaN(ue[h])||isNaN(le[h])||!isFinite(ue[h])||!isFinite(le[h])){if(!P&&L.length>0){for(var he=0;he<24;++he)L.push(L[L.length-12]);O+=2,Q=!0}continue e}I[0][h]=Math.min(I[0][h],ue[h],le[h]),I[1][h]=Math.max(I[1][h],ue[h],le[h])}var G,$;Array.isArray(U[0])?(G=U.length>m-1?U[m-1]:U.length>0?U[U.length-1]:[0,0,0,1],$=U.length>m?U[m]:U.length>0?U[U.length-1]:[0,0,0,1]):G=$=U,G.length===3&&(G=[G[0],G[1],G[2],1]),$.length===3&&($=[$[0],$[1],$[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var J;Array.isArray(W)?J=W.length>m-1?W[m-1]:W.length>0?W[W.length-1]:[0,0,0,1]:J=W;var X=B;if(B+=w(ue,le),Q){for(h=0;h<2;++h)L.push(ue[0],ue[1],ue[2],le[0],le[1],le[2],X,J,G[0],G[1],G[2],G[3]);O+=2,Q=!1}L.push(ue[0],ue[1],ue[2],le[0],le[1],le[2],X,J,G[0],G[1],G[2],G[3],ue[0],ue[1],ue[2],le[0],le[1],le[2],X,-J,G[0],G[1],G[2],G[3],le[0],le[1],le[2],ue[0],ue[1],ue[2],B,-J,$[0],$[1],$[2],$[3],le[0],le[1],le[2],ue[0],ue[1],ue[2],B,J,$[0],$[1],$[2],$[3]),O+=4}}if(this.buffer.update(L),z.push(B),F.push(N[N.length-1].slice()),this.bounds=I,this.vertexCount=O,this.points=F,this.arcLength=z,"dashes"in u){var oe=u.dashes,ie=oe.slice();for(ie.unshift(0),m=1;m<ie.length;++m)ie[m]=ie[m-1]+ie[m];var j=g(new Array(256*4),[256,1,4]);for(m=0;m<256;++m){for(h=0;h<4;++h)j.set(m,0,h,0);f.le(ie,ie[ie.length-1]*m/255)&1?j.set(m,0,0,0):j.set(m,0,0,255)}this.texture.setPixels(j)}},b.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},b.pick=function(u){if(!u||u.id!==this.pickId)return null;var m=c(u.value[0],u.value[1],u.value[2],0),h=f.le(this.arcLength,m);if(h<0)return null;if(h===this.arcLength.length-1)return new E(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),h);for(var P=this.points[h],L=this.points[Math.min(h+1,this.points.length-1)],z=(m-this.arcLength[h])/(this.arcLength[h+1]-this.arcLength[h]),F=1-z,B=[0,0,0],O=0;O<3;++O)B[O]=F*P[O]+z*L[O];var I=Math.min(z<.5?h:h+1,this.points.length-1);return new E(m,B,I,this.points[I])};function p(u){var m=u.gl||u.scene&&u.scene.gl,h=T(m);h.attributes.position.location=0,h.attributes.nextPosition.location=1,h.attributes.arcLength.location=2,h.attributes.lineWidth.location=3,h.attributes.color.location=4;var P=l(m);P.attributes.position.location=0,P.attributes.nextPosition.location=1,P.attributes.arcLength.location=2,P.attributes.lineWidth.location=3,P.attributes.color.location=4;for(var L=o(m),z=a(m,[{buffer:L,size:3,offset:0,stride:48},{buffer:L,size:3,offset:12,stride:48},{buffer:L,size:1,offset:24,stride:48},{buffer:L,size:1,offset:28,stride:48},{buffer:L,size:4,offset:32,stride:48}]),F=g(new Array(256*4),[256,1,4]),B=0;B<1024;++B)F.data[B]=255;var O=i(m,F);O.wrap=m.REPEAT;var I=new y(m,h,P,L,z,O);return I.update(u),I}},1903:function(e){e.exports=t;function t(r){var o=new Float32Array(16);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o[4]=r[4],o[5]=r[5],o[6]=r[6],o[7]=r[7],o[8]=r[8],o[9]=r[9],o[10]=r[10],o[11]=r[11],o[12]=r[12],o[13]=r[13],o[14]=r[14],o[15]=r[15],o}},6864:function(e){e.exports=t;function t(){var r=new Float32Array(16);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}},9921:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],i=r[2],n=r[3],s=r[4],c=r[5],f=r[6],g=r[7],v=r[8],T=r[9],l=r[10],_=r[11],w=r[12],S=r[13],E=r[14],y=r[15],b=o*c-a*s,p=o*f-i*s,u=o*g-n*s,m=a*f-i*c,h=a*g-n*c,P=i*g-n*f,L=v*S-T*w,z=v*E-l*w,F=v*y-_*w,B=T*E-l*S,O=T*y-_*S,I=l*y-_*E;return b*I-p*O+u*B+m*F-h*z+P*L}},7399:function(e){e.exports=t;function t(r,o){var a=o[0],i=o[1],n=o[2],s=o[3],c=a+a,f=i+i,g=n+n,v=a*c,T=i*c,l=i*f,_=n*c,w=n*f,S=n*g,E=s*c,y=s*f,b=s*g;return r[0]=1-l-S,r[1]=T+b,r[2]=_-y,r[3]=0,r[4]=T-b,r[5]=1-v-S,r[6]=w+E,r[7]=0,r[8]=_+y,r[9]=w-E,r[10]=1-v-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},6743:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=o[3],f=i+i,g=n+n,v=s+s,T=i*f,l=i*g,_=i*v,w=n*g,S=n*v,E=s*v,y=c*f,b=c*g,p=c*v;return r[0]=1-(w+E),r[1]=l+p,r[2]=_-b,r[3]=0,r[4]=l-p,r[5]=1-(T+E),r[6]=S+y,r[7]=0,r[8]=_+b,r[9]=S-y,r[10]=1-(T+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},7894:function(e){e.exports=t;function t(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}},7608:function(e){e.exports=t;function t(r,o){var a=o[0],i=o[1],n=o[2],s=o[3],c=o[4],f=o[5],g=o[6],v=o[7],T=o[8],l=o[9],_=o[10],w=o[11],S=o[12],E=o[13],y=o[14],b=o[15],p=a*f-i*c,u=a*g-n*c,m=a*v-s*c,h=i*g-n*f,P=i*v-s*f,L=n*v-s*g,z=T*E-l*S,F=T*y-_*S,B=T*b-w*S,O=l*y-_*E,I=l*b-w*E,N=_*b-w*y,U=p*N-u*I+m*O+h*B-P*F+L*z;return U?(U=1/U,r[0]=(f*N-g*I+v*O)*U,r[1]=(n*I-i*N-s*O)*U,r[2]=(E*L-y*P+b*h)*U,r[3]=(_*P-l*L-w*h)*U,r[4]=(g*B-c*N-v*F)*U,r[5]=(a*N-n*B+s*F)*U,r[6]=(y*m-S*L-b*u)*U,r[7]=(T*L-_*m+w*u)*U,r[8]=(c*I-f*B+v*z)*U,r[9]=(i*B-a*I-s*z)*U,r[10]=(S*P-E*m+b*p)*U,r[11]=(l*m-T*P-w*p)*U,r[12]=(f*F-c*O-g*z)*U,r[13]=(a*O-i*F+n*z)*U,r[14]=(E*u-S*h-y*p)*U,r[15]=(T*h-l*u+_*p)*U,r):null}},6582:function(e,t,r){var o=r(7894);e.exports=a;function a(i,n,s,c){var f,g,v,T,l,_,w,S,E,y,b=n[0],p=n[1],u=n[2],m=c[0],h=c[1],P=c[2],L=s[0],z=s[1],F=s[2];return Math.abs(b-L)<1e-6&&Math.abs(p-z)<1e-6&&Math.abs(u-F)<1e-6?o(i):(w=b-L,S=p-z,E=u-F,y=1/Math.sqrt(w*w+S*S+E*E),w*=y,S*=y,E*=y,f=h*E-P*S,g=P*w-m*E,v=m*S-h*w,y=Math.sqrt(f*f+g*g+v*v),y?(y=1/y,f*=y,g*=y,v*=y):(f=0,g=0,v=0),T=S*v-E*g,l=E*f-w*v,_=w*g-S*f,y=Math.sqrt(T*T+l*l+_*_),y?(y=1/y,T*=y,l*=y,_*=y):(T=0,l=0,_=0),i[0]=f,i[1]=T,i[2]=w,i[3]=0,i[4]=g,i[5]=l,i[6]=S,i[7]=0,i[8]=v,i[9]=_,i[10]=E,i[11]=0,i[12]=-(f*b+g*p+v*u),i[13]=-(T*b+l*p+_*u),i[14]=-(w*b+S*p+E*u),i[15]=1,i)}},6760:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=o[3],f=o[4],g=o[5],v=o[6],T=o[7],l=o[8],_=o[9],w=o[10],S=o[11],E=o[12],y=o[13],b=o[14],p=o[15],u=a[0],m=a[1],h=a[2],P=a[3];return r[0]=u*i+m*f+h*l+P*E,r[1]=u*n+m*g+h*_+P*y,r[2]=u*s+m*v+h*w+P*b,r[3]=u*c+m*T+h*S+P*p,u=a[4],m=a[5],h=a[6],P=a[7],r[4]=u*i+m*f+h*l+P*E,r[5]=u*n+m*g+h*_+P*y,r[6]=u*s+m*v+h*w+P*b,r[7]=u*c+m*T+h*S+P*p,u=a[8],m=a[9],h=a[10],P=a[11],r[8]=u*i+m*f+h*l+P*E,r[9]=u*n+m*g+h*_+P*y,r[10]=u*s+m*v+h*w+P*b,r[11]=u*c+m*T+h*S+P*p,u=a[12],m=a[13],h=a[14],P=a[15],r[12]=u*i+m*f+h*l+P*E,r[13]=u*n+m*g+h*_+P*y,r[14]=u*s+m*v+h*w+P*b,r[15]=u*c+m*T+h*S+P*p,r}},4040:function(e){e.exports=t;function t(r,o,a,i,n,s,c){var f=1/(o-a),g=1/(i-n),v=1/(s-c);return r[0]=-2*f,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*g,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*v,r[11]=0,r[12]=(o+a)*f,r[13]=(n+i)*g,r[14]=(c+s)*v,r[15]=1,r}},4772:function(e){e.exports=t;function t(r,o,a,i,n){var s=1/Math.tan(o/2),c=1/(i-n);return r[0]=s/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(n+i)*c,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*n*i*c,r[15]=0,r}},6079:function(e){e.exports=t;function t(r,o,a,i){var n=i[0],s=i[1],c=i[2],f=Math.sqrt(n*n+s*s+c*c),g,v,T,l,_,w,S,E,y,b,p,u,m,h,P,L,z,F,B,O,I,N,U,W;return Math.abs(f)<1e-6?null:(f=1/f,n*=f,s*=f,c*=f,g=Math.sin(a),v=Math.cos(a),T=1-v,l=o[0],_=o[1],w=o[2],S=o[3],E=o[4],y=o[5],b=o[6],p=o[7],u=o[8],m=o[9],h=o[10],P=o[11],L=n*n*T+v,z=s*n*T+c*g,F=c*n*T-s*g,B=n*s*T-c*g,O=s*s*T+v,I=c*s*T+n*g,N=n*c*T+s*g,U=s*c*T-n*g,W=c*c*T+v,r[0]=l*L+E*z+u*F,r[1]=_*L+y*z+m*F,r[2]=w*L+b*z+h*F,r[3]=S*L+p*z+P*F,r[4]=l*B+E*O+u*I,r[5]=_*B+y*O+m*I,r[6]=w*B+b*O+h*I,r[7]=S*B+p*O+P*I,r[8]=l*N+E*U+u*W,r[9]=_*N+y*U+m*W,r[10]=w*N+b*U+h*W,r[11]=S*N+p*U+P*W,o!==r&&(r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r)}},5567:function(e){e.exports=t;function t(r,o,a){var i=Math.sin(a),n=Math.cos(a),s=o[4],c=o[5],f=o[6],g=o[7],v=o[8],T=o[9],l=o[10],_=o[11];return o!==r&&(r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[4]=s*n+v*i,r[5]=c*n+T*i,r[6]=f*n+l*i,r[7]=g*n+_*i,r[8]=v*n-s*i,r[9]=T*n-c*i,r[10]=l*n-f*i,r[11]=_*n-g*i,r}},2408:function(e){e.exports=t;function t(r,o,a){var i=Math.sin(a),n=Math.cos(a),s=o[0],c=o[1],f=o[2],g=o[3],v=o[8],T=o[9],l=o[10],_=o[11];return o!==r&&(r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[0]=s*n-v*i,r[1]=c*n-T*i,r[2]=f*n-l*i,r[3]=g*n-_*i,r[8]=s*i+v*n,r[9]=c*i+T*n,r[10]=f*i+l*n,r[11]=g*i+_*n,r}},7089:function(e){e.exports=t;function t(r,o,a){var i=Math.sin(a),n=Math.cos(a),s=o[0],c=o[1],f=o[2],g=o[3],v=o[4],T=o[5],l=o[6],_=o[7];return o!==r&&(r[8]=o[8],r[9]=o[9],r[10]=o[10],r[11]=o[11],r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15]),r[0]=s*n+v*i,r[1]=c*n+T*i,r[2]=f*n+l*i,r[3]=g*n+_*i,r[4]=v*n-s*i,r[5]=T*n-c*i,r[6]=l*n-f*i,r[7]=_*n-g*i,r}},2504:function(e){e.exports=t;function t(r,o,a){var i=a[0],n=a[1],s=a[2];return r[0]=o[0]*i,r[1]=o[1]*i,r[2]=o[2]*i,r[3]=o[3]*i,r[4]=o[4]*n,r[5]=o[5]*n,r[6]=o[6]*n,r[7]=o[7]*n,r[8]=o[8]*s,r[9]=o[9]*s,r[10]=o[10]*s,r[11]=o[11]*s,r[12]=o[12],r[13]=o[13],r[14]=o[14],r[15]=o[15],r}},7656:function(e){e.exports=t;function t(r,o,a){var i=a[0],n=a[1],s=a[2],c,f,g,v,T,l,_,w,S,E,y,b;return o===r?(r[12]=o[0]*i+o[4]*n+o[8]*s+o[12],r[13]=o[1]*i+o[5]*n+o[9]*s+o[13],r[14]=o[2]*i+o[6]*n+o[10]*s+o[14],r[15]=o[3]*i+o[7]*n+o[11]*s+o[15]):(c=o[0],f=o[1],g=o[2],v=o[3],T=o[4],l=o[5],_=o[6],w=o[7],S=o[8],E=o[9],y=o[10],b=o[11],r[0]=c,r[1]=f,r[2]=g,r[3]=v,r[4]=T,r[5]=l,r[6]=_,r[7]=w,r[8]=S,r[9]=E,r[10]=y,r[11]=b,r[12]=c*i+T*n+S*s+o[12],r[13]=f*i+l*n+E*s+o[13],r[14]=g*i+_*n+y*s+o[14],r[15]=v*i+w*n+b*s+o[15]),r}},5665:function(e){e.exports=t;function t(r,o){if(r===o){var a=o[1],i=o[2],n=o[3],s=o[6],c=o[7],f=o[11];r[1]=o[4],r[2]=o[8],r[3]=o[12],r[4]=a,r[6]=o[9],r[7]=o[13],r[8]=i,r[9]=s,r[11]=o[14],r[12]=n,r[13]=c,r[14]=f}else r[0]=o[0],r[1]=o[4],r[2]=o[8],r[3]=o[12],r[4]=o[1],r[5]=o[5],r[6]=o[9],r[7]=o[13],r[8]=o[2],r[9]=o[6],r[10]=o[10],r[11]=o[14],r[12]=o[3],r[13]=o[7],r[14]=o[11],r[15]=o[15];return r}},7626:function(e,t,r){"use strict";var o=r(2642),a=r(9346);e.exports=f;function i(g,v){for(var T=[0,0,0,0],l=0;l<4;++l)for(var _=0;_<4;++_)T[_]+=g[4*l+_]*v[l];return T}function n(g,v,T,l,_){for(var w=i(l,i(T,i(v,[g[0],g[1],g[2],1]))),S=0;S<3;++S)w[S]/=w[3];return[.5*_[0]*(1+w[0]),.5*_[1]*(1-w[1])]}function s(g,v){if(g.length===2){for(var T=0,l=0,_=0;_<2;++_)T+=Math.pow(v[_]-g[0][_],2),l+=Math.pow(v[_]-g[1][_],2);return T=Math.sqrt(T),l=Math.sqrt(l),T+l<1e-6?[1,0]:[l/(T+l),T/(l+T)]}else if(g.length===3){var w=[0,0];return a(g[0],g[1],g[2],v,w),o(g,w)}return[]}function c(g,v){for(var T=[0,0,0],l=0;l<g.length;++l)for(var _=g[l],w=v[l],S=0;S<3;++S)T[S]+=w*_[S];return T}function f(g,v,T,l,_,w){if(g.length===1)return[0,g[0].slice()];for(var S=new Array(g.length),E=0;E<g.length;++E)S[E]=n(g[E],T,l,_,w);for(var y=0,b=1/0,E=0;E<S.length;++E){for(var p=0,u=0;u<2;++u)p+=Math.pow(S[E][u]-v[u],2);p<b&&(b=p,y=E)}for(var m=s(S,v),h=0,E=0;E<3;++E){if(m[E]<-.001||m[E]>1.0001)return null;h+=m[E]}return Math.abs(h-1)>.001?null:[y,c(g,m),m]}},840:function(e,t,r){var o=r(3236),a=o([`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;
}
`]),i=o([`#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;
}
`]),n=o([`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;
}`]),s=o([`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;
}`]),c=o([`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;
}`]),f=o([`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;
}`]),g=o([`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;
}`]),v=o([`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);
}`]),T=o([`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;
}`]),l=o([`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)));
}`]),_=o([`precision highp float;
#define GLSLIFY 1
uniform vec3 contourColor;
void main() {
gl_FragColor = vec4(contourColor, 1.0);
}
`]);t.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:n,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:g,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:T,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:l,fragment:_,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){"use strict";var o=1e-6,a=1e-6,i=r(9405),n=r(2762),s=r(8116),c=r(7766),f=r(8406),g=r(6760),v=r(7608),T=r(9618),l=r(6729),_=r(7765),w=r(1888),S=r(840),E=r(7626),y=S.meshShader,b=S.wireShader,p=S.pointShader,u=S.pickShader,m=S.pointPickShader,h=S.contourShader,P=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function L(he,G,$,J,X,oe,ie,j,ee,re,ce,be,Ae,ze,Re,Xe,it,ot,tt,lt,Ee,_e,fe,Fe,rt,st,Qe){this.gl=he,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=$,this.lineShader=J,this.pointShader=X,this.pickShader=oe,this.pointPickShader=ie,this.contourShader=j,this.trianglePositions=ee,this.triangleColors=ce,this.triangleNormals=Ae,this.triangleUVs=be,this.triangleIds=re,this.triangleVAO=ze,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Re,this.edgeColors=it,this.edgeUVs=ot,this.edgeIds=Xe,this.edgeVAO=tt,this.edgeCount=0,this.pointPositions=lt,this.pointColors=_e,this.pointUVs=fe,this.pointSizes=Fe,this.pointIds=Ee,this.pointVAO=rt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=st,this.contourVAO=Qe,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=P,this._view=P,this._projection=P,this._resolution=[1,1]}var z=L.prototype;z.isOpaque=function(){return!this.hasAlpha},z.isTransparent=function(){return this.hasAlpha},z.pickSlots=1,z.setPickBase=function(he){this.pickId=he};function F(he,G){if(!G||!G.length)return 1;for(var $=0;$<G.length;++$){if(G.length<2)return 1;if(G[$][0]===he)return G[$][1];if(G[$][0]>he&&$>0){var J=(G[$][0]-he)/(G[$][0]-G[$-1][0]);return G[$][1]*(1-J)+J*G[$-1][1]}}return 1}function B(he,G){for(var $=l({colormap:he,nshades:256,format:"rgba"}),J=new Uint8Array(256*4),X=0;X<256;++X){for(var oe=$[X],ie=0;ie<3;++ie)J[4*X+ie]=oe[ie];G?J[4*X+3]=255*F(X/255,G):J[4*X+3]=255*oe[3]}return T(J,[256,256,4],[4,0,1])}function O(he){for(var G=he.length,$=new Array(G),J=0;J<G;++J)$[J]=he[J][2];return $}z.highlight=function(he){if(!he||!this.contourEnable){this.contourCount=0;return}for(var G=_(this.cells,this.intensity,he.intensity),$=G.cells,J=G.vertexIds,X=G.vertexWeights,oe=$.length,ie=w.mallocFloat32(2*3*oe),j=0,ee=0;ee<oe;++ee)for(var re=$[ee],ce=0;ce<2;++ce){var be=re[0];re.length===2&&(be=re[ce]);for(var Ae=J[be][0],ze=J[be][1],Re=X[be],Xe=1-Re,it=this.positions[Ae],ot=this.positions[ze],tt=0;tt<3;++tt)ie[j++]=Re*it[tt]+Xe*ot[tt]}this.contourCount=j/3|0,this.contourPositions.update(ie.subarray(0,j)),w.free(ie)},z.update=function(he){he=he||{};var G=this.gl;this.dirty=!0,"contourEnable"in he&&(this.contourEnable=he.contourEnable),"contourColor"in he&&(this.contourColor=he.contourColor),"lineWidth"in he&&(this.lineWidth=he.lineWidth),"lightPosition"in he&&(this.lightPosition=he.lightPosition),this.hasAlpha=!1,"opacity"in he&&(this.opacity=he.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in he&&(this.opacityscale=he.opacityscale,this.hasAlpha=!0),"ambient"in he&&(this.ambientLight=he.ambient),"diffuse"in he&&(this.diffuseLight=he.diffuse),"specular"in he&&(this.specularLight=he.specular),"roughness"in he&&(this.roughness=he.roughness),"fresnel"in he&&(this.fresnel=he.fresnel),he.texture?(this.texture.dispose(),this.texture=c(G,he.texture)):he.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=G.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=G.LINEAR,this.texture.setPixels(B(he.colormap,this.opacityscale)),this.texture.generateMipmap());var $=he.cells,J=he.positions;if(!(!J||!$)){var X=[],oe=[],ie=[],j=[],ee=[],re=[],ce=[],be=[],Ae=[],ze=[],Re=[],Xe=[],it=[],ot=[];this.cells=$,this.positions=J;var tt=he.vertexNormals,lt=he.cellNormals,Ee=he.vertexNormalsEpsilon===void 0?o:he.vertexNormalsEpsilon,_e=he.faceNormalsEpsilon===void 0?a:he.faceNormalsEpsilon;he.useFacetNormals&&!lt&&(lt=f.faceNormals($,J,_e)),!lt&&!tt&&(tt=f.vertexNormals($,J,Ee));var fe=he.vertexColors,Fe=he.cellColors,rt=he.meshColor||[1,1,1,1],st=he.vertexUVs,Qe=he.vertexIntensity,Lt=he.cellUVs,kt=he.cellIntensity,Vt=1/0,Zt=-1/0;if(!st&&!Lt)if(Qe)if(he.vertexIntensityBounds)Vt=+he.vertexIntensityBounds[0],Zt=+he.vertexIntensityBounds[1];else for(var Sr=0;Sr<Qe.length;++Sr){var xr=Qe[Sr];Vt=Math.min(Vt,xr),Zt=Math.max(Zt,xr)}else if(kt)if(he.cellIntensityBounds)Vt=+he.cellIntensityBounds[0],Zt=+he.cellIntensityBounds[1];else for(var Sr=0;Sr<kt.length;++Sr){var xr=kt[Sr];Vt=Math.min(Vt,xr),Zt=Math.max(Zt,xr)}else for(var Sr=0;Sr<J.length;++Sr){var xr=J[Sr][2];Vt=Math.min(Vt,xr),Zt=Math.max(Zt,xr)}Qe?this.intensity=Qe:kt?this.intensity=kt:this.intensity=O(J),this.pickVertex=!(kt||Fe);var jr=he.pointSizes,wr=he.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Sr=0;Sr<J.length;++Sr)for(var Ir=J[Sr],bt=0;bt<3;++bt)isNaN(Ir[bt])||!isFinite(Ir[bt])||(this.bounds[0][bt]=Math.min(this.bounds[0][bt],Ir[bt]),this.bounds[1][bt]=Math.max(this.bounds[1][bt],Ir[bt]));var Be=0,Ke=0,Ue=0;e:for(var Sr=0;Sr<$.length;++Sr){var Me=$[Sr];switch(Me.length){case 1:for(var qe=Me[0],Ir=J[qe],bt=0;bt<3;++bt)if(isNaN(Ir[bt])||!isFinite(Ir[bt]))continue e;ze.push(Ir[0],Ir[1],Ir[2]);var Ce;fe?Ce=fe[qe]:Fe?Ce=Fe[Sr]:Ce=rt,this.opacityscale&&Qe?oe.push(Ce[0],Ce[1],Ce[2],this.opacity*F((Qe[qe]-Vt)/(Zt-Vt),this.opacityscale)):Ce.length===3?Re.push(Ce[0],Ce[1],Ce[2],this.opacity):(Re.push(Ce[0],Ce[1],Ce[2],Ce[3]*this.opacity),Ce[3]<1&&(this.hasAlpha=!0));var Te;st?Te=st[qe]:Qe?Te=[(Qe[qe]-Vt)/(Zt-Vt),0]:Lt?Te=Lt[Sr]:kt?Te=[(kt[Sr]-Vt)/(Zt-Vt),0]:Te=[(Ir[2]-Vt)/(Zt-Vt),0],Xe.push(Te[0],Te[1]),jr?it.push(jr[qe]):it.push(wr),ot.push(Sr),Ue+=1;break;case 2:for(var bt=0;bt<2;++bt)for(var qe=Me[bt],Ir=J[qe],Pe=0;Pe<3;++Pe)if(isNaN(Ir[Pe])||!isFinite(Ir[Pe]))continue e;for(var bt=0;bt<2;++bt){var qe=Me[bt],Ir=J[qe];re.push(Ir[0],Ir[1],Ir[2]);var Ce;fe?Ce=fe[qe]:Fe?Ce=Fe[Sr]:Ce=rt,this.opacityscale&&Qe?oe.push(Ce[0],Ce[1],Ce[2],this.opacity*F((Qe[qe]-Vt)/(Zt-Vt),this.opacityscale)):Ce.length===3?ce.push(Ce[0],Ce[1],Ce[2],this.opacity):(ce.push(Ce[0],Ce[1],Ce[2],Ce[3]*this.opacity),Ce[3]<1&&(this.hasAlpha=!0));var Te;st?Te=st[qe]:Qe?Te=[(Qe[qe]-Vt)/(Zt-Vt),0]:Lt?Te=Lt[Sr]:kt?Te=[(kt[Sr]-Vt)/(Zt-Vt),0]:Te=[(Ir[2]-Vt)/(Zt-Vt),0],be.push(Te[0],Te[1]),Ae.push(Sr)}Ke+=1;break;case 3:for(var bt=0;bt<3;++bt)for(var qe=Me[bt],Ir=J[qe],Pe=0;Pe<3;++Pe)if(isNaN(Ir[Pe])||!isFinite(Ir[Pe]))continue e;for(var bt=0;bt<3;++bt){var qe=Me[2-bt],Ir=J[qe];X.push(Ir[0],Ir[1],Ir[2]);var Ce;fe?Ce=fe[qe]:Fe?Ce=Fe[Sr]:Ce=rt,Ce?this.opacityscale&&Qe?oe.push(Ce[0],Ce[1],Ce[2],this.opacity*F((Qe[qe]-Vt)/(Zt-Vt),this.opacityscale)):Ce.length===3?oe.push(Ce[0],Ce[1],Ce[2],this.opacity):(oe.push(Ce[0],Ce[1],Ce[2],Ce[3]*this.opacity),Ce[3]<1&&(this.hasAlpha=!0)):oe.push(.5,.5,.5,1);var Te;st?Te=st[qe]:Qe?Te=[(Qe[qe]-Vt)/(Zt-Vt),0]:Lt?Te=Lt[Sr]:kt?Te=[(kt[Sr]-Vt)/(Zt-Vt),0]:Te=[(Ir[2]-Vt)/(Zt-Vt),0],j.push(Te[0],Te[1]);var at;tt?at=tt[qe]:at=lt[Sr],ie.push(at[0],at[1],at[2]),ee.push(Sr)}Be+=1;break;default:break}}this.pointCount=Ue,this.edgeCount=Ke,this.triangleCount=Be,this.pointPositions.update(ze),this.pointColors.update(Re),this.pointUVs.update(Xe),this.pointSizes.update(it),this.pointIds.update(new Uint32Array(ot)),this.edgePositions.update(re),this.edgeColors.update(ce),this.edgeUVs.update(be),this.edgeIds.update(new Uint32Array(Ae)),this.trianglePositions.update(X),this.triangleColors.update(oe),this.triangleUVs.update(j),this.triangleNormals.update(ie),this.triangleIds.update(new Uint32Array(ee))}},z.drawTransparent=z.draw=function(he){he=he||{};for(var G=this.gl,$=he.model||P,J=he.view||P,X=he.projection||P,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ie=0;ie<3;++ie)oe[0][ie]=Math.max(oe[0][ie],this.clipBounds[0][ie]),oe[1][ie]=Math.min(oe[1][ie],this.clipBounds[1][ie]);var j={model:$,view:J,projection:X,inverseModel:P.slice(),clipBounds:oe,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};j.inverseModel=v(j.inverseModel,j.model),G.disable(G.CULL_FACE),this.texture.bind(0);var ee=new Array(16);g(ee,j.view,j.model),g(ee,j.projection,ee),v(ee,ee);for(var ie=0;ie<3;++ie)j.eyePosition[ie]=ee[12+ie]/ee[15];for(var re=ee[15],ie=0;ie<3;++ie)re+=this.lightPosition[ie]*ee[4*ie+3];for(var ie=0;ie<3;++ie){for(var ce=ee[12+ie],be=0;be<3;++be)ce+=ee[4*be+ie]*this.lightPosition[be];j.lightPosition[ie]=ce/re}if(this.triangleCount>0){var Ae=this.triShader;Ae.bind(),Ae.uniforms=j,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Ae=this.lineShader;Ae.bind(),Ae.uniforms=j,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Ae=this.pointShader;Ae.bind(),Ae.uniforms=j,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Ae=this.contourShader;Ae.bind(),Ae.uniforms=j,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},z.drawPick=function(he){he=he||{};for(var G=this.gl,$=he.model||P,J=he.view||P,X=he.projection||P,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ie=0;ie<3;++ie)oe[0][ie]=Math.max(oe[0][ie],this.clipBounds[0][ie]),oe[1][ie]=Math.min(oe[1][ie],this.clipBounds[1][ie]);this._model=[].slice.call($),this._view=[].slice.call(J),this._projection=[].slice.call(X),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var j={model:$,view:J,projection:X,clipBounds:oe,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=j,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=j,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},z.pick=function(he){if(!he||he.id!==this.pickId)return null;for(var G=he.value[0]+256*he.value[1]+65536*he.value[2],$=this.cells[G],J=this.positions,X=new Array($.length),oe=0;oe<$.length;++oe)X[oe]=J[$[oe]];var ie=he.coord[0],j=he.coord[1];if(!this.pickVertex){var ee=this.positions[$[0]],re=this.positions[$[1]],ce=this.positions[$[2]],be=[(ee[0]+re[0]+ce[0])/3,(ee[1]+re[1]+ce[1])/3,(ee[2]+re[2]+ce[2])/3];return{_cellCenter:!0,position:[ie,j],index:G,cell:$,cellId:G,intensity:this.intensity[G],dataCoordinate:be}}var Ae=E(X,[ie*this.pixelRatio,this._resolution[1]-j*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!Ae)return null;for(var ze=Ae[2],Re=0,oe=0;oe<$.length;++oe)Re+=ze[oe]*this.intensity[$[oe]];return{position:Ae[1],index:$[Ae[0]],cell:$,cellId:G,intensity:Re,dataCoordinate:this.positions[$[Ae[0]]]}},z.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 I(he){var G=i(he,y.vertex,y.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G.attributes.normal.location=4,G}function N(he){var G=i(he,b.vertex,b.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G}function U(he){var G=i(he,p.vertex,p.fragment);return G.attributes.position.location=0,G.attributes.color.location=2,G.attributes.uv.location=3,G.attributes.pointSize.location=4,G}function W(he){var G=i(he,u.vertex,u.fragment);return G.attributes.position.location=0,G.attributes.id.location=1,G}function Q(he){var G=i(he,m.vertex,m.fragment);return G.attributes.position.location=0,G.attributes.id.location=1,G.attributes.pointSize.location=4,G}function ue(he){var G=i(he,h.vertex,h.fragment);return G.attributes.position.location=0,G}function le(he,G){arguments.length===1&&(G=he,he=G.gl);var $=he.getExtension("OES_standard_derivatives")||he.getExtension("MOZ_OES_standard_derivatives")||he.getExtension("WEBKIT_OES_standard_derivatives");if(!$)throw new Error("derivatives not supported");var J=I(he),X=N(he),oe=U(he),ie=W(he),j=Q(he),ee=ue(he),re=c(he,T(new Uint8Array([255,255,255,255]),[1,1,4]));re.generateMipmap(),re.minFilter=he.LINEAR_MIPMAP_LINEAR,re.magFilter=he.LINEAR;var ce=n(he),be=n(he),Ae=n(he),ze=n(he),Re=n(he),Xe=s(he,[{buffer:ce,type:he.FLOAT,size:3},{buffer:Re,type:he.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:be,type:he.FLOAT,size:4},{buffer:Ae,type:he.FLOAT,size:2},{buffer:ze,type:he.FLOAT,size:3}]),it=n(he),ot=n(he),tt=n(he),lt=n(he),Ee=s(he,[{buffer:it,type:he.FLOAT,size:3},{buffer:lt,type:he.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ot,type:he.FLOAT,size:4},{buffer:tt,type:he.FLOAT,size:2}]),_e=n(he),fe=n(he),Fe=n(he),rt=n(he),st=n(he),Qe=s(he,[{buffer:_e,type:he.FLOAT,size:3},{buffer:st,type:he.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:fe,type:he.FLOAT,size:4},{buffer:Fe,type:he.FLOAT,size:2},{buffer:rt,type:he.FLOAT,size:1}]),Lt=n(he),kt=s(he,[{buffer:Lt,type:he.FLOAT,size:3}]),Vt=new L(he,re,J,X,oe,ie,j,ee,ce,Re,be,Ae,ze,Xe,it,lt,ot,tt,Ee,_e,st,fe,Fe,rt,Qe,Lt,kt);return Vt.update(G),Vt}e.exports=le},4437:function(e,t,r){"use strict";e.exports=f;var o=r(3025),a=r(6296),i=r(351),n=r(8512),s=r(24),c=r(7520);function f(g,v){g=g||document.body,v=v||{};var T=[.01,1/0];"distanceLimits"in v&&(T[0]=v.distanceLimits[0],T[1]=v.distanceLimits[1]),"zoomMin"in v&&(T[0]=v.zoomMin),"zoomMax"in v&&(T[1]=v.zoomMax);var l=a({center:v.center||[0,0,0],up:v.up||[0,1,0],eye:v.eye||[0,0,10],mode:v.mode||"orbit",distanceLimits:T}),_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0,S=g.clientWidth,E=g.clientHeight,y={keyBindingMode:"rotate",enableWheel:!0,view:l,element:g,delay:v.delay||16,rotateSpeed:v.rotateSpeed||1,zoomSpeed:v.zoomSpeed||1,translateSpeed:v.translateSpeed||1,flipX:!!v.flipX,flipY:!!v.flipY,modes:l.modes,_ortho:v._ortho||v.projection&&v.projection.type==="orthographic"||!1,tick:function(){var b=o(),p=this.delay,u=b-2*p;l.idle(b-p),l.recalcMatrix(u),l.flush(b-(100+p*2));for(var m=!0,h=l.computedMatrix,P=0;P<16;++P)m=m&&_[P]===h[P],_[P]=h[P];var L=g.clientWidth===S&&g.clientHeight===E;return S=g.clientWidth,E=g.clientHeight,m?!L:(w=Math.exp(l.computedRadius[0]),!0)},lookAt:function(b,p,u){l.lookAt(l.lastT(),b,p,u)},rotate:function(b,p,u){l.rotate(l.lastT(),b,p,u)},pan:function(b,p,u){l.pan(l.lastT(),b,p,u)},translate:function(b,p,u){l.translate(l.lastT(),b,p,u)}};return Object.defineProperties(y,{matrix:{get:function(){return l.computedMatrix},set:function(b){return l.setMatrix(l.lastT(),b),l.computedMatrix},enumerable:!0},mode:{get:function(){return l.getMode()},set:function(b){var p=l.computedUp.slice(),u=l.computedEye.slice(),m=l.computedCenter.slice();if(l.setMode(b),b==="turntable"){var h=o();l._active.lookAt(h,u,m,p),l._active.lookAt(h+500,u,m,[0,0,1]),l._active.flush(h)}return l.getMode()},enumerable:!0},center:{get:function(){return l.computedCenter},set:function(b){return l.lookAt(l.lastT(),null,b),l.computedCenter},enumerable:!0},eye:{get:function(){return l.computedEye},set:function(b){return l.lookAt(l.lastT(),b),l.computedEye},enumerable:!0},up:{get:function(){return l.computedUp},set:function(b){return l.lookAt(l.lastT(),null,null,b),l.computedUp},enumerable:!0},distance:{get:function(){return w},set:function(b){return l.setDistance(l.lastT(),b),b},enumerable:!0},distanceLimits:{get:function(){return l.getDistanceLimits(T)},set:function(b){return l.setDistanceLimits(b),b},enumerable:!0}}),g.addEventListener("contextmenu",function(b){return b.preventDefault(),!1}),y._lastX=-1,y._lastY=-1,y._lastMods={shift:!1,control:!1,alt:!1,meta:!1},y.enableMouseListeners=function(){y.mouseListener=i(g,b),g.addEventListener("touchstart",function(p){var u=s(p.changedTouches[0],g);b(0,u[0],u[1],y._lastMods),b(1,u[0],u[1],y._lastMods)},c?{passive:!0}:!1),g.addEventListener("touchmove",function(p){var u=s(p.changedTouches[0],g);b(1,u[0],u[1],y._lastMods),p.preventDefault()},c?{passive:!1}:!1),g.addEventListener("touchend",function(p){b(0,y._lastX,y._lastY,y._lastMods)},c?{passive:!0}:!1);function b(p,u,m,h){var P=y.keyBindingMode;if(P!==!1){var L=P==="rotate",z=P==="pan",F=P==="zoom",B=!!h.control,O=!!h.alt,I=!!h.shift,N=!!(p&1),U=!!(p&2),W=!!(p&4),Q=1/g.clientHeight,ue=Q*(u-y._lastX),le=Q*(m-y._lastY),he=y.flipX?1:-1,G=y.flipY?1:-1,$=Math.PI*y.rotateSpeed,J=o();if(y._lastX!==-1&&y._lastY!==-1&&((L&&N&&!B&&!O&&!I||N&&!B&&!O&&I)&&l.rotate(J,he*$*ue,-G*$*le,0),(z&&N&&!B&&!O&&!I||U||N&&B&&!O&&!I)&&l.pan(J,-y.translateSpeed*ue*w,y.translateSpeed*le*w,0),F&&N&&!B&&!O&&!I||W||N&&!B&&O&&!I)){var X=-y.zoomSpeed*le/window.innerHeight*(J-l.lastT())*100;l.pan(J,0,0,w*(Math.exp(X)-1))}return y._lastX=u,y._lastY=m,y._lastMods=h,!0}}y.wheelListener=n(g,function(p,u){if(y.keyBindingMode!==!1&&y.enableWheel){var m=y.flipX?1:-1,h=y.flipY?1:-1,P=o();if(Math.abs(p)>Math.abs(u))l.rotate(P,0,0,-p*m*Math.PI*y.rotateSpeed/window.innerWidth);else if(!y._ortho){var L=-y.zoomSpeed*h*u/window.innerHeight*(P-l.lastT())/20;l.pan(P,0,0,w*(Math.exp(L)-1))}}},!0)},y.enableMouseListeners(),y}},799:function(e,t,r){var o=r(3236),a=r(9405),i=o([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
uv = position;
gl_Position = vec4(position, 0, 1);
}`]),n=o([`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);
}`]);e.exports=function(s){return a(s,i,n,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){"use strict";var o=r(4437),a=r(3837),i=r(5445),n=r(4449),s=r(3589),c=r(2260),f=r(7169),g=r(351),v=r(4772),T=r(4040),l=r(799),_=r(9216)({tablet:!0,featureDetect:!0});e.exports={createScene:b,createCamera:o};function w(){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 S(u,m){var h=null;try{h=u.getContext("webgl",m),h||(h=u.getContext("experimental-webgl",m))}catch{return null}return h}function E(u){var m=Math.round(Math.log(Math.abs(u))/Math.log(10));if(m<0){var h=Math.round(Math.pow(10,-m));return Math.ceil(u*h)/h}else if(m>0){var h=Math.round(Math.pow(10,m));return Math.ceil(u/h)*h}return Math.ceil(u)}function y(u){return typeof u=="boolean"?u:!0}function b(u){u=u||{},u.camera=u.camera||{};var m=u.canvas;if(!m)if(m=document.createElement("canvas"),u.container){var h=u.container;h.appendChild(m)}else document.body.appendChild(m);var P=u.gl;if(P||(u.glOptions&&(_=!!u.glOptions.preserveDrawingBuffer),P=S(m,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:_})),!P)throw new Error("webgl not supported");var L=u.bounds||[[-10,-10,-10],[10,10,10]],z=new w,F=c(P,P.drawingBufferWidth,P.drawingBufferHeight,{preferFloat:!_}),B=l(P),O=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,I={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:O},N=u.axes||{},U=a(P,N);U.enable=!N.disable;var W=u.spikes||{},Q=n(P,W),ue=[],le=[],he=[],G=[],$=!0,ie=!0,J=new Array(16),X=new Array(16),oe={view:null,projection:J,model:X,_ortho:!1},ie=!0,j=[P.drawingBufferWidth,P.drawingBufferHeight],ee=u.cameraObject||o(m,I),re={gl:P,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:m,selection:z,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:L,objects:ue,shape:j,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:y(u.autoResize),autoBounds:y(u.autoBounds),autoScale:!!u.autoScale,autoCenter:y(u.autoCenter),clipToBounds:y(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(lt){this.aspect[0]=lt.x,this.aspect[1]=lt.y,this.aspect[2]=lt.z,ie=!0},setBounds:function(lt,Ee){this.bounds[0][lt]=Ee.min,this.bounds[1][lt]=Ee.max},setClearColor:function(lt){this.clearColor=lt},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)}},ce=[P.drawingBufferWidth/re.pixelRatio|0,P.drawingBufferHeight/re.pixelRatio|0];function be(){if(!re._stopped&&re.autoResize){var lt=m.parentNode,Ee=1,_e=1;lt&&lt!==document.body?(Ee=lt.clientWidth,_e=lt.clientHeight):(Ee=window.innerWidth,_e=window.innerHeight);var fe=Math.ceil(Ee*re.pixelRatio)|0,Fe=Math.ceil(_e*re.pixelRatio)|0;if(fe!==m.width||Fe!==m.height){m.width=fe,m.height=Fe;var rt=m.style;rt.position=rt.position||"absolute",rt.left="0px",rt.top="0px",rt.width=Ee+"px",rt.height=_e+"px",$=!0}}}re.autoResize&&be(),window.addEventListener("resize",be);function Ae(){for(var lt=ue.length,Ee=G.length,_e=0;_e<Ee;++_e)he[_e]=0;e:for(var _e=0;_e<lt;++_e){var fe=ue[_e],Fe=fe.pickSlots;if(!Fe){le[_e]=-1;continue}for(var rt=0;rt<Ee;++rt)if(he[rt]+Fe<255){le[_e]=rt,fe.setPickBase(he[rt]+1),he[rt]+=Fe;continue e}var st=s(P,j);le[_e]=Ee,G.push(st),he.push(Fe),fe.setPickBase(1),Ee+=1}for(;Ee>0&&he[Ee-1]===0;)he.pop(),G.pop().dispose()}re.update=function(lt){re._stopped||(lt=lt||{},$=!0,ie=!0)},re.add=function(lt){re._stopped||(lt.axes=U,ue.push(lt),le.push(-1),$=!0,ie=!0,Ae())},re.remove=function(lt){if(!re._stopped){var Ee=ue.indexOf(lt);Ee<0||(ue.splice(Ee,1),le.pop(),$=!0,ie=!0,Ae())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",be),m.removeEventListener("webglcontextlost",ze),re.mouseListener.enabled=!1,!re.contextLost)){U.dispose(),Q.dispose();for(var lt=0;lt<ue.length;++lt)ue[lt].dispose();F.dispose();for(var lt=0;lt<G.length;++lt)G[lt].dispose();B.dispose(),P=null,U=null,Q=null,ue=[]}},re._mouseRotating=!1,re._prevButtons=0,re.enableMouseListeners=function(){re.mouseListener=g(m,function(lt,Ee,_e){if(!re._stopped){var fe=G.length,Fe=ue.length,rt=z.object;z.distance=1/0,z.mouse[0]=Ee,z.mouse[1]=_e,z.object=null,z.screen=null,z.dataCoordinate=z.dataPosition=null;var st=!1;if(lt&&re._prevButtons)re._mouseRotating=!0;else{re._mouseRotating&&(ie=!0),re._mouseRotating=!1;for(var Qe=0;Qe<fe;++Qe){var Lt=G[Qe].query(Ee,ce[1]-_e-1,re.pickRadius);if(Lt){if(Lt.distance>z.distance)continue;for(var kt=0;kt<Fe;++kt){var Vt=ue[kt];if(le[kt]===Qe){var Zt=Vt.pick(Lt);Zt&&(z.buttons=lt,z.screen=Lt.coord,z.distance=Lt.distance,z.object=Vt,z.index=Zt.distance,z.dataPosition=Zt.position,z.dataCoordinate=Zt.dataCoordinate,z.data=Zt,st=!0)}}}}}rt&&rt!==z.object&&(rt.highlight&&rt.highlight(null),$=!0),z.object&&(z.object.highlight&&z.object.highlight(z.data),$=!0),st=st||z.object!==rt,st&&re.onselect&&re.onselect(z),lt&1&&!(re._prevButtons&1)&&re.onclick&&re.onclick(z),re._prevButtons=lt}})};function ze(){if(re.contextLost)return!0;P.isContextLost()&&(re.contextLost=!0,re.mouseListener.enabled=!1,re.selection.object=null,re.oncontextloss&&re.oncontextloss())}m.addEventListener("webglcontextlost",ze);function Re(){if(!ze()){P.colorMask(!0,!0,!0,!0),P.depthMask(!0),P.disable(P.BLEND),P.enable(P.DEPTH_TEST),P.depthFunc(P.LEQUAL);for(var lt=ue.length,Ee=G.length,_e=0;_e<Ee;++_e){var fe=G[_e];fe.shape=ce,fe.begin();for(var Fe=0;Fe<lt;++Fe)if(le[Fe]===_e){var rt=ue[Fe];rt.drawPick&&(rt.pixelRatio=1,rt.drawPick(oe))}fe.end()}}}var Xe=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],it=[Xe[0].slice(),Xe[1].slice()];function ot(){if(!ze()){be();var lt=re.camera.tick();oe.view=re.camera.matrix,$=$||lt,ie=ie||lt,U.pixelRatio=re.pixelRatio,Q.pixelRatio=re.pixelRatio;var Ee=ue.length,_e=Xe[0],fe=Xe[1];_e[0]=_e[1]=_e[2]=1/0,fe[0]=fe[1]=fe[2]=-1/0;for(var Fe=0;Fe<Ee;++Fe){var rt=ue[Fe];rt.pixelRatio=re.pixelRatio,rt.axes=re.axes,$=$||!!rt.dirty,ie=ie||!!rt.dirty;var st=rt.bounds;if(st)for(var Qe=st[0],Lt=st[1],kt=0;kt<3;++kt)_e[kt]=Math.min(_e[kt],Qe[kt]),fe[kt]=Math.max(fe[kt],Lt[kt])}var Vt=re.bounds;if(re.autoBounds)for(var kt=0;kt<3;++kt){if(fe[kt]<_e[kt])_e[kt]=-1,fe[kt]=1;else{_e[kt]===fe[kt]&&(_e[kt]-=1,fe[kt]+=1);var Zt=.05*(fe[kt]-_e[kt]);_e[kt]=_e[kt]-Zt,fe[kt]=fe[kt]+Zt}Vt[0][kt]=_e[kt],Vt[1][kt]=fe[kt]}for(var Sr=!1,kt=0;kt<3;++kt)Sr=Sr||it[0][kt]!==Vt[0][kt]||it[1][kt]!==Vt[1][kt],it[0][kt]=Vt[0][kt],it[1][kt]=Vt[1][kt];if(ie=ie||Sr,$=$||Sr,!!$){if(Sr){for(var xr=[0,0,0],Fe=0;Fe<3;++Fe)xr[Fe]=E((Vt[1][Fe]-Vt[0][Fe])/10);U.autoTicks?U.update({bounds:Vt,tickSpacing:xr}):U.update({bounds:Vt})}var jr=P.drawingBufferWidth,wr=P.drawingBufferHeight;j[0]=jr,j[1]=wr,ce[0]=Math.max(jr/re.pixelRatio,1)|0,ce[1]=Math.max(wr/re.pixelRatio,1)|0,p(re,O);for(var Fe=0;Fe<Ee;++Fe){var rt=ue[Fe];rt.axesBounds=Vt,re.clipToBounds&&(rt.clipBounds=Vt)}z.object&&(re.snapToData?Q.position=z.dataCoordinate:Q.position=z.dataPosition,Q.bounds=Vt),ie&&(ie=!1,Re()),re.axesPixels=i(re.axes,oe,jr,wr),re.onrender&&re.onrender(),P.bindFramebuffer(P.FRAMEBUFFER,null),P.viewport(0,0,jr,wr),re.clearRGBA(),P.depthMask(!0),P.colorMask(!0,!0,!0,!0),P.enable(P.DEPTH_TEST),P.depthFunc(P.LEQUAL),P.disable(P.BLEND),P.disable(P.CULL_FACE);var Ir=!1;U.enable&&(Ir=Ir||U.isTransparent(),U.draw(oe)),Q.axes=U,z.object&&Q.draw(oe),P.disable(P.CULL_FACE);for(var Fe=0;Fe<Ee;++Fe){var rt=ue[Fe];rt.axes=U,rt.pixelRatio=re.pixelRatio,rt.isOpaque&&rt.isOpaque()&&rt.draw(oe),rt.isTransparent&&rt.isTransparent()&&(Ir=!0)}if(Ir){F.shape=j,F.bind(),P.clear(P.DEPTH_BUFFER_BIT),P.colorMask(!1,!1,!1,!1),P.depthMask(!0),P.depthFunc(P.LESS),U.enable&&U.isTransparent()&&U.drawTransparent(oe);for(var Fe=0;Fe<Ee;++Fe){var rt=ue[Fe];rt.isOpaque&&rt.isOpaque()&&rt.draw(oe)}P.enable(P.BLEND),P.blendEquation(P.FUNC_ADD),P.blendFunc(P.ONE,P.ONE_MINUS_SRC_ALPHA),P.colorMask(!0,!0,!0,!0),P.depthMask(!1),P.clearColor(0,0,0,0),P.clear(P.COLOR_BUFFER_BIT),U.isTransparent()&&U.drawTransparent(oe);for(var Fe=0;Fe<Ee;++Fe){var rt=ue[Fe];rt.isTransparent&&rt.isTransparent()&&rt.drawTransparent(oe)}P.bindFramebuffer(P.FRAMEBUFFER,null),P.blendFunc(P.ONE,P.ONE_MINUS_SRC_ALPHA),P.disable(P.DEPTH_TEST),B.bind(),F.color[0].bind(0),B.uniforms.accumBuffer=0,f(P),P.disable(P.BLEND)}$=!1;for(var Fe=0;Fe<Ee;++Fe)ue[Fe].dirty=!1}}}function tt(){re._stopped||re.contextLost||(ot(),requestAnimationFrame(tt))}return re.enableMouseListeners(),tt(),re.redraw=function(){re._stopped||($=!0,ot())},re}function p(u,m){var h=u.bounds,P=u.cameraParams,L=P.projection,z=P.model,F=u.gl.drawingBufferWidth,B=u.gl.drawingBufferHeight,O=u.zNear,I=u.zFar,N=u.fovy,U=F/B;m?(T(L,-U,U,-1,1,O,I),P._ortho=!0):(v(L,N,U,O,I),P._ortho=!1);for(var W=0;W<16;++W)z[W]=0;z[15]=1;for(var Q=0,W=0;W<3;++W)Q=Math.max(Q,h[1][W]-h[0][W]);for(var W=0;W<3;++W)u.autoScale?z[5*W]=u.aspect[W]/(h[1][W]-h[0][W]):z[5*W]=1/Q,u.autoCenter&&(z[12+W]=-z[5*W]*.5*(h[0][W]+h[1][W]))}},783:function(e){e.exports=t;function t(r,o,a,i){var n=o[0],s=o[1],c=o[2],f=o[3],g=a[0],v=a[1],T=a[2],l=a[3],_,w,S,E,y;return w=n*g+s*v+c*T+f*l,w<0&&(w=-w,g=-g,v=-v,T=-T,l=-l),1-w>1e-6?(_=Math.acos(w),S=Math.sin(_),E=Math.sin((1-i)*_)/S,y=Math.sin(i*_)/S):(E=1-i,y=i),r[0]=E*n+y*g,r[1]=E*s+y*v,r[2]=E*c+y*T,r[3]=E*f+y*l,r}},5964:function(e){"use strict";e.exports=function(t){return!t&&t!==0?"":t.toString()}},9366:function(e,t,r){"use strict";var o=r(4359);e.exports=i;var a={};function i(n,s,c){var f=[s.style,s.weight,s.variant,s.family].join("_"),g=a[f];if(g||(g=a[f]={}),n in g)return g[n];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var T=o(n,v);v.triangles=!1;var l=o(n,v),_,w;if(c&&c!==1){for(_=0;_<T.positions.length;++_)for(w=0;w<T.positions[_].length;++w)T.positions[_][w]/=c;for(_=0;_<l.positions.length;++_)for(w=0;w<l.positions[_].length;++w)l.positions[_][w]/=c}var S=[[1/0,1/0],[-1/0,-1/0]],E=l.positions.length;for(_=0;_<E;++_){var y=l.positions[_];for(w=0;w<2;++w)S[0][w]=Math.min(S[0][w],y[w]),S[1][w]=Math.max(S[1][w],y[w])}return g[n]=[T,l,S]}},1283:function(e,t,r){var o=r(9405),a=r(3236),i=a([`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;
}
}`]),n=a([`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;
}
}`]),s=a([`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;
}
}
`]),c=a([`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;
}
`]),f=a([`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);
}`]),g=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:i,fragment:c,attributes:g},T={vertex:n,fragment:c,attributes:g},l={vertex:s,fragment:c,attributes:g},_={vertex:i,fragment:f,attributes:g},w={vertex:n,fragment:f,attributes:g},S={vertex:s,fragment:f,attributes:g};function E(y,b){var p=o(y,b),u=p.attributes;return u.position.location=0,u.color.location=1,u.glyph.location=2,u.id.location=3,p}t.createPerspective=function(y){return E(y,v)},t.createOrtho=function(y){return E(y,T)},t.createProject=function(y){return E(y,l)},t.createPickPerspective=function(y){return E(y,_)},t.createPickOrtho=function(y){return E(y,w)},t.createPickProject=function(y){return E(y,S)}},8418:function(e,t,r){"use strict";var o=r(5219),a=r(2762),i=r(8116),n=r(1888),s=r(6760),c=r(1283),f=r(9366),g=r(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=ArrayBuffer,l=DataView;function _(X){return T.isView(X)&&!(X instanceof l)}function w(X){return Array.isArray(X)||_(X)}e.exports=J;function S(X,oe){var ie=X[0],j=X[1],ee=X[2],re=X[3];return X[0]=oe[0]*ie+oe[4]*j+oe[8]*ee+oe[12]*re,X[1]=oe[1]*ie+oe[5]*j+oe[9]*ee+oe[13]*re,X[2]=oe[2]*ie+oe[6]*j+oe[10]*ee+oe[14]*re,X[3]=oe[3]*ie+oe[7]*j+oe[11]*ee+oe[15]*re,X}function E(X,oe,ie,j){return S(j,j,ie),S(j,j,oe),S(j,j,X)}function y(X,oe){this.index=X,this.dataCoordinate=this.position=oe}function b(X){return X===!0||X>1?1:X}function p(X,oe,ie,j,ee,re,ce,be,Ae,ze,Re,Xe){this.gl=X,this.pixelRatio=1,this.shader=oe,this.orthoShader=ie,this.projectShader=j,this.pointBuffer=ee,this.colorBuffer=re,this.glyphBuffer=ce,this.idBuffer=be,this.vao=Ae,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=ze,this.pickOrthoShader=Re,this.pickProjectShader=Xe,this.points=[],this._selectResult=new y(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 u=p.prototype;u.pickSlots=1,u.setPickBase=function(X){this.pickId=X},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var X=0;X<3;++X)if(this.axesProject[X]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var X=0;X<3;++X)if(this.axesProject[X]&&!this.projectHasAlpha)return!0;return!1};var m=[0,0],h=[0,0,0],P=[0,0,0],L=[0,0,0,1],z=[0,0,0,1],F=v.slice(),B=[0,0,0],O=[[0,0,0],[0,0,0]];function I(X){return X[0]=X[1]=X[2]=0,X}function N(X,oe){return X[0]=oe[0],X[1]=oe[1],X[2]=oe[2],X[3]=1,X}function U(X,oe,ie,j){return X[0]=oe[0],X[1]=oe[1],X[2]=oe[2],X[ie]=j,X}function W(X){for(var oe=O,ie=0;ie<2;++ie)for(var j=0;j<3;++j)oe[ie][j]=Math.max(Math.min(X[ie][j],1e8),-1e8);return oe}function Q(X,oe,ie,j){var ee=oe.axesProject,re=oe.gl,ce=X.uniforms,be=ie.model||v,Ae=ie.view||v,ze=ie.projection||v,Re=oe.axesBounds,Xe=W(oe.clipBounds),it;oe.axes&&oe.axes.lastCubeProps?it=oe.axes.lastCubeProps.axis:it=[1,1,1],m[0]=2/re.drawingBufferWidth,m[1]=2/re.drawingBufferHeight,X.bind(),ce.view=Ae,ce.projection=ze,ce.screenSize=m,ce.highlightId=oe.highlightId,ce.highlightScale=oe.highlightScale,ce.clipBounds=Xe,ce.pickGroup=oe.pickId/255,ce.pixelRatio=j;for(var ot=0;ot<3;++ot)if(ee[ot]){ce.scale=oe.projectScale[ot],ce.opacity=oe.projectOpacity[ot];for(var tt=F,lt=0;lt<16;++lt)tt[lt]=0;for(var lt=0;lt<4;++lt)tt[5*lt]=1;tt[5*ot]=0,it[ot]<0?tt[12+ot]=Re[0][ot]:tt[12+ot]=Re[1][ot],s(tt,be,tt),ce.model=tt;var Ee=(ot+1)%3,_e=(ot+2)%3,fe=I(h),Fe=I(P);fe[Ee]=1,Fe[_e]=1;var rt=E(ze,Ae,be,N(L,fe)),st=E(ze,Ae,be,N(z,Fe));if(Math.abs(rt[1])>Math.abs(st[1])){var Qe=rt;rt=st,st=Qe,Qe=fe,fe=Fe,Fe=Qe;var Lt=Ee;Ee=_e,_e=Lt}rt[0]<0&&(fe[Ee]=-1),st[1]>0&&(Fe[_e]=-1);for(var kt=0,Vt=0,lt=0;lt<4;++lt)kt+=Math.pow(be[4*Ee+lt],2),Vt+=Math.pow(be[4*_e+lt],2);fe[Ee]/=Math.sqrt(kt),Fe[_e]/=Math.sqrt(Vt),ce.axes[0]=fe,ce.axes[1]=Fe,ce.fragClipBounds[0]=U(B,Xe[0],ot,-1e8),ce.fragClipBounds[1]=U(B,Xe[1],ot,1e8),oe.vao.bind(),oe.vao.draw(re.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(re.lineWidth(oe.lineWidth*j),oe.vao.draw(re.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}var ue=[-1e8,-1e8,-1e8],le=[1e8,1e8,1e8],he=[ue,le];function G(X,oe,ie,j,ee,re,ce){var be=ie.gl;if((re===ie.projectHasAlpha||ce)&&Q(oe,ie,j,ee),re===ie.hasAlpha||ce){X.bind();var Ae=X.uniforms;Ae.model=j.model||v,Ae.view=j.view||v,Ae.projection=j.projection||v,m[0]=2/be.drawingBufferWidth,m[1]=2/be.drawingBufferHeight,Ae.screenSize=m,Ae.highlightId=ie.highlightId,Ae.highlightScale=ie.highlightScale,Ae.fragClipBounds=he,Ae.clipBounds=ie.axes.bounds,Ae.opacity=ie.opacity,Ae.pickGroup=ie.pickId/255,Ae.pixelRatio=ee,ie.vao.bind(),ie.vao.draw(be.TRIANGLES,ie.vertexCount),ie.lineWidth>0&&(be.lineWidth(ie.lineWidth*ee),ie.vao.draw(be.LINES,ie.lineVertexCount,ie.vertexCount)),ie.vao.unbind()}}u.draw=function(X){var oe=this.useOrtho?this.orthoShader:this.shader;G(oe,this.projectShader,this,X,this.pixelRatio,!1,!1)},u.drawTransparent=function(X){var oe=this.useOrtho?this.orthoShader:this.shader;G(oe,this.projectShader,this,X,this.pixelRatio,!0,!1)},u.drawPick=function(X){var oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(oe,this.pickProjectShader,this,X,1,!0,!0)},u.pick=function(X){if(!X||X.id!==this.pickId)return null;var oe=X.value[2]+(X.value[1]<<8)+(X.value[0]<<16);if(oe>=this.pointCount||oe<0)return null;var ie=this.points[oe],j=this._selectResult;j.index=oe;for(var ee=0;ee<3;++ee)j.position[ee]=j.dataCoordinate[ee]=ie[ee];return j},u.highlight=function(X){if(!X)this.highlightId=[1,1,1,1];else{var oe=X.index,ie=oe&255,j=oe>>8&255,ee=oe>>16&255;this.highlightId=[ie/255,j/255,ee/255,0]}};function $(X,oe,ie,j){var ee;w(X)?oe<X.length?ee=X[oe]:ee=void 0:ee=X,ee=g(ee);var re=!0;o(ee)&&(ee="\u25BC",re=!1),ie||(ie={});var ce=ie.family;w(ce)&&(ce=ce[oe]),ce||(ce="normal");var be=ie.weight;w(be)&&(be=be[oe]),be||(be="normal");var Ae=ie.style;w(Ae)&&(Ae=Ae[oe]),Ae||(Ae="normal");var ze=ie.variant;w(ze)&&(ze=ze[oe]),ze||(ze="normal");var Re=f(ee,{family:ce,weight:be,style:Ae,variant:ze},j),Re=f(ee,ie,j);return{mesh:Re[0],lines:Re[1],bounds:Re[2],visible:re}}u.update=function(X){if(X=X||{},"perspective"in X&&(this.useOrtho=!X.perspective),"orthographic"in X&&(this.useOrtho=!!X.orthographic),"lineWidth"in X&&(this.lineWidth=X.lineWidth),"project"in X)if(w(X.project))this.axesProject=X.project;else{var oe=!!X.project;this.axesProject=[oe,oe,oe]}if("projectScale"in X)if(w(X.projectScale))this.projectScale=X.projectScale.slice();else{var ie=+X.projectScale;this.projectScale=[ie,ie,ie]}if(this.projectHasAlpha=!1,"projectOpacity"in X){if(w(X.projectOpacity))this.projectOpacity=X.projectOpacity.slice();else{var ie=+X.projectOpacity;this.projectOpacity=[ie,ie,ie]}for(var j=0;j<3;++j)this.projectOpacity[j]=b(this.projectOpacity[j]),this.projectOpacity[j]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in X&&(this.opacity=b(X.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var ee=X.position,re={family:X.font||"normal",style:X.fontStyle||"normal",weight:X.fontWeight||"normal",variant:X.fontVariant||"normal"},ce=X.alignment||[0,0],be,Ae;if(ce.length===2)be=ce[0],Ae=ce[1];else{be=[],Ae=[];for(var j=0;j<ce.length;++j)be[j]=ce[j][0],Ae[j]=ce[j][1]}var ze=[1/0,1/0,1/0],Re=[-1/0,-1/0,-1/0],Xe=X.glyph,it=X.color,ot=X.size,tt=X.angle,lt=X.lineColor,Ee=-1,_e=0,fe=0,Fe=0;if(ee.length){Fe=ee.length;e:for(var j=0;j<Fe;++j){for(var rt=ee[j],st=0;st<3;++st)if(isNaN(rt[st])||!isFinite(rt[st]))continue e;var Qe=$(Xe,j,re,this.pixelRatio),Lt=Qe.mesh,kt=Qe.lines,Vt=Qe.bounds;_e+=Lt.cells.length*3,fe+=kt.edges.length*2}}var Zt=_e+fe,Sr=n.mallocFloat(3*Zt),xr=n.mallocFloat(4*Zt),jr=n.mallocFloat(2*Zt),wr=n.mallocUint32(Zt);if(Zt>0){var Ir=0,bt=_e,Be=[0,0,0,1],Ke=[0,0,0,1],Ue=w(it)&&w(it[0]),Me=w(lt)&&w(lt[0]);e:for(var j=0;j<Fe;++j){Ee+=1;for(var rt=ee[j],st=0;st<3;++st){if(isNaN(rt[st])||!isFinite(rt[st]))continue e;Re[st]=Math.max(Re[st],rt[st]),ze[st]=Math.min(ze[st],rt[st])}var Qe=$(Xe,j,re,this.pixelRatio),Lt=Qe.mesh,kt=Qe.lines,Vt=Qe.bounds,qe=Qe.visible;if(!qe)Be=[1,1,1,0];else if(w(it)){var Ce;if(Ue?j<it.length?Ce=it[j]:Ce=[0,0,0,0]:Ce=it,Ce.length===3){for(var st=0;st<3;++st)Be[st]=Ce[st];Be[3]=1}else if(Ce.length===4){for(var st=0;st<4;++st)Be[st]=Ce[st];!this.hasAlpha&&Ce[3]<1&&(this.hasAlpha=!0)}}else Be[0]=Be[1]=Be[2]=0,Be[3]=1;if(!qe)Ke=[1,1,1,0];else if(w(lt)){var Ce;if(Me?j<lt.length?Ce=lt[j]:Ce=[0,0,0,0]:Ce=lt,Ce.length===3){for(var st=0;st<3;++st)Ke[st]=Ce[st];Ke[st]=1}else if(Ce.length===4){for(var st=0;st<4;++st)Ke[st]=Ce[st];!this.hasAlpha&&Ce[3]<1&&(this.hasAlpha=!0)}}else Ke[0]=Ke[1]=Ke[2]=0,Ke[3]=1;var Te=.5;qe?w(ot)?j<ot.length?Te=+ot[j]:Te=12:ot?Te=+ot:this.useOrtho&&(Te=12):Te=0;var Pe=0;w(tt)?j<tt.length?Pe=+tt[j]:Pe=0:tt&&(Pe=+tt);for(var at=Math.cos(Pe),yt=Math.sin(Pe),rt=ee[j],st=0;st<3;++st)Re[st]=Math.max(Re[st],rt[st]),ze[st]=Math.min(ze[st],rt[st]);var Tt=be,Ot=Ae,Tt=0;w(be)?j<be.length?Tt=be[j]:Tt=0:be&&(Tt=be);var Ot=0;w(Ae)?j<Ae.length?Ot=Ae[j]:Ot=0:Ae&&(Ot=Ae),Tt*=Tt>0?1-Vt[0][0]:Tt<0?1+Vt[1][0]:1,Ot*=Ot>0?1-Vt[0][1]:Ot<0?1+Vt[1][1]:1;for(var Gt=[Tt,Ot],Ua=Lt.cells||[],Ba=Lt.positions||[],st=0;st<Ua.length;++st)for(var rr=Ua[st],Qt=0;Qt<3;++Qt){for(var Tr=0;Tr<3;++Tr)Sr[3*Ir+Tr]=rt[Tr];for(var Tr=0;Tr<4;++Tr)xr[4*Ir+Tr]=Be[Tr];wr[Ir]=Ee;var la=Ba[rr[Qt]];jr[2*Ir]=Te*(at*la[0]-yt*la[1]+Gt[0]),jr[2*Ir+1]=Te*(yt*la[0]+at*la[1]+Gt[1]),Ir+=1}for(var Ua=kt.edges,Ba=kt.positions,st=0;st<Ua.length;++st)for(var rr=Ua[st],Qt=0;Qt<2;++Qt){for(var Tr=0;Tr<3;++Tr)Sr[3*bt+Tr]=rt[Tr];for(var Tr=0;Tr<4;++Tr)xr[4*bt+Tr]=Ke[Tr];wr[bt]=Ee;var la=Ba[rr[Qt]];jr[2*bt]=Te*(at*la[0]-yt*la[1]+Gt[0]),jr[2*bt+1]=Te*(yt*la[0]+at*la[1]+Gt[1]),bt+=1}}}this.bounds=[ze,Re],this.points=ee,this.pointCount=ee.length,this.vertexCount=_e,this.lineVertexCount=fe,this.pointBuffer.update(Sr),this.colorBuffer.update(xr),this.glyphBuffer.update(jr),this.idBuffer.update(wr),n.free(Sr),n.free(xr),n.free(jr),n.free(wr)},u.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 J(X){var oe=X.gl,ie=c.createPerspective(oe),j=c.createOrtho(oe),ee=c.createProject(oe),re=c.createPickPerspective(oe),ce=c.createPickOrtho(oe),be=c.createPickProject(oe),Ae=a(oe),ze=a(oe),Re=a(oe),Xe=a(oe),it=i(oe,[{buffer:Ae,size:3,type:oe.FLOAT},{buffer:ze,size:4,type:oe.FLOAT},{buffer:Re,size:2,type:oe.FLOAT},{buffer:Xe,size:4,type:oe.UNSIGNED_BYTE,normalized:!0}]),ot=new p(oe,ie,j,ee,Ae,ze,Re,Xe,it,re,ce,be);return ot.update(X),ot}},3589:function(e,t,r){"use strict";e.exports=v;var o=r(2260),a=r(1888),i=r(9618),n=r(8828).nextPow2,s=function(T,l,_){for(var w=1e8,S=-1,E=-1,y=T.shape[0],b=T.shape[1],p=0;p<y;p++)for(var u=0;u<b;u++){var m=T.get(p,u,0),h=T.get(p,u,1),P=T.get(p,u,2),L=T.get(p,u,3);if(m<255||h<255||P<255||L<255){var z=l-p,F=_-u,B=z*z+F*F;B<w&&(w=B,S=p,E=u)}}return[S,E,w]};function c(T,l,_,w,S){this.coord=[T,l],this.id=_,this.value=w,this.distance=S}function f(T,l,_){this.gl=T,this.fbo=l,this.buffer=_,this._readTimeout=null;var w=this;this._readCallback=function(){w.gl&&(l.bind(),T.readPixels(0,0,l.shape[0],l.shape[1],T.RGBA,T.UNSIGNED_BYTE,w.buffer),w._readTimeout=null)}}var g=f.prototype;Object.defineProperty(g,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(T){if(this.gl){this.fbo.shape=T;var l=this.fbo.shape[0],_=this.fbo.shape[1];if(_*l*4>this.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(n(_*l*4)),S=0;S<_*l*4;++S)w[S]=255}return T}}}),g.begin=function(){var T=this.gl,l=this.shape;T&&(this.fbo.bind(),T.clearColor(1,1,1,1),T.clear(T.COLOR_BUFFER_BIT|T.DEPTH_BUFFER_BIT))},g.end=function(){var T=this.gl;T&&(T.bindFramebuffer(T.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},g.query=function(T,l,_){if(!this.gl)return null;var w=this.fbo.shape.slice();T=T|0,l=l|0,typeof _!="number"&&(_=1);var S=Math.min(Math.max(T-_,0),w[0])|0,E=Math.min(Math.max(T+_,0),w[0])|0,y=Math.min(Math.max(l-_,0),w[1])|0,b=Math.min(Math.max(l+_,0),w[1])|0;if(E<=S||b<=y)return null;var p=[E-S,b-y],u=i(this.buffer,[p[0],p[1],4],[4,w[0]*4,1],4*(S+w[0]*y)),m=s(u.hi(p[0],p[1],1),_,_),h=m[0],P=m[1];if(h<0||Math.pow(this.radius,2)<m[2])return null;var L=u.get(h,P,0),z=u.get(h,P,1),F=u.get(h,P,2),B=u.get(h,P,3);return new c(h+S|0,P+y|0,L,[z,F,B],Math.sqrt(m[2]))},g.dispose=function(){this.gl&&(this.fbo.dispose(),a.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function v(T,l){var _=l[0],w=l[1],S={},E=o(T,_,w,S),y=a.mallocUint8(_*w*4);return new f(T,E,y)}},9405:function(e,t,r){"use strict";var o=r(3327),a=r(8731),i=r(216),n=r(5091),s=r(2145),c=r(8866);function f(l){this.gl=l,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var g=f.prototype;g.bind=function(){this.program||this._relink();var l,_=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),w=this.gl.lastAttribCount;if(_>w)for(l=w;l<_;l++)this.gl.enableVertexAttribArray(l);else if(w>_)for(l=_;l<w;l++)this.gl.disableVertexAttribArray(l);this.gl.lastAttribCount=_,this.gl.useProgram(this.program)},g.dispose=function(){for(var l=this.gl.lastAttribCount,_=0;_<l;_++)this.gl.disableVertexAttribArray(_);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 v(l,_){return l.name<_.name?-1:1}g.update=function(l,_,w,S){if(!_||arguments.length===1){var E=l;l=E.vertex,_=E.fragment,w=E.uniforms,S=E.attributes}var y=this,b=y.gl,p=y._vref;y._vref=n.shader(b,b.VERTEX_SHADER,l),p&&p.dispose(),y.vertShader=y._vref.shader;var u=this._fref;if(y._fref=n.shader(b,b.FRAGMENT_SHADER,_),u&&u.dispose(),y.fragShader=y._fref.shader,!w||!S){var m=b.createProgram();if(b.attachShader(m,y.fragShader),b.attachShader(m,y.vertShader),b.linkProgram(m),!b.getProgramParameter(m,b.LINK_STATUS)){var h=b.getProgramInfoLog(m);throw new c(h,"Error linking program:"+h)}w=w||s.uniforms(b,m),S=S||s.attributes(b,m),b.deleteProgram(m)}S=S.slice(),S.sort(v);var P=[],L=[],z=[],F;for(F=0;F<S.length;++F){var B=S[F];if(B.type.indexOf("mat")>=0){for(var O=B.type.charAt(B.type.length-1)|0,I=new Array(O),N=0;N<O;++N)I[N]=z.length,L.push(B.name+"["+N+"]"),typeof B.location=="number"?z.push(B.location+N):Array.isArray(B.location)&&B.location.length===O&&typeof B.location[N]=="number"?z.push(B.location[N]|0):z.push(-1);P.push({name:B.name,type:B.type,locations:I})}else P.push({name:B.name,type:B.type,locations:[z.length]}),L.push(B.name),typeof B.location=="number"?z.push(B.location|0):z.push(-1)}var U=0;for(F=0;F<z.length;++F)if(z[F]<0){for(;z.indexOf(U)>=0;)U+=1;z[F]=U}var W=new Array(w.length);function Q(){y.program=n.program(b,y._vref,y._fref,L,z);for(var ue=0;ue<w.length;++ue)W[ue]=b.getUniformLocation(y.program,w[ue].name)}Q(),y._relink=Q,y.types={uniforms:i(w),attributes:i(S)},y.attributes=a(b,y,P,z),Object.defineProperty(y,"uniforms",o(b,y,w,W))};function T(l,_,w,S,E){var y=new f(l);return y.update(_,w,S,E),y}e.exports=T},8866:function(e){function t(r,o,a){this.shortMessage=o||"",this.longMessage=a||"",this.rawError=r||"",this.message="gl-shader: "+(o||r||"")+(a?`
`+a:""),this.stack=new Error().stack}t.prototype=new Error,t.prototype.name="GLError",t.prototype.constructor=t,e.exports=t},8731:function(e,t,r){"use strict";e.exports=f;var o=r(8866);function a(g,v,T,l,_,w){this._gl=g,this._wrapper=v,this._index=T,this._locations=l,this._dimension=_,this._constFunc=w}var i=a.prototype;i.pointer=function(v,T,l,_){var w=this,S=w._gl,E=w._locations[w._index];S.vertexAttribPointer(E,w._dimension,v||S.FLOAT,!!T,l||0,_||0),S.enableVertexAttribArray(E)},i.set=function(g,v,T,l){return this._constFunc(this._locations[this._index],g,v,T,l)},Object.defineProperty(i,"location",{get:function(){return this._locations[this._index]},set:function(g){return g!==this._locations[this._index]&&(this._locations[this._index]=g|0,this._wrapper.program=null),g|0}});var n=[function(g,v,T){return T.length===void 0?g.vertexAttrib1f(v,T):g.vertexAttrib1fv(v,T)},function(g,v,T,l){return T.length===void 0?g.vertexAttrib2f(v,T,l):g.vertexAttrib2fv(v,T)},function(g,v,T,l,_){return T.length===void 0?g.vertexAttrib3f(v,T,l,_):g.vertexAttrib3fv(v,T)},function(g,v,T,l,_,w){return T.length===void 0?g.vertexAttrib4f(v,T,l,_,w):g.vertexAttrib4fv(v,T)}];function s(g,v,T,l,_,w,S){var E=n[_],y=new a(g,v,T,l,_,E);Object.defineProperty(w,S,{set:function(b){return g.disableVertexAttribArray(l[T]),E(g,l[T],b),b},get:function(){return y},enumerable:!0})}function c(g,v,T,l,_,w,S){for(var E=new Array(_),y=new Array(_),b=0;b<_;++b)s(g,v,T[b],l,_,E,b),y[b]=E[b];Object.defineProperty(E,"location",{set:function(m){if(Array.isArray(m))for(var h=0;h<_;++h)y[h].location=m[h];else for(var h=0;h<_;++h)y[h].location=m+h;return m},get:function(){for(var m=new Array(_),h=0;h<_;++h)m[h]=l[T[h]];return m},enumerable:!0}),E.pointer=function(m,h,P,L){m=m||g.FLOAT,h=!!h,P=P||_*_,L=L||0;for(var z=0;z<_;++z){var F=l[T[z]];g.vertexAttribPointer(F,_,m,h,P,L+z*_),g.enableVertexAttribArray(F)}};var p=new Array(_),u=g["vertexAttrib"+_+"fv"];Object.defineProperty(w,S,{set:function(m){for(var h=0;h<_;++h){var P=l[T[h]];if(g.disableVertexAttribArray(P),Array.isArray(m[0]))u.call(g,P,m[h]);else{for(var L=0;L<_;++L)p[L]=m[_*h+L];u.call(g,P,p)}}return m},get:function(){return E},enumerable:!0})}function f(g,v,T,l){for(var _={},w=0,S=T.length;w<S;++w){var E=T[w],y=E.name,b=E.type,p=E.locations;switch(b){case"bool":case"int":case"float":s(g,v,p[0],l,1,_,y);break;default:if(b.indexOf("vec")>=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+y+": "+b);s(g,v,p[0],l,u,_,y)}else if(b.indexOf("mat")>=0){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new o("","Invalid data type for attribute "+y+": "+b);c(g,v,p,l,u,_,y)}else throw new o("","Unknown data type for attribute "+y+": "+b);break}}return _}},3327:function(e,t,r){"use strict";var o=r(216),a=r(8866);e.exports=s;function i(c){return function(){return c}}function n(c,f){for(var g=new Array(c),v=0;v<c;++v)g[v]=f;return g}function s(c,f,g,v){function T(b){return function(p,u,m){return p.getUniform(u.program,m[b])}}function l(b){return function(u){for(var m=_("",b),h=0;h<m.length;++h){var P=m[h],L=P[0],z=P[1];if(v[z]){var F=u;if(typeof L=="string"&&(L.indexOf(".")===0||L.indexOf("[")===0)){var B=L;if(L.indexOf(".")===0&&(B=L.slice(1)),B.indexOf("]")===B.length-1){var O=B.indexOf("["),I=B.slice(0,O),N=B.slice(O+1,B.length-1);F=I?u[I][N]:u[N]}else F=u[B]}var U=g[z].type,W;switch(U){case"bool":case"int":case"sampler2D":case"samplerCube":c.uniform1i(v[z],F);break;case"float":c.uniform1f(v[z],F);break;default:var Q=U.indexOf("vec");if(0<=Q&&Q<=1&&U.length===4+Q){if(W=U.charCodeAt(U.length-1)-48,W<2||W>4)throw new a("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+W+"iv"](v[z],F);break;case"v":c["uniform"+W+"fv"](v[z],F);break;default:throw new a("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if(W=U.charCodeAt(U.length-1)-48,W<2||W>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+W+"fv"](v[z],!1,F);break}else throw new a("","Unknown uniform data type for "+name+": "+U)}}}}}function _(b,p){if(typeof p!="object")return[[b,p]];var u=[];for(var m in p){var h=p[m],P=b;parseInt(m)+""===m?P+="["+m+"]":P+="."+m,typeof h=="object"?u.push.apply(u,_(P,h)):u.push([P,h])}return u}function w(b){switch(b){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var p=b.indexOf("vec");if(0<=p&&p<=1&&b.length===4+p){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type");return b.charAt(0)==="b"?n(u,!1):n(u,0)}else if(b.indexOf("mat")===0&&b.length===4){var u=b.charCodeAt(b.length-1)-48;if(u<2||u>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+b);return n(u*u,0)}else throw new a("","Unknown uniform data type for "+name+": "+b)}}function S(b,p,u){if(typeof u=="object"){var m=E(u);Object.defineProperty(b,p,{get:i(m),set:l(u),enumerable:!0,configurable:!1})}else v[u]?Object.defineProperty(b,p,{get:T(u),set:l(u),enumerable:!0,configurable:!1}):b[p]=w(g[u].type)}function E(b){var p;if(Array.isArray(b)){p=new Array(b.length);for(var u=0;u<b.length;++u)S(p,u,b[u])}else{p={};for(var m in b)S(p,m,b[m])}return p}var y=o(g,!0);return{get:i(E(y)),set:l(y),enumerable:!0,configurable:!0}}},216:function(e){"use strict";e.exports=t;function t(r,o){for(var a={},i=0;i<r.length;++i)for(var n=r[i].name,s=n.split("."),c=a,f=0;f<s.length;++f){var g=s[f].split("[");if(g.length>1){g[0]in c||(c[g[0]]=[]),c=c[g[0]];for(var v=1;v<g.length;++v){var T=parseInt(g[v]);v<g.length-1||f<s.length-1?(T in c||(v<g.length-1?c[T]=[]:c[T]={}),c=c[T]):o?c[T]=i:c[T]=r[i].type}}else f<s.length-1?(g[0]in c||(c[g[0]]={}),c=c[g[0]]):o?c[g[0]]=i:c[g[0]]=r[i].type}return a}},2145:function(e,t){"use strict";t.uniforms=i,t.attributes=n;var r={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"},o=null;function a(s,c){if(!o){var f=Object.keys(r);o={};for(var g=0;g<f.length;++g){var v=f[g];o[s[v]]=r[v]}}return o[c]}function i(s,c){for(var f=s.getProgramParameter(c,s.ACTIVE_UNIFORMS),g=[],v=0;v<f;++v){var T=s.getActiveUniform(c,v);if(T){var l=a(s,T.type);if(T.size>1)for(var _=0;_<T.size;++_)g.push({name:T.name.replace("[0]","["+_+"]"),type:l});else g.push({name:T.name,type:l})}}return g}function n(s,c){for(var f=s.getProgramParameter(c,s.ACTIVE_ATTRIBUTES),g=[],v=0;v<f;++v){var T=s.getActiveAttrib(c,v);T&&g.push({name:T.name,type:a(s,T.type)})}return g}},5091:function(e,t,r){"use strict";t.shader=_,t.program=w;var o=r(8866),a=r(2992),i=typeof WeakMap>"u"?r(606):WeakMap,n=new i,s=0;function c(S,E,y,b,p,u,m){this.id=S,this.src=E,this.type=y,this.shader=b,this.count=u,this.programs=[],this.cache=m}c.prototype.dispose=function(){if(--this.count===0){for(var S=this.cache,E=S.gl,y=this.programs,b=0,p=y.length;b<p;++b){var u=S.programs[y[b]];u&&(delete S.programs[b],E.deleteProgram(u))}E.deleteShader(this.shader),delete S.shaders[this.type===E.FRAGMENT_SHADER|0][this.src]}};function f(S){this.gl=S,this.shaders=[{},{}],this.programs={}}var g=f.prototype;function v(S,E,y){var b=S.createShader(E);if(S.shaderSource(b,y),S.compileShader(b),!S.getShaderParameter(b,S.COMPILE_STATUS)){var p=S.getShaderInfoLog(b);try{var u=a(p,y,E)}catch(m){throw console.warn("Failed to format compiler error: "+m),new o(p,`Error compiling shader:
`+p)}throw new o(p,u.short,u.long)}return b}g.getShaderReference=function(S,E){var y=this.gl,b=this.shaders[S===y.FRAGMENT_SHADER|0],p=b[E];if(!p||!y.isShader(p.shader)){var u=v(y,S,E);p=b[E]=new c(s++,E,S,u,[],1,this)}else p.count+=1;return p};function T(S,E,y,b,p){var u=S.createProgram();S.attachShader(u,E),S.attachShader(u,y);for(var m=0;m<b.length;++m)S.bindAttribLocation(u,p[m],b[m]);if(S.linkProgram(u),!S.getProgramParameter(u,S.LINK_STATUS)){var h=S.getProgramInfoLog(u);throw new o(h,"Error linking program: "+h)}return u}g.getProgram=function(S,E,y,b){var p=[S.id,E.id,y.join(":"),b.join(":")].join("@"),u=this.programs[p];return(!u||!this.gl.isProgram(u))&&(this.programs[p]=u=T(this.gl,S.shader,E.shader,y,b),S.programs.push(p),E.programs.push(p)),u};function l(S){var E=n.get(S);return E||(E=new f(S),n.set(S,E)),E}function _(S,E,y){return l(S).getShaderReference(E,y)}function w(S,E,y,b,p){return l(S).getProgram(E,y,b,p)}},1493:function(e,t,r){"use strict";var o=r(3236),a=r(9405),i=o([`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];
}
`]),n=o([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}`]);e.exports=function(s){return a(s,i,n,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},4449:function(e,t,r){"use strict";var o=r(2762),a=r(8116),i=r(1493);e.exports=T;var n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(l,_,w,S){this.gl=l,this.buffer=_,this.vao=w,this.shader=S,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 c=s.prototype,f=[0,0,0],g=[0,0,0],v=[0,0];c.isTransparent=function(){return!1},c.drawTransparent=function(l){},c.draw=function(l){var _=this.gl,w=this.vao,S=this.shader;w.bind(),S.bind();var E=l.model||n,y=l.view||n,b=l.projection||n,p;this.axes&&(p=this.axes.lastCubeProps.axis);for(var u=f,m=g,h=0;h<3;++h)p&&p[h]<0?(u[h]=this.bounds[0][h],m[h]=this.bounds[1][h]):(u[h]=this.bounds[1][h],m[h]=this.bounds[0][h]);v[0]=_.drawingBufferWidth,v[1]=_.drawingBufferHeight,S.uniforms.model=E,S.uniforms.view=y,S.uniforms.projection=b,S.uniforms.coordinates=[this.position,u,m],S.uniforms.colors=this.colors,S.uniforms.screenShape=v;for(var h=0;h<3;++h)S.uniforms.lineWidth=this.lineWidth[h]*this.pixelRatio,this.enabled[h]&&(w.draw(_.TRIANGLES,6,6*h),this.drawSides[h]&&w.draw(_.TRIANGLES,12,18+12*h));w.unbind()},c.update=function(l){l&&("bounds"in l&&(this.bounds=l.bounds),"position"in l&&(this.position=l.position),"lineWidth"in l&&(this.lineWidth=l.lineWidth),"colors"in l&&(this.colors=l.colors),"enabled"in l&&(this.enabled=l.enabled),"drawSides"in l&&(this.drawSides=l.drawSides))},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function T(l,_){var w=[];function S(u,m,h,P,L,z){var F=[u,m,h,0,0,0,1];F[P+3]=1,F[P]=L,w.push.apply(w,F),F[6]=-1,w.push.apply(w,F),F[P]=z,w.push.apply(w,F),w.push.apply(w,F),F[6]=1,w.push.apply(w,F),F[P]=L,w.push.apply(w,F)}S(0,0,0,0,0,1),S(0,0,0,1,0,1),S(0,0,0,2,0,1),S(1,0,0,1,-1,1),S(1,0,0,2,-1,1),S(0,1,0,0,-1,1),S(0,1,0,2,-1,1),S(0,0,1,0,-1,1),S(0,0,1,1,-1,1);var E=o(l,w),y=a(l,[{type:l.FLOAT,buffer:E,size:3,offset:0,stride:28},{type:l.FLOAT,buffer:E,size:3,offset:12,stride:28},{type:l.FLOAT,buffer:E,size:1,offset:24,stride:28}]),b=i(l);b.attributes.position.location=0,b.attributes.color.location=1,b.attributes.weight.location=2;var p=new s(l,E,y,b);return p.update(_),p}},6740:function(e,t,r){var o=r(3236),a=o([`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;
}
`]),i=o([`#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;
}
`]),n=o([`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;
}
`]),s=o([`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);
}`]);t.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:n,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){"use strict";var o=r(2931),a=r(9970),i=["xyz","xzy","yxz","yzx","zxy","zyx"],n=function(S,E,y,b){for(var p=S.points,u=S.velocities,m=S.divergences,h=[],P=[],L=[],z=[],F=[],B=[],O=0,I=0,N=a.create(),U=a.create(),W=8,Q=0;Q<p.length;Q++){var ue=p[Q],le=u[Q],he=m[Q];E===0&&(he=y*.05),I=o.length(le)/b,N=a.create(),o.copy(N,le),N[3]=he;for(var G=0;G<W;G++)F[G]=[ue[0],ue[1],ue[2],G];if(z.length>0)for(var G=0;G<W;G++){var $=(G+1)%W;h.push(z[G],F[G],F[$],F[$],z[$],z[G]),L.push(U,N,N,N,U,U),B.push(O,I,I,I,O,O);var J=h.length;P.push([J-6,J-5,J-4],[J-3,J-2,J-1])}var X=z;z=F,F=X;var oe=U;U=N,N=oe;var ie=O;O=I,I=ie}return{positions:h,cells:P,vectors:L,vertexIntensity:B}},s=function(S,E,y,b){for(var p=0,u=0;u<S.length;u++)for(var m=S[u].velocities,h=0;h<m.length;h++)p=Math.max(p,o.length(m[h]));for(var P=S.map(function(Q){return n(Q,y,b,p)}),L=[],z=[],F=[],B=[],u=0;u<P.length;u++){var O=P[u],I=L.length;L=L.concat(O.positions),F=F.concat(O.vectors),B=B.concat(O.vertexIntensity);for(var h=0;h<O.cells.length;h++){var N=O.cells[h],U=[];z.push(U);for(var W=0;W<N.length;W++)U.push(N[W]+I)}}return{positions:L,cells:z,vectors:F,vertexIntensity:B,colormap:E}},c=function(S,E){var y=S.length,b;for(b=0;b<y;b++){var p=S[b];if(p===E)return b;if(p>E)return b-1}return b},f=function(S,E,y){return S<E?E:S>y?y:S},g=function(S,E,y){var b=E.vectors,p=E.meshgrid,u=S[0],m=S[1],h=S[2],P=p[0].length,L=p[1].length,z=p[2].length,F=c(p[0],u),B=c(p[1],m),O=c(p[2],h),I=F+1,N=B+1,U=O+1;if(F=f(F,0,P-1),I=f(I,0,P-1),B=f(B,0,L-1),N=f(N,0,L-1),O=f(O,0,z-1),U=f(U,0,z-1),F<0||B<0||O<0||I>P-1||N>L-1||U>z-1)return o.create();var W=p[0][F],Q=p[0][I],ue=p[1][B],le=p[1][N],he=p[2][O],G=p[2][U],$=(u-W)/(Q-W),J=(m-ue)/(le-ue),X=(h-he)/(G-he);isFinite($)||($=.5),isFinite(J)||(J=.5),isFinite(X)||(X=.5);var oe,ie,j,ee,re,ce;switch(y.reversedX&&(F=P-1-F,I=P-1-I),y.reversedY&&(B=L-1-B,N=L-1-N),y.reversedZ&&(O=z-1-O,U=z-1-U),y.filled){case 5:re=O,ce=U,j=B*z,ee=N*z,oe=F*z*L,ie=I*z*L;break;case 4:re=O,ce=U,oe=F*z,ie=I*z,j=B*z*P,ee=N*z*P;break;case 3:j=B,ee=N,re=O*L,ce=U*L,oe=F*L*z,ie=I*L*z;break;case 2:j=B,ee=N,oe=F*L,ie=I*L,re=O*L*P,ce=U*L*P;break;case 1:oe=F,ie=I,re=O*P,ce=U*P,j=B*P*z,ee=N*P*z;break;default:oe=F,ie=I,j=B*P,ee=N*P,re=O*P*L,ce=U*P*L;break}var be=b[oe+j+re],Ae=b[oe+j+ce],ze=b[oe+ee+re],Re=b[oe+ee+ce],Xe=b[ie+j+re],it=b[ie+j+ce],ot=b[ie+ee+re],tt=b[ie+ee+ce],lt=o.create(),Ee=o.create(),_e=o.create(),fe=o.create();o.lerp(lt,be,Xe,$),o.lerp(Ee,Ae,it,$),o.lerp(_e,ze,ot,$),o.lerp(fe,Re,tt,$);var Fe=o.create(),rt=o.create();o.lerp(Fe,lt,_e,J),o.lerp(rt,Ee,fe,J);var st=o.create();return o.lerp(st,Fe,rt,X),st},v=function(S,E){var y=E[0],b=E[1],p=E[2];return S[0]=y<0?-y:y,S[1]=b<0?-b:b,S[2]=p<0?-p:p,S},T=function(S){var E=1/0;S.sort(function(u,m){return u-m});for(var y=S.length,b=1;b<y;b++){var p=Math.abs(S[b]-S[b-1]);p<E&&(E=p)}return E},l=function(S){for(var E=[],y=[],b=[],p={},u={},m={},h=S.length,P=0;P<h;P++){var L=S[P],z=L[0],F=L[1],B=L[2];p[z]||(E.push(z),p[z]=!0),u[F]||(y.push(F),u[F]=!0),m[B]||(b.push(B),m[B]=!0)}var O=T(E),I=T(y),N=T(b),U=Math.min(O,I,N);return isFinite(U)?U:1};e.exports=function(S,E){var y=S.startingPositions,b=S.maxLength||1e3,p=S.tubeSize||1,u=S.absoluteTubeSize,m=S.gridFill||"+x+y+z",h={};m.indexOf("-x")!==-1&&(h.reversedX=!0),m.indexOf("-y")!==-1&&(h.reversedY=!0),m.indexOf("-z")!==-1&&(h.reversedZ=!0),h.filled=i.indexOf(m.replace(/-/g,"").replace(/\+/g,""));var P=S.getVelocity||function(it){return g(it,S,h)},L=S.getDivergence||function(it,ot){var tt=o.create(),lt=1e-4;o.add(tt,it,[lt,0,0]);var Ee=P(tt);o.subtract(Ee,Ee,ot),o.scale(Ee,Ee,1/lt),o.add(tt,it,[0,lt,0]);var _e=P(tt);o.subtract(_e,_e,ot),o.scale(_e,_e,1/lt),o.add(tt,it,[0,0,lt]);var fe=P(tt);return o.subtract(fe,fe,ot),o.scale(fe,fe,1/lt),o.add(tt,Ee,_e),o.add(tt,tt,fe),tt},z=[],F=E[0][0],B=E[0][1],O=E[0][2],I=E[1][0],N=E[1][1],U=E[1][2],W=function(it){var ot=it[0],tt=it[1],lt=it[2];return!(ot<F||ot>I||tt<B||tt>N||lt<O||lt>U)},Q=o.distance(E[0],E[1]),ue=10*Q/b,le=ue*ue,he=1,G=0,$=y.length;$>1&&(he=l(y));for(var J=0;J<$;J++){var X=o.create();o.copy(X,y[J]);var oe=[X],ie=[],j=P(X),ee=X;ie.push(j);var re=[],ce=L(X,j),be=o.length(ce);isFinite(be)&&be>G&&(G=be),re.push(be),z.push({points:oe,velocities:ie,divergences:re});for(var Ae=0;Ae<b*100&&oe.length<b&&W(X);){Ae++;var ze=o.clone(j),Re=o.squaredLength(ze);if(Re===0)break;if(Re>le&&o.scale(ze,ze,ue/Math.sqrt(Re)),o.add(ze,ze,X),j=P(ze),o.squaredDistance(ee,ze)-le>-1e-4*le){oe.push(ze),ee=ze,ie.push(j);var ce=L(ze,j),be=o.length(ce);isFinite(be)&&be>G&&(G=be),re.push(be)}X=ze}}var Xe=s(z,S.colormap,G,he);return u?Xe.tubeScale=u:(G===0&&(G=1),Xe.tubeScale=p*.5*he/G),Xe};var _=r(6740),w=r(6405).createMesh;e.exports.createTubeMesh=function(S,E){return w(S,E,{shaders:_,traceType:"streamtube"})}},990:function(e,t,r){var o=r(9405),a=r(3236),i=a([`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);
}
`]),n=a([`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;
}
`]),s=a([`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);
}
`]),c=a([`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));
}
`]);t.createShader=function(f){var g=o(f,i,n,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g.attributes.normal.location=2,g},t.createPickShader=function(f){var g=o(f,i,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g.attributes.normal.location=2,g},t.createContourShader=function(f){var g=o(f,s,n,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g},t.createPickContourShader=function(f){var g=o(f,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return g.attributes.uv.location=0,g.attributes.f.location=1,g}},9499:function(e,t,r){"use strict";e.exports=oe;var o=r(8828),a=r(2762),i=r(8116),n=r(7766),s=r(1888),c=r(6729),f=r(5298),g=r(9994),v=r(9618),T=r(3711),l=r(6760),_=r(7608),w=r(2478),S=r(6199),E=r(990),y=E.createShader,b=E.createContourShader,p=E.createPickShader,u=E.createPickContourShader,m=4*10,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],P=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],L=[[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 ie=0;ie<3;++ie){var j=L[ie],ee=(ie+1)%3,re=(ie+2)%3;j[ee+0]=1,j[re+3]=1,j[ie+6]=1}})();function z(ie,j,ee,re,ce){this.position=ie,this.index=j,this.uv=ee,this.level=re,this.dataCoordinate=ce}var F=256;function B(ie,j,ee,re,ce,be,Ae,ze,Re,Xe,it,ot,tt,lt,Ee){this.gl=ie,this.shape=j,this.bounds=ee,this.objectOffset=Ee,this.intensityBounds=[],this._shader=re,this._pickShader=ce,this._coordinateBuffer=be,this._vao=Ae,this._colorMap=ze,this._contourShader=Re,this._contourPickShader=Xe,this._contourBuffer=it,this._contourVAO=ot,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new z([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=tt,this._dynamicVAO=lt,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=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.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 O=B.prototype;O.genColormap=function(ie,j){var ee=!1,re=g([c({colormap:ie,nshades:F,format:"rgba"}).map(function(ce,be){var Ae=j?I(be/255,j):ce[3];return Ae<1&&(ee=!0),[ce[0],ce[1],ce[2],255*Ae]})]);return f.divseq(re,255),this.hasAlphaScale=ee,re},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(ie){this.pickId=ie};function I(ie,j){if(!j||!j.length)return 1;for(var ee=0;ee<j.length;++ee){if(j.length<2)return 1;if(j[ee][0]===ie)return j[ee][1];if(j[ee][0]>ie&&ee>0){var re=(j[ee][0]-ie)/(j[ee][0]-j[ee-1][0]);return j[ee][1]*(1-re)+re*j[ee-1][1]}}return 1}var N=[0,0,0],U={showSurface:!1,showContour:!1,projections:[h.slice(),h.slice(),h.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function W(ie,j){var ee,re,ce,be=j.axes&&j.axes.lastCubeProps.axis||N,Ae=j.showSurface,ze=j.showContour;for(ee=0;ee<3;++ee)for(Ae=Ae||j.surfaceProject[ee],re=0;re<3;++re)ze=ze||j.contourProject[ee][re];for(ee=0;ee<3;++ee){var Re=U.projections[ee];for(re=0;re<16;++re)Re[re]=0;for(re=0;re<4;++re)Re[5*re]=1;Re[5*ee]=0,Re[12+ee]=j.axesBounds[+(be[ee]>0)][ee],l(Re,ie.model,Re);var Xe=U.clipBounds[ee];for(ce=0;ce<2;++ce)for(re=0;re<3;++re)Xe[ce][re]=ie.clipBounds[ce][re];Xe[0][ee]=-1e8,Xe[1][ee]=1e8}return U.showSurface=Ae,U.showContour=ze,U}var Q={model:h,view:h,projection:h,inverseModel:h.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},ue=h.slice(),le=[1,0,0,0,1,0,0,0,1];function he(ie,j){ie=ie||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var re=Q;re.model=ie.model||h,re.view=ie.view||h,re.projection=ie.projection||h,re.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],re.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],re.objectOffset=this.objectOffset,re.contourColor=this.contourColor[0],re.inverseModel=_(re.inverseModel,re.model);for(var ce=0;ce<2;++ce)for(var be=re.clipBounds[ce],Ae=0;Ae<3;++Ae)be[Ae]=Math.min(Math.max(this.clipBounds[ce][Ae],-1e8),1e8);re.kambient=this.ambientLight,re.kdiffuse=this.diffuseLight,re.kspecular=this.specularLight,re.roughness=this.roughness,re.fresnel=this.fresnel,re.opacity=this.opacity,re.height=0,re.permutation=le,re.vertexColor=this.vertexColor;var ze=ue;for(l(ze,re.view,re.model),l(ze,re.projection,ze),_(ze,ze),ce=0;ce<3;++ce)re.eyePosition[ce]=ze[12+ce]/ze[15];var Re=ze[15];for(ce=0;ce<3;++ce)Re+=this.lightPosition[ce]*ze[4*ce+3];for(ce=0;ce<3;++ce){var Xe=ze[12+ce];for(Ae=0;Ae<3;++Ae)Xe+=ze[4*Ae+ce]*this.lightPosition[Ae];re.lightPosition[ce]=Xe/Re}var it=W(re,this);if(it.showSurface){for(this._shader.bind(),this._shader.uniforms=re,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)!this.surfaceProject[ce]||!this.vertexCount||(this._shader.uniforms.model=it.projections[ce],this._shader.uniforms.clipBounds=it.clipBounds[ce],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(it.showContour){var ot=this._contourShader;re.kambient=1,re.kdiffuse=0,re.kspecular=0,re.opacity=1,ot.bind(),ot.uniforms=re;var tt=this._contourVAO;for(tt.bind(),ce=0;ce<3;++ce)for(ot.uniforms.permutation=L[ce],ee.lineWidth(this.contourWidth[ce]*this.pixelRatio),Ae=0;Ae<this.contourLevels[ce].length;++Ae)Ae===this.highlightLevel[ce]?(ot.uniforms.contourColor=this.highlightColor[ce],ot.uniforms.contourTint=this.highlightTint[ce]):(Ae===0||Ae-1===this.highlightLevel[ce])&&(ot.uniforms.contourColor=this.contourColor[ce],ot.uniforms.contourTint=this.contourTint[ce]),this._contourCounts[ce][Ae]&&(ot.uniforms.height=this.contourLevels[ce][Ae],tt.draw(ee.LINES,this._contourCounts[ce][Ae],this._contourOffsets[ce][Ae]));for(ce=0;ce<3;++ce)for(ot.uniforms.model=it.projections[ce],ot.uniforms.clipBounds=it.clipBounds[ce],Ae=0;Ae<3;++Ae)if(this.contourProject[ce][Ae]){ot.uniforms.permutation=L[Ae],ee.lineWidth(this.contourWidth[Ae]*this.pixelRatio);for(var lt=0;lt<this.contourLevels[Ae].length;++lt)lt===this.highlightLevel[Ae]?(ot.uniforms.contourColor=this.highlightColor[Ae],ot.uniforms.contourTint=this.highlightTint[Ae]):(lt===0||lt-1===this.highlightLevel[Ae])&&(ot.uniforms.contourColor=this.contourColor[Ae],ot.uniforms.contourTint=this.contourTint[Ae]),this._contourCounts[Ae][lt]&&(ot.uniforms.height=this.contourLevels[Ae][lt],tt.draw(ee.LINES,this._contourCounts[Ae][lt],this._contourOffsets[Ae][lt]))}for(tt.unbind(),tt=this._dynamicVAO,tt.bind(),ce=0;ce<3;++ce)if(this._dynamicCounts[ce]!==0)for(ot.uniforms.model=re.model,ot.uniforms.clipBounds=re.clipBounds,ot.uniforms.permutation=L[ce],ee.lineWidth(this.dynamicWidth[ce]*this.pixelRatio),ot.uniforms.contourColor=this.dynamicColor[ce],ot.uniforms.contourTint=this.dynamicTint[ce],ot.uniforms.height=this.dynamicLevel[ce],tt.draw(ee.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]),Ae=0;Ae<3;++Ae)this.contourProject[Ae][ce]&&(ot.uniforms.model=it.projections[Ae],ot.uniforms.clipBounds=it.clipBounds[Ae],tt.draw(ee.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]));tt.unbind()}}O.draw=function(ie){return he.call(this,ie,!1)},O.drawTransparent=function(ie){return he.call(this,ie,!0)};var G={model:h,view:h,projection:h,inverseModel:h,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]};O.drawPick=function(ie){ie=ie||{};var j=this.gl;j.disable(j.CULL_FACE);var ee=G;ee.model=ie.model||h,ee.view=ie.view||h,ee.projection=ie.projection||h,ee.shape=this._field[2].shape,ee.pickId=this.pickId/255,ee.lowerBound=this.bounds[0],ee.upperBound=this.bounds[1],ee.objectOffset=this.objectOffset,ee.permutation=le;for(var re=0;re<2;++re)for(var ce=ee.clipBounds[re],be=0;be<3;++be)ce[be]=Math.min(Math.max(this.clipBounds[re][be],-1e8),1e8);var Ae=W(ee,this);if(Ae.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ee,this._vao.bind(),this._vao.draw(j.TRIANGLES,this._vertexCount),re=0;re<3;++re)this.surfaceProject[re]&&(this._pickShader.uniforms.model=Ae.projections[re],this._pickShader.uniforms.clipBounds=Ae.clipBounds[re],this._vao.draw(j.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var ze=this._contourPickShader;ze.bind(),ze.uniforms=ee;var Re=this._contourVAO;for(Re.bind(),be=0;be<3;++be)for(j.lineWidth(this.contourWidth[be]*this.pixelRatio),ze.uniforms.permutation=L[be],re=0;re<this.contourLevels[be].length;++re)this._contourCounts[be][re]&&(ze.uniforms.height=this.contourLevels[be][re],Re.draw(j.LINES,this._contourCounts[be][re],this._contourOffsets[be][re]));for(re=0;re<3;++re)for(ze.uniforms.model=Ae.projections[re],ze.uniforms.clipBounds=Ae.clipBounds[re],be=0;be<3;++be)if(this.contourProject[re][be]){ze.uniforms.permutation=L[be],j.lineWidth(this.contourWidth[be]*this.pixelRatio);for(var Xe=0;Xe<this.contourLevels[be].length;++Xe)this._contourCounts[be][Xe]&&(ze.uniforms.height=this.contourLevels[be][Xe],Re.draw(j.LINES,this._contourCounts[be][Xe],this._contourOffsets[be][Xe]))}Re.unbind()}},O.pick=function(ie){if(!ie||ie.id!==this.pickId)return null;var j=this._field[2].shape,ee=this._pickResult,re=j[0]*(ie.value[0]+(ie.value[2]>>4)/16)/255,ce=Math.floor(re),be=re-ce,Ae=j[1]*(ie.value[1]+(ie.value[2]&15)/16)/255,ze=Math.floor(Ae),Re=Ae-ze;ce+=1,ze+=1;var Xe=ee.position;Xe[0]=Xe[1]=Xe[2]=0;for(var it=0;it<2;++it)for(var ot=it?be:1-be,tt=0;tt<2;++tt)for(var lt=tt?Re:1-Re,Ee=ce+it,_e=ze+tt,fe=ot*lt,Fe=0;Fe<3;++Fe)Xe[Fe]+=this._field[Fe].get(Ee,_e)*fe;for(var rt=this._pickResult.level,st=0;st<3;++st)if(rt[st]=w.le(this.contourLevels[st],Xe[st]),rt[st]<0)this.contourLevels[st].length>0&&(rt[st]=0);else if(rt[st]<this.contourLevels[st].length-1){var Qe=this.contourLevels[st][rt[st]],Lt=this.contourLevels[st][rt[st]+1];Math.abs(Qe-Xe[st])>Math.abs(Lt-Xe[st])&&(rt[st]+=1)}for(ee.index[0]=be<.5?ce:ce+1,ee.index[1]=Re<.5?ze:ze+1,ee.uv[0]=re/j[0],ee.uv[1]=Ae/j[1],Fe=0;Fe<3;++Fe)ee.dataCoordinate[Fe]=this._field[Fe].get(ee.index[0],ee.index[1]);return ee},O.padField=function(ie,j){var ee=j.shape.slice(),re=ie.shape.slice();f.assign(ie.lo(1,1).hi(ee[0],ee[1]),j),f.assign(ie.lo(1).hi(ee[0],1),j.hi(ee[0],1)),f.assign(ie.lo(1,re[1]-1).hi(ee[0],1),j.lo(0,ee[1]-1).hi(ee[0],1)),f.assign(ie.lo(0,1).hi(1,ee[1]),j.hi(1)),f.assign(ie.lo(re[0]-1,1).hi(1,ee[1]),j.lo(ee[0]-1)),ie.set(0,0,j.get(0,0)),ie.set(0,re[1]-1,j.get(0,ee[1]-1)),ie.set(re[0]-1,0,j.get(ee[0]-1,0)),ie.set(re[0]-1,re[1]-1,j.get(ee[0]-1,ee[1]-1))};function $(ie,j){return Array.isArray(ie)?[j(ie[0]),j(ie[1]),j(ie[2])]:[j(ie),j(ie),j(ie)]}function J(ie){return Array.isArray(ie)?ie.length===3?[ie[0],ie[1],ie[2],1]:[ie[0],ie[1],ie[2],ie[3]]:[0,0,0,1]}function X(ie){if(Array.isArray(ie)){if(Array.isArray(ie))return[J(ie[0]),J(ie[1]),J(ie[2])];var j=J(ie);return[j.slice(),j.slice(),j.slice()]}}O.update=function(ie){ie=ie||{},this.objectOffset=ie.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ie&&(this.contourWidth=$(ie.contourWidth,Number)),"showContour"in ie&&(this.showContour=$(ie.showContour,Boolean)),"showSurface"in ie&&(this.showSurface=!!ie.showSurface),"contourTint"in ie&&(this.contourTint=$(ie.contourTint,Boolean)),"contourColor"in ie&&(this.contourColor=X(ie.contourColor)),"contourProject"in ie&&(this.contourProject=$(ie.contourProject,function(mi){return $(mi,Boolean)})),"surfaceProject"in ie&&(this.surfaceProject=ie.surfaceProject),"dynamicColor"in ie&&(this.dynamicColor=X(ie.dynamicColor)),"dynamicTint"in ie&&(this.dynamicTint=$(ie.dynamicTint,Number)),"dynamicWidth"in ie&&(this.dynamicWidth=$(ie.dynamicWidth,Number)),"opacity"in ie&&(this.opacity=ie.opacity),"opacityscale"in ie&&(this.opacityscale=ie.opacityscale),"colorBounds"in ie&&(this.colorBounds=ie.colorBounds),"vertexColor"in ie&&(this.vertexColor=ie.vertexColor?1:0),"colormap"in ie&&this._colorMap.setPixels(this.genColormap(ie.colormap,this.opacityscale));var j=ie.field||ie.coords&&ie.coords[2]||null,ee=!1;if(j||(this._field[2].shape[0]||this._field[2].shape[2]?j=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):j=this._field[2].hi(0,0)),"field"in ie||"coords"in ie){var re=(j.shape[0]+2)*(j.shape[1]+2);re>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(o.nextPow2(re))),this._field[2]=v(this._field[2].data,[j.shape[0]+2,j.shape[1]+2]),this.padField(this._field[2],j),this.shape=j.shape.slice();for(var ce=this.shape,be=0;be<2;++be)this._field[2].size>this._field[be].data.length&&(s.freeFloat(this._field[be].data),this._field[be].data=s.mallocFloat(this._field[2].size)),this._field[be]=v(this._field[be].data,[ce[0]+2,ce[1]+2]);if(ie.coords){var Ae=ie.coords;if(!Array.isArray(Ae)||Ae.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(be=0;be<2;++be){var ze=Ae[be];for(tt=0;tt<2;++tt)if(ze.shape[tt]!==ce[tt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[be],ze)}}else if(ie.ticks){var Re=ie.ticks;if(!Array.isArray(Re)||Re.length!==2)throw new Error("gl-surface: invalid ticks");for(be=0;be<2;++be){var Xe=Re[be];if((Array.isArray(Xe)||Xe.length)&&(Xe=v(Xe)),Xe.shape[0]!==ce[be])throw new Error("gl-surface: invalid tick length");var it=v(Xe.data,ce);it.stride[be]=Xe.stride[0],it.stride[be^1]=0,this.padField(this._field[be],it)}}else{for(be=0;be<2;++be){var ot=[0,0];ot[be]=1,this._field[be]=v(this._field[be].data,[ce[0]+2,ce[1]+2],ot,0)}this._field[0].set(0,0,0);for(var tt=0;tt<ce[0];++tt)this._field[0].set(tt+1,0,tt);for(this._field[0].set(ce[0]+1,0,ce[0]-1),this._field[1].set(0,0,0),tt=0;tt<ce[1];++tt)this._field[1].set(0,tt+1,tt);this._field[1].set(0,ce[1]+1,ce[1]-1)}var lt=this._field,Ee=v(s.mallocFloat(lt[2].size*3*2),[3,ce[0]+2,ce[1]+2,2]);for(be=0;be<3;++be)S(Ee.pick(be),lt[be],"mirror");var _e=v(s.mallocFloat(lt[2].size*3),[ce[0]+2,ce[1]+2,3]);for(be=0;be<ce[0]+2;++be)for(tt=0;tt<ce[1]+2;++tt){var fe=Ee.get(0,be,tt,0),Fe=Ee.get(0,be,tt,1),rt=Ee.get(1,be,tt,0),st=Ee.get(1,be,tt,1),Qe=Ee.get(2,be,tt,0),Lt=Ee.get(2,be,tt,1),kt=rt*Lt-st*Qe,Vt=Qe*Fe-Lt*fe,Zt=fe*st-Fe*rt,Sr=Math.sqrt(kt*kt+Vt*Vt+Zt*Zt);Sr<1e-8?(Sr=Math.max(Math.abs(kt),Math.abs(Vt),Math.abs(Zt)),Sr<1e-8?(Zt=1,Vt=kt=0,Sr=1):Sr=1/Sr):Sr=1/Math.sqrt(Sr),_e.set(be,tt,0,kt*Sr),_e.set(be,tt,1,Vt*Sr),_e.set(be,tt,2,Zt*Sr)}s.free(Ee.data);var xr=[1/0,1/0,1/0],jr=[-1/0,-1/0,-1/0],wr=1/0,Ir=-1/0,bt=(ce[0]-1)*(ce[1]-1)*6,Be=s.mallocFloat(o.nextPow2(10*bt)),Ke=0,Ue=0;for(be=0;be<ce[0]-1;++be)e:for(tt=0;tt<ce[1]-1;++tt){for(var Me=0;Me<2;++Me)for(var qe=0;qe<2;++qe)for(var Ce=0;Ce<3;++Ce){var Te=this._field[Ce].get(1+be+Me,1+tt+qe);if(isNaN(Te)||!isFinite(Te))continue e}for(Ce=0;Ce<6;++Ce){var Pe=be+P[Ce][0],at=tt+P[Ce][1],yt=this._field[0].get(Pe+1,at+1),Tt=this._field[1].get(Pe+1,at+1);Te=this._field[2].get(Pe+1,at+1),kt=_e.get(Pe+1,at+1,0),Vt=_e.get(Pe+1,at+1,1),Zt=_e.get(Pe+1,at+1,2),ie.intensity&&(Ot=ie.intensity.get(Pe,at));var Ot=ie.intensity?ie.intensity.get(Pe,at):Te+this.objectOffset[2];Be[Ke++]=Pe,Be[Ke++]=at,Be[Ke++]=yt,Be[Ke++]=Tt,Be[Ke++]=Te,Be[Ke++]=0,Be[Ke++]=Ot,Be[Ke++]=kt,Be[Ke++]=Vt,Be[Ke++]=Zt,xr[0]=Math.min(xr[0],yt+this.objectOffset[0]),xr[1]=Math.min(xr[1],Tt+this.objectOffset[1]),xr[2]=Math.min(xr[2],Te+this.objectOffset[2]),wr=Math.min(wr,Ot),jr[0]=Math.max(jr[0],yt+this.objectOffset[0]),jr[1]=Math.max(jr[1],Tt+this.objectOffset[1]),jr[2]=Math.max(jr[2],Te+this.objectOffset[2]),Ir=Math.max(Ir,Ot),Ue+=1}}for(ie.intensityBounds&&(wr=+ie.intensityBounds[0],Ir=+ie.intensityBounds[1]),be=6;be<Ke;be+=10)Be[be]=(Be[be]-wr)/(Ir-wr);this._vertexCount=Ue,this._coordinateBuffer.update(Be.subarray(0,Ke)),s.freeFloat(Be),s.free(_e.data),this.bounds=[xr,jr],this.intensity=ie.intensity||this._field[2],(this.intensityBounds[0]!==wr||this.intensityBounds[1]!==Ir)&&(ee=!0),this.intensityBounds=[wr,Ir]}if("levels"in ie){var Gt=ie.levels;for(Array.isArray(Gt[0])?Gt=Gt.slice():Gt=[[],[],Gt],be=0;be<3;++be)Gt[be]=Gt[be].slice(),Gt[be].sort(function(mi,xt){return mi-xt});for(be=0;be<3;++be)for(tt=0;tt<Gt[be].length;++tt)Gt[be][tt]-=this.objectOffset[be];e:for(be=0;be<3;++be){if(Gt[be].length!==this.contourLevels[be].length){ee=!0;break}for(tt=0;tt<Gt[be].length;++tt)if(Gt[be][tt]!==this.contourLevels[be][tt]){ee=!0;break e}}this.contourLevels=Gt}if(ee){lt=this._field,ce=this.shape;for(var rr=[],Qt=0;Qt<3;++Qt){var Tr=this.contourLevels[Qt],la=[],Ua=[],Ba=[0,0,0];for(be=0;be<Tr.length;++be){var Ra=T(this._field[Qt],Tr[be]);la.push(rr.length/5|0),Ue=0;e:for(tt=0;tt<Ra.cells.length;++tt){var ei=Ra.cells[tt];for(Ce=0;Ce<2;++Ce){var za=Ra.positions[ei[Ce]],ti=za[0],Ci=Math.floor(ti)|0,Jt=ti-Ci,Nt=za[1],Kt=Math.floor(Nt)|0,Wt=Nt-Kt,Pr=!1;t:for(var ta=0;ta<3;++ta){Ba[ta]=0;var ma=(Qt+ta+1)%3;for(Me=0;Me<2;++Me){var ra=Me?Jt:1-Jt;for(Pe=Math.min(Math.max(Ci+Me,0),ce[0])|0,qe=0;qe<2;++qe){var Ia=qe?Wt:1-Wt;if(at=Math.min(Math.max(Kt+qe,0),ce[1])|0,ta<2?Te=this._field[ma].get(Pe,at):Te=(this.intensity.get(Pe,at)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Te)||isNaN(Te)){Pr=!0;break t}var Ha=ra*Ia;Ba[ta]+=Ha*Te}}}if(!Pr)rr.push(Ba[0],Ba[1],za[0],za[1],Ba[2]),Ue+=1;else{if(Ce>0){for(var $a=0;$a<5;++$a)rr.pop();Ue-=1}continue e}}}Ua.push(Ue)}this._contourOffsets[Qt]=la,this._contourCounts[Qt]=Ua}var ai=s.mallocFloat(rr.length);for(be=0;be<rr.length;++be)ai[be]=rr[be];this._contourBuffer.update(ai),s.freeFloat(ai)}},O.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 ie=0;ie<3;++ie)s.freeFloat(this._field[ie].data)},O.highlight=function(ie){var j;if(!ie){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(j=0;j<3;++j)this.enableHighlight[j]?this.highlightLevel[j]=ie.level[j]:this.highlightLevel[j]=-1;var ee;for(this.snapToData?ee=ie.dataCoordinate:ee=ie.position,j=0;j<3;++j)ee[j]-=this.objectOffset[j];if(!((!this.enableDynamic[0]||ee[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||ee[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||ee[2]===this.dynamicLevel[2]))){for(var re=0,ce=this.shape,be=s.mallocFloat(12*ce[0]*ce[1]),Ae=0;Ae<3;++Ae){if(!this.enableDynamic[Ae]){this.dynamicLevel[Ae]=NaN,this._dynamicCounts[Ae]=0;continue}this.dynamicLevel[Ae]=ee[Ae];var ze=(Ae+1)%3,Re=(Ae+2)%3,Xe=this._field[Ae],it=this._field[ze],ot=this._field[Re],tt=T(Xe,ee[Ae]),lt=tt.cells,Ee=tt.positions;for(this._dynamicOffsets[Ae]=re,j=0;j<lt.length;++j)for(var _e=lt[j],fe=0;fe<2;++fe){var Fe=Ee[_e[fe]],rt=+Fe[0],st=rt|0,Qe=Math.min(st+1,ce[0])|0,Lt=rt-st,kt=1-Lt,Vt=+Fe[1],Zt=Vt|0,Sr=Math.min(Zt+1,ce[1])|0,xr=Vt-Zt,jr=1-xr,wr=kt*jr,Ir=kt*xr,bt=Lt*jr,Be=Lt*xr,Ke=wr*it.get(st,Zt)+Ir*it.get(st,Sr)+bt*it.get(Qe,Zt)+Be*it.get(Qe,Sr),Ue=wr*ot.get(st,Zt)+Ir*ot.get(st,Sr)+bt*ot.get(Qe,Zt)+Be*ot.get(Qe,Sr);if(isNaN(Ke)||isNaN(Ue)){fe&&(re-=1);break}be[2*re+0]=Ke,be[2*re+1]=Ue,re+=1}this._dynamicCounts[Ae]=re-this._dynamicOffsets[Ae]}this._dynamicBuffer.update(be.subarray(0,2*re)),s.freeFloat(be)}};function oe(ie){var j=ie.gl,ee=y(j),re=p(j),ce=b(j),be=u(j),Ae=a(j),ze=i(j,[{buffer:Ae,size:4,stride:m,offset:0},{buffer:Ae,size:3,stride:m,offset:16},{buffer:Ae,size:3,stride:m,offset:28}]),Re=a(j),Xe=i(j,[{buffer:Re,size:4,stride:20,offset:0},{buffer:Re,size:1,stride:20,offset:16}]),it=a(j),ot=i(j,[{buffer:it,size:2,type:j.FLOAT}]),tt=n(j,1,F,j.RGBA,j.UNSIGNED_BYTE);tt.minFilter=j.LINEAR,tt.magFilter=j.LINEAR;var lt=new B(j,[0,0],[[0,0,0],[0,0,0]],ee,re,Ae,ze,tt,ce,be,Re,Xe,it,ot,[0,0,0]),Ee={levels:[[],[],[]]};for(var _e in ie)Ee[_e]=ie[_e];return Ee.colormap=Ee.colormap||"jet",lt.update(Ee),lt}},7766:function(e,t,r){"use strict";var o=r(9618),a=r(5298),i=r(1888);e.exports=u;var n=null,s=null,c=null;function f(m){n=[m.LINEAR,m.NEAREST_MIPMAP_LINEAR,m.LINEAR_MIPMAP_NEAREST,m.LINEAR_MIPMAP_NEAREST],s=[m.NEAREST,m.LINEAR,m.NEAREST_MIPMAP_NEAREST,m.NEAREST_MIPMAP_LINEAR,m.LINEAR_MIPMAP_NEAREST,m.LINEAR_MIPMAP_LINEAR],c=[m.REPEAT,m.CLAMP_TO_EDGE,m.MIRRORED_REPEAT]}function g(m){return typeof HTMLCanvasElement<"u"&&m instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&m instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&m instanceof HTMLVideoElement||typeof ImageData<"u"&&m instanceof ImageData}var v=function(m,h){a.muls(m,h,255)};function T(m,h,P){var L=m.gl,z=L.getParameter(L.MAX_TEXTURE_SIZE);if(h<0||h>z||P<0||P>z)throw new Error("gl-texture2d: Invalid texture size");return m._shape=[h,P],m.bind(),L.texImage2D(L.TEXTURE_2D,0,m.format,h,P,0,m.format,m.type,null),m._mipLevels=[0],m}function l(m,h,P,L,z,F){this.gl=m,this.handle=h,this.format=z,this.type=F,this._shape=[P,L],this._mipLevels=[0],this._magFilter=m.NEAREST,this._minFilter=m.NEAREST,this._wrapS=m.CLAMP_TO_EDGE,this._wrapT=m.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return B._wrapS},set:function(N){return B.wrapS=N}},{get:function(){return B._wrapT},set:function(N){return B.wrapT=N}}]),this._wrapVector=O;var I=[this._shape[0],this._shape[1]];Object.defineProperties(I,[{get:function(){return B._shape[0]},set:function(N){return B.width=N}},{get:function(){return B._shape[1]},set:function(N){return B.height=N}}]),this._shapeVector=I}var _=l.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(m){this.bind();var h=this.gl;if(this.type===h.FLOAT&&n.indexOf(m)>=0&&(h.getExtension("OES_texture_float_linear")||(m=h.NEAREST)),s.indexOf(m)<0)throw new Error("gl-texture2d: Unknown filter mode "+m);return h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,m),this._minFilter=m}},magFilter:{get:function(){return this._magFilter},set:function(m){this.bind();var h=this.gl;if(this.type===h.FLOAT&&n.indexOf(m)>=0&&(h.getExtension("OES_texture_float_linear")||(m=h.NEAREST)),s.indexOf(m)<0)throw new Error("gl-texture2d: Unknown filter mode "+m);return h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,m),this._magFilter=m}},mipSamples:{get:function(){return this._anisoSamples},set:function(m){var h=this._anisoSamples;if(this._anisoSamples=Math.max(m,1)|0,h!==this._anisoSamples){var P=this.gl.getExtension("EXT_texture_filter_anisotropic");P&&this.gl.texParameterf(this.gl.TEXTURE_2D,P.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(m){if(this.bind(),c.indexOf(m)<0)throw new Error("gl-texture2d: Unknown wrap mode "+m);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,m),this._wrapS=m}},wrapT:{get:function(){return this._wrapT},set:function(m){if(this.bind(),c.indexOf(m)<0)throw new Error("gl-texture2d: Unknown wrap mode "+m);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,m),this._wrapT=m}},wrap:{get:function(){return this._wrapVector},set:function(m){if(Array.isArray(m)||(m=[m,m]),m.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var h=0;h<2;++h)if(c.indexOf(m[h])<0)throw new Error("gl-texture2d: Unknown wrap mode "+m);this._wrapS=m[0],this._wrapT=m[1];var P=this.gl;return this.bind(),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,this._wrapS),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,this._wrapT),m}},shape:{get:function(){return this._shapeVector},set:function(m){if(!Array.isArray(m))m=[m|0,m|0];else if(m.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return T(this,m[0]|0,m[1]|0),[m[0]|0,m[1]|0]}},width:{get:function(){return this._shape[0]},set:function(m){return m=m|0,T(this,m,this._shape[1]),m}},height:{get:function(){return this._shape[1]},set:function(m){return m=m|0,T(this,this._shape[0],m),m}}}),_.bind=function(m){var h=this.gl;return m!==void 0&&h.activeTexture(h.TEXTURE0+(m|0)),h.bindTexture(h.TEXTURE_2D,this.handle),m!==void 0?m|0:h.getParameter(h.ACTIVE_TEXTURE)-h.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var m=Math.min(this._shape[0],this._shape[1]),h=0;m>0;++h,m>>>=1)this._mipLevels.indexOf(h)<0&&this._mipLevels.push(h)},_.setPixels=function(m,h,P,L){var z=this.gl;this.bind(),Array.isArray(h)?(L=P,P=h[1]|0,h=h[0]|0):(h=h||0,P=P||0),L=L||0;var F=g(m)?m:m.raw;if(F){var B=this._mipLevels.indexOf(L)<0;B?(z.texImage2D(z.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(L)):z.texSubImage2D(z.TEXTURE_2D,L,h,P,this.format,this.type,F)}else if(m.shape&&m.stride&&m.data){if(m.shape.length<2||h+m.shape[1]>this._shape[1]>>>L||P+m.shape[0]>this._shape[0]>>>L||h<0||P<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(z,h,P,L,this.format,this.type,this._mipLevels,m)}else throw new Error("gl-texture2d: Unsupported data type")};function w(m,h){return m.length===3?h[2]===1&&h[1]===m[0]*m[2]&&h[0]===m[2]:h[0]===1&&h[1]===m[0]}function S(m,h,P,L,z,F,B,O){var I=O.dtype,N=O.shape.slice();if(N.length<2||N.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,W=0,Q=w(N,O.stride.slice());I==="float32"?U=m.FLOAT:I==="float64"?(U=m.FLOAT,Q=!1,I="float32"):I==="uint8"?U=m.UNSIGNED_BYTE:(U=m.UNSIGNED_BYTE,Q=!1,I="uint8");var ue=1;if(N.length===2)W=m.LUMINANCE,N=[N[0],N[1],1],O=o(O.data,N,[O.stride[0],O.stride[1],1],O.offset);else if(N.length===3){if(N[2]===1)W=m.ALPHA;else if(N[2]===2)W=m.LUMINANCE_ALPHA;else if(N[2]===3)W=m.RGB;else if(N[2]===4)W=m.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ue=N[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((W===m.LUMINANCE||W===m.ALPHA)&&(z===m.LUMINANCE||z===m.ALPHA)&&(W=z),W!==z)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var le=O.size,he=B.indexOf(L)<0;if(he&&B.push(L),U===F&&Q)O.offset===0&&O.data.length===le?he?m.texImage2D(m.TEXTURE_2D,L,z,N[0],N[1],0,z,F,O.data):m.texSubImage2D(m.TEXTURE_2D,L,h,P,N[0],N[1],z,F,O.data):he?m.texImage2D(m.TEXTURE_2D,L,z,N[0],N[1],0,z,F,O.data.subarray(O.offset,O.offset+le)):m.texSubImage2D(m.TEXTURE_2D,L,h,P,N[0],N[1],z,F,O.data.subarray(O.offset,O.offset+le));else{var G;F===m.FLOAT?G=i.mallocFloat32(le):G=i.mallocUint8(le);var $=o(G,N,[N[2],N[2]*N[0],1]);U===m.FLOAT&&F===m.UNSIGNED_BYTE?v($,O):a.assign($,O),he?m.texImage2D(m.TEXTURE_2D,L,z,N[0],N[1],0,z,F,G.subarray(0,le)):m.texSubImage2D(m.TEXTURE_2D,L,h,P,N[0],N[1],z,F,G.subarray(0,le)),F===m.FLOAT?i.freeFloat32(G):i.freeUint8(G)}}function E(m){var h=m.createTexture();return m.bindTexture(m.TEXTURE_2D,h),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),h}function y(m,h,P,L,z){var F=m.getParameter(m.MAX_TEXTURE_SIZE);if(h<0||h>F||P<0||P>F)throw new Error("gl-texture2d: Invalid texture shape");if(z===m.FLOAT&&!m.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=E(m);return m.texImage2D(m.TEXTURE_2D,0,L,h,P,0,L,z,null),new l(m,B,h,P,L,z)}function b(m,h,P,L,z,F){var B=E(m);return m.texImage2D(m.TEXTURE_2D,0,z,z,F,h),new l(m,B,P,L,z,F)}function p(m,h){var P=h.dtype,L=h.shape.slice(),z=m.getParameter(m.MAX_TEXTURE_SIZE);if(L[0]<0||L[0]>z||L[1]<0||L[1]>z)throw new Error("gl-texture2d: Invalid texture size");var F=w(L,h.stride.slice()),B=0;P==="float32"?B=m.FLOAT:P==="float64"?(B=m.FLOAT,F=!1,P="float32"):P==="uint8"?B=m.UNSIGNED_BYTE:(B=m.UNSIGNED_BYTE,F=!1,P="uint8");var O=0;if(L.length===2)O=m.LUMINANCE,L=[L[0],L[1],1],h=o(h.data,L,[h.stride[0],h.stride[1],1],h.offset);else if(L.length===3)if(L[2]===1)O=m.ALPHA;else if(L[2]===2)O=m.LUMINANCE_ALPHA;else if(L[2]===3)O=m.RGB;else if(L[2]===4)O=m.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===m.FLOAT&&!m.getExtension("OES_texture_float")&&(B=m.UNSIGNED_BYTE,F=!1);var I,N,U=h.size;if(F)h.offset===0&&h.data.length===U?I=h.data:I=h.data.subarray(h.offset,h.offset+U);else{var W=[L[2],L[2]*L[0],1];N=i.malloc(U,P);var Q=o(N,L,W,0);(P==="float32"||P==="float64")&&B===m.UNSIGNED_BYTE?v(Q,h):a.assign(Q,h),I=N.subarray(0,U)}var ue=E(m);return m.texImage2D(m.TEXTURE_2D,0,O,L[0],L[1],0,O,B,I),F||i.free(N),new l(m,ue,L[0],L[1],O,B)}function u(m){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(n||f(m),typeof arguments[1]=="number")return y(m,arguments[1],arguments[2],arguments[3]||m.RGBA,arguments[4]||m.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return y(m,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||m.RGBA,arguments[3]||m.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var h=arguments[1],P=g(h)?h:h.raw;if(P)return b(m,P,h.width|0,h.height|0,arguments[2]||m.RGBA,arguments[3]||m.UNSIGNED_BYTE);if(h.shape&&h.data&&h.stride)return p(m,h)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(e){"use strict";function t(r,o,a){o?o.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var i=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>i)throw new Error("gl-vao: Too many vertex attributes");for(var n=0;n<a.length;++n){var s=a[n];if(s.buffer){var c=s.buffer,f=s.size||4,g=s.type||r.FLOAT,v=!!s.normalized,T=s.stride||0,l=s.offset||0;c.bind(),r.enableVertexAttribArray(n),r.vertexAttribPointer(n,f,g,v,T,l)}else{if(typeof s=="number")r.vertexAttrib1f(n,s);else if(s.length===1)r.vertexAttrib1f(n,s[0]);else if(s.length===2)r.vertexAttrib2f(n,s[0],s[1]);else if(s.length===3)r.vertexAttrib3f(n,s[0],s[1],s[2]);else if(s.length===4)r.vertexAttrib4f(n,s[0],s[1],s[2],s[3]);else throw new Error("gl-vao: Invalid vertex attribute");r.disableVertexAttribArray(n)}}for(;n<i;++n)r.disableVertexAttribArray(n)}else{r.bindBuffer(r.ARRAY_BUFFER,null);for(var n=0;n<i;++n)r.disableVertexAttribArray(n)}}e.exports=t},870:function(e,t,r){"use strict";var o=r(1433);function a(n){this.gl=n,this._elements=null,this._attributes=null,this._elementsType=n.UNSIGNED_SHORT}a.prototype.bind=function(){o(this.gl,this._elements,this._attributes)},a.prototype.update=function(n,s,c){this._elements=s,this._attributes=n,this._elementsType=c||this.gl.UNSIGNED_SHORT},a.prototype.dispose=function(){},a.prototype.unbind=function(){},a.prototype.draw=function(n,s,c){c=c||0;var f=this.gl;this._elements?f.drawElements(n,s,this._elementsType,c):f.drawArrays(n,c,s)};function i(n){return new a(n)}e.exports=i},7518:function(e,t,r){"use strict";var o=r(1433);function a(s,c,f,g,v,T){this.location=s,this.dimension=c,this.a=f,this.b=g,this.c=v,this.d=T}a.prototype.bind=function(s){switch(this.dimension){case 1:s.vertexAttrib1f(this.location,this.a);break;case 2:s.vertexAttrib2f(this.location,this.a,this.b);break;case 3:s.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:s.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function i(s,c,f){this.gl=s,this._ext=c,this.handle=f,this._attribs=[],this._useElements=!1,this._elementsType=s.UNSIGNED_SHORT}i.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var s=0;s<this._attribs.length;++s)this._attribs[s].bind(this.gl)},i.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},i.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},i.prototype.update=function(s,c,f){if(this.bind(),o(this.gl,c,s),this.unbind(),this._attribs.length=0,s)for(var g=0;g<s.length;++g){var v=s[g];typeof v=="number"?this._attribs.push(new a(g,1,v)):Array.isArray(v)&&this._attribs.push(new a(g,v.length,v[0],v[1],v[2],v[3]))}this._useElements=!!c,this._elementsType=f||this.gl.UNSIGNED_SHORT},i.prototype.draw=function(s,c,f){f=f||0;var g=this.gl;this._useElements?g.drawElements(s,c,this._elementsType,f):g.drawArrays(s,f,c)};function n(s,c){return new i(s,c,c.createVertexArrayOES())}e.exports=n},8116:function(e,t,r){"use strict";var o=r(7518),a=r(870);function i(s){this.bindVertexArrayOES=s.bindVertexArray.bind(s),this.createVertexArrayOES=s.createVertexArray.bind(s),this.deleteVertexArrayOES=s.deleteVertexArray.bind(s)}function n(s,c,f,g){var v=s.createVertexArray?new i(s):s.getExtension("OES_vertex_array_object"),T;return v?T=o(s,v):T=a(s),T.update(c,f,g),T}e.exports=n},5632:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]+a[0],r[1]=o[1]+a[1],r[2]=o[2]+a[2],r}},8192:function(e,t,r){e.exports=n;var o=r(2825),a=r(3536),i=r(244);function n(s,c){var f=o(s[0],s[1],s[2]),g=o(c[0],c[1],c[2]);a(f,f),a(g,g);var v=i(f,g);return v>1?0:Math.acos(v)}},9226:function(e){e.exports=t;function t(r,o){return r[0]=Math.ceil(o[0]),r[1]=Math.ceil(o[1]),r[2]=Math.ceil(o[2]),r}},3126:function(e){e.exports=t;function t(r){var o=new Float32Array(3);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o}},3990:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r}},1091:function(e){e.exports=t;function t(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},5911:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=a[0],f=a[1],g=a[2];return r[0]=n*g-s*f,r[1]=s*c-i*g,r[2]=i*f-n*c,r}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],i=o[1]-r[1],n=o[2]-r[2];return Math.sqrt(a*a+i*i+n*n)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]/a[0],r[1]=o[1]/a[1],r[2]=o[2]/a[2],r}},244:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=a;var o=r(2613);function a(i,n){var s=i[0],c=i[1],f=i[2],g=n[0],v=n[1],T=n[2];return Math.abs(s-g)<=o*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(c-v)<=o*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(f-T)<=o*Math.max(1,Math.abs(f),Math.abs(T))}},9265:function(e){e.exports=t;function t(r,o){return r[0]===o[0]&&r[1]===o[1]&&r[2]===o[2]}},2681:function(e){e.exports=t;function t(r,o){return r[0]=Math.floor(o[0]),r[1]=Math.floor(o[1]),r[2]=Math.floor(o[2]),r}},5137:function(e,t,r){e.exports=a;var o=r(1091)();function a(i,n,s,c,f,g){var v,T;for(n||(n=3),s||(s=0),c?T=Math.min(c*n+s,i.length):T=i.length,v=s;v<T;v+=n)o[0]=i[v],o[1]=i[v+1],o[2]=i[v+2],f(o,o,g),i[v]=o[0],i[v+1]=o[1],i[v+2]=o[2];return i}},2825:function(e){e.exports=t;function t(r,o,a){var i=new Float32Array(3);return i[0]=r,i[1]=o,i[2]=a,i}},2931:function(e,t,r){e.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},811:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r}},868:function(e,t,r){e.exports=r(1387)},1387:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],i=r[2];return Math.sqrt(o*o+a*a+i*i)}},6658:function(e){e.exports=t;function t(r,o,a,i){var n=o[0],s=o[1],c=o[2];return r[0]=n+i*(a[0]-n),r[1]=s+i*(a[1]-s),r[2]=c+i*(a[2]-c),r}},7417:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r}},8107:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r}},4505:function(e,t,r){e.exports=r(5847)},5847:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a[0],r[1]=o[1]*a[1],r[2]=o[2]*a[2],r}},5093:function(e){e.exports=t;function t(r,o){return r[0]=-o[0],r[1]=-o[1],r[2]=-o[2],r}},3536:function(e){e.exports=t;function t(r,o){var a=o[0],i=o[1],n=o[2],s=a*a+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),r[0]=o[0]*s,r[1]=o[1]*s,r[2]=o[2]*s),r}},7636:function(e){e.exports=t;function t(r,o){o=o||1;var a=Math.random()*2*Math.PI,i=Math.random()*2-1,n=Math.sqrt(1-i*i)*o;return r[0]=Math.cos(a)*n,r[1]=Math.sin(a)*n,r[2]=i*o,r}},6894:function(e){e.exports=t;function t(r,o,a,i){var n=a[1],s=a[2],c=o[1]-n,f=o[2]-s,g=Math.sin(i),v=Math.cos(i);return r[0]=o[0],r[1]=n+c*v-f*g,r[2]=s+c*g+f*v,r}},109:function(e){e.exports=t;function t(r,o,a,i){var n=a[0],s=a[2],c=o[0]-n,f=o[2]-s,g=Math.sin(i),v=Math.cos(i);return r[0]=n+f*g+c*v,r[1]=o[1],r[2]=s+f*v-c*g,r}},8692:function(e){e.exports=t;function t(r,o,a,i){var n=a[0],s=a[1],c=o[0]-n,f=o[1]-s,g=Math.sin(i),v=Math.cos(i);return r[0]=n+c*v-f*g,r[1]=s+c*g+f*v,r[2]=o[2],r}},2447:function(e){e.exports=t;function t(r,o){return r[0]=Math.round(o[0]),r[1]=Math.round(o[1]),r[2]=Math.round(o[2]),r}},6621:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r}},8489:function(e){e.exports=t;function t(r,o,a,i){return r[0]=o[0]+a[0]*i,r[1]=o[1]+a[1]*i,r[2]=o[2]+a[2]*i,r}},1463:function(e){e.exports=t;function t(r,o,a,i){return r[0]=o,r[1]=a,r[2]=i,r}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],i=o[1]-r[1],n=o[2]-r[2];return a*a+i*i+n*n}},3066:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],i=r[2];return o*o+a*a+i*i}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r}},492:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2];return r[0]=i*a[0]+n*a[3]+s*a[6],r[1]=i*a[1]+n*a[4]+s*a[7],r[2]=i*a[2]+n*a[5]+s*a[8],r}},5673:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=a[3]*i+a[7]*n+a[11]*s+a[15];return c=c||1,r[0]=(a[0]*i+a[4]*n+a[8]*s+a[12])/c,r[1]=(a[1]*i+a[5]*n+a[9]*s+a[13])/c,r[2]=(a[2]*i+a[6]*n+a[10]*s+a[14])/c,r}},264:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=a[0],f=a[1],g=a[2],v=a[3],T=v*i+f*s-g*n,l=v*n+g*i-c*s,_=v*s+c*n-f*i,w=-c*i-f*n-g*s;return r[0]=T*v+w*-c+l*-g-_*-f,r[1]=l*v+w*-f+_*-c-T*-g,r[2]=_*v+w*-g+T*-f-l*-c,r}},4361:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]+a[0],r[1]=o[1]+a[1],r[2]=o[2]+a[2],r[3]=o[3]+a[3],r}},2335:function(e){e.exports=t;function t(r){var o=new Float32Array(4);return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o}},2933:function(e){e.exports=t;function t(r,o){return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r}},7536:function(e){e.exports=t;function t(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},4691:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],i=o[1]-r[1],n=o[2]-r[2],s=o[3]-r[3];return Math.sqrt(a*a+i*i+n*n+s*s)}},1373:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]/a[0],r[1]=o[1]/a[1],r[2]=o[2]/a[2],r[3]=o[3]/a[3],r}},3750:function(e){e.exports=t;function t(r,o){return r[0]*o[0]+r[1]*o[1]+r[2]*o[2]+r[3]*o[3]}},3390:function(e){e.exports=t;function t(r,o,a,i){var n=new Float32Array(4);return n[0]=r,n[1]=o,n[2]=a,n[3]=i,n}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=t;function t(r,o){return r[0]=1/o[0],r[1]=1/o[1],r[2]=1/o[2],r[3]=1/o[3],r}},6808:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],i=r[2],n=r[3];return Math.sqrt(o*o+a*a+i*i+n*n)}},2573:function(e){e.exports=t;function t(r,o,a,i){var n=o[0],s=o[1],c=o[2],f=o[3];return r[0]=n+i*(a[0]-n),r[1]=s+i*(a[1]-s),r[2]=c+i*(a[2]-c),r[3]=f+i*(a[3]-f),r}},160:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.max(o[0],a[0]),r[1]=Math.max(o[1],a[1]),r[2]=Math.max(o[2],a[2]),r[3]=Math.max(o[3],a[3]),r}},2334:function(e){e.exports=t;function t(r,o,a){return r[0]=Math.min(o[0],a[0]),r[1]=Math.min(o[1],a[1]),r[2]=Math.min(o[2],a[2]),r[3]=Math.min(o[3],a[3]),r}},3576:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a[0],r[1]=o[1]*a[1],r[2]=o[2]*a[2],r[3]=o[3]*a[3],r}},1498:function(e){e.exports=t;function t(r,o){return r[0]=-o[0],r[1]=-o[1],r[2]=-o[2],r[3]=-o[3],r}},5177:function(e){e.exports=t;function t(r,o){var a=o[0],i=o[1],n=o[2],s=o[3],c=a*a+i*i+n*n+s*s;return c>0&&(c=1/Math.sqrt(c),r[0]=a*c,r[1]=i*c,r[2]=n*c,r[3]=s*c),r}},9131:function(e,t,r){var o=r(5177),a=r(9288);e.exports=i;function i(n,s){return s=s||1,n[0]=Math.random(),n[1]=Math.random(),n[2]=Math.random(),n[3]=Math.random(),o(n,n),a(n,n,s),n}},9288:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]*a,r[1]=o[1]*a,r[2]=o[2]*a,r[3]=o[3]*a,r}},4844:function(e){e.exports=t;function t(r,o,a,i){return r[0]=o[0]+a[0]*i,r[1]=o[1]+a[1]*i,r[2]=o[2]+a[2]*i,r[3]=o[3]+a[3]*i,r}},4578:function(e){e.exports=t;function t(r,o,a,i,n){return r[0]=o,r[1]=a,r[2]=i,r[3]=n,r}},7960:function(e){e.exports=t;function t(r,o){var a=o[0]-r[0],i=o[1]-r[1],n=o[2]-r[2],s=o[3]-r[3];return a*a+i*i+n*n+s*s}},483:function(e){e.exports=t;function t(r){var o=r[0],a=r[1],i=r[2],n=r[3];return o*o+a*a+i*i+n*n}},6860:function(e){e.exports=t;function t(r,o,a){return r[0]=o[0]-a[0],r[1]=o[1]-a[1],r[2]=o[2]-a[2],r[3]=o[3]-a[3],r}},5352:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=o[3];return r[0]=a[0]*i+a[4]*n+a[8]*s+a[12]*c,r[1]=a[1]*i+a[5]*n+a[9]*s+a[13]*c,r[2]=a[2]*i+a[6]*n+a[10]*s+a[14]*c,r[3]=a[3]*i+a[7]*n+a[11]*s+a[15]*c,r}},4041:function(e){e.exports=t;function t(r,o,a){var i=o[0],n=o[1],s=o[2],c=a[0],f=a[1],g=a[2],v=a[3],T=v*i+f*s-g*n,l=v*n+g*i-c*s,_=v*s+c*n-f*i,w=-c*i-f*n-g*s;return r[0]=T*v+w*-c+l*-g-_*-f,r[1]=l*v+w*-f+_*-c-T*-g,r[2]=_*v+w*-g+T*-f-l*-c,r[3]=o[3],r}},1848:function(e,t,r){var o=r(4905),a=r(6468);e.exports=i;function i(n){for(var s=Array.isArray(n)?n:o(n),c=0;c<s.length;c++){var f=s[c];if(f.type==="preprocessor"){var g=f.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(g&&g[2]){var v=g[1],T=g[2];return(v?a(T):T).trim()}}}}},5874:function(e,t,r){e.exports=h;var o=r(620),a=r(7827),i=r(6852),n=r(7932),s=r(3508),c=999,f=9999,g=0,v=1,T=2,l=3,_=4,w=5,S=6,E=7,y=8,b=9,p=10,u=11,m=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function h(P){var L=0,z=0,F=c,B,O,I=[],N=[],U=0,W=0,Q=1,ue=0,le=0,he=!1,G=!1,$="",J;P=P||{};var X=i,oe=o;P.version==="300 es"&&(X=s,oe=n);for(var ie={},j={},L=0;L<X.length;L++)ie[X[L]]=!0;for(var L=0;L<oe.length;L++)j[oe[L]]=!0;return function(fe){return N=[],fe!==null?re(fe):ce()};function ee(fe){fe.length&&N.push({type:m[F],data:fe,position:le,line:Q,column:ue})}function re(fe){L=0,fe.toString&&(fe=fe.toString()),$+=fe.replace(/\r\n/g,`
`),J=$.length;for(var Fe;B=$[L],L<J;){switch(Fe=L,F){case g:L=Xe();break;case v:L=Re();break;case T:L=ze();break;case l:L=it();break;case _:L=lt();break;case u:L=tt();break;case w:L=Ee();break;case f:L=_e();break;case b:L=Ae();break;case c:L=be();break}if(Fe!==L)switch($[Fe]){case`
`:ue=0,++Q;break;default:++ue;break}}return z+=L,$=$.slice(L),N}function ce(fe){return I.length&&ee(I.join("")),F=p,ee("(eof)"),N}function be(){return I=I.length?[]:I,O==="/"&&B==="*"?(le=z+L-1,F=g,O=B,L+1):O==="/"&&B==="/"?(le=z+L-1,F=v,O=B,L+1):B==="#"?(F=T,le=z+L,L):/\s/.test(B)?(F=b,le=z+L,L):(he=/\d/.test(B),G=/[^\w_]/.test(B),le=z+L,F=he?_:G?l:f,L)}function Ae(){return/[^\s]/g.test(B)?(ee(I.join("")),F=c,L):(I.push(B),O=B,L+1)}function ze(){return(B==="\r"||B===`
`)&&O!=="\\"?(ee(I.join("")),F=c,L):(I.push(B),O=B,L+1)}function Re(){return ze()}function Xe(){return B==="/"&&O==="*"?(I.push(B),ee(I.join("")),F=c,L+1):(I.push(B),O=B,L+1)}function it(){if(O==="."&&/\d/.test(B))return F=w,L;if(O==="/"&&B==="*")return F=g,L;if(O==="/"&&B==="/")return F=v,L;if(B==="."&&I.length){for(;ot(I););return F=w,L}if(B===";"||B===")"||B==="("){if(I.length)for(;ot(I););return ee(B),F=c,L+1}var fe=I.length===2&&B!=="=";if(/[\w_\d\s]/.test(B)||fe){for(;ot(I););return F=c,L}return I.push(B),O=B,L+1}function ot(fe){var Fe=0,rt,st;do{if(rt=a.indexOf(fe.slice(0,fe.length+Fe).join("")),st=a[rt],rt===-1){if(Fe--+fe.length>0)continue;st=fe.slice(0,1).join("")}return ee(st),le+=st.length,I=I.slice(st.length),I.length}while(!0)}function tt(){return/[^a-fA-F0-9]/.test(B)?(ee(I.join("")),F=c,L):(I.push(B),O=B,L+1)}function lt(){return B==="."||/[eE]/.test(B)?(I.push(B),F=w,O=B,L+1):B==="x"&&I.length===1&&I[0]==="0"?(F=u,I.push(B),O=B,L+1):/[^\d]/.test(B)?(ee(I.join("")),F=c,L):(I.push(B),O=B,L+1)}function Ee(){return B==="f"&&(I.push(B),O=B,L+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(O)?(I.push(B),O=B,L+1):/[^\d]/.test(B)?(ee(I.join("")),F=c,L):(I.push(B),O=B,L+1)}function _e(){if(/[^\d\w_]/.test(B)){var fe=I.join("");return j[fe]?F=y:ie[fe]?F=E:F=S,ee(I.join("")),F=c,L}return I.push(B),O=B,L+1}}},3508:function(e,t,r){var o=r(6852);o=o.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),e.exports=o.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(e){e.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(e,t,r){var o=r(620);e.exports=o.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(e){e.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(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var o=r(5874);e.exports=a;function a(i,n){var s=o(n),c=[];return c=c.concat(s(i)),c=c.concat(s(null)),c}},3236:function(e){e.exports=function(t){typeof t=="string"&&(t=[t]);for(var r=[].slice.call(arguments,1),o=[],a=0;a<t.length-1;a++)o.push(t[a],r[a]||"");return o.push(t[a]),o.join("")}},7520:function(e,t,r){"use strict";var o=r(9507);function a(){var i=!1;try{var n=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch{i=!1}return i}e.exports=o&&a()},3778:function(e,t){t.read=function(r,o,a,i,n){var s,c,f=n*8-i-1,g=(1<<f)-1,v=g>>1,T=-7,l=a?n-1:0,_=a?-1:1,w=r[o+l];for(l+=_,s=w&(1<<-T)-1,w>>=-T,T+=f;T>0;s=s*256+r[o+l],l+=_,T-=8);for(c=s&(1<<-T)-1,s>>=-T,T+=i;T>0;c=c*256+r[o+l],l+=_,T-=8);if(s===0)s=1-v;else{if(s===g)return c?NaN:(w?-1:1)*(1/0);c=c+Math.pow(2,i),s=s-v}return(w?-1:1)*c*Math.pow(2,s-i)},t.write=function(r,o,a,i,n,s){var c,f,g,v=s*8-n-1,T=(1<<v)-1,l=T>>1,_=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=i?0:s-1,S=i?1:-1,E=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(f=isNaN(o)?1:0,c=T):(c=Math.floor(Math.log(o)/Math.LN2),o*(g=Math.pow(2,-c))<1&&(c--,g*=2),c+l>=1?o+=_/g:o+=_*Math.pow(2,1-l),o*g>=2&&(c++,g/=2),c+l>=T?(f=0,c=T):c+l>=1?(f=(o*g-1)*Math.pow(2,n),c=c+l):(f=o*Math.pow(2,l-1)*Math.pow(2,n),c=0));n>=8;r[a+w]=f&255,w+=S,f/=256,n-=8);for(c=c<<n|f,v+=n;v>0;r[a+w]=c&255,w+=S,c/=256,v-=8);r[a+w-S]|=E*128}},8954:function(e,t,r){"use strict";e.exports=l;var o=r(3250),a=r(6803).Fw;function i(_,w,S){this.vertices=_,this.adjacent=w,this.boundary=S,this.lastVisited=-1}i.prototype.flip=function(){var _=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=_;var w=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=w};function n(_,w,S){this.vertices=_,this.cell=w,this.index=S}function s(_,w){return a(_.vertices,w.vertices)}function c(_){return function(){var w=this.tuple;return _.apply(this,w)}}function f(_){var w=o[_+1];return w||(w=o),c(w)}var g=[];function v(_,w,S){this.dimension=_,this.vertices=w,this.simplices=S,this.interior=S.filter(function(b){return!b.boundary}),this.tuple=new Array(_+1);for(var E=0;E<=_;++E)this.tuple[E]=this.vertices[E];var y=g[_];y||(y=g[_]=f(_)),this.orient=y}var T=v.prototype;T.handleBoundaryDegeneracy=function(_,w){var S=this.dimension,E=this.vertices.length-1,y=this.tuple,b=this.vertices,p=[_];for(_.lastVisited=-E;p.length>0;){_=p.pop();for(var u=_.adjacent,m=0;m<=S;++m){var h=u[m];if(!(!h.boundary||h.lastVisited<=-E)){for(var P=h.vertices,L=0;L<=S;++L){var z=P[L];z<0?y[L]=w:y[L]=b[z]}var F=this.orient();if(F>0)return h;h.lastVisited=-E,F===0&&p.push(h)}}}return null},T.walk=function(_,w){var S=this.vertices.length-1,E=this.dimension,y=this.vertices,b=this.tuple,p=w?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[p];e:for(;!u.boundary;){for(var m=u.vertices,h=u.adjacent,P=0;P<=E;++P)b[P]=y[m[P]];u.lastVisited=S;for(var P=0;P<=E;++P){var L=h[P];if(!(L.lastVisited>=S)){var z=b[P];b[P]=_;var F=this.orient();if(b[P]=z,F<0){u=L;continue e}else L.boundary?L.lastVisited=-S:L.lastVisited=S}}return}return u},T.addPeaks=function(_,w){var S=this.vertices.length-1,E=this.dimension,y=this.vertices,b=this.tuple,p=this.interior,u=this.simplices,m=[w];w.lastVisited=S,w.vertices[w.vertices.indexOf(-1)]=S,w.boundary=!1,p.push(w);for(var h=[];m.length>0;){var w=m.pop(),P=w.vertices,L=w.adjacent,z=P.indexOf(S);if(!(z<0)){for(var F=0;F<=E;++F)if(F!==z){var B=L[F];if(!(!B.boundary||B.lastVisited>=S)){var O=B.vertices;if(B.lastVisited!==-S){for(var I=0,N=0;N<=E;++N)O[N]<0?(I=N,b[N]=_):b[N]=y[O[N]];var U=this.orient();if(U>0){O[I]=S,B.boundary=!1,p.push(B),m.push(B),B.lastVisited=S;continue}else B.lastVisited=-S}var W=B.adjacent,Q=P.slice(),ue=L.slice(),le=new i(Q,ue,!0);u.push(le);var he=W.indexOf(w);if(!(he<0)){W[he]=le,ue[z]=B,Q[F]=-1,ue[F]=w,L[F]=le,le.flip();for(var N=0;N<=E;++N){var G=Q[N];if(!(G<0||G===S)){for(var $=new Array(E-1),J=0,X=0;X<=E;++X){var oe=Q[X];oe<0||X===N||($[J++]=oe)}h.push(new n($,le,N))}}}}}}}h.sort(s);for(var F=0;F+1<h.length;F+=2){var ie=h[F],j=h[F+1],ee=ie.index,re=j.index;ee<0||re<0||(ie.cell.adjacent[ie.index]=j.cell,j.cell.adjacent[j.index]=ie.cell)}},T.insert=function(_,w){var S=this.vertices;S.push(_);var E=this.walk(_,w);if(E){for(var y=this.dimension,b=this.tuple,p=0;p<=y;++p){var u=E.vertices[p];u<0?b[p]=_:b[p]=S[u]}var m=this.orient(b);m<0||m===0&&(E=this.handleBoundaryDegeneracy(E,_),!E)||this.addPeaks(_,E)}},T.boundary=function(){for(var _=this.dimension,w=[],S=this.simplices,E=S.length,y=0;y<E;++y){var b=S[y];if(b.boundary){for(var p=new Array(_),u=b.vertices,m=0,h=0,P=0;P<=_;++P)u[P]>=0?p[m++]=u[P]:h=P&1;if(h===(_&1)){var L=p[0];p[0]=p[1],p[1]=L}w.push(p)}}return w};function l(_,w){var S=_.length;if(S===0)throw new Error("Must have at least d+1 points");var E=_[0].length;if(S<=E)throw new Error("Must input at least d+1 points");var y=_.slice(0,E+1),b=o.apply(void 0,y);if(b===0)throw new Error("Input not in general position");for(var p=new Array(E+1),u=0;u<=E;++u)p[u]=u;b<0&&(p[0]=1,p[1]=0);for(var m=new i(p,new Array(E+1),!1),h=m.adjacent,P=new Array(E+2),u=0;u<=E;++u){for(var L=p.slice(),z=0;z<=E;++z)z===u&&(L[z]=-1);var F=L[0];L[0]=L[1],L[1]=F;var B=new i(L,new Array(E+1),!0);h[u]=B,P[u]=B}P[E+1]=m;for(var u=0;u<=E;++u)for(var L=h[u].vertices,O=h[u].adjacent,z=0;z<=E;++z){var I=L[z];if(I<0){O[z]=m;continue}for(var N=0;N<=E;++N)h[N].vertices.indexOf(I)<0&&(O[z]=h[N])}for(var U=new v(E,y,P),W=!!w,u=E+1;u<S;++u)U.insert(_[u],W);return U.boundary()}},3352:function(e,t,r){"use strict";var o=r(2478),a=0,i=1,n=2;e.exports=m;function s(h,P,L,z,F){this.mid=h,this.left=P,this.right=L,this.leftPoints=z,this.rightPoints=F,this.count=(P?P.count:0)+(L?L.count:0)+z.length}var c=s.prototype;function f(h,P){h.mid=P.mid,h.left=P.left,h.right=P.right,h.leftPoints=P.leftPoints,h.rightPoints=P.rightPoints,h.count=P.count}function g(h,P){var L=b(P);h.mid=L.mid,h.left=L.left,h.right=L.right,h.leftPoints=L.leftPoints,h.rightPoints=L.rightPoints,h.count=L.count}function v(h,P){var L=h.intervals([]);L.push(P),g(h,L)}function T(h,P){var L=h.intervals([]),z=L.indexOf(P);return z<0?a:(L.splice(z,1),g(h,L),i)}c.intervals=function(h){return h.push.apply(h,this.leftPoints),this.left&&this.left.intervals(h),this.right&&this.right.intervals(h),h},c.insert=function(h){var P=this.count-this.leftPoints.length;if(this.count+=1,h[1]<this.mid)this.left?4*(this.left.count+1)>3*(P+1)?v(this,h):this.left.insert(h):this.left=b([h]);else if(h[0]>this.mid)this.right?4*(this.right.count+1)>3*(P+1)?v(this,h):this.right.insert(h):this.right=b([h]);else{var L=o.ge(this.leftPoints,h,E),z=o.ge(this.rightPoints,h,y);this.leftPoints.splice(L,0,h),this.rightPoints.splice(z,0,h)}},c.remove=function(h){var P=this.count-this.leftPoints;if(h[1]<this.mid){if(!this.left)return a;var L=this.right?this.right.count:0;if(4*L>3*(P-1))return T(this,h);var z=this.left.remove(h);return z===n?(this.left=null,this.count-=1,i):(z===i&&(this.count-=1),z)}else if(h[0]>this.mid){if(!this.right)return a;var F=this.left?this.left.count:0;if(4*F>3*(P-1))return T(this,h);var z=this.right.remove(h);return z===n?(this.right=null,this.count-=1,i):(z===i&&(this.count-=1),z)}else{if(this.count===1)return this.leftPoints[0]===h?n:a;if(this.leftPoints.length===1&&this.leftPoints[0]===h){if(this.left&&this.right){for(var B=this,O=this.left;O.right;)B=O,O=O.right;if(B===this)O.right=this.right;else{var I=this.left,z=this.right;B.count-=O.count,B.right=O.left,O.left=I,O.right=z}f(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?f(this,this.left):f(this,this.right);return i}for(var I=o.ge(this.leftPoints,h,E);I<this.leftPoints.length&&this.leftPoints[I][0]===h[0];++I)if(this.leftPoints[I]===h){this.count-=1,this.leftPoints.splice(I,1);for(var z=o.ge(this.rightPoints,h,y);z<this.rightPoints.length&&this.rightPoints[z][1]===h[1];++z)if(this.rightPoints[z]===h)return this.rightPoints.splice(z,1),i}return a}};function l(h,P,L){for(var z=0;z<h.length&&h[z][0]<=P;++z){var F=L(h[z]);if(F)return F}}function _(h,P,L){for(var z=h.length-1;z>=0&&h[z][1]>=P;--z){var F=L(h[z]);if(F)return F}}function w(h,P){for(var L=0;L<h.length;++L){var z=P(h[L]);if(z)return z}}c.queryPoint=function(h,P){if(h<this.mid){if(this.left){var L=this.left.queryPoint(h,P);if(L)return L}return l(this.leftPoints,h,P)}else if(h>this.mid){if(this.right){var L=this.right.queryPoint(h,P);if(L)return L}return _(this.rightPoints,h,P)}else return w(this.leftPoints,P)},c.queryInterval=function(h,P,L){if(h<this.mid&&this.left){var z=this.left.queryInterval(h,P,L);if(z)return z}if(P>this.mid&&this.right){var z=this.right.queryInterval(h,P,L);if(z)return z}return P<this.mid?l(this.leftPoints,P,L):h>this.mid?_(this.rightPoints,h,L):w(this.leftPoints,L)};function S(h,P){return h-P}function E(h,P){var L=h[0]-P[0];return L||h[1]-P[1]}function y(h,P){var L=h[1]-P[1];return L||h[0]-P[0]}function b(h){if(h.length===0)return null;for(var P=[],L=0;L<h.length;++L)P.push(h[L][0],h[L][1]);P.sort(S);for(var z=P[P.length>>1],F=[],B=[],O=[],L=0;L<h.length;++L){var I=h[L];I[1]<z?F.push(I):z<I[0]?B.push(I):O.push(I)}var N=O,U=O.slice();return N.sort(E),U.sort(y),new s(z,b(F),b(B),N,U)}function p(h){this.root=h}var u=p.prototype;u.insert=function(h){this.root?this.root.insert(h):this.root=new s(h[0],null,null,[h],[h])},u.remove=function(h){if(this.root){var P=this.root.remove(h);return P===n&&(this.root=null),P!==a}return!1},u.queryPoint=function(h,P){if(this.root)return this.root.queryPoint(h,P)},u.queryInterval=function(h,P,L){if(h<=P&&this.root)return this.root.queryInterval(h,P,L)},Object.defineProperty(u,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(u,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function m(h){return!h||h.length===0?new p(null):new p(b(h))}},9507:function(e){e.exports=!0},7163:function(e){e.exports=function(o){return o!=null&&(t(o)||r(o)||!!o._isBuffer)};function t(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}function r(o){return typeof o.readFloatLE=="function"&&typeof o.slice=="function"&&t(o.slice(0,0))}},5219:function(e){"use strict";e.exports=function(t){for(var r=t.length,o,a=0;a<r;a++)if(o=t.charCodeAt(a),(o<9||o>13)&&o!==32&&o!==133&&o!==160&&o!==5760&&o!==6158&&(o<8192||o>8205)&&o!==8232&&o!==8233&&o!==8239&&o!==8287&&o!==8288&&o!==12288&&o!==65279)return!1;return!0}},395:function(e){function t(r,o,a){return r*(1-a)+o*a}e.exports=t},2652:function(e,t,r){var o=r(4335),a=r(6864),i=r(1903),n=r(9921),s=r(7608),c=r(5665),f={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},g=a(),v=a(),T=[0,0,0,0],l=[[0,0,0],[0,0,0],[0,0,0]],_=[0,0,0];e.exports=function(b,p,u,m,h,P){if(p||(p=[0,0,0]),u||(u=[0,0,0]),m||(m=[0,0,0]),h||(h=[0,0,0,1]),P||(P=[0,0,0,1]),!o(g,b)||(i(v,g),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(n(v)<1e-8)))return!1;var L=g[3],z=g[7],F=g[11],B=g[12],O=g[13],I=g[14],N=g[15];if(L!==0||z!==0||F!==0){T[0]=L,T[1]=z,T[2]=F,T[3]=N;var U=s(v,v);if(!U)return!1;c(v,v),w(h,T,v)}else h[0]=h[1]=h[2]=0,h[3]=1;if(p[0]=B,p[1]=O,p[2]=I,S(l,g),u[0]=f.length(l[0]),f.normalize(l[0],l[0]),m[0]=f.dot(l[0],l[1]),E(l[1],l[1],l[0],1,-m[0]),u[1]=f.length(l[1]),f.normalize(l[1],l[1]),m[0]/=u[1],m[1]=f.dot(l[0],l[2]),E(l[2],l[2],l[0],1,-m[1]),m[2]=f.dot(l[1],l[2]),E(l[2],l[2],l[1],1,-m[2]),u[2]=f.length(l[2]),f.normalize(l[2],l[2]),m[1]/=u[2],m[2]/=u[2],f.cross(_,l[1],l[2]),f.dot(l[0],_)<0)for(var W=0;W<3;W++)u[W]*=-1,l[W][0]*=-1,l[W][1]*=-1,l[W][2]*=-1;return P[0]=.5*Math.sqrt(Math.max(1+l[0][0]-l[1][1]-l[2][2],0)),P[1]=.5*Math.sqrt(Math.max(1-l[0][0]+l[1][1]-l[2][2],0)),P[2]=.5*Math.sqrt(Math.max(1-l[0][0]-l[1][1]+l[2][2],0)),P[3]=.5*Math.sqrt(Math.max(1+l[0][0]+l[1][1]+l[2][2],0)),l[2][1]>l[1][2]&&(P[0]=-P[0]),l[0][2]>l[2][0]&&(P[1]=-P[1]),l[1][0]>l[0][1]&&(P[2]=-P[2]),!0};function w(y,b,p){var u=b[0],m=b[1],h=b[2],P=b[3];return y[0]=p[0]*u+p[4]*m+p[8]*h+p[12]*P,y[1]=p[1]*u+p[5]*m+p[9]*h+p[13]*P,y[2]=p[2]*u+p[6]*m+p[10]*h+p[14]*P,y[3]=p[3]*u+p[7]*m+p[11]*h+p[15]*P,y}function S(y,b){y[0][0]=b[0],y[0][1]=b[1],y[0][2]=b[2],y[1][0]=b[4],y[1][1]=b[5],y[1][2]=b[6],y[2][0]=b[8],y[2][1]=b[9],y[2][2]=b[10]}function E(y,b,p,u,m){y[0]=b[0]*u+p[0]*m,y[1]=b[1]*u+p[1]*m,y[2]=b[2]*u+p[2]*m}},4335:function(e){e.exports=function(r,o){var a=o[15];if(a===0)return!1;for(var i=1/a,n=0;n<16;n++)r[n]=o[n]*i;return!0}},7442:function(e,t,r){var o=r(6658),a=r(7182),i=r(2652),n=r(9921),s=r(8648),c=T(),f=T(),g=T();e.exports=v;function v(w,S,E,y){if(n(S)===0||n(E)===0)return!1;var b=i(S,c.translate,c.scale,c.skew,c.perspective,c.quaternion),p=i(E,f.translate,f.scale,f.skew,f.perspective,f.quaternion);return!b||!p?!1:(o(g.translate,c.translate,f.translate,y),o(g.skew,c.skew,f.skew,y),o(g.scale,c.scale,f.scale,y),o(g.perspective,c.perspective,f.perspective,y),s(g.quaternion,c.quaternion,f.quaternion,y),a(w,g.translate,g.scale,g.skew,g.perspective,g.quaternion),!0)}function T(){return{translate:l(),scale:l(1),skew:l(),perspective:_(),quaternion:_()}}function l(w){return[w||0,w||0,w||0]}function _(){return[0,0,0,1]}},7182:function(e,t,r){var o={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},a=o.create(),i=o.create();e.exports=function(s,c,f,g,v,T){return o.identity(s),o.fromRotationTranslation(s,T,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],o.identity(i),g[2]!==0&&(i[9]=g[2],o.multiply(s,s,i)),g[1]!==0&&(i[9]=0,i[8]=g[1],o.multiply(s,s,i)),g[0]!==0&&(i[8]=0,i[4]=g[0],o.multiply(s,s,i)),o.scale(s,s,f),s}},1811:function(e,t,r){"use strict";var o=r(2478),a=r(7442),i=r(7608),n=r(5567),s=r(2408),c=r(7089),f=r(6582),g=r(7656),v=r(2504),T=r(3536),l=[0,0,0];e.exports=E;function _(y){this._components=y.slice(),this._time=[0],this.prevMatrix=y.slice(),this.nextMatrix=y.slice(),this.computedMatrix=y.slice(),this.computedInverse=y.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 w=_.prototype;w.recalcMatrix=function(y){var b=this._time,p=o.le(b,y),u=this.computedMatrix;if(!(p<0)){var m=this._components;if(p===b.length-1)for(var h=16*p,P=0;P<16;++P)u[P]=m[h++];else{for(var L=b[p+1]-b[p],h=16*p,z=this.prevMatrix,F=!0,P=0;P<16;++P)z[P]=m[h++];for(var B=this.nextMatrix,P=0;P<16;++P)B[P]=m[h++],F=F&&z[P]===B[P];if(L<1e-6||F)for(var P=0;P<16;++P)u[P]=z[P];else a(u,z,B,(y-b[p])/L)}var O=this.computedUp;O[0]=u[1],O[1]=u[5],O[2]=u[9],T(O,O);var I=this.computedInverse;i(I,u);var N=this.computedEye,U=I[15];N[0]=I[12]/U,N[1]=I[13]/U,N[2]=I[14]/U;for(var W=this.computedCenter,Q=Math.exp(this.computedRadius[0]),P=0;P<3;++P)W[P]=N[P]-u[2+4*P]*Q}},w.idle=function(y){if(!(y<this.lastT())){for(var b=this._components,p=b.length-16,u=0;u<16;++u)b.push(b[p++]);this._time.push(y)}},w.flush=function(y){var b=o.gt(this._time,y)-2;b<0||(this._time.splice(0,b),this._components.splice(0,16*b))},w.lastT=function(){return this._time[this._time.length-1]},w.lookAt=function(y,b,p,u){this.recalcMatrix(y),b=b||this.computedEye,p=p||l,u=u||this.computedUp,this.setMatrix(y,f(this.computedMatrix,b,p,u));for(var m=0,h=0;h<3;++h)m+=Math.pow(p[h]-b[h],2);m=Math.log(Math.sqrt(m)),this.computedRadius[0]=m},w.rotate=function(y,b,p,u){this.recalcMatrix(y);var m=this.computedInverse;b&&s(m,m,b),p&&n(m,m,p),u&&c(m,m,u),this.setMatrix(y,i(this.computedMatrix,m))};var S=[0,0,0];w.pan=function(y,b,p,u){S[0]=-(b||0),S[1]=-(p||0),S[2]=-(u||0),this.recalcMatrix(y);var m=this.computedInverse;g(m,m,S),this.setMatrix(y,i(m,m))},w.translate=function(y,b,p,u){S[0]=b||0,S[1]=p||0,S[2]=u||0,this.recalcMatrix(y);var m=this.computedMatrix;g(m,m,S),this.setMatrix(y,m)},w.setMatrix=function(y,b){if(!(y<this.lastT())){this._time.push(y);for(var p=0;p<16;++p)this._components.push(b[p])}},w.setDistance=function(y,b){this.computedRadius[0]=b},w.setDistanceLimits=function(y,b){var p=this._limits;p[0]=y,p[1]=b},w.getDistanceLimits=function(y){var b=this._limits;return y?(y[0]=b[0],y[1]=b[1],y):b};function E(y){y=y||{};var b=y.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new _(b)}},3090:function(e,t,r){"use strict";e.exports=a;var o=r(3250)[3];function a(i){var n=i.length;if(n<3){for(var _=new Array(n),s=0;s<n;++s)_[s]=s;return n===2&&i[0][0]===i[1][0]&&i[0][1]===i[1][1]?[0]:_}for(var c=new Array(n),s=0;s<n;++s)c[s]=s;c.sort(function(y,b){var p=i[y][0]-i[b][0];return p||i[y][1]-i[b][1]});for(var f=[c[0],c[1]],g=[c[0],c[1]],s=2;s<n;++s){for(var v=c[s],T=i[v],l=f.length;l>1&&o(i[f[l-2]],i[f[l-1]],T)<=0;)l-=1,f.pop();for(f.push(v),l=g.length;l>1&&o(i[g[l-2]],i[g[l-1]],T)>=0;)l-=1,g.pop();g.push(v)}for(var _=new Array(g.length+f.length-2),w=0,s=0,S=f.length;s<S;++s)_[w++]=f[s];for(var E=g.length-2;E>0;--E)_[w++]=g[E];return _}},351:function(e,t,r){"use strict";e.exports=a;var o=r(4687);function a(i,n){n||(n=i,i=window);var s=0,c=0,f=0,g={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function T(h){var P=!1;return"altKey"in h&&(P=P||h.altKey!==g.alt,g.alt=!!h.altKey),"shiftKey"in h&&(P=P||h.shiftKey!==g.shift,g.shift=!!h.shiftKey),"ctrlKey"in h&&(P=P||h.ctrlKey!==g.control,g.control=!!h.ctrlKey),"metaKey"in h&&(P=P||h.metaKey!==g.meta,g.meta=!!h.metaKey),P}function l(h,P){var L=o.x(P),z=o.y(P);"buttons"in P&&(h=P.buttons|0),(h!==s||L!==c||z!==f||T(P))&&(s=h|0,c=L||0,f=z||0,n&&n(s,c,f,g))}function _(h){l(0,h)}function w(){(s||c||f||g.shift||g.alt||g.meta||g.control)&&(c=f=0,s=0,g.shift=g.alt=g.control=g.meta=!1,n&&n(0,0,0,g))}function S(h){T(h)&&n&&n(s,c,f,g)}function E(h){o.buttons(h)===0?l(0,h):l(s,h)}function y(h){l(s|o.buttons(h),h)}function b(h){l(s&~o.buttons(h),h)}function p(){v||(v=!0,i.addEventListener("mousemove",E),i.addEventListener("mousedown",y),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",_),i.addEventListener("mouseenter",_),i.addEventListener("mouseout",_),i.addEventListener("mouseover",_),i.addEventListener("blur",w),i.addEventListener("keyup",S),i.addEventListener("keydown",S),i.addEventListener("keypress",S),i!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",S),window.addEventListener("keydown",S),window.addEventListener("keypress",S)))}function u(){v&&(v=!1,i.removeEventListener("mousemove",E),i.removeEventListener("mousedown",y),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",_),i.removeEventListener("mouseenter",_),i.removeEventListener("mouseout",_),i.removeEventListener("mouseover",_),i.removeEventListener("blur",w),i.removeEventListener("keyup",S),i.removeEventListener("keydown",S),i.removeEventListener("keypress",S),i!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",S),window.removeEventListener("keydown",S),window.removeEventListener("keypress",S)))}p();var m={element:i};return Object.defineProperties(m,{enabled:{get:function(){return v},set:function(h){h?p():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),m}},24:function(e){var t={left:0,top:0};e.exports=r;function r(a,i,n){i=i||a.currentTarget||a.srcElement,Array.isArray(n)||(n=[0,0]);var s=a.clientX||0,c=a.clientY||0,f=o(i);return n[0]=s-f.left,n[1]=c-f.top,n}function o(a){return a===window||a===document||a===document.body?t:a.getBoundingClientRect()}},4687:function(e,t){"use strict";function r(n){if(typeof n=="object"){if("buttons"in n)return n.buttons;if("which"in n){var s=n.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<<s-1}else if("button"in n){var s=n.button;if(s===1)return 4;if(s===2)return 2;if(s>=0)return 1<<s}}return 0}t.buttons=r;function o(n){return n.target||n.srcElement||window}t.element=o;function a(n){if(typeof n=="object"){if("offsetX"in n)return n.offsetX;var s=o(n),c=s.getBoundingClientRect();return n.clientX-c.left}return 0}t.x=a;function i(n){if(typeof n=="object"){if("offsetY"in n)return n.offsetY;var s=o(n),c=s.getBoundingClientRect();return n.clientY-c.top}return 0}t.y=i},8512:function(e,t,r){"use strict";var o=r(665);e.exports=a;function a(i,n,s){typeof i=="function"&&(s=!!n,n=i,i=window);var c=o("ex",i),f=function(g){s&&g.preventDefault();var v=g.deltaX||0,T=g.deltaY||0,l=g.deltaZ||0,_=g.deltaMode,w=1;switch(_){case 1:w=c;break;case 2:w=window.innerHeight;break}if(v*=w,T*=w,l*=w,v||T||l)return n(v,T,l,g)};return i.addEventListener("wheel",f),f}},2640:function(e,t,r){"use strict";var o=r(1888);e.exports=n;var a={"false,0,1":function(c,f,g,v,T){return function(_,w,S,E){var y=_.shape[0]|0,b=_.shape[1]|0,p=_.data,u=_.offset|0,m=_.stride[0]|0,h=_.stride[1]|0,P=u,L,z=-m|0,F=0,B=-h|0,O=0,I=-m-h|0,N=0,U=m|0,W=h-m*y|0,Q=0,ue=0,le=0,he=2*y|0,G=v(he),$=v(he),J=0,X=0,oe=-1,ie=-1,j=0,ee=-y|0,re=y|0,ce=0,be=-y-1|0,Ae=y-1|0,ze=0,Re=0,Xe=0;for(Q=0;Q<y;++Q)G[J++]=g(p[P],w,S,E),P+=U;if(P+=W,b>0){if(ue=1,G[J++]=g(p[P],w,S,E),P+=U,y>0)for(Q=1,L=p[P],X=G[J]=g(L,w,S,E),j=G[J+oe],ce=G[J+ee],ze=G[J+be],(X!==j||X!==ce||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,j,ce,ze,w,S,E),Re=$[J]=le++),J+=1,P+=U,Q=2;Q<y;++Q)L=p[P],X=G[J]=g(L,w,S,E),j=G[J+oe],ce=G[J+ee],ze=G[J+be],(X!==j||X!==ce||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,j,ce,ze,w,S,E),Re=$[J]=le++,ze!==j&&f($[J+oe],Re,N,F,ze,j,w,S,E)),J+=1,P+=U;for(P+=W,J=0,Xe=oe,oe=ie,ie=Xe,Xe=ee,ee=re,re=Xe,Xe=be,be=Ae,Ae=Xe,ue=2;ue<b;++ue){if(G[J++]=g(p[P],w,S,E),P+=U,y>0)for(Q=1,L=p[P],X=G[J]=g(L,w,S,E),j=G[J+oe],ce=G[J+ee],ze=G[J+be],(X!==j||X!==ce||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,j,ce,ze,w,S,E),Re=$[J]=le++,ze!==ce&&f($[J+ee],Re,O,N,ce,ze,w,S,E)),J+=1,P+=U,Q=2;Q<y;++Q)L=p[P],X=G[J]=g(L,w,S,E),j=G[J+oe],ce=G[J+ee],ze=G[J+be],(X!==j||X!==ce||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,j,ce,ze,w,S,E),Re=$[J]=le++,ze!==ce&&f($[J+ee],Re,O,N,ce,ze,w,S,E),ze!==j&&f($[J+oe],Re,N,F,ze,j,w,S,E)),J+=1,P+=U;ue&1&&(J=0),Xe=oe,oe=ie,ie=Xe,Xe=ee,ee=re,re=Xe,Xe=be,be=Ae,Ae=Xe,P+=W}}T($),T(G)}},"false,1,0":function(c,f,g,v,T){return function(_,w,S,E){var y=_.shape[0]|0,b=_.shape[1]|0,p=_.data,u=_.offset|0,m=_.stride[0]|0,h=_.stride[1]|0,P=u,L,z=-m|0,F=0,B=-h|0,O=0,I=-m-h|0,N=0,U=h|0,W=m-h*b|0,Q=0,ue=0,le=0,he=2*b|0,G=v(he),$=v(he),J=0,X=0,oe=-1,ie=-1,j=0,ee=-b|0,re=b|0,ce=0,be=-b-1|0,Ae=b-1|0,ze=0,Re=0,Xe=0;for(ue=0;ue<b;++ue)G[J++]=g(p[P],w,S,E),P+=U;if(P+=W,y>0){if(Q=1,G[J++]=g(p[P],w,S,E),P+=U,b>0)for(ue=1,L=p[P],X=G[J]=g(L,w,S,E),ce=G[J+ee],j=G[J+oe],ze=G[J+be],(X!==ce||X!==j||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,ce,j,ze,w,S,E),Re=$[J]=le++),J+=1,P+=U,ue=2;ue<b;++ue)L=p[P],X=G[J]=g(L,w,S,E),ce=G[J+ee],j=G[J+oe],ze=G[J+be],(X!==ce||X!==j||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,ce,j,ze,w,S,E),Re=$[J]=le++,ze!==j&&f($[J+oe],Re,O,N,j,ze,w,S,E)),J+=1,P+=U;for(P+=W,J=0,Xe=ee,ee=re,re=Xe,Xe=oe,oe=ie,ie=Xe,Xe=be,be=Ae,Ae=Xe,Q=2;Q<y;++Q){if(G[J++]=g(p[P],w,S,E),P+=U,b>0)for(ue=1,L=p[P],X=G[J]=g(L,w,S,E),ce=G[J+ee],j=G[J+oe],ze=G[J+be],(X!==ce||X!==j||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,ce,j,ze,w,S,E),Re=$[J]=le++,ze!==ce&&f($[J+ee],Re,N,F,ze,ce,w,S,E)),J+=1,P+=U,ue=2;ue<b;++ue)L=p[P],X=G[J]=g(L,w,S,E),ce=G[J+ee],j=G[J+oe],ze=G[J+be],(X!==ce||X!==j||X!==ze)&&(F=p[P+z],O=p[P+B],N=p[P+I],c(Q,ue,L,F,O,N,X,ce,j,ze,w,S,E),Re=$[J]=le++,ze!==j&&f($[J+oe],Re,O,N,j,ze,w,S,E),ze!==ce&&f($[J+ee],Re,N,F,ze,ce,w,S,E)),J+=1,P+=U;Q&1&&(J=0),Xe=ee,ee=re,re=Xe,Xe=oe,oe=ie,ie=Xe,Xe=be,be=Ae,Ae=Xe,P+=W}}T($),T(G)}}};function i(s,c,f,g,v,T){var l=[T,v].join(","),_=a[l];return _(s,c,f,o.mallocUint32,o.freeUint32)}function n(s){function c(w){throw new Error("ndarray-extract-contour: "+w)}typeof s!="object"&&c("Must specify arguments");var f=s.order;Array.isArray(f)||c("Must specify order");var g=s.arrayArguments||1;g<1&&c("Must have at least one array argument");var v=s.scalarArguments||0;v<0&&c("Scalar arg count must be > 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var T=s.getters||[],l=new Array(g),_=0;_<g;++_)T.indexOf(_)>=0?l[_]=!0:l[_]=!1;return i(s.vertex,s.cell,s.phase,v,f,l)}},6199:function(e,t,r){"use strict";var o=r(1338),a={zero:function(E,y,b,p){var u=E[0],m=b[0];p|=0;var h=0,P=m;for(h=0;h<u;++h)y[p]=0,p+=P},fdTemplate1:function(E,y,b,p,u,m,h){var P=E[0],L=b[0],z=m[0],F=-1*L,B=L;p|=0,h|=0;var O=0,I=L,N=z;for(O=0;O<P;++O)u[h]=.5*(y[p+F]-y[p+B]),p+=I,h+=N},fdTemplate2:function(E,y,b,p,u,m,h,P,L,z){var F=E[0],B=E[1],O=b[0],I=b[1],N=m[0],U=m[1],W=L[0],Q=L[1],ue=-1*O,le=O,he=-1*I,G=I;p|=0,h|=0,z|=0;var $=0,J=0,X=I,oe=O-B*I,ie=U,j=N-B*U,ee=Q,re=W-B*Q;for(J=0;J<F;++J){for($=0;$<B;++$)u[h]=.5*(y[p+ue]-y[p+le]),P[z]=.5*(y[p+he]-y[p+G]),p+=X,h+=ie,z+=ee;p+=oe,h+=j,z+=re}}},i={cdiff:function(E){var y={};return function(p,u,m){var h=p.dtype,P=p.order,L=u.dtype,z=u.order,F=m.dtype,B=m.order,O=[h,P.join(),L,z.join(),F,B.join()].join(),I=y[O];return I||(y[O]=I=E([h,P,L,z,F,B])),I(p.shape.slice(0),p.data,p.stride,p.offset|0,u.data,u.stride,u.offset|0,m.data,m.stride,m.offset|0)}},zero:function(E){var y={};return function(p){var u=p.dtype,m=p.order,h=[u,m.join()].join(),P=y[h];return P||(y[h]=P=E([u,m])),P(p.shape.slice(0),p.data,p.stride,p.offset|0)}},fdTemplate1:function(E){var y={};return function(p,u){var m=p.dtype,h=p.order,P=u.dtype,L=u.order,z=[m,h.join(),P,L.join()].join(),F=y[z];return F||(y[z]=F=E([m,h,P,L])),F(p.shape.slice(0),p.data,p.stride,p.offset|0,u.data,u.stride,u.offset|0)}},fdTemplate2:function(E){var y={};return function(p,u,m){var h=p.dtype,P=p.order,L=u.dtype,z=u.order,F=m.dtype,B=m.order,O=[h,P.join(),L,z.join(),F,B.join()].join(),I=y[O];return I||(y[O]=I=E([h,P,L,z,F,B])),I(p.shape.slice(0),p.data,p.stride,p.offset|0,u.data,u.stride,u.offset|0,m.data,m.stride,m.offset|0)}}};function n(E){var y=i[E.funcName];return y(s.bind(void 0,E))}function s(E){return a[E.funcName]}function c(E){return n({funcName:E.funcName})}var f={},g={},v={body:"",args:[],thisVars:[],localVars:[]},T=c({funcName:"cdiff"}),l=c({funcName:"zero"});function _(E){return E in f?f[E]:f[E]=c({funcName:"fdTemplate"+E})}function w(E,y,b,p){return function(u,m){var h=m.shape.slice();return h[0]>2&&h[1]>2&&p(m.pick(-1,-1).lo(1,1).hi(h[0]-2,h[1]-2),u.pick(-1,-1,0).lo(1,1).hi(h[0]-2,h[1]-2),u.pick(-1,-1,1).lo(1,1).hi(h[0]-2,h[1]-2)),h[1]>2&&(b(m.pick(0,-1).lo(1).hi(h[1]-2),u.pick(0,-1,1).lo(1).hi(h[1]-2)),y(u.pick(0,-1,0).lo(1).hi(h[1]-2))),h[1]>2&&(b(m.pick(h[0]-1,-1).lo(1).hi(h[1]-2),u.pick(h[0]-1,-1,1).lo(1).hi(h[1]-2)),y(u.pick(h[0]-1,-1,0).lo(1).hi(h[1]-2))),h[0]>2&&(b(m.pick(-1,0).lo(1).hi(h[0]-2),u.pick(-1,0,0).lo(1).hi(h[0]-2)),y(u.pick(-1,0,1).lo(1).hi(h[0]-2))),h[0]>2&&(b(m.pick(-1,h[1]-1).lo(1).hi(h[0]-2),u.pick(-1,h[1]-1,0).lo(1).hi(h[0]-2)),y(u.pick(-1,h[1]-1,1).lo(1).hi(h[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(h[0]-1,0,0,0),u.set(h[0]-1,0,1,0),u.set(0,h[1]-1,0,0),u.set(0,h[1]-1,1,0),u.set(h[0]-1,h[1]-1,0,0),u.set(h[0]-1,h[1]-1,1,0),u}}function S(E){var y=E.join(),h=g[y];if(h)return h;for(var b=E.length,p=[T,l],u=1;u<=b;++u)p.push(_(u));var m=w,h=m.apply(void 0,p);return g[y]=h,h}e.exports=function(y,b,p){if(Array.isArray(p)||(typeof p=="string"?p=o(b.dimension,p):p=o(b.dimension,"clamp")),b.size===0)return y;if(b.dimension===0)return y.set(0),y;var u=S(p);return u(y,b)}},4317:function(e){"use strict";function t(n,s){var c=Math.floor(s),f=s-c,g=0<=c&&c<n.shape[0],v=0<=c+1&&c+1<n.shape[0],T=g?+n.get(c):0,l=v?+n.get(c+1):0;return(1-f)*T+f*l}function r(n,s,c){var f=Math.floor(s),g=s-f,v=0<=f&&f<n.shape[0],T=0<=f+1&&f+1<n.shape[0],l=Math.floor(c),_=c-l,w=0<=l&&l<n.shape[1],S=0<=l+1&&l+1<n.shape[1],E=v&&w?n.get(f,l):0,y=v&&S?n.get(f,l+1):0,b=T&&w?n.get(f+1,l):0,p=T&&S?n.get(f+1,l+1):0;return(1-_)*((1-g)*E+g*b)+_*((1-g)*y+g*p)}function o(n,s,c,f){var g=Math.floor(s),v=s-g,T=0<=g&&g<n.shape[0],l=0<=g+1&&g+1<n.shape[0],_=Math.floor(c),w=c-_,S=0<=_&&_<n.shape[1],E=0<=_+1&&_+1<n.shape[1],y=Math.floor(f),b=f-y,p=0<=y&&y<n.shape[2],u=0<=y+1&&y+1<n.shape[2],m=T&&S&&p?n.get(g,_,y):0,h=T&&E&&p?n.get(g,_+1,y):0,P=l&&S&&p?n.get(g+1,_,y):0,L=l&&E&&p?n.get(g+1,_+1,y):0,z=T&&S&&u?n.get(g,_,y+1):0,F=T&&E&&u?n.get(g,_+1,y+1):0,B=l&&S&&u?n.get(g+1,_,y+1):0,O=l&&E&&u?n.get(g+1,_+1,y+1):0;return(1-b)*((1-w)*((1-v)*m+v*P)+w*((1-v)*h+v*L))+b*((1-w)*((1-v)*z+v*B)+w*((1-v)*F+v*O))}function a(n){var s=n.shape.length|0,c=new Array(s),f=new Array(s),g=new Array(s),v=new Array(s),T,l;for(T=0;T<s;++T)l=+arguments[T+1],c[T]=Math.floor(l),f[T]=l-c[T],g[T]=0<=c[T]&&c[T]<n.shape[T],v[T]=0<=c[T]+1&&c[T]+1<n.shape[T];var _=0,w,S,E;e:for(T=0;T<1<<s;++T){for(S=1,E=n.offset,w=0;w<s;++w)if(T&1<<w){if(!v[w])continue e;S*=f[w],E+=n.stride[w]*(c[w]+1)}else{if(!g[w])continue e;S*=1-f[w],E+=n.stride[w]*c[w]}_+=S*n.data[E]}return _}function i(n,s,c,f){switch(n.shape.length){case 0:return 0;case 1:return t(n,s);case 2:return r(n,s,c);case 3:return o(n,s,c,f);default:return a.apply(void 0,arguments)}}e.exports=i,e.exports.d1=t,e.exports.d2=r,e.exports.d3=o},5298:function(e,t){"use strict";var r={"float64,2,1,0":function(){return function(g,v,T,l,_){var w=g[0],S=g[1],E=g[2],y=T[0],b=T[1],p=T[2];l|=0;var u=0,m=0,h=0,P=p,L=b-E*p,z=y-S*b;for(h=0;h<w;++h){for(m=0;m<S;++m){for(u=0;u<E;++u)v[l]/=_,l+=P;l+=L}l+=z}}},"uint8,2,0,1,float64,2,1,0":function(){return function(g,v,T,l,_,w,S,E){var y=g[0],b=g[1],p=g[2],u=T[0],m=T[1],h=T[2],P=w[0],L=w[1],z=w[2];l|=0,S|=0;for(var F=l,B=S,O=g[0]|0;O>0;){O<64?(y=O,O=0):(y=64,O-=64);for(var I=g[1]|0;I>0;){I<64?(b=I,I=0):(b=64,I-=64),l=F+O*u+I*m,S=B+O*P+I*L;var N=0,U=0,W=0,Q=h,ue=u-p*h,le=m-y*u,he=z,G=P-p*z,$=L-y*P;for(W=0;W<b;++W){for(U=0;U<y;++U){for(N=0;N<p;++N)v[l]=_[S]*E,l+=Q,S+=he;l+=ue,S+=G}l+=le,S+=$}}}}},"float32,1,0,float32,1,0":function(){return function(g,v,T,l,_,w,S){var E=g[0],y=g[1],b=T[0],p=T[1],u=w[0],m=w[1];l|=0,S|=0;var h=0,P=0,L=p,z=b-y*p,F=m,B=u-y*m;for(P=0;P<E;++P){for(h=0;h<y;++h)v[l]=_[S],l+=L,S+=F;l+=z,S+=B}}},"float32,1,0,float32,0,1":function(){return function(g,v,T,l,_,w,S){var E=g[0],y=g[1],b=T[0],p=T[1],u=w[0],m=w[1];l|=0,S|=0;for(var h=l,P=S,L=g[1]|0;L>0;){L<64?(y=L,L=0):(y=64,L-=64);for(var z=g[0]|0;z>0;){z<64?(E=z,z=0):(E=64,z-=64),l=h+L*p+z*b,S=P+L*m+z*u;var F=0,B=0,O=p,I=b-y*p,N=m,U=u-y*m;for(B=0;B<E;++B){for(F=0;F<y;++F)v[l]=_[S],l+=O,S+=N;l+=I,S+=U}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(g,v,T,l,_,w,S){var E=g[0],y=g[1],b=g[2],p=T[0],u=T[1],m=T[2],h=w[0],P=w[1],L=w[2];l|=0,S|=0;for(var z=l,F=S,B=g[2]|0;B>0;){B<64?(b=B,B=0):(b=64,B-=64);for(var O=g[0]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64);for(var I=g[1]|0;I>0;){I<64?(y=I,I=0):(y=64,I-=64),l=z+B*m+O*p+I*u,S=F+B*L+O*h+I*P;var N=0,U=0,W=0,Q=m,ue=p-b*m,le=u-E*p,he=L,G=h-b*L,$=P-E*h;for(W=0;W<y;++W){for(U=0;U<E;++U){for(N=0;N<b;++N)v[l]=_[S],l+=Q,S+=he;l+=ue,S+=G}l+=le,S+=$}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(g,v,T,l,_,w,S){var E=g[0],y=g[1],b=g[2],p=T[0],u=T[1],m=T[2],h=w[0],P=w[1],L=w[2];l|=0,S|=0;var z=0,F=0,B=0,O=m,I=p-b*m,N=u-E*p,U=L,W=h-b*L,Q=P-E*h;for(B=0;B<y;++B){for(F=0;F<E;++F){for(z=0;z<b;++z)v[l]=_[S],l+=O,S+=U;l+=I,S+=W}l+=N,S+=Q}}}};function o(f,g){var v=g.join(","),T=r[v];return T()}var a=o,i={mul:function(f){var g={};return function(T,l,_){var w=T.dtype,S=T.order,E=l.dtype,y=l.order,b=_.dtype,p=_.order,u=[w,S.join(),E,y.join(),b,p.join()].join(),m=g[u];return m||(g[u]=m=f([w,S,E,y,b,p])),m(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_.data,_.stride,_.offset|0)}},muls:function(f){var g={};return function(T,l,_){var w=T.dtype,S=T.order,E=l.dtype,y=l.order,b=[w,S.join(),E,y.join()].join(),p=g[b];return p||(g[b]=p=f([w,S,E,y])),p(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_)}},mulseq:function(f){var g={};return function(T,l){var _=T.dtype,w=T.order,S=[_,w.join()].join(),E=g[S];return E||(g[S]=E=f([_,w])),E(T.shape.slice(0),T.data,T.stride,T.offset|0,l)}},div:function(f){var g={};return function(T,l,_){var w=T.dtype,S=T.order,E=l.dtype,y=l.order,b=_.dtype,p=_.order,u=[w,S.join(),E,y.join(),b,p.join()].join(),m=g[u];return m||(g[u]=m=f([w,S,E,y,b,p])),m(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_.data,_.stride,_.offset|0)}},divs:function(f){var g={};return function(T,l,_){var w=T.dtype,S=T.order,E=l.dtype,y=l.order,b=[w,S.join(),E,y.join()].join(),p=g[b];return p||(g[b]=p=f([w,S,E,y])),p(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0,_)}},divseq:function(f){var g={};return function(T,l){var _=T.dtype,w=T.order,S=[_,w.join()].join(),E=g[S];return E||(g[S]=E=f([_,w])),E(T.shape.slice(0),T.data,T.stride,T.offset|0,l)}},assign:function(f){var g={};return function(T,l){var _=T.dtype,w=T.order,S=l.dtype,E=l.order,y=[_,w.join(),S,E.join()].join(),b=g[y];return b||(g[y]=b=f([_,w,S,E])),b(T.shape.slice(0),T.data,T.stride,T.offset|0,l.data,l.stride,l.offset|0)}}};function n(f){var g=i[f.funcName];return g(a.bind(void 0,f))}function s(f){return n({funcName:f.funcName})}var c={mul:"*",div:"/"};(function(){for(var f in c)t[f]=s({funcName:f}),t[f+"s"]=s({funcName:f+"s"}),t[f+"seq"]=s({funcName:f+"seq"})})(),t.assign=s({funcName:"assign"})},9994:function(e,t,r){"use strict";var o=r(9618),a=r(8277);e.exports=function(n,s){for(var c=[],f=n,g=1;Array.isArray(f);)c.push(f.length),g*=f.length,f=f[0];return c.length===0?o():(s||(s=o(new Float64Array(g),c)),a(s,n),s)}},8277:function(e){"use strict";function t(){return function(s,c,f,g,v){var T=s[0],l=s[1],_=s[2],w=f[0],S=f[1],E=f[2],y=[0,0,0];g|=0;var b=0,p=0,u=0,m=E,h=S-_*E,P=w-l*S;for(u=0;u<T;++u){for(p=0;p<l;++p){for(b=0;b<_;++b){{var L=v,z;for(z=0;z<y.length-1;++z)L=L[y[z]];c[g]=L[y[y.length-1]]}g+=m,++y[2]}g+=h,y[2]-=_,++y[1]}g+=P,y[1]-=l,++y[0]}}}function r(){return t()}var o=r;function a(s){var c={};return function(g,v){var T=g.dtype,l=g.order,_=[T,l.join()].join(),w=c[_];return w||(c[_]=w=s([T,l])),w(g.shape.slice(0),g.data,g.stride,g.offset|0,v)}}function i(s){return a(o.bind(void 0,s))}function n(s){return i({funcName:s.funcName})}e.exports=n({funcName:"convert"})},7640:function(e,t,r){"use strict";var o=r(1888);function a(v){switch(v){case"uint32":return[o.mallocUint32,o.freeUint32];default:return null}}var i={"uint32,1,0":function(v,T){return function(_,w,S,E,y,b,p,u,m,h,P){var L,z,F,B=_*y+E,O,I=v(u),N,U,W,Q;for(L=_+1;L<=w;++L){for(z=L,B+=y,F=B,N=0,U=B,O=0;O<u;++O)I[N++]=S[U],U+=m;e:for(;z-- >_;){N=0,U=F-y;t:for(O=0;O<u;++O){if(W=S[U],Q=I[N],W<Q)break e;if(W>Q)break t;U+=h,N+=P}for(N=F,U=F-y,O=0;O<u;++O)S[N]=S[U],N+=m,U+=m;F-=y}for(N=F,U=0,O=0;O<u;++O)S[N]=I[U++],N+=m}T(I)}}};function n(v,T){var l=a(T),_=[T,v].join(","),w=i[_];return l?w(l[0],l[1]):w()}var s={"uint32,1,0":function(v,T,l){return function _(w,S,E,y,b,p,u,m,h,P,L){var z=(S-w+1)/6|0,F=w+z,B=S-z,O=w+S>>1,I=O-z,N=O+z,U=F,W=I,Q=O,ue=N,le=B,he=w+1,G=S-1,$=!0,J,X,oe,ie,j,ee,re,ce,be,Ae=0,ze=0,Re=0,Xe,it,ot,tt,lt,Ee,_e,fe,Fe,rt,st,Qe,Lt,kt,Vt,Zt,Sr=m,xr=T(Sr),jr=T(Sr);it=b*U,ot=b*W,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=U,U=W,W=X;break e}if(Re<0)break e;Zt+=P}it=b*ue,ot=b*le,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=ue,ue=le,le=X;break e}if(Re<0)break e;Zt+=P}it=b*U,ot=b*Q,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=U,U=Q,Q=X;break e}if(Re<0)break e;Zt+=P}it=b*W,ot=b*Q,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=W,W=Q,Q=X;break e}if(Re<0)break e;Zt+=P}it=b*U,ot=b*ue,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=U,U=ue,ue=X;break e}if(Re<0)break e;Zt+=P}it=b*Q,ot=b*ue,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=Q,Q=ue,ue=X;break e}if(Re<0)break e;Zt+=P}it=b*W,ot=b*le,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=W,W=le,le=X;break e}if(Re<0)break e;Zt+=P}it=b*W,ot=b*Q,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=W,W=Q,Q=X;break e}if(Re<0)break e;Zt+=P}it=b*ue,ot=b*le,Zt=y;e:for(Xe=0;Xe<m;++Xe){if(re=it+Zt,ce=ot+Zt,Re=E[re]-E[ce],Re>0){X=ue,ue=le,le=X;break e}if(Re<0)break e;Zt+=P}for(it=b*U,ot=b*W,tt=b*Q,lt=b*ue,Ee=b*le,_e=b*F,fe=b*O,Fe=b*B,Vt=0,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,be=tt+Zt,rt=lt+Zt,st=Ee+Zt,Qe=_e+Zt,Lt=fe+Zt,kt=Fe+Zt,xr[Vt]=E[ce],jr[Vt]=E[rt],$=$&&xr[Vt]===jr[Vt],oe=E[re],ie=E[be],j=E[st],E[Qe]=oe,E[Lt]=ie,E[kt]=j,++Vt,Zt+=h;for(it=b*I,ot=b*w,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,E[re]=E[ce],Zt+=h;for(it=b*N,ot=b*S,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,E[re]=E[ce],Zt+=h;if($)for(ee=he;ee<=G;++ee){re=y+ee*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Re=E[re]-xr[Vt],Re!==0)break e;Vt+=L,re+=P}if(Re!==0)if(Re<0){if(ee!==he)for(it=b*ee,ot=b*he,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,J=E[re],E[re]=E[ce],E[ce]=J,Zt+=h;++he}else for(;;){re=y+G*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Re=E[re]-xr[Vt],Re!==0)break e;Vt+=L,re+=P}if(Re>0)G--;else if(Re<0){for(it=b*ee,ot=b*he,tt=b*G,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,be=tt+Zt,J=E[re],E[re]=E[ce],E[ce]=E[be],E[be]=J,Zt+=h;++he,--G;break}else{for(it=b*ee,ot=b*G,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,J=E[re],E[re]=E[ce],E[ce]=J,Zt+=h;--G;break}}}else for(ee=he;ee<=G;++ee){re=y+ee*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Ae=E[re]-xr[Vt],Ae!==0)break e;Vt+=L,re+=P}if(Ae<0){if(ee!==he)for(it=b*ee,ot=b*he,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,J=E[re],E[re]=E[ce],E[ce]=J,Zt+=h;++he}else{re=y+ee*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(ze=E[re]-jr[Vt],ze!==0)break e;Vt+=L,re+=P}if(ze>0)for(;;){re=y+G*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Re=E[re]-jr[Vt],Re!==0)break e;Vt+=L,re+=P}if(Re>0){if(--G<ee)break;continue}else{re=y+G*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Re=E[re]-xr[Vt],Re!==0)break e;Vt+=L,re+=P}if(Re<0){for(it=b*ee,ot=b*he,tt=b*G,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,be=tt+Zt,J=E[re],E[re]=E[ce],E[ce]=E[be],E[be]=J,Zt+=h;++he,--G}else{for(it=b*ee,ot=b*G,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,J=E[re],E[re]=E[ce],E[ce]=J,Zt+=h;--G}break}}}}for(it=b*w,ot=b*(he-1),Vt=0,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,E[re]=E[ce],E[ce]=xr[Vt],++Vt,Zt+=h;for(it=b*S,ot=b*(G+1),Vt=0,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,E[re]=E[ce],E[ce]=jr[Vt],++Vt,Zt+=h;if(he-2-w<=32?v(w,he-2,E,y,b,p,u,m,h,P,L):_(w,he-2,E,y,b,p,u,m,h,P,L),S-(G+2)<=32?v(G+2,S,E,y,b,p,u,m,h,P,L):_(G+2,S,E,y,b,p,u,m,h,P,L),$){l(xr),l(jr);return}if(he<F&&G>B){e:for(;;){for(re=y+he*b,Vt=0,Zt=y,Xe=0;Xe<m;++Xe){if(E[re]!==xr[Vt])break e;++Vt,re+=h}++he}e:for(;;){for(re=y+G*b,Vt=0,Zt=y,Xe=0;Xe<m;++Xe){if(E[re]!==jr[Vt])break e;++Vt,re+=h}--G}for(ee=he;ee<=G;++ee){re=y+ee*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Ae=E[re]-xr[Vt],Ae!==0)break e;Vt+=L,re+=P}if(Ae===0){if(ee!==he)for(it=b*ee,ot=b*he,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,J=E[re],E[re]=E[ce],E[ce]=J,Zt+=h;++he}else{re=y+ee*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(ze=E[re]-jr[Vt],ze!==0)break e;Vt+=L,re+=P}if(ze===0)for(;;){re=y+G*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Re=E[re]-jr[Vt],Re!==0)break e;Vt+=L,re+=P}if(Re===0){if(--G<ee)break;continue}else{re=y+G*b,Vt=0;e:for(Xe=0;Xe<m;++Xe){if(Re=E[re]-xr[Vt],Re!==0)break e;Vt+=L,re+=P}if(Re<0){for(it=b*ee,ot=b*he,tt=b*G,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,be=tt+Zt,J=E[re],E[re]=E[ce],E[ce]=E[be],E[be]=J,Zt+=h;++he,--G}else{for(it=b*ee,ot=b*G,Zt=y,Xe=0;Xe<m;++Xe)re=it+Zt,ce=ot+Zt,J=E[re],E[re]=E[ce],E[ce]=J,Zt+=h;--G}break}}}}}l(xr),l(jr),G-he<=32?v(he,G,E,y,b,p,u,m,h,P,L):_(he,G,E,y,b,p,u,m,h,P,L)}}};function c(v,T,l){var _=a(T),w=[T,v].join(","),S=s[w];return v.length>1&&_?S(l,_[0],_[1]):S(l)}var f={"uint32,1,0":function(v,T){return function(l){var _=l.data,w=l.offset|0,S=l.shape,E=l.stride,y=E[0]|0,b=S[0]|0,p=E[1]|0,u=S[1]|0,m=p,h=p,P=1;b<=32?v(0,b-1,_,w,y,p,b,u,m,h,P):T(0,b-1,_,w,y,p,b,u,m,h,P)}}};function g(v,T){var l=[T,v].join(","),_=f[l],w=n(v,T),S=c(v,T,w);return _(w,S)}e.exports=g},446:function(e,t,r){"use strict";var o=r(7640),a={};function i(n){var s=n.order,c=n.dtype,f=[s,c],g=f.join(":"),v=a[g];return v||(a[g]=v=o(s,c)),v(n),n}e.exports=i},9618:function(e,t,r){var o=r(7163),a=typeof Float64Array<"u";function i(T,l){return T[0]-l[0]}function n(){var T=this.stride,l=new Array(T.length),_;for(_=0;_<l.length;++_)l[_]=[Math.abs(T[_]),_];l.sort(i);var w=new Array(l.length);for(_=0;_<w.length;++_)w[_]=l[_][1];return w}var s={T:function(T){function l(w){this.data=w}var _=l.prototype;return _.dtype=T,_.index=function(){return-1},_.size=0,_.dimension=-1,_.shape=_.stride=_.order=[],_.lo=_.hi=_.transpose=_.step=function(){return new l(this.data)},_.get=_.set=function(){},_.pick=function(){return null},function(S){return new l(S)}},0:function(T,l){function _(S,E){this.data=S,this.offset=E}var w=_.prototype;return w.dtype=T,w.index=function(){return this.offset},w.dimension=0,w.size=1,w.shape=w.stride=w.order=[],w.lo=w.hi=w.transpose=w.step=function(){return new _(this.data,this.offset)},w.pick=function(){return l(this.data)},w.valueOf=w.get=function(){return T==="generic"?this.data.get(this.offset):this.data[this.offset]},w.set=function(E){return T==="generic"?this.data.set(this.offset,E):this.data[this.offset]=E},function(E,y,b,p){return new _(E,p)}},1:function(T,l,_){function w(E,y,b,p){this.data=E,this.shape=[y],this.stride=[b],this.offset=p|0}var S=w.prototype;return S.dtype=T,S.dimension=1,Object.defineProperty(S,"size",{get:function(){return this.shape[0]}}),S.order=[0],S.set=function(y,b){return T==="generic"?this.data.set(this.offset+this.stride[0]*y,b):this.data[this.offset+this.stride[0]*y]=b},S.get=function(y){return T==="generic"?this.data.get(this.offset+this.stride[0]*y):this.data[this.offset+this.stride[0]*y]},S.index=function(y){return this.offset+this.stride[0]*y},S.hi=function(y){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,this.stride[0],this.offset)},S.lo=function(y){var b=this.offset,p=0,u=this.shape[0],m=this.stride[0];return typeof y=="number"&&y>=0&&(p=y|0,b+=m*p,u-=p),new w(this.data,u,m,b)},S.step=function(y){var b=this.shape[0],p=this.stride[0],u=this.offset,m=0,h=Math.ceil;return typeof y=="number"&&(m=y|0,m<0?(u+=p*(b-1),b=h(-b/m)):b=h(b/m),p*=m),new w(this.data,b,p,u)},S.transpose=function(y){y=y===void 0?0:y|0;var b=this.shape,p=this.stride;return new w(this.data,b[y],p[y],this.offset)},S.pick=function(y){var b=[],p=[],u=this.offset;typeof y=="number"&&y>=0?u=u+this.stride[0]*y|0:(b.push(this.shape[0]),p.push(this.stride[0]));var m=l[b.length+1];return m(this.data,b,p,u)},function(y,b,p,u){return new w(y,b[0],p[0],u)}},2:function(T,l,_){function w(E,y,b,p,u,m){this.data=E,this.shape=[y,b],this.stride=[p,u],this.offset=m|0}var S=w.prototype;return S.dtype=T,S.dimension=2,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(S,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),S.set=function(y,b,p){return T==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*b,p):this.data[this.offset+this.stride[0]*y+this.stride[1]*b]=p},S.get=function(y,b){return T==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*b):this.data[this.offset+this.stride[0]*y+this.stride[1]*b]},S.index=function(y,b){return this.offset+this.stride[0]*y+this.stride[1]*b},S.hi=function(y,b){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(y,b){var p=this.offset,u=0,m=this.shape[0],h=this.shape[1],P=this.stride[0],L=this.stride[1];return typeof y=="number"&&y>=0&&(u=y|0,p+=P*u,m-=u),typeof b=="number"&&b>=0&&(u=b|0,p+=L*u,h-=u),new w(this.data,m,h,P,L,p)},S.step=function(y,b){var p=this.shape[0],u=this.shape[1],m=this.stride[0],h=this.stride[1],P=this.offset,L=0,z=Math.ceil;return typeof y=="number"&&(L=y|0,L<0?(P+=m*(p-1),p=z(-p/L)):p=z(p/L),m*=L),typeof b=="number"&&(L=b|0,L<0?(P+=h*(u-1),u=z(-u/L)):u=z(u/L),h*=L),new w(this.data,p,u,m,h,P)},S.transpose=function(y,b){y=y===void 0?0:y|0,b=b===void 0?1:b|0;var p=this.shape,u=this.stride;return new w(this.data,p[y],p[b],u[y],u[b],this.offset)},S.pick=function(y,b){var p=[],u=[],m=this.offset;typeof y=="number"&&y>=0?m=m+this.stride[0]*y|0:(p.push(this.shape[0]),u.push(this.stride[0])),typeof b=="number"&&b>=0?m=m+this.stride[1]*b|0:(p.push(this.shape[1]),u.push(this.stride[1]));var h=l[p.length+1];return h(this.data,p,u,m)},function(y,b,p,u){return new w(y,b[0],b[1],p[0],p[1],u)}},3:function(T,l,_){function w(E,y,b,p,u,m,h,P){this.data=E,this.shape=[y,b,p],this.stride=[u,m,h],this.offset=P|0}var S=w.prototype;return S.dtype=T,S.dimension=3,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(S,"order",{get:function(){var y=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),p=Math.abs(this.stride[2]);return y>b?b>p?[2,1,0]:y>p?[1,2,0]:[1,0,2]:y>p?[2,0,1]:p>b?[0,1,2]:[0,2,1]}}),S.set=function(y,b,p,u){return T==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p,u):this.data[this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p]=u},S.get=function(y,b,p){return T==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p):this.data[this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p]},S.index=function(y,b,p){return this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p},S.hi=function(y,b,p){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},S.lo=function(y,b,p){var u=this.offset,m=0,h=this.shape[0],P=this.shape[1],L=this.shape[2],z=this.stride[0],F=this.stride[1],B=this.stride[2];return typeof y=="number"&&y>=0&&(m=y|0,u+=z*m,h-=m),typeof b=="number"&&b>=0&&(m=b|0,u+=F*m,P-=m),typeof p=="number"&&p>=0&&(m=p|0,u+=B*m,L-=m),new w(this.data,h,P,L,z,F,B,u)},S.step=function(y,b,p){var u=this.shape[0],m=this.shape[1],h=this.shape[2],P=this.stride[0],L=this.stride[1],z=this.stride[2],F=this.offset,B=0,O=Math.ceil;return typeof y=="number"&&(B=y|0,B<0?(F+=P*(u-1),u=O(-u/B)):u=O(u/B),P*=B),typeof b=="number"&&(B=b|0,B<0?(F+=L*(m-1),m=O(-m/B)):m=O(m/B),L*=B),typeof p=="number"&&(B=p|0,B<0?(F+=z*(h-1),h=O(-h/B)):h=O(h/B),z*=B),new w(this.data,u,m,h,P,L,z,F)},S.transpose=function(y,b,p){y=y===void 0?0:y|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0;var u=this.shape,m=this.stride;return new w(this.data,u[y],u[b],u[p],m[y],m[b],m[p],this.offset)},S.pick=function(y,b,p){var u=[],m=[],h=this.offset;typeof y=="number"&&y>=0?h=h+this.stride[0]*y|0:(u.push(this.shape[0]),m.push(this.stride[0])),typeof b=="number"&&b>=0?h=h+this.stride[1]*b|0:(u.push(this.shape[1]),m.push(this.stride[1])),typeof p=="number"&&p>=0?h=h+this.stride[2]*p|0:(u.push(this.shape[2]),m.push(this.stride[2]));var P=l[u.length+1];return P(this.data,u,m,h)},function(y,b,p,u){return new w(y,b[0],b[1],b[2],p[0],p[1],p[2],u)}},4:function(T,l,_){function w(E,y,b,p,u,m,h,P,L,z){this.data=E,this.shape=[y,b,p,u],this.stride=[m,h,P,L],this.offset=z|0}var S=w.prototype;return S.dtype=T,S.dimension=4,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(S,"order",{get:_}),S.set=function(y,b,p,u,m){return T==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u,m):this.data[this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u]=m},S.get=function(y,b,p,u){return T==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u):this.data[this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u]},S.index=function(y,b,p,u){return this.offset+this.stride[0]*y+this.stride[1]*b+this.stride[2]*p+this.stride[3]*u},S.hi=function(y,b,p,u){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(y,b,p,u){var m=this.offset,h=0,P=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],B=this.stride[0],O=this.stride[1],I=this.stride[2],N=this.stride[3];return typeof y=="number"&&y>=0&&(h=y|0,m+=B*h,P-=h),typeof b=="number"&&b>=0&&(h=b|0,m+=O*h,L-=h),typeof p=="number"&&p>=0&&(h=p|0,m+=I*h,z-=h),typeof u=="number"&&u>=0&&(h=u|0,m+=N*h,F-=h),new w(this.data,P,L,z,F,B,O,I,N,m)},S.step=function(y,b,p,u){var m=this.shape[0],h=this.shape[1],P=this.shape[2],L=this.shape[3],z=this.stride[0],F=this.stride[1],B=this.stride[2],O=this.stride[3],I=this.offset,N=0,U=Math.ceil;return typeof y=="number"&&(N=y|0,N<0?(I+=z*(m-1),m=U(-m/N)):m=U(m/N),z*=N),typeof b=="number"&&(N=b|0,N<0?(I+=F*(h-1),h=U(-h/N)):h=U(h/N),F*=N),typeof p=="number"&&(N=p|0,N<0?(I+=B*(P-1),P=U(-P/N)):P=U(P/N),B*=N),typeof u=="number"&&(N=u|0,N<0?(I+=O*(L-1),L=U(-L/N)):L=U(L/N),O*=N),new w(this.data,m,h,P,L,z,F,B,O,I)},S.transpose=function(y,b,p,u){y=y===void 0?0:y|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0,u=u===void 0?3:u|0;var m=this.shape,h=this.stride;return new w(this.data,m[y],m[b],m[p],m[u],h[y],h[b],h[p],h[u],this.offset)},S.pick=function(y,b,p,u){var m=[],h=[],P=this.offset;typeof y=="number"&&y>=0?P=P+this.stride[0]*y|0:(m.push(this.shape[0]),h.push(this.stride[0])),typeof b=="number"&&b>=0?P=P+this.stride[1]*b|0:(m.push(this.shape[1]),h.push(this.stride[1])),typeof p=="number"&&p>=0?P=P+this.stride[2]*p|0:(m.push(this.shape[2]),h.push(this.stride[2])),typeof u=="number"&&u>=0?P=P+this.stride[3]*u|0:(m.push(this.shape[3]),h.push(this.stride[3]));var L=l[m.length+1];return L(this.data,m,h,P)},function(y,b,p,u){return new w(y,b[0],b[1],b[2],b[3],p[0],p[1],p[2],p[3],u)}},5:function(l,_,w){function S(y,b,p,u,m,h,P,L,z,F,B,O){this.data=y,this.shape=[b,p,u,m,h],this.stride=[P,L,z,F,B],this.offset=O|0}var E=S.prototype;return E.dtype=l,E.dimension=5,Object.defineProperty(E,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(E,"order",{get:w}),E.set=function(b,p,u,m,h,P){return l==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*m+this.stride[4]*h,P):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*m+this.stride[4]*h]=P},E.get=function(b,p,u,m,h){return l==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*m+this.stride[4]*h):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*m+this.stride[4]*h]},E.index=function(b,p,u,m,h){return this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*u+this.stride[3]*m+this.stride[4]*h},E.hi=function(b,p,u,m,h){return new S(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof p!="number"||p<0?this.shape[1]:p|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof m!="number"||m<0?this.shape[3]:m|0,typeof h!="number"||h<0?this.shape[4]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(b,p,u,m,h){var P=this.offset,L=0,z=this.shape[0],F=this.shape[1],B=this.shape[2],O=this.shape[3],I=this.shape[4],N=this.stride[0],U=this.stride[1],W=this.stride[2],Q=this.stride[3],ue=this.stride[4];return typeof b=="number"&&b>=0&&(L=b|0,P+=N*L,z-=L),typeof p=="number"&&p>=0&&(L=p|0,P+=U*L,F-=L),typeof u=="number"&&u>=0&&(L=u|0,P+=W*L,B-=L),typeof m=="number"&&m>=0&&(L=m|0,P+=Q*L,O-=L),typeof h=="number"&&h>=0&&(L=h|0,P+=ue*L,I-=L),new S(this.data,z,F,B,O,I,N,U,W,Q,ue,P)},E.step=function(b,p,u,m,h){var P=this.shape[0],L=this.shape[1],z=this.shape[2],F=this.shape[3],B=this.shape[4],O=this.stride[0],I=this.stride[1],N=this.stride[2],U=this.stride[3],W=this.stride[4],Q=this.offset,ue=0,le=Math.ceil;return typeof b=="number"&&(ue=b|0,ue<0?(Q+=O*(P-1),P=le(-P/ue)):P=le(P/ue),O*=ue),typeof p=="number"&&(ue=p|0,ue<0?(Q+=I*(L-1),L=le(-L/ue)):L=le(L/ue),I*=ue),typeof u=="number"&&(ue=u|0,ue<0?(Q+=N*(z-1),z=le(-z/ue)):z=le(z/ue),N*=ue),typeof m=="number"&&(ue=m|0,ue<0?(Q+=U*(F-1),F=le(-F/ue)):F=le(F/ue),U*=ue),typeof h=="number"&&(ue=h|0,ue<0?(Q+=W*(B-1),B=le(-B/ue)):B=le(B/ue),W*=ue),new S(this.data,P,L,z,F,B,O,I,N,U,W,Q)},E.transpose=function(b,p,u,m,h){b=b===void 0?0:b|0,p=p===void 0?1:p|0,u=u===void 0?2:u|0,m=m===void 0?3:m|0,h=h===void 0?4:h|0;var P=this.shape,L=this.stride;return new S(this.data,P[b],P[p],P[u],P[m],P[h],L[b],L[p],L[u],L[m],L[h],this.offset)},E.pick=function(b,p,u,m,h){var P=[],L=[],z=this.offset;typeof b=="number"&&b>=0?z=z+this.stride[0]*b|0:(P.push(this.shape[0]),L.push(this.stride[0])),typeof p=="number"&&p>=0?z=z+this.stride[1]*p|0:(P.push(this.shape[1]),L.push(this.stride[1])),typeof u=="number"&&u>=0?z=z+this.stride[2]*u|0:(P.push(this.shape[2]),L.push(this.stride[2])),typeof m=="number"&&m>=0?z=z+this.stride[3]*m|0:(P.push(this.shape[3]),L.push(this.stride[3])),typeof h=="number"&&h>=0?z=z+this.stride[4]*h|0:(P.push(this.shape[4]),L.push(this.stride[4]));var F=_[P.length+1];return F(this.data,P,L,z)},function(b,p,u,m){return new S(b,p[0],p[1],p[2],p[3],p[4],u[0],u[1],u[2],u[3],u[4],m)}}};function c(T,l){var _=l===-1?"T":String(l),w=s[_];return l===-1?w(T):l===0?w(T,g[T][0]):w(T,g[T],n)}function f(T){if(o(T))return"buffer";if(a)switch(Object.prototype.toString.call(T)){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(T)?"array":"generic"}var g={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(T,l,_,w){if(T===void 0){var u=g.array[0];return u([])}else typeof T=="number"&&(T=[T]);l===void 0&&(l=[T.length]);var S=l.length;if(_===void 0){_=new Array(S);for(var E=S-1,y=1;E>=0;--E)_[E]=y,y*=l[E]}if(w===void 0){w=0;for(var E=0;E<S;++E)_[E]<0&&(w-=(l[E]-1)*_[E])}for(var b=f(T),p=g[b];p.length<=S+1;)p.push(c(b,p.length-1));var u=p[S+1];return u(T,l,_,w)}e.exports=v},1278:function(e,t,r){"use strict";var o=r(2361),a=Math.pow(2,-1074),i=-1>>>0;e.exports=n;function n(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-a:a;var f=o.hi(s),g=o.lo(s);return c>s==s>0?g===i?(f+=1,g=0):g+=1:g===0?(g=i,f-=1):g-=1,o.pack(g,f)}},8406:function(e,t){var r=1e-6,o=1e-6;t.vertexNormals=function(a,i,n){for(var s=i.length,c=new Array(s),f=n===void 0?r:n,g=0;g<s;++g)c[g]=[0,0,0];for(var g=0;g<a.length;++g)for(var v=a[g],T=0,l=v[v.length-1],_=v[0],w=0;w<v.length;++w){T=l,l=_,_=v[(w+1)%v.length];for(var S=i[T],E=i[l],y=i[_],b=new Array(3),p=0,u=new Array(3),m=0,h=0;h<3;++h)b[h]=S[h]-E[h],p+=b[h]*b[h],u[h]=y[h]-E[h],m+=u[h]*u[h];if(p*m>f)for(var P=c[l],L=1/Math.sqrt(p*m),h=0;h<3;++h){var z=(h+1)%3,F=(h+2)%3;P[h]+=L*(u[z]*b[F]-u[F]*b[z])}}for(var g=0;g<s;++g){for(var P=c[g],B=0,h=0;h<3;++h)B+=P[h]*P[h];if(B>f)for(var L=1/Math.sqrt(B),h=0;h<3;++h)P[h]*=L;else for(var h=0;h<3;++h)P[h]=0}return c},t.faceNormals=function(a,i,n){for(var s=a.length,c=new Array(s),f=n===void 0?o:n,g=0;g<s;++g){for(var v=a[g],T=new Array(3),l=0;l<3;++l)T[l]=i[v[l]];for(var _=new Array(3),w=new Array(3),l=0;l<3;++l)_[l]=T[1][l]-T[0][l],w[l]=T[2][l]-T[0][l];for(var S=new Array(3),E=0,l=0;l<3;++l){var y=(l+1)%3,b=(l+2)%3;S[l]=_[y]*w[b]-_[b]*w[y],E+=S[l]*S[l]}E>f?E=1/Math.sqrt(E):E=0;for(var l=0;l<3;++l)S[l]*=E;c[g]=S}return c}},4081:function(e){"use strict";e.exports=t;function t(r,o,a,i,n,s,c,f,g,v){var T=o+s+v;if(l>0){var l=Math.sqrt(T+1);r[0]=.5*(c-g)/l,r[1]=.5*(f-i)/l,r[2]=.5*(a-s)/l,r[3]=.5*l}else{var _=Math.max(o,s,v),l=Math.sqrt(2*_-T+1);o>=_?(r[0]=.5*l,r[1]=.5*(n+a)/l,r[2]=.5*(f+i)/l,r[3]=.5*(c-g)/l):s>=_?(r[0]=.5*(a+n)/l,r[1]=.5*l,r[2]=.5*(g+c)/l,r[3]=.5*(f-i)/l):(r[0]=.5*(i+f)/l,r[1]=.5*(c+g)/l,r[2]=.5*l,r[3]=.5*(a-n)/l)}return r}},9977:function(e,t,r){"use strict";e.exports=l;var o=r(9215),a=r(6582),i=r(7399),n=r(7608),s=r(4081);function c(_,w,S){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(S,2))}function f(_,w,S,E){return Math.sqrt(Math.pow(_,2)+Math.pow(w,2)+Math.pow(S,2)+Math.pow(E,2))}function g(_,w){var S=w[0],E=w[1],y=w[2],b=w[3],p=f(S,E,y,b);p>1e-6?(_[0]=S/p,_[1]=E/p,_[2]=y/p,_[3]=b/p):(_[0]=_[1]=_[2]=0,_[3]=1)}function v(_,w,S){this.radius=o([S]),this.center=o(w),this.rotation=o(_),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 T=v.prototype;T.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},T.recalcMatrix=function(_){this.radius.curve(_),this.center.curve(_),this.rotation.curve(_);var w=this.computedRotation;g(w,w);var S=this.computedMatrix;i(S,w);var E=this.computedCenter,y=this.computedEye,b=this.computedUp,p=Math.exp(this.computedRadius[0]);y[0]=E[0]+p*S[2],y[1]=E[1]+p*S[6],y[2]=E[2]+p*S[10],b[0]=S[1],b[1]=S[5],b[2]=S[9];for(var u=0;u<3;++u){for(var m=0,h=0;h<3;++h)m+=S[u+4*h]*y[h];S[12+u]=-m}},T.getMatrix=function(_,w){this.recalcMatrix(_);var S=this.computedMatrix;if(w){for(var E=0;E<16;++E)w[E]=S[E];return w}return S},T.idle=function(_){this.center.idle(_),this.radius.idle(_),this.rotation.idle(_)},T.flush=function(_){this.center.flush(_),this.radius.flush(_),this.rotation.flush(_)},T.pan=function(_,w,S,E){w=w||0,S=S||0,E=E||0,this.recalcMatrix(_);var y=this.computedMatrix,b=y[1],p=y[5],u=y[9],m=c(b,p,u);b/=m,p/=m,u/=m;var h=y[0],P=y[4],L=y[8],z=h*b+P*p+L*u;h-=b*z,P-=p*z,L-=u*z;var F=c(h,P,L);h/=F,P/=F,L/=F;var B=y[2],O=y[6],I=y[10],N=B*b+O*p+I*u,U=B*h+O*P+I*L;B-=N*b+U*h,O-=N*p+U*P,I-=N*u+U*L;var W=c(B,O,I);B/=W,O/=W,I/=W;var Q=h*w+b*S,ue=P*w+p*S,le=L*w+u*S;this.center.move(_,Q,ue,le);var he=Math.exp(this.computedRadius[0]);he=Math.max(1e-4,he+E),this.radius.set(_,Math.log(he))},T.rotate=function(_,w,S,E){this.recalcMatrix(_),w=w||0,S=S||0;var y=this.computedMatrix,b=y[0],p=y[4],u=y[8],m=y[1],h=y[5],P=y[9],L=y[2],z=y[6],F=y[10],B=w*b+S*m,O=w*p+S*h,I=w*u+S*P,N=-(z*I-F*O),U=-(F*B-L*I),W=-(L*O-z*B),Q=Math.sqrt(Math.max(0,1-Math.pow(N,2)-Math.pow(U,2)-Math.pow(W,2))),ue=f(N,U,W,Q);ue>1e-6?(N/=ue,U/=ue,W/=ue,Q/=ue):(N=U=W=0,Q=1);var le=this.computedRotation,he=le[0],G=le[1],$=le[2],J=le[3],X=he*Q+J*N+G*W-$*U,oe=G*Q+J*U+$*N-he*W,ie=$*Q+J*W+he*U-G*N,j=J*Q-he*N-G*U-$*W;if(E){N=L,U=z,W=F;var ee=Math.sin(E)/c(N,U,W);N*=ee,U*=ee,W*=ee,Q=Math.cos(w),X=X*Q+j*N+oe*W-ie*U,oe=oe*Q+j*U+ie*N-X*W,ie=ie*Q+j*W+X*U-oe*N,j=j*Q-X*N-oe*U-ie*W}var re=f(X,oe,ie,j);re>1e-6?(X/=re,oe/=re,ie/=re,j/=re):(X=oe=ie=0,j=1),this.rotation.set(_,X,oe,ie,j)},T.lookAt=function(_,w,S,E){this.recalcMatrix(_),S=S||this.computedCenter,w=w||this.computedEye,E=E||this.computedUp;var y=this.computedMatrix;a(y,w,S,E);var b=this.computedRotation;s(b,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),g(b,b),this.rotation.set(_,b[0],b[1],b[2],b[3]);for(var p=0,u=0;u<3;++u)p+=Math.pow(S[u]-w[u],2);this.radius.set(_,.5*Math.log(Math.max(p,1e-6))),this.center.set(_,S[0],S[1],S[2])},T.translate=function(_,w,S,E){this.center.move(_,w||0,S||0,E||0)},T.setMatrix=function(_,w){var S=this.computedRotation;s(S,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),g(S,S),this.rotation.set(_,S[0],S[1],S[2],S[3]);var E=this.computedMatrix;n(E,w);var y=E[15];if(Math.abs(y)>1e-6){var b=E[12]/y,p=E[13]/y,u=E[14]/y;this.recalcMatrix(_);var m=Math.exp(this.computedRadius[0]);this.center.set(_,b-E[2]*m,p-E[6]*m,u-E[10]*m),this.radius.idle(_)}else this.center.idle(_),this.radius.idle(_)},T.setDistance=function(_,w){w>0&&this.radius.set(_,Math.log(w))},T.setDistanceLimits=function(_,w){_>0?_=Math.log(_):_=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=w},T.getDistanceLimits=function(_){var w=this.radius.bounds;return _?(_[0]=Math.exp(w[0][0]),_[1]=Math.exp(w[1][0]),_):[Math.exp(w[0][0]),Math.exp(w[1][0])]},T.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]}},T.fromJSON=function(_){var w=this.lastT(),S=_.center;S&&this.center.set(w,S[0],S[1],S[2]);var E=_.rotation;E&&this.rotation.set(w,E[0],E[1],E[2],E[3]);var y=_.distance;y&&y>0&&this.radius.set(w,Math.log(y)),this.setDistanceLimits(_.zoomMin,_.zoomMax)};function l(_){_=_||{};var w=_.center||[0,0,0],S=_.rotation||[0,0,0,1],E=_.radius||1;w=[].slice.call(w,0,3),S=[].slice.call(S,0,4),g(S,S);var y=new v(S,w,Math.log(E));return y.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&y.lookAt(0,_.eye,_.center,_.up),y}},1371:function(e,t,r){"use strict";var o=r(3233);e.exports=function(i,n,s){return s=typeof s<"u"?s+"":" ",o(s,n)+i}},3202:function(e){e.exports=function(r,o){o||(o=[0,""]),r=String(r);var a=parseFloat(r,10);return o[0]=a,o[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",o}},3088:function(e,t,r){"use strict";e.exports=a;var o=r(3140);function a(i,n){for(var s=n.length|0,c=i.length,f=[new Array(s),new Array(s)],g=0;g<s;++g)f[0][g]=[],f[1][g]=[];for(var g=0;g<c;++g){var v=i[g];f[0][v[0]].push(v),f[1][v[1]].push(v)}for(var T=[],g=0;g<s;++g)f[0][g].length+f[1][g].length===0&&T.push([g]);function l(u,m){var h=f[m][u[m]];h.splice(h.indexOf(u),1)}function _(u,m,h){for(var P,L,z,F=0;F<2;++F)if(f[F][m].length>0){P=f[F][m][0],z=F;break}L=P[z^1];for(var B=0;B<2;++B)for(var O=f[B][m],I=0;I<O.length;++I){var N=O[I],U=N[B^1],W=o(n[u],n[m],n[L],n[U]);W>0&&(P=N,L=U,z=B)}return h||P&&l(P,z),L}function w(u,m){var h=f[m][u][0],P=[u];l(h,m);for(var L=h[m^1],z=m;;){for(;L!==u;)P.push(L),L=_(P[P.length-2],L,!1);if(f[0][u].length+f[1][u].length===0)break;var F=P[P.length-1],B=u,O=P[1],I=_(F,B,!0);if(o(n[F],n[B],n[O],n[I])<0)break;P.push(u),L=_(F,B)}return P}function S(u,m){return m[1]===m[m.length-1]}for(var g=0;g<s;++g)for(var E=0;E<2;++E){for(var y=[];f[E][g].length>0;){var b=f[0][g].length,p=w(g,E);S(y,p)?y.push.apply(y,p):(y.length>0&&T.push(y),y=p)}y.length>0&&T.push(y)}return T}},5609:function(e,t,r){"use strict";e.exports=a;var o=r(3134);function a(i,n){for(var s=o(i,n.length),c=new Array(n.length),f=new Array(n.length),g=[],v=0;v<n.length;++v){var T=s[v].length;f[v]=T,c[v]=!0,T<=1&&g.push(v)}for(;g.length>0;){var l=g.pop();c[l]=!1;for(var _=s[l],v=0;v<_.length;++v){var w=_[v];--f[w]===0&&g.push(w)}}for(var S=new Array(n.length),E=[],v=0;v<n.length;++v)if(c[v]){var l=E.length;S[v]=l,E.push(n[v])}else S[v]=-1;for(var y=[],v=0;v<i.length;++v){var b=i[v];c[b[0]]&&c[b[1]]&&y.push([S[b[0]],S[b[1]]])}return[y,E]}},2095:function(e,t,r){"use strict";e.exports=T;var o=r(3134),a=r(3088),i=r(5085),n=r(5250),s=r(8210),c=r(1682),f=r(5609);function g(l,_){for(var w=new Array(l),S=0;S<l;++S)w[S]=_;return w}function v(l){for(var _=new Array(l),w=0;w<l;++w)_[w]=[];return _}function T(l,_){var ee=f(l,_);l=ee[0],_=ee[1];for(var w=_.length,S=l.length,E=o(l,_.length),y=0;y<w;++y)if(E[y].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var b=a(l,_);function p(Xe){for(var it=Xe.length,ot=[0],tt=0;tt<it;++tt){var lt=_[Xe[tt]],Ee=_[Xe[(tt+1)%it]],_e=n(-lt[0],lt[1]),fe=n(-lt[0],Ee[1]),Fe=n(Ee[0],lt[1]),rt=n(Ee[0],Ee[1]);ot=s(ot,s(s(_e,fe),s(Fe,rt)))}return ot[ot.length-1]>0}b=b.filter(p);for(var u=b.length,m=new Array(u),h=new Array(u),y=0;y<u;++y){m[y]=y;var P=new Array(u),L=b[y].map(function(it){return _[it]}),z=i([L]),F=0;e:for(var B=0;B<u;++B)if(P[B]=0,y!==B){for(var O=b[B],I=O.length,N=0;N<I;++N){var U=z(_[O[N]]);if(U!==0){U<0&&(P[B]=1,F+=1);continue e}}P[B]=1,F+=1}h[y]=[F,y,P]}h.sort(function(Xe,it){return it[0]-Xe[0]});for(var y=0;y<u;++y)for(var P=h[y],W=P[1],Q=P[2],B=0;B<u;++B)Q[B]&&(m[B]=W);for(var ue=v(u),y=0;y<u;++y)ue[y].push(m[y]),ue[m[y]].push(y);for(var le={},he=g(w,!1),y=0;y<u;++y)for(var O=b[y],I=O.length,B=0;B<I;++B){var G=O[B],$=O[(B+1)%I],J=Math.min(G,$)+":"+Math.max(G,$);if(J in le){var X=le[J];ue[X].push(y),ue[y].push(X),he[G]=he[$]=!0}else le[J]=y}function oe(Xe){for(var it=Xe.length,ot=0;ot<it;++ot)if(!he[Xe[ot]])return!1;return!0}for(var ie=[],j=g(u,-1),y=0;y<u;++y)m[y]===y&&!oe(b[y])?(ie.push(y),j[y]=0):j[y]=-1;for(var ee=[];ie.length>0;){var re=ie.pop(),ce=ue[re];c(ce,function(Xe,it){return Xe-it});var be=ce.length,Ae=j[re],ze;if(Ae===0){var O=b[re];ze=[O]}for(var y=0;y<be;++y){var Re=ce[y];if(!(j[Re]>=0)&&(j[Re]=Ae^1,ie.push(Re),Ae===0)){var O=b[Re];oe(O)||(O.reverse(),ze.push(O))}}Ae===0&&ee.push(ze)}return ee}},5085:function(e,t,r){e.exports=_;var o=r(3250)[3],a=r(4209),i=r(3352),n=r(2478);function s(){return!0}function c(w){return function(S,E){var y=w[S];return y?!!y.queryPoint(E,s):!1}}function f(w){for(var S={},E=0;E<w.length;++E){var y=w[E],b=y[0][0],p=y[0][1],u=y[1][1],m=[Math.min(p,u),Math.max(p,u)];b in S?S[b].push(m):S[b]=[m]}for(var h={},P=Object.keys(S),E=0;E<P.length;++E){var L=S[P[E]];h[P[E]]=i(L)}return c(h)}function g(w,S){return function(E){var y=n.le(S,E[0]);if(y<0)return 1;var b=w[y];if(!b)if(y>0&&S[y]===E[0])b=w[y-1];else return 1;for(var p=1;b;){var u=b.key,m=o(E,u[0],u[1]);if(u[0][0]<u[1][0])if(m<0)b=b.left;else if(m>0)p=-1,b=b.right;else return 0;else if(m>0)b=b.left;else if(m<0)p=1,b=b.right;else return 0}return p}}function v(w){return 1}function T(w){return function(E){return w(E[0],E[1])?0:1}}function l(w,S){return function(y){return w(y[0],y[1])?0:S(y)}}function _(w){for(var S=w.length,E=[],y=[],b=0,p=0;p<S;++p)for(var u=w[p],m=u.length,h=m-1,P=0;P<m;h=P++){var L=u[h],z=u[P];L[0]===z[0]?y.push([L,z]):E.push([L,z])}if(E.length===0)return y.length===0?v:T(f(y));var F=a(E),B=g(F.slabs,F.coordinates);return y.length===0?B:l(f(y),B)}},9346:function(e){"use strict";var t=new Float64Array(4),r=new Float64Array(4),o=new Float64Array(4);function a(i,n,s,c,f){t.length<c.length&&(t=new Float64Array(c.length),r=new Float64Array(c.length),o=new Float64Array(c.length));for(var g=0;g<c.length;++g)t[g]=i[g]-c[g],r[g]=n[g]-i[g],o[g]=s[g]-i[g];for(var v=0,T=0,l=0,_=0,w=0,S=0,g=0;g<c.length;++g){var E=r[g],y=o[g],b=t[g];v+=E*E,T+=E*y,l+=y*y,_+=b*E,w+=b*y,S+=b*b}var p=Math.abs(v*l-T*T),u=T*w-l*_,m=T*_-v*w,h;if(u+m<=p)if(u<0)m<0&&_<0?(m=0,-_>=v?(u=1,h=v+2*_+S):(u=-_/v,h=_*u+S)):(u=0,w>=0?(m=0,h=S):-w>=l?(m=1,h=l+2*w+S):(m=-w/l,h=w*m+S));else if(m<0)m=0,_>=0?(u=0,h=S):-_>=v?(u=1,h=v+2*_+S):(u=-_/v,h=_*u+S);else{var P=1/p;u*=P,m*=P,h=u*(v*u+T*m+2*_)+m*(T*u+l*m+2*w)+S}else{var L,z,F,B;u<0?(L=T+_,z=l+w,z>L?(F=z-L,B=v-2*T+l,F>=B?(u=1,m=0,h=v+2*_+S):(u=F/B,m=1-u,h=u*(v*u+T*m+2*_)+m*(T*u+l*m+2*w)+S)):(u=0,z<=0?(m=1,h=l+2*w+S):w>=0?(m=0,h=S):(m=-w/l,h=w*m+S))):m<0?(L=T+w,z=v+_,z>L?(F=z-L,B=v-2*T+l,F>=B?(m=1,u=0,h=l+2*w+S):(m=F/B,u=1-m,h=u*(v*u+T*m+2*_)+m*(T*u+l*m+2*w)+S)):(m=0,z<=0?(u=1,h=v+2*_+S):_>=0?(u=0,h=S):(u=-_/v,h=_*u+S))):(F=l+w-T-_,F<=0?(u=0,m=1,h=l+2*w+S):(B=v-2*T+l,F>=B?(u=1,m=0,h=v+2*_+S):(u=F/B,m=1-u,h=u*(v*u+T*m+2*_)+m*(T*u+l*m+2*w)+S)))}for(var O=1-u-m,g=0;g<c.length;++g)f[g]=O*i[g]+u*n[g]+m*s[g];return h<0?0:h}e.exports=a},8648:function(e,t,r){e.exports=r(783)},2653:function(e,t,r){"use strict";var o=r(3865);e.exports=a;function a(i,n){for(var s=i.length,c=new Array(s),f=0;f<s;++f)c[f]=o(i[f],n[f]);return c}},5838:function(e,t,r){"use strict";e.exports=a;var o=r(7842);function a(i){for(var n=new Array(i.length),s=0;s<i.length;++s)n[s]=o(i[s]);return n}},8987:function(e,t,r){"use strict";var o=r(7842),a=r(6504);e.exports=i;function i(n,s){for(var c=o(s),f=n.length,g=new Array(f),v=0;v<f;++v)g[v]=a(n[v],c);return g}},544:function(e,t,r){"use strict";var o=r(5572);e.exports=a;function a(i,n){for(var s=i.length,c=new Array(s),f=0;f<s;++f)c[f]=o(i[f],n[f]);return c}},5771:function(e,t,r){"use strict";var o=r(8507),a=r(3788),i=r(2419);e.exports=n;function n(s){s.sort(a);for(var c=s.length,f=0,g=0;g<c;++g){var v=s[g],T=i(v);if(T!==0){if(f>0){var l=s[f-1];if(o(v,l)===0&&i(l)!==T){f-=1;continue}}s[f++]=v}}return s.length=f,s}},3233:function(e){"use strict";var t="",r;e.exports=o;function o(a,i){if(typeof a!="string")throw new TypeError("expected a string");if(i===1)return a;if(i===2)return a+a;var n=a.length*i;if(r!==a||typeof r>"u")r=a,t="";else if(t.length>=n)return t.substr(0,n);for(;n>t.length&&i>1;)i&1&&(t+=a),i>>=1,a+=a;return t+=a,t=t.substr(0,n),t}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){"use strict";e.exports=t;function t(r){for(var o=r.length,a=r[r.length-1],i=o,n=o-2;n>=0;--n){var s=a,c=r[n];a=s+c;var f=a-s,g=c-f;g&&(r[--i]=a,a=g)}for(var v=0,n=i;n<o;++n){var s=r[n],c=a;a=s+c;var f=a-s,g=c-f;g&&(r[v++]=g)}return r[v++]=a,r.length=v,r}},2962:function(e,t,r){"use strict";var o=r(5250),a=r(8210),i=r(3012),n=r(7004),s=6;function c(S,E,y,b){return function(u){return b(S(y(u[0][0],u[1][1]),y(-u[0][1],u[1][0])))}}function f(S,E,y,b){return function(u){return b(S(E(S(y(u[1][1],u[2][2]),y(-u[1][2],u[2][1])),u[0][0]),S(E(S(y(u[1][0],u[2][2]),y(-u[1][2],u[2][0])),-u[0][1]),E(S(y(u[1][0],u[2][1]),y(-u[1][1],u[2][0])),u[0][2]))))}}function g(S,E,y,b){return function(u){return b(S(S(E(S(E(S(y(u[2][2],u[3][3]),y(-u[2][3],u[3][2])),u[1][1]),S(E(S(y(u[2][1],u[3][3]),y(-u[2][3],u[3][1])),-u[1][2]),E(S(y(u[2][1],u[3][2]),y(-u[2][2],u[3][1])),u[1][3]))),u[0][0]),E(S(E(S(y(u[2][2],u[3][3]),y(-u[2][3],u[3][2])),u[1][0]),S(E(S(y(u[2][0],u[3][3]),y(-u[2][3],u[3][0])),-u[1][2]),E(S(y(u[2][0],u[3][2]),y(-u[2][2],u[3][0])),u[1][3]))),-u[0][1])),S(E(S(E(S(y(u[2][1],u[3][3]),y(-u[2][3],u[3][1])),u[1][0]),S(E(S(y(u[2][0],u[3][3]),y(-u[2][3],u[3][0])),-u[1][1]),E(S(y(u[2][0],u[3][1]),y(-u[2][1],u[3][0])),u[1][3]))),u[0][2]),E(S(E(S(y(u[2][1],u[3][2]),y(-u[2][2],u[3][1])),u[1][0]),S(E(S(y(u[2][0],u[3][2]),y(-u[2][2],u[3][0])),-u[1][1]),E(S(y(u[2][0],u[3][1]),y(-u[2][1],u[3][0])),u[1][2]))),-u[0][3]))))}}function v(S,E,y,b){return function(u){return b(S(S(E(S(S(E(S(E(S(y(u[3][3],u[4][4]),y(-u[3][4],u[4][3])),u[2][2]),S(E(S(y(u[3][2],u[4][4]),y(-u[3][4],u[4][2])),-u[2][3]),E(S(y(u[3][2],u[4][3]),y(-u[3][3],u[4][2])),u[2][4]))),u[1][1]),E(S(E(S(y(u[3][3],u[4][4]),y(-u[3][4],u[4][3])),u[2][1]),S(E(S(y(u[3][1],u[4][4]),y(-u[3][4],u[4][1])),-u[2][3]),E(S(y(u[3][1],u[4][3]),y(-u[3][3],u[4][1])),u[2][4]))),-u[1][2])),S(E(S(E(S(y(u[3][2],u[4][4]),y(-u[3][4],u[4][2])),u[2][1]),S(E(S(y(u[3][1],u[4][4]),y(-u[3][4],u[4][1])),-u[2][2]),E(S(y(u[3][1],u[4][2]),y(-u[3][2],u[4][1])),u[2][4]))),u[1][3]),E(S(E(S(y(u[3][2],u[4][3]),y(-u[3][3],u[4][2])),u[2][1]),S(E(S(y(u[3][1],u[4][3]),y(-u[3][3],u[4][1])),-u[2][2]),E(S(y(u[3][1],u[4][2]),y(-u[3][2],u[4][1])),u[2][3]))),-u[1][4]))),u[0][0]),E(S(S(E(S(E(S(y(u[3][3],u[4][4]),y(-u[3][4],u[4][3])),u[2][2]),S(E(S(y(u[3][2],u[4][4]),y(-u[3][4],u[4][2])),-u[2][3]),E(S(y(u[3][2],u[4][3]),y(-u[3][3],u[4][2])),u[2][4]))),u[1][0]),E(S(E(S(y(u[3][3],u[4][4]),y(-u[3][4],u[4][3])),u[2][0]),S(E(S(y(u[3][0],u[4][4]),y(-u[3][4],u[4][0])),-u[2][3]),E(S(y(u[3][0],u[4][3]),y(-u[3][3],u[4][0])),u[2][4]))),-u[1][2])),S(E(S(E(S(y(u[3][2],u[4][4]),y(-u[3][4],u[4][2])),u[2][0]),S(E(S(y(u[3][0],u[4][4]),y(-u[3][4],u[4][0])),-u[2][2]),E(S(y(u[3][0],u[4][2]),y(-u[3][2],u[4][0])),u[2][4]))),u[1][3]),E(S(E(S(y(u[3][2],u[4][3]),y(-u[3][3],u[4][2])),u[2][0]),S(E(S(y(u[3][0],u[4][3]),y(-u[3][3],u[4][0])),-u[2][2]),E(S(y(u[3][0],u[4][2]),y(-u[3][2],u[4][0])),u[2][3]))),-u[1][4]))),-u[0][1])),S(E(S(S(E(S(E(S(y(u[3][3],u[4][4]),y(-u[3][4],u[4][3])),u[2][1]),S(E(S(y(u[3][1],u[4][4]),y(-u[3][4],u[4][1])),-u[2][3]),E(S(y(u[3][1],u[4][3]),y(-u[3][3],u[4][1])),u[2][4]))),u[1][0]),E(S(E(S(y(u[3][3],u[4][4]),y(-u[3][4],u[4][3])),u[2][0]),S(E(S(y(u[3][0],u[4][4]),y(-u[3][4],u[4][0])),-u[2][3]),E(S(y(u[3][0],u[4][3]),y(-u[3][3],u[4][0])),u[2][4]))),-u[1][1])),S(E(S(E(S(y(u[3][1],u[4][4]),y(-u[3][4],u[4][1])),u[2][0]),S(E(S(y(u[3][0],u[4][4]),y(-u[3][4],u[4][0])),-u[2][1]),E(S(y(u[3][0],u[4][1]),y(-u[3][1],u[4][0])),u[2][4]))),u[1][3]),E(S(E(S(y(u[3][1],u[4][3]),y(-u[3][3],u[4][1])),u[2][0]),S(E(S(y(u[3][0],u[4][3]),y(-u[3][3],u[4][0])),-u[2][1]),E(S(y(u[3][0],u[4][1]),y(-u[3][1],u[4][0])),u[2][3]))),-u[1][4]))),u[0][2]),S(E(S(S(E(S(E(S(y(u[3][2],u[4][4]),y(-u[3][4],u[4][2])),u[2][1]),S(E(S(y(u[3][1],u[4][4]),y(-u[3][4],u[4][1])),-u[2][2]),E(S(y(u[3][1],u[4][2]),y(-u[3][2],u[4][1])),u[2][4]))),u[1][0]),E(S(E(S(y(u[3][2],u[4][4]),y(-u[3][4],u[4][2])),u[2][0]),S(E(S(y(u[3][0],u[4][4]),y(-u[3][4],u[4][0])),-u[2][2]),E(S(y(u[3][0],u[4][2]),y(-u[3][2],u[4][0])),u[2][4]))),-u[1][1])),S(E(S(E(S(y(u[3][1],u[4][4]),y(-u[3][4],u[4][1])),u[2][0]),S(E(S(y(u[3][0],u[4][4]),y(-u[3][4],u[4][0])),-u[2][1]),E(S(y(u[3][0],u[4][1]),y(-u[3][1],u[4][0])),u[2][4]))),u[1][2]),E(S(E(S(y(u[3][1],u[4][2]),y(-u[3][2],u[4][1])),u[2][0]),S(E(S(y(u[3][0],u[4][2]),y(-u[3][2],u[4][0])),-u[2][1]),E(S(y(u[3][0],u[4][1]),y(-u[3][1],u[4][0])),u[2][2]))),-u[1][4]))),-u[0][3]),E(S(S(E(S(E(S(y(u[3][2],u[4][3]),y(-u[3][3],u[4][2])),u[2][1]),S(E(S(y(u[3][1],u[4][3]),y(-u[3][3],u[4][1])),-u[2][2]),E(S(y(u[3][1],u[4][2]),y(-u[3][2],u[4][1])),u[2][3]))),u[1][0]),E(S(E(S(y(u[3][2],u[4][3]),y(-u[3][3],u[4][2])),u[2][0]),S(E(S(y(u[3][0],u[4][3]),y(-u[3][3],u[4][0])),-u[2][2]),E(S(y(u[3][0],u[4][2]),y(-u[3][2],u[4][0])),u[2][3]))),-u[1][1])),S(E(S(E(S(y(u[3][1],u[4][3]),y(-u[3][3],u[4][1])),u[2][0]),S(E(S(y(u[3][0],u[4][3]),y(-u[3][3],u[4][0])),-u[2][1]),E(S(y(u[3][0],u[4][1]),y(-u[3][1],u[4][0])),u[2][3]))),u[1][2]),E(S(E(S(y(u[3][1],u[4][2]),y(-u[3][2],u[4][1])),u[2][0]),S(E(S(y(u[3][0],u[4][2]),y(-u[3][2],u[4][0])),-u[2][1]),E(S(y(u[3][0],u[4][1]),y(-u[3][1],u[4][0])),u[2][2]))),-u[1][3]))),u[0][4])))))}}function T(S){var E=S===2?c:S===3?f:S===4?g:S===5?v:void 0;return E(a,i,o,n)}var l=[function(){return[0]},function(E){return[E[0][0]]}];function _(S,E,y,b,p,u,m,h){return function(L){switch(L.length){case 0:return S(L);case 1:return E(L);case 2:return y(L);case 3:return b(L);case 4:return p(L);case 5:return u(L)}var z=m[L.length];return z||(z=m[L.length]=h(L.length)),z(L)}}function w(){for(;l.length<s;)l.push(T(l.length));e.exports=_.apply(void 0,l.concat([l,T]));for(var S=0;S<l.length;++S)e.exports[S]=l[S]}w()},1944:function(e,t,r){"use strict";var o=r(5250),a=r(8210);e.exports=i;function i(n,s){for(var c=o(n[0],s[0]),f=1;f<n.length;++f)c=a(c,o(n[f],s[f]));return c}},2646:function(e,t,r){"use strict";var o=r(5250),a=r(8210),i=r(8545),n=r(3012),s=6;function c(p){var u=p===3?T:p===4?l:p===5?_:w;return u(a,i,o,n)}function f(){return 0}function g(){return 0}function v(){return 0}function T(p,u,m,h){function P(L,z,F){var B=m(L[0],L[0]),O=h(B,z[0]),I=h(B,F[0]),N=m(z[0],z[0]),U=h(N,L[0]),W=h(N,F[0]),Q=m(F[0],F[0]),ue=h(Q,L[0]),le=h(Q,z[0]),he=p(u(le,W),u(U,O)),G=u(ue,I),$=u(he,G);return $[$.length-1]}return P}function l(p,u,m,h){function P(L,z,F,B){var O=p(m(L[0],L[0]),m(L[1],L[1])),I=h(O,z[0]),N=h(O,F[0]),U=h(O,B[0]),W=p(m(z[0],z[0]),m(z[1],z[1])),Q=h(W,L[0]),ue=h(W,F[0]),le=h(W,B[0]),he=p(m(F[0],F[0]),m(F[1],F[1])),G=h(he,L[0]),$=h(he,z[0]),J=h(he,B[0]),X=p(m(B[0],B[0]),m(B[1],B[1])),oe=h(X,L[0]),ie=h(X,z[0]),j=h(X,F[0]),ee=p(p(h(u(j,J),z[1]),p(h(u(ie,le),-F[1]),h(u($,ue),B[1]))),p(h(u(ie,le),L[1]),p(h(u(oe,U),-z[1]),h(u(Q,I),B[1])))),re=p(p(h(u(j,J),L[1]),p(h(u(oe,U),-F[1]),h(u(G,N),B[1]))),p(h(u($,ue),L[1]),p(h(u(G,N),-z[1]),h(u(Q,I),F[1])))),ce=u(ee,re);return ce[ce.length-1]}return P}function _(p,u,m,h){function P(L,z,F,B,O){var I=p(m(L[0],L[0]),p(m(L[1],L[1]),m(L[2],L[2]))),N=h(I,z[0]),U=h(I,F[0]),W=h(I,B[0]),Q=h(I,O[0]),ue=p(m(z[0],z[0]),p(m(z[1],z[1]),m(z[2],z[2]))),le=h(ue,L[0]),he=h(ue,F[0]),G=h(ue,B[0]),$=h(ue,O[0]),J=p(m(F[0],F[0]),p(m(F[1],F[1]),m(F[2],F[2]))),X=h(J,L[0]),oe=h(J,z[0]),ie=h(J,B[0]),j=h(J,O[0]),ee=p(m(B[0],B[0]),p(m(B[1],B[1]),m(B[2],B[2]))),re=h(ee,L[0]),ce=h(ee,z[0]),be=h(ee,F[0]),Ae=h(ee,O[0]),ze=p(m(O[0],O[0]),p(m(O[1],O[1]),m(O[2],O[2]))),Re=h(ze,L[0]),Xe=h(ze,z[0]),it=h(ze,F[0]),ot=h(ze,B[0]),tt=p(p(p(h(p(h(u(ot,Ae),F[1]),p(h(u(it,j),-B[1]),h(u(be,ie),O[1]))),z[2]),p(h(p(h(u(ot,Ae),z[1]),p(h(u(Xe,$),-B[1]),h(u(ce,G),O[1]))),-F[2]),h(p(h(u(it,j),z[1]),p(h(u(Xe,$),-F[1]),h(u(oe,he),O[1]))),B[2]))),p(h(p(h(u(be,ie),z[1]),p(h(u(ce,G),-F[1]),h(u(oe,he),B[1]))),-O[2]),p(h(p(h(u(ot,Ae),z[1]),p(h(u(Xe,$),-B[1]),h(u(ce,G),O[1]))),L[2]),h(p(h(u(ot,Ae),L[1]),p(h(u(Re,Q),-B[1]),h(u(re,W),O[1]))),-z[2])))),p(p(h(p(h(u(Xe,$),L[1]),p(h(u(Re,Q),-z[1]),h(u(le,N),O[1]))),B[2]),p(h(p(h(u(ce,G),L[1]),p(h(u(re,W),-z[1]),h(u(le,N),B[1]))),-O[2]),h(p(h(u(be,ie),z[1]),p(h(u(ce,G),-F[1]),h(u(oe,he),B[1]))),L[2]))),p(h(p(h(u(be,ie),L[1]),p(h(u(re,W),-F[1]),h(u(X,U),B[1]))),-z[2]),p(h(p(h(u(ce,G),L[1]),p(h(u(re,W),-z[1]),h(u(le,N),B[1]))),F[2]),h(p(h(u(oe,he),L[1]),p(h(u(X,U),-z[1]),h(u(le,N),F[1]))),-B[2]))))),lt=p(p(p(h(p(h(u(ot,Ae),F[1]),p(h(u(it,j),-B[1]),h(u(be,ie),O[1]))),L[2]),h(p(h(u(ot,Ae),L[1]),p(h(u(Re,Q),-B[1]),h(u(re,W),O[1]))),-F[2])),p(h(p(h(u(it,j),L[1]),p(h(u(Re,Q),-F[1]),h(u(X,U),O[1]))),B[2]),h(p(h(u(be,ie),L[1]),p(h(u(re,W),-F[1]),h(u(X,U),B[1]))),-O[2]))),p(p(h(p(h(u(it,j),z[1]),p(h(u(Xe,$),-F[1]),h(u(oe,he),O[1]))),L[2]),h(p(h(u(it,j),L[1]),p(h(u(Re,Q),-F[1]),h(u(X,U),O[1]))),-z[2])),p(h(p(h(u(Xe,$),L[1]),p(h(u(Re,Q),-z[1]),h(u(le,N),O[1]))),F[2]),h(p(h(u(oe,he),L[1]),p(h(u(X,U),-z[1]),h(u(le,N),F[1]))),-O[2])))),Ee=u(tt,lt);return Ee[Ee.length-1]}return P}function w(p,u,m,h){function P(L,z,F,B,O,I){var N=p(p(m(L[0],L[0]),m(L[1],L[1])),p(m(L[2],L[2]),m(L[3],L[3]))),U=h(N,z[0]),W=h(N,F[0]),Q=h(N,B[0]),ue=h(N,O[0]),le=h(N,I[0]),he=p(p(m(z[0],z[0]),m(z[1],z[1])),p(m(z[2],z[2]),m(z[3],z[3]))),G=h(he,L[0]),$=h(he,F[0]),J=h(he,B[0]),X=h(he,O[0]),oe=h(he,I[0]),ie=p(p(m(F[0],F[0]),m(F[1],F[1])),p(m(F[2],F[2]),m(F[3],F[3]))),j=h(ie,L[0]),ee=h(ie,z[0]),re=h(ie,B[0]),ce=h(ie,O[0]),be=h(ie,I[0]),Ae=p(p(m(B[0],B[0]),m(B[1],B[1])),p(m(B[2],B[2]),m(B[3],B[3]))),ze=h(Ae,L[0]),Re=h(Ae,z[0]),Xe=h(Ae,F[0]),it=h(Ae,O[0]),ot=h(Ae,I[0]),tt=p(p(m(O[0],O[0]),m(O[1],O[1])),p(m(O[2],O[2]),m(O[3],O[3]))),lt=h(tt,L[0]),Ee=h(tt,z[0]),_e=h(tt,F[0]),fe=h(tt,B[0]),Fe=h(tt,I[0]),rt=p(p(m(I[0],I[0]),m(I[1],I[1])),p(m(I[2],I[2]),m(I[3],I[3]))),st=h(rt,L[0]),Qe=h(rt,z[0]),Lt=h(rt,F[0]),kt=h(rt,B[0]),Vt=h(rt,O[0]),Zt=p(p(p(h(p(p(h(p(h(u(Vt,Fe),B[1]),p(h(u(kt,ot),-O[1]),h(u(fe,it),I[1]))),F[2]),h(p(h(u(Vt,Fe),F[1]),p(h(u(Lt,be),-O[1]),h(u(_e,ce),I[1]))),-B[2])),p(h(p(h(u(kt,ot),F[1]),p(h(u(Lt,be),-B[1]),h(u(Xe,re),I[1]))),O[2]),h(p(h(u(fe,it),F[1]),p(h(u(_e,ce),-B[1]),h(u(Xe,re),O[1]))),-I[2]))),z[3]),p(h(p(p(h(p(h(u(Vt,Fe),B[1]),p(h(u(kt,ot),-O[1]),h(u(fe,it),I[1]))),z[2]),h(p(h(u(Vt,Fe),z[1]),p(h(u(Qe,oe),-O[1]),h(u(Ee,X),I[1]))),-B[2])),p(h(p(h(u(kt,ot),z[1]),p(h(u(Qe,oe),-B[1]),h(u(Re,J),I[1]))),O[2]),h(p(h(u(fe,it),z[1]),p(h(u(Ee,X),-B[1]),h(u(Re,J),O[1]))),-I[2]))),-F[3]),h(p(p(h(p(h(u(Vt,Fe),F[1]),p(h(u(Lt,be),-O[1]),h(u(_e,ce),I[1]))),z[2]),h(p(h(u(Vt,Fe),z[1]),p(h(u(Qe,oe),-O[1]),h(u(Ee,X),I[1]))),-F[2])),p(h(p(h(u(Lt,be),z[1]),p(h(u(Qe,oe),-F[1]),h(u(ee,$),I[1]))),O[2]),h(p(h(u(_e,ce),z[1]),p(h(u(Ee,X),-F[1]),h(u(ee,$),O[1]))),-I[2]))),B[3]))),p(p(h(p(p(h(p(h(u(kt,ot),F[1]),p(h(u(Lt,be),-B[1]),h(u(Xe,re),I[1]))),z[2]),h(p(h(u(kt,ot),z[1]),p(h(u(Qe,oe),-B[1]),h(u(Re,J),I[1]))),-F[2])),p(h(p(h(u(Lt,be),z[1]),p(h(u(Qe,oe),-F[1]),h(u(ee,$),I[1]))),B[2]),h(p(h(u(Xe,re),z[1]),p(h(u(Re,J),-F[1]),h(u(ee,$),B[1]))),-I[2]))),-O[3]),h(p(p(h(p(h(u(fe,it),F[1]),p(h(u(_e,ce),-B[1]),h(u(Xe,re),O[1]))),z[2]),h(p(h(u(fe,it),z[1]),p(h(u(Ee,X),-B[1]),h(u(Re,J),O[1]))),-F[2])),p(h(p(h(u(_e,ce),z[1]),p(h(u(Ee,X),-F[1]),h(u(ee,$),O[1]))),B[2]),h(p(h(u(Xe,re),z[1]),p(h(u(Re,J),-F[1]),h(u(ee,$),B[1]))),-O[2]))),I[3])),p(h(p(p(h(p(h(u(Vt,Fe),B[1]),p(h(u(kt,ot),-O[1]),h(u(fe,it),I[1]))),z[2]),h(p(h(u(Vt,Fe),z[1]),p(h(u(Qe,oe),-O[1]),h(u(Ee,X),I[1]))),-B[2])),p(h(p(h(u(kt,ot),z[1]),p(h(u(Qe,oe),-B[1]),h(u(Re,J),I[1]))),O[2]),h(p(h(u(fe,it),z[1]),p(h(u(Ee,X),-B[1]),h(u(Re,J),O[1]))),-I[2]))),L[3]),h(p(p(h(p(h(u(Vt,Fe),B[1]),p(h(u(kt,ot),-O[1]),h(u(fe,it),I[1]))),L[2]),h(p(h(u(Vt,Fe),L[1]),p(h(u(st,le),-O[1]),h(u(lt,ue),I[1]))),-B[2])),p(h(p(h(u(kt,ot),L[1]),p(h(u(st,le),-B[1]),h(u(ze,Q),I[1]))),O[2]),h(p(h(u(fe,it),L[1]),p(h(u(lt,ue),-B[1]),h(u(ze,Q),O[1]))),-I[2]))),-z[3])))),p(p(p(h(p(p(h(p(h(u(Vt,Fe),z[1]),p(h(u(Qe,oe),-O[1]),h(u(Ee,X),I[1]))),L[2]),h(p(h(u(Vt,Fe),L[1]),p(h(u(st,le),-O[1]),h(u(lt,ue),I[1]))),-z[2])),p(h(p(h(u(Qe,oe),L[1]),p(h(u(st,le),-z[1]),h(u(G,U),I[1]))),O[2]),h(p(h(u(Ee,X),L[1]),p(h(u(lt,ue),-z[1]),h(u(G,U),O[1]))),-I[2]))),B[3]),h(p(p(h(p(h(u(kt,ot),z[1]),p(h(u(Qe,oe),-B[1]),h(u(Re,J),I[1]))),L[2]),h(p(h(u(kt,ot),L[1]),p(h(u(st,le),-B[1]),h(u(ze,Q),I[1]))),-z[2])),p(h(p(h(u(Qe,oe),L[1]),p(h(u(st,le),-z[1]),h(u(G,U),I[1]))),B[2]),h(p(h(u(Re,J),L[1]),p(h(u(ze,Q),-z[1]),h(u(G,U),B[1]))),-I[2]))),-O[3])),p(h(p(p(h(p(h(u(fe,it),z[1]),p(h(u(Ee,X),-B[1]),h(u(Re,J),O[1]))),L[2]),h(p(h(u(fe,it),L[1]),p(h(u(lt,ue),-B[1]),h(u(ze,Q),O[1]))),-z[2])),p(h(p(h(u(Ee,X),L[1]),p(h(u(lt,ue),-z[1]),h(u(G,U),O[1]))),B[2]),h(p(h(u(Re,J),L[1]),p(h(u(ze,Q),-z[1]),h(u(G,U),B[1]))),-O[2]))),I[3]),h(p(p(h(p(h(u(kt,ot),F[1]),p(h(u(Lt,be),-B[1]),h(u(Xe,re),I[1]))),z[2]),h(p(h(u(kt,ot),z[1]),p(h(u(Qe,oe),-B[1]),h(u(Re,J),I[1]))),-F[2])),p(h(p(h(u(Lt,be),z[1]),p(h(u(Qe,oe),-F[1]),h(u(ee,$),I[1]))),B[2]),h(p(h(u(Xe,re),z[1]),p(h(u(Re,J),-F[1]),h(u(ee,$),B[1]))),-I[2]))),L[3]))),p(p(h(p(p(h(p(h(u(kt,ot),F[1]),p(h(u(Lt,be),-B[1]),h(u(Xe,re),I[1]))),L[2]),h(p(h(u(kt,ot),L[1]),p(h(u(st,le),-B[1]),h(u(ze,Q),I[1]))),-F[2])),p(h(p(h(u(Lt,be),L[1]),p(h(u(st,le),-F[1]),h(u(j,W),I[1]))),B[2]),h(p(h(u(Xe,re),L[1]),p(h(u(ze,Q),-F[1]),h(u(j,W),B[1]))),-I[2]))),-z[3]),h(p(p(h(p(h(u(kt,ot),z[1]),p(h(u(Qe,oe),-B[1]),h(u(Re,J),I[1]))),L[2]),h(p(h(u(kt,ot),L[1]),p(h(u(st,le),-B[1]),h(u(ze,Q),I[1]))),-z[2])),p(h(p(h(u(Qe,oe),L[1]),p(h(u(st,le),-z[1]),h(u(G,U),I[1]))),B[2]),h(p(h(u(Re,J),L[1]),p(h(u(ze,Q),-z[1]),h(u(G,U),B[1]))),-I[2]))),F[3])),p(h(p(p(h(p(h(u(Lt,be),z[1]),p(h(u(Qe,oe),-F[1]),h(u(ee,$),I[1]))),L[2]),h(p(h(u(Lt,be),L[1]),p(h(u(st,le),-F[1]),h(u(j,W),I[1]))),-z[2])),p(h(p(h(u(Qe,oe),L[1]),p(h(u(st,le),-z[1]),h(u(G,U),I[1]))),F[2]),h(p(h(u(ee,$),L[1]),p(h(u(j,W),-z[1]),h(u(G,U),F[1]))),-I[2]))),-B[3]),h(p(p(h(p(h(u(Xe,re),z[1]),p(h(u(Re,J),-F[1]),h(u(ee,$),B[1]))),L[2]),h(p(h(u(Xe,re),L[1]),p(h(u(ze,Q),-F[1]),h(u(j,W),B[1]))),-z[2])),p(h(p(h(u(Re,J),L[1]),p(h(u(ze,Q),-z[1]),h(u(G,U),B[1]))),F[2]),h(p(h(u(ee,$),L[1]),p(h(u(j,W),-z[1]),h(u(G,U),F[1]))),-B[2]))),I[3]))))),Sr=p(p(p(h(p(p(h(p(h(u(Vt,Fe),B[1]),p(h(u(kt,ot),-O[1]),h(u(fe,it),I[1]))),F[2]),h(p(h(u(Vt,Fe),F[1]),p(h(u(Lt,be),-O[1]),h(u(_e,ce),I[1]))),-B[2])),p(h(p(h(u(kt,ot),F[1]),p(h(u(Lt,be),-B[1]),h(u(Xe,re),I[1]))),O[2]),h(p(h(u(fe,it),F[1]),p(h(u(_e,ce),-B[1]),h(u(Xe,re),O[1]))),-I[2]))),L[3]),p(h(p(p(h(p(h(u(Vt,Fe),B[1]),p(h(u(kt,ot),-O[1]),h(u(fe,it),I[1]))),L[2]),h(p(h(u(Vt,Fe),L[1]),p(h(u(st,le),-O[1]),h(u(lt,ue),I[1]))),-B[2])),p(h(p(h(u(kt,ot),L[1]),p(h(u(st,le),-B[1]),h(u(ze,Q),I[1]))),O[2]),h(p(h(u(fe,it),L[1]),p(h(u(lt,ue),-B[1]),h(u(ze,Q),O[1]))),-I[2]))),-F[3]),h(p(p(h(p(h(u(Vt,Fe),F[1]),p(h(u(Lt,be),-O[1]),h(u(_e,ce),I[1]))),L[2]),h(p(h(u(Vt,Fe),L[1]),p(h(u(st,le),-O[1]),h(u(lt,ue),I[1]))),-F[2])),p(h(p(h(u(Lt,be),L[1]),p(h(u(st,le),-F[1]),h(u(j,W),I[1]))),O[2]),h(p(h(u(_e,ce),L[1]),p(h(u(lt,ue),-F[1]),h(u(j,W),O[1]))),-I[2]))),B[3]))),p(p(h(p(p(h(p(h(u(kt,ot),F[1]),p(h(u(Lt,be),-B[1]),h(u(Xe,re),I[1]))),L[2]),h(p(h(u(kt,ot),L[1]),p(h(u(st,le),-B[1]),h(u(ze,Q),I[1]))),-F[2])),p(h(p(h(u(Lt,be),L[1]),p(h(u(st,le),-F[1]),h(u(j,W),I[1]))),B[2]),h(p(h(u(Xe,re),L[1]),p(h(u(ze,Q),-F[1]),h(u(j,W),B[1]))),-I[2]))),-O[3]),h(p(p(h(p(h(u(fe,it),F[1]),p(h(u(_e,ce),-B[1]),h(u(Xe,re),O[1]))),L[2]),h(p(h(u(fe,it),L[1]),p(h(u(lt,ue),-B[1]),h(u(ze,Q),O[1]))),-F[2])),p(h(p(h(u(_e,ce),L[1]),p(h(u(lt,ue),-F[1]),h(u(j,W),O[1]))),B[2]),h(p(h(u(Xe,re),L[1]),p(h(u(ze,Q),-F[1]),h(u(j,W),B[1]))),-O[2]))),I[3])),p(h(p(p(h(p(h(u(Vt,Fe),F[1]),p(h(u(Lt,be),-O[1]),h(u(_e,ce),I[1]))),z[2]),h(p(h(u(Vt,Fe),z[1]),p(h(u(Qe,oe),-O[1]),h(u(Ee,X),I[1]))),-F[2])),p(h(p(h(u(Lt,be),z[1]),p(h(u(Qe,oe),-F[1]),h(u(ee,$),I[1]))),O[2]),h(p(h(u(_e,ce),z[1]),p(h(u(Ee,X),-F[1]),h(u(ee,$),O[1]))),-I[2]))),L[3]),h(p(p(h(p(h(u(Vt,Fe),F[1]),p(h(u(Lt,be),-O[1]),h(u(_e,ce),I[1]))),L[2]),h(p(h(u(Vt,Fe),L[1]),p(h(u(st,le),-O[1]),h(u(lt,ue),I[1]))),-F[2])),p(h(p(h(u(Lt,be),L[1]),p(h(u(st,le),-F[1]),h(u(j,W),I[1]))),O[2]),h(p(h(u(_e,ce),L[1]),p(h(u(lt,ue),-F[1]),h(u(j,W),O[1]))),-I[2]))),-z[3])))),p(p(p(h(p(p(h(p(h(u(Vt,Fe),z[1]),p(h(u(Qe,oe),-O[1]),h(u(Ee,X),I[1]))),L[2]),h(p(h(u(Vt,Fe),L[1]),p(h(u(st,le),-O[1]),h(u(lt,ue),I[1]))),-z[2])),p(h(p(h(u(Qe,oe),L[1]),p(h(u(st,le),-z[1]),h(u(G,U),I[1]))),O[2]),h(p(h(u(Ee,X),L[1]),p(h(u(lt,ue),-z[1]),h(u(G,U),O[1]))),-I[2]))),F[3]),h(p(p(h(p(h(u(Lt,be),z[1]),p(h(u(Qe,oe),-F[1]),h(u(ee,$),I[1]))),L[2]),h(p(h(u(Lt,be),L[1]),p(h(u(st,le),-F[1]),h(u(j,W),I[1]))),-z[2])),p(h(p(h(u(Qe,oe),L[1]),p(h(u(st,le),-z[1]),h(u(G,U),I[1]))),F[2]),h(p(h(u(ee,$),L[1]),p(h(u(j,W),-z[1]),h(u(G,U),F[1]))),-I[2]))),-O[3])),p(h(p(p(h(p(h(u(_e,ce),z[1]),p(h(u(Ee,X),-F[1]),h(u(ee,$),O[1]))),L[2]),h(p(h(u(_e,ce),L[1]),p(h(u(lt,ue),-F[1]),h(u(j,W),O[1]))),-z[2])),p(h(p(h(u(Ee,X),L[1]),p(h(u(lt,ue),-z[1]),h(u(G,U),O[1]))),F[2]),h(p(h(u(ee,$),L[1]),p(h(u(j,W),-z[1]),h(u(G,U),F[1]))),-O[2]))),I[3]),h(p(p(h(p(h(u(fe,it),F[1]),p(h(u(_e,ce),-B[1]),h(u(Xe,re),O[1]))),z[2]),h(p(h(u(fe,it),z[1]),p(h(u(Ee,X),-B[1]),h(u(Re,J),O[1]))),-F[2])),p(h(p(h(u(_e,ce),z[1]),p(h(u(Ee,X),-F[1]),h(u(ee,$),O[1]))),B[2]),h(p(h(u(Xe,re),z[1]),p(h(u(Re,J),-F[1]),h(u(ee,$),B[1]))),-O[2]))),L[3]))),p(p(h(p(p(h(p(h(u(fe,it),F[1]),p(h(u(_e,ce),-B[1]),h(u(Xe,re),O[1]))),L[2]),h(p(h(u(fe,it),L[1]),p(h(u(lt,ue),-B[1]),h(u(ze,Q),O[1]))),-F[2])),p(h(p(h(u(_e,ce),L[1]),p(h(u(lt,ue),-F[1]),h(u(j,W),O[1]))),B[2]),h(p(h(u(Xe,re),L[1]),p(h(u(ze,Q),-F[1]),h(u(j,W),B[1]))),-O[2]))),-z[3]),h(p(p(h(p(h(u(fe,it),z[1]),p(h(u(Ee,X),-B[1]),h(u(Re,J),O[1]))),L[2]),h(p(h(u(fe,it),L[1]),p(h(u(lt,ue),-B[1]),h(u(ze,Q),O[1]))),-z[2])),p(h(p(h(u(Ee,X),L[1]),p(h(u(lt,ue),-z[1]),h(u(G,U),O[1]))),B[2]),h(p(h(u(Re,J),L[1]),p(h(u(ze,Q),-z[1]),h(u(G,U),B[1]))),-O[2]))),F[3])),p(h(p(p(h(p(h(u(_e,ce),z[1]),p(h(u(Ee,X),-F[1]),h(u(ee,$),O[1]))),L[2]),h(p(h(u(_e,ce),L[1]),p(h(u(lt,ue),-F[1]),h(u(j,W),O[1]))),-z[2])),p(h(p(h(u(Ee,X),L[1]),p(h(u(lt,ue),-z[1]),h(u(G,U),O[1]))),F[2]),h(p(h(u(ee,$),L[1]),p(h(u(j,W),-z[1]),h(u(G,U),F[1]))),-O[2]))),-B[3]),h(p(p(h(p(h(u(Xe,re),z[1]),p(h(u(Re,J),-F[1]),h(u(ee,$),B[1]))),L[2]),h(p(h(u(Xe,re),L[1]),p(h(u(ze,Q),-F[1]),h(u(j,W),B[1]))),-z[2])),p(h(p(h(u(Re,J),L[1]),p(h(u(ze,Q),-z[1]),h(u(G,U),B[1]))),F[2]),h(p(h(u(ee,$),L[1]),p(h(u(j,W),-z[1]),h(u(G,U),F[1]))),-B[2]))),O[3]))))),xr=u(Zt,Sr);return xr[xr.length-1]}return P}var S=[f,g,v];function E(p){var u=S[p.length];return u||(u=S[p.length]=c(p.length)),u.apply(void 0,p)}function y(p,u,m,h,P,L,z,F){function B(O,I,N,U,W,Q){switch(arguments.length){case 0:case 1:return 0;case 2:return h(O,I);case 3:return P(O,I,N);case 4:return L(O,I,N,U);case 5:return z(O,I,N,U,W);case 6:return F(O,I,N,U,W,Q)}for(var ue=new Array(arguments.length),le=0;le<arguments.length;++le)ue[le]=arguments[le];return p(ue)}return B}function b(){for(;S.length<=s;)S.push(c(S.length));e.exports=y.apply(void 0,[E].concat(S));for(var p=0;p<=s;++p)e.exports[p]=S[p]}b()},727:function(e,t,r){"use strict";var o=r(2962),a=6;function i(S){var E=S===2?c:S===3?f:S===4?g:S===5?v:T;return S<6?E(o[S]):E(o)}function n(){return[[0]]}function s(S,E){return[[E[0]],[S[0][0]]]}function c(S){return function(y,b){return[S([[+b[0],+y[0][1]],[+b[1],+y[1][1]]]),S([[+y[0][0],+b[0]],[+y[1][0],+b[1]]]),S(y)]}}function f(S){return function(y,b){return[S([[+b[0],+y[0][1],+y[0][2]],[+b[1],+y[1][1],+y[1][2]],[+b[2],+y[2][1],+y[2][2]]]),S([[+y[0][0],+b[0],+y[0][2]],[+y[1][0],+b[1],+y[1][2]],[+y[2][0],+b[2],+y[2][2]]]),S([[+y[0][0],+y[0][1],+b[0]],[+y[1][0],+y[1][1],+b[1]],[+y[2][0],+y[2][1],+b[2]]]),S(y)]}}function g(S){return function(y,b){return[S([[+b[0],+y[0][1],+y[0][2],+y[0][3]],[+b[1],+y[1][1],+y[1][2],+y[1][3]],[+b[2],+y[2][1],+y[2][2],+y[2][3]],[+b[3],+y[3][1],+y[3][2],+y[3][3]]]),S([[+y[0][0],+b[0],+y[0][2],+y[0][3]],[+y[1][0],+b[1],+y[1][2],+y[1][3]],[+y[2][0],+b[2],+y[2][2],+y[2][3]],[+y[3][0],+b[3],+y[3][2],+y[3][3]]]),S([[+y[0][0],+y[0][1],+b[0],+y[0][3]],[+y[1][0],+y[1][1],+b[1],+y[1][3]],[+y[2][0],+y[2][1],+b[2],+y[2][3]],[+y[3][0],+y[3][1],+b[3],+y[3][3]]]),S([[+y[0][0],+y[0][1],+y[0][2],+b[0]],[+y[1][0],+y[1][1],+y[1][2],+b[1]],[+y[2][0],+y[2][1],+y[2][2],+b[2]],[+y[3][0],+y[3][1],+y[3][2],+b[3]]]),S(y)]}}function v(S){return function(y,b){return[S([[+b[0],+y[0][1],+y[0][2],+y[0][3],+y[0][4]],[+b[1],+y[1][1],+y[1][2],+y[1][3],+y[1][4]],[+b[2],+y[2][1],+y[2][2],+y[2][3],+y[2][4]],[+b[3],+y[3][1],+y[3][2],+y[3][3],+y[3][4]],[+b[4],+y[4][1],+y[4][2],+y[4][3],+y[4][4]]]),S([[+y[0][0],+b[0],+y[0][2],+y[0][3],+y[0][4]],[+y[1][0],+b[1],+y[1][2],+y[1][3],+y[1][4]],[+y[2][0],+b[2],+y[2][2],+y[2][3],+y[2][4]],[+y[3][0],+b[3],+y[3][2],+y[3][3],+y[3][4]],[+y[4][0],+b[4],+y[4][2],+y[4][3],+y[4][4]]]),S([[+y[0][0],+y[0][1],+b[0],+y[0][3],+y[0][4]],[+y[1][0],+y[1][1],+b[1],+y[1][3],+y[1][4]],[+y[2][0],+y[2][1],+b[2],+y[2][3],+y[2][4]],[+y[3][0],+y[3][1],+b[3],+y[3][3],+y[3][4]],[+y[4][0],+y[4][1],+b[4],+y[4][3],+y[4][4]]]),S([[+y[0][0],+y[0][1],+y[0][2],+b[0],+y[0][4]],[+y[1][0],+y[1][1],+y[1][2],+b[1],+y[1][4]],[+y[2][0],+y[2][1],+y[2][2],+b[2],+y[2][4]],[+y[3][0],+y[3][1],+y[3][2],+b[3],+y[3][4]],[+y[4][0],+y[4][1],+y[4][2],+b[4],+y[4][4]]]),S([[+y[0][0],+y[0][1],+y[0][2],+y[0][3],+b[0]],[+y[1][0],+y[1][1],+y[1][2],+y[1][3],+b[1]],[+y[2][0],+y[2][1],+y[2][2],+y[2][3],+b[2]],[+y[3][0],+y[3][1],+y[3][2],+y[3][3],+b[3]],[+y[4][0],+y[4][1],+y[4][2],+y[4][3],+b[4]]]),S(y)]}}function T(S){return function(y,b){return[S([[+b[0],+y[0][1],+y[0][2],+y[0][3],+y[0][4],+y[0][5]],[+b[1],+y[1][1],+y[1][2],+y[1][3],+y[1][4],+y[1][5]],[+b[2],+y[2][1],+y[2][2],+y[2][3],+y[2][4],+y[2][5]],[+b[3],+y[3][1],+y[3][2],+y[3][3],+y[3][4],+y[3][5]],[+b[4],+y[4][1],+y[4][2],+y[4][3],+y[4][4],+y[4][5]],[+b[5],+y[5][1],+y[5][2],+y[5][3],+y[5][4],+y[5][5]]]),S([[+y[0][0],+b[0],+y[0][2],+y[0][3],+y[0][4],+y[0][5]],[+y[1][0],+b[1],+y[1][2],+y[1][3],+y[1][4],+y[1][5]],[+y[2][0],+b[2],+y[2][2],+y[2][3],+y[2][4],+y[2][5]],[+y[3][0],+b[3],+y[3][2],+y[3][3],+y[3][4],+y[3][5]],[+y[4][0],+b[4],+y[4][2],+y[4][3],+y[4][4],+y[4][5]],[+y[5][0],+b[5],+y[5][2],+y[5][3],+y[5][4],+y[5][5]]]),S([[+y[0][0],+y[0][1],+b[0],+y[0][3],+y[0][4],+y[0][5]],[+y[1][0],+y[1][1],+b[1],+y[1][3],+y[1][4],+y[1][5]],[+y[2][0],+y[2][1],+b[2],+y[2][3],+y[2][4],+y[2][5]],[+y[3][0],+y[3][1],+b[3],+y[3][3],+y[3][4],+y[3][5]],[+y[4][0],+y[4][1],+b[4],+y[4][3],+y[4][4],+y[4][5]],[+y[5][0],+y[5][1],+b[5],+y[5][3],+y[5][4],+y[5][5]]]),S([[+y[0][0],+y[0][1],+y[0][2],+b[0],+y[0][4],+y[0][5]],[+y[1][0],+y[1][1],+y[1][2],+b[1],+y[1][4],+y[1][5]],[+y[2][0],+y[2][1],+y[2][2],+b[2],+y[2][4],+y[2][5]],[+y[3][0],+y[3][1],+y[3][2],+b[3],+y[3][4],+y[3][5]],[+y[4][0],+y[4][1],+y[4][2],+b[4],+y[4][4],+y[4][5]],[+y[5][0],+y[5][1],+y[5][2],+b[5],+y[5][4],+y[5][5]]]),S([[+y[0][0],+y[0][1],+y[0][2],+y[0][3],+b[0],+y[0][5]],[+y[1][0],+y[1][1],+y[1][2],+y[1][3],+b[1],+y[1][5]],[+y[2][0],+y[2][1],+y[2][2],+y[2][3],+b[2],+y[2][5]],[+y[3][0],+y[3][1],+y[3][2],+y[3][3],+b[3],+y[3][5]],[+y[4][0],+y[4][1],+y[4][2],+y[4][3],+b[4],+y[4][5]],[+y[5][0],+y[5][1],+y[5][2],+y[5][3],+b[5],+y[5][5]]]),S([[+y[0][0],+y[0][1],+y[0][2],+y[0][3],+y[0][4],+b[0]],[+y[1][0],+y[1][1],+y[1][2],+y[1][3],+y[1][4],+b[1]],[+y[2][0],+y[2][1],+y[2][2],+y[2][3],+y[2][4],+b[2]],[+y[3][0],+y[3][1],+y[3][2],+y[3][3],+y[3][4],+b[3]],[+y[4][0],+y[4][1],+y[4][2],+y[4][3],+y[4][4],+b[4]],[+y[5][0],+y[5][1],+y[5][2],+y[5][3],+y[5][4],+b[5]]]),S(y)]}}var l=[n,s];function _(S,E,y,b,p,u,m,h){return function(L,z){switch(L.length){case 0:return S(L,z);case 1:return E(L,z);case 2:return y(L,z);case 3:return b(L,z);case 4:return p(L,z);case 5:return u(L,z)}var F=m[L.length];return F||(F=m[L.length]=h(L.length)),F(L,z)}}function w(){for(;l.length<a;)l.push(i(l.length));e.exports=_.apply(void 0,l.concat([l,i]));for(var S=0;S<a;++S)e.exports[S]=l[S]}w()},3250:function(e,t,r){"use strict";var o=r(5250),a=r(8210),i=r(3012),n=r(8545),s=5,c=11102230246251565e-32,f=(3+16*c)*c,g=(7+56*c)*c;function v(u,m,h,P){return function(z,F,B){var O=u(u(m(F[1],B[0]),m(-B[1],F[0])),u(m(z[1],F[0]),m(-F[1],z[0]))),I=u(m(z[1],B[0]),m(-B[1],z[0])),N=P(O,I);return N[N.length-1]}}function T(u,m,h,P){return function(z,F,B,O){var I=u(u(h(u(m(B[1],O[0]),m(-O[1],B[0])),F[2]),u(h(u(m(F[1],O[0]),m(-O[1],F[0])),-B[2]),h(u(m(F[1],B[0]),m(-B[1],F[0])),O[2]))),u(h(u(m(F[1],O[0]),m(-O[1],F[0])),z[2]),u(h(u(m(z[1],O[0]),m(-O[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),O[2])))),N=u(u(h(u(m(B[1],O[0]),m(-O[1],B[0])),z[2]),u(h(u(m(z[1],O[0]),m(-O[1],z[0])),-B[2]),h(u(m(z[1],B[0]),m(-B[1],z[0])),O[2]))),u(h(u(m(F[1],B[0]),m(-B[1],F[0])),z[2]),u(h(u(m(z[1],B[0]),m(-B[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),B[2])))),U=P(I,N);return U[U.length-1]}}function l(u,m,h,P){return function(z,F,B,O,I){var N=u(u(u(h(u(h(u(m(O[1],I[0]),m(-I[1],O[0])),B[2]),u(h(u(m(B[1],I[0]),m(-I[1],B[0])),-O[2]),h(u(m(B[1],O[0]),m(-O[1],B[0])),I[2]))),F[3]),u(h(u(h(u(m(O[1],I[0]),m(-I[1],O[0])),F[2]),u(h(u(m(F[1],I[0]),m(-I[1],F[0])),-O[2]),h(u(m(F[1],O[0]),m(-O[1],F[0])),I[2]))),-B[3]),h(u(h(u(m(B[1],I[0]),m(-I[1],B[0])),F[2]),u(h(u(m(F[1],I[0]),m(-I[1],F[0])),-B[2]),h(u(m(F[1],B[0]),m(-B[1],F[0])),I[2]))),O[3]))),u(h(u(h(u(m(B[1],O[0]),m(-O[1],B[0])),F[2]),u(h(u(m(F[1],O[0]),m(-O[1],F[0])),-B[2]),h(u(m(F[1],B[0]),m(-B[1],F[0])),O[2]))),-I[3]),u(h(u(h(u(m(O[1],I[0]),m(-I[1],O[0])),F[2]),u(h(u(m(F[1],I[0]),m(-I[1],F[0])),-O[2]),h(u(m(F[1],O[0]),m(-O[1],F[0])),I[2]))),z[3]),h(u(h(u(m(O[1],I[0]),m(-I[1],O[0])),z[2]),u(h(u(m(z[1],I[0]),m(-I[1],z[0])),-O[2]),h(u(m(z[1],O[0]),m(-O[1],z[0])),I[2]))),-F[3])))),u(u(h(u(h(u(m(F[1],I[0]),m(-I[1],F[0])),z[2]),u(h(u(m(z[1],I[0]),m(-I[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),I[2]))),O[3]),u(h(u(h(u(m(F[1],O[0]),m(-O[1],F[0])),z[2]),u(h(u(m(z[1],O[0]),m(-O[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),O[2]))),-I[3]),h(u(h(u(m(B[1],O[0]),m(-O[1],B[0])),F[2]),u(h(u(m(F[1],O[0]),m(-O[1],F[0])),-B[2]),h(u(m(F[1],B[0]),m(-B[1],F[0])),O[2]))),z[3]))),u(h(u(h(u(m(B[1],O[0]),m(-O[1],B[0])),z[2]),u(h(u(m(z[1],O[0]),m(-O[1],z[0])),-B[2]),h(u(m(z[1],B[0]),m(-B[1],z[0])),O[2]))),-F[3]),u(h(u(h(u(m(F[1],O[0]),m(-O[1],F[0])),z[2]),u(h(u(m(z[1],O[0]),m(-O[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),O[2]))),B[3]),h(u(h(u(m(F[1],B[0]),m(-B[1],F[0])),z[2]),u(h(u(m(z[1],B[0]),m(-B[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),B[2]))),-O[3]))))),U=u(u(u(h(u(h(u(m(O[1],I[0]),m(-I[1],O[0])),B[2]),u(h(u(m(B[1],I[0]),m(-I[1],B[0])),-O[2]),h(u(m(B[1],O[0]),m(-O[1],B[0])),I[2]))),z[3]),h(u(h(u(m(O[1],I[0]),m(-I[1],O[0])),z[2]),u(h(u(m(z[1],I[0]),m(-I[1],z[0])),-O[2]),h(u(m(z[1],O[0]),m(-O[1],z[0])),I[2]))),-B[3])),u(h(u(h(u(m(B[1],I[0]),m(-I[1],B[0])),z[2]),u(h(u(m(z[1],I[0]),m(-I[1],z[0])),-B[2]),h(u(m(z[1],B[0]),m(-B[1],z[0])),I[2]))),O[3]),h(u(h(u(m(B[1],O[0]),m(-O[1],B[0])),z[2]),u(h(u(m(z[1],O[0]),m(-O[1],z[0])),-B[2]),h(u(m(z[1],B[0]),m(-B[1],z[0])),O[2]))),-I[3]))),u(u(h(u(h(u(m(B[1],I[0]),m(-I[1],B[0])),F[2]),u(h(u(m(F[1],I[0]),m(-I[1],F[0])),-B[2]),h(u(m(F[1],B[0]),m(-B[1],F[0])),I[2]))),z[3]),h(u(h(u(m(B[1],I[0]),m(-I[1],B[0])),z[2]),u(h(u(m(z[1],I[0]),m(-I[1],z[0])),-B[2]),h(u(m(z[1],B[0]),m(-B[1],z[0])),I[2]))),-F[3])),u(h(u(h(u(m(F[1],I[0]),m(-I[1],F[0])),z[2]),u(h(u(m(z[1],I[0]),m(-I[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),I[2]))),B[3]),h(u(h(u(m(F[1],B[0]),m(-B[1],F[0])),z[2]),u(h(u(m(z[1],B[0]),m(-B[1],z[0])),-F[2]),h(u(m(z[1],F[0]),m(-F[1],z[0])),B[2]))),-I[3])))),W=P(N,U);return W[W.length-1]}}function _(u){var m=u===3?v:u===4?T:l;return m(a,o,i,n)}var w=_(3),S=_(4),E=[function(){return 0},function(){return 0},function(m,h){return h[0]-m[0]},function(m,h,P){var L=(m[1]-P[1])*(h[0]-P[0]),z=(m[0]-P[0])*(h[1]-P[1]),F=L-z,B;if(L>0){if(z<=0)return F;B=L+z}else if(L<0){if(z>=0)return F;B=-(L+z)}else return F;var O=f*B;return F>=O||F<=-O?F:w(m,h,P)},function(m,h,P,L){var z=m[0]-L[0],F=h[0]-L[0],B=P[0]-L[0],O=m[1]-L[1],I=h[1]-L[1],N=P[1]-L[1],U=m[2]-L[2],W=h[2]-L[2],Q=P[2]-L[2],ue=F*N,le=B*I,he=B*O,G=z*N,$=z*I,J=F*O,X=U*(ue-le)+W*(he-G)+Q*($-J),oe=(Math.abs(ue)+Math.abs(le))*Math.abs(U)+(Math.abs(he)+Math.abs(G))*Math.abs(W)+(Math.abs($)+Math.abs(J))*Math.abs(Q),ie=g*oe;return X>ie||-X>ie?X:S(m,h,P,L)}];function y(u){var m=E[u.length];return m||(m=E[u.length]=_(u.length)),m.apply(void 0,u)}function b(u,m,h,P,L,z,F){return function(O,I,N,U,W){switch(arguments.length){case 0:case 1:return 0;case 2:return P(O,I);case 3:return L(O,I,N);case 4:return z(O,I,N,U);case 5:return F(O,I,N,U,W)}for(var Q=new Array(arguments.length),ue=0;ue<arguments.length;++ue)Q[ue]=arguments[ue];return u(Q)}}function p(){for(;E.length<=s;)E.push(_(E.length));e.exports=b.apply(void 0,[y].concat(E));for(var u=0;u<=s;++u)e.exports[u]=E[u]}p()},5382:function(e,t,r){"use strict";var o=r(8210),a=r(3012);e.exports=i;function i(n,s){if(n.length===1)return a(s,n[0]);if(s.length===1)return a(n,s[0]);if(n.length===0||s.length===0)return[0];var c=[0];if(n.length<s.length)for(var f=0;f<n.length;++f)c=o(c,a(s,n[f]));else for(var f=0;f<s.length;++f)c=o(c,a(n,s[f]));return c}},3012:function(e,t,r){"use strict";var o=r(5250),a=r(9362);e.exports=i;function i(n,s){var c=n.length;if(c===1){var f=o(n[0],s);return f[0]?f:[f[1]]}var g=new Array(2*c),v=[.1,.1],T=[.1,.1],l=0;o(n[0],s,v),v[0]&&(g[l++]=v[0]);for(var _=1;_<c;++_){o(n[_],s,T);var w=v[1];a(w,T[0],v),v[0]&&(g[l++]=v[0]);var S=T[1],E=v[1],y=S+E,b=y-S,p=E-b;v[1]=y,p&&(g[l++]=p)}return v[1]&&(g[l++]=v[1]),l===0&&(g[l++]=0),g.length=l,g}},1125:function(e,t,r){"use strict";e.exports=i;var o=r(3250)[3];function a(n,s,c,f){for(var g=0;g<2;++g){var v=n[g],T=s[g],l=Math.min(v,T),_=Math.max(v,T),w=c[g],S=f[g],E=Math.min(w,S),y=Math.max(w,S);if(y<l||_<E)return!1}return!0}function i(n,s,c,f){var g=o(n,c,f),v=o(s,c,f);if(g>0&&v>0||g<0&&v<0)return!1;var T=o(c,n,s),l=o(f,n,s);return T>0&&l>0||T<0&&l<0?!1:g===0&&v===0&&T===0&&l===0?a(n,s,c,f):!0}},8545:function(e){"use strict";e.exports=r;function t(o,a){var i=o+a,n=i-o,s=i-n,c=a-n,f=o-s,g=f+c;return g?[g,i]:[i]}function r(o,a){var i=o.length|0,n=a.length|0;if(i===1&&n===1)return t(o[0],-a[0]);var s=i+n,c=new Array(s),f=0,g=0,v=0,T=Math.abs,l=o[g],_=T(l),w=-a[v],S=T(w),E,y;_<S?(y=l,g+=1,g<i&&(l=o[g],_=T(l))):(y=w,v+=1,v<n&&(w=-a[v],S=T(w))),g<i&&_<S||v>=n?(E=l,g+=1,g<i&&(l=o[g],_=T(l))):(E=w,v+=1,v<n&&(w=-a[v],S=T(w)));for(var b=E+y,p=b-E,u=y-p,m=u,h=b,P,L,z,F,B;g<i&&v<n;)_<S?(E=l,g+=1,g<i&&(l=o[g],_=T(l))):(E=w,v+=1,v<n&&(w=-a[v],S=T(w))),y=m,b=E+y,p=b-E,u=y-p,u&&(c[f++]=u),P=h+b,L=P-h,z=P-L,F=b-L,B=h-z,m=B+F,h=P;for(;g<i;)E=l,y=m,b=E+y,p=b-E,u=y-p,u&&(c[f++]=u),P=h+b,L=P-h,z=P-L,F=b-L,B=h-z,m=B+F,h=P,g+=1,g<i&&(l=o[g]);for(;v<n;)E=w,y=m,b=E+y,p=b-E,u=y-p,u&&(c[f++]=u),P=h+b,L=P-h,z=P-L,F=b-L,B=h-z,m=B+F,h=P,v+=1,v<n&&(w=-a[v]);return m&&(c[f++]=m),h&&(c[f++]=h),f||(c[f++]=0),c.length=f,c}},8210:function(e){"use strict";e.exports=r;function t(o,a){var i=o+a,n=i-o,s=i-n,c=a-n,f=o-s,g=f+c;return g?[g,i]:[i]}function r(o,a){var i=o.length|0,n=a.length|0;if(i===1&&n===1)return t(o[0],a[0]);var s=i+n,c=new Array(s),f=0,g=0,v=0,T=Math.abs,l=o[g],_=T(l),w=a[v],S=T(w),E,y;_<S?(y=l,g+=1,g<i&&(l=o[g],_=T(l))):(y=w,v+=1,v<n&&(w=a[v],S=T(w))),g<i&&_<S||v>=n?(E=l,g+=1,g<i&&(l=o[g],_=T(l))):(E=w,v+=1,v<n&&(w=a[v],S=T(w)));for(var b=E+y,p=b-E,u=y-p,m=u,h=b,P,L,z,F,B;g<i&&v<n;)_<S?(E=l,g+=1,g<i&&(l=o[g],_=T(l))):(E=w,v+=1,v<n&&(w=a[v],S=T(w))),y=m,b=E+y,p=b-E,u=y-p,u&&(c[f++]=u),P=h+b,L=P-h,z=P-L,F=b-L,B=h-z,m=B+F,h=P;for(;g<i;)E=l,y=m,b=E+y,p=b-E,u=y-p,u&&(c[f++]=u),P=h+b,L=P-h,z=P-L,F=b-L,B=h-z,m=B+F,h=P,g+=1,g<i&&(l=o[g]);for(;v<n;)E=w,y=m,b=E+y,p=b-E,u=y-p,u&&(c[f++]=u),P=h+b,L=P-h,z=P-L,F=b-L,B=h-z,m=B+F,h=P,v+=1,v<n&&(w=a[v]);return m&&(c[f++]=m),h&&(c[f++]=h),f||(c[f++]=0),c.length=f,c}},9127:function(e,t,r){"use strict";e.exports=i;var o=r(6204),a=r(5771);function i(n){return a(o(n))}},7765:function(e,t,r){"use strict";e.exports=l;var o=r(9618),a=r(1888),i=r(446),n=r(1570);function s(_){for(var w=_.length,S=0,E=0;E<w;++E)S=Math.max(S,_[E].length)|0;return S-1}function c(_,w){for(var S=_.length,E=a.mallocUint8(S),y=0;y<S;++y)E[y]=_[y]<w|0;return E}function f(_,w){for(var S=_.length,E=w*(w+1)/2*S|0,y=a.mallocUint32(E*2),b=0,p=0;p<S;++p)for(var u=_[p],w=u.length,m=0;m<w;++m)for(var h=0;h<m;++h){var P=u[h],L=u[m];y[b++]=Math.min(P,L)|0,y[b++]=Math.max(P,L)|0}var z=b/2|0;i(o(y,[z,2]));for(var F=2,p=2;p<b;p+=2)y[p-2]===y[p]&&y[p-1]===y[p+1]||(y[F++]=y[p],y[F++]=y[p+1]);return o(y,[F/2|0,2])}function g(_,w,S,E){for(var y=_.data,b=_.shape[0],p=a.mallocDouble(b),u=0,m=0;m<b;++m){var h=y[2*m],P=y[2*m+1];if(S[h]!==S[P]){var L=w[h],z=w[P];y[2*u]=h,y[2*u+1]=P,p[u++]=(z-E)/(z-L)}}return _.shape[0]=u,o(p,[u])}function v(_,w){var S=a.mallocInt32(w*2),E=_.shape[0],y=_.data;S[0]=0;for(var b=0,p=0;p<E;++p){var u=y[2*p];if(u!==b){for(S[2*b+1]=p;++b<u;)S[2*b]=p,S[2*b+1]=p;S[2*b]=p}}for(S[2*b+1]=E;++b<w;)S[2*b]=S[2*b+1]=E;return S}function T(_){for(var w=_.shape[0]|0,S=_.data,E=new Array(w),y=0;y<w;++y)E[y]=[S[2*y],S[2*y+1]];return E}function l(_,w,S,E){S=S||0,typeof E>"u"&&(E=s(_));var y=_.length;if(y===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var b=c(w,+S),p=f(_,E),u=g(p,w,b,+S),m=v(p,w.length|0),h=n(E)(_,p.data,m,b),P=T(p),L=[].slice.call(u.data,0,u.shape[0]);return a.free(b),a.free(p.data),a.free(u.data),a.free(m),{cells:h,vertexIds:P,vertexWeights:L}}},1570:function(e){"use strict";e.exports=r;var t=[function(){function a(n,s,c,f){for(var g=Math.min(c,f)|0,v=Math.max(c,f)|0,T=n[2*g],l=n[2*g+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===v)return _;v<w?l=_:T=_+1}return T}function i(n,s,c,f){for(var g=n.length,v=[],T=0;T<g;++T)var l=n[T],_=l.length;return v}return i},function(){function a(n,s,c,f){for(var g=Math.min(c,f)|0,v=Math.max(c,f)|0,T=n[2*g],l=n[2*g+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===v)return _;v<w?l=_:T=_+1}return T}function i(n,s,c,f){for(var g=n.length,v=[],T=0;T<g;++T){var l=n[T],_=l.length;if(_===2){var w=(f[l[0]]<<0)+(f[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:v.push([a(c,s,l[0],l[1])]);break;case 2:v.push([a(c,s,l[1],l[0])]);break;case 3:break}}}return v}return i},function(){function a(n,s,c,f){for(var g=Math.min(c,f)|0,v=Math.max(c,f)|0,T=n[2*g],l=n[2*g+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===v)return _;v<w?l=_:T=_+1}return T}function i(n,s,c,f){for(var g=n.length,v=[],T=0;T<g;++T){var l=n[T],_=l.length;if(_===3){var w=(f[l[0]]<<0)+(f[l[1]]<<1)+(f[l[2]]<<2);if(w===0||w===7)continue;switch(w){case 0:break;case 1:v.push([a(c,s,l[0],l[2]),a(c,s,l[0],l[1])]);break;case 2:v.push([a(c,s,l[1],l[0]),a(c,s,l[1],l[2])]);break;case 3:v.push([a(c,s,l[0],l[2]),a(c,s,l[1],l[2])]);break;case 4:v.push([a(c,s,l[2],l[1]),a(c,s,l[2],l[0])]);break;case 5:v.push([a(c,s,l[2],l[1]),a(c,s,l[0],l[1])]);break;case 6:v.push([a(c,s,l[1],l[0]),a(c,s,l[2],l[0])]);break;case 7:break}}else if(_===2){var w=(f[l[0]]<<0)+(f[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:v.push([a(c,s,l[0],l[1])]);break;case 2:v.push([a(c,s,l[1],l[0])]);break;case 3:break}}}return v}return i},function(){function a(n,s,c,f){for(var g=Math.min(c,f)|0,v=Math.max(c,f)|0,T=n[2*g],l=n[2*g+1];T<l;){var _=T+l>>1,w=s[2*_+1];if(w===v)return _;v<w?l=_:T=_+1}return T}function i(n,s,c,f){for(var g=n.length,v=[],T=0;T<g;++T){var l=n[T],_=l.length;if(_===4){var w=(f[l[0]]<<0)+(f[l[1]]<<1)+(f[l[2]]<<2)+(f[l[3]]<<3);if(w===0||w===15)continue;switch(w){case 0:break;case 1:v.push([a(c,s,l[0],l[1]),a(c,s,l[0],l[2]),a(c,s,l[0],l[3])]);break;case 2:v.push([a(c,s,l[1],l[2]),a(c,s,l[1],l[0]),a(c,s,l[1],l[3])]);break;case 3:v.push([a(c,s,l[1],l[2]),a(c,s,l[0],l[2]),a(c,s,l[0],l[3])],[a(c,s,l[1],l[3]),a(c,s,l[1],l[2]),a(c,s,l[0],l[3])]);break;case 4:v.push([a(c,s,l[2],l[0]),a(c,s,l[2],l[1]),a(c,s,l[2],l[3])]);break;case 5:v.push([a(c,s,l[0],l[1]),a(c,s,l[2],l[1]),a(c,s,l[0],l[3])],[a(c,s,l[2],l[1]),a(c,s,l[2],l[3]),a(c,s,l[0],l[3])]);break;case 6:v.push([a(c,s,l[2],l[0]),a(c,s,l[1],l[0]),a(c,s,l[1],l[3])],[a(c,s,l[2],l[3]),a(c,s,l[2],l[0]),a(c,s,l[1],l[3])]);break;case 7:v.push([a(c,s,l[0],l[3]),a(c,s,l[1],l[3]),a(c,s,l[2],l[3])]);break;case 8:v.push([a(c,s,l[3],l[1]),a(c,s,l[3],l[0]),a(c,s,l[3],l[2])]);break;case 9:v.push([a(c,s,l[3],l[1]),a(c,s,l[0],l[1]),a(c,s,l[0],l[2])],[a(c,s,l[3],l[2]),a(c,s,l[3],l[1]),a(c,s,l[0],l[2])]);break;case 10:v.push([a(c,s,l[1],l[0]),a(c,s,l[3],l[0]),a(c,s,l[1],l[2])],[a(c,s,l[3],l[0]),a(c,s,l[3],l[2]),a(c,s,l[1],l[2])]);break;case 11:v.push([a(c,s,l[1],l[2]),a(c,s,l[0],l[2]),a(c,s,l[3],l[2])]);break;case 12:v.push([a(c,s,l[3],l[0]),a(c,s,l[2],l[0]),a(c,s,l[2],l[1])],[a(c,s,l[3],l[1]),a(c,s,l[3],l[0]),a(c,s,l[2],l[1])]);break;case 13:v.push([a(c,s,l[0],l[1]),a(c,s,l[2],l[1]),a(c,s,l[3],l[1])]);break;case 14:v.push([a(c,s,l[2],l[0]),a(c,s,l[1],l[0]),a(c,s,l[3],l[0])]);break;case 15:break}}else if(_===3){var w=(f[l[0]]<<0)+(f[l[1]]<<1)+(f[l[2]]<<2);if(w===0||w===7)continue;switch(w){case 0:break;case 1:v.push([a(c,s,l[0],l[2]),a(c,s,l[0],l[1])]);break;case 2:v.push([a(c,s,l[1],l[0]),a(c,s,l[1],l[2])]);break;case 3:v.push([a(c,s,l[0],l[2]),a(c,s,l[1],l[2])]);break;case 4:v.push([a(c,s,l[2],l[1]),a(c,s,l[2],l[0])]);break;case 5:v.push([a(c,s,l[2],l[1]),a(c,s,l[0],l[1])]);break;case 6:v.push([a(c,s,l[1],l[0]),a(c,s,l[2],l[0])]);break;case 7:break}}else if(_===2){var w=(f[l[0]]<<0)+(f[l[1]]<<1);if(w===0||w===3)continue;switch(w){case 0:break;case 1:v.push([a(c,s,l[0],l[1])]);break;case 2:v.push([a(c,s,l[1],l[0])]);break;case 3:break}}}return v}return i}];function r(o){return t[o]()}},6803:function(e,t,r){"use strict";var o,a=r(8828),i=r(1755);function n(m){for(var h=0,P=Math.max,L=0,z=m.length;L<z;++L)h=P(h,m[L].length);return h-1}o=n;function s(m){for(var h=-1,P=Math.max,L=0,z=m.length;L<z;++L)for(var F=m[L],B=0,O=F.length;B<O;++B)h=P(h,F[B]);return h+1}o=s;function c(m){for(var h=new Array(m.length),P=0,L=m.length;P<L;++P)h[P]=m[P].slice(0);return h}o=c;function f(m,h){var P=m.length,L=m.length-h.length,z=Math.min;if(L)return L;switch(P){case 0:return 0;case 1:return m[0]-h[0];case 2:var N=m[0]+m[1]-h[0]-h[1];return N||z(m[0],m[1])-z(h[0],h[1]);case 3:var F=m[0]+m[1],B=h[0]+h[1];if(N=F+m[2]-(B+h[2]),N)return N;var O=z(m[0],m[1]),I=z(h[0],h[1]),N=z(O,m[2])-z(I,h[2]);return N||z(O+m[2],F)-z(I+h[2],B);default:var U=m.slice(0);U.sort();var W=h.slice(0);W.sort();for(var Q=0;Q<P;++Q)if(L=U[Q]-W[Q],L)return L;return 0}}t.Fw=f;function g(m,h){return f(m[0],h[0])}function v(m,h){if(h){for(var P=m.length,L=new Array(P),z=0;z<P;++z)L[z]=[m[z],h[z]];L.sort(g);for(var z=0;z<P;++z)m[z]=L[z][0],h[z]=L[z][1];return m}else return m.sort(f),m}o=v;function T(m){if(m.length===0)return[];for(var h=1,P=m.length,L=1;L<P;++L){var z=m[L];if(f(z,m[L-1])){if(L===h){h++;continue}m[h++]=z}}return m.length=h,m}o=T;function l(m,h){for(var P=0,L=m.length-1,z=-1;P<=L;){var F=P+L>>1,B=f(m[F],h);B<=0?(B===0&&(z=F),P=F+1):B>0&&(L=F-1)}return z}o=l;function _(m,h){for(var P=new Array(m.length),L=0,z=P.length;L<z;++L)P[L]=[];for(var F=[],L=0,B=h.length;L<B;++L)for(var O=h[L],I=O.length,N=1,U=1<<I;N<U;++N){F.length=a.popCount(N);for(var W=0,Q=0;Q<I;++Q)N&1<<Q&&(F[W++]=O[Q]);var ue=l(m,F);if(!(ue<0))for(;P[ue++].push(L),!(ue>=m.length||f(m[ue],F)!==0););}return P}o=_;function w(m,h){if(!h)return _(T(E(m,0)),m,0);for(var P=new Array(h),L=0;L<h;++L)P[L]=[];for(var L=0,z=m.length;L<z;++L)for(var F=m[L],B=0,O=F.length;B<O;++B)P[F[B]].push(L);return P}o=w;function S(m){for(var h=[],P=0,L=m.length;P<L;++P)for(var z=m[P],F=z.length|0,B=1,O=1<<F;B<O;++B){for(var I=[],N=0;N<F;++N)B>>>N&1&&I.push(z[N]);h.push(I)}return v(h)}o=S;function E(m,h){if(h<0)return[];for(var P=[],L=(1<<h+1)-1,z=0;z<m.length;++z)for(var F=m[z],B=L;B<1<<F.length;B=a.nextCombination(B)){for(var O=new Array(h+1),I=0,N=0;N<F.length;++N)B&1<<N&&(O[I++]=F[N]);P.push(O)}return v(P)}o=E;function y(m){for(var h=[],P=0,L=m.length;P<L;++P)for(var z=m[P],F=0,B=z.length;F<B;++F){for(var O=new Array(z.length-1),I=0,N=0;I<B;++I)I!==F&&(O[N++]=z[I]);h.push(O)}return v(h)}o=y;function b(m,h){for(var P=new i(h),L=0;L<m.length;++L)for(var z=m[L],F=0;F<z.length;++F)for(var B=F+1;B<z.length;++B)P.link(z[F],z[B]);for(var O=[],I=P.ranks,L=0;L<I.length;++L)I[L]=-1;for(var L=0;L<m.length;++L){var N=P.find(m[L][0]);I[N]<0?(I[N]=O.length,O.push([m[L].slice(0)])):O[I[N]].push(m[L].slice(0))}return O}function p(m){for(var h=T(v(E(m,0))),P=new i(h.length),L=0;L<m.length;++L)for(var z=m[L],F=0;F<z.length;++F)for(var B=l(h,[z[F]]),O=F+1;O<z.length;++O)P.link(B,l(h,[z[O]]));for(var I=[],N=P.ranks,L=0;L<N.length;++L)N[L]=-1;for(var L=0;L<m.length;++L){var U=P.find(l(h,[m[L][0]]));N[U]<0?(N[U]=I.length,I.push([m[L].slice(0)])):I[N[U]].push(m[L].slice(0))}return I}function u(m,h){return h?b(m,h):p(m)}o=u},3105:function(e,t){"use strict";"use restrict";var r=32;t.INT_BITS=r,t.INT_MAX=2147483647,t.INT_MIN=-1<<r-1,t.sign=function(i){return(i>0)-(i<0)},t.abs=function(i){var n=i>>r-1;return(i^n)-n},t.min=function(i,n){return n^(i^n)&-(i<n)},t.max=function(i,n){return i^(i^n)&-(i<n)},t.isPow2=function(i){return!(i&i-1)&&!!i},t.log2=function(i){var n,s;return n=(i>65535)<<4,i>>>=n,s=(i>255)<<3,i>>>=s,n|=s,s=(i>15)<<2,i>>>=s,n|=s,s=(i>3)<<1,i>>>=s,n|=s,n|i>>1},t.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},t.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function o(i){var n=32;return i&=-i,i&&n--,i&65535&&(n-=16),i&16711935&&(n-=8),i&252645135&&(n-=4),i&858993459&&(n-=2),i&1431655765&&(n-=1),n}t.countTrailingZeros=o,t.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},t.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},t.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var a=new Array(256);(function(i){for(var n=0;n<256;++n){var s=n,c=n,f=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--f;i[n]=c<<f&255}})(a),t.reverse=function(i){return a[i&255]<<24|a[i>>>8&255]<<16|a[i>>>16&255]<<8|a[i>>>24&255]},t.interleave2=function(i,n){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i|n<<1},t.deinterleave2=function(i,n){return i=i>>>n&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},t.interleave3=function(i,n,s){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i|=n<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,i|s<<2},t.deinterleave3=function(i,n){return i=i>>>n&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},t.nextCombination=function(i){var n=i|i-1;return n+1|(~n&-~n)-1>>>o(i)+1}},2014:function(e,t,r){"use strict";"use restrict";var o=r(3105),a=r(4623);function i(u){for(var m=0,h=Math.max,P=0,L=u.length;P<L;++P)m=h(m,u[P].length);return m-1}t.dimension=i;function n(u){for(var m=-1,h=Math.max,P=0,L=u.length;P<L;++P)for(var z=u[P],F=0,B=z.length;F<B;++F)m=h(m,z[F]);return m+1}t.countVertices=n;function s(u){for(var m=new Array(u.length),h=0,P=u.length;h<P;++h)m[h]=u[h].slice(0);return m}t.cloneCells=s;function c(u,m){var h=u.length,P=u.length-m.length,L=Math.min;if(P)return P;switch(h){case 0:return 0;case 1:return u[0]-m[0];case 2:var I=u[0]+u[1]-m[0]-m[1];return I||L(u[0],u[1])-L(m[0],m[1]);case 3:var z=u[0]+u[1],F=m[0]+m[1];if(I=z+u[2]-(F+m[2]),I)return I;var B=L(u[0],u[1]),O=L(m[0],m[1]),I=L(B,u[2])-L(O,m[2]);return I||L(B+u[2],z)-L(O+m[2],F);default:var N=u.slice(0);N.sort();var U=m.slice(0);U.sort();for(var W=0;W<h;++W)if(P=N[W]-U[W],P)return P;return 0}}t.compareCells=c;function f(u,m){return c(u[0],m[0])}function g(u,m){if(m){for(var h=u.length,P=new Array(h),L=0;L<h;++L)P[L]=[u[L],m[L]];P.sort(f);for(var L=0;L<h;++L)u[L]=P[L][0],m[L]=P[L][1];return u}else return u.sort(c),u}t.normalize=g;function v(u){if(u.length===0)return[];for(var m=1,h=u.length,P=1;P<h;++P){var L=u[P];if(c(L,u[P-1])){if(P===m){m++;continue}u[m++]=L}}return u.length=m,u}t.unique=v;function T(u,m){for(var h=0,P=u.length-1,L=-1;h<=P;){var z=h+P>>1,F=c(u[z],m);F<=0?(F===0&&(L=z),h=z+1):F>0&&(P=z-1)}return L}t.findCell=T;function l(u,m){for(var h=new Array(u.length),P=0,L=h.length;P<L;++P)h[P]=[];for(var z=[],P=0,F=m.length;P<F;++P)for(var B=m[P],O=B.length,I=1,N=1<<O;I<N;++I){z.length=o.popCount(I);for(var U=0,W=0;W<O;++W)I&1<<W&&(z[U++]=B[W]);var Q=T(u,z);if(!(Q<0))for(;h[Q++].push(P),!(Q>=u.length||c(u[Q],z)!==0););}return h}t.incidence=l;function _(u,m){if(!m)return l(v(S(u,0)),u,0);for(var h=new Array(m),P=0;P<m;++P)h[P]=[];for(var P=0,L=u.length;P<L;++P)for(var z=u[P],F=0,B=z.length;F<B;++F)h[z[F]].push(P);return h}t.dual=_;function w(u){for(var m=[],h=0,P=u.length;h<P;++h)for(var L=u[h],z=L.length|0,F=1,B=1<<z;F<B;++F){for(var O=[],I=0;I<z;++I)F>>>I&1&&O.push(L[I]);m.push(O)}return g(m)}t.explode=w;function S(u,m){if(m<0)return[];for(var h=[],P=(1<<m+1)-1,L=0;L<u.length;++L)for(var z=u[L],F=P;F<1<<z.length;F=o.nextCombination(F)){for(var B=new Array(m+1),O=0,I=0;I<z.length;++I)F&1<<I&&(B[O++]=z[I]);h.push(B)}return g(h)}t.skeleton=S;function E(u){for(var m=[],h=0,P=u.length;h<P;++h)for(var L=u[h],z=0,F=L.length;z<F;++z){for(var B=new Array(L.length-1),O=0,I=0;O<F;++O)O!==z&&(B[I++]=L[O]);m.push(B)}return g(m)}t.boundary=E;function y(u,m){for(var h=new a(m),P=0;P<u.length;++P)for(var L=u[P],z=0;z<L.length;++z)for(var F=z+1;F<L.length;++F)h.link(L[z],L[F]);for(var B=[],O=h.ranks,P=0;P<O.length;++P)O[P]=-1;for(var P=0;P<u.length;++P){var I=h.find(u[P][0]);O[I]<0?(O[I]=B.length,B.push([u[P].slice(0)])):B[O[I]].push(u[P].slice(0))}return B}function b(u){for(var m=v(g(S(u,0))),h=new a(m.length),P=0;P<u.length;++P)for(var L=u[P],z=0;z<L.length;++z)for(var F=T(m,[L[z]]),B=z+1;B<L.length;++B)h.link(F,T(m,[L[B]]));for(var O=[],I=h.ranks,P=0;P<I.length;++P)I[P]=-1;for(var P=0;P<u.length;++P){var N=h.find(T(m,[u[P][0]]));I[N]<0?(I[N]=O.length,O.push([u[P].slice(0)])):O[I[N]].push(u[P].slice(0))}return O}function p(u,m){return m?y(u,m):b(u)}t.connectedComponents=p},4623:function(e){"use strict";"use restrict";e.exports=t;function t(r){this.roots=new Array(r),this.ranks=new Array(r);for(var o=0;o<r;++o)this.roots[o]=o,this.ranks[o]=0}t.prototype.length=function(){return this.roots.length},t.prototype.makeSet=function(){var r=this.roots.length;return this.roots.push(r),this.ranks.push(0),r},t.prototype.find=function(r){for(var o=this.roots;o[r]!==r;){var a=o[r];o[r]=o[a],r=a}return r},t.prototype.link=function(r,o){var a=this.find(r),i=this.find(o);if(a!==i){var n=this.ranks,s=this.roots,c=n[a],f=n[i];c<f?s[a]=i:f<c?s[i]=a:(s[i]=a,++n[a])}}},5878:function(e,t,r){"use strict";e.exports=n;var o=r(3250),a=r(2014);function i(s,c,f){var g=Math.abs(o(s,c,f)),v=Math.sqrt(Math.pow(c[0]-f[0],2)+Math.pow(c[1]-f[1],2));return g/v}function n(s,c,f){for(var g=c.length,v=s.length,T=new Array(g),l=new Array(g),_=new Array(g),w=new Array(g),S=0;S<g;++S)T[S]=l[S]=-1,_[S]=1/0,w[S]=!1;for(var S=0;S<v;++S){var E=s[S];if(E.length!==2)throw new Error("Input must be a graph");var y=E[1],b=E[0];l[b]!==-1?l[b]=-2:l[b]=y,T[y]!==-1?T[y]=-2:T[y]=b}function p(G){if(w[G])return 1/0;var $=T[G],J=l[G];return $<0||J<0?1/0:i(c[G],c[$],c[J])}function u(G,$){var J=O[G],X=O[$];O[G]=X,O[$]=J,I[J]=$,I[X]=G}function m(G){return _[O[G]]}function h(G){return G&1?G-1>>1:(G>>1)-1}function P(G){for(var $=m(G);;){var J=$,X=2*G+1,oe=2*(G+1),ie=G;if(X<U){var j=m(X);j<J&&(ie=X,J=j)}if(oe<U){var ee=m(oe);ee<J&&(ie=oe)}if(ie===G)return G;u(G,ie),G=ie}}function L(G){for(var $=m(G);G>0;){var J=h(G);if(J>=0){var X=m(J);if($<X){u(G,J),G=J;continue}}return G}}function z(){if(U>0){var G=O[0];return u(0,U-1),U-=1,P(0),G}return-1}function F(G,$){var J=O[G];return _[J]===$?G:(_[J]=-1/0,L(G),z(),_[J]=$,U+=1,L(U-1))}function B(G){if(!w[G]){w[G]=!0;var $=T[G],J=l[G];T[J]>=0&&(T[J]=$),l[$]>=0&&(l[$]=J),I[$]>=0&&F(I[$],p($)),I[J]>=0&&F(I[J],p(J))}}for(var O=[],I=new Array(g),S=0;S<g;++S){var N=_[S]=p(S);N<1/0?(I[S]=O.length,O.push(S)):I[S]=-1}for(var U=O.length,S=U>>1;S>=0;--S)P(S);for(;;){var W=z();if(W<0||_[W]>f)break;B(W)}for(var Q=[],S=0;S<g;++S)w[S]||(I[S]=Q.length,Q.push(c[S].slice()));var ue=Q.length;function le(G,$){if(G[$]<0)return $;var J=$,X=$;do{var oe=G[X];if(!w[X]||oe<0||oe===X||(X=oe,oe=G[X],!w[X]||oe<0||oe===X))break;X=oe,J=G[J]}while(J!==X);for(var ie=$;ie!==X;ie=G[ie])G[ie]=X;return X}var he=[];return s.forEach(function(G){var $=le(T,G[0]),J=le(l,G[1]);if($>=0&&J>=0&&$!==J){var X=I[$],oe=I[J];X!==oe&&he.push([X,oe])}}),a.unique(a.normalize(he)),{positions:Q,edges:he}}},1303:function(e,t,r){"use strict";e.exports=i;var o=r(3250);function a(n,s){var c,f;if(s[0][0]<s[1][0])c=s[0],f=s[1];else if(s[0][0]>s[1][0])c=s[1],f=s[0];else{var g=Math.min(n[0][1],n[1][1]),v=Math.max(n[0][1],n[1][1]),T=Math.min(s[0][1],s[1][1]),l=Math.max(s[0][1],s[1][1]);return v<T?v-T:g>l?g-l:v-l}var _,w;n[0][1]<n[1][1]?(_=n[0],w=n[1]):(_=n[1],w=n[0]);var S=o(f,c,_);return S||(S=o(f,c,w),S)?S:w-f}function i(n,s){var c,f;if(s[0][0]<s[1][0])c=s[0],f=s[1];else if(s[0][0]>s[1][0])c=s[1],f=s[0];else return a(s,n);var g,v;if(n[0][0]<n[1][0])g=n[0],v=n[1];else if(n[0][0]>n[1][0])g=n[1],v=n[0];else return-a(n,s);var T=o(c,f,v),l=o(c,f,g);if(T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;if(T=o(v,g,f),l=o(v,g,c),T<0){if(l<=0)return T}else if(T>0){if(l>=0)return T}else if(l)return l;return f[0]-v[0]}},4209:function(e,t,r){"use strict";e.exports=l;var o=r(2478),a=r(3840),i=r(3250),n=r(1303);function s(_,w,S){this.slabs=_,this.coordinates=w,this.horizontal=S}var c=s.prototype;function f(_,w){return _.y-w}function g(_,w){for(var S=null;_;){var E=_.key,y,b;E[0][0]<E[1][0]?(y=E[0],b=E[1]):(y=E[1],b=E[0]);var p=i(y,b,w);if(p<0)_=_.left;else if(p>0)if(w[0]!==E[1][0])S=_,_=_.right;else{var u=g(_.right,w);if(u)return u;_=_.left}else{if(w[0]!==E[1][0])return _;var u=g(_.right,w);if(u)return u;_=_.left}}return S}c.castUp=function(_){var w=o.le(this.coordinates,_[0]);if(w<0)return-1;var S=this.slabs[w],E=g(this.slabs[w],_),y=-1;if(E&&(y=E.value),this.coordinates[w]===_[0]){var b=null;if(E&&(b=E.key),w>0){var p=g(this.slabs[w-1],_);p&&(b?n(p.key,b)>0&&(b=p.key,y=p.value):(y=p.value,b=p.key))}var u=this.horizontal[w];if(u.length>0){var m=o.ge(u,_[1],f);if(m<u.length){var h=u[m];if(_[1]===h.y){if(h.closed)return h.index;for(;m<u.length-1&&u[m+1].y===_[1];)if(m=m+1,h=u[m],h.closed)return h.index;if(h.y===_[1]&&!h.start){if(m=m+1,m>=u.length)return y;h=u[m]}}if(h.start)if(b){var P=i(b[0],b[1],[_[0],h.y]);b[0][0]>b[1][0]&&(P=-P),P>0&&(y=h.index)}else y=h.index;else h.y!==_[1]&&(y=h.index)}}}return y};function v(_,w,S,E){this.y=_,this.index=w,this.start=S,this.closed=E}function T(_,w,S,E){this.x=_,this.segment=w,this.create=S,this.index=E}function l(_){for(var w=_.length,S=2*w,E=new Array(S),y=0;y<w;++y){var b=_[y],p=b[0][0]<b[1][0];E[2*y]=new T(b[0][0],b,p,y),E[2*y+1]=new T(b[1][0],b,!p,y)}E.sort(function(O,I){var N=O.x-I.x;return N||(N=O.create-I.create,N)?N:Math.min(O.segment[0][1],O.segment[1][1])-Math.min(I.segment[0][1],I.segment[1][1])});for(var u=a(n),m=[],h=[],P=[],L=-1/0,y=0;y<S;){for(var z=E[y].x,F=[];y<S;){var B=E[y];if(B.x!==z)break;y+=1,B.segment[0][0]===B.x&&B.segment[1][0]===B.x?B.create&&(B.segment[0][1]<B.segment[1][1]?(F.push(new v(B.segment[0][1],B.index,!0,!0)),F.push(new v(B.segment[1][1],B.index,!1,!1))):(F.push(new v(B.segment[1][1],B.index,!0,!1)),F.push(new v(B.segment[0][1],B.index,!1,!0)))):B.create?u=u.insert(B.segment,B.index):u=u.remove(B.segment)}m.push(u.root),h.push(z),P.push(F)}return new s(m,h,P)}},5202:function(e,t,r){"use strict";var o=r(1944),a=r(8210);e.exports=s,e.exports.positive=c,e.exports.negative=f;function i(g,v){var T=a(o(g,v),[v[v.length-1]]);return T[T.length-1]}function n(g,v,T,l){var _=l-v,w=-v/_;w<0?w=0:w>1&&(w=1);for(var S=1-w,E=g.length,y=new Array(E),b=0;b<E;++b)y[b]=w*g[b]+S*T[b];return y}function s(g,v){for(var T=[],l=[],_=i(g[g.length-1],v),w=g[g.length-1],S=g[0],E=0;E<g.length;++E,w=S){S=g[E];var y=i(S,v);if(_<0&&y>0||_>0&&y<0){var b=n(w,y,S,_);T.push(b),l.push(b.slice())}y<0?l.push(S.slice()):y>0?T.push(S.slice()):(T.push(S.slice()),l.push(S.slice())),_=y}return{positive:T,negative:l}}function c(g,v){for(var T=[],l=i(g[g.length-1],v),_=g[g.length-1],w=g[0],S=0;S<g.length;++S,_=w){w=g[S];var E=i(w,v);(l<0&&E>0||l>0&&E<0)&&T.push(n(_,E,w,l)),E>=0&&T.push(w.slice()),l=E}return T}function f(g,v){for(var T=[],l=i(g[g.length-1],v),_=g[g.length-1],w=g[0],S=0;S<g.length;++S,_=w){w=g[S];var E=i(w,v);(l<0&&E>0||l>0&&E<0)&&T.push(n(_,E,w,l)),E<=0&&T.push(w.slice()),l=E}return T}},3387:function(e,t,r){var o;(function(){"use strict";var a={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 i(g){return s(f(g),arguments)}function n(g,v){return i.apply(null,[g].concat(v||[]))}function s(g,v){var T=1,l=g.length,_,w="",S,E,y,b,p,u,m,h;for(S=0;S<l;S++)if(typeof g[S]=="string")w+=g[S];else if(typeof g[S]=="object"){if(y=g[S],y.keys)for(_=v[T],E=0;E<y.keys.length;E++){if(_==null)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',y.keys[E],y.keys[E-1]));_=_[y.keys[E]]}else y.param_no?_=v[y.param_no]:_=v[T++];if(a.not_type.test(y.type)&&a.not_primitive.test(y.type)&&_ instanceof Function&&(_=_()),a.numeric_arg.test(y.type)&&typeof _!="number"&&isNaN(_))throw new TypeError(i("[sprintf] expecting number but found %T",_));switch(a.number.test(y.type)&&(m=_>=0),y.type){case"b":_=parseInt(_,10).toString(2);break;case"c":_=String.fromCharCode(parseInt(_,10));break;case"d":case"i":_=parseInt(_,10);break;case"j":_=JSON.stringify(_,null,y.width?parseInt(y.width):0);break;case"e":_=y.precision?parseFloat(_).toExponential(y.precision):parseFloat(_).toExponential();break;case"f":_=y.precision?parseFloat(_).toFixed(y.precision):parseFloat(_);break;case"g":_=y.precision?String(Number(_.toPrecision(y.precision))):parseFloat(_);break;case"o":_=(parseInt(_,10)>>>0).toString(8);break;case"s":_=String(_),_=y.precision?_.substring(0,y.precision):_;break;case"t":_=String(!!_),_=y.precision?_.substring(0,y.precision):_;break;case"T":_=Object.prototype.toString.call(_).slice(8,-1).toLowerCase(),_=y.precision?_.substring(0,y.precision):_;break;case"u":_=parseInt(_,10)>>>0;break;case"v":_=_.valueOf(),_=y.precision?_.substring(0,y.precision):_;break;case"x":_=(parseInt(_,10)>>>0).toString(16);break;case"X":_=(parseInt(_,10)>>>0).toString(16).toUpperCase();break}a.json.test(y.type)?w+=_:(a.number.test(y.type)&&(!m||y.sign)?(h=m?"+":"-",_=_.toString().replace(a.sign,"")):h="",p=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",u=y.width-(h+_).length,b=y.width&&u>0?p.repeat(u):"",w+=y.align?h+_+b:p==="0"?h+b+_:b+h+_)}return w}var c=Object.create(null);function f(g){if(c[g])return c[g];for(var v=g,T,l=[],_=0;v;){if((T=a.text.exec(v))!==null)l.push(T[0]);else if((T=a.modulo.exec(v))!==null)l.push("%");else if((T=a.placeholder.exec(v))!==null){if(T[2]){_|=1;var w=[],S=T[2],E=[];if((E=a.key.exec(S))!==null)for(w.push(E[1]);(S=S.substring(E[0].length))!=="";)if((E=a.key_access.exec(S))!==null)w.push(E[1]);else if((E=a.index_access.exec(S))!==null)w.push(E[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");T[2]=w}else _|=2;if(_===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:T[0],param_no:T[1],keys:T[2],sign:T[3],pad_char:T[4],align:T[5],width:T[6],precision:T[7],type:T[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(T[0].length)}return c[g]=l}t.sprintf=i,t.vsprintf=n,typeof window<"u"&&(window.sprintf=i,window.vsprintf=n,o=function(){return{sprintf:i,vsprintf:n}}.call(t,r,t,e),o!==void 0&&(e.exports=o))})()},3711:function(e,t,r){"use strict";e.exports=f;var o=r(2640),a=r(781),i={"2d":function(g,v,T){var l=g({order:v,scalarArguments:3,getters:T==="generic"?[0]:void 0,phase:function(w,S,E,y){return w>y|0},vertex:function(w,S,E,y,b,p,u,m,h,P,L,z,F){var B=(u<<0)+(m<<1)+(h<<2)+(P<<3)|0;if(!(B===0||B===15))switch(B){case 0:L.push([w-.5,S-.5]);break;case 1:L.push([w-.25-.25*(y+E-2*F)/(E-y),S-.25-.25*(b+E-2*F)/(E-b)]);break;case 2:L.push([w-.75-.25*(-y-E+2*F)/(y-E),S-.25-.25*(p+y-2*F)/(y-p)]);break;case 3:L.push([w-.5,S-.5-.5*(b+E+p+y-4*F)/(E-b+y-p)]);break;case 4:L.push([w-.25-.25*(p+b-2*F)/(b-p),S-.75-.25*(-b-E+2*F)/(b-E)]);break;case 5:L.push([w-.5-.5*(y+E+p+b-4*F)/(E-y+b-p),S-.5]);break;case 6:L.push([w-.5-.25*(-y-E+p+b)/(y-E+b-p),S-.5-.25*(-b-E+p+y)/(b-E+y-p)]);break;case 7:L.push([w-.75-.25*(p+b-2*F)/(b-p),S-.75-.25*(p+y-2*F)/(y-p)]);break;case 8:L.push([w-.75-.25*(-p-b+2*F)/(p-b),S-.75-.25*(-p-y+2*F)/(p-y)]);break;case 9:L.push([w-.5-.25*(y+E+-p-b)/(E-y+p-b),S-.5-.25*(b+E+-p-y)/(E-b+p-y)]);break;case 10:L.push([w-.5-.5*(-y-E+-p-b+4*F)/(y-E+p-b),S-.5]);break;case 11:L.push([w-.25-.25*(-p-b+2*F)/(p-b),S-.75-.25*(b+E-2*F)/(E-b)]);break;case 12:L.push([w-.5,S-.5-.5*(-b-E+-p-y+4*F)/(b-E+p-y)]);break;case 13:L.push([w-.75-.25*(y+E-2*F)/(E-y),S-.25-.25*(-p-y+2*F)/(p-y)]);break;case 14:L.push([w-.25-.25*(-y-E+2*F)/(y-E),S-.25-.25*(-b-E+2*F)/(b-E)]);break;case 15:L.push([w-.5,S-.5]);break}},cell:function(w,S,E,y,b,p,u,m,h){b?m.push([w,S]):m.push([S,w])}});return function(_,w){var S=[],E=[];return l(_,S,E,w),{positions:S,cells:E}}}};function n(g,v){var T=g.length+"d",l=i[T];if(l)return l(o,g,v)}function s(g,v){for(var T=a(g,v),l=T.length,_=new Array(l),w=new Array(l),S=0;S<l;++S)_[S]=[T[S]],w[S]=[S];return{positions:_,cells:w}}var c={};function f(g,_){if(g.dimension<=0)return{positions:[],cells:[]};if(g.dimension===1)return s(g,_);var T=g.order.join()+"-"+g.dtype,l=c[T],_=+_||0;return l||(l=c[T]=n(g.order,g.dtype)),l(g,_)}},665:function(e,t,r){"use strict";var o=r(3202);e.exports=s;var a=96;function i(c,f){var g=o(getComputedStyle(c).getPropertyValue(f));return g[0]*s(g[1],c)}function n(c,f){var g=document.createElement("div");g.style["font-size"]="128"+c,f.appendChild(g);var v=i(g,"font-size")/128;return f.removeChild(g),v}function s(c,f){switch(f=f||document.body,c=(c||"px").trim().toLowerCase(),(f===window||f===document)&&(f=document.body),c){case"%":return f.clientHeight/100;case"ch":case"ex":return n(c,f);case"em":return i(f,"font-size");case"rem":return i(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 a;case"cm":return a/2.54;case"mm":return a/25.4;case"pt":return a/72;case"pc":return a/6}return 1}},7261:function(e,t,r){"use strict";e.exports=w;var o=r(9215),a=r(7608),i=r(6079),n=r(5911),s=r(3536),c=r(244);function f(S,E,y){return Math.sqrt(Math.pow(S,2)+Math.pow(E,2)+Math.pow(y,2))}function g(S){return Math.min(1,Math.max(-1,S))}function v(S){var E=Math.abs(S[0]),y=Math.abs(S[1]),b=Math.abs(S[2]),p=[0,0,0];E>Math.max(y,b)?p[2]=1:y>Math.max(E,b)?p[0]=1:p[1]=1;for(var u=0,m=0,h=0;h<3;++h)u+=S[h]*S[h],m+=p[h]*S[h];for(var h=0;h<3;++h)p[h]-=m/u*S[h];return s(p,p),p}function T(S,E,y,b,p,u,m,h){this.center=o(y),this.up=o(b),this.right=o(p),this.radius=o([u]),this.angle=o([m,h]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(S,E),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var P=0;P<16;++P)this.computedMatrix[P]=.5;this.recalcMatrix(0)}var l=T.prototype;l.setDistanceLimits=function(S,E){S>0?S=Math.log(S):S=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,S),this.radius.bounds[0][0]=S,this.radius.bounds[1][0]=E},l.getDistanceLimits=function(S){var E=this.radius.bounds[0];return S?(S[0]=Math.exp(E[0][0]),S[1]=Math.exp(E[1][0]),S):[Math.exp(E[0][0]),Math.exp(E[1][0])]},l.recalcMatrix=function(S){this.center.curve(S),this.up.curve(S),this.right.curve(S),this.radius.curve(S),this.angle.curve(S);for(var E=this.computedUp,y=this.computedRight,b=0,p=0,u=0;u<3;++u)p+=E[u]*y[u],b+=E[u]*E[u];for(var m=Math.sqrt(b),h=0,u=0;u<3;++u)y[u]-=E[u]*p/b,h+=y[u]*y[u],E[u]/=m;for(var P=Math.sqrt(h),u=0;u<3;++u)y[u]/=P;var L=this.computedToward;n(L,E,y),s(L,L);for(var z=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],B=this.computedAngle[1],O=Math.cos(F),I=Math.sin(F),N=Math.cos(B),U=Math.sin(B),W=this.computedCenter,Q=O*N,ue=I*N,le=U,he=-O*U,G=-I*U,$=N,J=this.computedEye,X=this.computedMatrix,u=0;u<3;++u){var oe=Q*y[u]+ue*L[u]+le*E[u];X[4*u+1]=he*y[u]+G*L[u]+$*E[u],X[4*u+2]=oe,X[4*u+3]=0}var ie=X[1],j=X[5],ee=X[9],re=X[2],ce=X[6],be=X[10],Ae=j*be-ee*ce,ze=ee*re-ie*be,Re=ie*ce-j*re,Xe=f(Ae,ze,Re);Ae/=Xe,ze/=Xe,Re/=Xe,X[0]=Ae,X[4]=ze,X[8]=Re;for(var u=0;u<3;++u)J[u]=W[u]+X[2+4*u]*z;for(var u=0;u<3;++u){for(var h=0,it=0;it<3;++it)h+=X[u+4*it]*J[it];X[12+u]=-h}X[15]=1},l.getMatrix=function(S,E){this.recalcMatrix(S);var y=this.computedMatrix;if(E){for(var b=0;b<16;++b)E[b]=y[b];return E}return y};var _=[0,0,0];l.rotate=function(S,E,y,b){if(this.angle.move(S,E,y),b){this.recalcMatrix(S);var p=this.computedMatrix;_[0]=p[2],_[1]=p[6],_[2]=p[10];for(var u=this.computedUp,m=this.computedRight,h=this.computedToward,P=0;P<3;++P)p[4*P]=u[P],p[4*P+1]=m[P],p[4*P+2]=h[P];i(p,p,b,_);for(var P=0;P<3;++P)u[P]=p[4*P],m[P]=p[4*P+1];this.up.set(S,u[0],u[1],u[2]),this.right.set(S,m[0],m[1],m[2])}},l.pan=function(S,E,y,b){E=E||0,y=y||0,b=b||0,this.recalcMatrix(S);var p=this.computedMatrix,u=Math.exp(this.computedRadius[0]),m=p[1],h=p[5],P=p[9],L=f(m,h,P);m/=L,h/=L,P/=L;var z=p[0],F=p[4],B=p[8],O=z*m+F*h+B*P;z-=m*O,F-=h*O,B-=P*O;var I=f(z,F,B);z/=I,F/=I,B/=I;var N=z*E+m*y,U=F*E+h*y,W=B*E+P*y;this.center.move(S,N,U,W);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+b),this.radius.set(S,Math.log(Q))},l.translate=function(S,E,y,b){this.center.move(S,E||0,y||0,b||0)},l.setMatrix=function(S,E,y,b){var p=1;typeof y=="number"&&(p=y|0),(p<0||p>3)&&(p=1);var u=(p+2)%3,m=(p+1)%3;E||(this.recalcMatrix(S),E=this.computedMatrix);var h=E[p],P=E[p+4],L=E[p+8];if(b){var F=Math.abs(h),B=Math.abs(P),O=Math.abs(L),I=Math.max(F,B,O);F===I?(h=h<0?-1:1,P=L=0):O===I?(L=L<0?-1:1,h=P=0):(P=P<0?-1:1,h=L=0)}else{var z=f(h,P,L);h/=z,P/=z,L/=z}var N=E[u],U=E[u+4],W=E[u+8],Q=N*h+U*P+W*L;N-=h*Q,U-=P*Q,W-=L*Q;var ue=f(N,U,W);N/=ue,U/=ue,W/=ue;var le=P*W-L*U,he=L*N-h*W,G=h*U-P*N,$=f(le,he,G);le/=$,he/=$,G/=$,this.center.jump(S,_e,fe,Fe),this.radius.idle(S),this.up.jump(S,h,P,L),this.right.jump(S,N,U,W);var J,X;if(p===2){var oe=E[1],ie=E[5],j=E[9],ee=oe*N+ie*U+j*W,re=oe*le+ie*he+j*G;ze<0?J=-Math.PI/2:J=Math.PI/2,X=Math.atan2(re,ee)}else{var ce=E[2],be=E[6],Ae=E[10],ze=ce*h+be*P+Ae*L,Re=ce*N+be*U+Ae*W,Xe=ce*le+be*he+Ae*G;J=Math.asin(g(ze)),X=Math.atan2(Xe,Re)}this.angle.jump(S,X,J),this.recalcMatrix(S);var it=E[2],ot=E[6],tt=E[10],lt=this.computedMatrix;a(lt,E);var Ee=lt[15],_e=lt[12]/Ee,fe=lt[13]/Ee,Fe=lt[14]/Ee,rt=Math.exp(this.computedRadius[0]);this.center.jump(S,_e-it*rt,fe-ot*rt,Fe-tt*rt)},l.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},l.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},l.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},l.setDistance=function(S,E){E>0&&this.radius.set(S,Math.log(E))},l.lookAt=function(S,E,y,b){this.recalcMatrix(S),E=E||this.computedEye,y=y||this.computedCenter,b=b||this.computedUp;var p=b[0],u=b[1],m=b[2],h=f(p,u,m);if(!(h<1e-6)){p/=h,u/=h,m/=h;var P=E[0]-y[0],L=E[1]-y[1],z=E[2]-y[2],F=f(P,L,z);if(!(F<1e-6)){P/=F,L/=F,z/=F;var B=this.computedRight,O=B[0],I=B[1],N=B[2],U=p*O+u*I+m*N;O-=U*p,I-=U*u,N-=U*m;var W=f(O,I,N);if(!(W<.01&&(O=u*z-m*L,I=m*P-p*z,N=p*L-u*P,W=f(O,I,N),W<1e-6))){O/=W,I/=W,N/=W,this.up.set(S,p,u,m),this.right.set(S,O,I,N),this.center.set(S,y[0],y[1],y[2]),this.radius.set(S,Math.log(F));var Q=u*N-m*I,ue=m*O-p*N,le=p*I-u*O,he=f(Q,ue,le);Q/=he,ue/=he,le/=he;var G=p*P+u*L+m*z,$=O*P+I*L+N*z,J=Q*P+ue*L+le*z,X=Math.asin(g(G)),oe=Math.atan2(J,$),ie=this.angle._state,j=ie[ie.length-1],ee=ie[ie.length-2];j=j%(2*Math.PI);var re=Math.abs(j+2*Math.PI-oe),ce=Math.abs(j-oe),be=Math.abs(j-2*Math.PI-oe);re<ce&&(j+=2*Math.PI),be<ce&&(j-=2*Math.PI),this.angle.jump(this.angle.lastT(),j,ee),this.angle.set(S,oe,X)}}}};function w(S){S=S||{};var E=S.center||[0,0,0],y=S.up||[0,1,0],b=S.right||v(y),p=S.radius||1,u=S.theta||0,m=S.phi||0;if(E=[].slice.call(E,0,3),y=[].slice.call(y,0,3),s(y,y),b=[].slice.call(b,0,3),s(b,b),"eye"in S){var h=S.eye,P=[h[0]-E[0],h[1]-E[1],h[2]-E[2]];n(b,P,y),f(b[0],b[1],b[2])<1e-6?b=v(y):s(b,b),p=f(P[0],P[1],P[2]);var L=c(y,P)/p,z=c(b,P)/p;m=Math.acos(L),u=Math.acos(z)}return p=Math.log(p),new T(S.zoomMin,S.zoomMax,E,y,b,p,u,m)}},5250:function(e){"use strict";e.exports=r;var t=+(Math.pow(2,27)+1);function r(o,a,i){var n=o*a,s=t*o,c=s-o,f=s-c,g=o-f,v=t*a,T=v-a,l=v-T,_=a-l,w=n-f*l,S=w-g*l,E=S-f*_,y=g*_-E;return i?(i[0]=y,i[1]=n,i):[y,n]}},9362:function(e){"use strict";e.exports=t;function t(r,o,a){var i=r+o,n=i-r,s=i-n,c=o-n,f=r-s;return a?(a[0]=f+c,a[1]=i,a):[f+c,i]}},1888:function(e,t,r){"use strict";var o=r(8828),a=r(1338),i=r(4793).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),BIGUINT64:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),BIGINT64:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var n=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",c=typeof BigInt64Array<"u",f=r.g.__TYPEDARRAY_POOL;f.UINT8C||(f.UINT8C=a([32,0])),f.BIGUINT64||(f.BIGUINT64=a([32,0])),f.BIGINT64||(f.BIGINT64=a([32,0])),f.BUFFER||(f.BUFFER=a([32,0]));var g=f.DATA,v=f.BUFFER;t.free=function(O){if(i.isBuffer(O))v[o.log2(O.length)].push(O);else{if(Object.prototype.toString.call(O)!=="[object ArrayBuffer]"&&(O=O.buffer),!O)return;var I=O.length||O.byteLength,N=o.log2(I)|0;g[N].push(O)}};function T(B){if(B){var O=B.length||B.byteLength,I=o.log2(O);g[I].push(B)}}function l(B){T(B.buffer)}t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=l,t.freeArrayBuffer=T,t.freeBuffer=function(O){v[o.log2(O.length)].push(O)},t.malloc=function(O,I){if(I===void 0||I==="arraybuffer")return _(O);switch(I){case"uint8":return w(O);case"uint16":return S(O);case"uint32":return E(O);case"int8":return y(O);case"int16":return b(O);case"int32":return p(O);case"float":case"float32":return u(O);case"double":case"float64":return m(O);case"uint8_clamped":return h(O);case"bigint64":return L(O);case"biguint64":return P(O);case"buffer":return F(O);case"data":case"dataview":return z(O);default:return null}return null};function _(O){var O=o.nextPow2(O),I=o.log2(O),N=g[I];return N.length>0?N.pop():new ArrayBuffer(O)}t.mallocArrayBuffer=_;function w(B){return new Uint8Array(_(B),0,B)}t.mallocUint8=w;function S(B){return new Uint16Array(_(2*B),0,B)}t.mallocUint16=S;function E(B){return new Uint32Array(_(4*B),0,B)}t.mallocUint32=E;function y(B){return new Int8Array(_(B),0,B)}t.mallocInt8=y;function b(B){return new Int16Array(_(2*B),0,B)}t.mallocInt16=b;function p(B){return new Int32Array(_(4*B),0,B)}t.mallocInt32=p;function u(B){return new Float32Array(_(4*B),0,B)}t.mallocFloat32=t.mallocFloat=u;function m(B){return new Float64Array(_(8*B),0,B)}t.mallocFloat64=t.mallocDouble=m;function h(B){return n?new Uint8ClampedArray(_(B),0,B):w(B)}t.mallocUint8Clamped=h;function P(B){return s?new BigUint64Array(_(8*B),0,B):null}t.mallocBigUint64=P;function L(B){return c?new BigInt64Array(_(8*B),0,B):null}t.mallocBigInt64=L;function z(B){return new DataView(_(B),0,B)}t.mallocDataView=z;function F(B){B=o.nextPow2(B);var O=o.log2(B),I=v[O];return I.length>0?I.pop():new i(B)}t.mallocBuffer=F,t.clearCache=function(){for(var O=0;O<32;++O)f.UINT8[O].length=0,f.UINT16[O].length=0,f.UINT32[O].length=0,f.INT8[O].length=0,f.INT16[O].length=0,f.INT32[O].length=0,f.FLOAT[O].length=0,f.DOUBLE[O].length=0,f.BIGUINT64[O].length=0,f.BIGINT64[O].length=0,f.UINT8C[O].length=0,g[O].length=0,v[O].length=0}},1755:function(e){"use strict";"use restrict";e.exports=t;function t(o){this.roots=new Array(o),this.ranks=new Array(o);for(var a=0;a<o;++a)this.roots[a]=a,this.ranks[a]=0}var r=t.prototype;Object.defineProperty(r,"length",{get:function(){return this.roots.length}}),r.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},r.find=function(o){for(var a=o,i=this.roots;i[o]!==o;)o=i[o];for(;i[a]!==o;){var n=i[a];i[a]=o,a=n}return o},r.link=function(o,a){var i=this.find(o),n=this.find(a);if(i!==n){var s=this.ranks,c=this.roots,f=s[i],g=s[n];f<g?c[i]=n:g<f?c[n]=i:(c[n]=i,++s[i])}}},1682:function(e){"use strict";function t(a,i){for(var n=1,s=a.length,c=a[0],f=a[0],g=1;g<s;++g)if(f=c,c=a[g],i(c,f)){if(g===n){n++;continue}a[n++]=c}return a.length=n,a}function r(a){for(var i=1,n=a.length,s=a[0],c=a[0],f=1;f<n;++f,c=s)if(c=s,s=a[f],s!==c){if(f===i){i++;continue}a[i++]=s}return a.length=i,a}function o(a,i,n){return a.length===0?a:i?(n||a.sort(i),t(a,i)):(n||a.sort(),r(a))}e.exports=o},4359:function(e,t,r){"use strict";e.exports=n;var o=r(7718),a=null,i=null;typeof document<"u"&&(a=document.createElement("canvas"),a.width=8192,a.height=1024,i=a.getContext("2d"));function n(s,c){return(typeof c!="object"||c===null)&&(c={}),o(s,c.canvas||a,c.context||i,c)}},7718:function(e,t,r){e.exports=L,e.exports.processPixels=P;var o=r(3711),a=r(9618),i=r(5878),n=r(332),s=r(2538),c=r(2095),f="b",g="b|",v="i",T="i|",l="sup",_="+",w="+1",S="sub",E="-",y="-1";function b(z,F,B,O){for(var I="<"+z+">",N="</"+z+">",U=I.length,W=N.length,Q=F[0]===_||F[0]===E,ue=0,le=-W;ue>-1&&(ue=B.indexOf(I,ue),!(ue===-1||(le=B.indexOf(N,ue+U),le===-1)||le<=ue));){for(var he=ue;he<le+W;++he)if(he<ue+U||he>=le)O[he]=null,B=B.substr(0,he)+" "+B.substr(he+1);else if(O[he]!==null){var G=O[he].indexOf(F[0]);G===-1?O[he]+=F:Q&&(O[he]=O[he].substr(0,G+1)+(1+parseInt(O[he][G+1]))+O[he].substr(G+2))}var $=ue+U,J=B.substr($,le-$),X=J.indexOf(I);X!==-1?ue=X:ue=le+W}return O}function p(z,F,B){for(var O=F.textAlign||"start",I=F.textBaseline||"alphabetic",N=[1<<30,1<<30],U=[0,0],W=z.length,Q=0;Q<W;++Q)for(var ue=z[Q],le=0;le<2;++le)N[le]=Math.min(N[le],ue[le])|0,U[le]=Math.max(U[le],ue[le])|0;var he=0;switch(O){case"center":he=-.5*(N[0]+U[0]);break;case"right":case"end":he=-U[0];break;case"left":case"start":he=-N[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+O+"'")}var G=0;switch(I){case"hanging":case"top":G=-N[1];break;case"middle":G=-.5*(N[1]+U[1]);break;case"alphabetic":case"ideographic":G=-3*B;break;case"bottom":G=-U[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+I+"'")}var $=1/B;return"lineHeight"in F?$*=+F.lineHeight:"width"in F?$=F.width/(U[0]-N[0]):"height"in F&&($=F.height/(U[1]-N[1])),z.map(function(J){return[$*(J[0]+he),$*(J[1]+G)]})}function u(z,F,B,O,I,N){B=B.replace(/\n/g,""),N.breaklines===!0?B=B.replace(/\<br\>/g,`
`):B=B.replace(/\<br\>/g," ");var U="",W=[];for(j=0;j<B.length;++j)W[j]=U;N.bolds===!0&&(W=b(f,g,B,W)),N.italics===!0&&(W=b(v,T,B,W)),N.superscripts===!0&&(W=b(l,w,B,W)),N.subscripts===!0&&(W=b(S,y,B,W));var Q=[],ue="";for(j=0;j<B.length;++j)W[j]!==null&&(ue+=B[j],Q.push(W[j]));var le=ue.split(`
`),he=le.length,G=Math.round(I*O),$=O,J=O*2,X=0,oe=he*G+J;z.height<oe&&(z.height=oe),F.fillStyle="#000",F.fillRect(0,0,z.width,z.height),F.fillStyle="#fff";var ie,j,ee,re,ce,be=0,Ae="";function ze(){if(Ae!==""){var fe=F.measureText(Ae).width;F.fillText(Ae,$+ee,J+re),ee+=fe}}function Re(){return""+Math.round(ce)+"px "}function Xe(fe,Fe){var rt=""+F.font;if(N.subscripts===!0){var st=fe.indexOf(E),Qe=Fe.indexOf(E),Lt=st>-1?parseInt(fe[1+st]):0,kt=Qe>-1?parseInt(Fe[1+Qe]):0;Lt!==kt&&(rt=rt.replace(Re(),"?px "),ce*=Math.pow(.75,kt-Lt),rt=rt.replace("?px ",Re())),re+=.25*G*(kt-Lt)}if(N.superscripts===!0){var Vt=fe.indexOf(_),Zt=Fe.indexOf(_),Sr=Vt>-1?parseInt(fe[1+Vt]):0,xr=Zt>-1?parseInt(Fe[1+Zt]):0;Sr!==xr&&(rt=rt.replace(Re(),"?px "),ce*=Math.pow(.75,xr-Sr),rt=rt.replace("?px ",Re())),re-=.25*G*(xr-Sr)}if(N.bolds===!0){var jr=fe.indexOf(g)>-1,wr=Fe.indexOf(g)>-1;!jr&&wr&&(Ir?rt=rt.replace("italic ","italic bold "):rt="bold "+rt),jr&&!wr&&(rt=rt.replace("bold ",""))}if(N.italics===!0){var Ir=fe.indexOf(T)>-1,bt=Fe.indexOf(T)>-1;!Ir&&bt&&(rt="italic "+rt),Ir&&!bt&&(rt=rt.replace("italic ",""))}F.font=rt}for(ie=0;ie<he;++ie){var it=le[ie]+`
`;for(ee=0,re=ie*G,ce=O,Ae="",j=0;j<it.length;++j){var ot=j+be<Q.length?Q[j+be]:Q[Q.length-1];U===ot?Ae+=it[j]:(ze(),Ae=it[j],ot!==void 0&&(Xe(U,ot),U=ot))}ze(),be+=it.length;var tt=Math.round(ee+2*$)|0;X<tt&&(X=tt)}var lt=X,Ee=J+G*he,_e=a(F.getImageData(0,0,lt,Ee).data,[Ee,lt,4]);return _e.pick(-1,-1,0).transpose(1,0)}function m(z,F){var B=o(z,128);return F?i(B.cells,B.positions,.25):{edges:B.cells,positions:B.positions}}function h(z,F,B,O){var I=m(z,O),N=p(I.positions,F,B),U=I.edges,W=F.orientation==="ccw";if(n(N,U),F.polygons||F.polygon||F.polyline){for(var Q=c(U,N),ue=new Array(Q.length),le=0;le<Q.length;++le){for(var he=Q[le],G=new Array(he.length),$=0;$<he.length;++$){for(var J=he[$],X=new Array(J.length),oe=0;oe<J.length;++oe)X[oe]=N[J[oe]].slice();W&&X.reverse(),G[$]=X}ue[le]=G}return ue}else return F.triangles||F.triangulate||F.triangle?{cells:s(N,U,{delaunay:!1,exterior:!1,interior:!0}),positions:N}:{edges:U,positions:N}}function P(z,F,B){try{return h(z,F,B,!0)}catch{}try{return h(z,F,B,!1)}catch{}return F.polygons||F.polyline||F.polygon?[]:F.triangles||F.triangulate||F.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function L(z,F,B,O){var I=64,N=1.25,U={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};O&&(O.size&&O.size>0&&(I=O.size),O.lineSpacing&&O.lineSpacing>0&&(N=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(U.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(U.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(U.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(U.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(U.superscripts=!!O.styletags.superscripts)),B.font=[O.fontStyle,O.fontVariant,O.fontWeight,I+"px",O.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var W=u(F,B,z,I,N,U);return P(W,O,I)}},1538:function(e){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(h){h.permitHostObjects___&&h.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var o=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var i=new a,n=Object.freeze({});if(i.set(n,1),i.get(n)!==1)o=!0;else{e.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,f=Object.defineProperty,g=Object.isExtensible,v="weakmap:",T=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var l=new ArrayBuffer(25),_=new Uint8Array(l);crypto.getRandomValues(_),T=v+"rand:"+Array.prototype.map.call(_,function(h){return(h%36).toString(36)}).join("")+"___"}function w(h){return!(h.substr(0,v.length)==v&&h.substr(h.length-3)==="___")}if(f(Object,"getOwnPropertyNames",{value:function(P){return c(P).filter(w)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;f(Object,"getPropertyNames",{value:function(P){return S(P).filter(w)}})}function E(h){if(h!==Object(h))throw new TypeError("Not an object: "+h);var P=h[T];if(P&&P.key===h)return P;if(g(h)){P={key:h};try{return f(h,T,{value:P,writable:!1,enumerable:!1,configurable:!1}),P}catch{return}}}(function(){var h=Object.freeze;f(Object,"freeze",{value:function(F){return E(F),h(F)}});var P=Object.seal;f(Object,"seal",{value:function(F){return E(F),P(F)}});var L=Object.preventExtensions;f(Object,"preventExtensions",{value:function(F){return E(F),L(F)}})})();function y(h){return h.prototype=null,Object.freeze(h)}var b=!1;function p(){!b&&typeof console<"u"&&(b=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,m=function(){this instanceof m||p();var h=[],P=[],L=u++;function z(I,N){var U,W=E(I);return W?L in W?W[L]:N:(U=h.indexOf(I),U>=0?P[U]:N)}function F(I){var N=E(I);return N?L in N:h.indexOf(I)>=0}function B(I,N){var U,W=E(I);return W?W[L]=N:(U=h.indexOf(I),U>=0?P[U]=N:(U=h.length,P[U]=N,h[U]=I)),this}function O(I){var N=E(I),U,W;return N?L in N&&delete N[L]:(U=h.indexOf(I),U<0?!1:(W=h.length-1,h[U]=void 0,P[U]=P[W],h[U]=h[W],h.length=W,P.length=W,!0))}return Object.create(m.prototype,{get___:{value:y(z)},has___:{value:y(F)},set___:{value:y(B)},delete___:{value:y(O)}})};m.prototype=Object.create(Object.prototype,{get:{value:function(P,L){return this.get___(P,L)},writable:!0,configurable:!0},has:{value:function(P){return this.has___(P)},writable:!0,configurable:!0},set:{value:function(P,L){return this.set___(P,L)},writable:!0,configurable:!0},delete:{value:function(P){return this.delete___(P)},writable:!0,configurable:!0}}),typeof a=="function"?function(){o&&typeof Proxy<"u"&&(Proxy=void 0);function h(){this instanceof m||p();var P=new a,L=void 0,z=!1;function F(N,U){return L?P.has(N)?P.get(N):L.get___(N,U):P.get(N,U)}function B(N){return P.has(N)||(L?L.has___(N):!1)}var O;o?O=function(N,U){return P.set(N,U),P.has(N)||(L||(L=new m),L.set(N,U)),this}:O=function(N,U){if(z)try{P.set(N,U)}catch{L||(L=new m),L.set___(N,U)}else P.set(N,U);return this};function I(N){var U=!!P.delete(N);return L&&L.delete___(N)||U}return Object.create(m.prototype,{get___:{value:y(F)},has___:{value:y(B)},set___:{value:y(O)},delete___:{value:y(I)},permitHostObjects___:{value:y(function(N){if(N===r)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}h.prototype=m.prototype,e.exports=h,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=m)})()},236:function(e,t,r){var o=r(8284);e.exports=a;function a(){var i={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var s=n.valueOf(i);return s&&s.identity===i?s:o(n,i)}}},8284:function(e){e.exports=t;function t(r,o){var a={identity:o},i=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(n){return n!==o?i.apply(this,arguments):a},writable:!0}),a}},606:function(e,t,r){var o=r(236);e.exports=a;function a(){var i=o();return{get:function(n,s){var c=i(n);return c.hasOwnProperty("value")?c.value:s},set:function(n,s){return i(n).value=s,this},has:function(n){return"value"in i(n)},delete:function(n){return delete i(n).value}}}},3349:function(e){"use strict";function t(){return function(s,c,f,g,v,T){var l=s[0],_=f[0],w=[0],S=_;g|=0;var E=0,y=_;for(E=0;E<l;++E){{var b=c[g]-T,p=c[g+S]-T;b>=0!=p>=0&&v.push(w[0]+.5+.5*(b+p)/(b-p))}g+=y,++w[0]}}}function r(){return t()}var o=r;function a(s){var c={};return function(g,v,T){var l=g.dtype,_=g.order,w=[l,_.join()].join(),S=c[w];return S||(c[w]=S=s([l,_])),S(g.shape.slice(0),g.data,g.stride,g.offset|0,v,T)}}function i(s){return a(o.bind(void 0,s))}function n(s){return i({funcName:s.funcName})}e.exports=n({funcName:"zeroCrossings"})},781:function(e,t,r){"use strict";e.exports=a;var o=r(3349);function a(i,n){var s=[];return n=+n||0,o(i.hi(i.shape[0]-1),s,n),s}},7790:function(){}},x={};function A(e){var t=x[e];if(t!==void 0)return t.exports;var r=x[e]={id:e,loaded:!1,exports:{}};return d[e].call(r.exports,r,r.exports,A),r.loaded=!0,r.exports}(function(){A.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){A.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}();var M=A(1964);q.exports=M})()}}),_E=Ze({"node_modules/color-name/index.js"(Z,q){"use strict";q.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]}}}),VN=Ze({"node_modules/color-normalize/node_modules/color-parse/index.js"(Z,q){"use strict";var d=_E();q.exports=A;var x={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function A(M){var e,t=[],r=1,o;if(typeof M=="string")if(M=M.toLowerCase(),d[M])t=d[M].slice(),o="rgb";else if(M==="transparent")r=0,o="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(M)){var a=M.slice(1),i=a.length,n=i<=4;r=1,n?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],i===4&&(r=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],i===8&&(r=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),o="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(M)){var s=e[1],c=s==="rgb",a=s.replace(/a$/,"");o=a;var i=a==="cmyk"?4:a==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,T){if(/%$/.test(v))return T===i?parseFloat(v)/100:a==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(a[T]==="h"){if(/deg$/.test(v))return parseFloat(v);if(x[v]!==void 0)return x[v]}return parseFloat(v)}),s===a&&t.push(1),r=c||t[i]===void 0?1:t[i],t=t.slice(0,i)}else M.length>10&&/[0-9](?:\s|\/)/.test(M)&&(t=M.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),o=M.match(/([a-z])/ig).join("").toLowerCase());else isNaN(M)?Array.isArray(M)||M.length?(t=[M[0],M[1],M[2]],o="rgb",r=M.length===4?M[3]:1):M instanceof Object&&(M.r!=null||M.red!=null||M.R!=null?(o="rgb",t=[M.r||M.red||M.R||0,M.g||M.green||M.G||0,M.b||M.blue||M.B||0]):(o="hsl",t=[M.h||M.hue||M.H||0,M.s||M.saturation||M.S||0,M.l||M.lightness||M.L||M.b||M.brightness]),r=M.a||M.alpha||M.opacity||1,M.opacity!=null&&(r/=100)):(o="rgb",t=[M>>>16,(M&65280)>>>8,M&255]);return{space:o,values:t,alpha:r}}}}),GN=Ze({"node_modules/color-normalize/node_modules/color-rgba/index.js"(Z,q){"use strict";var d=VN();q.exports=function(M){Array.isArray(M)&&M.raw&&(M=String.raw.apply(null,arguments));var e,t,r,o=d(M);if(!o.space)return[];var a=[0,0,0],i=o.space[0]==="h"?[360,100,100]:[255,255,255];return e=Array(3),e[0]=Math.min(Math.max(o.values[0],a[0]),i[0]),e[1]=Math.min(Math.max(o.values[1],a[1]),i[1]),e[2]=Math.min(Math.max(o.values[2],a[2]),i[2]),o.space[0]==="h"&&(e=x(e)),e.push(Math.min(Math.max(o.alpha,0),1)),e};function x(A){var M=A[0]/360,e=A[1]/100,t=A[2]/100,r,o,a,i,n,s=0;if(e===0)return n=t*255,[n,n,n];for(o=t<.5?t*(1+e):t+e-t*e,r=2*t-o,i=[0,0,0];s<3;)a=M+1/3*-(s-1),a<0?a++:a>1&&a--,n=6*a<1?r+(o-r)*6*a:2*a<1?o:3*a<2?r+(o-r)*(2/3-a)*6:r,i[s++]=n*255;return i}}}),vx=Ze({"node_modules/clamp/index.js"(Z,q){q.exports=d;function d(x,A,M){return A<M?x<A?A:x>M?M:x:x<M?M:x>A?A:x}}}),Q3=Ze({"node_modules/dtype/index.js"(Z,q){q.exports=function(d){switch(d){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}}}}),h0=Ze({"node_modules/color-normalize/index.js"(Z,q){"use strict";var d=GN(),x=vx(),A=Q3();q.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var o=A(r),a=new o(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=d(t),t[0]/=255,t[1]/=255,t[2]/=255),M(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=x(Math.floor(t[0]*255),0,255),a[1]=x(Math.floor(t[1]*255),0,255),a[2]=x(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:x(Math.floor(t[3]*255),0,255)),a)};function M(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))}}}),Qv=Ze({"src/lib/str2rgbarray.js"(Z,q){"use strict";var d=h0();function x(A){return A?d(A):[0,0,0,1]}q.exports=x}}),em=Ze({"src/lib/gl_format_color.js"(Z,q){"use strict";var d=ns(),x=Ch(),A=h0(),M=rc(),e=oh().defaultLine,t=xp().isArrayOrTypedArray,r=A(e),o=1;function a(f,g){var v=f;return v[3]*=g,v}function i(f){if(d(f))return r;var g=A(f);return g.length?g:r}function n(f){return d(f)?f:o}function s(f,g,v){var T=f.color;T&&T._inputArray&&(T=T._inputArray);var l=t(T),_=t(g),w=M.extractOpts(f),S=[],E,y,b,p,u;if(w.colorscale!==void 0?E=M.makeColorScaleFuncFromTrace(f):E=i,l?y=function(h,P){return h[P]===void 0?r:A(E(h[P]))}:y=i,_?b=function(h,P){return h[P]===void 0?o:n(h[P])}:b=n,l||_)for(var m=0;m<v;m++)p=y(T,m),u=b(g,m),S[m]=a(p,u);else S=a(A(T),g);return S}function c(f){var g=M.extractOpts(f),v=g.colorscale;return g.reversescale&&(v=M.flipScale(g.colorscale)),v.map(function(T){var l=T[0],_=x(T[1]),w=_.toRgb();return{index:l,rgb:[w.r,w.g,w.b,w.a]}})}q.exports={formatColor:s,parseColorScale:c}}}),xE=Ze({"src/constants/gl3d_dashes.js"(Z,q){"use strict";q.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]}}}),eT=Ze({"src/constants/gl3d_markers.js"(Z,q){"use strict";q.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}}}),HN=Ze({"src/traces/scatter3d/calc_errors.js"(Z,q){"use strict";var d=oo();function x(e,t,r,o){if(!t||!t.visible)return null;for(var a=d.getComponentMethod("errorbars","makeComputeError")(t),i=new Array(e.length),n=0;n<e.length;n++){var s=a(+e[n],n);if(o.type==="log"){var c=o.c2l(e[n]),f=e[n]-s[0],g=e[n]+s[1];if(i[n]=[(o.c2l(f,!0)-c)*r,(o.c2l(g,!0)-c)*r],f>0){var v=o.c2l(f);o._lowerLogErrorBound||(o._lowerLogErrorBound=v),o._lowerErrorBound=Math.min(o._lowerLogErrorBound,v)}}else i[n]=[-s[0]*r,s[1]*r]}return i}function A(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function M(e,t,r){var o=[x(e.x,e.error_x,t[0],r.xaxis),x(e.y,e.error_y,t[1],r.yaxis),x(e.z,e.error_z,t[2],r.zaxis)],a=A(o);if(a===0)return null;for(var i=new Array(a),n=0;n<a;n++){for(var s=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(o[c])for(var f=0;f<2;f++)s[f][c]=o[c][n][f];i[n]=s}return i}q.exports=M}}),WN=Ze({"src/traces/scatter3d/convert.js"(Z,q){"use strict";var d=Yh().gl_line3d,x=Yh().gl_scatter3d,A=Yh().gl_error3d,M=Yh().gl_mesh3d,e=Yh().delaunay_triangulate,t=ca(),r=Qv(),o=em().formatColor,a=r1(),i=xE(),n=eT(),s=Wo(),c=Qp().appendArrayPointValue,f=HN();function g(P,L){this.scene=P,this.uid=L,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 v=g.prototype;v.handlePick=function(P){if(P.object&&(P.object===this.linePlot||P.object===this.delaunayMesh||P.object===this.textMarkers||P.object===this.scatterPlot)){var L=P.index=P.data.index;return P.object.highlight&&P.object.highlight(null),this.scatterPlot&&(P.object=this.scatterPlot,this.scatterPlot.highlight(P.data)),P.textLabel="",this.textLabels&&(t.isArrayOrTypedArray(this.textLabels)?(this.textLabels[L]||this.textLabels[L]===0)&&(P.textLabel=this.textLabels[L]):P.textLabel=this.textLabels),P.traceCoordinate=[this.data.x[L],this.data.y[L],this.data.z[L]],!0}};function T(P,L,z){var F=(z+1)%3,B=(z+2)%3,O=[],I=[],N;for(N=0;N<P.length;++N){var U=P[N];isNaN(U[F])||!isFinite(U[F])||isNaN(U[B])||!isFinite(U[B])||(O.push([U[F],U[B]]),I.push(N))}var W=e(O);for(N=0;N<W.length;++N)for(var Q=W[N],ue=0;ue<Q.length;++ue)Q[ue]=I[Q[ue]];return{positions:P,cells:W,meshColor:L}}function l(P){for(var L=[0,0,0],z=[[0,0,0],[0,0,0],[0,0,0]],F=[1,1,1],B=0;B<3;B++){var O=P[B];O&&O.copy_zstyle!==!1&&P[2].visible!==!1&&(O=P[2]),!(!O||!O.visible)&&(L[B]=O.width/2,z[B]=r(O.color),F[B]=O.thickness)}return{capSize:L,color:z,lineWidth:F}}function _(P){return P==null?0:P.indexOf("left")>-1?-1:P.indexOf("right")>-1?1:0}function w(P){return P==null?0:P.indexOf("top")>-1?-1:P.indexOf("bottom")>-1?1:0}function S(P){var L=0,z=0,F=[L,z];if(Array.isArray(P))for(var B=0;B<P.length;B++)F[B]=[L,z],P[B]&&(F[B][0]=_(P[B]),F[B][1]=w(P[B]));else F[0]=_(P),F[1]=w(P);return F}function E(P,L){return L(P*4)}function y(P){return n[P]}function b(P,L,z,F,B){var O=null;if(t.isArrayOrTypedArray(P)){O=[];for(var I=0;I<L;I++)P[I]===void 0?O[I]=F:O[I]=z(P[I],B)}else O=z(P,t.identity);return O}function p(P,L){var z=[],F=P.fullSceneLayout,B=P.dataScale,O=F.xaxis,I=F.yaxis,N=F.zaxis,U=L.marker,W=L.line,Q=L.x||[],ue=L.y||[],le=L.z||[],he=Q.length,G=L.xcalendar,$=L.ycalendar,J=L.zcalendar,X,oe,ie,j,ee,re;for(ee=0;ee<he;ee++)X=O.d2l(Q[ee],0,G)*B[0],oe=I.d2l(ue[ee],0,$)*B[1],ie=N.d2l(le[ee],0,J)*B[2],z[ee]=[X,oe,ie];if(Array.isArray(L.text))re=L.text;else if(t.isTypedArray(L.text))re=Array.from(L.text);else if(L.text!==void 0)for(re=new Array(he),ee=0;ee<he;ee++)re[ee]=L.text;function ce(st,Qe){var Lt=F[st];return s.tickText(Lt,Lt.d2l(Qe),!0).text}var be=L.texttemplate;if(be){var Ae=P.fullLayout,ze=Ae._d3locale,Re=Array.isArray(be),Xe=Re?Math.min(be.length,he):he,it=Re?function(st){return be[st]}:function(){return be};for(re=new Array(Xe),ee=0;ee<Xe;ee++){var ot={x:Q[ee],y:ue[ee],z:le[ee]},tt={xLabel:ce("xaxis",Q[ee]),yLabel:ce("yaxis",ue[ee]),zLabel:ce("zaxis",le[ee])},lt={};c(lt,L,ee);var Ee=L._meta||{};re[ee]=t.texttemplateString(it(ee),tt,ze,lt,ot,Ee)}}if(j={position:z,mode:L.mode,text:re},"line"in L&&(j.lineColor=o(W,1,he),j.lineWidth=W.width,j.lineDashes=W.dash),"marker"in L){var _e=a(L);j.scatterColor=o(U,1,he),j.scatterSize=b(U.size,he,E,20,_e),j.scatterMarker=b(U.symbol,he,y,"\u25CF"),j.scatterLineWidth=U.line.width,j.scatterLineColor=o(U.line,1,he),j.scatterAngle=0}"textposition"in L&&(j.textOffset=S(L.textposition),j.textColor=o(L.textfont,1,he),j.textSize=b(L.textfont.size,he,t.identity,12),j.textFontFamily=L.textfont.family,j.textFontWeight=L.textfont.weight,j.textFontStyle=L.textfont.style,j.textFontVariant=L.textfont.variant,j.textAngle=0);var fe=["x","y","z"];for(j.project=[!1,!1,!1],j.projectScale=[1,1,1],j.projectOpacity=[1,1,1],ee=0;ee<3;++ee){var Fe=L.projection[fe[ee]];(j.project[ee]=Fe.show)&&(j.projectOpacity[ee]=Fe.opacity,j.projectScale[ee]=Fe.scale)}j.errorBounds=f(L,B,F);var rt=l([L.error_x,L.error_y,L.error_z]);return j.errorColor=rt.color,j.errorLineWidth=rt.lineWidth,j.errorCapSize=rt.capSize,j.delaunayAxis=L.surfaceaxis,j.delaunayColor=r(L.surfacecolor),j}function u(P){if(t.isArrayOrTypedArray(P)){var L=P[0];return t.isArrayOrTypedArray(L)&&(P=L),"rgb("+P.slice(0,3).map(function(z){return Math.round(z*255)})+")"}return null}function m(P){return t.isArrayOrTypedArray(P)?P.length===4&&typeof P[0]=="number"?u(P):P.map(u):null}v.update=function(P){var L=this.scene.glplot.gl,z,F,B,O,I=i.solid;this.data=P;var N=p(this.scene,P);"mode"in N&&(this.mode=N.mode),"lineDashes"in N&&N.lineDashes in i&&(I=i[N.lineDashes]),this.color=m(N.scatterColor)||m(N.lineColor),this.dataPoints=N.position,z={gl:this.scene.glplot.gl,position:N.position,color:N.lineColor,lineWidth:N.lineWidth||1,dashes:I[0],dashScale:I[1],opacity:P.opacity,connectGaps:P.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(z):(this.linePlot=d(z),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var U=P.opacity;if(P.marker&&P.marker.opacity!==void 0&&(U*=P.marker.opacity),F={gl:this.scene.glplot.gl,position:N.position,color:N.scatterColor,size:N.scatterSize,glyph:N.scatterMarker,opacity:U,orthographic:!0,lineWidth:N.scatterLineWidth,lineColor:N.scatterLineColor,project:N.project,projectScale:N.projectScale,projectOpacity:N.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(F):(this.scatterPlot=x(F),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),O={gl:this.scene.glplot.gl,position:N.position,glyph:N.text,color:N.textColor,size:N.textSize,angle:N.textAngle,alignment:N.textOffset,font:N.textFontFamily,fontWeight:N.textFontWeight,fontStyle:N.textFontStyle,fontVariant:N.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:P.opacity},this.textLabels=P.hovertext||P.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(O):(this.textMarkers=x(O),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),B={gl:this.scene.glplot.gl,position:N.position,color:N.errorColor,error:N.errorBounds,lineWidth:N.errorLineWidth,capSize:N.errorCapSize,opacity:P.opacity},this.errorBars?N.errorBounds?this.errorBars.update(B):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):N.errorBounds&&(this.errorBars=A(B),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),N.delaunayAxis>=0){var W=T(N.position,N.delaunayColor,N.delaunayAxis);W.opacity=P.opacity,this.delaunayMesh?this.delaunayMesh.update(W):(W.gl=L,this.delaunayMesh=M(W),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)},v.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 h(P,L){var z=new g(P,L.uid);return z.update(L),z}q.exports=h}}),bE=Ze({"src/traces/scatter3d/attributes.js"(Z,q){"use strict";var d=tf(),x=tc(),A=Mu(),M=Qc().axisHoverFormat,e=Cs().hovertemplateAttrs,t=Cs().texttemplateAttrs,r=eu(),o=xE(),a=eT(),i=rs().extendFlat,n=pc().overrideAll,s=Km(),c=d.line,f=d.marker,g=f.line,v=i({width:c.width,dash:{valType:"enumerated",values:s(o),dflt:"solid"}},A("line"));function T(_){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 l=q.exports=n({x:d.x,y:d.y,z:{valType:"data_array"},text:i({},d.text,{}),texttemplate:t({},{}),hovertext:i({},d.hovertext,{}),hovertemplate:e(),xhoverformat:M("x"),yhoverformat:M("y"),zhoverformat:M("z"),mode:i({},d.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:T("x"),y:T("y"),z:T("z")},connectgaps:d.connectgaps,line:v,marker:i({symbol:{valType:"enumerated",values:s(a),dflt:"circle",arrayOk:!0},size:i({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:i({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:i({width:i({},g.width,{arrayOk:!1})},A("marker.line"))},A("marker")),textposition:i({},d.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:r.opacity,hoverinfo:i({},r.hoverinfo)},"calc","nested");l.x.editType=l.y.editType=l.z.editType="calc+clearAxisTypes"}}),XN=Ze({"src/traces/scatter3d/defaults.js"(Z,q){"use strict";var d=oo(),x=ca(),A=Fu(),M=md(),e=Dd(),t=zd(),r=bE();q.exports=function(i,n,s,c){function f(E,y){return x.coerce(i,n,r,E,y)}var g=o(i,n,f,c);if(!g){n.visible=!1;return}f("text"),f("hovertext"),f("hovertemplate"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),A.hasMarkers(n)&&M(i,n,s,c,f,{noSelect:!0,noAngle:!0}),A.hasLines(n)&&(f("connectgaps"),e(i,n,s,c,f)),A.hasText(n)&&(f("texttemplate"),t(i,n,c,f,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(n.line||{}).color,T=(n.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",v||T);for(var l=["x","y","z"],_=0;_<3;++_){var w="projection."+l[_];f(w+".show")&&(f(w+".opacity"),f(w+".scale"))}var S=d.getComponentMethod("errorbars","supplyDefaults");S(i,n,v||T||s,{axis:"z"}),S(i,n,v||T||s,{axis:"y",inherit:"z"}),S(i,n,v||T||s,{axis:"x",inherit:"z"})};function o(a,i,n,s){var c=0,f=n("x"),g=n("y"),v=n("z"),T=d.getComponentMethod("calendars","handleTraceDefaults");return T(a,i,["x","y","z"],s),f&&g&&v&&(c=Math.min(f.length,g.length,v.length),i._length=i._xlength=i._ylength=i._zlength=c),c}}}),ZN=Ze({"src/traces/scatter3d/calc.js"(Z,q){"use strict";var d=Av(),x=Fd();q.exports=function(M,e){var t=[{x:!1,y:!1,trace:e,t:{}}];return d(t,e),x(M,e),t}}}),YN=Ze({"node_modules/get-canvas-context/index.js"(Z,q){q.exports=d;function d(x,A){if(typeof x!="string")throw new TypeError("must specify type string");if(A=A||{},typeof document>"u"&&!A.canvas)return null;var M=A.canvas||document.createElement("canvas");typeof A.width=="number"&&(M.width=A.width),typeof A.height=="number"&&(M.height=A.height);var e=A,t;try{var r=[x];x.indexOf("webgl")===0&&r.push("experimental-"+x);for(var o=0;o<r.length;o++)if(t=M.getContext(r[o],e),t)return t}catch{t=null}return t||null}}}),KN=Ze({"node_modules/webgl-context/index.js"(Z,q){var d=YN();q.exports=function(A){return d("webgl",A)}}}),wE=Ze({"src/lib/show_no_webgl_msg.js"(Z,q){"use strict";var d=Yn(),x=function(){};q.exports=function(M){for(var e in M)typeof M[e]=="function"&&(M[e]=x);M.destroy=function(){M.container.parentNode.removeChild(M.container)};var t=document.createElement("div");t.className="no-webgl",t.style.cursor="pointer",t.style.fontSize="24px",t.style.color=d.defaults[0],t.style.position="absolute",t.style.left=t.style.top="0px",t.style.width=t.style.height="100%",t.style["background-color"]=d.lightLine,t.style["z-index"]=30;var r=document.createElement("p");return r.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",r.style.position="relative",r.style.top="50%",r.style.left="50%",r.style.height="30%",r.style.width="50%",r.style.margin="-15% 0 0 -25%",t.appendChild(r),M.container.appendChild(t),M.container.style.background="#FFFFFF",M.container.onclick=function(){window.open("https://get.webgl.org")},!1}}}),JN=Ze({"src/plots/gl3d/layout/convert.js"(Z,q){"use strict";var d=Qv(),x=ca(),A=["xaxis","yaxis","zaxis"];function M(){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 e=M.prototype;e.merge=function(r,o){for(var a=this,i=0;i<3;++i){var n=o[A[i]];if(!n.visible){a.tickEnable[i]=!1,a.labelEnable[i]=!1,a.lineEnable[i]=!1,a.lineTickEnable[i]=!1,a.gridEnable[i]=!1,a.zeroEnable[i]=!1,a.backgroundEnable[i]=!1;continue}a.labels[i]=r._meta?x.templateString(n.title.text,r._meta):n.title.text,"font"in n.title&&(n.title.font.color&&(a.labelColor[i]=d(n.title.font.color)),n.title.font.family&&(a.labelFont[i]=n.title.font.family),n.title.font.size&&(a.labelSize[i]=n.title.font.size),n.title.font.weight&&(a.labelFontWeight[i]=n.title.font.weight),n.title.font.style&&(a.labelFontStyle[i]=n.title.font.style),n.title.font.variant&&(a.labelFontVariant[i]=n.title.font.variant)),"showline"in n&&(a.lineEnable[i]=n.showline),"linecolor"in n&&(a.lineColor[i]=d(n.linecolor)),"linewidth"in n&&(a.lineWidth[i]=n.linewidth),"showgrid"in n&&(a.gridEnable[i]=n.showgrid),"gridcolor"in n&&(a.gridColor[i]=d(n.gridcolor)),"gridwidth"in n&&(a.gridWidth[i]=n.gridwidth),n.type==="log"?a.zeroEnable[i]=!1:"zeroline"in n&&(a.zeroEnable[i]=n.zeroline),"zerolinecolor"in n&&(a.zeroLineColor[i]=d(n.zerolinecolor)),"zerolinewidth"in n&&(a.zeroLineWidth[i]=n.zerolinewidth),"ticks"in n&&n.ticks?a.lineTickEnable[i]=!0:a.lineTickEnable[i]=!1,"ticklen"in n&&(a.lineTickLength[i]=a._defaultLineTickLength[i]=n.ticklen),"tickcolor"in n&&(a.lineTickColor[i]=d(n.tickcolor)),"tickwidth"in n&&(a.lineTickWidth[i]=n.tickwidth),"tickangle"in n&&(a.tickAngle[i]=n.tickangle==="auto"?-3600:Math.PI*-n.tickangle/180),"showticklabels"in n&&(a.tickEnable[i]=n.showticklabels),"tickfont"in n&&(n.tickfont.color&&(a.tickColor[i]=d(n.tickfont.color)),n.tickfont.family&&(a.tickFont[i]=n.tickfont.family),n.tickfont.size&&(a.tickSize[i]=n.tickfont.size),n.tickfont.weight&&(a.tickFontWeight[i]=n.tickfont.weight),n.tickfont.style&&(a.tickFontStyle[i]=n.tickfont.style),n.tickfont.variant&&(a.tickFontVariant[i]=n.tickfont.variant)),"mirror"in n?["ticks","all","allticks"].indexOf(n.mirror)!==-1?(a.lineTickMirror[i]=!0,a.lineMirror[i]=!0):n.mirror===!0?(a.lineTickMirror[i]=!1,a.lineMirror[i]=!0):(a.lineTickMirror[i]=!1,a.lineMirror[i]=!1):a.lineMirror[i]=!1,"showbackground"in n&&n.showbackground!==!1?(a.backgroundEnable[i]=!0,a.backgroundColor[i]=d(n.backgroundcolor)):a.backgroundEnable[i]=!1}};function t(r,o){var a=new M;return a.merge(r,o),a}q.exports=t}}),$N=Ze({"src/plots/gl3d/layout/spikes.js"(Z,q){"use strict";var d=Qv(),x=["xaxis","yaxis","zaxis"];function A(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var M=A.prototype;M.merge=function(t){for(var r=0;r<3;++r){var o=t[x[r]];if(!o.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=o.showspikes,this.colors[r]=d(o.spikecolor),this.drawSides[r]=o.spikesides,this.lineWidth[r]=o.spikethickness}};function e(t){var r=new A;return r.merge(t),r}q.exports=e}}),QN=Ze({"src/plots/gl3d/layout/tick_marks.js"(Z,q){"use strict";q.exports=t;var d=Wo(),x=ca(),A=["xaxis","yaxis","zaxis"],M=[0,0,0];function e(r){for(var o=new Array(3),a=0;a<3;++a){for(var i=r[a],n=new Array(i.length),s=0;s<i.length;++s)n[s]=i[s].x;o[a]=n}return o}function t(r){for(var o=r.axesOptions,a=r.glplot.axesPixels,i=r.fullSceneLayout,n=[[],[],[]],s=0;s<3;++s){var c=i[A[s]];if(c._length=(a[s].hi-a[s].lo)*a[s].pixelsPerDataUnit/r.dataScale[s],Math.abs(c._length)===1/0||isNaN(c._length))n[s]=[];else{c._input_range=c.range.slice(),c.range[0]=a[s].lo/r.dataScale[s],c.range[1]=a[s].hi/r.dataScale[s],c._m=1/(r.dataScale[s]*a[s].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var f=c.tickmode;if(c.tickmode==="auto"){c.tickmode="linear";var g=c.nticks||x.constrain(c._length/40,4,9);d.autoTicks(c,Math.abs(c.range[1]-c.range[0])/g)}for(var v=d.calcTicks(c,{msUTC:!0}),T=0;T<v.length;++T)v[T].x=v[T].x*r.dataScale[s],c.type==="date"&&(v[T].text=v[T].text.replace(/\<br\>/g," "));n[s]=v,c.tickmode=f}}o.ticks=n;for(var s=0;s<3;++s){M[s]=.5*(r.glplot.bounds[0][s]+r.glplot.bounds[1][s]);for(var T=0;T<2;++T)o.bounds[T][s]=r.glplot.bounds[T][s]}r.contourLevels=e(n)}}}),eU=Ze({"src/plots/gl3d/scene.js"(Z,q){"use strict";var d=Yh().gl_plot3d,x=d.createCamera,A=d.createScene,M=KN(),e=x2(),t=oo(),r=ca(),o=r.preserveDrawingBuffer(),a=Wo(),i=ef(),n=Qv(),s=wE(),c=N5(),f=JN(),g=$N(),v=QN(),T=Yd().applyAutorangeOptions,l,_,w=!1;function S(z,F){var B=document.createElement("div"),O=z.container;this.graphDiv=z.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",B.appendChild(I),this.svgContainer=I,B.id=z.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",O.appendChild(B),this.fullLayout=F,this.id=z.id||"scene",this.fullSceneLayout=F[this.id],this.plotArgs=[[],{},{}],this.axesOptions=f(F,F[this.id]),this.spikeOptions=g(F[this.id]),this.container=B,this.staticMode=!!z.staticPlot,this.pixelRatio=this.pixelRatio||z.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=t.getComponentMethod("annotations3d","convert"),this.drawAnnotations=t.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var E=S.prototype;E.prepareOptions=function(){var z=this,F={canvas:z.canvas,gl:z.gl,glOptions:{preserveDrawingBuffer:o,premultipliedAlpha:!0,antialias:!0},container:z.container,axes:z.axesOptions,spikes:z.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:z.camera,pixelRatio:z.pixelRatio};if(z.staticMode){if(!_&&(l=document.createElement("canvas"),_=M({canvas:l,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_))throw new Error("error creating static canvas/context for image server");F.gl=_,F.canvas=l}return F};var y=!0;E.tryCreatePlot=function(){var z=this,F=z.prepareOptions(),B=!0;try{z.glplot=A(F)}catch{if(z.staticMode||!y||o)B=!1;else{r.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{o=F.glOptions.preserveDrawingBuffer=!0,z.glplot=A(F)}catch{o=F.glOptions.preserveDrawingBuffer=!1,B=!1}}}return y=!1,B},E.initializeGLCamera=function(){var z=this,F=z.fullSceneLayout.camera,B=F.projection.type==="orthographic";z.camera=x(z.container,{center:[F.center.x,F.center.y,F.center.z],eye:[F.eye.x,F.eye.y,F.eye.z],up:[F.up.x,F.up.y,F.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},E.initializeGLPlot=function(){var z=this;z.initializeGLCamera();var F=z.tryCreatePlot();if(!F)return s(z);z.traces={},z.make4thDimension();var B=z.graphDiv,O=B.layout,I=function(){var U={};return z.isCameraChanged(O)&&(U[z.id+".camera"]=z.getCamera()),z.isAspectChanged(O)&&(U[z.id+".aspectratio"]=z.glplot.getAspectratio(),O[z.id].aspectmode!=="manual"&&(z.fullSceneLayout.aspectmode=O[z.id].aspectmode=U[z.id+".aspectmode"]="manual")),U},N=function(U){if(U.fullSceneLayout.dragmode!==!1){var W=I();U.saveLayout(O),U.graphDiv.emit("plotly_relayout",W)}};return z.glplot.canvas&&(z.glplot.canvas.addEventListener("mouseup",function(){N(z)}),z.glplot.canvas.addEventListener("touchstart",function(){w=!0}),z.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(z.camera._ortho){var W=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=z.glplot.getAspectratio();z.glplot.setAspectratio({x:W*Q.x,y:W*Q.y,z:W*Q.z})}N(z)}},e?{passive:!1}:!1),z.glplot.canvas.addEventListener("mousemove",function(){if(z.fullSceneLayout.dragmode!==!1&&z.camera.mouseListener.buttons!==0){var U=I();z.graphDiv.emit("plotly_relayouting",U)}}),z.staticMode||z.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:z.id})},!1)),z.glplot.oncontextloss=function(){z.recoverContext()},z.glplot.onrender=function(){z.render()},!0},E.render=function(){var z=this,F=z.graphDiv,B,O=z.svgContainer,I=z.container.getBoundingClientRect();F._fullLayout._calcInverseTransform(F);var N=F._fullLayout._invScaleX,U=F._fullLayout._invScaleY,W=I.width*N,Q=I.height*U;O.setAttributeNS(null,"viewBox","0 0 "+W+" "+Q),O.setAttributeNS(null,"width",W),O.setAttributeNS(null,"height",Q),v(z),z.glplot.axes.update(z.axesOptions);for(var ue=Object.keys(z.traces),le=null,he=z.glplot.selection,G=0;G<ue.length;++G)B=z.traces[ue[G]],B.data.hoverinfo!=="skip"&&B.handlePick(he)&&(le=B),B.setContourLevels&&B.setContourLevels();function $(Xe,it,ot){var tt=z.fullSceneLayout[Xe+"axis"];return tt.type!=="log"&&(it=tt.d2l(it)),a.hoverLabelText(tt,it,ot)}if(le!==null){var J=c(z.glplot.cameraParams,he.dataCoordinate);B=le.data;var X=F._fullData[B.index],oe=he.index,ie={xLabel:$("x",he.traceCoordinate[0],B.xhoverformat),yLabel:$("y",he.traceCoordinate[1],B.yhoverformat),zLabel:$("z",he.traceCoordinate[2],B.zhoverformat)},j=i.castHoverinfo(X,z.fullLayout,oe),ee=(j||"").split("+"),re=j&&j==="all";!X.hovertemplate&&!re&&(ee.indexOf("x")===-1&&(ie.xLabel=void 0),ee.indexOf("y")===-1&&(ie.yLabel=void 0),ee.indexOf("z")===-1&&(ie.zLabel=void 0),ee.indexOf("text")===-1&&(he.textLabel=void 0),ee.indexOf("name")===-1&&(le.name=void 0));var ce,be=[];B.type==="cone"||B.type==="streamtube"?(ie.uLabel=$("x",he.traceCoordinate[3],B.uhoverformat),(re||ee.indexOf("u")!==-1)&&be.push("u: "+ie.uLabel),ie.vLabel=$("y",he.traceCoordinate[4],B.vhoverformat),(re||ee.indexOf("v")!==-1)&&be.push("v: "+ie.vLabel),ie.wLabel=$("z",he.traceCoordinate[5],B.whoverformat),(re||ee.indexOf("w")!==-1)&&be.push("w: "+ie.wLabel),ie.normLabel=he.traceCoordinate[6].toPrecision(3),(re||ee.indexOf("norm")!==-1)&&be.push("norm: "+ie.normLabel),B.type==="streamtube"&&(ie.divergenceLabel=he.traceCoordinate[7].toPrecision(3),(re||ee.indexOf("divergence")!==-1)&&be.push("divergence: "+ie.divergenceLabel)),he.textLabel&&be.push(he.textLabel),ce=be.join("<br>")):B.type==="isosurface"||B.type==="volume"?(ie.valueLabel=a.hoverLabelText(z._mockAxis,z._mockAxis.d2l(he.traceCoordinate[3]),B.valuehoverformat),be.push("value: "+ie.valueLabel),he.textLabel&&be.push(he.textLabel),ce=be.join("<br>")):ce=he.textLabel;var Ae={x:he.traceCoordinate[0],y:he.traceCoordinate[1],z:he.traceCoordinate[2],data:X._input,fullData:X,curveNumber:X.index,pointNumber:oe};i.appendArrayPointValue(Ae,X,oe),B._module.eventData&&(Ae=X._module.eventData(Ae,he,X,{},oe));var ze={points:[Ae]};if(z.fullSceneLayout.hovermode){var Re=[];i.loneHover({trace:X,x:(.5+.5*J[0]/J[3])*W,y:(.5-.5*J[1]/J[3])*Q,xLabel:ie.xLabel,yLabel:ie.yLabel,zLabel:ie.zLabel,text:ce,name:le.name,color:i.castHoverOption(X,oe,"bgcolor")||le.color,borderColor:i.castHoverOption(X,oe,"bordercolor"),fontFamily:i.castHoverOption(X,oe,"font.family"),fontSize:i.castHoverOption(X,oe,"font.size"),fontColor:i.castHoverOption(X,oe,"font.color"),nameLength:i.castHoverOption(X,oe,"namelength"),textAlign:i.castHoverOption(X,oe,"align"),hovertemplate:r.castOption(X,oe,"hovertemplate"),hovertemplateLabels:r.extendFlat({},Ae,ie),eventData:[Ae]},{container:O,gd:F,inOut_bbox:Re}),Ae.bbox=Re[0]}he.distance<5&&(he.buttons||w)?F.emit("plotly_click",ze):F.emit("plotly_hover",ze),this.oldEventData=ze}else i.loneUnhover(O),this.oldEventData&&F.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;z.drawAnnotations(z)},E.recoverContext=function(){var z=this;z.glplot.dispose();var F=function(){if(z.glplot.gl.isContextLost()){requestAnimationFrame(F);return}if(!z.initializeGLPlot()){r.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}z.plot.apply(z,z.plotArgs)};requestAnimationFrame(F)};var b=["xaxis","yaxis","zaxis"];function p(z,F,B){for(var O=z.fullSceneLayout,I=0;I<3;I++){var N=b[I],U=N.charAt(0),W=O[N],Q=F[U],ue=F[U+"calendar"],le=F["_"+U+"length"];if(!r.isArrayOrTypedArray(Q))B[0][I]=Math.min(B[0][I],0),B[1][I]=Math.max(B[1][I],le-1);else for(var he,G=0;G<(le||Q.length);G++)if(r.isArrayOrTypedArray(Q[G]))for(var $=0;$<Q[G].length;++$)he=W.d2l(Q[G][$],0,ue),!isNaN(he)&&isFinite(he)&&(B[0][I]=Math.min(B[0][I],he),B[1][I]=Math.max(B[1][I],he));else he=W.d2l(Q[G],0,ue),!isNaN(he)&&isFinite(he)&&(B[0][I]=Math.min(B[0][I],he),B[1][I]=Math.max(B[1][I],he))}}function u(z,F){for(var B=z.fullSceneLayout,O=B.annotations||[],I=0;I<3;I++)for(var N=b[I],U=N.charAt(0),W=B[N],Q=0;Q<O.length;Q++){var ue=O[Q];if(ue.visible){var le=W.r2l(ue[U]);!isNaN(le)&&isFinite(le)&&(F[0][I]=Math.min(F[0][I],le),F[1][I]=Math.max(F[1][I],le))}}}E.plot=function(z,F,B){var O=this;if(O.plotArgs=[z,F,B],!O.glplot.contextLost){var I,N,U,W,Q,ue,le=F[O.id],he=B[O.id];O.fullLayout=F,O.fullSceneLayout=le,O.axesOptions.merge(F,le),O.spikeOptions.merge(le),O.setViewport(le),O.updateFx(le.dragmode,le.hovermode),O.camera.enableWheel=O.graphDiv._context._scrollZoom.gl3d,O.glplot.setClearColor(n(le.bgcolor)),O.setConvert(Q),z?Array.isArray(z)||(z=[z]):z=[];var G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(U=0;U<z.length;++U)I=z[U],!(I.visible!==!0||I._length===0)&&p(this,I,G);u(this,G);var $=[1,1,1];for(W=0;W<3;++W)G[1][W]===G[0][W]?$[W]=1:$[W]=1/(G[1][W]-G[0][W]);for(O.dataScale=$,O.convertAnnotations(this),U=0;U<z.length;++U)I=z[U],!(I.visible!==!0||I._length===0)&&(N=O.traces[I.uid],N?N.data.type===I.type?N.update(I):(N.dispose(),N=I._module.plot(this,I),O.traces[I.uid]=N):(N=I._module.plot(this,I),O.traces[I.uid]=N),N.name=I.name);var J=Object.keys(O.traces);e:for(U=0;U<J.length;++U){for(W=0;W<z.length;++W)if(z[W].uid===J[U]&&z[W].visible===!0&&z[W]._length!==0)continue e;N=O.traces[J[U]],N.dispose(),delete O.traces[J[U]]}O.glplot.objects.sort(function(Qe,Lt){return Qe._trace.data.index-Lt._trace.data.index});var X=[[0,0,0],[0,0,0]],oe=[],ie={};for(U=0;U<3;++U){Q=le[b[U]],ue=Q.type,ue in ie?(ie[ue].acc*=$[U],ie[ue].count+=1):ie[ue]={acc:$[U],count:1};var j;if(Q.autorange){X[0][U]=1/0,X[1][U]=-1/0;var ee=O.glplot.objects,re=O.fullSceneLayout.annotations||[],ce=Q._name.charAt(0);for(W=0;W<ee.length;W++){var be=ee[W],Ae=be.bounds,ze=be._trace.data._pad||0;be.constructor.name==="ErrorBars"&&Q._lowerLogErrorBound?X[0][U]=Math.min(X[0][U],Q._lowerLogErrorBound):X[0][U]=Math.min(X[0][U],Ae[0][U]/$[U]-ze),X[1][U]=Math.max(X[1][U],Ae[1][U]/$[U]+ze)}for(W=0;W<re.length;W++){var Re=re[W];if(Re.visible){var Xe=Q.r2l(Re[ce]);X[0][U]=Math.min(X[0][U],Xe),X[1][U]=Math.max(X[1][U],Xe)}}if("rangemode"in Q&&Q.rangemode==="tozero"&&(X[0][U]=Math.min(X[0][U],0),X[1][U]=Math.max(X[1][U],0)),X[0][U]>X[1][U])X[0][U]=-1,X[1][U]=1;else{var it=X[1][U]-X[0][U];X[0][U]-=it/32,X[1][U]+=it/32}if(j=[X[0][U],X[1][U]],j=T(j,Q),X[0][U]=j[0],X[1][U]=j[1],Q.isReversed()){var ot=X[0][U];X[0][U]=X[1][U],X[1][U]=ot}}else j=Q.range,X[0][U]=Q.r2l(j[0]),X[1][U]=Q.r2l(j[1]);X[0][U]===X[1][U]&&(X[0][U]-=1,X[1][U]+=1),oe[U]=X[1][U]-X[0][U],Q.range=[X[0][U],X[1][U]],Q.limitRange(),O.glplot.setBounds(U,{min:Q.range[0]*$[U],max:Q.range[1]*$[U]})}var tt,lt=le.aspectmode;if(lt==="cube")tt=[1,1,1];else if(lt==="manual"){var Ee=le.aspectratio;tt=[Ee.x,Ee.y,Ee.z]}else if(lt==="auto"||lt==="data"){var _e=[1,1,1];for(U=0;U<3;++U){Q=le[b[U]],ue=Q.type;var fe=ie[ue];_e[U]=Math.pow(fe.acc,1/fe.count)/$[U]}lt==="data"||Math.max.apply(null,_e)/Math.min.apply(null,_e)<=4?tt=_e:tt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");le.aspectratio.x=he.aspectratio.x=tt[0],le.aspectratio.y=he.aspectratio.y=tt[1],le.aspectratio.z=he.aspectratio.z=tt[2],O.glplot.setAspectratio(le.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:le.aspectratio.x,y:le.aspectratio.y,z:le.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=le.aspectmode);var Fe=le.domain||null,rt=F._size||null;if(Fe&&rt){var st=O.container.style;st.position="absolute",st.left=rt.l+Fe.x[0]*rt.w+"px",st.top=rt.t+(1-Fe.y[1])*rt.h+"px",st.width=rt.w*(Fe.x[1]-Fe.x[0])+"px",st.height=rt.h*(Fe.y[1]-Fe.y[0])+"px"}O.glplot.redraw()}},E.destroy=function(){var z=this;z.glplot&&(z.camera.mouseListener.enabled=!1,z.container.removeEventListener("wheel",z.camera.wheelListener),z.camera=null,z.glplot.dispose(),z.container.parentNode.removeChild(z.container),z.glplot=null)};function m(z){return[[z.eye.x,z.eye.y,z.eye.z],[z.center.x,z.center.y,z.center.z],[z.up.x,z.up.y,z.up.z]]}function h(z){return{up:{x:z.up[0],y:z.up[1],z:z.up[2]},center:{x:z.center[0],y:z.center[1],z:z.center[2]},eye:{x:z.eye[0],y:z.eye[1],z:z.eye[2]},projection:{type:z._ortho===!0?"orthographic":"perspective"}}}E.getCamera=function(){var z=this;return z.camera.view.recalcMatrix(z.camera.view.lastT()),h(z.camera)},E.setViewport=function(z){var F=this,B=z.camera;F.camera.lookAt.apply(this,m(B)),F.glplot.setAspectratio(z.aspectratio);var O=B.projection.type==="orthographic",I=F.camera._ortho;O!==I&&(F.glplot.redraw(),F.glplot.clearRGBA(),F.glplot.dispose(),F.initializeGLPlot())},E.isCameraChanged=function(z){var F=this,B=F.getCamera(),O=r.nestedProperty(z,F.id+".camera"),I=O.get();function N(ue,le,he,G){var $=["up","center","eye"],J=["x","y","z"];return le[$[he]]&&ue[$[he]][J[G]]===le[$[he]][J[G]]}var U=!1;if(I===void 0)U=!0;else{for(var W=0;W<3;W++)for(var Q=0;Q<3;Q++)if(!N(B,I,W,Q)){U=!0;break}(!I.projection||B.projection&&B.projection.type!==I.projection.type)&&(U=!0)}return U},E.isAspectChanged=function(z){var F=this,B=F.glplot.getAspectratio(),O=r.nestedProperty(z,F.id+".aspectratio"),I=O.get();return I===void 0||I.x!==B.x||I.y!==B.y||I.z!==B.z},E.saveLayout=function(z){var F=this,B=F.fullLayout,O,I,N,U,W,Q,ue=F.isCameraChanged(z),le=F.isAspectChanged(z),he=ue||le;if(he){var G={};if(ue&&(O=F.getCamera(),I=r.nestedProperty(z,F.id+".camera"),N=I.get(),G[F.id+".camera"]=N),le&&(U=F.glplot.getAspectratio(),W=r.nestedProperty(z,F.id+".aspectratio"),Q=W.get(),G[F.id+".aspectratio"]=Q),t.call("_storeDirectGUIEdit",z,B._preGUI,G),ue){I.set(O);var $=r.nestedProperty(B,F.id+".camera");$.set(O)}if(le){W.set(U);var J=r.nestedProperty(B,F.id+".aspectratio");J.set(U),F.glplot.redraw()}}return he},E.updateFx=function(z,F){var B=this,O=B.camera;if(O)if(z==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(z==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var I=B.graphDiv,N=I._fullLayout,U=B.fullSceneLayout.camera,W=U.up.x,Q=U.up.y,ue=U.up.z;if(ue/Math.sqrt(W*W+Q*Q+ue*ue)<.999){var le=B.id+".camera.up",he={x:0,y:0,z:1},G={};G[le]=he;var $=I.layout;t.call("_storeDirectGUIEdit",$,N._preGUI,G),U.up=he,r.nestedProperty($,le).set(he)}}else O.keyBindingMode=z;B.fullSceneLayout.hovermode=F};function P(z,F,B){for(var O=0,I=B-1;O<I;++O,--I)for(var N=0;N<F;++N)for(var U=0;U<4;++U){var W=4*(F*O+N)+U,Q=4*(F*I+N)+U,ue=z[W];z[W]=z[Q],z[Q]=ue}}function L(z,F,B){for(var O=0;O<B;++O)for(var I=0;I<F;++I){var N=4*(F*O+I),U=z[N+3];if(U>0)for(var W=255/U,Q=0;Q<3;++Q)z[N+Q]=Math.min(W*z[N+Q],255)}}E.toImage=function(z){var F=this;z||(z="png"),F.staticMode&&F.container.appendChild(l),F.glplot.redraw();var B=F.glplot.gl,O=B.drawingBufferWidth,I=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var N=new Uint8Array(O*I*4);B.readPixels(0,0,O,I,B.RGBA,B.UNSIGNED_BYTE,N),P(N,O,I),L(N,O,I);var U=document.createElement("canvas");U.width=O,U.height=I;var W=U.getContext("2d",{willReadFrequently:!0}),Q=W.createImageData(O,I);Q.data.set(N),W.putImageData(Q,0,0);var ue;switch(z){case"jpeg":ue=U.toDataURL("image/jpeg");break;case"webp":ue=U.toDataURL("image/webp");break;default:ue=U.toDataURL("image/png")}return F.staticMode&&F.container.removeChild(l),ue},E.setConvert=function(){for(var z=this,F=0;F<3;F++){var B=z.fullSceneLayout[b[F]];a.setConvert(B,z.fullLayout),B.setScale=r.noop}},E.make4thDimension=function(){var z=this,F=z.graphDiv,B=F._fullLayout;z._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(z._mockAxis,B)},q.exports=S}}),tU=Ze({"src/plots/gl3d/layout/attributes.js"(Z,q){"use strict";q.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),TE=Ze({"src/plots/gl3d/layout/axis_attributes.js"(Z,q){"use strict";var d=Yn(),x=Wh(),A=rs().extendFlat,M=pc().overrideAll;q.exports=M({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:d.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:A({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:A({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:A({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),AE=Ze({"src/plots/gl3d/layout/layout_attributes.js"(Z,q){"use strict";var d=TE(),x=bc().attributes,A=rs().extendFlat,M=ca().counterRegex;function e(t,r,o){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:o,editType:"camera"},editType:"camera"}}q.exports={_arrayAttrRegexps:[M("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:A(e(0,0,1),{}),center:A(e(0,0,0),{}),eye:A(e(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({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:d,yaxis:d,zaxis:d,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"}}}),rU=Ze({"src/plots/gl3d/layout/axis_defaults.js"(Z,q){"use strict";var d=Ch().mix,x=ca(),A=Dl(),M=TE(),e=O5(),t=z_(),r=["xaxis","yaxis","zaxis"],o=100*136/187;q.exports=function(i,n,s){var c,f;function g(l,_){return x.coerce(c,f,M,l,_)}for(var v=0;v<r.length;v++){var T=r[v];c=i[T]||{},f=A.newContainer(n,T),f._id=T[0]+s.scene,f._name=T,e(c,f,g,s),t(c,f,g,{font:s.font,letter:T[0],data:s.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:s.bgColor,calendar:s.calendar},s.fullLayout),g("gridcolor",d(f.color,s.bgColor,o).toRgbString()),g("title.text",T[0]),f.setScale=x.noop,g("showspikes")&&(g("spikesides"),g("spikethickness"),g("spikecolor",f.color)),g("showaxeslabels"),g("showbackground")&&g("backgroundcolor")}}}}),aU=Ze({"src/plots/gl3d/layout/defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=oo(),M=i0(),e=rU(),t=AE(),r=Hh().getSubplotData,o="gl3d";q.exports=function(n,s,c){var f=s._basePlotModules.length>1;function g(v){if(!f){var T=d.validate(n[v],t[v]);if(T)return n[v]}}M(n,s,c,{type:o,attributes:t,handleDefaults:a,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:g,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function a(i,n,s,c){for(var f=s("bgcolor"),g=x.combine(f,c.paper_bgcolor),v=["up","center","eye"],T=0;T<v.length;T++)s("camera."+v[T]+".x"),s("camera."+v[T]+".y"),s("camera."+v[T]+".z");s("camera.projection.type");var l=!!s("aspectratio.x")&&!!s("aspectratio.y")&&!!s("aspectratio.z"),_=l?"manual":"auto",w=s("aspectmode",_);l||(i.aspectratio=n.aspectratio={x:1,y:1,z:1},w==="manual"&&(n.aspectmode="auto"),i.aspectmode=n.aspectmode);var S=r(c.fullData,o,c.id);e(i,n,{font:c.font,scene:c.id,data:S,bgColor:g,calendar:c.calendar,autotypenumbersDflt:c.autotypenumbersDflt,fullLayout:c.fullLayout}),A.getComponentMethod("annotations3d","handleDefaults")(i,n,c);var E=c.getDfltFromLayout("dragmode");if(E!==!1&&!E)if(E="orbit",i.camera&&i.camera.up){var y=i.camera.up.x,b=i.camera.up.y,p=i.camera.up.z;p!==0&&(!y||!b||!p||p/Math.sqrt(y*y+b*b+p*p)>.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),p0=Ze({"src/plots/gl3d/index.js"(Z){"use strict";var q=pc().overrideAll,d=Xm(),x=eU(),A=Hh().getSubplotData,M=ca(),e=vd(),t="gl3d",r="scene";Z.name=t,Z.attr=r,Z.idRoot=r,Z.idRegex=Z.attrRegex=M.counterRegex("scene"),Z.attributes=tU(),Z.layoutAttributes=AE(),Z.baseLayoutAttrOverrides=q({hoverlabel:d.hoverlabel},"plot","nested"),Z.supplyLayoutDefaults=aU(),Z.plot=function(a){for(var i=a._fullLayout,n=a._fullData,s=i._subplots[t],c=0;c<s.length;c++){var f=s[c],g=A(n,t,f),v=i[f],T=v.camera,l=v._scene;l||(l=new x({id:f,graphDiv:a,container:a.querySelector(".gl-container"),staticPlot:a._context.staticPlot,plotGlPixelRatio:a._context.plotGlPixelRatio,camera:T},i),v._scene=l),l.viewInitial||(l.viewInitial={up:{x:T.up.x,y:T.up.y,z:T.up.z},eye:{x:T.eye.x,y:T.eye.y,z:T.eye.z},center:{x:T.center.x,y:T.center.y,z:T.center.z}}),l.plot(g,i,a.layout)}},Z.clean=function(o,a,i,n){for(var s=n._subplots[t]||[],c=0;c<s.length;c++){var f=s[c];!a[f]&&n[f]._scene&&(n[f]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+f).remove())}},Z.toSVG=function(o){for(var a=o._fullLayout,i=a._subplots[t],n=a._size,s=0;s<i.length;s++){var c=a[i[s]],f=c.domain,g=c._scene,v=g.toImage("png"),T=a._glimages.append("svg:image");T.attr({xmlns:e.svg,"xlink:href":v,x:n.l+n.w*f.x[0],y:n.t+n.h*(1-f.y[1]),width:n.w*(f.x[1]-f.x[0]),height:n.h*(f.y[1]-f.y[0]),preserveAspectRatio:"none"}),g.destroy()}},Z.cleanId=function(a){if(a.match(/^scene[0-9]*$/)){var i=a.substr(5);return i==="1"&&(i=""),r+i}},Z.updateFx=function(o){for(var a=o._fullLayout,i=a._subplots[t],n=0;n<i.length;n++){var s=a[i[n]]._scene;s.updateFx(a.dragmode,a.hovermode)}}}}),iU=Ze({"src/traces/scatter3d/index.js"(Z,q){"use strict";q.exports={plot:WN(),attributes:bE(),markerSymbols:eT(),supplyDefaults:XN(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:ZN(),moduleType:"trace",name:"scatter3d",basePlotModule:p0(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}}),nU=Ze({"lib/scatter3d.js"(Z,q){"use strict";q.exports=iU()}}),mx=Ze({"src/traces/surface/attributes.js"(Z,q){"use strict";var d=Yn(),x=Mu(),A=Qc().axisHoverFormat,M=Cs().hovertemplateAttrs,e=eu(),t=rs().extendFlat,r=pc().overrideAll;function o(n){return{valType:"boolean",dflt:!1}}function a(n){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:o("x"),y:o("y"),z:o("z")},color:{valType:"color",dflt:d.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:d.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=q.exports=r(t({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:M(),xhoverformat:A("x"),yhoverformat:A("y"),zhoverformat:A("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},x("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:a("x"),y:a("y"),z:a("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:t({},e.hoverinfo),showlegend:t({},e.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes"}}),SE=Ze({"src/traces/surface/defaults.js"(Z,q){"use strict";var d=oo(),x=ca(),A=gh(),M=mx(),e=.1;function t(i,n){for(var s=[],c=32,f=0;f<c;f++){var g=f/(c-1),v=n+(1-n)*(1-Math.pow(Math.sin(i*g*Math.PI),2));s.push([g,Math.max(0,Math.min(1,v))])}return s}function r(i){var n=0;if(!Array.isArray(i)||i.length<2||!i[0]||!i[i.length-1]||+i[0][0]!=0||+i[i.length-1][0]!=1)return!1;for(var s=0;s<i.length;s++){var c=i[s];if(c.length!==2||+c[0]<n)return!1;n=+c[0]}return!0}function o(i,n,s,c){var f,g;function v(u,m){return x.coerce(i,n,M,u,m)}var T=v("x"),l=v("y"),_=v("z");if(!_||!_.length||T&&T.length<1||l&&l.length<1){n.visible=!1;return}n._xlength=Array.isArray(T)&&x.isArrayOrTypedArray(T[0])?_.length:_[0].length,n._ylength=_.length;var w=d.getComponentMethod("calendars","handleTraceDefaults");w(i,n,["x","y","z"],c),v("text"),v("hovertext"),v("hovertemplate"),v("xhoverformat"),v("yhoverformat"),v("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(u){v(u)});var S=v("surfacecolor"),E=["x","y","z"];for(f=0;f<3;++f){var y="contours."+E[f],b=v(y+".show"),p=v(y+".highlight");if(b||p)for(g=0;g<3;++g)v(y+".project."+E[g]);b&&(v(y+".color"),v(y+".width"),v(y+".usecolormap")),p&&(v(y+".highlightcolor"),v(y+".highlightwidth")),v(y+".start"),v(y+".end"),v(y+".size")}A(i,n,c,v,{prefix:"",cLetter:"c"}),a(i,n,c,v),n._length=null}function a(i,n,s,c){var f=c("opacityscale");f==="max"?n.opacityscale=[[0,e],[1,1]]:f==="min"?n.opacityscale=[[0,1],[1,e]]:f==="extremes"?n.opacityscale=t(1,e):r(f)||(n.opacityscale=void 0)}q.exports={supplyDefaults:o,opacityscaleDefaults:a}}}),oU=Ze({"src/traces/surface/calc.js"(Z,q){"use strict";var d=wp();q.exports=function(A,M){M.surfacecolor?d(A,M,{vals:M.surfacecolor,containerStr:"",cLetter:"c"}):d(A,M,{vals:M.z,containerStr:"",cLetter:"c"})}}}),sU=Ze({"src/traces/surface/convert.js"(Z,q){"use strict";var d=Yh().gl_surface3d,x=Yh().ndarray,A=Yh().ndarray_linear_interpolate.d2,M=K2(),e=J2(),t=ca().isArrayOrTypedArray,r=em().parseColorScale,o=Qv(),a=rc().extractOpts;function i(m,h,P){this.scene=m,this.uid=P,this.surface=h,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 n=i.prototype;n.getXat=function(m,h,P,L){var z=t(this.data.x)?t(this.data.x[0])?this.data.x[h][m]:this.data.x[m]:m;return P===void 0?z:L.d2l(z,0,P)},n.getYat=function(m,h,P,L){var z=t(this.data.y)?t(this.data.y[0])?this.data.y[h][m]:this.data.y[h]:h;return P===void 0?z:L.d2l(z,0,P)},n.getZat=function(m,h,P,L){var z=this.data.z[h][m];return z===null&&this.data.connectgaps&&this.data._interpolatedZ&&(z=this.data._interpolatedZ[h][m]),P===void 0?z:L.d2l(z,0,P)},n.handlePick=function(m){if(m.object===this.surface){var h=(m.data.index[0]-1)/this.dataScaleX-1,P=(m.data.index[1]-1)/this.dataScaleY-1,L=Math.max(Math.min(Math.round(h),this.data.z[0].length-1),0),z=Math.max(Math.min(Math.round(P),this.data._ylength-1),0);m.index=[L,z],m.traceCoordinate=[this.getXat(L,z),this.getYat(L,z),this.getZat(L,z)],m.dataCoordinate=[this.getXat(L,z,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(L,z,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(L,z,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var F=0;F<3;F++){var B=m.dataCoordinate[F];B!=null&&(m.dataCoordinate[F]*=this.scene.dataScale[F])}var O=this.data.hovertext||this.data.text;return t(O)&&O[z]&&O[z][L]!==void 0?m.textLabel=O[z][L]:O?m.textLabel=O:m.textLabel="",m.data.dataCoordinate=m.dataCoordinate.slice(),this.surface.highlight(m.data),this.scene.glplot.spikes.position=m.dataCoordinate,!0}};function s(m){var h=m[0].rgb,P=m[m.length-1].rgb;return h[0]===P[0]&&h[1]===P[1]&&h[2]===P[2]&&h[3]===P[3]}var c=[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 f(m,h){if(m<h)return 0;for(var P=0;Math.floor(m%h)===0;)m/=h,P++;return P}function g(m){for(var h=[],P=0;P<c.length;P++){var L=c[P];h.push(f(m,L))}return h}function v(m){for(var h=g(m),P=m,L=0;L<c.length;L++)if(h[L]>0){P=c[L];break}return P}function T(m,h){if(!(m<1||h<1)){for(var P=g(m),L=g(h),z=1,F=0;F<c.length;F++)z*=Math.pow(c[F],Math.max(P[F],L[F]));return z}}function l(m){if(m.length!==0){for(var h=1,P=0;P<m.length;P++)h=T(h,m[P]);return h}}n.calcXnums=function(m){var h,P=[];for(h=1;h<m;h++){var L=this.getXat(h-1,0),z=this.getXat(h,0);z!==L&&L!==void 0&&L!==null&&z!==void 0&&z!==null?P[h-1]=Math.abs(z-L):P[h-1]=0}var F=0;for(h=1;h<m;h++)F+=P[h-1];for(h=1;h<m;h++)P[h-1]===0?P[h-1]=1:P[h-1]=Math.round(F/P[h-1]);return P},n.calcYnums=function(m){var h,P=[];for(h=1;h<m;h++){var L=this.getYat(0,h-1),z=this.getYat(0,h);z!==L&&L!==void 0&&L!==null&&z!==void 0&&z!==null?P[h-1]=Math.abs(z-L):P[h-1]=0}var F=0;for(h=1;h<m;h++)F+=P[h-1];for(h=1;h<m;h++)P[h-1]===0?P[h-1]=1:P[h-1]=Math.round(F/P[h-1]);return P};var _=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],w=_[9],S=_[13];n.estimateScale=function(m,h){for(var P=h===0?this.calcXnums(m):this.calcYnums(m),L=1+l(P);L<w;)L*=2;for(;L>S;)L--,L/=v(L),L++,L<w&&(L=S);var z=Math.round(L/m);return z>1?z:1};function E(m,h,P){var L=P[8]+P[2]*h[0]+P[5]*h[1];return m[0]=(P[6]+P[0]*h[0]+P[3]*h[1])/L,m[1]=(P[7]+P[1]*h[0]+P[4]*h[1])/L,m}function y(m,h,P){return b(m,h,E,P),m}function b(m,h,P,L){for(var z=[0,0],F=m.shape[0],B=m.shape[1],O=0;O<F;O++)for(var I=0;I<B;I++)P(z,[O,I],L),m.set(O,I,A(h,z[0],z[1]));return m}n.refineCoords=function(m){for(var h=this.dataScaleX,P=this.dataScaleY,L=m[0].shape[0],z=m[0].shape[1],F=Math.floor(m[0].shape[0]*h+1)|0,B=Math.floor(m[0].shape[1]*P+1)|0,O=1+L+1,I=1+z+1,N=x(new Float32Array(O*I),[O,I]),U=[1/h,0,0,0,1/P,0,0,0,1],W=0;W<m.length;++W){this.surface.padField(N,m[W]);var Q=x(new Float32Array(F*B),[F,B]);y(Q,N,U),m[W]=Q}};function p(m,h){for(var P=!1,L=0;L<m.length;L++)if(h===m[L]){P=!0;break}P===!1&&m.push(h)}n.setContourLevels=function(){var m=[[],[],[]],h=[!1,!1,!1],P=!1,L,z,F;for(L=0;L<3;++L)if(this.showContour[L]&&(P=!0,this.contourSize[L]>0&&this.contourStart[L]!==null&&this.contourEnd[L]!==null&&this.contourEnd[L]>this.contourStart[L]))for(h[L]=!0,z=this.contourStart[L];z<this.contourEnd[L];z+=this.contourSize[L])F=z*this.scene.dataScale[L],p(m[L],F);if(P){var B=[[],[],[]];for(L=0;L<3;++L)this.showContour[L]&&(B[L]=h[L]?m[L]:this.scene.contourLevels[L]);this.surface.update({levels:B})}},n.update=function(m){var h=this.scene,P=h.fullSceneLayout,L=this.surface,z=r(m),F=h.dataScale,B=m.z[0].length,O=m._ylength,I=h.contourLevels;this.data=m;var N,U,W,Q,ue=[];for(N=0;N<3;N++)for(ue[N]=[],U=0;U<B;U++)ue[N][U]=[];for(U=0;U<B;U++)for(W=0;W<O;W++)ue[0][U][W]=this.getXat(U,W,m.xcalendar,P.xaxis),ue[1][U][W]=this.getYat(U,W,m.ycalendar,P.yaxis),ue[2][U][W]=this.getZat(U,W,m.zcalendar,P.zaxis);if(m.connectgaps)for(m._emptypoints=e(ue[2]),M(ue[2],m._emptypoints),m._interpolatedZ=[],U=0;U<B;U++)for(m._interpolatedZ[U]=[],W=0;W<O;W++)m._interpolatedZ[U][W]=ue[2][U][W];for(N=0;N<3;N++)for(U=0;U<B;U++)for(W=0;W<O;W++)Q=ue[N][U][W],Q==null?ue[N][U][W]=NaN:Q=ue[N][U][W]*=F[N];for(N=0;N<3;N++)for(U=0;U<B;U++)for(W=0;W<O;W++)Q=ue[N][U][W],Q!=null&&(this.minValues[N]>Q&&(this.minValues[N]=Q),this.maxValues[N]<Q&&(this.maxValues[N]=Q));for(N=0;N<3;N++)this.objectOffset[N]=.5*(this.minValues[N]+this.maxValues[N]);for(N=0;N<3;N++)for(U=0;U<B;U++)for(W=0;W<O;W++)Q=ue[N][U][W],Q!=null&&(ue[N][U][W]-=this.objectOffset[N]);var le=[x(new Float32Array(B*O),[B,O]),x(new Float32Array(B*O),[B,O]),x(new Float32Array(B*O),[B,O])];for(N=0;N<3;N++)for(U=0;U<B;U++)for(W=0;W<O;W++)le[N].set(U,W,ue[N][U][W]);ue=[];var he={colormap:z,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!m.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:m.opacityscale,opacity:m.opacity},G=a(m);if(he.intensityBounds=[G.min,G.max],m.surfacecolor){var $=x(new Float32Array(B*O),[B,O]);for(U=0;U<B;U++)for(W=0;W<O;W++)$.set(U,W,m.surfacecolor[W][U]);le.push($)}else he.intensityBounds[0]*=F[2],he.intensityBounds[1]*=F[2];(S<le[0].shape[0]||S<le[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(le[0].shape[0],0),this.dataScaleY=this.estimateScale(le[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(le)),m.surfacecolor&&(he.intensity=le.pop());var J=[!0,!0,!0],X=["x","y","z"];for(N=0;N<3;++N){var oe=m.contours[X[N]];J[N]=oe.highlight,he.showContour[N]=oe.show||oe.highlight,he.showContour[N]&&(he.contourProject[N]=[oe.project.x,oe.project.y,oe.project.z],oe.show?(this.showContour[N]=!0,he.levels[N]=I[N],L.highlightColor[N]=he.contourColor[N]=o(oe.color),oe.usecolormap?L.highlightTint[N]=he.contourTint[N]=0:L.highlightTint[N]=he.contourTint[N]=1,he.contourWidth[N]=oe.width,this.contourStart[N]=oe.start,this.contourEnd[N]=oe.end,this.contourSize[N]=oe.size):(this.showContour[N]=!1,this.contourStart[N]=null,this.contourEnd[N]=null,this.contourSize[N]=0),oe.highlight&&(he.dynamicColor[N]=o(oe.highlightcolor),he.dynamicWidth[N]=oe.highlightwidth))}s(z)&&(he.vertexColor=!0),he.objectOffset=this.objectOffset,he.coords=le,L.update(he),L.visible=m.visible,L.enableDynamic=J,L.enableHighlight=J,L.snapToData=!0,"lighting"in m&&(L.ambientLight=m.lighting.ambient,L.diffuseLight=m.lighting.diffuse,L.specularLight=m.lighting.specular,L.roughness=m.lighting.roughness,L.fresnel=m.lighting.fresnel),"lightposition"in m&&(L.lightPosition=[m.lightposition.x,m.lightposition.y,m.lightposition.z])},n.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function u(m,h){var P=m.glplot.gl,L=d({gl:P}),z=new i(m,L,h.uid);return L._trace=z,z.update(h),m.glplot.add(L),z}q.exports=u}}),lU=Ze({"src/traces/surface/index.js"(Z,q){"use strict";q.exports={attributes:mx(),supplyDefaults:SE().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:oU(),plot:sU(),moduleType:"trace",name:"surface",basePlotModule:p0(),categories:["gl3d","2dMap","showLegend"],meta:{}}}}),uU=Ze({"lib/surface.js"(Z,q){"use strict";q.exports=lU()}}),M1=Ze({"src/traces/mesh3d/attributes.js"(Z,q){"use strict";var d=Mu(),x=Qc().axisHoverFormat,A=Cs().hovertemplateAttrs,M=mx(),e=eu(),t=rs().extendFlat;q.exports=t({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:A({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"}},d("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:M.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:t({},M.contours.x.show,{}),color:M.contours.x.color,width:M.contours.x.width,editType:"calc"},lightposition:{x:t({},M.lightposition.x,{dflt:1e5}),y:t({},M.lightposition.y,{dflt:1e5}),z:t({},M.lightposition.z,{dflt:0}),editType:"calc"},lighting:t({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},M.lighting),hoverinfo:t({},e.hoverinfo,{editType:"calc"}),showlegend:t({},e.showlegend,{dflt:!1})})}}),tT=Ze({"src/traces/isosurface/attributes.js"(Z,q){"use strict";var d=Mu(),x=Qc().axisHoverFormat,A=Cs().hovertemplateAttrs,M=M1(),e=eu(),t=rs().extendFlat,r=pc().overrideAll;function o(n){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function a(n){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var i=q.exports=r(t({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:o("x"),y:o("y"),z:o("z")},caps:{x:a("x"),y:a("y"),z:a("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:A(),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),valuehoverformat:x("value",1),showlegend:t({},e.showlegend,{dflt:!1})},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:M.opacity,lightposition:M.lightposition,lighting:M.lighting,flatshading:M.flatshading,contour:M.contour,hoverinfo:t({},e.hoverinfo)}),"calc","nested");i.flatshading.dflt=!0,i.lighting.facenormalsepsilon.dflt=0,i.x.editType=i.y.editType=i.z.editType=i.value.editType="calc+clearAxisTypes"}}),ME=Ze({"src/traces/isosurface/defaults.js"(Z,q){"use strict";var d=ca(),x=oo(),A=tT(),M=gh();function e(r,o,a,i){function n(s,c){return d.coerce(r,o,A,s,c)}t(r,o,a,i,n)}function t(r,o,a,i,n){var s=n("isomin"),c=n("isomax");c!=null&&s!==void 0&&s!==null&&s>c&&(o.isomin=null,o.isomax=null);var f=n("x"),g=n("y"),v=n("z"),T=n("value");if(!f||!f.length||!g||!g.length||!v||!v.length||!T||!T.length){o.visible=!1;return}var l=x.getComponentMethod("calendars","handleTraceDefaults");l(r,o,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(E){n(E+"hoverformat");var y="caps."+E,b=n(y+".show");b&&n(y+".fill");var p="slices."+E,u=n(p+".show");u&&(n(p+".fill"),n(p+".locations"))});var _=n("spaceframe.show");_&&n("spaceframe.fill");var w=n("surface.show");w&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var S=n("contour.show");S&&(n("contour.color"),n("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(E){n(E)}),M(r,o,i,n,{prefix:"",cLetter:"c"}),o._length=null}q.exports={supplyDefaults:e,supplyIsoDefaults:t}}}),rT=Ze({"src/traces/streamtube/calc.js"(Z,q){"use strict";var d=ca(),x=wp();function A(r,o){o._len=Math.min(o.u.length,o.v.length,o.w.length,o.x.length,o.y.length,o.z.length),o._u=t(o.u,o._len),o._v=t(o.v,o._len),o._w=t(o.w,o._len),o._x=t(o.x,o._len),o._y=t(o.y,o._len),o._z=t(o.z,o._len);var a=M(o);o._gridFill=a.fill,o._Xs=a.Xs,o._Ys=a.Ys,o._Zs=a.Zs,o._len=a.len;var i=0,n,s,c;o.starts&&(n=t(o.starts.x||[]),s=t(o.starts.y||[]),c=t(o.starts.z||[]),i=Math.min(n.length,s.length,c.length)),o._startsX=n||[],o._startsY=s||[],o._startsZ=c||[];var f=0,g=1/0,v;for(v=0;v<o._len;v++){var T=o._u[v],l=o._v[v],_=o._w[v],w=Math.sqrt(T*T+l*l+_*_);f=Math.max(f,w),g=Math.min(g,w)}for(x(r,o,{vals:[g,f],containerStr:"",cLetter:"c"}),v=0;v<i;v++){var S=n[v];a.xMax=Math.max(a.xMax,S),a.xMin=Math.min(a.xMin,S);var E=s[v];a.yMax=Math.max(a.yMax,E),a.yMin=Math.min(a.yMin,E);var y=c[v];a.zMax=Math.max(a.zMax,y),a.zMin=Math.min(a.zMin,y)}o._slen=i,o._normMax=f,o._xbnds=[a.xMin,a.xMax],o._ybnds=[a.yMin,a.yMax],o._zbnds=[a.zMin,a.zMax]}function M(r){var o=r._x,a=r._y,i=r._z,n=r._len,s,c,f,g=-1/0,v=1/0,T=-1/0,l=1/0,_=-1/0,w=1/0,S="",E,y,b,p,u,m,h,P,L;for(n&&(p=o[0],m=a[0],P=i[0]),n>1&&(u=o[n-1],h=a[n-1],L=i[n-1]),s=0;s<n;s++)g=Math.max(g,o[s]),v=Math.min(v,o[s]),T=Math.max(T,a[s]),l=Math.min(l,a[s]),_=Math.max(_,i[s]),w=Math.min(w,i[s]),!E&&o[s]!==p&&(E=!0,S+="x"),!y&&a[s]!==m&&(y=!0,S+="y"),!b&&i[s]!==P&&(b=!0,S+="z");E||(S+="x"),y||(S+="y"),b||(S+="z");var z=e(r._x),F=e(r._y),B=e(r._z);S=S.replace("x",(p>u?"-":"+")+"x"),S=S.replace("y",(m>h?"-":"+")+"y"),S=S.replace("z",(P>L?"-":"+")+"z");var O=function(){n=0,z=[],F=[],B=[]};(!n||n<z.length*F.length*B.length)&&O();var I=function(be){return be==="x"?o:be==="y"?a:i},N=function(be){return be==="x"?z:be==="y"?F:B},U=function(be){return be[n-1]<be[0]?-1:1},W=I(S[1]),Q=I(S[3]),ue=I(S[5]),le=N(S[1]).length,he=N(S[3]).length,G=N(S[5]).length,$=!1,J=function(be,Ae,ze){return le*(he*be+Ae)+ze},X=U(I(S[1])),oe=U(I(S[3])),ie=U(I(S[5]));for(s=0;s<G-1;s++){for(c=0;c<he-1;c++){for(f=0;f<le-1;f++){var j=J(s,c,f),ee=J(s,c,f+1),re=J(s,c+1,f),ce=J(s+1,c,f);if((!(W[j]*X<W[ee]*X)||!(Q[j]*oe<Q[re]*oe)||!(ue[j]*ie<ue[ce]*ie))&&($=!0),$)break}if($)break}if($)break}return $&&(d.warn("Encountered arbitrary coordinates! Unable to input data grid."),O()),{xMin:v,yMin:l,zMin:w,xMax:g,yMax:T,zMax:_,Xs:z,Ys:F,Zs:B,len:n,fill:S}}function e(r){return d.distinctVals(r).vals}function t(r,o){if(o===void 0&&(o=r.length),d.isTypedArray(r))return r.subarray(0,o);for(var a=[],i=0;i<o;i++)a[i]=+r[i];return a}q.exports={calc:A,filter:t,processGrid:M}}}),EE=Ze({"src/traces/isosurface/calc.js"(Z,q){"use strict";var d=wp(),x=rT().processGrid,A=rT().filter;q.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=A(t.x,t._len),t._y=A(t.y,t._len),t._z=A(t.z,t._len),t._value=A(t.value,t._len);var r=x(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;for(var o=1/0,a=-1/0,i=0;i<t._len;i++){var n=t._value[i];o=Math.min(o,n),a=Math.max(a,n)}t._minValues=o,t._maxValues=a,t._vMin=t.isomin===void 0||t.isomin===null?o:t.isomin,t._vMax=t.isomax===void 0||t.isomax===null?a:t.isomax,d(e,t,{vals:[t._vMin,t._vMax],containerStr:"",cLetter:"c"})}}}),E1=Ze({"src/plots/gl3d/zip3.js"(Z,q){"use strict";q.exports=function(x,A,M,e){e=e||x.length;for(var t=new Array(e),r=0;r<e;r++)t[r]=[x[r],A[r],M[r]];return t}}}),aT=Ze({"src/traces/isosurface/convert.js"(Z,q){"use strict";var d=Yh().gl_mesh3d,x=em().parseColorScale,A=ca().isArrayOrTypedArray,M=Qv(),e=rc().extractOpts,t=E1(),r=function(c,f){for(var g=f.length-1;g>0;g--){var v=Math.min(f[g],f[g-1]),T=Math.max(f[g],f[g-1]);if(T>v&&v<c&&c<=T)return{id:g,distRatio:(T-c)/(T-v)}}return{id:0,distRatio:0}};function o(c,f,g){this.scene=c,this.uid=g,this.mesh=f,this.name="",this.data=null,this.showContour=!1}var a=o.prototype;a.handlePick=function(c){if(c.object===this.mesh){var f=c.data.index,g=this.data._meshX[f],v=this.data._meshY[f],T=this.data._meshZ[f],l=this.data._Ys.length,_=this.data._Zs.length,w=r(g,this.data._Xs).id,S=r(v,this.data._Ys).id,E=r(T,this.data._Zs).id,y=c.index=E+_*S+_*l*w;c.traceCoordinate=[this.data._meshX[y],this.data._meshY[y],this.data._meshZ[y],this.data._value[y]];var b=this.data.hovertext||this.data.text;return A(b)&&b[y]!==void 0?c.textLabel=b[y]:b&&(c.textLabel=b),!0}},a.update=function(c){var f=this.scene,g=f.fullSceneLayout;this.data=n(c);function v(S,E,y,b){return E.map(function(p){return S.d2l(p,0,b)*y})}var T=t(v(g.xaxis,c._meshX,f.dataScale[0],c.xcalendar),v(g.yaxis,c._meshY,f.dataScale[1],c.ycalendar),v(g.zaxis,c._meshZ,f.dataScale[2],c.zcalendar)),l=t(c._meshI,c._meshJ,c._meshK),_={positions:T,cells:l,lightPosition:[c.lightposition.x,c.lightposition.y,c.lightposition.z],ambient:c.lighting.ambient,diffuse:c.lighting.diffuse,specular:c.lighting.specular,roughness:c.lighting.roughness,fresnel:c.lighting.fresnel,vertexNormalsEpsilon:c.lighting.vertexnormalsepsilon,faceNormalsEpsilon:c.lighting.facenormalsepsilon,opacity:c.opacity,contourEnable:c.contour.show,contourColor:M(c.contour.color).slice(0,3),contourWidth:c.contour.width,useFacetNormals:c.flatshading},w=e(c);_.vertexIntensity=c._meshIntensity,_.vertexIntensityBounds=[w.min,w.max],_.colormap=x(c),this.mesh.update(_)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var i=["xyz","xzy","yxz","yzx","zxy","zyx"];function n(c){c._meshI=[],c._meshJ=[],c._meshK=[];var f=c.surface.show,g=c.spaceframe.show,v=c.surface.fill,T=c.spaceframe.fill,l=!1,_=!1,w=0,S,E,y=c._Xs,b=c._Ys,p=c._Zs,u=y.length,m=b.length,h=p.length,P=i.indexOf(c._gridFill.replace(/-/g,"").replace(/\+/g,"")),L=function(bt,Be,Ke){switch(P){case 5:return Ke+h*Be+h*m*bt;case 4:return Ke+h*bt+h*u*Be;case 3:return Be+m*Ke+m*h*bt;case 2:return Be+m*bt+m*u*Ke;case 1:return bt+u*Ke+u*h*Be;default:return bt+u*Be+u*m*Ke}},z=c._minValues,F=c._maxValues,B=c._vMin,O=c._vMax,I,N,U,W;function Q(bt,Be,Ke){for(var Ue=W.length,Me=E;Me<Ue;Me++)if(bt===I[Me]&&Be===N[Me]&&Ke===U[Me])return Me;return-1}function ue(){E=S}function le(){I=[],N=[],U=[],W=[],S=0,ue()}function he(bt,Be,Ke,Ue){return I.push(bt),N.push(Be),U.push(Ke),W.push(Ue),S++,S-1}function G(bt,Be,Ke){return c._meshI.push(bt),c._meshJ.push(Be),c._meshK.push(Ke),w++,w-1}function $(bt,Be,Ke){for(var Ue=[],Me=0;Me<bt.length;Me++)Ue[Me]=(bt[Me]+Be[Me]+Ke[Me])/3;return Ue}function J(bt,Be,Ke){for(var Ue=[],Me=0;Me<bt.length;Me++)Ue[Me]=bt[Me]*(1-Ke)+Ke*Be[Me];return Ue}var X;function oe(bt){X=bt}function ie(bt,Be){var Ke=bt[0],Ue=bt[1],Me=bt[2],qe=$(Ke,Ue,Me),Ce=Math.sqrt(1-X),Te=J(qe,Ke,Ce),Pe=J(qe,Ue,Ce),at=J(qe,Me,Ce),yt=Be[0],Tt=Be[1],Ot=Be[2];return{xyzv:[[Ke,Ue,Pe],[Pe,Te,Ke],[Ue,Me,at],[at,Pe,Ue],[Me,Ke,Te],[Te,at,Me]],abc:[[yt,Tt,-1],[-1,-1,yt],[Tt,Ot,-1],[-1,-1,Tt],[Ot,yt,-1],[-1,-1,Ot]]}}function j(bt,Be){return bt==="all"||bt===null?!0:bt.indexOf(Be)>-1}function ee(bt,Be){return bt===null?Be:bt}function re(bt,Be,Ke){ue();var Ue=[Be],Me=[Ke];if(X>=1)Ue=[Be],Me=[Ke];else if(X>0){var qe=ie(Be,Ke);Ue=qe.xyzv,Me=qe.abc}for(var Ce=0;Ce<Ue.length;Ce++){Be=Ue[Ce],Ke=Me[Ce];for(var Te=[],Pe=0;Pe<3;Pe++){var at=Be[Pe][0],yt=Be[Pe][1],Tt=Be[Pe][2],Ot=Be[Pe][3],Gt=Ke[Pe]>-1?Ke[Pe]:Q(at,yt,Tt);Gt>-1?Te[Pe]=Gt:Te[Pe]=he(at,yt,Tt,ee(bt,Ot))}G(Te[0],Te[1],Te[2])}}function ce(bt,Be,Ke){var Ue=function(Me,qe,Ce){re(bt,[Be[Me],Be[qe],Be[Ce]],[Ke[Me],Ke[qe],Ke[Ce]])};Ue(0,1,2),Ue(2,3,0)}function be(bt,Be,Ke){var Ue=function(Me,qe,Ce){re(bt,[Be[Me],Be[qe],Be[Ce]],[Ke[Me],Ke[qe],Ke[Ce]])};Ue(0,1,2),Ue(3,0,1),Ue(2,3,0),Ue(1,2,3)}function Ae(bt,Be,Ke,Ue){var Me=bt[3];Me<Ke&&(Me=Ke),Me>Ue&&(Me=Ue);for(var qe=(bt[3]-Me)/(bt[3]-Be[3]+1e-9),Ce=[],Te=0;Te<4;Te++)Ce[Te]=(1-qe)*bt[Te]+qe*Be[Te];return Ce}function ze(bt,Be,Ke){return bt>=Be&&bt<=Ke}function Re(bt){var Be=.001*(O-B);return bt>=B-Be&&bt<=O+Be}function Xe(bt){for(var Be=[],Ke=0;Ke<4;Ke++){var Ue=bt[Ke];Be.push([c._x[Ue],c._y[Ue],c._z[Ue],c._value[Ue]])}return Be}var it=3;function ot(bt,Be,Ke,Ue,Me,qe){qe||(qe=1),Ke=[-1,-1,-1];var Ce=!1,Te=[ze(Be[0][3],Ue,Me),ze(Be[1][3],Ue,Me),ze(Be[2][3],Ue,Me)];if(!Te[0]&&!Te[1]&&!Te[2])return!1;var Pe=function(yt,Tt,Ot){return Re(Tt[0][3])&&Re(Tt[1][3])&&Re(Tt[2][3])?(re(yt,Tt,Ot),!0):qe<it?ot(yt,Tt,Ot,B,O,++qe):!1};if(Te[0]&&Te[1]&&Te[2])return Pe(bt,Be,Ke)||Ce;var at=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(yt){if(Te[yt[0]]&&Te[yt[1]]&&!Te[yt[2]]){var Tt=Be[yt[0]],Ot=Be[yt[1]],Gt=Be[yt[2]],rr=Ae(Gt,Tt,Ue,Me),Qt=Ae(Gt,Ot,Ue,Me);Ce=Pe(bt,[Qt,rr,Tt],[-1,-1,Ke[yt[0]]])||Ce,Ce=Pe(bt,[Tt,Ot,Qt],[Ke[yt[0]],Ke[yt[1]],-1])||Ce,at=!0}}),at||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(yt){if(Te[yt[0]]&&!Te[yt[1]]&&!Te[yt[2]]){var Tt=Be[yt[0]],Ot=Be[yt[1]],Gt=Be[yt[2]],rr=Ae(Ot,Tt,Ue,Me),Qt=Ae(Gt,Tt,Ue,Me);Ce=Pe(bt,[Qt,rr,Tt],[-1,-1,Ke[yt[0]]])||Ce,at=!0}}),Ce}function tt(bt,Be,Ke,Ue){var Me=!1,qe=Xe(Be),Ce=[ze(qe[0][3],Ke,Ue),ze(qe[1][3],Ke,Ue),ze(qe[2][3],Ke,Ue),ze(qe[3][3],Ke,Ue)];if(!Ce[0]&&!Ce[1]&&!Ce[2]&&!Ce[3])return Me;if(Ce[0]&&Ce[1]&&Ce[2]&&Ce[3])return _&&(Me=be(bt,qe,Be)||Me),Me;var Te=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Pe){if(Ce[Pe[0]]&&Ce[Pe[1]]&&Ce[Pe[2]]&&!Ce[Pe[3]]){var at=qe[Pe[0]],yt=qe[Pe[1]],Tt=qe[Pe[2]],Ot=qe[Pe[3]];if(_)Me=re(bt,[at,yt,Tt],[Be[Pe[0]],Be[Pe[1]],Be[Pe[2]]])||Me;else{var Gt=Ae(Ot,at,Ke,Ue),rr=Ae(Ot,yt,Ke,Ue),Qt=Ae(Ot,Tt,Ke,Ue);Me=re(null,[Gt,rr,Qt],[-1,-1,-1])||Me}Te=!0}}),Te||([[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(Pe){if(Ce[Pe[0]]&&Ce[Pe[1]]&&!Ce[Pe[2]]&&!Ce[Pe[3]]){var at=qe[Pe[0]],yt=qe[Pe[1]],Tt=qe[Pe[2]],Ot=qe[Pe[3]],Gt=Ae(Tt,at,Ke,Ue),rr=Ae(Tt,yt,Ke,Ue),Qt=Ae(Ot,yt,Ke,Ue),Tr=Ae(Ot,at,Ke,Ue);_?(Me=re(bt,[at,Tr,Gt],[Be[Pe[0]],-1,-1])||Me,Me=re(bt,[yt,rr,Qt],[Be[Pe[1]],-1,-1])||Me):Me=ce(null,[Gt,rr,Qt,Tr],[-1,-1,-1,-1])||Me,Te=!0}}),Te)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Pe){if(Ce[Pe[0]]&&!Ce[Pe[1]]&&!Ce[Pe[2]]&&!Ce[Pe[3]]){var at=qe[Pe[0]],yt=qe[Pe[1]],Tt=qe[Pe[2]],Ot=qe[Pe[3]],Gt=Ae(yt,at,Ke,Ue),rr=Ae(Tt,at,Ke,Ue),Qt=Ae(Ot,at,Ke,Ue);_?(Me=re(bt,[at,Gt,rr],[Be[Pe[0]],-1,-1])||Me,Me=re(bt,[at,rr,Qt],[Be[Pe[0]],-1,-1])||Me,Me=re(bt,[at,Qt,Gt],[Be[Pe[0]],-1,-1])||Me):Me=re(null,[Gt,rr,Qt],[-1,-1,-1])||Me,Te=!0}}),Me}function lt(bt,Be,Ke,Ue,Me,qe,Ce,Te,Pe,at,yt){var Tt=!1;return l&&(j(bt,"A")&&(Tt=tt(null,[Be,Ke,Ue,qe],at,yt)||Tt),j(bt,"B")&&(Tt=tt(null,[Ke,Ue,Me,Pe],at,yt)||Tt),j(bt,"C")&&(Tt=tt(null,[Ke,qe,Ce,Pe],at,yt)||Tt),j(bt,"D")&&(Tt=tt(null,[Ue,qe,Te,Pe],at,yt)||Tt),j(bt,"E")&&(Tt=tt(null,[Ke,Ue,qe,Pe],at,yt)||Tt)),_&&(Tt=tt(bt,[Ke,Ue,qe,Pe],at,yt)||Tt),Tt}function Ee(bt,Be,Ke,Ue,Me,qe,Ce,Te){return[Te[0]===!0?!0:ot(bt,Xe([Be,Ke,Ue]),[Be,Ke,Ue],qe,Ce),Te[1]===!0?!0:ot(bt,Xe([Ue,Me,Be]),[Ue,Me,Be],qe,Ce)]}function _e(bt,Be,Ke,Ue,Me,qe,Ce,Te,Pe){return Te?Ee(bt,Be,Ke,Me,Ue,qe,Ce,Pe):Ee(bt,Ke,Me,Ue,Be,qe,Ce,Pe)}function fe(bt,Be,Ke,Ue,Me,qe,Ce){var Te=!1,Pe,at,yt,Tt,Ot=function(){Te=ot(bt,[Pe,at,yt],[-1,-1,-1],Me,qe)||Te,Te=ot(bt,[yt,Tt,Pe],[-1,-1,-1],Me,qe)||Te},Gt=Ce[0],rr=Ce[1],Qt=Ce[2];return Gt&&(Pe=J(Xe([L(Be,Ke-0,Ue-0)])[0],Xe([L(Be-1,Ke-0,Ue-0)])[0],Gt),at=J(Xe([L(Be,Ke-0,Ue-1)])[0],Xe([L(Be-1,Ke-0,Ue-1)])[0],Gt),yt=J(Xe([L(Be,Ke-1,Ue-1)])[0],Xe([L(Be-1,Ke-1,Ue-1)])[0],Gt),Tt=J(Xe([L(Be,Ke-1,Ue-0)])[0],Xe([L(Be-1,Ke-1,Ue-0)])[0],Gt),Ot()),rr&&(Pe=J(Xe([L(Be-0,Ke,Ue-0)])[0],Xe([L(Be-0,Ke-1,Ue-0)])[0],rr),at=J(Xe([L(Be-0,Ke,Ue-1)])[0],Xe([L(Be-0,Ke-1,Ue-1)])[0],rr),yt=J(Xe([L(Be-1,Ke,Ue-1)])[0],Xe([L(Be-1,Ke-1,Ue-1)])[0],rr),Tt=J(Xe([L(Be-1,Ke,Ue-0)])[0],Xe([L(Be-1,Ke-1,Ue-0)])[0],rr),Ot()),Qt&&(Pe=J(Xe([L(Be-0,Ke-0,Ue)])[0],Xe([L(Be-0,Ke-0,Ue-1)])[0],Qt),at=J(Xe([L(Be-0,Ke-1,Ue)])[0],Xe([L(Be-0,Ke-1,Ue-1)])[0],Qt),yt=J(Xe([L(Be-1,Ke-1,Ue)])[0],Xe([L(Be-1,Ke-1,Ue-1)])[0],Qt),Tt=J(Xe([L(Be-1,Ke-0,Ue)])[0],Xe([L(Be-1,Ke-0,Ue-1)])[0],Qt),Ot()),Te}function Fe(bt,Be,Ke,Ue,Me,qe,Ce,Te,Pe,at,yt,Tt){var Ot=bt;return Tt?(l&&bt==="even"&&(Ot=null),lt(Ot,Be,Ke,Ue,Me,qe,Ce,Te,Pe,at,yt)):(l&&bt==="odd"&&(Ot=null),lt(Ot,Pe,Te,Ce,qe,Me,Ue,Ke,Be,at,yt))}function rt(bt,Be,Ke,Ue,Me){for(var qe=[],Ce=0,Te=0;Te<Be.length;Te++)for(var Pe=Be[Te],at=1;at<h;at++)for(var yt=1;yt<m;yt++)qe.push(_e(bt,L(Pe,yt-1,at-1),L(Pe,yt-1,at),L(Pe,yt,at-1),L(Pe,yt,at),Ke,Ue,(Pe+yt+at)%2,Me&&Me[Ce]?Me[Ce]:[])),Ce++;return qe}function st(bt,Be,Ke,Ue,Me){for(var qe=[],Ce=0,Te=0;Te<Be.length;Te++)for(var Pe=Be[Te],at=1;at<u;at++)for(var yt=1;yt<h;yt++)qe.push(_e(bt,L(at-1,Pe,yt-1),L(at,Pe,yt-1),L(at-1,Pe,yt),L(at,Pe,yt),Ke,Ue,(at+Pe+yt)%2,Me&&Me[Ce]?Me[Ce]:[])),Ce++;return qe}function Qe(bt,Be,Ke,Ue,Me){for(var qe=[],Ce=0,Te=0;Te<Be.length;Te++)for(var Pe=Be[Te],at=1;at<m;at++)for(var yt=1;yt<u;yt++)qe.push(_e(bt,L(yt-1,at-1,Pe),L(yt-1,at,Pe),L(yt,at-1,Pe),L(yt,at,Pe),Ke,Ue,(yt+at+Pe)%2,Me&&Me[Ce]?Me[Ce]:[])),Ce++;return qe}function Lt(bt,Be,Ke){for(var Ue=1;Ue<h;Ue++)for(var Me=1;Me<m;Me++)for(var qe=1;qe<u;qe++)Fe(bt,L(qe-1,Me-1,Ue-1),L(qe-1,Me-1,Ue),L(qe-1,Me,Ue-1),L(qe-1,Me,Ue),L(qe,Me-1,Ue-1),L(qe,Me-1,Ue),L(qe,Me,Ue-1),L(qe,Me,Ue),Be,Ke,(qe+Me+Ue)%2)}function kt(bt,Be,Ke){_=!0,Lt(bt,Be,Ke),_=!1}function Vt(bt,Be,Ke){l=!0,Lt(bt,Be,Ke),l=!1}function Zt(bt,Be,Ke,Ue,Me,qe){for(var Ce=[],Te=0,Pe=0;Pe<Be.length;Pe++)for(var at=Be[Pe],yt=1;yt<h;yt++)for(var Tt=1;Tt<m;Tt++)Ce.push(fe(bt,at,Tt,yt,Ke,Ue,Me[Pe],qe&&qe[Te]?qe[Te]:[])),Te++;return Ce}function Sr(bt,Be,Ke,Ue,Me,qe){for(var Ce=[],Te=0,Pe=0;Pe<Be.length;Pe++)for(var at=Be[Pe],yt=1;yt<u;yt++)for(var Tt=1;Tt<h;Tt++)Ce.push(fe(bt,yt,at,Tt,Ke,Ue,Me[Pe],qe&&qe[Te]?qe[Te]:[])),Te++;return Ce}function xr(bt,Be,Ke,Ue,Me,qe){for(var Ce=[],Te=0,Pe=0;Pe<Be.length;Pe++)for(var at=Be[Pe],yt=1;yt<m;yt++)for(var Tt=1;Tt<u;Tt++)Ce.push(fe(bt,Tt,yt,at,Ke,Ue,Me[Pe],qe&&qe[Te]?qe[Te]:[])),Te++;return Ce}function jr(bt,Be){for(var Ke=[],Ue=bt;Ue<Be;Ue++)Ke.push(Ue);return Ke}function wr(){for(var bt=0;bt<u;bt++)for(var Be=0;Be<m;Be++)for(var Ke=0;Ke<h;Ke++){var Ue=L(bt,Be,Ke);he(c._x[Ue],c._y[Ue],c._z[Ue],c._value[Ue])}}function Ir(){le(),wr();var bt=null;if(g&&T&&(oe(T),kt(bt,B,O)),f&&v){oe(v);for(var Be=c.surface.pattern,Ke=c.surface.count,Ue=0;Ue<Ke;Ue++){var Me=Ke===1?.5:Ue/(Ke-1),qe=(1-Me)*B+Me*O,Ce=Math.abs(qe-z),Te=Math.abs(qe-F),Pe=Ce>Te?[z,qe]:[qe,F];Vt(Be,Pe[0],Pe[1])}}var at=[[Math.min(B,F),Math.max(B,F)],[Math.min(z,O),Math.max(z,O)]];["x","y","z"].forEach(function(yt){for(var Tt=[],Ot=0;Ot<at.length;Ot++){var Gt=0,rr=at[Ot][0],Qt=at[Ot][1],Tr=c.slices[yt];if(Tr.show&&Tr.fill){oe(Tr.fill);var la=[],Ua=[],Ba=[];if(Tr.locations.length)for(var Ra=0;Ra<Tr.locations.length;Ra++){var ei=r(Tr.locations[Ra],yt==="x"?y:yt==="y"?b:p);ei.distRatio===0?la.push(ei.id):ei.id>0&&(Ua.push(ei.id),yt==="x"?Ba.push([ei.distRatio,0,0]):yt==="y"?Ba.push([0,ei.distRatio,0]):Ba.push([0,0,ei.distRatio]))}else yt==="x"?la=jr(1,u-1):yt==="y"?la=jr(1,m-1):la=jr(1,h-1);Ua.length>0&&(yt==="x"?Tt[Gt]=Zt(bt,Ua,rr,Qt,Ba,Tt[Gt]):yt==="y"?Tt[Gt]=Sr(bt,Ua,rr,Qt,Ba,Tt[Gt]):Tt[Gt]=xr(bt,Ua,rr,Qt,Ba,Tt[Gt]),Gt++),la.length>0&&(yt==="x"?Tt[Gt]=rt(bt,la,rr,Qt,Tt[Gt]):yt==="y"?Tt[Gt]=st(bt,la,rr,Qt,Tt[Gt]):Tt[Gt]=Qe(bt,la,rr,Qt,Tt[Gt]),Gt++)}var za=c.caps[yt];za.show&&za.fill&&(oe(za.fill),yt==="x"?Tt[Gt]=rt(bt,[0,u-1],rr,Qt,Tt[Gt]):yt==="y"?Tt[Gt]=st(bt,[0,m-1],rr,Qt,Tt[Gt]):Tt[Gt]=Qe(bt,[0,h-1],rr,Qt,Tt[Gt]),Gt++)}}),w===0&&le(),c._meshX=I,c._meshY=N,c._meshZ=U,c._meshIntensity=W,c._Xs=y,c._Ys=b,c._Zs=p}return Ir(),c}function s(c,f){var g=c.glplot.gl,v=d({gl:g}),T=new o(c,v,f.uid);return v._trace=T,T.update(f),c.glplot.add(v),T}q.exports={findNearestOnAxis:r,generateIsoMeshes:n,createIsosurfaceTrace:s}}}),cU=Ze({"src/traces/isosurface/index.js"(Z,q){"use strict";q.exports={attributes:tT(),supplyDefaults:ME().supplyDefaults,calc:EE(),colorbar:{min:"cmin",max:"cmax"},plot:aT().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:p0(),categories:["gl3d","showLegend"],meta:{}}}}),fU=Ze({"lib/isosurface.js"(Z,q){"use strict";q.exports=cU()}}),CE=Ze({"src/traces/volume/attributes.js"(Z,q){"use strict";var d=Mu(),x=tT(),A=mx(),M=eu(),e=rs().extendFlat,t=pc().overrideAll,r=q.exports=t(e({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate},d("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:A.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:e({},M.hoverinfo),showlegend:e({},M.showlegend,{dflt:!1})}),"calc","nested");r.x.editType=r.y.editType=r.z.editType=r.value.editType="calc+clearAxisTypes"}}),hU=Ze({"src/traces/volume/defaults.js"(Z,q){"use strict";var d=ca(),x=CE(),A=ME().supplyIsoDefaults,M=SE().opacityscaleDefaults;q.exports=function(t,r,o,a){function i(n,s){return d.coerce(t,r,x,n,s)}A(t,r,o,a,i),M(t,r,a,i)}}}),pU=Ze({"src/traces/volume/convert.js"(Z,q){"use strict";var d=Yh().gl_mesh3d,x=em().parseColorScale,A=ca().isArrayOrTypedArray,M=Qv(),e=rc().extractOpts,t=E1(),r=aT().findNearestOnAxis,o=aT().generateIsoMeshes;function a(s,c,f){this.scene=s,this.uid=f,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var i=a.prototype;i.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,f=this.data._meshX[c],g=this.data._meshY[c],v=this.data._meshZ[c],T=this.data._Ys.length,l=this.data._Zs.length,_=r(f,this.data._Xs).id,w=r(g,this.data._Ys).id,S=r(v,this.data._Zs).id,E=s.index=S+l*w+l*T*_;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var y=this.data.hovertext||this.data.text;return A(y)&&y[E]!==void 0?s.textLabel=y[E]:y&&(s.textLabel=y),!0}},i.update=function(s){var c=this.scene,f=c.fullSceneLayout;this.data=o(s);function g(w,S,E,y){return S.map(function(b){return w.d2l(b,0,y)*E})}var v=t(g(f.xaxis,s._meshX,c.dataScale[0],s.xcalendar),g(f.yaxis,s._meshY,c.dataScale[1],s.ycalendar),g(f.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),T=t(s._meshI,s._meshJ,s._meshK),l={positions:v,cells:T,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:M(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},_=e(s);l.vertexIntensity=s._meshIntensity,l.vertexIntensityBounds=[_.min,_.max],l.colormap=x(s),this.mesh.update(l)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function n(s,c){var f=s.glplot.gl,g=d({gl:f}),v=new a(s,g,c.uid);return g._trace=v,v.update(c),s.glplot.add(g),v}q.exports=n}}),dU=Ze({"src/traces/volume/index.js"(Z,q){"use strict";q.exports={attributes:CE(),supplyDefaults:hU(),calc:EE(),colorbar:{min:"cmin",max:"cmax"},plot:pU(),moduleType:"trace",name:"volume",basePlotModule:p0(),categories:["gl3d","showLegend"],meta:{}}}}),vU=Ze({"lib/volume.js"(Z,q){"use strict";q.exports=dU()}}),mU=Ze({"src/traces/mesh3d/defaults.js"(Z,q){"use strict";var d=oo(),x=ca(),A=gh(),M=M1();q.exports=function(t,r,o,a){function i(g,v){return x.coerce(t,r,M,g,v)}function n(g){var v=g.map(function(T){var l=i(T);return l&&x.isArrayOrTypedArray(l)?l:null});return v.every(function(T){return T&&T.length===v[0].length})&&v}var s=n(["x","y","z"]);if(!s){r.visible=!1;return}if(n(["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 c=d.getComponentMethod("calendars","handleTraceDefaults");c(t,r,["x","y","z"],a),["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(g){i(g)});var f=i("contour.show");f&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),A(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",o)),i("text"),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),gU=Ze({"src/traces/mesh3d/calc.js"(Z,q){"use strict";var d=wp();q.exports=function(A,M){M.intensity&&d(A,M,{vals:M.intensity,containerStr:"",cLetter:"c"})}}}),yU=Ze({"src/traces/mesh3d/convert.js"(Z,q){"use strict";var d=Yh().gl_mesh3d,x=Yh().delaunay_triangulate,A=Yh().alpha_shape,M=Yh().convex_hull,e=em().parseColorScale,t=ca().isArrayOrTypedArray,r=Qv(),o=rc().extractOpts,a=E1();function i(l,_,w){this.scene=l,this.uid=w,this.mesh=_,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=i.prototype;n.handlePick=function(l){if(l.object===this.mesh){var _=l.index=l.data.index;l.data._cellCenter?l.traceCoordinate=l.data.dataCoordinate:l.traceCoordinate=[this.data.x[_],this.data.y[_],this.data.z[_]];var w=this.data.hovertext||this.data.text;return t(w)&&w[_]!==void 0?l.textLabel=w[_]:w&&(l.textLabel=w),!0}};function s(l){for(var _=[],w=l.length,S=0;S<w;S++)_[S]=r(l[S]);return _}function c(l,_,w,S){for(var E=[],y=_.length,b=0;b<y;b++)E[b]=l.d2l(_[b],0,S)*w;return E}function f(l){for(var _=[],w=l.length,S=0;S<w;S++)_[S]=Math.round(l[S]);return _}function g(l,_){for(var w=["x","y","z"].indexOf(l),S=[],E=_.length,y=0;y<E;y++)S[y]=[_[y][(w+1)%3],_[y][(w+2)%3]];return x(S)}function v(l,_){for(var w=l.length,S=0;S<w;S++)if(l[S]<=-.5||l[S]>=_-.5)return!1;return!0}n.update=function(l){var _=this.scene,w=_.fullSceneLayout;this.data=l;var S=l.x.length,E=a(c(w.xaxis,l.x,_.dataScale[0],l.xcalendar),c(w.yaxis,l.y,_.dataScale[1],l.ycalendar),c(w.zaxis,l.z,_.dataScale[2],l.zcalendar)),y;if(l.i&&l.j&&l.k){if(l.i.length!==l.j.length||l.j.length!==l.k.length||!v(l.i,S)||!v(l.j,S)||!v(l.k,S))return;y=a(f(l.i),f(l.j),f(l.k))}else l.alphahull===0?y=M(E):l.alphahull>0?y=A(l.alphahull,E):y=g(l.delaunayaxis,E);var b={positions:E,cells:y,lightPosition:[l.lightposition.x,l.lightposition.y,l.lightposition.z],ambient:l.lighting.ambient,diffuse:l.lighting.diffuse,specular:l.lighting.specular,roughness:l.lighting.roughness,fresnel:l.lighting.fresnel,vertexNormalsEpsilon:l.lighting.vertexnormalsepsilon,faceNormalsEpsilon:l.lighting.facenormalsepsilon,opacity:l.opacity,contourEnable:l.contour.show,contourColor:r(l.contour.color).slice(0,3),contourWidth:l.contour.width,useFacetNormals:l.flatshading};if(l.intensity){var p=o(l);this.color="#fff";var u=l.intensitymode;b[u+"Intensity"]=l.intensity,b[u+"IntensityBounds"]=[p.min,p.max],b.colormap=e(l)}else l.vertexcolor?(this.color=l.vertexcolor[0],b.vertexColors=s(l.vertexcolor)):l.facecolor?(this.color=l.facecolor[0],b.cellColors=s(l.facecolor)):(this.color=l.color,b.meshColor=r(l.color));this.mesh.update(b)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(l,_){var w=l.glplot.gl,S=d({gl:w}),E=new i(l,S,_.uid);return S._trace=E,E.update(_),l.glplot.add(S),E}q.exports=T}}),_U=Ze({"src/traces/mesh3d/index.js"(Z,q){"use strict";q.exports={attributes:M1(),supplyDefaults:mU(),calc:gU(),colorbar:{min:"cmin",max:"cmax"},plot:yU(),moduleType:"trace",name:"mesh3d",basePlotModule:p0(),categories:["gl3d","showLegend"],meta:{}}}}),xU=Ze({"lib/mesh3d.js"(Z,q){"use strict";q.exports=_U()}}),kE=Ze({"src/traces/cone/attributes.js"(Z,q){"use strict";var d=Mu(),x=Qc().axisHoverFormat,A=Cs().hovertemplateAttrs,M=M1(),e=eu(),t=rs().extendFlat,r={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:A({editType:"calc"},{keys:["norm"]}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(r,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var o=["opacity","lightposition","lighting"];o.forEach(function(a){r[a]=M[a]}),r.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),q.exports=r}}),bU=Ze({"src/traces/cone/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=kE();q.exports=function(e,t,r,o){function a(T,l){return d.coerce(e,t,A,T,l)}var i=a("u"),n=a("v"),s=a("w"),c=a("x"),f=a("y"),g=a("z");if(!i||!i.length||!n||!n.length||!s||!s.length||!c||!c.length||!f||!f.length||!g||!g.length){t.visible=!1;return}var v=a("sizemode");a("sizeref",v==="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"),x(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),wU=Ze({"src/traces/cone/calc.js"(Z,q){"use strict";var d=wp();q.exports=function(A,M){for(var e=M.u,t=M.v,r=M.w,o=Math.min(M.x.length,M.y.length,M.z.length,e.length,t.length,r.length),a=-1/0,i=1/0,n=0;n<o;n++){var s=e[n],c=t[n],f=r[n],g=Math.sqrt(s*s+c*c+f*f);a=Math.max(a,g),i=Math.min(i,g)}M._len=o,M._normMax=a,d(A,M,{vals:[i,a],containerStr:"",cLetter:"c"})}}}),TU=Ze({"src/traces/cone/convert.js"(Z,q){"use strict";var d=Yh().gl_cone3d,x=Yh().gl_cone3d.createConeMesh,A=ca().simpleMap,M=em().parseColorScale,e=rc().extractOpts,t=ca().isArrayOrTypedArray,r=E1();function o(g,v){this.scene=g,this.uid=v,this.mesh=null,this.data=null}var a=o.prototype;a.handlePick=function(g){if(g.object===this.mesh){var v=g.index=g.data.index,T=this.data.x[v],l=this.data.y[v],_=this.data.z[v],w=this.data.u[v],S=this.data.v[v],E=this.data.w[v];g.traceCoordinate=[T,l,_,w,S,E,Math.sqrt(w*w+S*S+E*E)];var y=this.data.hovertext||this.data.text;return t(y)&&y[v]!==void 0?g.textLabel=y[v]:y&&(g.textLabel=y),!0}};var i={xaxis:0,yaxis:1,zaxis:2},n={tip:1,tail:0,cm:.25,center:.5},s={tip:1,tail:1,cm:.75,center:.5};function c(g,v){var T=g.fullSceneLayout,l=g.dataScale,_={};function w(p,u){var m=T[u],h=l[i[u]];return A(p,function(P){return m.d2l(P)*h})}_.vectors=r(w(v.u,"xaxis"),w(v.v,"yaxis"),w(v.w,"zaxis"),v._len),_.positions=r(w(v.x,"xaxis"),w(v.y,"yaxis"),w(v.z,"zaxis"),v._len);var S=e(v);_.colormap=M(v),_.vertexIntensityBounds=[S.min/v._normMax,S.max/v._normMax],_.coneOffset=n[v.anchor];var E=v.sizemode;E==="scaled"?_.coneSize=v.sizeref||.5:E==="absolute"?_.coneSize=v.sizeref&&v._normMax?v.sizeref/v._normMax:.5:E==="raw"&&(_.coneSize=v.sizeref),_.coneSizemode=E;var y=d(_),b=v.lightposition;return y.lightPosition=[b.x,b.y,b.z],y.ambient=v.lighting.ambient,y.diffuse=v.lighting.diffuse,y.specular=v.lighting.specular,y.roughness=v.lighting.roughness,y.fresnel=v.lighting.fresnel,y.opacity=v.opacity,v._pad=s[v.anchor]*y.vectorScale*y.coneScale*v._normMax,y}a.update=function(g){this.data=g;var v=c(this.scene,g);this.mesh.update(v)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function f(g,v){var T=g.glplot.gl,l=c(g,v),_=x(T,l),w=new o(g,v.uid);return w.mesh=_,w.data=v,_._trace=w,g.glplot.add(_),w}q.exports=f}}),AU=Ze({"src/traces/cone/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"cone",basePlotModule:p0(),categories:["gl3d","showLegend"],attributes:kE(),supplyDefaults:bU(),colorbar:{min:"cmin",max:"cmax"},calc:wU(),plot:TU(),eventData:function(d,x){return d.norm=x.traceCoordinate[6],d},meta:{}}}}),SU=Ze({"lib/cone.js"(Z,q){"use strict";q.exports=AU()}}),LE=Ze({"src/traces/streamtube/attributes.js"(Z,q){"use strict";var d=Mu(),x=Qc().axisHoverFormat,A=Cs().hovertemplateAttrs,M=M1(),e=eu(),t=rs().extendFlat,r={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:A({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(r,d("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var o=["opacity","lightposition","lighting"];o.forEach(function(a){r[a]=M[a]}),r.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),q.exports=r}}),MU=Ze({"src/traces/streamtube/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=LE();q.exports=function(e,t,r,o){function a(v,T){return d.coerce(e,t,A,v,T)}var i=a("u"),n=a("v"),s=a("w"),c=a("x"),f=a("y"),g=a("z");if(!i||!i.length||!n||!n.length||!s||!s.length||!c||!c.length||!f||!f.length||!g||!g.length){t.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"),x(e,t,o,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),EU=Ze({"src/traces/streamtube/convert.js"(Z,q){"use strict";var d=Yh().gl_streamtube3d,x=d.createTubeMesh,A=ca(),M=em().parseColorScale,e=rc().extractOpts,t=E1(),r={xaxis:0,yaxis:1,zaxis:2};function o(f,g){this.scene=f,this.uid=g,this.mesh=null,this.data=null}var a=o.prototype;a.handlePick=function(f){var g=this.scene.fullSceneLayout,v=this.scene.dataScale;function T(w,S){var E=g[S],y=v[r[S]];return E.l2c(w)/y}if(f.object===this.mesh){var l=f.data.position,_=f.data.velocity;return f.traceCoordinate=[T(l[0],"xaxis"),T(l[1],"yaxis"),T(l[2],"zaxis"),T(_[0],"xaxis"),T(_[1],"yaxis"),T(_[2],"zaxis"),f.data.intensity*this.data._normMax,f.data.divergence],f.textLabel=this.data.hovertext||this.data.text,!0}};function i(f){var g=f.length,v;return g>2?v=f.slice(1,g-1):g===2?v=[(f[0]+f[1])/2]:v=f,v}function n(f){var g=f.length;return g===1?[.5,.5]:[f[1]-f[0],f[g-1]-f[g-2]]}function s(f,g){var v=f.fullSceneLayout,T=f.dataScale,l=g._len,_={};function w(he,G){var $=v[G],J=T[r[G]];return A.simpleMap(he,function(X){return $.d2l(X)*J})}if(_.vectors=t(w(g._u,"xaxis"),w(g._v,"yaxis"),w(g._w,"zaxis"),l),!l)return{positions:[],cells:[]};var S=w(g._Xs,"xaxis"),E=w(g._Ys,"yaxis"),y=w(g._Zs,"zaxis");_.meshgrid=[S,E,y],_.gridFill=g._gridFill;var b=g._slen;if(b)_.startingPositions=t(w(g._startsX,"xaxis"),w(g._startsY,"yaxis"),w(g._startsZ,"zaxis"));else{for(var p=E[0],u=i(S),m=i(y),h=new Array(u.length*m.length),P=0,L=0;L<u.length;L++)for(var z=0;z<m.length;z++)h[P++]=[u[L],p,m[z]];_.startingPositions=h}_.colormap=M(g),_.tubeSize=g.sizeref,_.maxLength=g.maxdisplayed;var F=w(g._xbnds,"xaxis"),B=w(g._ybnds,"yaxis"),O=w(g._zbnds,"zaxis"),I=n(S),N=n(E),U=n(y),W=[[F[0]-I[0],B[0]-N[0],O[0]-U[0]],[F[1]+I[1],B[1]+N[1],O[1]+U[1]]],Q=d(_,W),ue=e(g);Q.vertexIntensityBounds=[ue.min/g._normMax,ue.max/g._normMax];var le=g.lightposition;return Q.lightPosition=[le.x,le.y,le.z],Q.ambient=g.lighting.ambient,Q.diffuse=g.lighting.diffuse,Q.specular=g.lighting.specular,Q.roughness=g.lighting.roughness,Q.fresnel=g.lighting.fresnel,Q.opacity=g.opacity,g._pad=Q.tubeScale*g.sizeref*2,Q}a.update=function(f){this.data=f;var g=s(this.scene,f);this.mesh.update(g)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function c(f,g){var v=f.glplot.gl,T=s(f,g),l=x(v,T),_=new o(f,g.uid);return _.mesh=l,_.data=g,l._trace=_,f.glplot.add(l),_}q.exports=c}}),CU=Ze({"src/traces/streamtube/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"streamtube",basePlotModule:p0(),categories:["gl3d","showLegend"],attributes:LE(),supplyDefaults:MU(),colorbar:{min:"cmin",max:"cmax"},calc:rT().calc,plot:EU(),eventData:function(d,x){return d.tubex=d.x,d.tubey=d.y,d.tubez=d.z,d.tubeu=x.traceCoordinate[3],d.tubev=x.traceCoordinate[4],d.tubew=x.traceCoordinate[5],d.norm=x.traceCoordinate[6],d.divergence=x.traceCoordinate[7],delete d.x,delete d.y,delete d.z,d},meta:{}}}}),kU=Ze({"lib/streamtube.js"(Z,q){"use strict";q.exports=CU()}}),dg=Ze({"src/traces/scattergeo/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=$d(),M=tf(),e=eu(),t=Mu(),r=Gh().dash,o=rs().extendFlat,a=pc().overrideAll,i=M.marker,n=M.line,s=i.line,c=["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(" ");q.exports=a({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:o({},M.mode,{dflt:"markers"}),text:o({},M.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:o({},M.hovertext,{}),textfont:M.textfont,textposition:M.textposition,line:{color:n.color,width:n.width,dash:r},connectgaps:M.connectgaps,marker:o({symbol:i.symbol,opacity:i.opacity,angle:i.angle,angleref:o({},i.angleref,{values:["previous","up","north"]}),standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,colorbar:i.colorbar,line:o({width:s.width},t("marker.line")),gradient:i.gradient},t("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:A(),selected:M.selected,unselected:M.unselected,hoverinfo:o({},e.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:d()},"calc","nested")}}),LU=Ze({"src/traces/scattergeo/defaults.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=md(),M=Dd(),e=zd(),t=ev(),r=dg(),o=["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(" ");q.exports=function(i,n,s,c){function f(E,y){return d.coerce(i,n,r,E,y)}var g=f("locations"),v;if(g&&g.length){var T=f("geojson"),l;(typeof T=="string"&&T!==""||d.isPlainObject(T))&&(l="geojson-id");var _=f("locationmode",l);_==="country names"&&d.warn(o),_==="geojson-id"&&f("featureidkey"),v=g.length}else{var w=f("lon")||[],S=f("lat")||[];v=Math.min(w.length,S.length)}if(!v){n.visible=!1;return}n._length=v,f("text"),f("hovertext"),f("hovertemplate"),f("mode"),x.hasMarkers(n)&&A(i,n,s,c,f,{gradient:!0}),x.hasLines(n)&&(M(i,n,s,c,f),f("connectgaps")),x.hasText(n)&&(f("texttemplate"),e(i,n,c,f)),f("fill"),n.fill!=="none"&&t(i,n,s,f),d.coerceSelectionMarkerOpacity(n,f)}}}),PU=Ze({"src/traces/scattergeo/format_labels.js"(Z,q){"use strict";var d=Wo();q.exports=function(A,M,e){var t={},r=e[M.geo]._subplot,o=r.mockAxis,a=A.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),iT=Ze({"src/traces/scattergeo/calc.js"(Z,q){"use strict";var d=ns(),x=qs().BADNUM,A=Fd(),M=Av(),e=Od(),t=ca().isArrayOrTypedArray,r=ca()._;function o(a){return a&&typeof a=="string"}q.exports=function(i,n){var s=t(n.locations),c=s?n.locations.length:n._length,f=new Array(c),g;n.geojson?g=function(S){return o(S)||d(S)}:g=o;for(var v=0;v<c;v++){var T=f[v]={};if(s){var l=n.locations[v];T.loc=g(l)?l:null}else{var _=n.lon[v],w=n.lat[v];d(_)&&d(w)?T.lonlat=[+_,+w]:T.lonlat=[x,x]}}return M(f,n),A(i,n),e(f,n),c&&(f[0].t={labels:{lat:r(i,"lat:")+" ",lon:r(i,"lon:")+" "}}),f}}}),gx=Ze({"src/plots/geo/constants.js"(Z){"use strict";Z.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"},Z.axesNames=["lonaxis","lataxis"],Z.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},Z.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},Z.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]}},Z.clipPad=.001,Z.precision=.1,Z.landColor="#F0DC82",Z.waterColor="#3399FF",Z.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},Z.sphereSVG={type:"Sphere"},Z.fillLayers={ocean:1,land:1,lakes:1},Z.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},Z.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],Z.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],Z.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}}),PE=Ze({"node_modules/topojson-client/dist/topojson-client.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.topojson=d.topojson||{}))})(Z,function(d){"use strict";function x(w){return w}function A(w){if(w==null)return x;var S,E,y=w.scale[0],b=w.scale[1],p=w.translate[0],u=w.translate[1];return function(m,h){h||(S=E=0);var P=2,L=m.length,z=new Array(L);for(z[0]=(S+=m[0])*y+p,z[1]=(E+=m[1])*b+u;P<L;)z[P]=m[P],++P;return z}}function M(w){var S=A(w.transform),E,y=1/0,b=y,p=-y,u=-y;function m(P){P=S(P),P[0]<y&&(y=P[0]),P[0]>p&&(p=P[0]),P[1]<b&&(b=P[1]),P[1]>u&&(u=P[1])}function h(P){switch(P.type){case"GeometryCollection":P.geometries.forEach(h);break;case"Point":m(P.coordinates);break;case"MultiPoint":P.coordinates.forEach(m);break}}w.arcs.forEach(function(P){for(var L=-1,z=P.length,F;++L<z;)F=S(P[L],L),F[0]<y&&(y=F[0]),F[0]>p&&(p=F[0]),F[1]<b&&(b=F[1]),F[1]>u&&(u=F[1])});for(E in w.objects)h(w.objects[E]);return[y,b,p,u]}function e(w,S){for(var E,y=w.length,b=y-S;b<--y;)E=w[b],w[b++]=w[y],w[y]=E}function t(w,S){return typeof S=="string"&&(S=w.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(E){return r(w,E)})}:r(w,S)}function r(w,S){var E=S.id,y=S.bbox,b=S.properties==null?{}:S.properties,p=o(w,S);return E==null&&y==null?{type:"Feature",properties:b,geometry:p}:y==null?{type:"Feature",id:E,properties:b,geometry:p}:{type:"Feature",id:E,bbox:y,properties:b,geometry:p}}function o(w,S){var E=A(w.transform),y=w.arcs;function b(L,z){z.length&&z.pop();for(var F=y[L<0?~L:L],B=0,O=F.length;B<O;++B)z.push(E(F[B],B));L<0&&e(z,O)}function p(L){return E(L)}function u(L){for(var z=[],F=0,B=L.length;F<B;++F)b(L[F],z);return z.length<2&&z.push(z[0]),z}function m(L){for(var z=u(L);z.length<4;)z.push(z[0]);return z}function h(L){return L.map(m)}function P(L){var z=L.type,F;switch(z){case"GeometryCollection":return{type:z,geometries:L.geometries.map(P)};case"Point":F=p(L.coordinates);break;case"MultiPoint":F=L.coordinates.map(p);break;case"LineString":F=u(L.arcs);break;case"MultiLineString":F=L.arcs.map(u);break;case"Polygon":F=h(L.arcs);break;case"MultiPolygon":F=L.arcs.map(h);break;default:return null}return{type:z,coordinates:F}}return P(S)}function a(w,S){var E={},y={},b={},p=[],u=-1;S.forEach(function(P,L){var z=w.arcs[P<0?~P:P],F;z.length<3&&!z[1][0]&&!z[1][1]&&(F=S[++u],S[u]=P,S[L]=F)}),S.forEach(function(P){var L=m(P),z=L[0],F=L[1],B,O;if(B=b[z])if(delete b[B.end],B.push(P),B.end=F,O=y[F]){delete y[O.start];var I=O===B?B:B.concat(O);y[I.start=B.start]=b[I.end=O.end]=I}else y[B.start]=b[B.end]=B;else if(B=y[F])if(delete y[B.start],B.unshift(P),B.start=z,O=b[z]){delete b[O.end];var N=O===B?B:O.concat(B);y[N.start=O.start]=b[N.end=B.end]=N}else y[B.start]=b[B.end]=B;else B=[P],y[B.start=z]=b[B.end=F]=B});function m(P){var L=w.arcs[P<0?~P:P],z=L[0],F;return w.transform?(F=[0,0],L.forEach(function(B){F[0]+=B[0],F[1]+=B[1]})):F=L[L.length-1],P<0?[F,z]:[z,F]}function h(P,L){for(var z in P){var F=P[z];delete L[F.start],delete F.start,delete F.end,F.forEach(function(B){E[B<0?~B:B]=1}),p.push(F)}}return h(b,y),h(y,b),S.forEach(function(P){E[P<0?~P:P]||p.push([P])}),p}function i(w){return o(w,n.apply(this,arguments))}function n(w,S,E){var y,b,p;if(arguments.length>1)y=s(w,S,E);else for(b=0,y=new Array(p=w.arcs.length);b<p;++b)y[b]=b;return{type:"MultiLineString",arcs:a(w,y)}}function s(w,S,E){var y=[],b=[],p;function u(z){var F=z<0?~z:z;(b[F]||(b[F]=[])).push({i:z,g:p})}function m(z){z.forEach(u)}function h(z){z.forEach(m)}function P(z){z.forEach(h)}function L(z){switch(p=z,z.type){case"GeometryCollection":z.geometries.forEach(L);break;case"LineString":m(z.arcs);break;case"MultiLineString":case"Polygon":h(z.arcs);break;case"MultiPolygon":P(z.arcs);break}}return L(S),b.forEach(E==null?function(z){y.push(z[0].i)}:function(z){E(z[0].g,z[z.length-1].g)&&y.push(z[0].i)}),y}function c(w){for(var S=-1,E=w.length,y,b=w[E-1],p=0;++S<E;)y=b,b=w[S],p+=y[0]*b[1]-y[1]*b[0];return Math.abs(p)}function f(w){return o(w,g.apply(this,arguments))}function g(w,S){var E={},y=[],b=[];S.forEach(p);function p(h){switch(h.type){case"GeometryCollection":h.geometries.forEach(p);break;case"Polygon":u(h.arcs);break;case"MultiPolygon":h.arcs.forEach(u);break}}function u(h){h.forEach(function(P){P.forEach(function(L){(E[L=L<0?~L:L]||(E[L]=[])).push(h)})}),y.push(h)}function m(h){return c(o(w,{type:"Polygon",arcs:[h]}).coordinates[0])}return y.forEach(function(h){if(!h._){var P=[],L=[h];for(h._=1,b.push(P);h=L.pop();)P.push(h),h.forEach(function(z){z.forEach(function(F){E[F<0?~F:F].forEach(function(B){B._||(B._=1,L.push(B))})})})}}),y.forEach(function(h){delete h._}),{type:"MultiPolygon",arcs:b.map(function(h){var P=[],L;if(h.forEach(function(I){I.forEach(function(N){N.forEach(function(U){E[U<0?~U:U].length<2&&P.push(U)})})}),P=a(w,P),(L=P.length)>1)for(var z=1,F=m(P[0]),B,O;z<L;++z)(B=m(P[z]))>F&&(O=P[0],P[0]=P[z],P[z]=O,F=B);return P}).filter(function(h){return h.length>0})}}function v(w,S){for(var E=0,y=w.length;E<y;){var b=E+y>>>1;w[b]<S?E=b+1:y=b}return E}function T(w){var S={},E=w.map(function(){return[]});function y(I,N){I.forEach(function(U){U<0&&(U=~U);var W=S[U];W?W.push(N):S[U]=[N]})}function b(I,N){I.forEach(function(U){y(U,N)})}function p(I,N){I.type==="GeometryCollection"?I.geometries.forEach(function(U){p(U,N)}):I.type in u&&u[I.type](I.arcs,N)}var u={LineString:y,MultiLineString:b,Polygon:b,MultiPolygon:function(I,N){I.forEach(function(U){b(U,N)})}};w.forEach(p);for(var m in S)for(var h=S[m],P=h.length,L=0;L<P;++L)for(var z=L+1;z<P;++z){var F=h[L],B=h[z],O;(O=E[F])[m=v(O,B)]!==B&&O.splice(m,0,B),(O=E[B])[m=v(O,F)]!==F&&O.splice(m,0,F)}return E}function l(w){if(w==null)return x;var S,E,y=w.scale[0],b=w.scale[1],p=w.translate[0],u=w.translate[1];return function(m,h){h||(S=E=0);var P=2,L=m.length,z=new Array(L),F=Math.round((m[0]-p)/y),B=Math.round((m[1]-u)/b);for(z[0]=F-S,S=F,z[1]=B-E,E=B;P<L;)z[P]=m[P],++P;return z}}function _(w,S){if(w.transform)throw new Error("already quantized");if(!S||!S.scale){if(!((u=Math.floor(S))>=2))throw new Error("n must be \u22652");h=w.bbox||M(w);var E=h[0],y=h[1],b=h[2],p=h[3],u;S={scale:[b-E?(b-E)/(u-1):1,p-y?(p-y)/(u-1):1],translate:[E,y]}}else h=w.bbox;var m=l(S),h,P,L=w.objects,z={};function F(I){return m(I)}function B(I){var N;switch(I.type){case"GeometryCollection":N={type:"GeometryCollection",geometries:I.geometries.map(B)};break;case"Point":N={type:"Point",coordinates:F(I.coordinates)};break;case"MultiPoint":N={type:"MultiPoint",coordinates:I.coordinates.map(F)};break;default:return I}return I.id!=null&&(N.id=I.id),I.bbox!=null&&(N.bbox=I.bbox),I.properties!=null&&(N.properties=I.properties),N}function O(I){var N=0,U=1,W=I.length,Q,ue=new Array(W);for(ue[0]=m(I[0],0);++N<W;)((Q=m(I[N],N))[0]||Q[1])&&(ue[U++]=Q);return U===1&&(ue[U++]=[0,0]),ue.length=U,ue}for(P in L)z[P]=B(L[P]);return{type:"Topology",bbox:h,transform:S,objects:z,arcs:w.arcs.map(O)}}d.bbox=M,d.feature=t,d.merge=f,d.mergeArcs=g,d.mesh=i,d.meshArcs=n,d.neighbors=T,d.quantize=_,d.transform=A,d.untransform=l,Object.defineProperty(d,"__esModule",{value:!0})})}}),nT=Ze({"src/lib/topojson_utils.js"(Z,q){"use strict";var d=q.exports={},x=gx().locationmodeToLayer,A=PE().feature;d.getTopojsonName=function(M){return[M.scope.replace(/ /g,"-"),"_",M.resolution.toString(),"m"].join("")},d.getTopojsonPath=function(M,e){return M+=M.endsWith("/")?"":"/",`${M}${e}.json`},d.getTopojsonFeatures=function(M,e){var t=x[M.locationmode],r=e.objects[t];return A(e,r).features}}}),d0=Ze({"src/lib/geojson_utils.js"(Z){"use strict";var q=qs().BADNUM;Z.calcTraceToLineCoords=function(d){for(var x=d[0].trace,A=x.connectgaps,M=[],e=[],t=0;t<d.length;t++){var r=d[t],o=r.lonlat;o[0]!==q?e.push(o):!A&&e.length>0&&(M.push(e),e=[])}return e.length>0&&M.push(e),M},Z.makeLine=function(d){return d.length===1?{type:"LineString",coordinates:d[0]}:{type:"MultiLineString",coordinates:d}},Z.makePolygon=function(d){if(d.length===1)return{type:"Polygon",coordinates:d};for(var x=new Array(d.length),A=0;A<d.length;A++)x[A]=[d[A]];return{type:"MultiPolygon",coordinates:x}},Z.makeBlank=function(){return{type:"Point",coordinates:[]}}}}),IU=Ze({"node_modules/country-regex/index.js"(Z,q){q.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"}}}),oT=Ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=63710088e-1,d={centimeters:q*100,centimetres:q*100,degrees:360/(2*Math.PI),feet:q*3.28084,inches:q*39.37,kilometers:q/1e3,kilometres:q/1e3,meters:q,metres:q,miles:q/1609.344,millimeters:q*1e3,millimetres:q*1e3,nauticalmiles:q/1852,radians:1,yards:q*1.0936},x={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 A(L,z,F={}){let B={type:"Feature"};return(F.id===0||F.id)&&(B.id=F.id),F.bbox&&(B.bbox=F.bbox),B.properties=z||{},B.geometry=L,B}function M(L,z,F={}){switch(L){case"Point":return e(z).geometry;case"LineString":return a(z).geometry;case"Polygon":return r(z).geometry;case"MultiPoint":return c(z).geometry;case"MultiLineString":return s(z).geometry;case"MultiPolygon":return f(z).geometry;default:throw new Error(L+" is invalid")}}function e(L,z,F={}){if(!L)throw new Error("coordinates is required");if(!Array.isArray(L))throw new Error("coordinates must be an Array");if(L.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(L[0])||!u(L[1]))throw new Error("coordinates must contain numbers");return A({type:"Point",coordinates:L},z,F)}function t(L,z,F={}){return n(L.map(B=>e(B,z)),F)}function r(L,z,F={}){for(let O of L){if(O.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(O[O.length-1].length!==O[0].length)throw new Error("First and last Position are not equivalent.");for(let I=0;I<O[O.length-1].length;I++)if(O[O.length-1][I]!==O[0][I])throw new Error("First and last Position are not equivalent.")}return A({type:"Polygon",coordinates:L},z,F)}function o(L,z,F={}){return n(L.map(B=>r(B,z)),F)}function a(L,z,F={}){if(L.length<2)throw new Error("coordinates must be an array of two or more positions");return A({type:"LineString",coordinates:L},z,F)}function i(L,z,F={}){return n(L.map(B=>a(B,z)),F)}function n(L,z={}){let F={type:"FeatureCollection"};return z.id&&(F.id=z.id),z.bbox&&(F.bbox=z.bbox),F.features=L,F}function s(L,z,F={}){return A({type:"MultiLineString",coordinates:L},z,F)}function c(L,z,F={}){return A({type:"MultiPoint",coordinates:L},z,F)}function f(L,z,F={}){return A({type:"MultiPolygon",coordinates:L},z,F)}function g(L,z,F={}){return A({type:"GeometryCollection",geometries:L},z,F)}function v(L,z=0){if(z&&!(z>=0))throw new Error("precision must be a positive number");let F=Math.pow(10,z||0);return Math.round(L*F)/F}function T(L,z="kilometers"){let F=d[z];if(!F)throw new Error(z+" units is invalid");return L*F}function l(L,z="kilometers"){let F=d[z];if(!F)throw new Error(z+" units is invalid");return L/F}function _(L,z){return E(l(L,z))}function w(L){let z=L%360;return z<0&&(z+=360),z}function S(L){return L=L%360,L>180?L-360:L<-180?L+360:L}function E(L){return L%(2*Math.PI)*180/Math.PI}function y(L){return L%360*Math.PI/180}function b(L,z="kilometers",F="kilometers"){if(!(L>=0))throw new Error("length must be a positive number");return T(l(L,z),F)}function p(L,z="meters",F="kilometers"){if(!(L>=0))throw new Error("area must be a positive number");let B=x[z];if(!B)throw new Error("invalid original units");let O=x[F];if(!O)throw new Error("invalid final units");return L/B*O}function u(L){return!isNaN(L)&&L!==null&&!Array.isArray(L)}function m(L){return L!==null&&typeof L=="object"&&!Array.isArray(L)}function h(L){if(!L)throw new Error("bbox is required");if(!Array.isArray(L))throw new Error("bbox must be an Array");if(L.length!==4&&L.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");L.forEach(z=>{if(!u(z))throw new Error("bbox must only contain numbers")})}function P(L){if(!L)throw new Error("id is required");if(["string","number"].indexOf(typeof L)===-1)throw new Error("id must be a number or a string")}Z.areaFactors=x,Z.azimuthToBearing=S,Z.bearingToAzimuth=w,Z.convertArea=p,Z.convertLength=b,Z.degreesToRadians=y,Z.earthRadius=q,Z.factors=d,Z.feature=A,Z.featureCollection=n,Z.geometry=M,Z.geometryCollection=g,Z.isNumber=u,Z.isObject=m,Z.lengthToDegrees=_,Z.lengthToRadians=l,Z.lineString=a,Z.lineStrings=i,Z.multiLineString=s,Z.multiPoint=c,Z.multiPolygon=f,Z.point=e,Z.points=t,Z.polygon=r,Z.polygons=o,Z.radiansToDegrees=E,Z.radiansToLength=T,Z.round=v,Z.validateBBox=h,Z.validateId=P}}),sT=Ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT();function d(l,_,w){if(l!==null)for(var S,E,y,b,p,u,m,h=0,P=0,L,z=l.type,F=z==="FeatureCollection",B=z==="Feature",O=F?l.features.length:1,I=0;I<O;I++){m=F?l.features[I].geometry:B?l.geometry:l,L=m?m.type==="GeometryCollection":!1,p=L?m.geometries.length:1;for(var N=0;N<p;N++){var U=0,W=0;if(b=L?m.geometries[N]:m,b!==null){u=b.coordinates;var Q=b.type;switch(h=w&&(Q==="Polygon"||Q==="MultiPolygon")?1:0,Q){case null:break;case"Point":if(_(u,P,I,U,W)===!1)return!1;P++,U++;break;case"LineString":case"MultiPoint":for(S=0;S<u.length;S++){if(_(u[S],P,I,U,W)===!1)return!1;P++,Q==="MultiPoint"&&U++}Q==="LineString"&&U++;break;case"Polygon":case"MultiLineString":for(S=0;S<u.length;S++){for(E=0;E<u[S].length-h;E++){if(_(u[S][E],P,I,U,W)===!1)return!1;P++}Q==="MultiLineString"&&U++,Q==="Polygon"&&W++}Q==="Polygon"&&U++;break;case"MultiPolygon":for(S=0;S<u.length;S++){for(W=0,E=0;E<u[S].length;E++){for(y=0;y<u[S][E].length-h;y++){if(_(u[S][E][y],P,I,U,W)===!1)return!1;P++}W++}U++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(d(b.geometries[S],_,w)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function x(l,_,w,S){var E=w;return d(l,function(y,b,p,u,m){b===0&&w===void 0?E=y:E=_(E,y,b,p,u,m)},S),E}function A(l,_){var w;switch(l.type){case"FeatureCollection":for(w=0;w<l.features.length&&_(l.features[w].properties,w)!==!1;w++);break;case"Feature":_(l.properties,0);break}}function M(l,_,w){var S=w;return A(l,function(E,y){y===0&&w===void 0?S=E:S=_(S,E,y)}),S}function e(l,_){if(l.type==="Feature")_(l,0);else if(l.type==="FeatureCollection")for(var w=0;w<l.features.length&&_(l.features[w],w)!==!1;w++);}function t(l,_,w){var S=w;return e(l,function(E,y){y===0&&w===void 0?S=E:S=_(S,E,y)}),S}function r(l){var _=[];return d(l,function(w){_.push(w)}),_}function o(l,_){var w,S,E,y,b,p,u,m,h,P,L=0,z=l.type==="FeatureCollection",F=l.type==="Feature",B=z?l.features.length:1;for(w=0;w<B;w++){for(p=z?l.features[w].geometry:F?l.geometry:l,m=z?l.features[w].properties:F?l.properties:{},h=z?l.features[w].bbox:F?l.bbox:void 0,P=z?l.features[w].id:F?l.id:void 0,u=p?p.type==="GeometryCollection":!1,b=u?p.geometries.length:1,E=0;E<b;E++){if(y=u?p.geometries[E]:p,y===null){if(_(null,L,m,h,P)===!1)return!1;continue}switch(y.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(y,L,m,h,P)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<y.geometries.length;S++)if(_(y.geometries[S],L,m,h,P)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}L++}}function a(l,_,w){var S=w;return o(l,function(E,y,b,p,u){y===0&&w===void 0?S=E:S=_(S,E,y,b,p,u)}),S}function i(l,_){o(l,function(w,S,E,y,b){var p=w===null?null:w.type;switch(p){case null:case"Point":case"LineString":case"Polygon":return _(q.feature.call(void 0,w,E,{bbox:y,id:b}),S,0)===!1?!1:void 0}var u;switch(p){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var m=0;m<w.coordinates.length;m++){var h=w.coordinates[m],P={type:u,coordinates:h};if(_(q.feature.call(void 0,P,E),S,m)===!1)return!1}})}function n(l,_,w){var S=w;return i(l,function(E,y,b){y===0&&b===0&&w===void 0?S=E:S=_(S,E,y,b)}),S}function s(l,_){i(l,function(w,S,E){var y=0;if(w.geometry){var b=w.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var p,u=0,m=0,h=0;if(d(w,function(P,L,z,F,B){if(p===void 0||S>u||F>m||B>h){p=P,u=S,m=F,h=B,y=0;return}var O=q.lineString.call(void 0,[p,P],w.properties);if(_(O,S,E,B,y)===!1)return!1;y++,p=P})===!1)return!1}}})}function c(l,_,w){var S=w,E=!1;return s(l,function(y,b,p,u,m){E===!1&&w===void 0?S=y:S=_(S,y,b,p,u,m),E=!0}),S}function f(l,_){if(!l)throw new Error("geojson is required");i(l,function(w,S,E){if(w.geometry!==null){var y=w.geometry.type,b=w.geometry.coordinates;switch(y){case"LineString":if(_(w,S,E,0,0)===!1)return!1;break;case"Polygon":for(var p=0;p<b.length;p++)if(_(q.lineString.call(void 0,b[p],w.properties),S,E,p)===!1)return!1;break}}})}function g(l,_,w){var S=w;return f(l,function(E,y,b,p){y===0&&w===void 0?S=E:S=_(S,E,y,b,p)}),S}function v(l,_){if(_=_||{},!q.isObject.call(void 0,_))throw new Error("options is invalid");var w=_.featureIndex||0,S=_.multiFeatureIndex||0,E=_.geometryIndex||0,y=_.segmentIndex||0,b=_.properties,p;switch(l.type){case"FeatureCollection":w<0&&(w=l.features.length+w),b=b||l.features[w].properties,p=l.features[w].geometry;break;case"Feature":b=b||l.properties,p=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":p=l;break;default:throw new Error("geojson is invalid")}if(p===null)return null;var u=p.coordinates;switch(p.type){case"Point":case"MultiPoint":return null;case"LineString":return y<0&&(y=u.length+y-1),q.lineString.call(void 0,[u[y],u[y+1]],b,_);case"Polygon":return E<0&&(E=u.length+E),y<0&&(y=u[E].length+y-1),q.lineString.call(void 0,[u[E][y],u[E][y+1]],b,_);case"MultiLineString":return S<0&&(S=u.length+S),y<0&&(y=u[S].length+y-1),q.lineString.call(void 0,[u[S][y],u[S][y+1]],b,_);case"MultiPolygon":return S<0&&(S=u.length+S),E<0&&(E=u[S].length+E),y<0&&(y=u[S][E].length-y-1),q.lineString.call(void 0,[u[S][E][y],u[S][E][y+1]],b,_)}throw new Error("geojson is invalid")}function T(l,_){if(_=_||{},!q.isObject.call(void 0,_))throw new Error("options is invalid");var w=_.featureIndex||0,S=_.multiFeatureIndex||0,E=_.geometryIndex||0,y=_.coordIndex||0,b=_.properties,p;switch(l.type){case"FeatureCollection":w<0&&(w=l.features.length+w),b=b||l.features[w].properties,p=l.features[w].geometry;break;case"Feature":b=b||l.properties,p=l.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":p=l;break;default:throw new Error("geojson is invalid")}if(p===null)return null;var u=p.coordinates;switch(p.type){case"Point":return q.point.call(void 0,u,b,_);case"MultiPoint":return S<0&&(S=u.length+S),q.point.call(void 0,u[S],b,_);case"LineString":return y<0&&(y=u.length+y),q.point.call(void 0,u[y],b,_);case"Polygon":return E<0&&(E=u.length+E),y<0&&(y=u[E].length+y),q.point.call(void 0,u[E][y],b,_);case"MultiLineString":return S<0&&(S=u.length+S),y<0&&(y=u[S].length+y),q.point.call(void 0,u[S][y],b,_);case"MultiPolygon":return S<0&&(S=u.length+S),E<0&&(E=u[S].length+E),y<0&&(y=u[S][E].length-y),q.point.call(void 0,u[S][E][y],b,_)}throw new Error("geojson is invalid")}Z.coordAll=r,Z.coordEach=d,Z.coordReduce=x,Z.featureEach=e,Z.featureReduce=t,Z.findPoint=T,Z.findSegment=v,Z.flattenEach=i,Z.flattenReduce=n,Z.geomEach=o,Z.geomReduce=a,Z.lineEach=f,Z.lineReduce=g,Z.propEach=A,Z.propReduce=M,Z.segmentEach=s,Z.segmentReduce=c}}),RU=Ze({"node_modules/@turf/area/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT(),d=sT();function x(a){return d.geomReduce.call(void 0,a,(i,n)=>i+A(n),0)}function A(a){let i=0,n;switch(a.type){case"Polygon":return M(a.coordinates);case"MultiPolygon":for(n=0;n<a.coordinates.length;n++)i+=M(a.coordinates[n]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function M(a){let i=0;if(a&&a.length>0){i+=Math.abs(r(a[0]));for(let n=1;n<a.length;n++)i-=Math.abs(r(a[n]))}return i}var e=q.earthRadius*q.earthRadius/2,t=Math.PI/180;function r(a){let i=a.length-1;if(i<=2)return 0;let n=0,s=0;for(;s<i;){let c=a[s],f=a[s+1===i?0:s+1],g=a[s+2>=i?(s+2)%i:s+2],v=c[0]*t,T=f[1]*t,l=g[0]*t;n+=(l-v)*Math.sin(T),s++}return n*e}var o=x;Z.area=x,Z.default=o}}),DU=Ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=oT(),d=sT();function x(M,e={}){let t=0,r=0,o=0;return d.coordEach.call(void 0,M,function(a){t+=a[0],r+=a[1],o++},!0),q.point.call(void 0,[t/o,r/o],e.properties)}var A=x;Z.centroid=x,Z.default=A}}),zU=Ze({"node_modules/@turf/bbox/dist/cjs/index.cjs"(Z){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var q=sT();function d(A,M={}){if(A.bbox!=null&&M.recompute!==!0)return A.bbox;let e=[1/0,1/0,-1/0,-1/0];return q.coordEach.call(void 0,A,t=>{e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}var x=d;Z.bbox=d,Z.default=x}}),v0=Ze({"src/lib/geo_location_utils.js"(Z,q){"use strict";var d=On(),x=IU(),{area:A}=RU(),{centroid:M}=DU(),{bbox:e}=zU(),t=S_(),r=Ym(),o=Xv(),a=b_(),i=P_(),n=Object.keys(x),s={"ISO-3":t,"USA-states":t,"country names":c};function c(S){for(var E=0;E<n.length;E++){var y=n[E],b=new RegExp(x[y]);if(b.test(S.trim().toLowerCase()))return y}return r.log("Unrecognized country name: "+S+"."),!1}function f(S,E,y){if(!E||typeof E!="string")return!1;var b=s[S](E),p,u,m;if(b){if(S==="USA-states")for(p=[],m=0;m<y.length;m++)u=y[m],u.properties&&u.properties.gu&&u.properties.gu==="USA"&&p.push(u);else p=y;for(m=0;m<p.length;m++)if(u=p[m],u.id===b)return u;r.log(["Location with id",b,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function g(S){var E=S.geometry,y=E.coordinates,b=S.id,p=[],u,m,h,P;function L(z){for(var F=0;F<z.length-1;F++)if(z[F][0]>0&&z[F+1][0]<0)return F;return null}switch(b==="RUS"||b==="FJI"?u=function(z){var F;if(L(z)===null)F=z;else for(F=new Array(z.length),P=0;P<z.length;P++)F[P]=[z[P][0]<0?z[P][0]+360:z[P][0],z[P][1]];p.push(i.tester(F))}:b==="ATA"?u=function(z){var F=L(z);if(F===null)return p.push(i.tester(z));var B=new Array(z.length+1),O=0;for(P=0;P<z.length;P++)P>F?B[O++]=[z[P][0]+360,z[P][1]]:P===F?(B[O++]=z[P],B[O++]=[z[P][0],-90]):B[O++]=z[P];var I=i.tester(B);I.pts.pop(),p.push(I)}:u=function(z){p.push(i.tester(z))},E.type){case"MultiPolygon":for(m=0;m<y.length;m++)for(h=0;h<y[m].length;h++)u(y[m][h]);break;case"Polygon":for(m=0;m<y.length;m++)u(y[m]);break}return p}function v(S){var E=S.geojson,y=window.PlotlyGeoAssets||{},b=typeof E=="string"?y[E]:E;return o(b)?b:(r.error("Oops ... something went wrong when fetching "+E),!1)}function T(S){var E=S[0].trace,y=v(E);if(!y)return!1;var b={},p=[],u;for(u=0;u<E._length;u++){var m=S[u];(m.loc||m.loc===0)&&(b[m.loc]=m)}function h(z){var F=a(z,E.featureidkey||"id").get(),B=b[F];if(B){var O=z.geometry;if(O.type==="Polygon"||O.type==="MultiPolygon"){var I={type:"Feature",id:F,geometry:O,properties:{}};I.geometry.coordinates.length>0?I.properties.ct=l(I):I.properties.ct=[NaN,NaN],B.fIn=z,B.fOut=I,p.push(I)}else r.log(["Location",B.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete b[F]}switch(y.type){case"FeatureCollection":var P=y.features;for(u=0;u<P.length;u++)h(P[u]);break;case"Feature":h(y);break;default:return r.warn(["Invalid GeoJSON type",(y.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var L in b)r.log(["Location *"+L+"*","does not have a matching feature with id-key","*"+E.featureidkey+"*."].join(" "));return p}function l(S){var E=S.geometry,y;if(E.type==="MultiPolygon")for(var b=E.coordinates,p=0,u=0;u<b.length;u++){var m={type:"Polygon",coordinates:b[u]},h=A(m);h>p&&(p=h,y=m)}else y=E;return M(y).geometry.coordinates}function _(S){var E=window.PlotlyGeoAssets||{},y=[];function b(P){return new Promise(function(L,z){d.json(P,function(F,B){if(F){delete E[P];var O=F.status===404?'GeoJSON at URL "'+P+'" does not exist.':"Unexpected error while fetching from "+P;return z(new Error(O))}return E[P]=B,L(B)})})}function p(P){return new Promise(function(L,z){var F=0,B=setInterval(function(){if(E[P]&&E[P]!=="pending")return clearInterval(B),L(E[P]);if(F>100)return clearInterval(B),z("Unexpected error while fetching from "+P);F++},50)})}for(var u=0;u<S.length;u++){var m=S[u][0].trace,h=m.geojson;typeof h=="string"&&(E[h]?E[h]==="pending"&&y.push(p(h)):(E[h]="pending",y.push(b(h))))}return y}function w(S){return e(S)}q.exports={locationToFeature:f,feature2polygons:g,getTraceGeojson:v,extractTraceFeature:T,fetchTraceGeoData:_,computeBbox:w}}}),IE=Ze({"src/traces/scattergeo/style.js"(Z,q){"use strict";var d=On(),x=as(),A=Yn(),M=ed(),e=M.stylePoints,t=M.styleText;q.exports=function(a,i){i&&r(a,i)};function r(o,a){var i=a[0].trace,n=a[0].node3;n.style("opacity",a[0].trace.opacity),e(n,i,o),t(n,i,o),n.selectAll("path.js-line").style("fill","none").each(function(s){var c=d.select(this),f=s.trace,g=f.line||{};c.call(A.stroke,g.color).call(x.dashLine,g.dash||"",g.width||0),f.fill!=="none"&&c.call(A.fill,f.fillcolor)})}}}),RE=Ze({"src/traces/scattergeo/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=nT().getTopojsonFeatures,M=d0(),e=v0(),t=Yd().findExtremes,r=qs().BADNUM,o=Bd().calcMarkerSize,a=Fu(),i=IE();function n(c,f,g){var v=f.layers.frontplot.select(".scatterlayer"),T=x.makeTraceGroups(v,g,"trace scattergeo");function l(_,w){_.lonlat[0]===r&&d.select(w).remove()}T.selectAll("*").remove(),T.each(function(_){var w=d.select(this),S=_[0].trace;if(a.hasLines(S)||S.fill!=="none"){var E=M.calcTraceToLineCoords(_),y=S.fill!=="none"?M.makePolygon(E):M.makeLine(E);w.selectAll("path.js-line").data([{geojson:y,trace:S}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}a.hasMarkers(S)&&w.selectAll("path.point").data(x.identity).enter().append("path").classed("point",!0).each(function(b){l(b,this)}),a.hasText(S)&&w.selectAll("g").data(x.identity).enter().append("g").append("text").each(function(b){l(b,this)}),i(c,_)})}function s(c,f){var g=c[0].trace,v=f[g.geo],T=v._subplot,l=g._length,_,w;if(x.isArrayOrTypedArray(g.locations)){var S=g.locationmode,E=S==="geojson-id"?e.extractTraceFeature(c):A(g,T.topojson);for(_=0;_<l;_++){w=c[_];var y=S==="geojson-id"?w.fOut:e.locationToFeature(S,w.loc,E);w.lonlat=y?y.properties.ct:[r,r]}}var b={padded:!0},p,u;if(v.fitbounds==="geojson"&&g.locationmode==="geojson-id"){var m=e.computeBbox(e.getTraceGeojson(g));p=[m[0],m[2]],u=[m[1],m[3]]}else{for(p=new Array(l),u=new Array(l),_=0;_<l;_++)w=c[_],p[_]=w.lonlat[0],u[_]=w.lonlat[1];b.ppad=o(g,l)}g._extremes.lon=t(v.lonaxis._ax,p,b),g._extremes.lat=t(v.lataxis._ax,u,b)}q.exports={calcGeoJSON:s,plot:n}}}),FU=Ze({"src/traces/scattergeo/hover.js"(Z,q){"use strict";var d=ef(),x=qs().BADNUM,A=l1(),M=ca().fillText,e=dg();q.exports=function(o,a,i){var n=o.cd,s=n[0].trace,c=o.xa,f=o.ya,g=o.subplot,v=g.projection.isLonLatOverEdges,T=g.project;function l(p){var u=p.lonlat;if(u[0]===x||v(u))return 1/0;var m=T(u),h=T([a,i]),P=Math.abs(m[0]-h[0]),L=Math.abs(m[1]-h[1]),z=Math.max(3,p.mrc||0);return Math.max(Math.sqrt(P*P+L*L)-z,1-3/z)}if(d.getClosest(n,l,o),o.index!==!1){var _=n[o.index],w=_.lonlat,S=[c.c2p(w),f.c2p(w)],E=_.mrc||1;o.x0=S[0]-E,o.x1=S[0]+E,o.y0=S[1]-E,o.y1=S[1]+E,o.loc=_.loc,o.lon=w[0],o.lat=w[1];var y={};y[s.geo]={_subplot:g};var b=s._module.formatLabels(_,s,y);return o.lonLabel=b.lonLabel,o.latLabel=b.latLabel,o.color=A(s,_),o.extraText=t(s,_,o,n[0].t.labels),o.hovertemplate=s.hovertemplate,[o]}};function t(r,o,a,i){if(r.hovertemplate)return;var n=o.hi||r.hoverinfo,s=n==="all"?e.hoverinfo.flags:n.split("+"),c=s.indexOf("location")!==-1&&Array.isArray(r.locations),f=s.indexOf("lon")!==-1,g=s.indexOf("lat")!==-1,v=s.indexOf("text")!==-1,T=[];function l(_){return _+"\xB0"}return c?T.push(o.loc):f&&g?T.push("("+l(a.latLabel)+", "+l(a.lonLabel)+")"):f?T.push(i.lon+l(a.lonLabel)):g&&T.push(i.lat+l(a.latLabel)),v&&M(o,r,T),T.join("<br>")}}}),OU=Ze({"src/traces/scattergeo/event_data.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t){x.lon=A.lon,x.lat=A.lat,x.location=A.loc?A.loc:null;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x}}}),BU=Ze({"src/traces/scattergeo/select.js"(Z,q){"use strict";var d=Fu(),x=qs().BADNUM;q.exports=function(M,e){var t=M.cd,r=M.xaxis,o=M.yaxis,a=[],i=t[0].trace,n,s,c,f,g,v=!d.hasMarkers(i)&&!d.hasText(i);if(v)return[];if(e===!1)for(g=0;g<t.length;g++)t[g].selected=0;else for(g=0;g<t.length;g++)n=t[g],s=n.lonlat,s[0]!==x&&(c=r.c2p(s),f=o.c2p(s),e.contains([c,f],null,g,M)?(a.push({pointNumber:g,lon:s[0],lat:s[1]}),n.selected=1):n.selected=0);return a}}}),yx=Ze({"node_modules/d3-array/dist/d3-array.js"(Z,q){(function(d,x){x(typeof Z=="object"&&typeof q<"u"?Z:d.d3=d.d3||{})})(Z,function(d){"use strict";function x(J,X){return J<X?-1:J>X?1:J>=X?0:NaN}function A(J){return J.length===1&&(J=M(J)),{left:function(X,oe,ie,j){for(ie==null&&(ie=0),j==null&&(j=X.length);ie<j;){var ee=ie+j>>>1;J(X[ee],oe)<0?ie=ee+1:j=ee}return ie},right:function(X,oe,ie,j){for(ie==null&&(ie=0),j==null&&(j=X.length);ie<j;){var ee=ie+j>>>1;J(X[ee],oe)>0?j=ee:ie=ee+1}return ie}}}function M(J){return function(X,oe){return x(J(X),oe)}}var e=A(x),t=e.right,r=e.left;function o(J,X){X==null&&(X=a);for(var oe=0,ie=J.length-1,j=J[0],ee=new Array(ie<0?0:ie);oe<ie;)ee[oe]=X(j,j=J[++oe]);return ee}function a(J,X){return[J,X]}function i(J,X,oe){var ie=J.length,j=X.length,ee=new Array(ie*j),re,ce,be,Ae;for(oe==null&&(oe=a),re=be=0;re<ie;++re)for(Ae=J[re],ce=0;ce<j;++ce,++be)ee[be]=oe(Ae,X[ce]);return ee}function n(J,X){return X<J?-1:X>J?1:X>=J?0:NaN}function s(J){return J===null?NaN:+J}function c(J,X){var oe=J.length,ie=0,j=-1,ee=0,re,ce,be=0;if(X==null)for(;++j<oe;)isNaN(re=s(J[j]))||(ce=re-ee,ee+=ce/++ie,be+=ce*(re-ee));else for(;++j<oe;)isNaN(re=s(X(J[j],j,J)))||(ce=re-ee,ee+=ce/++ie,be+=ce*(re-ee));if(ie>1)return be/(ie-1)}function f(J,X){var oe=c(J,X);return oe&&Math.sqrt(oe)}function g(J,X){var oe=J.length,ie=-1,j,ee,re;if(X==null){for(;++ie<oe;)if((j=J[ie])!=null&&j>=j)for(ee=re=j;++ie<oe;)(j=J[ie])!=null&&(ee>j&&(ee=j),re<j&&(re=j))}else for(;++ie<oe;)if((j=X(J[ie],ie,J))!=null&&j>=j)for(ee=re=j;++ie<oe;)(j=X(J[ie],ie,J))!=null&&(ee>j&&(ee=j),re<j&&(re=j));return[ee,re]}var v=Array.prototype,T=v.slice,l=v.map;function _(J){return function(){return J}}function w(J){return J}function S(J,X,oe){J=+J,X=+X,oe=(j=arguments.length)<2?(X=J,J=0,1):j<3?1:+oe;for(var ie=-1,j=Math.max(0,Math.ceil((X-J)/oe))|0,ee=new Array(j);++ie<j;)ee[ie]=J+ie*oe;return ee}var E=Math.sqrt(50),y=Math.sqrt(10),b=Math.sqrt(2);function p(J,X,oe){var ie,j=-1,ee,re,ce;if(X=+X,J=+J,oe=+oe,J===X&&oe>0)return[J];if((ie=X<J)&&(ee=J,J=X,X=ee),(ce=u(J,X,oe))===0||!isFinite(ce))return[];if(ce>0)for(J=Math.ceil(J/ce),X=Math.floor(X/ce),re=new Array(ee=Math.ceil(X-J+1));++j<ee;)re[j]=(J+j)*ce;else for(J=Math.floor(J*ce),X=Math.ceil(X*ce),re=new Array(ee=Math.ceil(J-X+1));++j<ee;)re[j]=(J-j)/ce;return ie&&re.reverse(),re}function u(J,X,oe){var ie=(X-J)/Math.max(0,oe),j=Math.floor(Math.log(ie)/Math.LN10),ee=ie/Math.pow(10,j);return j>=0?(ee>=E?10:ee>=y?5:ee>=b?2:1)*Math.pow(10,j):-Math.pow(10,-j)/(ee>=E?10:ee>=y?5:ee>=b?2:1)}function m(J,X,oe){var ie=Math.abs(X-J)/Math.max(0,oe),j=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),ee=ie/j;return ee>=E?j*=10:ee>=y?j*=5:ee>=b&&(j*=2),X<J?-j:j}function h(J){return Math.ceil(Math.log(J.length)/Math.LN2)+1}function P(){var J=w,X=g,oe=h;function ie(j){var ee,re=j.length,ce,be=new Array(re);for(ee=0;ee<re;++ee)be[ee]=J(j[ee],ee,j);var Ae=X(be),ze=Ae[0],Re=Ae[1],Xe=oe(be,ze,Re);Array.isArray(Xe)||(Xe=m(ze,Re,Xe),Xe=S(Math.ceil(ze/Xe)*Xe,Re,Xe));for(var it=Xe.length;Xe[0]<=ze;)Xe.shift(),--it;for(;Xe[it-1]>Re;)Xe.pop(),--it;var ot=new Array(it+1),tt;for(ee=0;ee<=it;++ee)tt=ot[ee]=[],tt.x0=ee>0?Xe[ee-1]:ze,tt.x1=ee<it?Xe[ee]:Re;for(ee=0;ee<re;++ee)ce=be[ee],ze<=ce&&ce<=Re&&ot[t(Xe,ce,0,it)].push(j[ee]);return ot}return ie.value=function(j){return arguments.length?(J=typeof j=="function"?j:_(j),ie):J},ie.domain=function(j){return arguments.length?(X=typeof j=="function"?j:_([j[0],j[1]]),ie):X},ie.thresholds=function(j){return arguments.length?(oe=typeof j=="function"?j:Array.isArray(j)?_(T.call(j)):_(j),ie):oe},ie}function L(J,X,oe){if(oe==null&&(oe=s),!!(ie=J.length)){if((X=+X)<=0||ie<2)return+oe(J[0],0,J);if(X>=1)return+oe(J[ie-1],ie-1,J);var ie,j=(ie-1)*X,ee=Math.floor(j),re=+oe(J[ee],ee,J),ce=+oe(J[ee+1],ee+1,J);return re+(ce-re)*(j-ee)}}function z(J,X,oe){return J=l.call(J,s).sort(x),Math.ceil((oe-X)/(2*(L(J,.75)-L(J,.25))*Math.pow(J.length,-1/3)))}function F(J,X,oe){return Math.ceil((oe-X)/(3.5*f(J)*Math.pow(J.length,-1/3)))}function B(J,X){var oe=J.length,ie=-1,j,ee;if(X==null){for(;++ie<oe;)if((j=J[ie])!=null&&j>=j)for(ee=j;++ie<oe;)(j=J[ie])!=null&&j>ee&&(ee=j)}else for(;++ie<oe;)if((j=X(J[ie],ie,J))!=null&&j>=j)for(ee=j;++ie<oe;)(j=X(J[ie],ie,J))!=null&&j>ee&&(ee=j);return ee}function O(J,X){var oe=J.length,ie=oe,j=-1,ee,re=0;if(X==null)for(;++j<oe;)isNaN(ee=s(J[j]))?--ie:re+=ee;else for(;++j<oe;)isNaN(ee=s(X(J[j],j,J)))?--ie:re+=ee;if(ie)return re/ie}function I(J,X){var oe=J.length,ie=-1,j,ee=[];if(X==null)for(;++ie<oe;)isNaN(j=s(J[ie]))||ee.push(j);else for(;++ie<oe;)isNaN(j=s(X(J[ie],ie,J)))||ee.push(j);return L(ee.sort(x),.5)}function N(J){for(var X=J.length,oe,ie=-1,j=0,ee,re;++ie<X;)j+=J[ie].length;for(ee=new Array(j);--X>=0;)for(re=J[X],oe=re.length;--oe>=0;)ee[--j]=re[oe];return ee}function U(J,X){var oe=J.length,ie=-1,j,ee;if(X==null){for(;++ie<oe;)if((j=J[ie])!=null&&j>=j)for(ee=j;++ie<oe;)(j=J[ie])!=null&&ee>j&&(ee=j)}else for(;++ie<oe;)if((j=X(J[ie],ie,J))!=null&&j>=j)for(ee=j;++ie<oe;)(j=X(J[ie],ie,J))!=null&&ee>j&&(ee=j);return ee}function W(J,X){for(var oe=X.length,ie=new Array(oe);oe--;)ie[oe]=J[X[oe]];return ie}function Q(J,X){if(oe=J.length){var oe,ie=0,j=0,ee,re=J[j];for(X==null&&(X=x);++ie<oe;)(X(ee=J[ie],re)<0||X(re,re)!==0)&&(re=ee,j=ie);if(X(re,re)===0)return j}}function ue(J,X,oe){for(var ie=(oe??J.length)-(X=X==null?0:+X),j,ee;ie;)ee=Math.random()*ie--|0,j=J[ie+X],J[ie+X]=J[ee+X],J[ee+X]=j;return J}function le(J,X){var oe=J.length,ie=-1,j,ee=0;if(X==null)for(;++ie<oe;)(j=+J[ie])&&(ee+=j);else for(;++ie<oe;)(j=+X(J[ie],ie,J))&&(ee+=j);return ee}function he(J){if(!(ee=J.length))return[];for(var X=-1,oe=U(J,G),ie=new Array(oe);++X<oe;)for(var j=-1,ee,re=ie[X]=new Array(ee);++j<ee;)re[j]=J[j][X];return ie}function G(J){return J.length}function $(){return he(arguments)}d.bisect=t,d.bisectRight=t,d.bisectLeft=r,d.ascending=x,d.bisector=A,d.cross=i,d.descending=n,d.deviation=f,d.extent=g,d.histogram=P,d.thresholdFreedmanDiaconis=z,d.thresholdScott=F,d.thresholdSturges=h,d.max=B,d.mean=O,d.median=I,d.merge=N,d.min=U,d.pairs=o,d.permute=W,d.quantile=L,d.range=S,d.scan=Q,d.shuffle=ue,d.sum=le,d.ticks=p,d.tickIncrement=u,d.tickStep=m,d.transpose=he,d.variance=c,d.zip=$,Object.defineProperty(d,"__esModule",{value:!0})})}}),DE=Ze({"node_modules/d3-geo/dist/d3-geo.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,yx()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function A(){return new M}function M(){this.reset()}M.prototype={constructor:M,reset:function(){this.s=this.t=0},add:function(er){t(e,er,this.t),t(this,e.s,this.s),this.s?this.t+=e.t:this.s=e.t},valueOf:function(){return this.s}};var e=new M;function t(er,yr,na){var $r=er.s=yr+na,La=$r-yr,hi=$r-La;er.t=yr-hi+(na-La)}var r=1e-6,o=1e-12,a=Math.PI,i=a/2,n=a/4,s=a*2,c=180/a,f=a/180,g=Math.abs,v=Math.atan,T=Math.atan2,l=Math.cos,_=Math.ceil,w=Math.exp,S=Math.log,E=Math.pow,y=Math.sin,b=Math.sign||function(er){return er>0?1:er<0?-1:0},p=Math.sqrt,u=Math.tan;function m(er){return er>1?0:er<-1?a:Math.acos(er)}function h(er){return er>1?i:er<-1?-i:Math.asin(er)}function P(er){return(er=y(er/2))*er}function L(){}function z(er,yr){er&&B.hasOwnProperty(er.type)&&B[er.type](er,yr)}var F={Feature:function(er,yr){z(er.geometry,yr)},FeatureCollection:function(er,yr){for(var na=er.features,$r=-1,La=na.length;++$r<La;)z(na[$r].geometry,yr)}},B={Sphere:function(er,yr){yr.sphere()},Point:function(er,yr){er=er.coordinates,yr.point(er[0],er[1],er[2])},MultiPoint:function(er,yr){for(var na=er.coordinates,$r=-1,La=na.length;++$r<La;)er=na[$r],yr.point(er[0],er[1],er[2])},LineString:function(er,yr){O(er.coordinates,yr,0)},MultiLineString:function(er,yr){for(var na=er.coordinates,$r=-1,La=na.length;++$r<La;)O(na[$r],yr,0)},Polygon:function(er,yr){I(er.coordinates,yr)},MultiPolygon:function(er,yr){for(var na=er.coordinates,$r=-1,La=na.length;++$r<La;)I(na[$r],yr)},GeometryCollection:function(er,yr){for(var na=er.geometries,$r=-1,La=na.length;++$r<La;)z(na[$r],yr)}};function O(er,yr,na){var $r=-1,La=er.length-na,hi;for(yr.lineStart();++$r<La;)hi=er[$r],yr.point(hi[0],hi[1],hi[2]);yr.lineEnd()}function I(er,yr){var na=-1,$r=er.length;for(yr.polygonStart();++na<$r;)O(er[na],yr,1);yr.polygonEnd()}function N(er,yr){er&&F.hasOwnProperty(er.type)?F[er.type](er,yr):z(er,yr)}var U=A(),W=A(),Q,ue,le,he,G,$={point:L,lineStart:L,lineEnd:L,polygonStart:function(){U.reset(),$.lineStart=J,$.lineEnd=X},polygonEnd:function(){var er=+U;W.add(er<0?s+er:er),this.lineStart=this.lineEnd=this.point=L},sphere:function(){W.add(s)}};function J(){$.point=oe}function X(){ie(Q,ue)}function oe(er,yr){$.point=ie,Q=er,ue=yr,er*=f,yr*=f,le=er,he=l(yr=yr/2+n),G=y(yr)}function ie(er,yr){er*=f,yr*=f,yr=yr/2+n;var na=er-le,$r=na>=0?1:-1,La=$r*na,hi=l(yr),Pi=y(yr),Zi=G*Pi,tn=he*hi+Zi*l(La),dn=Zi*$r*y(La);U.add(T(dn,tn)),le=er,he=hi,G=Pi}function j(er){return W.reset(),N(er,$),W*2}function ee(er){return[T(er[1],er[0]),h(er[2])]}function re(er){var yr=er[0],na=er[1],$r=l(na);return[$r*l(yr),$r*y(yr),y(na)]}function ce(er,yr){return er[0]*yr[0]+er[1]*yr[1]+er[2]*yr[2]}function be(er,yr){return[er[1]*yr[2]-er[2]*yr[1],er[2]*yr[0]-er[0]*yr[2],er[0]*yr[1]-er[1]*yr[0]]}function Ae(er,yr){er[0]+=yr[0],er[1]+=yr[1],er[2]+=yr[2]}function ze(er,yr){return[er[0]*yr,er[1]*yr,er[2]*yr]}function Re(er){var yr=p(er[0]*er[0]+er[1]*er[1]+er[2]*er[2]);er[0]/=yr,er[1]/=yr,er[2]/=yr}var Xe,it,ot,tt,lt,Ee,_e,fe,Fe=A(),rt,st,Qe={point:Lt,lineStart:Vt,lineEnd:Zt,polygonStart:function(){Qe.point=Sr,Qe.lineStart=xr,Qe.lineEnd=jr,Fe.reset(),$.polygonStart()},polygonEnd:function(){$.polygonEnd(),Qe.point=Lt,Qe.lineStart=Vt,Qe.lineEnd=Zt,U<0?(Xe=-(ot=180),it=-(tt=90)):Fe>r?tt=90:Fe<-r&&(it=-90),st[0]=Xe,st[1]=ot},sphere:function(){Xe=-(ot=180),it=-(tt=90)}};function Lt(er,yr){rt.push(st=[Xe=er,ot=er]),yr<it&&(it=yr),yr>tt&&(tt=yr)}function kt(er,yr){var na=re([er*f,yr*f]);if(fe){var $r=be(fe,na),La=[$r[1],-$r[0],0],hi=be(La,$r);Re(hi),hi=ee(hi);var Pi=er-lt,Zi=Pi>0?1:-1,tn=hi[0]*c*Zi,dn,Ri=g(Pi)>180;Ri^(Zi*lt<tn&&tn<Zi*er)?(dn=hi[1]*c,dn>tt&&(tt=dn)):(tn=(tn+360)%360-180,Ri^(Zi*lt<tn&&tn<Zi*er)?(dn=-hi[1]*c,dn<it&&(it=dn)):(yr<it&&(it=yr),yr>tt&&(tt=yr))),Ri?er<lt?wr(Xe,er)>wr(Xe,ot)&&(ot=er):wr(er,ot)>wr(Xe,ot)&&(Xe=er):ot>=Xe?(er<Xe&&(Xe=er),er>ot&&(ot=er)):er>lt?wr(Xe,er)>wr(Xe,ot)&&(ot=er):wr(er,ot)>wr(Xe,ot)&&(Xe=er)}else rt.push(st=[Xe=er,ot=er]);yr<it&&(it=yr),yr>tt&&(tt=yr),fe=na,lt=er}function Vt(){Qe.point=kt}function Zt(){st[0]=Xe,st[1]=ot,Qe.point=Lt,fe=null}function Sr(er,yr){if(fe){var na=er-lt;Fe.add(g(na)>180?na+(na>0?360:-360):na)}else Ee=er,_e=yr;$.point(er,yr),kt(er,yr)}function xr(){$.lineStart()}function jr(){Sr(Ee,_e),$.lineEnd(),g(Fe)>r&&(Xe=-(ot=180)),st[0]=Xe,st[1]=ot,fe=null}function wr(er,yr){return(yr-=er)<0?yr+360:yr}function Ir(er,yr){return er[0]-yr[0]}function bt(er,yr){return er[0]<=er[1]?er[0]<=yr&&yr<=er[1]:yr<er[0]||er[1]<yr}function Be(er){var yr,na,$r,La,hi,Pi,Zi;if(tt=ot=-(Xe=it=1/0),rt=[],N(er,Qe),na=rt.length){for(rt.sort(Ir),yr=1,$r=rt[0],hi=[$r];yr<na;++yr)La=rt[yr],bt($r,La[0])||bt($r,La[1])?(wr($r[0],La[1])>wr($r[0],$r[1])&&($r[1]=La[1]),wr(La[0],$r[1])>wr($r[0],$r[1])&&($r[0]=La[0])):hi.push($r=La);for(Pi=-1/0,na=hi.length-1,yr=0,$r=hi[na];yr<=na;$r=La,++yr)La=hi[yr],(Zi=wr($r[1],La[0]))>Pi&&(Pi=Zi,Xe=La[0],ot=$r[1])}return rt=st=null,Xe===1/0||it===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xe,it],[ot,tt]]}var Ke,Ue,Me,qe,Ce,Te,Pe,at,yt,Tt,Ot,Gt,rr,Qt,Tr,la,Ua={sphere:L,point:Ba,lineStart:ei,lineEnd:Ci,polygonStart:function(){Ua.lineStart=Jt,Ua.lineEnd=Nt},polygonEnd:function(){Ua.lineStart=ei,Ua.lineEnd=Ci}};function Ba(er,yr){er*=f,yr*=f;var na=l(yr);Ra(na*l(er),na*y(er),y(yr))}function Ra(er,yr,na){++Ke,Me+=(er-Me)/Ke,qe+=(yr-qe)/Ke,Ce+=(na-Ce)/Ke}function ei(){Ua.point=za}function za(er,yr){er*=f,yr*=f;var na=l(yr);Qt=na*l(er),Tr=na*y(er),la=y(yr),Ua.point=ti,Ra(Qt,Tr,la)}function ti(er,yr){er*=f,yr*=f;var na=l(yr),$r=na*l(er),La=na*y(er),hi=y(yr),Pi=T(p((Pi=Tr*hi-la*La)*Pi+(Pi=la*$r-Qt*hi)*Pi+(Pi=Qt*La-Tr*$r)*Pi),Qt*$r+Tr*La+la*hi);Ue+=Pi,Te+=Pi*(Qt+(Qt=$r)),Pe+=Pi*(Tr+(Tr=La)),at+=Pi*(la+(la=hi)),Ra(Qt,Tr,la)}function Ci(){Ua.point=Ba}function Jt(){Ua.point=Kt}function Nt(){Wt(Gt,rr),Ua.point=Ba}function Kt(er,yr){Gt=er,rr=yr,er*=f,yr*=f,Ua.point=Wt;var na=l(yr);Qt=na*l(er),Tr=na*y(er),la=y(yr),Ra(Qt,Tr,la)}function Wt(er,yr){er*=f,yr*=f;var na=l(yr),$r=na*l(er),La=na*y(er),hi=y(yr),Pi=Tr*hi-la*La,Zi=la*$r-Qt*hi,tn=Qt*La-Tr*$r,dn=p(Pi*Pi+Zi*Zi+tn*tn),Ri=h(dn),Fi=dn&&-Ri/dn;yt+=Fi*Pi,Tt+=Fi*Zi,Ot+=Fi*tn,Ue+=Ri,Te+=Ri*(Qt+(Qt=$r)),Pe+=Ri*(Tr+(Tr=La)),at+=Ri*(la+(la=hi)),Ra(Qt,Tr,la)}function Pr(er){Ke=Ue=Me=qe=Ce=Te=Pe=at=yt=Tt=Ot=0,N(er,Ua);var yr=yt,na=Tt,$r=Ot,La=yr*yr+na*na+$r*$r;return La<o&&(yr=Te,na=Pe,$r=at,Ue<r&&(yr=Me,na=qe,$r=Ce),La=yr*yr+na*na+$r*$r,La<o)?[NaN,NaN]:[T(na,yr)*c,h($r/p(La))*c]}function ta(er){return function(){return er}}function ma(er,yr){function na($r,La){return $r=er($r,La),yr($r[0],$r[1])}return er.invert&&yr.invert&&(na.invert=function($r,La){return $r=yr.invert($r,La),$r&&er.invert($r[0],$r[1])}),na}function ra(er,yr){return[g(er)>a?er+Math.round(-er/s)*s:er,yr]}ra.invert=ra;function Ia(er,yr,na){return(er%=s)?yr||na?ma($a(er),ai(yr,na)):$a(er):yr||na?ai(yr,na):ra}function Ha(er){return function(yr,na){return yr+=er,[yr>a?yr-s:yr<-a?yr+s:yr,na]}}function $a(er){var yr=Ha(er);return yr.invert=Ha(-er),yr}function ai(er,yr){var na=l(er),$r=y(er),La=l(yr),hi=y(yr);function Pi(Zi,tn){var dn=l(tn),Ri=l(Zi)*dn,Fi=y(Zi)*dn,qi=y(tn),_i=qi*na+Ri*$r;return[T(Fi*La-_i*hi,Ri*na-qi*$r),h(_i*La+Fi*hi)]}return Pi.invert=function(Zi,tn){var dn=l(tn),Ri=l(Zi)*dn,Fi=y(Zi)*dn,qi=y(tn),_i=qi*La-Fi*hi;return[T(Fi*La+qi*hi,Ri*na+_i*$r),h(_i*na-Ri*$r)]},Pi}function mi(er){er=Ia(er[0]*f,er[1]*f,er.length>2?er[2]*f:0);function yr(na){return na=er(na[0]*f,na[1]*f),na[0]*=c,na[1]*=c,na}return yr.invert=function(na){return na=er.invert(na[0]*f,na[1]*f),na[0]*=c,na[1]*=c,na},yr}function xt(er,yr,na,$r,La,hi){if(na){var Pi=l(yr),Zi=y(yr),tn=$r*na;La==null?(La=yr+$r*s,hi=yr-tn/2):(La=ct(Pi,La),hi=ct(Pi,hi),($r>0?La<hi:La>hi)&&(La+=$r*s));for(var dn,Ri=La;$r>0?Ri>hi:Ri<hi;Ri-=tn)dn=ee([Pi,-Zi*l(Ri),-Zi*y(Ri)]),er.point(dn[0],dn[1])}}function ct(er,yr){yr=re(yr),yr[0]-=er,Re(yr);var na=m(-yr[1]);return((-yr[2]<0?-na:na)+s-r)%s}function Nr(){var er=ta([0,0]),yr=ta(90),na=ta(6),$r,La,hi={point:Pi};function Pi(tn,dn){$r.push(tn=La(tn,dn)),tn[0]*=c,tn[1]*=c}function Zi(){var tn=er.apply(this,arguments),dn=yr.apply(this,arguments)*f,Ri=na.apply(this,arguments)*f;return $r=[],La=Ia(-tn[0]*f,-tn[1]*f,0).invert,xt(hi,dn,Ri,1),tn={type:"Polygon",coordinates:[$r]},$r=La=null,tn}return Zi.center=function(tn){return arguments.length?(er=typeof tn=="function"?tn:ta([+tn[0],+tn[1]]),Zi):er},Zi.radius=function(tn){return arguments.length?(yr=typeof tn=="function"?tn:ta(+tn),Zi):yr},Zi.precision=function(tn){return arguments.length?(na=typeof tn=="function"?tn:ta(+tn),Zi):na},Zi}function Or(){var er=[],yr;return{point:function(na,$r,La){yr.push([na,$r,La])},lineStart:function(){er.push(yr=[])},lineEnd:L,rejoin:function(){er.length>1&&er.push(er.pop().concat(er.shift()))},result:function(){var na=er;return er=[],yr=null,na}}}function Rr(er,yr){return g(er[0]-yr[0])<r&&g(er[1]-yr[1])<r}function Lr(er,yr,na,$r){this.x=er,this.z=yr,this.o=na,this.e=$r,this.v=!1,this.n=this.p=null}function Gr(er,yr,na,$r,La){var hi=[],Pi=[],Zi,tn;if(er.forEach(function(Mn){if(!((Kn=Mn.length-1)<=0)){var Kn,ao=Mn[0],Jn=Mn[Kn],co;if(Rr(ao,Jn)){if(!ao[2]&&!Jn[2]){for(La.lineStart(),Zi=0;Zi<Kn;++Zi)La.point((ao=Mn[Zi])[0],ao[1]);La.lineEnd();return}Jn[0]+=2*r}hi.push(co=new Lr(ao,Mn,null,!0)),Pi.push(co.o=new Lr(ao,null,co,!1)),hi.push(co=new Lr(Jn,Mn,null,!1)),Pi.push(co.o=new Lr(Jn,null,co,!0))}}),!!hi.length){for(Pi.sort(yr),Kr(hi),Kr(Pi),Zi=0,tn=Pi.length;Zi<tn;++Zi)Pi[Zi].e=na=!na;for(var dn=hi[0],Ri,Fi;;){for(var qi=dn,_i=!0;qi.v;)if((qi=qi.n)===dn)return;Ri=qi.z,La.lineStart();do{if(qi.v=qi.o.v=!0,qi.e){if(_i)for(Zi=0,tn=Ri.length;Zi<tn;++Zi)La.point((Fi=Ri[Zi])[0],Fi[1]);else $r(qi.x,qi.n.x,1,La);qi=qi.n}else{if(_i)for(Ri=qi.p.z,Zi=Ri.length-1;Zi>=0;--Zi)La.point((Fi=Ri[Zi])[0],Fi[1]);else $r(qi.x,qi.p.x,-1,La);qi=qi.p}qi=qi.o,Ri=qi.z,_i=!_i}while(!qi.v);La.lineEnd()}}}function Kr(er){if(yr=er.length){for(var yr,na=0,$r=er[0],La;++na<yr;)$r.n=La=er[na],La.p=$r,$r=La;$r.n=La=er[0],La.p=$r}}var Ur=A();function aa(er){return g(er[0])<=a?er[0]:b(er[0])*((g(er[0])+a)%s-a)}function da(er,yr){var na=aa(yr),$r=yr[1],La=y($r),hi=[y(na),-l(na),0],Pi=0,Zi=0;Ur.reset(),La===1?$r=i+r:La===-1&&($r=-i-r);for(var tn=0,dn=er.length;tn<dn;++tn)if(Fi=(Ri=er[tn]).length)for(var Ri,Fi,qi=Ri[Fi-1],_i=aa(qi),Mn=qi[1]/2+n,Kn=y(Mn),ao=l(Mn),Jn=0;Jn<Fi;++Jn,_i=wn,Kn=_o,ao=Qo,qi=co){var co=Ri[Jn],wn=aa(co),un=co[1]/2+n,_o=y(un),Qo=l(un),xs=wn-_i,Qs=xs>=0?1:-1,Rs=Qs*xs,Ks=Rs>a,ys=Kn*_o;if(Ur.add(T(ys*Qs*y(Rs),ao*Qo+ys*l(Rs))),Pi+=Ks?xs+Qs*s:xs,Ks^_i>=na^wn>=na){var Fl=be(re(qi),re(co));Re(Fl);var yl=be(hi,Fl);Re(yl);var sl=(Ks^xs>=0?-1:1)*h(yl[2]);($r>sl||$r===sl&&(Fl[0]||Fl[1]))&&(Zi+=Ks^xs>=0?1:-1)}}return(Pi<-r||Pi<r&&Ur<-r)^Zi&1}function fa(er,yr,na,$r){return function(La){var hi=yr(La),Pi=Or(),Zi=yr(Pi),tn=!1,dn,Ri,Fi,qi={point:_i,lineStart:Kn,lineEnd:ao,polygonStart:function(){qi.point=Jn,qi.lineStart=co,qi.lineEnd=wn,Ri=[],dn=[]},polygonEnd:function(){qi.point=_i,qi.lineStart=Kn,qi.lineEnd=ao,Ri=x.merge(Ri);var un=da(dn,$r);Ri.length?(tn||(La.polygonStart(),tn=!0),Gr(Ri,dr,un,na,La)):un&&(tn||(La.polygonStart(),tn=!0),La.lineStart(),na(null,null,1,La),La.lineEnd()),tn&&(La.polygonEnd(),tn=!1),Ri=dn=null},sphere:function(){La.polygonStart(),La.lineStart(),na(null,null,1,La),La.lineEnd(),La.polygonEnd()}};function _i(un,_o){er(un,_o)&&La.point(un,_o)}function Mn(un,_o){hi.point(un,_o)}function Kn(){qi.point=Mn,hi.lineStart()}function ao(){qi.point=_i,hi.lineEnd()}function Jn(un,_o){Fi.push([un,_o]),Zi.point(un,_o)}function co(){Zi.lineStart(),Fi=[]}function wn(){Jn(Fi[0][0],Fi[0][1]),Zi.lineEnd();var un=Zi.clean(),_o=Pi.result(),Qo,xs=_o.length,Qs,Rs,Ks;if(Fi.pop(),dn.push(Fi),Fi=null,!!xs){if(un&1){if(Rs=_o[0],(Qs=Rs.length-1)>0){for(tn||(La.polygonStart(),tn=!0),La.lineStart(),Qo=0;Qo<Qs;++Qo)La.point((Ks=Rs[Qo])[0],Ks[1]);La.lineEnd()}return}xs>1&&un&2&&_o.push(_o.pop().concat(_o.shift())),Ri.push(_o.filter(It))}}return qi}}function It(er){return er.length>1}function dr(er,yr){return((er=er.x)[0]<0?er[1]-i-r:i-er[1])-((yr=yr.x)[0]<0?yr[1]-i-r:i-yr[1])}var kr=fa(function(){return!0},ia,Fa,[-a,-i]);function ia(er){var yr=NaN,na=NaN,$r=NaN,La;return{lineStart:function(){er.lineStart(),La=1},point:function(hi,Pi){var Zi=hi>0?a:-a,tn=g(hi-yr);g(tn-a)<r?(er.point(yr,na=(na+Pi)/2>0?i:-i),er.point($r,na),er.lineEnd(),er.lineStart(),er.point(Zi,na),er.point(hi,na),La=0):$r!==Zi&&tn>=a&&(g(yr-$r)<r&&(yr-=$r*r),g(hi-Zi)<r&&(hi-=Zi*r),na=Ca(yr,na,hi,Pi),er.point($r,na),er.lineEnd(),er.lineStart(),er.point(Zi,na),La=0),er.point(yr=hi,na=Pi),$r=Zi},lineEnd:function(){er.lineEnd(),yr=na=NaN},clean:function(){return 2-La}}}function Ca(er,yr,na,$r){var La,hi,Pi=y(er-na);return g(Pi)>r?v((y(yr)*(hi=l($r))*y(na)-y($r)*(La=l(yr))*y(er))/(La*hi*Pi)):(yr+$r)/2}function Fa(er,yr,na,$r){var La;if(er==null)La=na*i,$r.point(-a,La),$r.point(0,La),$r.point(a,La),$r.point(a,0),$r.point(a,-La),$r.point(0,-La),$r.point(-a,-La),$r.point(-a,0),$r.point(-a,La);else if(g(er[0]-yr[0])>r){var hi=er[0]<yr[0]?a:-a;La=na*hi/2,$r.point(-hi,La),$r.point(0,La),$r.point(hi,La)}else $r.point(yr[0],yr[1])}function Ya(er){var yr=l(er),na=6*f,$r=yr>0,La=g(yr)>r;function hi(Ri,Fi,qi,_i){xt(_i,er,na,qi,Ri,Fi)}function Pi(Ri,Fi){return l(Ri)*l(Fi)>yr}function Zi(Ri){var Fi,qi,_i,Mn,Kn;return{lineStart:function(){Mn=_i=!1,Kn=1},point:function(ao,Jn){var co=[ao,Jn],wn,un=Pi(ao,Jn),_o=$r?un?0:dn(ao,Jn):un?dn(ao+(ao<0?a:-a),Jn):0;if(!Fi&&(Mn=_i=un)&&Ri.lineStart(),un!==_i&&(wn=tn(Fi,co),(!wn||Rr(Fi,wn)||Rr(co,wn))&&(co[2]=1)),un!==_i)Kn=0,un?(Ri.lineStart(),wn=tn(co,Fi),Ri.point(wn[0],wn[1])):(wn=tn(Fi,co),Ri.point(wn[0],wn[1],2),Ri.lineEnd()),Fi=wn;else if(La&&Fi&&$r^un){var Qo;!(_o&qi)&&(Qo=tn(co,Fi,!0))&&(Kn=0,$r?(Ri.lineStart(),Ri.point(Qo[0][0],Qo[0][1]),Ri.point(Qo[1][0],Qo[1][1]),Ri.lineEnd()):(Ri.point(Qo[1][0],Qo[1][1]),Ri.lineEnd(),Ri.lineStart(),Ri.point(Qo[0][0],Qo[0][1],3)))}un&&(!Fi||!Rr(Fi,co))&&Ri.point(co[0],co[1]),Fi=co,_i=un,qi=_o},lineEnd:function(){_i&&Ri.lineEnd(),Fi=null},clean:function(){return Kn|(Mn&&_i)<<1}}}function tn(Ri,Fi,qi){var _i=re(Ri),Mn=re(Fi),Kn=[1,0,0],ao=be(_i,Mn),Jn=ce(ao,ao),co=ao[0],wn=Jn-co*co;if(!wn)return!qi&&Ri;var un=yr*Jn/wn,_o=-yr*co/wn,Qo=be(Kn,ao),xs=ze(Kn,un),Qs=ze(ao,_o);Ae(xs,Qs);var Rs=Qo,Ks=ce(xs,Rs),ys=ce(Rs,Rs),Fl=Ks*Ks-ys*(ce(xs,xs)-1);if(!(Fl<0)){var yl=p(Fl),sl=ze(Rs,(-Ks-yl)/ys);if(Ae(sl,xs),sl=ee(sl),!qi)return sl;var Un=Ri[0],Io=Fi[0],Xs=Ri[1],Ls=Fi[1],ou;Io<Un&&(ou=Un,Un=Io,Io=ou);var Iu=Io-Un,Zu=g(Iu-a)<r,Lc=Zu||Iu<r;if(!Zu&&Ls<Xs&&(ou=Xs,Xs=Ls,Ls=ou),Lc?Zu?Xs+Ls>0^sl[1]<(g(sl[0]-Un)<r?Xs:Ls):Xs<=sl[1]&&sl[1]<=Ls:Iu>a^(Un<=sl[0]&&sl[0]<=Io)){var yu=ze(Rs,(-Ks+yl)/ys);return Ae(yu,xs),[sl,ee(yu)]}}}function dn(Ri,Fi){var qi=$r?er:a-er,_i=0;return Ri<-qi?_i|=1:Ri>qi&&(_i|=2),Fi<-qi?_i|=4:Fi>qi&&(_i|=8),_i}return fa(Pi,Zi,hi,$r?[0,-er]:[-a,er-a])}function ha(er,yr,na,$r,La,hi){var Pi=er[0],Zi=er[1],tn=yr[0],dn=yr[1],Ri=0,Fi=1,qi=tn-Pi,_i=dn-Zi,Mn;if(Mn=na-Pi,!(!qi&&Mn>0)){if(Mn/=qi,qi<0){if(Mn<Ri)return;Mn<Fi&&(Fi=Mn)}else if(qi>0){if(Mn>Fi)return;Mn>Ri&&(Ri=Mn)}if(Mn=La-Pi,!(!qi&&Mn<0)){if(Mn/=qi,qi<0){if(Mn>Fi)return;Mn>Ri&&(Ri=Mn)}else if(qi>0){if(Mn<Ri)return;Mn<Fi&&(Fi=Mn)}if(Mn=$r-Zi,!(!_i&&Mn>0)){if(Mn/=_i,_i<0){if(Mn<Ri)return;Mn<Fi&&(Fi=Mn)}else if(_i>0){if(Mn>Fi)return;Mn>Ri&&(Ri=Mn)}if(Mn=hi-Zi,!(!_i&&Mn<0)){if(Mn/=_i,_i<0){if(Mn>Fi)return;Mn>Ri&&(Ri=Mn)}else if(_i>0){if(Mn<Ri)return;Mn<Fi&&(Fi=Mn)}return Ri>0&&(er[0]=Pi+Ri*qi,er[1]=Zi+Ri*_i),Fi<1&&(yr[0]=Pi+Fi*qi,yr[1]=Zi+Fi*_i),!0}}}}}var Da=1e9,Xi=-Da;function Li(er,yr,na,$r){function La(dn,Ri){return er<=dn&&dn<=na&&yr<=Ri&&Ri<=$r}function hi(dn,Ri,Fi,qi){var _i=0,Mn=0;if(dn==null||(_i=Pi(dn,Fi))!==(Mn=Pi(Ri,Fi))||tn(dn,Ri)<0^Fi>0)do qi.point(_i===0||_i===3?er:na,_i>1?$r:yr);while((_i=(_i+Fi+4)%4)!==Mn);else qi.point(Ri[0],Ri[1])}function Pi(dn,Ri){return g(dn[0]-er)<r?Ri>0?0:3:g(dn[0]-na)<r?Ri>0?2:1:g(dn[1]-yr)<r?Ri>0?1:0:Ri>0?3:2}function Zi(dn,Ri){return tn(dn.x,Ri.x)}function tn(dn,Ri){var Fi=Pi(dn,1),qi=Pi(Ri,1);return Fi!==qi?Fi-qi:Fi===0?Ri[1]-dn[1]:Fi===1?dn[0]-Ri[0]:Fi===2?dn[1]-Ri[1]:Ri[0]-dn[0]}return function(dn){var Ri=dn,Fi=Or(),qi,_i,Mn,Kn,ao,Jn,co,wn,un,_o,Qo,xs={point:Qs,lineStart:Fl,lineEnd:yl,polygonStart:Ks,polygonEnd:ys};function Qs(Un,Io){La(Un,Io)&&Ri.point(Un,Io)}function Rs(){for(var Un=0,Io=0,Xs=_i.length;Io<Xs;++Io)for(var Ls=_i[Io],ou=1,Iu=Ls.length,Zu=Ls[0],Lc,yu,Pc=Zu[0],wu=Zu[1];ou<Iu;++ou)Lc=Pc,yu=wu,Zu=Ls[ou],Pc=Zu[0],wu=Zu[1],yu<=$r?wu>$r&&(Pc-Lc)*($r-yu)>(wu-yu)*(er-Lc)&&++Un:wu<=$r&&(Pc-Lc)*($r-yu)<(wu-yu)*(er-Lc)&&--Un;return Un}function Ks(){Ri=Fi,qi=[],_i=[],Qo=!0}function ys(){var Un=Rs(),Io=Qo&&Un,Xs=(qi=x.merge(qi)).length;(Io||Xs)&&(dn.polygonStart(),Io&&(dn.lineStart(),hi(null,null,1,dn),dn.lineEnd()),Xs&&Gr(qi,Zi,Un,hi,dn),dn.polygonEnd()),Ri=dn,qi=_i=Mn=null}function Fl(){xs.point=sl,_i&&_i.push(Mn=[]),_o=!0,un=!1,co=wn=NaN}function yl(){qi&&(sl(Kn,ao),Jn&&un&&Fi.rejoin(),qi.push(Fi.result())),xs.point=Qs,un&&Ri.lineEnd()}function sl(Un,Io){var Xs=La(Un,Io);if(_i&&Mn.push([Un,Io]),_o)Kn=Un,ao=Io,Jn=Xs,_o=!1,Xs&&(Ri.lineStart(),Ri.point(Un,Io));else if(Xs&&un)Ri.point(Un,Io);else{var Ls=[co=Math.max(Xi,Math.min(Da,co)),wn=Math.max(Xi,Math.min(Da,wn))],ou=[Un=Math.max(Xi,Math.min(Da,Un)),Io=Math.max(Xi,Math.min(Da,Io))];ha(Ls,ou,er,yr,na,$r)?(un||(Ri.lineStart(),Ri.point(Ls[0],Ls[1])),Ri.point(ou[0],ou[1]),Xs||Ri.lineEnd(),Qo=!1):Xs&&(Ri.lineStart(),Ri.point(Un,Io),Qo=!1)}co=Un,wn=Io,un=Xs}return xs}}function fn(){var er=0,yr=0,na=960,$r=500,La,hi,Pi;return Pi={stream:function(Zi){return La&&hi===Zi?La:La=Li(er,yr,na,$r)(hi=Zi)},extent:function(Zi){return arguments.length?(er=+Zi[0][0],yr=+Zi[0][1],na=+Zi[1][0],$r=+Zi[1][1],La=hi=null,Pi):[[er,yr],[na,$r]]}}}var An=A(),kn,zn,Xn,to={sphere:L,point:L,lineStart:mo,lineEnd:L,polygonStart:L,polygonEnd:L};function mo(){to.point=Jo,to.lineEnd=pn}function pn(){to.point=to.lineEnd=L}function Jo(er,yr){er*=f,yr*=f,kn=er,zn=y(yr),Xn=l(yr),to.point=Xo}function Xo(er,yr){er*=f,yr*=f;var na=y(yr),$r=l(yr),La=g(er-kn),hi=l(La),Pi=y(La),Zi=$r*Pi,tn=Xn*na-zn*$r*hi,dn=zn*na+Xn*$r*hi;An.add(T(p(Zi*Zi+tn*tn),dn)),kn=er,zn=na,Xn=$r}function Ts(er){return An.reset(),N(er,to),+An}var Po=[null,null],so={type:"LineString",coordinates:Po};function Vn(er,yr){return Po[0]=er,Po[1]=yr,Ts(so)}var To={Feature:function(er,yr){return Oo(er.geometry,yr)},FeatureCollection:function(er,yr){for(var na=er.features,$r=-1,La=na.length;++$r<La;)if(Oo(na[$r].geometry,yr))return!0;return!1}},qo={Sphere:function(){return!0},Point:function(er,yr){return lo(er.coordinates,yr)},MultiPoint:function(er,yr){for(var na=er.coordinates,$r=-1,La=na.length;++$r<La;)if(lo(na[$r],yr))return!0;return!1},LineString:function(er,yr){return Co(er.coordinates,yr)},MultiLineString:function(er,yr){for(var na=er.coordinates,$r=-1,La=na.length;++$r<La;)if(Co(na[$r],yr))return!0;return!1},Polygon:function(er,yr){return os(er.coordinates,yr)},MultiPolygon:function(er,yr){for(var na=er.coordinates,$r=-1,La=na.length;++$r<La;)if(os(na[$r],yr))return!0;return!1},GeometryCollection:function(er,yr){for(var na=er.geometries,$r=-1,La=na.length;++$r<La;)if(Oo(na[$r],yr))return!0;return!1}};function Oo(er,yr){return er&&qo.hasOwnProperty(er.type)?qo[er.type](er,yr):!1}function lo(er,yr){return Vn(er,yr)===0}function Co(er,yr){for(var na,$r,La,hi=0,Pi=er.length;hi<Pi;hi++){if($r=Vn(er[hi],yr),$r===0||hi>0&&(La=Vn(er[hi],er[hi-1]),La>0&&na<=La&&$r<=La&&(na+$r-La)*(1-Math.pow((na-$r)/La,2))<o*La))return!0;na=$r}return!1}function os(er,yr){return!!da(er.map(Ys),Os(yr))}function Ys(er){return er=er.map(Os),er.pop(),er}function Os(er){return[er[0]*f,er[1]*f]}function Yo(er,yr){return(er&&To.hasOwnProperty(er.type)?To[er.type]:Oo)(er,yr)}function Ui(er,yr,na){var $r=x.range(er,yr-r,na).concat(yr);return function(La){return $r.map(function(hi){return[La,hi]})}}function Cn(er,yr,na){var $r=x.range(er,yr-r,na).concat(yr);return function(La){return $r.map(function(hi){return[hi,La]})}}function tl(){var er,yr,na,$r,La,hi,Pi,Zi,tn=10,dn=tn,Ri=90,Fi=360,qi,_i,Mn,Kn,ao=2.5;function Jn(){return{type:"MultiLineString",coordinates:co()}}function co(){return x.range(_($r/Ri)*Ri,na,Ri).map(Mn).concat(x.range(_(Zi/Fi)*Fi,Pi,Fi).map(Kn)).concat(x.range(_(yr/tn)*tn,er,tn).filter(function(wn){return g(wn%Ri)>r}).map(qi)).concat(x.range(_(hi/dn)*dn,La,dn).filter(function(wn){return g(wn%Fi)>r}).map(_i))}return Jn.lines=function(){return co().map(function(wn){return{type:"LineString",coordinates:wn}})},Jn.outline=function(){return{type:"Polygon",coordinates:[Mn($r).concat(Kn(Pi).slice(1),Mn(na).reverse().slice(1),Kn(Zi).reverse().slice(1))]}},Jn.extent=function(wn){return arguments.length?Jn.extentMajor(wn).extentMinor(wn):Jn.extentMinor()},Jn.extentMajor=function(wn){return arguments.length?($r=+wn[0][0],na=+wn[1][0],Zi=+wn[0][1],Pi=+wn[1][1],$r>na&&(wn=$r,$r=na,na=wn),Zi>Pi&&(wn=Zi,Zi=Pi,Pi=wn),Jn.precision(ao)):[[$r,Zi],[na,Pi]]},Jn.extentMinor=function(wn){return arguments.length?(yr=+wn[0][0],er=+wn[1][0],hi=+wn[0][1],La=+wn[1][1],yr>er&&(wn=yr,yr=er,er=wn),hi>La&&(wn=hi,hi=La,La=wn),Jn.precision(ao)):[[yr,hi],[er,La]]},Jn.step=function(wn){return arguments.length?Jn.stepMajor(wn).stepMinor(wn):Jn.stepMinor()},Jn.stepMajor=function(wn){return arguments.length?(Ri=+wn[0],Fi=+wn[1],Jn):[Ri,Fi]},Jn.stepMinor=function(wn){return arguments.length?(tn=+wn[0],dn=+wn[1],Jn):[tn,dn]},Jn.precision=function(wn){return arguments.length?(ao=+wn,qi=Ui(hi,La,90),_i=Cn(yr,er,ao),Mn=Ui(Zi,Pi,90),Kn=Cn($r,na,ao),Jn):ao},Jn.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}function Bs(){return tl()()}function uo(er,yr){var na=er[0]*f,$r=er[1]*f,La=yr[0]*f,hi=yr[1]*f,Pi=l($r),Zi=y($r),tn=l(hi),dn=y(hi),Ri=Pi*l(na),Fi=Pi*y(na),qi=tn*l(La),_i=tn*y(La),Mn=2*h(p(P(hi-$r)+Pi*tn*P(La-na))),Kn=y(Mn),ao=Mn?function(Jn){var co=y(Jn*=Mn)/Kn,wn=y(Mn-Jn)/Kn,un=wn*Ri+co*qi,_o=wn*Fi+co*_i,Qo=wn*Zi+co*dn;return[T(_o,un)*c,T(Qo,p(un*un+_o*_o))*c]}:function(){return[na*c,$r*c]};return ao.distance=Mn,ao}function $s(er){return er}var ms=A(),Is=A(),rl,Sn,po,ro,As={point:L,lineStart:L,lineEnd:L,polygonStart:function(){As.lineStart=al,As.lineEnd=au},polygonEnd:function(){As.lineStart=As.lineEnd=As.point=L,ms.add(g(Is)),Is.reset()},result:function(){var er=ms/2;return ms.reset(),er}};function al(){As.point=$n}function $n(er,yr){As.point=zs,rl=po=er,Sn=ro=yr}function zs(er,yr){Is.add(ro*er-po*yr),po=er,ro=yr}function au(){zs(rl,Sn)}var fl=1/0,xu=fl,zl=-fl,Ns=zl,iu={point:Eu,lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var er=[[fl,xu],[zl,Ns]];return zl=Ns=-(xu=fl=1/0),er}};function Eu(er,yr){er<fl&&(fl=er),er>zl&&(zl=er),yr<xu&&(xu=yr),yr>Ns&&(Ns=yr)}var Bc=0,Cu=0,Af=0,pf=0,Us=0,Vc=0,Sf=0,nu=0,Ll=0,ic,Ou,il,vl,gs={point:Vs,lineStart:nc,lineEnd:cl,polygonStart:function(){gs.lineStart=yh,gs.lineEnd=ls},polygonEnd:function(){gs.point=Vs,gs.lineStart=nc,gs.lineEnd=cl},result:function(){var er=Ll?[Sf/Ll,nu/Ll]:Vc?[pf/Vc,Us/Vc]:Af?[Bc/Af,Cu/Af]:[NaN,NaN];return Bc=Cu=Af=pf=Us=Vc=Sf=nu=Ll=0,er}};function Vs(er,yr){Bc+=er,Cu+=yr,++Af}function nc(){gs.point=Nl}function Nl(er,yr){gs.point=qu,Vs(il=er,vl=yr)}function qu(er,yr){var na=er-il,$r=yr-vl,La=p(na*na+$r*$r);pf+=La*(il+er)/2,Us+=La*(vl+yr)/2,Vc+=La,Vs(il=er,vl=yr)}function cl(){gs.point=Vs}function yh(){gs.point=_h}function ls(){Ss(ic,Ou)}function _h(er,yr){gs.point=Ss,Vs(ic=il=er,Ou=vl=yr)}function Ss(er,yr){var na=er-il,$r=yr-vl,La=p(na*na+$r*$r);pf+=La*(il+er)/2,Us+=La*(vl+yr)/2,Vc+=La,La=vl*er-il*yr,Sf+=La*(il+er),nu+=La*(vl+yr),Ll+=La*3,Vs(il=er,vl=yr)}function Qn(er){this._context=er}Qn.prototype={_radius:4.5,pointRadius:function(er){return this._radius=er,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(er,yr){switch(this._point){case 0:{this._context.moveTo(er,yr),this._point=1;break}case 1:{this._context.lineTo(er,yr);break}default:{this._context.moveTo(er+this._radius,yr),this._context.arc(er,yr,this._radius,0,s);break}}},result:L};var Gc=A(),Vu,Ul,Mf,wc,rf,Kl={point:L,lineStart:function(){Kl.point=Yf},lineEnd:function(){Vu&&zf(Ul,Mf),Kl.point=L},polygonStart:function(){Vu=!0},polygonEnd:function(){Vu=null},result:function(){var er=+Gc;return Gc.reset(),er}};function Yf(er,yr){Kl.point=zf,Ul=wc=er,Mf=rf=yr}function zf(er,yr){wc-=er,rf-=yr,Gc.add(p(wc*wc+rf*rf)),wc=er,rf=yr}function af(){this._string=[]}af.prototype={_radius:4.5,_circle:Nc(4.5),pointRadius:function(er){return(er=+er)!==this._radius&&(this._radius=er,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(er,yr){switch(this._point){case 0:{this._string.push("M",er,",",yr),this._point=1;break}case 1:{this._string.push("L",er,",",yr);break}default:{this._circle==null&&(this._circle=Nc(this._radius)),this._string.push("M",er,",",yr,this._circle);break}}},result:function(){if(this._string.length){var er=this._string.join("");return this._string=[],er}else return null}};function Nc(er){return"m0,"+er+"a"+er+","+er+" 0 1,1 0,"+-2*er+"a"+er+","+er+" 0 1,1 0,"+2*er+"z"}function Ff(er,yr){var na=4.5,$r,La;function hi(Pi){return Pi&&(typeof na=="function"&&La.pointRadius(+na.apply(this,arguments)),N(Pi,$r(La))),La.result()}return hi.area=function(Pi){return N(Pi,$r(As)),As.result()},hi.measure=function(Pi){return N(Pi,$r(Kl)),Kl.result()},hi.bounds=function(Pi){return N(Pi,$r(iu)),iu.result()},hi.centroid=function(Pi){return N(Pi,$r(gs)),gs.result()},hi.projection=function(Pi){return arguments.length?($r=Pi==null?(er=null,$s):(er=Pi).stream,hi):er},hi.context=function(Pi){return arguments.length?(La=Pi==null?(yr=null,new af):new Qn(yr=Pi),typeof na!="function"&&La.pointRadius(na),hi):yr},hi.pointRadius=function(Pi){return arguments.length?(na=typeof Pi=="function"?Pi:(La.pointRadius(+Pi),+Pi),hi):na},hi.projection(er).context(yr)}function Of(er){return{stream:Gu(er)}}function Gu(er){return function(yr){var na=new Ef;for(var $r in er)na[$r]=er[$r];return na.stream=yr,na}}function Ef(){}Ef.prototype={constructor:Ef,point:function(er,yr){this.stream.point(er,yr)},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 oc(er,yr,na){var $r=er.clipExtent&&er.clipExtent();return er.scale(150).translate([0,0]),$r!=null&&er.clipExtent(null),N(na,er.stream(iu)),yr(iu.result()),$r!=null&&er.clipExtent($r),er}function Hc(er,yr,na){return oc(er,function($r){var La=yr[1][0]-yr[0][0],hi=yr[1][1]-yr[0][1],Pi=Math.min(La/($r[1][0]-$r[0][0]),hi/($r[1][1]-$r[0][1])),Zi=+yr[0][0]+(La-Pi*($r[1][0]+$r[0][0]))/2,tn=+yr[0][1]+(hi-Pi*($r[1][1]+$r[0][1]))/2;er.scale(150*Pi).translate([Zi,tn])},na)}function Jl(er,yr,na){return Hc(er,[[0,0],yr],na)}function Uc(er,yr,na){return oc(er,function($r){var La=+yr,hi=La/($r[1][0]-$r[0][0]),Pi=(La-hi*($r[1][0]+$r[0][0]))/2,Zi=-hi*$r[0][1];er.scale(150*hi).translate([Pi,Zi])},na)}function Tc(er,yr,na){return oc(er,function($r){var La=+yr,hi=La/($r[1][1]-$r[0][1]),Pi=-hi*$r[0][0],Zi=(La-hi*($r[1][1]+$r[0][1]))/2;er.scale(150*hi).translate([Pi,Zi])},na)}var Gs=16,Cf=l(30*f);function lh(er,yr){return+yr?Wc(er,yr):Bf(er)}function Bf(er){return Gu({point:function(yr,na){yr=er(yr,na),this.stream.point(yr[0],yr[1])}})}function Wc(er,yr){function na($r,La,hi,Pi,Zi,tn,dn,Ri,Fi,qi,_i,Mn,Kn,ao){var Jn=dn-$r,co=Ri-La,wn=Jn*Jn+co*co;if(wn>4*yr&&Kn--){var un=Pi+qi,_o=Zi+_i,Qo=tn+Mn,xs=p(un*un+_o*_o+Qo*Qo),Qs=h(Qo/=xs),Rs=g(g(Qo)-1)<r||g(hi-Fi)<r?(hi+Fi)/2:T(_o,un),Ks=er(Rs,Qs),ys=Ks[0],Fl=Ks[1],yl=ys-$r,sl=Fl-La,Un=co*yl-Jn*sl;(Un*Un/wn>yr||g((Jn*yl+co*sl)/wn-.5)>.3||Pi*qi+Zi*_i+tn*Mn<Cf)&&(na($r,La,hi,Pi,Zi,tn,ys,Fl,Rs,un/=xs,_o/=xs,Qo,Kn,ao),ao.point(ys,Fl),na(ys,Fl,Rs,un,_o,Qo,dn,Ri,Fi,qi,_i,Mn,Kn,ao))}}return function($r){var La,hi,Pi,Zi,tn,dn,Ri,Fi,qi,_i,Mn,Kn,ao={point:Jn,lineStart:co,lineEnd:un,polygonStart:function(){$r.polygonStart(),ao.lineStart=_o},polygonEnd:function(){$r.polygonEnd(),ao.lineStart=co}};function Jn(Qs,Rs){Qs=er(Qs,Rs),$r.point(Qs[0],Qs[1])}function co(){Fi=NaN,ao.point=wn,$r.lineStart()}function wn(Qs,Rs){var Ks=re([Qs,Rs]),ys=er(Qs,Rs);na(Fi,qi,Ri,_i,Mn,Kn,Fi=ys[0],qi=ys[1],Ri=Qs,_i=Ks[0],Mn=Ks[1],Kn=Ks[2],Gs,$r),$r.point(Fi,qi)}function un(){ao.point=Jn,$r.lineEnd()}function _o(){co(),ao.point=Qo,ao.lineEnd=xs}function Qo(Qs,Rs){wn(La=Qs,Rs),hi=Fi,Pi=qi,Zi=_i,tn=Mn,dn=Kn,ao.point=wn}function xs(){na(Fi,qi,Ri,_i,Mn,Kn,hi,Pi,La,Zi,tn,dn,Gs,$r),ao.lineEnd=un,un()}return ao}}var Kf=Gu({point:function(er,yr){this.stream.point(er*f,yr*f)}});function ku(er){return Gu({point:function(yr,na){var $r=er(yr,na);return this.stream.point($r[0],$r[1])}})}function Nf(er,yr,na,$r,La){function hi(Pi,Zi){return Pi*=$r,Zi*=La,[yr+er*Pi,na-er*Zi]}return hi.invert=function(Pi,Zi){return[(Pi-yr)/er*$r,(na-Zi)/er*La]},hi}function ml(er,yr,na,$r,La,hi){var Pi=l(hi),Zi=y(hi),tn=Pi*er,dn=Zi*er,Ri=Pi/er,Fi=Zi/er,qi=(Zi*na-Pi*yr)/er,_i=(Zi*yr+Pi*na)/er;function Mn(Kn,ao){return Kn*=$r,ao*=La,[tn*Kn-dn*ao+yr,na-dn*Kn-tn*ao]}return Mn.invert=function(Kn,ao){return[$r*(Ri*Kn-Fi*ao+qi),La*(_i-Fi*Kn-Ri*ao)]},Mn}function Lu(er){return Ac(function(){return er})()}function Ac(er){var yr,na=150,$r=480,La=250,hi=0,Pi=0,Zi=0,tn=0,dn=0,Ri,Fi=0,qi=1,_i=1,Mn=null,Kn=kr,ao=null,Jn,co,wn,un=$s,_o=.5,Qo,xs,Qs,Rs,Ks;function ys(Un){return Qs(Un[0]*f,Un[1]*f)}function Fl(Un){return Un=Qs.invert(Un[0],Un[1]),Un&&[Un[0]*c,Un[1]*c]}ys.stream=function(Un){return Rs&&Ks===Un?Rs:Rs=Kf(ku(Ri)(Kn(Qo(un(Ks=Un)))))},ys.preclip=function(Un){return arguments.length?(Kn=Un,Mn=void 0,sl()):Kn},ys.postclip=function(Un){return arguments.length?(un=Un,ao=Jn=co=wn=null,sl()):un},ys.clipAngle=function(Un){return arguments.length?(Kn=+Un?Ya(Mn=Un*f):(Mn=null,kr),sl()):Mn*c},ys.clipExtent=function(Un){return arguments.length?(un=Un==null?(ao=Jn=co=wn=null,$s):Li(ao=+Un[0][0],Jn=+Un[0][1],co=+Un[1][0],wn=+Un[1][1]),sl()):ao==null?null:[[ao,Jn],[co,wn]]},ys.scale=function(Un){return arguments.length?(na=+Un,yl()):na},ys.translate=function(Un){return arguments.length?($r=+Un[0],La=+Un[1],yl()):[$r,La]},ys.center=function(Un){return arguments.length?(hi=Un[0]%360*f,Pi=Un[1]%360*f,yl()):[hi*c,Pi*c]},ys.rotate=function(Un){return arguments.length?(Zi=Un[0]%360*f,tn=Un[1]%360*f,dn=Un.length>2?Un[2]%360*f:0,yl()):[Zi*c,tn*c,dn*c]},ys.angle=function(Un){return arguments.length?(Fi=Un%360*f,yl()):Fi*c},ys.reflectX=function(Un){return arguments.length?(qi=Un?-1:1,yl()):qi<0},ys.reflectY=function(Un){return arguments.length?(_i=Un?-1:1,yl()):_i<0},ys.precision=function(Un){return arguments.length?(Qo=lh(xs,_o=Un*Un),sl()):p(_o)},ys.fitExtent=function(Un,Io){return Hc(ys,Un,Io)},ys.fitSize=function(Un,Io){return Jl(ys,Un,Io)},ys.fitWidth=function(Un,Io){return Uc(ys,Un,Io)},ys.fitHeight=function(Un,Io){return Tc(ys,Un,Io)};function yl(){var Un=ml(na,0,0,qi,_i,Fi).apply(null,yr(hi,Pi)),Io=(Fi?ml:Nf)(na,$r-Un[0],La-Un[1],qi,_i,Fi);return Ri=Ia(Zi,tn,dn),xs=ma(yr,Io),Qs=ma(Ri,xs),Qo=lh(xs,_o),sl()}function sl(){return Rs=Ks=null,ys}return function(){return yr=er.apply(this,arguments),ys.invert=yr.invert&&Fl,yl()}}function nl(er){var yr=0,na=a/3,$r=Ac(er),La=$r(yr,na);return La.parallels=function(hi){return arguments.length?$r(yr=hi[0]*f,na=hi[1]*f):[yr*c,na*c]},La}function dc(er){var yr=l(er);function na($r,La){return[$r*yr,y(La)/yr]}return na.invert=function($r,La){return[$r/yr,h(La*yr)]},na}function vu(er,yr){var na=y(er),$r=(na+y(yr))/2;if(g($r)<r)return dc(er);var La=1+na*(2*$r-na),hi=p(La)/$r;function Pi(Zi,tn){var dn=p(La-2*$r*y(tn))/$r;return[dn*y(Zi*=$r),hi-dn*l(Zi)]}return Pi.invert=function(Zi,tn){var dn=hi-tn,Ri=T(Zi,g(dn))*b(dn);return dn*$r<0&&(Ri-=a*b(Zi)*b(dn)),[Ri/$r,h((La-(Zi*Zi+dn*dn)*$r*$r)/(2*$r))]},Pi}function bu(){return nl(vu).scale(155.424).center([0,33.6442])}function Ml(){return bu().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Uf(er){var yr=er.length;return{point:function(na,$r){for(var La=-1;++La<yr;)er[La].point(na,$r)},sphere:function(){for(var na=-1;++na<yr;)er[na].sphere()},lineStart:function(){for(var na=-1;++na<yr;)er[na].lineStart()},lineEnd:function(){for(var na=-1;++na<yr;)er[na].lineEnd()},polygonStart:function(){for(var na=-1;++na<yr;)er[na].polygonStart()},polygonEnd:function(){for(var na=-1;++na<yr;)er[na].polygonEnd()}}}function Jf(){var er,yr,na=Ml(),$r,La=bu().rotate([154,0]).center([-2,58.5]).parallels([55,65]),hi,Pi=bu().rotate([157,0]).center([-3,19.9]).parallels([8,18]),Zi,tn,dn={point:function(qi,_i){tn=[qi,_i]}};function Ri(qi){var _i=qi[0],Mn=qi[1];return tn=null,$r.point(_i,Mn),tn||(hi.point(_i,Mn),tn)||(Zi.point(_i,Mn),tn)}Ri.invert=function(qi){var _i=na.scale(),Mn=na.translate(),Kn=(qi[0]-Mn[0])/_i,ao=(qi[1]-Mn[1])/_i;return(ao>=.12&&ao<.234&&Kn>=-.425&&Kn<-.214?La:ao>=.166&&ao<.234&&Kn>=-.214&&Kn<-.115?Pi:na).invert(qi)},Ri.stream=function(qi){return er&&yr===qi?er:er=Uf([na.stream(yr=qi),La.stream(qi),Pi.stream(qi)])},Ri.precision=function(qi){return arguments.length?(na.precision(qi),La.precision(qi),Pi.precision(qi),Fi()):na.precision()},Ri.scale=function(qi){return arguments.length?(na.scale(qi),La.scale(qi*.35),Pi.scale(qi),Ri.translate(na.translate())):na.scale()},Ri.translate=function(qi){if(!arguments.length)return na.translate();var _i=na.scale(),Mn=+qi[0],Kn=+qi[1];return $r=na.translate(qi).clipExtent([[Mn-.455*_i,Kn-.238*_i],[Mn+.455*_i,Kn+.238*_i]]).stream(dn),hi=La.translate([Mn-.307*_i,Kn+.201*_i]).clipExtent([[Mn-.425*_i+r,Kn+.12*_i+r],[Mn-.214*_i-r,Kn+.234*_i-r]]).stream(dn),Zi=Pi.translate([Mn-.205*_i,Kn+.212*_i]).clipExtent([[Mn-.214*_i+r,Kn+.166*_i+r],[Mn-.115*_i-r,Kn+.234*_i-r]]).stream(dn),Fi()},Ri.fitExtent=function(qi,_i){return Hc(Ri,qi,_i)},Ri.fitSize=function(qi,_i){return Jl(Ri,qi,_i)},Ri.fitWidth=function(qi,_i){return Uc(Ri,qi,_i)},Ri.fitHeight=function(qi,_i){return Tc(Ri,qi,_i)};function Fi(){return er=yr=null,Ri}return Ri.scale(1070)}function Bu(er){return function(yr,na){var $r=l(yr),La=l(na),hi=er($r*La);return[hi*La*y(yr),hi*y(na)]}}function Sc(er){return function(yr,na){var $r=p(yr*yr+na*na),La=er($r),hi=y(La),Pi=l(La);return[T(yr*hi,$r*Pi),h($r&&na*hi/$r)]}}var vc=Bu(function(er){return p(2/(1+er))});vc.invert=Sc(function(er){return 2*h(er/2)});function Lh(){return Lu(vc).scale(124.75).clipAngle(180-.001)}var nf=Bu(function(er){return(er=m(er))&&er/y(er)});nf.invert=Sc(function(er){return er});function df(){return Lu(nf).scale(79.4188).clipAngle(180-.001)}function Nu(er,yr){return[er,S(u((i+yr)/2))]}Nu.invert=function(er,yr){return[er,2*v(w(yr))-i]};function of(){return tu(Nu).scale(961/s)}function tu(er){var yr=Lu(er),na=yr.center,$r=yr.scale,La=yr.translate,hi=yr.clipExtent,Pi=null,Zi,tn,dn;yr.scale=function(Fi){return arguments.length?($r(Fi),Ri()):$r()},yr.translate=function(Fi){return arguments.length?(La(Fi),Ri()):La()},yr.center=function(Fi){return arguments.length?(na(Fi),Ri()):na()},yr.clipExtent=function(Fi){return arguments.length?(Fi==null?Pi=Zi=tn=dn=null:(Pi=+Fi[0][0],Zi=+Fi[0][1],tn=+Fi[1][0],dn=+Fi[1][1]),Ri()):Pi==null?null:[[Pi,Zi],[tn,dn]]};function Ri(){var Fi=a*$r(),qi=yr(mi(yr.rotate()).invert([0,0]));return hi(Pi==null?[[qi[0]-Fi,qi[1]-Fi],[qi[0]+Fi,qi[1]+Fi]]:er===Nu?[[Math.max(qi[0]-Fi,Pi),Zi],[Math.min(qi[0]+Fi,tn),dn]]:[[Pi,Math.max(qi[1]-Fi,Zi)],[tn,Math.min(qi[1]+Fi,dn)]])}return Ri()}function Xc(er){return u((i+er)/2)}function uh(er,yr){var na=l(er),$r=er===yr?y(er):S(na/l(yr))/S(Xc(yr)/Xc(er)),La=na*E(Xc(er),$r)/$r;if(!$r)return Nu;function hi(Pi,Zi){La>0?Zi<-i+r&&(Zi=-i+r):Zi>i-r&&(Zi=i-r);var tn=La/E(Xc(Zi),$r);return[tn*y($r*Pi),La-tn*l($r*Pi)]}return hi.invert=function(Pi,Zi){var tn=La-Zi,dn=b($r)*p(Pi*Pi+tn*tn),Ri=T(Pi,g(tn))*b(tn);return tn*$r<0&&(Ri-=a*b(Pi)*b(tn)),[Ri/$r,2*v(E(La/dn,1/$r))-i]},hi}function vf(){return nl(uh).scale(109.5).parallels([30,30])}function ol(er,yr){return[er,yr]}ol.invert=ol;function mu(){return Lu(ol).scale(152.63)}function Pu(er,yr){var na=l(er),$r=er===yr?y(er):(na-l(yr))/(yr-er),La=na/$r+er;if(g($r)<r)return ol;function hi(Pi,Zi){var tn=La-Zi,dn=$r*Pi;return[tn*y(dn),La-tn*l(dn)]}return hi.invert=function(Pi,Zi){var tn=La-Zi,dn=T(Pi,g(tn))*b(tn);return tn*$r<0&&(dn-=a*b(Pi)*b(tn)),[dn/$r,La-b($r)*p(Pi*Pi+tn*tn)]},hi}function kf(){return nl(Pu).scale(131.154).center([0,13.9389])}var hl=1.340264,sf=-.081106,Mc=893e-6,Hu=.003796,mf=p(3)/2,Wu=12;function Zc(er,yr){var na=h(mf*y(yr)),$r=na*na,La=$r*$r*$r;return[er*l(na)/(mf*(hl+3*sf*$r+La*(7*Mc+9*Hu*$r))),na*(hl+sf*$r+La*(Mc+Hu*$r))]}Zc.invert=function(er,yr){for(var na=yr,$r=na*na,La=$r*$r*$r,hi=0,Pi,Zi,tn;hi<Wu&&(Zi=na*(hl+sf*$r+La*(Mc+Hu*$r))-yr,tn=hl+3*sf*$r+La*(7*Mc+9*Hu*$r),na-=Pi=Zi/tn,$r=na*na,La=$r*$r*$r,!(g(Pi)<o));++hi);return[mf*er*(hl+3*sf*$r+La*(7*Mc+9*Hu*$r))/l(na),h(y(na)/mf)]};function Lf(){return Lu(Zc).scale(177.158)}function ru(er,yr){var na=l(yr),$r=l(er)*na;return[na*y(er)/$r,y(yr)/$r]}ru.invert=Sc(v);function jf(){return Lu(ru).scale(144.049).clipAngle(60)}function Xu(){var er=1,yr=0,na=0,$r=1,La=1,hi=0,Pi,Zi,tn=null,dn,Ri,Fi,qi=1,_i=1,Mn=Gu({point:function(un,_o){var Qo=wn([un,_o]);this.stream.point(Qo[0],Qo[1])}}),Kn=$s,ao,Jn;function co(){return qi=er*$r,_i=er*La,ao=Jn=null,wn}function wn(un){var _o=un[0]*qi,Qo=un[1]*_i;if(hi){var xs=Qo*Pi-_o*Zi;_o=_o*Pi+Qo*Zi,Qo=xs}return[_o+yr,Qo+na]}return wn.invert=function(un){var _o=un[0]-yr,Qo=un[1]-na;if(hi){var xs=Qo*Pi+_o*Zi;_o=_o*Pi-Qo*Zi,Qo=xs}return[_o/qi,Qo/_i]},wn.stream=function(un){return ao&&Jn===un?ao:ao=Mn(Kn(Jn=un))},wn.postclip=function(un){return arguments.length?(Kn=un,tn=dn=Ri=Fi=null,co()):Kn},wn.clipExtent=function(un){return arguments.length?(Kn=un==null?(tn=dn=Ri=Fi=null,$s):Li(tn=+un[0][0],dn=+un[0][1],Ri=+un[1][0],Fi=+un[1][1]),co()):tn==null?null:[[tn,dn],[Ri,Fi]]},wn.scale=function(un){return arguments.length?(er=+un,co()):er},wn.translate=function(un){return arguments.length?(yr=+un[0],na=+un[1],co()):[yr,na]},wn.angle=function(un){return arguments.length?(hi=un%360*f,Zi=y(hi),Pi=l(hi),co()):hi*c},wn.reflectX=function(un){return arguments.length?($r=un?-1:1,co()):$r<0},wn.reflectY=function(un){return arguments.length?(La=un?-1:1,co()):La<0},wn.fitExtent=function(un,_o){return Hc(wn,un,_o)},wn.fitSize=function(un,_o){return Jl(wn,un,_o)},wn.fitWidth=function(un,_o){return Uc(wn,un,_o)},wn.fitHeight=function(un,_o){return Tc(wn,un,_o)},wn}function Ec(er,yr){var na=yr*yr,$r=na*na;return[er*(.8707-.131979*na+$r*(-.013791+$r*(.003971*na-.001529*$r))),yr*(1.007226+na*(.015085+$r*(-.044475+.028874*na-.005916*$r)))]}Ec.invert=function(er,yr){var na=yr,$r=25,La;do{var hi=na*na,Pi=hi*hi;na-=La=(na*(1.007226+hi*(.015085+Pi*(-.044475+.028874*hi-.005916*Pi)))-yr)/(1.007226+hi*(.015085*3+Pi*(-.044475*7+.028874*9*hi-.005916*11*Pi)))}while(g(La)>r&&--$r>0);return[er/(.8707+(hi=na*na)*(-.131979+hi*(-.013791+hi*hi*hi*(.003971-.001529*hi)))),na]};function mc(){return Lu(Ec).scale(175.295)}function jl(er,yr){return[l(yr)*y(er),y(yr)]}jl.invert=Sc(h);function gu(){return Lu(jl).scale(249.5).clipAngle(90+r)}function Cc(er,yr){var na=l(yr),$r=1+l(er)*na;return[na*y(er)/$r,y(yr)/$r]}Cc.invert=Sc(function(er){return 2*v(er)});function Yc(){return Lu(Cc).scale(250).clipAngle(142)}function sc(er,yr){return[S(u((i+yr)/2)),-er]}sc.invert=function(er,yr){return[-yr,2*v(w(er))-i]};function kc(){var er=tu(sc),yr=er.center,na=er.rotate;return er.center=function($r){return arguments.length?yr([-$r[1],$r[0]]):($r=yr(),[$r[1],-$r[0]])},er.rotate=function($r){return arguments.length?na([$r[0],$r[1],$r.length>2?$r[2]+90:90]):($r=na(),[$r[0],$r[1],$r[2]-90])},na([0,0,90]).scale(159.155)}d.geoAlbers=Ml,d.geoAlbersUsa=Jf,d.geoArea=j,d.geoAzimuthalEqualArea=Lh,d.geoAzimuthalEqualAreaRaw=vc,d.geoAzimuthalEquidistant=df,d.geoAzimuthalEquidistantRaw=nf,d.geoBounds=Be,d.geoCentroid=Pr,d.geoCircle=Nr,d.geoClipAntimeridian=kr,d.geoClipCircle=Ya,d.geoClipExtent=fn,d.geoClipRectangle=Li,d.geoConicConformal=vf,d.geoConicConformalRaw=uh,d.geoConicEqualArea=bu,d.geoConicEqualAreaRaw=vu,d.geoConicEquidistant=kf,d.geoConicEquidistantRaw=Pu,d.geoContains=Yo,d.geoDistance=Vn,d.geoEqualEarth=Lf,d.geoEqualEarthRaw=Zc,d.geoEquirectangular=mu,d.geoEquirectangularRaw=ol,d.geoGnomonic=jf,d.geoGnomonicRaw=ru,d.geoGraticule=tl,d.geoGraticule10=Bs,d.geoIdentity=Xu,d.geoInterpolate=uo,d.geoLength=Ts,d.geoMercator=of,d.geoMercatorRaw=Nu,d.geoNaturalEarth1=mc,d.geoNaturalEarth1Raw=Ec,d.geoOrthographic=gu,d.geoOrthographicRaw=jl,d.geoPath=Ff,d.geoProjection=Lu,d.geoProjectionMutator=Ac,d.geoRotation=mi,d.geoStereographic=Yc,d.geoStereographicRaw=Cc,d.geoStream=N,d.geoTransform=Of,d.geoTransverseMercator=kc,d.geoTransverseMercatorRaw=sc,Object.defineProperty(d,"__esModule",{value:!0})})}}),NU=Ze({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,DE(),yx()):x(d.d3=d.d3||{},d.d3,d.d3)})(Z,function(d,x,A){"use strict";var M=Math.abs,e=Math.atan,t=Math.atan2,r=Math.cos,o=Math.exp,a=Math.floor,i=Math.log,n=Math.max,s=Math.min,c=Math.pow,f=Math.round,g=Math.sign||function(He){return He>0?1:He<0?-1:0},v=Math.sin,T=Math.tan,l=1e-6,_=1e-12,w=Math.PI,S=w/2,E=w/4,y=Math.SQRT1_2,b=F(2),p=F(w),u=w*2,m=180/w,h=w/180;function P(He){return He?He/Math.sin(He):1}function L(He){return He>1?S:He<-1?-S:Math.asin(He)}function z(He){return He>1?0:He<-1?w:Math.acos(He)}function F(He){return He>0?Math.sqrt(He):0}function B(He){return He=o(2*He),(He-1)/(He+1)}function O(He){return(o(He)-o(-He))/2}function I(He){return(o(He)+o(-He))/2}function N(He){return i(He+F(He*He+1))}function U(He){return i(He+F(He*He-1))}function W(He){var Je=T(He/2),ut=2*i(r(He/2))/(Je*Je);function dt(Ct,wt){var Dt=r(Ct),ur=r(wt),mr=v(wt),Er=ur*Dt,Br=-((1-Er?i((1+Er)/2)/(1-Er):-.5)+ut/(1+Er));return[Br*ur*v(Ct),Br*mr]}return dt.invert=function(Ct,wt){var Dt=F(Ct*Ct+wt*wt),ur=-He/2,mr=50,Er;if(!Dt)return[0,0];do{var Br=ur/2,Qr=r(Br),ga=v(Br),Sa=ga/Qr,Oa=-i(M(Qr));ur-=Er=(2/Sa*Oa-ut*Sa-Dt)/(-Oa/(ga*ga)+1-ut/(2*Qr*Qr))*(Qr<0?.7:1)}while(M(Er)>l&&--mr>0);var di=v(ur);return[t(Ct*di,Dt*r(ur)),L(wt*di/Dt)]},dt}function Q(){var He=S,Je=x.geoProjectionMutator(W),ut=Je(He);return ut.radius=function(dt){return arguments.length?Je(He=dt*h):He*m},ut.scale(179.976).clipAngle(147)}function ue(He,Je){var ut=r(Je),dt=P(z(ut*r(He/=2)));return[2*ut*v(He)*dt,v(Je)*dt]}ue.invert=function(He,Je){if(!(He*He+4*Je*Je>w*w+l)){var ut=He,dt=Je,Ct=25;do{var wt=v(ut),Dt=v(ut/2),ur=r(ut/2),mr=v(dt),Er=r(dt),Br=v(2*dt),Qr=mr*mr,ga=Er*Er,Sa=Dt*Dt,Oa=1-ga*ur*ur,di=Oa?z(Er*ur)*F(Wi=1/Oa):Wi=0,Wi,Gi=2*di*Er*Dt-He,on=di*mr-Je,Tn=Wi*(ga*Sa+di*Er*ur*Qr),Wn=Wi*(.5*wt*Br-di*2*mr*Dt),Bn=Wi*.25*(Br*Dt-di*mr*ga*wt),Ao=Wi*(Qr*ur+di*Sa*Er),ss=Wn*Bn-Ao*Tn;if(!ss)break;var So=(on*Wn-Gi*Ao)/ss,Ko=(Gi*Bn-on*Tn)/ss;ut-=So,dt-=Ko}while((M(So)>l||M(Ko)>l)&&--Ct>0);return[ut,dt]}};function le(){return x.geoProjection(ue).scale(152.63)}function he(He){var Je=v(He),ut=r(He),dt=He>=0?1:-1,Ct=T(dt*He),wt=(1+Je-ut)/2;function Dt(ur,mr){var Er=r(mr),Br=r(ur/=2);return[(1+Er)*v(ur),(dt*mr>-t(Br,Ct)-.001?0:-dt*10)+wt+v(mr)*ut-(1+Er)*Je*Br]}return Dt.invert=function(ur,mr){var Er=0,Br=0,Qr=50;do{var ga=r(Er),Sa=v(Er),Oa=r(Br),di=v(Br),Wi=1+Oa,Gi=Wi*Sa-ur,on=wt+di*ut-Wi*Je*ga-mr,Tn=Wi*ga/2,Wn=-Sa*di,Bn=Je*Wi*Sa/2,Ao=ut*Oa+Je*ga*di,ss=Wn*Bn-Ao*Tn,So=(on*Wn-Gi*Ao)/ss/2,Ko=(Gi*Bn-on*Tn)/ss;M(Ko)>2&&(Ko/=2),Er-=So,Br-=Ko}while((M(So)>l||M(Ko)>l)&&--Qr>0);return dt*Br>-t(r(Er),Ct)-.001?[Er*2,Br]:null},Dt}function G(){var He=20*h,Je=He>=0?1:-1,ut=T(Je*He),dt=x.geoProjectionMutator(he),Ct=dt(He),wt=Ct.stream;return Ct.parallel=function(Dt){return arguments.length?(ut=T((Je=(He=Dt*h)>=0?1:-1)*He),dt(He)):He*m},Ct.stream=function(Dt){var ur=Ct.rotate(),mr=wt(Dt),Er=(Ct.rotate([0,0]),wt(Dt)),Br=Ct.precision();return Ct.rotate(ur),mr.sphere=function(){Er.polygonStart(),Er.lineStart();for(var Qr=Je*-180;Je*Qr<180;Qr+=Je*90)Er.point(Qr,Je*90);if(He)for(;Je*(Qr-=3*Je*Br)>=-180;)Er.point(Qr,Je*-t(r(Qr*h/2),ut)*m);Er.lineEnd(),Er.polygonEnd()},mr},Ct.scale(218.695).center([0,28.0974])}function $(He,Je){var ut=T(Je/2),dt=F(1-ut*ut),Ct=1+dt*r(He/=2),wt=v(He)*dt/Ct,Dt=ut/Ct,ur=wt*wt,mr=Dt*Dt;return[4/3*wt*(3+ur-3*mr),4/3*Dt*(3+3*ur-mr)]}$.invert=function(He,Je){if(He*=3/8,Je*=3/8,!He&&M(Je)>1)return null;var ut=He*He,dt=Je*Je,Ct=1+ut+dt,wt=F((Ct-F(Ct*Ct-4*Je*Je))/2),Dt=L(wt)/3,ur=wt?U(M(Je/wt))/3:N(M(He))/3,mr=r(Dt),Er=I(ur),Br=Er*Er-mr*mr;return[g(He)*2*t(O(ur)*mr,.25-Br),g(Je)*2*t(Er*v(Dt),.25+Br)]};function J(){return x.geoProjection($).scale(66.1603)}var X=F(8),oe=i(1+b);function ie(He,Je){var ut=M(Je);return ut<E?[He,i(T(E+Je/2))]:[He*r(ut)*(2*b-1/v(ut)),g(Je)*(2*b*(ut-E)-i(T(ut/2)))]}ie.invert=function(He,Je){if((wt=M(Je))<oe)return[He,2*e(o(Je))-S];var ut=E,dt=25,Ct,wt;do{var Dt=r(ut/2),ur=T(ut/2);ut-=Ct=(X*(ut-E)-i(ur)-wt)/(X-Dt*Dt/(2*ur))}while(M(Ct)>_&&--dt>0);return[He/(r(ut)*(X-1/v(ut))),g(Je)*ut]};function j(){return x.geoProjection(ie).scale(112.314)}function ee(He){var Je=2*w/He;function ut(dt,Ct){var wt=x.geoAzimuthalEquidistantRaw(dt,Ct);if(M(dt)>S){var Dt=t(wt[1],wt[0]),ur=F(wt[0]*wt[0]+wt[1]*wt[1]),mr=Je*f((Dt-S)/Je)+S,Er=t(v(Dt-=mr),2-r(Dt));Dt=mr+L(w/ur*v(Er))-Er,wt[0]=ur*r(Dt),wt[1]=ur*v(Dt)}return wt}return ut.invert=function(dt,Ct){var wt=F(dt*dt+Ct*Ct);if(wt>S){var Dt=t(Ct,dt),ur=Je*f((Dt-S)/Je)+S,mr=Dt>ur?-1:1,Er=wt*r(ur-Dt),Br=1/T(mr*z((Er-w)/F(w*(w-2*Er)+wt*wt)));Dt=ur+2*e((Br+mr*F(Br*Br-3))/3),dt=wt*r(Dt),Ct=wt*v(Dt)}return x.geoAzimuthalEquidistantRaw.invert(dt,Ct)},ut}function re(){var He=5,Je=x.geoProjectionMutator(ee),ut=Je(He),dt=ut.stream,Ct=.01,wt=-r(Ct*h),Dt=v(Ct*h);return ut.lobes=function(ur){return arguments.length?Je(He=+ur):He},ut.stream=function(ur){var mr=ut.rotate(),Er=dt(ur),Br=(ut.rotate([0,0]),dt(ur));return ut.rotate(mr),Er.sphere=function(){Br.polygonStart(),Br.lineStart();for(var Qr=0,ga=360/He,Sa=2*w/He,Oa=90-180/He,di=S;Qr<He;++Qr,Oa-=ga,di-=Sa)Br.point(t(Dt*r(di),wt)*m,L(Dt*v(di))*m),Oa<-90?(Br.point(-90,-180-Oa-Ct),Br.point(-90,-180-Oa+Ct)):(Br.point(90,Oa+Ct),Br.point(90,Oa-Ct));Br.lineEnd(),Br.polygonEnd()},Er},ut.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function ce(He,Je){if(arguments.length<2&&(Je=He),Je===1)return x.geoAzimuthalEqualAreaRaw;if(Je===1/0)return be;function ut(dt,Ct){var wt=x.geoAzimuthalEqualAreaRaw(dt/Je,Ct);return wt[0]*=He,wt}return ut.invert=function(dt,Ct){var wt=x.geoAzimuthalEqualAreaRaw.invert(dt/He,Ct);return wt[0]*=Je,wt},ut}function be(He,Je){return[He*r(Je)/r(Je/=2),2*v(Je)]}be.invert=function(He,Je){var ut=2*L(Je/2);return[He*r(ut/2)/r(ut),ut]};function Ae(){var He=2,Je=x.geoProjectionMutator(ce),ut=Je(He);return ut.coefficient=function(dt){return arguments.length?Je(He=+dt):He},ut.scale(169.529)}function ze(He,Je,ut){var dt=100,Ct,wt,Dt;ut=ut===void 0?0:+ut,Je=+Je;do wt=He(ut),Dt=He(ut+l),wt===Dt&&(Dt=wt+l),ut-=Ct=-1*l*(wt-Je)/(wt-Dt);while(dt-- >0&&M(Ct)>l);return dt<0?NaN:ut}function Re(He,Je,ut){return Je===void 0&&(Je=40),ut===void 0&&(ut=_),function(dt,Ct,wt,Dt){var ur,mr,Er;wt=wt===void 0?0:+wt,Dt=Dt===void 0?0:+Dt;for(var Br=0;Br<Je;Br++){var Qr=He(wt,Dt),ga=Qr[0]-dt,Sa=Qr[1]-Ct;if(M(ga)<ut&&M(Sa)<ut)break;var Oa=ga*ga+Sa*Sa;if(Oa>ur){wt-=mr/=2,Dt-=Er/=2;continue}ur=Oa;var di=(wt>0?-1:1)*ut,Wi=(Dt>0?-1:1)*ut,Gi=He(wt+di,Dt),on=He(wt,Dt+Wi),Tn=(Gi[0]-Qr[0])/di,Wn=(Gi[1]-Qr[1])/di,Bn=(on[0]-Qr[0])/Wi,Ao=(on[1]-Qr[1])/Wi,ss=Ao*Tn-Wn*Bn,So=(M(ss)<.5?.5:1)/ss;if(mr=(Sa*Bn-ga*Ao)*So,Er=(ga*Wn-Sa*Tn)*So,wt+=mr,Dt+=Er,M(mr)<ut&&M(Er)<ut)break}return[wt,Dt]}}function Xe(){var He=ce(1.68,2),Je=1.4,ut=12;function dt(Ct,wt){if(Ct+wt<-Je){var Dt=(Ct-wt+1.6)*(Ct+wt+Je)/8;Ct+=Dt,wt-=.8*Dt*v(wt+w/2)}var ur=He(Ct,wt),mr=(1-r(Ct*wt))/ut;return ur[1]<0&&(ur[0]*=1+mr),ur[1]>0&&(ur[1]*=1+mr/1.5*ur[0]*ur[0]),ur}return dt.invert=Re(dt),dt}function it(){return x.geoProjection(Xe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ot(He,Je){var ut=He*v(Je),dt=30,Ct;do Je-=Ct=(Je+v(Je)-ut)/(1+r(Je));while(M(Ct)>l&&--dt>0);return Je/2}function tt(He,Je,ut){function dt(Ct,wt){return[He*Ct*r(wt=ot(ut,wt)),Je*v(wt)]}return dt.invert=function(Ct,wt){return wt=L(wt/Je),[Ct/(He*r(wt)),L((2*wt+v(2*wt))/ut)]},dt}var lt=tt(b/S,b,w);function Ee(){return x.geoProjection(lt).scale(169.529)}var _e=2.00276,fe=1.11072;function Fe(He,Je){var ut=ot(w,Je);return[_e*He/(1/r(Je)+fe/r(ut)),(Je+b*v(ut))/_e]}Fe.invert=function(He,Je){var ut=_e*Je,dt=Je<0?-E:E,Ct=25,wt,Dt;do Dt=ut-b*v(dt),dt-=wt=(v(2*dt)+2*dt-w*v(Dt))/(2*r(2*dt)+2+w*r(Dt)*b*r(dt));while(M(wt)>l&&--Ct>0);return Dt=ut-b*v(dt),[He*(1/r(Dt)+fe/r(dt))/_e,Dt]};function rt(){return x.geoProjection(Fe).scale(160.857)}function st(He){var Je=0,ut=x.geoProjectionMutator(He),dt=ut(Je);return dt.parallel=function(Ct){return arguments.length?ut(Je=Ct*h):Je*m},dt}function Qe(He,Je){return[He*r(Je),Je]}Qe.invert=function(He,Je){return[He/r(Je),Je]};function Lt(){return x.geoProjection(Qe).scale(152.63)}function kt(He){if(!He)return Qe;var Je=1/T(He);function ut(dt,Ct){var wt=Je+He-Ct,Dt=wt&&dt*r(Ct)/wt;return[wt*v(Dt),Je-wt*r(Dt)]}return ut.invert=function(dt,Ct){var wt=F(dt*dt+(Ct=Je-Ct)*Ct),Dt=Je+He-wt;return[wt/r(Dt)*t(dt,Ct),Dt]},ut}function Vt(){return st(kt).scale(123.082).center([0,26.1441]).parallel(45)}function Zt(He){function Je(ut,dt){var Ct=S-dt,wt=Ct&&ut*He*v(Ct)/Ct;return[Ct*v(wt)/He,S-Ct*r(wt)]}return Je.invert=function(ut,dt){var Ct=ut*He,wt=S-dt,Dt=F(Ct*Ct+wt*wt),ur=t(Ct,wt);return[(Dt?Dt/v(Dt):1)*ur/He,S-Dt]},Je}function Sr(){var He=.5,Je=x.geoProjectionMutator(Zt),ut=Je(He);return ut.fraction=function(dt){return arguments.length?Je(He=+dt):He},ut.scale(158.837)}var xr=tt(1,4/w,w);function jr(){return x.geoProjection(xr).scale(152.63)}function wr(He,Je,ut,dt,Ct,wt){var Dt=r(wt),ur;if(M(He)>1||M(wt)>1)ur=z(ut*Ct+Je*dt*Dt);else{var mr=v(He/2),Er=v(wt/2);ur=2*L(F(mr*mr+Je*dt*Er*Er))}return M(ur)>l?[ur,t(dt*v(wt),Je*Ct-ut*dt*Dt)]:[0,0]}function Ir(He,Je,ut){return z((He*He+Je*Je-ut*ut)/(2*He*Je))}function bt(He){return He-2*w*a((He+w)/(2*w))}function Be(He,Je,ut){for(var dt=[[He[0],He[1],v(He[1]),r(He[1])],[Je[0],Je[1],v(Je[1]),r(Je[1])],[ut[0],ut[1],v(ut[1]),r(ut[1])]],Ct=dt[2],wt,Dt=0;Dt<3;++Dt,Ct=wt)wt=dt[Dt],Ct.v=wr(wt[1]-Ct[1],Ct[3],Ct[2],wt[3],wt[2],wt[0]-Ct[0]),Ct.point=[0,0];var ur=Ir(dt[0].v[0],dt[2].v[0],dt[1].v[0]),mr=Ir(dt[0].v[0],dt[1].v[0],dt[2].v[0]),Er=w-ur;dt[2].point[1]=0,dt[0].point[0]=-(dt[1].point[0]=dt[0].v[0]/2);var Br=[dt[2].point[0]=dt[0].point[0]+dt[2].v[0]*r(ur),2*(dt[0].point[1]=dt[1].point[1]=dt[2].v[0]*v(ur))];function Qr(ga,Sa){var Oa=v(Sa),di=r(Sa),Wi=new Array(3),Gi;for(Gi=0;Gi<3;++Gi){var on=dt[Gi];if(Wi[Gi]=wr(Sa-on[1],on[3],on[2],di,Oa,ga-on[0]),!Wi[Gi][0])return on.point;Wi[Gi][1]=bt(Wi[Gi][1]-on.v[1])}var Tn=Br.slice();for(Gi=0;Gi<3;++Gi){var Wn=Gi==2?0:Gi+1,Bn=Ir(dt[Gi].v[0],Wi[Gi][0],Wi[Wn][0]);Wi[Gi][1]<0&&(Bn=-Bn),Gi?Gi==1?(Bn=mr-Bn,Tn[0]-=Wi[Gi][0]*r(Bn),Tn[1]-=Wi[Gi][0]*v(Bn)):(Bn=Er-Bn,Tn[0]+=Wi[Gi][0]*r(Bn),Tn[1]+=Wi[Gi][0]*v(Bn)):(Tn[0]+=Wi[Gi][0]*r(Bn),Tn[1]-=Wi[Gi][0]*v(Bn))}return Tn[0]/=3,Tn[1]/=3,Tn}return Qr}function Ke(He){return He[0]*=h,He[1]*=h,He}function Ue(){return Me([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Me(He,Je,ut){var dt=x.geoCentroid({type:"MultiPoint",coordinates:[He,Je,ut]}),Ct=[-dt[0],-dt[1]],wt=x.geoRotation(Ct),Dt=Be(Ke(wt(He)),Ke(wt(Je)),Ke(wt(ut)));Dt.invert=Re(Dt);var ur=x.geoProjection(Dt).rotate(Ct),mr=ur.center;return delete ur.rotate,ur.center=function(Er){return arguments.length?mr(wt(Er)):wt.invert(mr())},ur.clipAngle(90)}function qe(He,Je){var ut=F(1-v(Je));return[2/p*He*ut,p*(1-ut)]}qe.invert=function(He,Je){var ut=(ut=Je/p-1)*ut;return[ut>0?He*F(w/ut)/2:0,L(1-ut)]};function Ce(){return x.geoProjection(qe).scale(95.6464).center([0,30])}function Te(He){var Je=T(He);function ut(dt,Ct){return[dt,(dt?dt/v(dt):1)*(v(Ct)*r(dt)-Je*r(Ct))]}return ut.invert=Je?function(dt,Ct){dt&&(Ct*=v(dt)/dt);var wt=r(dt);return[dt,2*t(F(wt*wt+Je*Je-Ct*Ct)-wt,Je-Ct)]}:function(dt,Ct){return[dt,L(dt?Ct*T(dt)/dt:Ct)]},ut}function Pe(){return st(Te).scale(249.828).clipAngle(90)}var at=F(3);function yt(He,Je){return[at*He*(2*r(2*Je/3)-1)/p,at*p*v(Je/3)]}yt.invert=function(He,Je){var ut=3*L(Je/(at*p));return[p*He/(at*(2*r(2*ut/3)-1)),ut]};function Tt(){return x.geoProjection(yt).scale(156.19)}function Ot(He){var Je=r(He);function ut(dt,Ct){return[dt*Je,v(Ct)/Je]}return ut.invert=function(dt,Ct){return[dt/Je,L(Ct*Je)]},ut}function Gt(){return st(Ot).parallel(38.58).scale(195.044)}function rr(He){var Je=r(He);function ut(dt,Ct){return[dt*Je,(1+Je)*T(Ct/2)]}return ut.invert=function(dt,Ct){return[dt/Je,e(Ct/(1+Je))*2]},ut}function Qt(){return st(rr).scale(124.75)}function Tr(He,Je){var ut=F(8/(3*w));return[ut*He*(1-M(Je)/w),ut*Je]}Tr.invert=function(He,Je){var ut=F(8/(3*w)),dt=Je/ut;return[He/(ut*(1-M(dt)/w)),dt]};function la(){return x.geoProjection(Tr).scale(165.664)}function Ua(He,Je){var ut=F(4-3*v(M(Je)));return[2/F(6*w)*He*ut,g(Je)*F(2*w/3)*(2-ut)]}Ua.invert=function(He,Je){var ut=2-M(Je)/F(2*w/3);return[He*F(6*w)/(2*ut),g(Je)*L((4-ut*ut)/3)]};function Ba(){return x.geoProjection(Ua).scale(165.664)}function Ra(He,Je){var ut=F(w*(4+w));return[2/ut*He*(1+F(1-4*Je*Je/(w*w))),4/ut*Je]}Ra.invert=function(He,Je){var ut=F(w*(4+w))/2;return[He*ut/(1+F(1-Je*Je*(4+w)/(4*w))),Je*ut/2]};function ei(){return x.geoProjection(Ra).scale(180.739)}function za(He,Je){var ut=(2+S)*v(Je);Je/=2;for(var dt=0,Ct=1/0;dt<10&&M(Ct)>l;dt++){var wt=r(Je);Je-=Ct=(Je+v(Je)*(wt+2)-ut)/(2*wt*(1+wt))}return[2/F(w*(4+w))*He*(1+r(Je)),2*F(w/(4+w))*v(Je)]}za.invert=function(He,Je){var ut=Je*F((4+w)/w)/2,dt=L(ut),Ct=r(dt);return[He/(2/F(w*(4+w))*(1+Ct)),L((dt+ut*(Ct+2))/(2+S))]};function ti(){return x.geoProjection(za).scale(180.739)}function Ci(He,Je){return[He*(1+r(Je))/F(2+w),2*Je/F(2+w)]}Ci.invert=function(He,Je){var ut=F(2+w),dt=Je*ut/2;return[ut*He/(1+r(dt)),dt]};function Jt(){return x.geoProjection(Ci).scale(173.044)}function Nt(He,Je){for(var ut=(1+S)*v(Je),dt=0,Ct=1/0;dt<10&&M(Ct)>l;dt++)Je-=Ct=(Je+v(Je)-ut)/(1+r(Je));return ut=F(2+w),[He*(1+r(Je))/ut,2*Je/ut]}Nt.invert=function(He,Je){var ut=1+S,dt=F(ut/2);return[He*2*dt/(1+r(Je*=dt)),L((Je+v(Je))/ut)]};function Kt(){return x.geoProjection(Nt).scale(173.044)}var Wt=3+2*b;function Pr(He,Je){var ut=v(He/=2),dt=r(He),Ct=F(r(Je)),wt=r(Je/=2),Dt=v(Je)/(wt+b*dt*Ct),ur=F(2/(1+Dt*Dt)),mr=F((b*wt+(dt+ut)*Ct)/(b*wt+(dt-ut)*Ct));return[Wt*(ur*(mr-1/mr)-2*i(mr)),Wt*(ur*Dt*(mr+1/mr)-2*e(Dt))]}Pr.invert=function(He,Je){if(!(wt=$.invert(He/1.2,Je*1.065)))return null;var ut=wt[0],dt=wt[1],Ct=20,wt;He/=Wt,Je/=Wt;do{var Dt=ut/2,ur=dt/2,mr=v(Dt),Er=r(Dt),Br=v(ur),Qr=r(ur),ga=r(dt),Sa=F(ga),Oa=Br/(Qr+b*Er*Sa),di=Oa*Oa,Wi=F(2/(1+di)),Gi=b*Qr+(Er+mr)*Sa,on=b*Qr+(Er-mr)*Sa,Tn=Gi/on,Wn=F(Tn),Bn=Wn-1/Wn,Ao=Wn+1/Wn,ss=Wi*Bn-2*i(Wn)-He,So=Wi*Oa*Ao-2*e(Oa)-Je,Ko=Br&&y*Sa*mr*di/Br,hs=(b*Er*Qr+Sa)/(2*(Qr+b*Er*Sa)*(Qr+b*Er*Sa)*Sa),ll=-.5*Oa*Wi*Wi*Wi,Js=ll*Ko,es=ll*hs,ts=(ts=2*Qr+b*Sa*(Er-mr))*ts*Wn,Pl=(b*Er*Qr*Sa+ga)/ts,$l=-(b*mr*Br)/(Sa*ts),Ru=Bn*Js-2*Pl/Wn+Wi*(Pl+Pl/Tn),hu=Bn*es-2*$l/Wn+Wi*($l+$l/Tn),wl=Oa*Ao*Js-2*Ko/(1+di)+Wi*Ao*Ko+Wi*Oa*(Pl-Pl/Tn),su=Oa*Ao*es-2*hs/(1+di)+Wi*Ao*hs+Wi*Oa*($l-$l/Tn),uc=hu*wl-su*Ru;if(!uc)break;var ql=(So*hu-ss*su)/uc,Vl=(ss*wl-So*Ru)/uc;ut-=ql,dt=n(-S,s(S,dt-Vl))}while((M(ql)>l||M(Vl)>l)&&--Ct>0);return M(M(dt)-S)<l?[0,dt]:Ct&&[ut,dt]};function ta(){return x.geoProjection(Pr).scale(62.5271)}var ma=r(35*h);function ra(He,Je){var ut=T(Je/2);return[He*ma*F(1-ut*ut),(1+ma)*ut]}ra.invert=function(He,Je){var ut=Je/(1+ma);return[He&&He/(ma*F(1-ut*ut)),2*e(ut)]};function Ia(){return x.geoProjection(ra).scale(137.152)}function Ha(He,Je){var ut=Je/2,dt=r(ut);return[2*He/p*r(Je)*dt*dt,p*T(ut)]}Ha.invert=function(He,Je){var ut=e(Je/p),dt=r(ut),Ct=2*ut;return[He*p/2/(r(Ct)*dt*dt),Ct]};function $a(){return x.geoProjection(Ha).scale(135.264)}function ai(He){var Je=1-He,ut=wt(w,0)[0]-wt(-w,0)[0],dt=wt(0,S)[1]-wt(0,-S)[1],Ct=F(2*dt/ut);function wt(mr,Er){var Br=r(Er),Qr=v(Er);return[Br/(Je+He*Br)*mr,Je*Er+He*Qr]}function Dt(mr,Er){var Br=wt(mr,Er);return[Br[0]*Ct,Br[1]/Ct]}function ur(mr){return Dt(0,mr)[1]}return Dt.invert=function(mr,Er){var Br=ze(ur,Er),Qr=mr/Ct*(He+Je/r(Br));return[Qr,Br]},Dt}function mi(){var He=.5,Je=x.geoProjectionMutator(ai),ut=Je(He);return ut.alpha=function(dt){return arguments.length?Je(He=+dt):He},ut.scale(168.725)}function xt(He){return[He[0]/2,L(T(He[1]/2*h))*m]}function ct(He){return[He[0]*2,2*e(v(He[1]*h))*m]}function Nr(He){He==null&&(He=x.geoOrthographic);var Je=He(),ut=x.geoEquirectangular().scale(m).precision(0).clipAngle(null).translate([0,0]);function dt(wt){return Je(xt(wt))}Je.invert&&(dt.invert=function(wt){return ct(Je.invert(wt))}),dt.stream=function(wt){var Dt=Je.stream(wt),ur=ut.stream({point:function(mr,Er){Dt.point(mr/2,L(T(-Er/2*h))*m)},lineStart:function(){Dt.lineStart()},lineEnd:function(){Dt.lineEnd()},polygonStart:function(){Dt.polygonStart()},polygonEnd:function(){Dt.polygonEnd()}});return ur.sphere=Dt.sphere,ur};function Ct(wt){dt[wt]=function(){return arguments.length?(Je[wt].apply(Je,arguments),dt):Je[wt]()}}return dt.rotate=function(wt){return arguments.length?(ut.rotate(wt),dt):ut.rotate()},dt.center=function(wt){return arguments.length?(Je.center(xt(wt)),dt):ct(Je.center())},Ct("angle"),Ct("clipAngle"),Ct("clipExtent"),Ct("fitExtent"),Ct("fitHeight"),Ct("fitSize"),Ct("fitWidth"),Ct("scale"),Ct("translate"),Ct("precision"),dt.scale(249.5)}function Or(He,Je){var ut=2*w/Je,dt=He*He;function Ct(wt,Dt){var ur=x.geoAzimuthalEquidistantRaw(wt,Dt),mr=ur[0],Er=ur[1],Br=mr*mr+Er*Er;if(Br>dt){var Qr=F(Br),ga=t(Er,mr),Sa=ut*f(ga/ut),Oa=ga-Sa,di=He*r(Oa),Wi=(He*v(Oa)-Oa*v(di))/(S-di),Gi=Rr(Oa,Wi),on=(w-He)/Lr(Gi,di,w);mr=Qr;var Tn=50,Wn;do mr-=Wn=(He+Lr(Gi,di,mr)*on-Qr)/(Gi(mr)*on);while(M(Wn)>l&&--Tn>0);Er=Oa*v(mr),mr<S&&(Er-=Wi*(mr-S));var Bn=v(Sa),Ao=r(Sa);ur[0]=mr*Ao-Er*Bn,ur[1]=mr*Bn+Er*Ao}return ur}return Ct.invert=function(wt,Dt){var ur=wt*wt+Dt*Dt;if(ur>dt){var mr=F(ur),Er=t(Dt,wt),Br=ut*f(Er/ut),Qr=Er-Br;wt=mr*r(Qr),Dt=mr*v(Qr);for(var ga=wt-S,Sa=v(wt),Oa=Dt/Sa,di=wt<S?1/0:0,Wi=10;;){var Gi=He*v(Oa),on=He*r(Oa),Tn=v(on),Wn=S-on,Bn=(Gi-Oa*Tn)/Wn,Ao=Rr(Oa,Bn);if(M(di)<_||!--Wi)break;Oa-=di=(Oa*Sa-Bn*ga-Dt)/(Sa-ga*2*(Wn*(on+Oa*Gi*r(on)-Tn)-Gi*(Gi-Oa*Tn))/(Wn*Wn))}mr=He+Lr(Ao,on,wt)*(w-He)/Lr(Ao,on,w),Er=Br+Oa,wt=mr*r(Er),Dt=mr*v(Er)}return x.geoAzimuthalEquidistantRaw.invert(wt,Dt)},Ct}function Rr(He,Je){return function(ut){var dt=He*r(ut);return ut<S&&(dt-=Je),F(1+dt*dt)}}function Lr(He,Je,ut){for(var dt=50,Ct=(ut-Je)/dt,wt=He(Je)+He(ut),Dt=1,ur=Je;Dt<dt;++Dt)wt+=2*He(ur+=Ct);return wt*.5*Ct}function Gr(){var He=6,Je=30*h,ut=r(Je),dt=v(Je),Ct=x.geoProjectionMutator(Or),wt=Ct(Je,He),Dt=wt.stream,ur=.01,mr=-r(ur*h),Er=v(ur*h);return wt.radius=function(Br){return arguments.length?(ut=r(Je=Br*h),dt=v(Je),Ct(Je,He)):Je*m},wt.lobes=function(Br){return arguments.length?Ct(Je,He=+Br):He},wt.stream=function(Br){var Qr=wt.rotate(),ga=Dt(Br),Sa=(wt.rotate([0,0]),Dt(Br));return wt.rotate(Qr),ga.sphere=function(){Sa.polygonStart(),Sa.lineStart();for(var Oa=0,di=2*w/He,Wi=0;Oa<He;++Oa,Wi-=di)Sa.point(t(Er*r(Wi),mr)*m,L(Er*v(Wi))*m),Sa.point(t(dt*r(Wi-di/2),ut)*m,L(dt*v(Wi-di/2))*m);Sa.lineEnd(),Sa.polygonEnd()},ga},wt.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function Kr(He,Je,ut,dt,Ct,wt,Dt,ur){arguments.length<8&&(ur=0);function mr(Er,Br){if(!Br)return[He*Er/w,0];var Qr=Br*Br,ga=He+Qr*(Je+Qr*(ut+Qr*dt)),Sa=Br*(Ct-1+Qr*(wt-ur+Qr*Dt)),Oa=(ga*ga+Sa*Sa)/(2*Sa),di=Er*L(ga/Oa)/w;return[Oa*v(di),Br*(1+Qr*ur)+Oa*(1-r(di))]}return mr.invert=function(Er,Br){var Qr=w*Er/He,ga=Br,Sa,Oa,di=50;do{var Wi=ga*ga,Gi=He+Wi*(Je+Wi*(ut+Wi*dt)),on=ga*(Ct-1+Wi*(wt-ur+Wi*Dt)),Tn=Gi*Gi+on*on,Wn=2*on,Bn=Tn/Wn,Ao=Bn*Bn,ss=L(Gi/Bn)/w,So=Qr*ss,Ko=Gi*Gi,hs=(2*Je+Wi*(4*ut+Wi*6*dt))*ga,ll=Ct+Wi*(3*wt+Wi*5*Dt),Js=2*(Gi*hs+on*(ll-1)),es=2*(ll-1),ts=(Js*Wn-Tn*es)/(Wn*Wn),Pl=r(So),$l=v(So),Ru=Bn*Pl,hu=Bn*$l,wl=Qr/w*(1/F(1-Ko/Ao))*(hs*Bn-Gi*ts)/Ao,su=hu-Er,uc=ga*(1+Wi*ur)+Bn-Ru-Br,ql=ts*$l+Ru*wl,Vl=Ru*ss,de=1+ts-(ts*Pl-hu*wl),De=hu*ss,et=ql*De-de*Vl;if(!et)break;Qr-=Sa=(uc*ql-su*de)/et,ga-=Oa=(su*De-uc*Vl)/et}while((M(Sa)>l||M(Oa)>l)&&--di>0);return[Qr,ga]},mr}var Ur=Kr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function aa(){return x.geoProjection(Ur).scale(149.995)}var da=Kr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function fa(){return x.geoProjection(da).scale(153.93)}var It=Kr(5/6*w,-.62636,-.0344,0,1.3493,-.05524,0,.045);function dr(){return x.geoProjection(It).scale(130.945)}function kr(He,Je){var ut=He*He,dt=Je*Je;return[He*(1-.162388*dt)*(.87-952426e-9*ut*ut),Je*(1+dt/12)]}kr.invert=function(He,Je){var ut=He,dt=Je,Ct=50,wt;do{var Dt=dt*dt;dt-=wt=(dt*(1+Dt/12)-Je)/(1+Dt/4)}while(M(wt)>l&&--Ct>0);Ct=50,He/=1-.162388*Dt;do{var ur=(ur=ut*ut)*ur;ut-=wt=(ut*(.87-952426e-9*ur)-He)/(.87-.00476213*ur)}while(M(wt)>l&&--Ct>0);return[ut,dt]};function ia(){return x.geoProjection(kr).scale(131.747)}var Ca=Kr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Fa(){return x.geoProjection(Ca).scale(131.087)}function Ya(He){var Je=He(S,0)[0]-He(-S,0)[0];function ut(dt,Ct){var wt=dt>0?-.5:.5,Dt=He(dt+wt*w,Ct);return Dt[0]-=wt*Je,Dt}return He.invert&&(ut.invert=function(dt,Ct){var wt=dt>0?-.5:.5,Dt=He.invert(dt+wt*Je,Ct),ur=Dt[0]-wt*w;return ur<-w?ur+=2*w:ur>w&&(ur-=2*w),Dt[0]=ur,Dt}),ut}function ha(He,Je){var ut=g(He),dt=g(Je),Ct=r(Je),wt=r(He)*Ct,Dt=v(He)*Ct,ur=v(dt*Je);He=M(t(Dt,ur)),Je=L(wt),M(He-S)>l&&(He%=S);var mr=Da(He>w/4?S-He:He,Je);return He>w/4&&(ur=mr[0],mr[0]=-mr[1],mr[1]=-ur),mr[0]*=ut,mr[1]*=-dt,mr}ha.invert=function(He,Je){M(He)>1&&(He=g(He)*2-He),M(Je)>1&&(Je=g(Je)*2-Je);var ut=g(He),dt=g(Je),Ct=-ut*He,wt=-dt*Je,Dt=wt/Ct<1,ur=Xi(Dt?wt:Ct,Dt?Ct:wt),mr=ur[0],Er=ur[1],Br=r(Er);return Dt&&(mr=-S-mr),[ut*(t(v(mr)*Br,-v(Er))+w),dt*L(r(mr)*Br)]};function Da(He,Je){if(Je===S)return[0,0];var ut=v(Je),dt=ut*ut,Ct=dt*dt,wt=1+Ct,Dt=1+3*Ct,ur=1-Ct,mr=L(1/F(wt)),Er=ur+dt*wt*mr,Br=(1-ut)/Er,Qr=F(Br),ga=Br*wt,Sa=F(ga),Oa=Qr*ur,di,Wi;if(He===0)return[0,-(Oa+dt*Sa)];var Gi=r(Je),on=1/Gi,Tn=2*ut*Gi,Wn=(-3*dt+mr*Dt)*Tn,Bn=(-Er*Gi-(1-ut)*Wn)/(Er*Er),Ao=.5*Bn/Qr,ss=ur*Ao-2*dt*Qr*Tn,So=dt*wt*Bn+Br*Dt*Tn,Ko=-on*Tn,hs=-on*So,ll=-2*on*ss,Js=4*He/w,es;if(He>.222*w||Je<w/4&&He>.175*w){if(di=(Oa+dt*F(ga*(1+Ct)-Oa*Oa))/(1+Ct),He>w/4)return[di,di];var ts=di,Pl=.5*di;di=.5*(Pl+ts),Wi=50;do{var $l=F(ga-di*di),Ru=di*(ll+Ko*$l)+hs*L(di/Sa)-Js;if(!Ru)break;Ru<0?Pl=di:ts=di,di=.5*(Pl+ts)}while(M(ts-Pl)>l&&--Wi>0)}else{di=l,Wi=25;do{var hu=di*di,wl=F(ga-hu),su=ll+Ko*wl,uc=di*su+hs*L(di/Sa)-Js,ql=su+(hs-Ko*hu)/wl;di-=es=wl?uc/ql:0}while(M(es)>l&&--Wi>0)}return[di,-Oa-dt*F(ga-di*di)]}function Xi(He,Je){for(var ut=0,dt=1,Ct=.5,wt=50;;){var Dt=Ct*Ct,ur=F(Ct),mr=L(1/F(1+Dt)),Er=1-Dt+Ct*(1+Dt)*mr,Br=(1-ur)/Er,Qr=F(Br),ga=Br*(1+Dt),Sa=Qr*(1-Dt),Oa=ga-He*He,di=F(Oa),Wi=Je+Sa+Ct*di;if(M(dt-ut)<_||--wt===0||Wi===0)break;Wi>0?ut=Ct:dt=Ct,Ct=.5*(ut+dt)}if(!wt)return null;var Gi=L(ur),on=r(Gi),Tn=1/on,Wn=2*ur*on,Bn=(-3*Ct+mr*(1+3*Dt))*Wn,Ao=(-Er*on-(1-ur)*Bn)/(Er*Er),ss=.5*Ao/Qr,So=(1-Dt)*ss-2*Ct*Qr*Wn,Ko=-2*Tn*So,hs=-Tn*Wn,ll=-Tn*(Ct*(1+Dt)*Ao+Br*(1+3*Dt)*Wn);return[w/4*(He*(Ko+hs*di)+ll*L(He/F(ga))),Gi]}function Li(){return x.geoProjection(Ya(ha)).scale(239.75)}function fn(He,Je,ut){var dt,Ct,wt;return He?(dt=An(He,ut),Je?(Ct=An(Je,1-ut),wt=Ct[1]*Ct[1]+ut*dt[0]*dt[0]*Ct[0]*Ct[0],[[dt[0]*Ct[2]/wt,dt[1]*dt[2]*Ct[0]*Ct[1]/wt],[dt[1]*Ct[1]/wt,-dt[0]*dt[2]*Ct[0]*Ct[2]/wt],[dt[2]*Ct[1]*Ct[2]/wt,-ut*dt[0]*dt[1]*Ct[0]/wt]]):[[dt[0],0],[dt[1],0],[dt[2],0]]):(Ct=An(Je,1-ut),[[0,Ct[0]/Ct[1]],[1/Ct[1],0],[Ct[2]/Ct[1],0]])}function An(He,Je){var ut,dt,Ct,wt,Dt;if(Je<l)return wt=v(He),dt=r(He),ut=Je*(He-wt*dt)/4,[wt-ut*dt,dt+ut*wt,1-Je*wt*wt/2,He-ut];if(Je>=1-l)return ut=(1-Je)/4,dt=I(He),wt=B(He),Ct=1/dt,Dt=dt*O(He),[wt+ut*(Dt-He)/(dt*dt),Ct-ut*wt*Ct*(Dt-He),Ct+ut*wt*Ct*(Dt+He),2*e(o(He))-S+ut*(Dt-He)/dt];var ur=[1,0,0,0,0,0,0,0,0],mr=[F(Je),0,0,0,0,0,0,0,0],Er=0;for(dt=F(1-Je),Dt=1;M(mr[Er]/ur[Er])>l&&Er<8;)ut=ur[Er++],mr[Er]=(ut-dt)/2,ur[Er]=(ut+dt)/2,dt=F(ut*dt),Dt*=2;Ct=Dt*ur[Er]*He;do wt=mr[Er]*v(dt=Ct)/ur[Er],Ct=(L(wt)+Ct)/2;while(--Er);return[v(Ct),wt=r(Ct),wt/r(Ct-dt),Ct]}function kn(He,Je,ut){var dt=M(He),Ct=M(Je),wt=O(Ct);if(dt){var Dt=1/v(dt),ur=1/(T(dt)*T(dt)),mr=-(ur+ut*(wt*wt*Dt*Dt)-1+ut),Er=(ut-1)*ur,Br=(-mr+F(mr*mr-4*Er))/2;return[zn(e(1/F(Br)),ut)*g(He),zn(e(F((Br/ur-1)/ut)),1-ut)*g(Je)]}return[0,zn(e(wt),1-ut)*g(Je)]}function zn(He,Je){if(!Je)return He;if(Je===1)return i(T(He/2+E));for(var ut=1,dt=F(1-Je),Ct=F(Je),wt=0;M(Ct)>l;wt++){if(He%w){var Dt=e(dt*T(He)/ut);Dt<0&&(Dt+=w),He+=Dt+~~(He/w)*w}else He+=He;Ct=(ut+dt)/2,dt=F(ut*dt),Ct=((ut=Ct)-dt)/2}return He/(c(2,wt)*ut)}function Xn(He,Je){var ut=(b-1)/(b+1),dt=F(1-ut*ut),Ct=zn(S,dt*dt),wt=-1,Dt=i(T(w/4+M(Je)/2)),ur=o(wt*Dt)/F(ut),mr=to(ur*r(wt*He),ur*v(wt*He)),Er=kn(mr[0],mr[1],dt*dt);return[-Er[1],(Je>=0?1:-1)*(.5*Ct-Er[0])]}function to(He,Je){var ut=He*He,dt=Je+1,Ct=1-ut-Je*Je;return[.5*((He>=0?S:-S)-t(Ct,2*He)),-.25*i(Ct*Ct+4*ut)+.5*i(dt*dt+ut)]}function mo(He,Je){var ut=Je[0]*Je[0]+Je[1]*Je[1];return[(He[0]*Je[0]+He[1]*Je[1])/ut,(He[1]*Je[0]-He[0]*Je[1])/ut]}Xn.invert=function(He,Je){var ut=(b-1)/(b+1),dt=F(1-ut*ut),Ct=zn(S,dt*dt),wt=-1,Dt=fn(.5*Ct-Je,-He,dt*dt),ur=mo(Dt[0],Dt[1]),mr=t(ur[1],ur[0])/wt;return[mr,2*e(o(.5/wt*i(ut*ur[0]*ur[0]+ut*ur[1]*ur[1])))-S]};function pn(){return x.geoProjection(Ya(Xn)).scale(151.496)}function Jo(He){var Je=v(He),ut=r(He),dt=Xo(He);dt.invert=Xo(-He);function Ct(wt,Dt){var ur=dt(wt,Dt);wt=ur[0],Dt=ur[1];var mr=v(Dt),Er=r(Dt),Br=r(wt),Qr=z(Je*mr+ut*Er*Br),ga=v(Qr),Sa=M(ga)>l?Qr/ga:1;return[Sa*ut*v(wt),(M(wt)>S?Sa:-Sa)*(Je*Er-ut*mr*Br)]}return Ct.invert=function(wt,Dt){var ur=F(wt*wt+Dt*Dt),mr=-v(ur),Er=r(ur),Br=ur*Er,Qr=-Dt*mr,ga=ur*Je,Sa=F(Br*Br+Qr*Qr-ga*ga),Oa=t(Br*ga+Qr*Sa,Qr*ga-Br*Sa),di=(ur>S?-1:1)*t(wt*mr,ur*r(Oa)*Er+Dt*v(Oa)*mr);return dt.invert(di,Oa)},Ct}function Xo(He){var Je=v(He),ut=r(He);return function(dt,Ct){var wt=r(Ct),Dt=r(dt)*wt,ur=v(dt)*wt,mr=v(Ct);return[t(ur,Dt*ut-mr*Je),L(mr*ut+Dt*Je)]}}function Ts(){var He=0,Je=x.geoProjectionMutator(Jo),ut=Je(He),dt=ut.rotate,Ct=ut.stream,wt=x.geoCircle();return ut.parallel=function(Dt){if(!arguments.length)return He*m;var ur=ut.rotate();return Je(He=Dt*h).rotate(ur)},ut.rotate=function(Dt){return arguments.length?(dt.call(ut,[Dt[0],Dt[1]-He*m]),wt.center([-Dt[0],-Dt[1]]),ut):(Dt=dt.call(ut),Dt[1]+=He*m,Dt)},ut.stream=function(Dt){return Dt=Ct(Dt),Dt.sphere=function(){Dt.polygonStart();var ur=.01,mr=wt.radius(90-ur)().coordinates[0],Er=mr.length-1,Br=-1,Qr;for(Dt.lineStart();++Br<Er;)Dt.point((Qr=mr[Br])[0],Qr[1]);for(Dt.lineEnd(),mr=wt.radius(90+ur)().coordinates[0],Er=mr.length-1,Dt.lineStart();--Br>=0;)Dt.point((Qr=mr[Br])[0],Qr[1]);Dt.lineEnd(),Dt.polygonEnd()},Dt},ut.scale(79.4187).parallel(45).clipAngle(180-.001)}var Po=3,so=L(1-1/Po)*m,Vn=Ot(0);function To(He){var Je=so*h,ut=qe(w,Je)[0]-qe(-w,Je)[0],dt=Vn(0,Je)[1],Ct=qe(0,Je)[1],wt=p-Ct,Dt=u/He,ur=4/u,mr=dt+wt*wt*4/u;function Er(Br,Qr){var ga,Sa=M(Qr);if(Sa>Je){var Oa=s(He-1,n(0,a((Br+w)/Dt)));Br+=w*(He-1)/He-Oa*Dt,ga=qe(Br,Sa),ga[0]=ga[0]*u/ut-u*(He-1)/(2*He)+Oa*u/He,ga[1]=dt+(ga[1]-Ct)*4*wt/u,Qr<0&&(ga[1]=-ga[1])}else ga=Vn(Br,Qr);return ga[0]*=ur,ga[1]/=mr,ga}return Er.invert=function(Br,Qr){Br/=ur,Qr*=mr;var ga=M(Qr);if(ga>dt){var Sa=s(He-1,n(0,a((Br+w)/Dt)));Br=(Br+w*(He-1)/He-Sa*Dt)*ut/u;var Oa=qe.invert(Br,.25*(ga-dt)*u/wt+Ct);return Oa[0]-=w*(He-1)/He-Sa*Dt,Qr<0&&(Oa[1]=-Oa[1]),Oa}return Vn.invert(Br,Qr)},Er}function qo(He,Je){return[He,Je&1?90-l:so]}function Oo(He,Je){return[He,Je&1?-90+l:-so]}function lo(He){return[He[0]*(1-l),He[1]]}function Co(He){var Je=[].concat(A.range(-180,180+He/2,He).map(qo),A.range(180,-180-He/2,-He).map(Oo));return{type:"Polygon",coordinates:[He===180?Je.map(lo):Je]}}function os(){var He=4,Je=x.geoProjectionMutator(To),ut=Je(He),dt=ut.stream;return ut.lobes=function(Ct){return arguments.length?Je(He=+Ct):He},ut.stream=function(Ct){var wt=ut.rotate(),Dt=dt(Ct),ur=(ut.rotate([0,0]),dt(Ct));return ut.rotate(wt),Dt.sphere=function(){x.geoStream(Co(180/He),ur)},Dt},ut.scale(239.75)}function Ys(He){var Je=1+He,ut=v(1/Je),dt=L(ut),Ct=2*F(w/(wt=w+4*dt*Je)),wt,Dt=.5*Ct*(Je+F(He*(2+He))),ur=He*He,mr=Je*Je;function Er(Br,Qr){var ga=1-v(Qr),Sa,Oa;if(ga&&ga<2){var di=S-Qr,Wi=25,Gi;do{var on=v(di),Tn=r(di),Wn=dt+t(on,Je-Tn),Bn=1+mr-2*Je*Tn;di-=Gi=(di-ur*dt-Je*on+Bn*Wn-.5*ga*wt)/(2*Je*on*Wn)}while(M(Gi)>_&&--Wi>0);Sa=Ct*F(Bn),Oa=Br*Wn/w}else Sa=Ct*(He+ga),Oa=Br*dt/w;return[Sa*v(Oa),Dt-Sa*r(Oa)]}return Er.invert=function(Br,Qr){var ga=Br*Br+(Qr-=Dt)*Qr,Sa=(1+mr-ga/(Ct*Ct))/(2*Je),Oa=z(Sa),di=v(Oa),Wi=dt+t(di,Je-Sa);return[L(Br/F(ga))*w/Wi,L(1-2*(Oa-ur*dt-Je*di+(1+mr-2*Je*Sa)*Wi)/wt)]},Er}function Os(){var He=1,Je=x.geoProjectionMutator(Ys),ut=Je(He);return ut.ratio=function(dt){return arguments.length?Je(He=+dt):He},ut.scale(167.774).center([0,18.67])}var Yo=.7109889596207567,Ui=.0528035274542;function Cn(He,Je){return Je>-Yo?(He=lt(He,Je),He[1]+=Ui,He):Qe(He,Je)}Cn.invert=function(He,Je){return Je>-Yo?lt.invert(He,Je-Ui):Qe.invert(He,Je)};function tl(){return x.geoProjection(Cn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Bs(He,Je){return M(Je)>Yo?(He=lt(He,Je),He[1]-=Je>0?Ui:-Ui,He):Qe(He,Je)}Bs.invert=function(He,Je){return M(Je)>Yo?lt.invert(He,Je+(Je>0?Ui:-Ui)):Qe.invert(He,Je)};function uo(){return x.geoProjection(Bs).scale(152.63)}function $s(He,Je,ut,dt){var Ct=F(4*w/(2*ut+(1+He-Je/2)*v(2*ut)+(He+Je)/2*v(4*ut)+Je/2*v(6*ut))),wt=F(dt*v(ut)*F((1+He*r(2*ut)+Je*r(4*ut))/(1+He+Je))),Dt=ut*mr(1);function ur(Qr){return F(1+He*r(2*Qr)+Je*r(4*Qr))}function mr(Qr){var ga=Qr*ut;return(2*ga+(1+He-Je/2)*v(2*ga)+(He+Je)/2*v(4*ga)+Je/2*v(6*ga))/ut}function Er(Qr){return ur(Qr)*v(Qr)}var Br=function(Qr,ga){var Sa=ut*ze(mr,Dt*v(ga)/ut,ga/w);isNaN(Sa)&&(Sa=ut*g(ga));var Oa=Ct*ur(Sa);return[Oa*wt*Qr/w*r(Sa),Oa/wt*v(Sa)]};return Br.invert=function(Qr,ga){var Sa=ze(Er,ga*wt/Ct);return[Qr*w/(r(Sa)*Ct*wt*ur(Sa)),L(ut*mr(Sa/ut)/Dt)]},ut===0&&(Ct=F(dt/w),Br=function(Qr,ga){return[Qr*Ct,v(ga)/Ct]},Br.invert=function(Qr,ga){return[Qr/Ct,L(ga*Ct)]}),Br}function ms(){var He=1,Je=0,ut=45*h,dt=2,Ct=x.geoProjectionMutator($s),wt=Ct(He,Je,ut,dt);return wt.a=function(Dt){return arguments.length?Ct(He=+Dt,Je,ut,dt):He},wt.b=function(Dt){return arguments.length?Ct(He,Je=+Dt,ut,dt):Je},wt.psiMax=function(Dt){return arguments.length?Ct(He,Je,ut=+Dt*h,dt):ut*m},wt.ratio=function(Dt){return arguments.length?Ct(He,Je,ut,dt=+Dt):dt},wt.scale(180.739)}function Is(He,Je,ut,dt,Ct,wt,Dt,ur,mr,Er,Br){if(Br.nanEncountered)return NaN;var Qr,ga,Sa,Oa,di,Wi,Gi,on,Tn,Wn;if(Qr=ut-Je,ga=He(Je+Qr*.25),Sa=He(ut-Qr*.25),isNaN(ga)){Br.nanEncountered=!0;return}if(isNaN(Sa)){Br.nanEncountered=!0;return}return Oa=Qr*(dt+4*ga+Ct)/12,di=Qr*(Ct+4*Sa+wt)/12,Wi=Oa+di,Wn=(Wi-Dt)/15,Er>mr?(Br.maxDepthCount++,Wi+Wn):Math.abs(Wn)<ur?Wi+Wn:(Gi=Je+Qr*.5,on=Is(He,Je,Gi,dt,ga,Ct,Oa,ur*.5,mr,Er+1,Br),isNaN(on)?(Br.nanEncountered=!0,NaN):(Tn=Is(He,Gi,ut,Ct,Sa,wt,di,ur*.5,mr,Er+1,Br),isNaN(Tn)?(Br.nanEncountered=!0,NaN):on+Tn))}function rl(He,Je,ut,dt,Ct){var wt={maxDepthCount:0,nanEncountered:!1};dt===void 0&&(dt=1e-8),Ct===void 0&&(Ct=20);var Dt=He(Je),ur=He(.5*(Je+ut)),mr=He(ut),Er=(Dt+4*ur+mr)*(ut-Je)/6,Br=Is(He,Je,ut,Dt,ur,mr,Er,dt,Ct,1,wt);return Br}function Sn(He,Je,ut){function dt(Sa){return He+(1-He)*c(1-c(Sa,Je),1/Je)}function Ct(Sa){return rl(dt,0,Sa,1e-4)}for(var wt=1/Ct(1),Dt=1e3,ur=(1+1e-8)*wt,mr=[],Er=0;Er<=Dt;Er++)mr.push(Ct(Er/Dt)*ur);function Br(Sa){var Oa=0,di=Dt,Wi=Dt>>1;do mr[Wi]>Sa?di=Wi:Oa=Wi,Wi=Oa+di>>1;while(Wi>Oa);var Gi=mr[Wi+1]-mr[Wi];return Gi&&(Gi=(Sa-mr[Wi+1])/Gi),(Wi+1+Gi)/Dt}var Qr=2*Br(1)/w*wt/ut,ga=function(Sa,Oa){var di=Br(M(v(Oa))),Wi=dt(di)*Sa;return di/=Qr,[Wi,Oa>=0?di:-di]};return ga.invert=function(Sa,Oa){var di;return Oa*=Qr,M(Oa)<1&&(di=g(Oa)*L(Ct(M(Oa))*wt)),[Sa/dt(M(Oa)),di]},ga}function po(){var He=0,Je=2.5,ut=1.183136,dt=x.geoProjectionMutator(Sn),Ct=dt(He,Je,ut);return Ct.alpha=function(wt){return arguments.length?dt(He=+wt,Je,ut):He},Ct.k=function(wt){return arguments.length?dt(He,Je=+wt,ut):Je},Ct.gamma=function(wt){return arguments.length?dt(He,Je,ut=+wt):ut},Ct.scale(152.63)}function ro(He,Je){return M(He[0]-Je[0])<l&&M(He[1]-Je[1])<l}function As(He,Je){for(var ut=-1,dt=He.length,Ct=He[0],wt,Dt,ur,mr=[];++ut<dt;){wt=He[ut],Dt=(wt[0]-Ct[0])/Je,ur=(wt[1]-Ct[1])/Je;for(var Er=0;Er<Je;++Er)mr.push([Ct[0]+Er*Dt,Ct[1]+Er*ur]);Ct=wt}return mr.push(wt),mr}function al(He){var Je=[],ut,dt,Ct,wt,Dt,ur,mr,Er=He[0].length;for(mr=0;mr<Er;++mr)ut=He[0][mr],dt=ut[0][0],Ct=ut[0][1],wt=ut[1][1],Dt=ut[2][0],ur=ut[2][1],Je.push(As([[dt+l,Ct+l],[dt+l,wt-l],[Dt-l,wt-l],[Dt-l,ur+l]],30));for(mr=He[1].length-1;mr>=0;--mr)ut=He[1][mr],dt=ut[0][0],Ct=ut[0][1],wt=ut[1][1],Dt=ut[2][0],ur=ut[2][1],Je.push(As([[Dt-l,ur-l],[Dt-l,wt+l],[dt+l,wt+l],[dt+l,Ct-l]],30));return{type:"Polygon",coordinates:[A.merge(Je)]}}function $n(He,Je,ut){var dt,Ct;function wt(mr,Er){for(var Br=Er<0?-1:1,Qr=Je[+(Er<0)],ga=0,Sa=Qr.length-1;ga<Sa&&mr>Qr[ga][2][0];++ga);var Oa=He(mr-Qr[ga][1][0],Er);return Oa[0]+=He(Qr[ga][1][0],Br*Er>Br*Qr[ga][0][1]?Qr[ga][0][1]:Er)[0],Oa}ut?wt.invert=ut(wt):He.invert&&(wt.invert=function(mr,Er){for(var Br=Ct[+(Er<0)],Qr=Je[+(Er<0)],ga=0,Sa=Br.length;ga<Sa;++ga){var Oa=Br[ga];if(Oa[0][0]<=mr&&mr<Oa[1][0]&&Oa[0][1]<=Er&&Er<Oa[1][1]){var di=He.invert(mr-He(Qr[ga][1][0],0)[0],Er);return di[0]+=Qr[ga][1][0],ro(wt(di[0],di[1]),[mr,Er])?di:null}}});var Dt=x.geoProjection(wt),ur=Dt.stream;return Dt.stream=function(mr){var Er=Dt.rotate(),Br=ur(mr),Qr=(Dt.rotate([0,0]),ur(mr));return Dt.rotate(Er),Br.sphere=function(){x.geoStream(dt,Qr)},Br},Dt.lobes=function(mr){return arguments.length?(dt=al(mr),Je=mr.map(function(Er){return Er.map(function(Br){return[[Br[0][0]*h,Br[0][1]*h],[Br[1][0]*h,Br[1][1]*h],[Br[2][0]*h,Br[2][1]*h]]})}),Ct=Je.map(function(Er){return Er.map(function(Br){var Qr=He(Br[0][0],Br[0][1])[0],ga=He(Br[2][0],Br[2][1])[0],Sa=He(Br[1][0],Br[0][1])[1],Oa=He(Br[1][0],Br[1][1])[1],di;return Sa>Oa&&(di=Sa,Sa=Oa,Oa=di),[[Qr,Sa],[ga,Oa]]})}),Dt):Je.map(function(Er){return Er.map(function(Br){return[[Br[0][0]*m,Br[0][1]*m],[Br[1][0]*m,Br[1][1]*m],[Br[2][0]*m,Br[2][1]*m]]})})},Je!=null&&Dt.lobes(Je),Dt}var zs=[[[[-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 au(){return $n(Fe,zs).scale(160.857)}var fl=[[[[-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 xu(){return $n(Bs,fl).scale(152.63)}var zl=[[[[-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 Ns(){return $n(lt,zl).scale(169.529)}var iu=[[[[-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 Eu(){return $n(lt,iu).scale(169.529).rotate([20,0])}var Bc=[[[[-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 Cu(){return $n(Cn,Bc,Re).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Af=[[[[-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 pf(){return $n(Qe,Af).scale(152.63).rotate([-20,0])}function Us(He,Je){return[3/u*He*F(w*w/3-Je*Je),Je]}Us.invert=function(He,Je){return[u/3*He/F(w*w/3-Je*Je),Je]};function Vc(){return x.geoProjection(Us).scale(158.837)}function Sf(He){function Je(ut,dt){if(M(M(dt)-S)<l)return[0,dt<0?-2:2];var Ct=v(dt),wt=c((1+Ct)/(1-Ct),He/2),Dt=.5*(wt+1/wt)+r(ut*=He);return[2*v(ut)/Dt,(wt-1/wt)/Dt]}return Je.invert=function(ut,dt){var Ct=M(dt);if(M(Ct-2)<l)return ut?null:[0,g(dt)*S];if(Ct>2)return null;ut/=2,dt/=2;var wt=ut*ut,Dt=dt*dt,ur=2*dt/(1+wt+Dt);return ur=c((1+ur)/(1-ur),1/He),[t(2*ut,1-wt-Dt)/He,L((ur-1)/(ur+1))]},Je}function nu(){var He=.5,Je=x.geoProjectionMutator(Sf),ut=Je(He);return ut.spacing=function(dt){return arguments.length?Je(He=+dt):He},ut.scale(124.75)}var Ll=w/b;function ic(He,Je){return[He*(1+F(r(Je)))/2,Je/(r(Je/2)*r(He/6))]}ic.invert=function(He,Je){var ut=M(He),dt=M(Je),Ct=l,wt=S;dt<Ll?wt*=dt/Ll:Ct+=6*z(Ll/dt);for(var Dt=0;Dt<25;Dt++){var ur=v(wt),mr=F(r(wt)),Er=v(wt/2),Br=r(wt/2),Qr=v(Ct/6),ga=r(Ct/6),Sa=.5*Ct*(1+mr)-ut,Oa=wt/(Br*ga)-dt,di=mr?-.25*Ct*ur/mr:0,Wi=.5*(1+mr),Gi=(1+.5*wt*Er/Br)/(Br*ga),on=wt/Br*(Qr/6)/(ga*ga),Tn=di*on-Gi*Wi,Wn=(Sa*on-Oa*Wi)/Tn,Bn=(Oa*di-Sa*Gi)/Tn;if(wt-=Wn,Ct-=Bn,M(Wn)<l&&M(Bn)<l)break}return[He<0?-Ct:Ct,Je<0?-wt:wt]};function Ou(){return x.geoProjection(ic).scale(97.2672)}function il(He,Je){var ut=He*He,dt=Je*Je;return[He*(.975534+dt*(-.119161+ut*-.0143059+dt*-.0547009)),Je*(1.00384+ut*(.0802894+dt*-.02855+ut*199025e-9)+dt*(.0998909+dt*-.0491032))]}il.invert=function(He,Je){var ut=g(He)*w,dt=Je/2,Ct=50;do{var wt=ut*ut,Dt=dt*dt,ur=ut*dt,mr=ut*(.975534+Dt*(-.119161+wt*-.0143059+Dt*-.0547009))-He,Er=dt*(1.00384+wt*(.0802894+Dt*-.02855+wt*199025e-9)+Dt*(.0998909+Dt*-.0491032))-Je,Br=.975534-Dt*(.119161+3*wt*.0143059+Dt*.0547009),Qr=-ur*(2*.119161+4*.0547009*Dt+2*.0143059*wt),ga=ur*(2*.0802894+4*199025e-9*wt+2*-.02855*Dt),Sa=1.00384+wt*(.0802894+199025e-9*wt)+Dt*(3*(.0998909-.02855*wt)-5*.0491032*Dt),Oa=Qr*ga-Sa*Br,di=(Er*Qr-mr*Sa)/Oa,Wi=(mr*ga-Er*Br)/Oa;ut-=di,dt-=Wi}while((M(di)>l||M(Wi)>l)&&--Ct>0);return Ct&&[ut,dt]};function vl(){return x.geoProjection(il).scale(139.98)}function gs(He,Je){return[v(He)/r(Je),T(Je)*r(He)]}gs.invert=function(He,Je){var ut=He*He,dt=Je*Je,Ct=dt+1,wt=ut+Ct,Dt=He?y*F((wt-F(wt*wt-4*ut))/ut):1/F(Ct);return[L(He*Dt),g(Je)*z(Dt)]};function Vs(){return x.geoProjection(gs).scale(144.049).clipAngle(90-.001)}function nc(He){var Je=r(He),ut=T(E+He/2);function dt(Ct,wt){var Dt=wt-He,ur=M(Dt)<l?Ct*Je:M(ur=E+wt/2)<l||M(M(ur)-S)<l?0:Ct*Dt/i(T(ur)/ut);return[ur,Dt]}return dt.invert=function(Ct,wt){var Dt,ur=wt+He;return[M(wt)<l?Ct/Je:M(Dt=E+ur/2)<l||M(M(Dt)-S)<l?0:Ct*i(T(Dt)/ut)/wt,ur]},dt}function Nl(){return st(nc).parallel(40).scale(158.837)}function qu(He,Je){return[He,1.25*i(T(E+.4*Je))]}qu.invert=function(He,Je){return[He,2.5*e(o(.8*Je))-.625*w]};function cl(){return x.geoProjection(qu).scale(108.318)}function yh(He){var Je=He.length-1;function ut(dt,Ct){for(var wt=r(Ct),Dt=2/(1+wt*r(dt)),ur=Dt*wt*v(dt),mr=Dt*v(Ct),Er=Je,Br=He[Er],Qr=Br[0],ga=Br[1],Sa;--Er>=0;)Br=He[Er],Qr=Br[0]+ur*(Sa=Qr)-mr*ga,ga=Br[1]+ur*ga+mr*Sa;return Qr=ur*(Sa=Qr)-mr*ga,ga=ur*ga+mr*Sa,[Qr,ga]}return ut.invert=function(dt,Ct){var wt=20,Dt=dt,ur=Ct;do{for(var mr=Je,Er=He[mr],Br=Er[0],Qr=Er[1],ga=0,Sa=0,Oa;--mr>=0;)Er=He[mr],ga=Br+Dt*(Oa=ga)-ur*Sa,Sa=Qr+Dt*Sa+ur*Oa,Br=Er[0]+Dt*(Oa=Br)-ur*Qr,Qr=Er[1]+Dt*Qr+ur*Oa;ga=Br+Dt*(Oa=ga)-ur*Sa,Sa=Qr+Dt*Sa+ur*Oa,Br=Dt*(Oa=Br)-ur*Qr-dt,Qr=Dt*Qr+ur*Oa-Ct;var di=ga*ga+Sa*Sa,Wi,Gi;Dt-=Wi=(Br*ga+Qr*Sa)/di,ur-=Gi=(Qr*ga-Br*Sa)/di}while(M(Wi)+M(Gi)>l*l&&--wt>0);if(wt){var on=F(Dt*Dt+ur*ur),Tn=2*e(on*.5),Wn=v(Tn);return[t(Dt*Wn,on*r(Tn)),on?L(ur*Wn/on):0]}},ut}var ls=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],_h=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ss=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Qn=[[.9245,0],[0,0],[.01943,0]],Gc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vu(){return Kl(ls,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ul(){return Kl(_h,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mf(){return Kl(Ss,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function wc(){return Kl(Qn,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function rf(){return Kl(Gc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Kl(He,Je){var ut=x.geoProjection(yh(He)).rotate(Je).clipAngle(90),dt=x.geoRotation(Je),Ct=ut.center;return delete ut.rotate,ut.center=function(wt){return arguments.length?Ct(dt(wt)):dt.invert(Ct())},ut}var Yf=F(6),zf=F(7);function af(He,Je){var ut=L(7*v(Je)/(3*Yf));return[Yf*He*(2*r(2*ut/3)-1)/zf,9*v(ut/3)/zf]}af.invert=function(He,Je){var ut=3*L(Je*zf/9);return[He*zf/(Yf*(2*r(2*ut/3)-1)),L(v(ut)*3*Yf/7)]};function Nc(){return x.geoProjection(af).scale(164.859)}function Ff(He,Je){for(var ut=(1+y)*v(Je),dt=Je,Ct=0,wt;Ct<25&&(dt-=wt=(v(dt/2)+v(dt)-ut)/(.5*r(dt/2)+r(dt)),!(M(wt)<l));Ct++);return[He*(1+2*r(dt)/r(dt/2))/(3*b),2*F(3)*v(dt/2)/F(2+b)]}Ff.invert=function(He,Je){var ut=Je*F(2+b)/(2*F(3)),dt=2*L(ut);return[3*b*He/(1+2*r(dt)/r(dt/2)),L((ut+v(dt))/(1+y))]};function Of(){return x.geoProjection(Ff).scale(188.209)}function Gu(He,Je){for(var ut=F(6/(4+w)),dt=(1+w/4)*v(Je),Ct=Je/2,wt=0,Dt;wt<25&&(Ct-=Dt=(Ct/2+v(Ct)-dt)/(.5+r(Ct)),!(M(Dt)<l));wt++);return[ut*(.5+r(Ct))*He/1.5,ut*Ct]}Gu.invert=function(He,Je){var ut=F(6/(4+w)),dt=Je/ut;return M(M(dt)-S)<l&&(dt=dt<0?-S:S),[1.5*He/(ut*(.5+r(dt))),L((dt/2+v(dt))/(1+w/4))]};function Ef(){return x.geoProjection(Gu).scale(166.518)}function oc(He,Je){var ut=Je*Je,dt=ut*ut,Ct=ut*dt;return[He*(.84719-.13063*ut+Ct*Ct*(-.04515+.05494*ut-.02326*dt+.00331*Ct)),Je*(1.01183+dt*dt*(-.02625+.01926*ut-.00396*dt))]}oc.invert=function(He,Je){var ut=Je,dt=25,Ct,wt,Dt,ur;do wt=ut*ut,Dt=wt*wt,ut-=Ct=(ut*(1.01183+Dt*Dt*(-.02625+.01926*wt-.00396*Dt))-Je)/(1.01183+Dt*Dt*(9*-.02625+11*.01926*wt+13*-.00396*Dt));while(M(Ct)>_&&--dt>0);return wt=ut*ut,Dt=wt*wt,ur=wt*Dt,[He/(.84719-.13063*wt+ur*ur*(-.04515+.05494*wt-.02326*Dt+.00331*ur)),ut]};function Hc(){return x.geoProjection(oc).scale(175.295)}function Jl(He,Je){return[He*(1+r(Je))/2,2*(Je-T(Je/2))]}Jl.invert=function(He,Je){for(var ut=Je/2,dt=0,Ct=1/0;dt<10&&M(Ct)>l;++dt){var wt=r(Je/2);Je-=Ct=(Je-T(Je/2)-ut)/(1-.5/(wt*wt))}return[2*He/(1+r(Je)),Je]};function Uc(){return x.geoProjection(Jl).scale(152.63)}var Tc=[[[[-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 $n(ce(1/0),Tc).rotate([20,0]).scale(152.63)}function Cf(He,Je){var ut=v(Je),dt=r(Je),Ct=g(He);if(He===0||M(Je)===S)return[0,Je];if(Je===0)return[He,0];if(M(He)===S)return[He*dt,S*ut];var wt=w/(2*He)-2*He/w,Dt=2*Je/w,ur=(1-Dt*Dt)/(ut-Dt),mr=wt*wt,Er=ur*ur,Br=1+mr/Er,Qr=1+Er/mr,ga=(wt*ut/ur-wt/2)/Br,Sa=(Er*ut/mr+ur/2)/Qr,Oa=ga*ga+dt*dt/Br,di=Sa*Sa-(Er*ut*ut/mr+ur*ut-1)/Qr;return[S*(ga+F(Oa)*Ct),S*(Sa+F(di<0?0:di)*g(-Je*wt)*Ct)]}Cf.invert=function(He,Je){He/=S,Je/=S;var ut=He*He,dt=Je*Je,Ct=ut+dt,wt=w*w;return[He?(Ct-1+F((1-Ct)*(1-Ct)+4*ut))/(2*He)*S:0,ze(function(Dt){return Ct*(w*v(Dt)-2*Dt)*w+4*Dt*Dt*(Je-v(Dt))+2*w*Dt-wt*Je},0)]};function lh(){return x.geoProjection(Cf).scale(127.267)}var Bf=1.0148,Wc=.23185,Kf=-.14499,ku=.02406,Nf=Bf,ml=5*Wc,Lu=7*Kf,Ac=9*ku,nl=1.790857183;function dc(He,Je){var ut=Je*Je;return[He,Je*(Bf+ut*ut*(Wc+ut*(Kf+ku*ut)))]}dc.invert=function(He,Je){Je>nl?Je=nl:Je<-nl&&(Je=-nl);var ut=Je,dt;do{var Ct=ut*ut;ut-=dt=(ut*(Bf+Ct*Ct*(Wc+Ct*(Kf+ku*Ct)))-Je)/(Nf+Ct*Ct*(ml+Ct*(Lu+Ac*Ct)))}while(M(dt)>l);return[He,ut]};function vu(){return x.geoProjection(dc).scale(139.319)}function bu(He,Je){if(M(Je)<l)return[He,0];var ut=T(Je),dt=He*v(Je);return[v(dt)/ut,Je+(1-r(dt))/ut]}bu.invert=function(He,Je){if(M(Je)<l)return[He,0];var ut=He*He+Je*Je,dt=Je*.5,Ct=10,wt;do{var Dt=T(dt),ur=1/r(dt),mr=ut-2*Je*dt+dt*dt;dt-=wt=(Dt*mr+2*(dt-Je))/(2+mr*ur*ur+2*(dt-Je)*Dt)}while(M(wt)>l&&--Ct>0);return Dt=T(dt),[(M(Je)<M(dt+1/Dt)?L(He*Dt):g(Je)*g(He)*(z(M(He*Dt))+S))/v(dt),dt]};function Ml(){return x.geoProjection(bu).scale(103.74)}function Uf(He,Je){var ut=Sc(He[1],He[0]),dt=Sc(Je[1],Je[0]),Ct=Lh(ut,dt),wt=vc(ut)/vc(dt);return Bu([1,0,He[0][0],0,1,He[0][1]],Bu([wt,0,0,0,wt,0],Bu([r(Ct),v(Ct),0,-v(Ct),r(Ct),0],[1,0,-Je[0][0],0,1,-Je[0][1]])))}function Jf(He){var Je=1/(He[0]*He[4]-He[1]*He[3]);return[Je*He[4],-Je*He[1],Je*(He[1]*He[5]-He[2]*He[4]),-Je*He[3],Je*He[0],Je*(He[2]*He[3]-He[0]*He[5])]}function Bu(He,Je){return[He[0]*Je[0]+He[1]*Je[3],He[0]*Je[1]+He[1]*Je[4],He[0]*Je[2]+He[1]*Je[5]+He[2],He[3]*Je[0]+He[4]*Je[3],He[3]*Je[1]+He[4]*Je[4],He[3]*Je[2]+He[4]*Je[5]+He[5]]}function Sc(He,Je){return[He[0]-Je[0],He[1]-Je[1]]}function vc(He){return F(He[0]*He[0]+He[1]*He[1])}function Lh(He,Je){return t(He[0]*Je[1]-He[1]*Je[0],He[0]*Je[0]+He[1]*Je[1])}function nf(He,Je,ut){dt(He,{transform:null});function dt(Er,Br){if(Er.edges=tu(Er.face),Br.face){var Qr=Er.shared=of(Er.face,Br.face),ga=Uf(Qr.map(Br.project),Qr.map(Er.project));Er.transform=Br.transform?Bu(Br.transform,ga):ga;for(var Sa=Br.edges,Oa=0,di=Sa.length;Oa<di;++Oa)Nu(Qr[0],Sa[Oa][1])&&Nu(Qr[1],Sa[Oa][0])&&(Sa[Oa]=Er),Nu(Qr[0],Sa[Oa][0])&&Nu(Qr[1],Sa[Oa][1])&&(Sa[Oa]=Er);for(Sa=Er.edges,Oa=0,di=Sa.length;Oa<di;++Oa)Nu(Qr[0],Sa[Oa][0])&&Nu(Qr[1],Sa[Oa][1])&&(Sa[Oa]=Br),Nu(Qr[0],Sa[Oa][1])&&Nu(Qr[1],Sa[Oa][0])&&(Sa[Oa]=Br)}else Er.transform=Br.transform;return Er.children&&Er.children.forEach(function(Wi){dt(Wi,Er)}),Er}function Ct(Er,Br){var Qr=Je(Er,Br),ga=Qr.project([Er*m,Br*m]),Sa;return(Sa=Qr.transform)?[Sa[0]*ga[0]+Sa[1]*ga[1]+Sa[2],-(Sa[3]*ga[0]+Sa[4]*ga[1]+Sa[5])]:(ga[1]=-ga[1],ga)}Xc(He)&&(Ct.invert=function(Er,Br){var Qr=wt(He,[Er,-Br]);return Qr&&(Qr[0]*=h,Qr[1]*=h,Qr)});function wt(Er,Br){var Qr=Er.project.invert,ga=Er.transform,Sa=Br;if(ga&&(ga=Jf(ga),Sa=[ga[0]*Sa[0]+ga[1]*Sa[1]+ga[2],ga[3]*Sa[0]+ga[4]*Sa[1]+ga[5]]),Qr&&Er===Dt(Oa=Qr(Sa)))return Oa;for(var Oa,di=Er.children,Wi=0,Gi=di&&di.length;Wi<Gi;++Wi)if(Oa=wt(di[Wi],Br))return Oa}function Dt(Er){return Je(Er[0]*h,Er[1]*h)}var ur=x.geoProjection(Ct),mr=ur.stream;return ur.stream=function(Er){var Br=ur.rotate(),Qr=mr(Er),ga=(ur.rotate([0,0]),mr(Er));return ur.rotate(Br),Qr.sphere=function(){ga.polygonStart(),ga.lineStart(),df(ga,He),ga.lineEnd(),ga.polygonEnd()},Qr},ur.angle(ut==null?-30:ut*m)}function df(He,Je,ut){var dt,Ct=Je.edges,wt=Ct.length,Dt,ur={type:"MultiPoint",coordinates:Je.face},mr=Je.face.filter(function(di){return M(di[1])!==90}),Er=x.geoBounds({type:"MultiPoint",coordinates:mr}),Br=!1,Qr=-1,ga=Er[1][0]-Er[0][0],Sa=ga===180||ga===360?[(Er[0][0]+Er[1][0])/2,(Er[0][1]+Er[1][1])/2]:x.geoCentroid(ur);if(ut)for(;++Qr<wt&&Ct[Qr]!==ut;);++Qr;for(var Oa=0;Oa<wt;++Oa)Dt=Ct[(Oa+Qr)%wt],Array.isArray(Dt)?(Br||(He.point((dt=x.geoInterpolate(Dt[0],Sa)(l))[0],dt[1]),Br=!0),He.point((dt=x.geoInterpolate(Dt[1],Sa)(l))[0],dt[1])):(Br=!1,Dt!==ut&&df(He,Dt,Je))}function Nu(He,Je){return He&&Je&&He[0]===Je[0]&&He[1]===Je[1]}function of(He,Je){for(var ut,dt,Ct=He.length,wt=null,Dt=0;Dt<Ct;++Dt){ut=He[Dt];for(var ur=Je.length;--ur>=0;)if(dt=Je[ur],ut[0]===dt[0]&&ut[1]===dt[1]){if(wt)return[wt,ut];wt=ut}}}function tu(He){for(var Je=He.length,ut=[],dt=He[Je-1],Ct=0;Ct<Je;++Ct)ut.push([dt,dt=He[Ct]]);return ut}function Xc(He){return He.project.invert||He.children&&He.children.some(Xc)}var uh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],vf=[[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(He){return He.map(function(Je){return uh[Je]})});function ol(He){He=He||function(ut){var dt=x.geoCentroid({type:"MultiPoint",coordinates:ut});return x.geoGnomonic().scale(1).translate([0,0]).rotate([-dt[0],-dt[1]])};var Je=vf.map(function(ut){return{face:ut,project:He(ut)}});return[-1,0,0,1,0,1,4,5].forEach(function(ut,dt){var Ct=Je[ut];Ct&&(Ct.children||(Ct.children=[])).push(Je[dt])}),nf(Je[0],function(ut,dt){return Je[ut<-w/2?dt<0?6:4:ut<0?dt<0?2:0:ut<w/2?dt<0?3:1:dt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var mu=2/F(3);function Pu(He,Je){var ut=qe(He,Je);return[ut[0]*mu,ut[1]]}Pu.invert=function(He,Je){return qe.invert(He/mu,Je)};function kf(He){He=He||function(ut){var dt=x.geoCentroid({type:"MultiPoint",coordinates:ut});return x.geoProjection(Pu).translate([0,0]).scale(1).rotate(dt[1]>0?[-dt[0],0]:[180-dt[0],180])};var Je=vf.map(function(ut){return{face:ut,project:He(ut)}});return[-1,0,0,1,0,1,4,5].forEach(function(ut,dt){var Ct=Je[ut];Ct&&(Ct.children||(Ct.children=[])).push(Je[dt])}),nf(Je[0],function(ut,dt){return Je[ut<-w/2?dt<0?6:4:ut<0?dt<0?2:0:ut<w/2?dt<0?3:1:dt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function hl(He){He=He||function(Dt){var ur=Dt.length===6?x.geoCentroid({type:"MultiPoint",coordinates:Dt}):Dt[0];return x.geoGnomonic().scale(1).translate([0,0]).rotate([-ur[0],-ur[1]])};var Je=vf.map(function(Dt){for(var ur=Dt.map(mf),mr=ur.length,Er=ur[mr-1],Br,Qr=[],ga=0;ga<mr;++ga)Br=ur[ga],Qr.push(Hu([Er[0]*.9486832980505138+Br[0]*.31622776601683794,Er[1]*.9486832980505138+Br[1]*.31622776601683794,Er[2]*.9486832980505138+Br[2]*.31622776601683794]),Hu([Br[0]*.9486832980505138+Er[0]*.31622776601683794,Br[1]*.9486832980505138+Er[1]*.31622776601683794,Br[2]*.9486832980505138+Er[2]*.31622776601683794])),Er=Br;return Qr}),ut=[],dt=[-1,0,0,1,0,1,4,5];Je.forEach(function(Dt,ur){for(var mr=vf[ur],Er=mr.length,Br=ut[ur]=[],Qr=0;Qr<Er;++Qr)Je.push([mr[Qr],Dt[(Qr*2+2)%(2*Er)],Dt[(Qr*2+1)%(2*Er)]]),dt.push(ur),Br.push(Mc(mf(Dt[(Qr*2+2)%(2*Er)]),mf(Dt[(Qr*2+1)%(2*Er)])))});var Ct=Je.map(function(Dt){return{project:He(Dt),face:Dt}});dt.forEach(function(Dt,ur){var mr=Ct[Dt];mr&&(mr.children||(mr.children=[])).push(Ct[ur])});function wt(Dt,ur){var mr=r(ur),Er=[mr*r(Dt),mr*v(Dt),v(ur)],Br=Dt<-w/2?ur<0?6:4:Dt<0?ur<0?2:0:Dt<w/2?ur<0?3:1:ur<0?7:5,Qr=ut[Br];return Ct[sf(Qr[0],Er)<0?8+3*Br:sf(Qr[1],Er)<0?8+3*Br+1:sf(Qr[2],Er)<0?8+3*Br+2:Br]}return nf(Ct[0],wt).angle(-30).scale(110.625).center([0,45])}function sf(He,Je){for(var ut=0,dt=He.length,Ct=0;ut<dt;++ut)Ct+=He[ut]*Je[ut];return Ct}function Mc(He,Je){return[He[1]*Je[2]-He[2]*Je[1],He[2]*Je[0]-He[0]*Je[2],He[0]*Je[1]-He[1]*Je[0]]}function Hu(He){return[t(He[1],He[0])*m,L(n(-1,s(1,He[2])))*m]}function mf(He){var Je=He[0]*h,ut=He[1]*h,dt=r(ut);return[dt*r(Je),dt*v(Je),v(ut)]}function Wu(){}function Zc(He){if((ut=He.length)<4)return!1;for(var Je=0,ut,dt=He[ut-1][1]*He[0][0]-He[ut-1][0]*He[0][1];++Je<ut;)dt+=He[Je-1][1]*He[Je][0]-He[Je-1][0]*He[Je][1];return dt<=0}function Lf(He,Je){for(var ut=Je[0],dt=Je[1],Ct=!1,wt=0,Dt=He.length,ur=Dt-1;wt<Dt;ur=wt++){var mr=He[wt],Er=mr[0],Br=mr[1],Qr=He[ur],ga=Qr[0],Sa=Qr[1];Br>dt^Sa>dt&&ut<(ga-Er)*(dt-Br)/(Sa-Br)+Er&&(Ct=!Ct)}return Ct}function ru(He,Je){var ut=Je.stream,dt;if(!ut)throw new Error("invalid projection");switch(He&&He.type){case"Feature":dt=Xu;break;case"FeatureCollection":dt=jf;break;default:dt=mc;break}return dt(He,ut)}function jf(He,Je){return{type:"FeatureCollection",features:He.features.map(function(ut){return Xu(ut,Je)})}}function Xu(He,Je){return{type:"Feature",id:He.id,properties:He.properties,geometry:mc(He.geometry,Je)}}function Ec(He,Je){return{type:"GeometryCollection",geometries:He.geometries.map(function(ut){return mc(ut,Je)})}}function mc(He,Je){if(!He)return null;if(He.type==="GeometryCollection")return Ec(He,Je);var ut;switch(He.type){case"Point":ut=Cc;break;case"MultiPoint":ut=Cc;break;case"LineString":ut=Yc;break;case"MultiLineString":ut=Yc;break;case"Polygon":ut=sc;break;case"MultiPolygon":ut=sc;break;case"Sphere":ut=sc;break;default:return null}return x.geoStream(He,Je(ut)),ut.result()}var jl=[],gu=[],Cc={point:function(He,Je){jl.push([He,Je])},result:function(){var He=jl.length?jl.length<2?{type:"Point",coordinates:jl[0]}:{type:"MultiPoint",coordinates:jl}:null;return jl=[],He}},Yc={lineStart:Wu,point:function(He,Je){jl.push([He,Je])},lineEnd:function(){jl.length&&(gu.push(jl),jl=[])},result:function(){var He=gu.length?gu.length<2?{type:"LineString",coordinates:gu[0]}:{type:"MultiLineString",coordinates:gu}:null;return gu=[],He}},sc={polygonStart:Wu,lineStart:Wu,point:function(He,Je){jl.push([He,Je])},lineEnd:function(){var He=jl.length;if(He){do jl.push(jl[0].slice());while(++He<4);gu.push(jl),jl=[]}},polygonEnd:Wu,result:function(){if(!gu.length)return null;var He=[],Je=[];return gu.forEach(function(ut){Zc(ut)?He.push([ut]):Je.push(ut)}),Je.forEach(function(ut){var dt=ut[0];He.some(function(Ct){if(Lf(Ct[0],dt))return Ct.push(ut),!0})||He.push([ut])}),gu=[],He.length?He.length>1?{type:"MultiPolygon",coordinates:He}:{type:"Polygon",coordinates:He[0]}:null}};function kc(He){var Je=He(S,0)[0]-He(-S,0)[0];function ut(dt,Ct){var wt=M(dt)<S,Dt=He(wt?dt:dt>0?dt-w:dt+w,Ct),ur=(Dt[0]-Dt[1])*y,mr=(Dt[0]+Dt[1])*y;if(wt)return[ur,mr];var Er=Je*y,Br=ur>0^mr>0?-1:1;return[Br*ur-g(mr)*Er,Br*mr-g(ur)*Er]}return He.invert&&(ut.invert=function(dt,Ct){var wt=(dt+Ct)*y,Dt=(Ct-dt)*y,ur=M(wt)<.5*Je&&M(Dt)<.5*Je;if(!ur){var mr=Je*y,Er=wt>0^Dt>0?-1:1,Br=-Er*dt+(Dt>0?1:-1)*mr,Qr=-Er*Ct+(wt>0?1:-1)*mr;wt=(-Br-Qr)*y,Dt=(Br-Qr)*y}var ga=He.invert(wt,Dt);return ur||(ga[0]+=wt>0?w:-w),ga}),x.geoProjection(ut).rotate([-90,-90,45]).clipAngle(180-.001)}function er(){return kc(ha).scale(176.423)}function yr(){return kc(Xn).scale(111.48)}function na(He,Je){if(!(0<=(Je=+Je)&&Je<=20))throw new Error("invalid digits");function ut(Er){var Br=Er.length,Qr=2,ga=new Array(Br);for(ga[0]=+Er[0].toFixed(Je),ga[1]=+Er[1].toFixed(Je);Qr<Br;)ga[Qr]=Er[Qr],++Qr;return ga}function dt(Er){return Er.map(ut)}function Ct(Er){for(var Br=ut(Er[0]),Qr=[Br],ga=1;ga<Er.length;ga++){var Sa=ut(Er[ga]);(Sa.length>2||Sa[0]!=Br[0]||Sa[1]!=Br[1])&&(Qr.push(Sa),Br=Sa)}return Qr.length===1&&Er.length>1&&Qr.push(ut(Er[Er.length-1])),Qr}function wt(Er){return Er.map(Ct)}function Dt(Er){if(Er==null)return Er;var Br;switch(Er.type){case"GeometryCollection":Br={type:"GeometryCollection",geometries:Er.geometries.map(Dt)};break;case"Point":Br={type:"Point",coordinates:ut(Er.coordinates)};break;case"MultiPoint":Br={type:Er.type,coordinates:dt(Er.coordinates)};break;case"LineString":Br={type:Er.type,coordinates:Ct(Er.coordinates)};break;case"MultiLineString":case"Polygon":Br={type:Er.type,coordinates:wt(Er.coordinates)};break;case"MultiPolygon":Br={type:"MultiPolygon",coordinates:Er.coordinates.map(wt)};break;default:return Er}return Er.bbox!=null&&(Br.bbox=Er.bbox),Br}function ur(Er){var Br={type:"Feature",properties:Er.properties,geometry:Dt(Er.geometry)};return Er.id!=null&&(Br.id=Er.id),Er.bbox!=null&&(Br.bbox=Er.bbox),Br}if(He!=null)switch(He.type){case"Feature":return ur(He);case"FeatureCollection":{var mr={type:"FeatureCollection",features:He.features.map(ur)};return He.bbox!=null&&(mr.bbox=He.bbox),mr}default:return Dt(He)}return He}function $r(He){var Je=v(He);function ut(dt,Ct){var wt=Je?T(dt*Je/2)/Je:dt/2;if(!Ct)return[2*wt,-He];var Dt=2*e(wt*v(Ct)),ur=1/T(Ct);return[v(Dt)*ur,Ct+(1-r(Dt))*ur-He]}return ut.invert=function(dt,Ct){if(M(Ct+=He)<l)return[Je?2*e(Je*dt/2)/Je:dt,0];var wt=dt*dt+Ct*Ct,Dt=0,ur=10,mr;do{var Er=T(Dt),Br=1/r(Dt),Qr=wt-2*Ct*Dt+Dt*Dt;Dt-=mr=(Er*Qr+2*(Dt-Ct))/(2+Qr*Br*Br+2*(Dt-Ct)*Er)}while(M(mr)>l&&--ur>0);var ga=dt*(Er=T(Dt)),Sa=T(M(Ct)<M(Dt+1/Er)?L(ga)*.5:z(ga)*.5+w/4)/v(Dt);return[Je?2*e(Je*Sa)/Je:2*Sa,Dt]},ut}function La(){return st($r).scale(131.215)}var hi=[[.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]];hi.forEach(function(He){He[1]*=1.0144});function Pi(He,Je){var ut=s(18,M(Je)*36/w),dt=a(ut),Ct=ut-dt,wt=(Qr=hi[dt])[0],Dt=Qr[1],ur=(Qr=hi[++dt])[0],mr=Qr[1],Er=(Qr=hi[s(19,++dt)])[0],Br=Qr[1],Qr;return[He*(ur+Ct*(Er-wt)/2+Ct*Ct*(Er-2*ur+wt)/2),(Je>0?S:-S)*(mr+Ct*(Br-Dt)/2+Ct*Ct*(Br-2*mr+Dt)/2)]}Pi.invert=function(He,Je){var ut=Je/S,dt=ut*90,Ct=s(18,M(dt/5)),wt=n(0,a(Ct));do{var Dt=hi[wt][1],ur=hi[wt+1][1],mr=hi[s(19,wt+2)][1],Er=mr-Dt,Br=mr-2*ur+Dt,Qr=2*(M(ut)-ur)/Er,ga=Br/Er,Sa=Qr*(1-ga*Qr*(1-2*ga*Qr));if(Sa>=0||wt===1){dt=(Je>=0?5:-5)*(Sa+Ct);var Oa=50,di;do Ct=s(18,M(dt)/5),wt=a(Ct),Sa=Ct-wt,Dt=hi[wt][1],ur=hi[wt+1][1],mr=hi[s(19,wt+2)][1],dt-=(di=(Je>=0?S:-S)*(ur+Sa*(mr-Dt)/2+Sa*Sa*(mr-2*ur+Dt)/2)-Je)*m;while(M(di)>_&&--Oa>0);break}}while(--wt>=0);var Wi=hi[wt][0],Gi=hi[wt+1][0],on=hi[s(19,wt+2)][0];return[He/(Gi+Sa*(on-Wi)/2+Sa*Sa*(on-2*Gi+Wi)/2),dt*h]};function Zi(){return x.geoProjection(Pi).scale(152.63)}function tn(He){function Je(ut,dt){var Ct=r(dt),wt=(He-1)/(He-Ct*r(ut));return[wt*Ct*v(ut),wt*v(dt)]}return Je.invert=function(ut,dt){var Ct=ut*ut+dt*dt,wt=F(Ct),Dt=(He-F(1-Ct*(He+1)/(He-1)))/((He-1)/wt+wt/(He-1));return[t(ut*Dt,wt*F(1-Dt*Dt)),wt?L(dt*Dt/wt):0]},Je}function dn(He,Je){var ut=tn(He);if(!Je)return ut;var dt=r(Je),Ct=v(Je);function wt(Dt,ur){var mr=ut(Dt,ur),Er=mr[1],Br=Er*Ct/(He-1)+dt;return[mr[0]*dt/Br,Er/Br]}return wt.invert=function(Dt,ur){var mr=(He-1)/(He-1-ur*Ct);return ut.invert(mr*Dt,mr*ur*dt)},wt}function Ri(){var He=2,Je=0,ut=x.geoProjectionMutator(dn),dt=ut(He,Je);return dt.distance=function(Ct){return arguments.length?ut(He=+Ct,Je):He},dt.tilt=function(Ct){return arguments.length?ut(He,Je=Ct*h):Je*m},dt.scale(432.147).clipAngle(z(1/He)*m-1e-6)}var Fi=1e-4,qi=1e4,_i=-180,Mn=_i+Fi,Kn=180,ao=Kn-Fi,Jn=-90,co=Jn+Fi,wn=90,un=wn-Fi;function _o(He){return He.length>0}function Qo(He){return Math.floor(He*qi)/qi}function xs(He){return He===Jn||He===wn?[0,He]:[_i,Qo(He)]}function Qs(He){var Je=He[0],ut=He[1],dt=!1;return Je<=Mn?(Je=_i,dt=!0):Je>=ao&&(Je=Kn,dt=!0),ut<=co?(ut=Jn,dt=!0):ut>=un&&(ut=wn,dt=!0),dt?[Je,ut]:He}function Rs(He){return He.map(Qs)}function Ks(He,Je,ut){for(var dt=0,Ct=He.length;dt<Ct;++dt){var wt=He[dt].slice();ut.push({index:-1,polygon:Je,ring:wt});for(var Dt=0,ur=wt.length;Dt<ur;++Dt){var mr=wt[Dt],Er=mr[0],Br=mr[1];if(Er<=Mn||Er>=ao||Br<=co||Br>=un){wt[Dt]=Qs(mr);for(var Qr=Dt+1;Qr<ur;++Qr){var ga=wt[Qr],Sa=ga[0],Oa=ga[1];if(Sa>Mn&&Sa<ao&&Oa>co&&Oa<un)break}if(Qr===Dt+1)continue;if(Dt){var di={index:-1,polygon:Je,ring:wt.slice(0,Dt+1)};di.ring[di.ring.length-1]=xs(Br),ut[ut.length-1]=di}else ut.pop();if(Qr>=ur)break;ut.push({index:-1,polygon:Je,ring:wt=wt.slice(Qr-1)}),wt[0]=xs(wt[0][1]),Dt=-1,ur=wt.length}}}}function ys(He){var Je,ut=He.length,dt={},Ct={},wt,Dt,ur,mr,Er;for(Je=0;Je<ut;++Je){if(wt=He[Je],Dt=wt.ring[0],mr=wt.ring[wt.ring.length-1],Dt[0]===mr[0]&&Dt[1]===mr[1]){wt.polygon.push(wt.ring),He[Je]=null;continue}wt.index=Je,dt[Dt]=Ct[mr]=wt}for(Je=0;Je<ut;++Je)if(wt=He[Je],wt){if(Dt=wt.ring[0],mr=wt.ring[wt.ring.length-1],ur=Ct[Dt],Er=dt[mr],delete dt[Dt],delete Ct[mr],Dt[0]===mr[0]&&Dt[1]===mr[1]){wt.polygon.push(wt.ring);continue}ur?(delete Ct[Dt],delete dt[ur.ring[0]],ur.ring.pop(),He[ur.index]=null,wt={index:-1,polygon:ur.polygon,ring:ur.ring.concat(wt.ring)},ur===Er?wt.polygon.push(wt.ring):(wt.index=ut++,He.push(dt[wt.ring[0]]=Ct[wt.ring[wt.ring.length-1]]=wt))):Er?(delete dt[mr],delete Ct[Er.ring[Er.ring.length-1]],wt.ring.pop(),wt={index:ut++,polygon:Er.polygon,ring:wt.ring.concat(Er.ring)},He[Er.index]=null,He.push(dt[wt.ring[0]]=Ct[wt.ring[wt.ring.length-1]]=wt)):(wt.ring.push(wt.ring[0]),wt.polygon.push(wt.ring))}}function Fl(He){var Je={type:"Feature",geometry:yl(He.geometry)};return He.id!=null&&(Je.id=He.id),He.bbox!=null&&(Je.bbox=He.bbox),He.properties!=null&&(Je.properties=He.properties),Je}function yl(He){if(He==null)return He;var Je,ut,dt,Ct;switch(He.type){case"GeometryCollection":Je={type:"GeometryCollection",geometries:He.geometries.map(yl)};break;case"Point":Je={type:"Point",coordinates:Qs(He.coordinates)};break;case"MultiPoint":case"LineString":Je={type:He.type,coordinates:Rs(He.coordinates)};break;case"MultiLineString":Je={type:"MultiLineString",coordinates:He.coordinates.map(Rs)};break;case"Polygon":{var wt=[];Ks(He.coordinates,wt,ut=[]),ys(ut),Je={type:"Polygon",coordinates:wt};break}case"MultiPolygon":{ut=[],dt=-1,Ct=He.coordinates.length;for(var Dt=new Array(Ct);++dt<Ct;)Ks(He.coordinates[dt],Dt[dt]=[],ut);ys(ut),Je={type:"MultiPolygon",coordinates:Dt.filter(_o)};break}default:return He}return He.bbox!=null&&(Je.bbox=He.bbox),Je}function sl(He){if(He==null)return He;switch(He.type){case"Feature":return Fl(He);case"FeatureCollection":{var Je={type:"FeatureCollection",features:He.features.map(Fl)};return He.bbox!=null&&(Je.bbox=He.bbox),Je}default:return yl(He)}}function Un(He,Je){var ut=T(Je/2),dt=v(E*ut);return[He*(.74482-.34588*dt*dt),1.70711*ut]}Un.invert=function(He,Je){var ut=Je/1.70711,dt=v(E*ut);return[He/(.74482-.34588*dt*dt),2*e(ut)]};function Io(){return x.geoProjection(Un).scale(146.153)}function Xs(He,Je,ut){var dt=x.geoInterpolate(Je,ut),Ct=dt(.5),wt=x.geoRotation([-Ct[0],-Ct[1]])(Je),Dt=dt.distance/2,ur=-L(v(wt[1]*h)/v(Dt)),mr=[-Ct[0],-Ct[1],-(wt[0]>0?w-ur:ur)*m],Er=x.geoProjection(He(Dt)).rotate(mr),Br=x.geoRotation(mr),Qr=Er.center;return delete Er.rotate,Er.center=function(ga){return arguments.length?Qr(Br(ga)):Br.invert(Qr())},Er.clipAngle(90)}function Ls(He){var Je=r(He);function ut(dt,Ct){var wt=x.geoGnomonicRaw(dt,Ct);return wt[0]*=Je,wt}return ut.invert=function(dt,Ct){return x.geoGnomonicRaw.invert(dt/Je,Ct)},ut}function ou(){return Iu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Iu(He,Je){return Xs(Ls,He,Je)}function Zu(He){if(!(He*=2))return x.geoAzimuthalEquidistantRaw;var Je=-He/2,ut=-Je,dt=He*He,Ct=T(ut),wt=.5/v(ut);function Dt(ur,mr){var Er=z(r(mr)*r(ur-Je)),Br=z(r(mr)*r(ur-ut)),Qr=mr<0?-1:1;return Er*=Er,Br*=Br,[(Er-Br)/(2*He),Qr*F(4*dt*Br-(dt-Er+Br)*(dt-Er+Br))/(2*He)]}return Dt.invert=function(ur,mr){var Er=mr*mr,Br=r(F(Er+(ga=ur+Je)*ga)),Qr=r(F(Er+(ga=ur+ut)*ga)),ga,Sa;return[t(Sa=Br-Qr,ga=(Br+Qr)*Ct),(mr<0?-1:1)*z(F(ga*ga+Sa*Sa)*wt)]},Dt}function Lc(){return yu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function yu(He,Je){return Xs(Zu,He,Je)}function Pc(He,Je){if(M(Je)<l)return[He,0];var ut=M(Je/S),dt=L(ut);if(M(He)<l||M(M(Je)-S)<l)return[0,g(Je)*w*T(dt/2)];var Ct=r(dt),wt=M(w/He-He/w)/2,Dt=wt*wt,ur=Ct/(ut+Ct-1),mr=ur*(2/ut-1),Er=mr*mr,Br=Er+Dt,Qr=ur-Er,ga=Dt+ur;return[g(He)*w*(wt*Qr+F(Dt*Qr*Qr-Br*(ur*ur-Er)))/Br,g(Je)*w*(mr*ga-wt*F((Dt+1)*Br-ga*ga))/Br]}Pc.invert=function(He,Je){if(M(Je)<l)return[He,0];if(M(He)<l)return[0,S*v(2*e(Je/w))];var ut=(He/=w)*He,dt=(Je/=w)*Je,Ct=ut+dt,wt=Ct*Ct,Dt=-M(Je)*(1+Ct),ur=Dt-2*dt+ut,mr=-2*Dt+1+2*dt+wt,Er=dt/mr+(2*ur*ur*ur/(mr*mr*mr)-9*Dt*ur/(mr*mr))/27,Br=(Dt-ur*ur/(3*mr))/mr,Qr=2*F(-Br/3),ga=z(3*Er/(Br*Qr))/3;return[w*(Ct-1+F(1+2*(ut-dt)+wt))/(2*He),g(Je)*w*(-Qr*r(ga+w/3)-ur/(3*mr))]};function wu(){return x.geoProjection(Pc).scale(79.4183)}function gc(He,Je){if(M(Je)<l)return[He,0];var ut=M(Je/S),dt=L(ut);if(M(He)<l||M(M(Je)-S)<l)return[0,g(Je)*w*T(dt/2)];var Ct=r(dt),wt=M(w/He-He/w)/2,Dt=wt*wt,ur=Ct*(F(1+Dt)-wt*Ct)/(1+Dt*ut*ut);return[g(He)*w*ur,g(Je)*w*F(1-ur*(2*wt+ur))]}gc.invert=function(He,Je){if(!He)return[0,S*v(2*e(Je/w))];var ut=M(He/w),dt=(1-ut*ut-(Je/=w)*Je)/(2*ut),Ct=dt*dt,wt=F(Ct+1);return[g(He)*w*(wt-dt),g(Je)*S*v(2*t(F((1-2*dt*ut)*(dt+wt)-ut),F(wt+dt+ut)))]};function fo(){return x.geoProjection(gc).scale(79.4183)}function zo(He,Je){if(M(Je)<l)return[He,0];var ut=Je/S,dt=L(ut);if(M(He)<l||M(M(Je)-S)<l)return[0,w*T(dt/2)];var Ct=(w/He-He/w)/2,wt=ut/(1+r(dt));return[w*(g(He)*F(Ct*Ct+1-wt*wt)-Ct),w*wt]}zo.invert=function(He,Je){if(!Je)return[He,0];var ut=Je/w,dt=(w*w*(1-ut*ut)-He*He)/(2*w*He);return[He?w*(g(He)*F(dt*dt+1)-dt):0,S*v(2*e(ut))]};function Ic(){return x.geoProjection(zo).scale(79.4183)}function lc(He,Je){if(!Je)return[He,0];var ut=M(Je);if(!He||ut===S)return[0,Je];var dt=ut/S,Ct=dt*dt,wt=(8*dt-Ct*(Ct+2)-5)/(2*Ct*(dt-1)),Dt=wt*wt,ur=dt*wt,mr=Ct+Dt+2*ur,Er=dt+3*wt,Br=He/S,Qr=Br+1/Br,ga=g(M(He)-S)*F(Qr*Qr-4),Sa=ga*ga,Oa=mr*(Ct+Dt*Sa-1)+(1-Ct)*(Ct*(Er*Er+4*Dt)+12*ur*Dt+4*Dt*Dt),di=(ga*(mr+Dt-1)+2*F(Oa))/(4*mr+Sa);return[g(He)*S*di,g(Je)*S*F(1+ga*M(di)-di*di)]}lc.invert=function(He,Je){var ut;if(!He||!Je)return[He,Je];Je/=w;var dt=g(He)*He/S,Ct=(dt*dt-1+4*Je*Je)/M(dt),wt=Ct*Ct,Dt=2*Je,ur=50;do{var mr=Dt*Dt,Er=(8*Dt-mr*(mr+2)-5)/(2*mr*(Dt-1)),Br=(3*Dt-mr*Dt-10)/(2*mr*Dt),Qr=Er*Er,ga=Dt*Er,Sa=Dt+Er,Oa=Sa*Sa,di=Dt+3*Er,Wi=Oa*(mr+Qr*wt-1)+(1-mr)*(mr*(di*di+4*Qr)+Qr*(12*ga+4*Qr)),Gi=-2*Sa*(4*ga*Qr+(1-4*mr+3*mr*mr)*(1+Br)+Qr*(-6+14*mr-wt+(-8+8*mr-2*wt)*Br)+ga*(-8+12*mr+(-10+10*mr-wt)*Br)),on=F(Wi),Tn=Ct*(Oa+Qr-1)+2*on-dt*(4*Oa+wt),Wn=Ct*(2*Er*Br+2*Sa*(1+Br))+Gi/on-8*Sa*(Ct*(-1+Qr+Oa)+2*on)*(1+Br)/(wt+4*Oa);Dt-=ut=Tn/Wn}while(ut>l&&--ur>0);return[g(He)*(F(Ct*Ct+4)+Ct)*w/4,S*Dt]};function Yu(){return x.geoProjection(lc).scale(127.16)}function Ne(He,Je,ut,dt,Ct){function wt(Dt,ur){var mr=ut*v(dt*ur),Er=F(1-mr*mr),Br=F(2/(1+Er*r(Dt*=Ct)));return[He*Er*Br*v(Dt),Je*mr*Br]}return wt.invert=function(Dt,ur){var mr=Dt/He,Er=ur/Je,Br=F(mr*mr+Er*Er),Qr=2*L(Br/2);return[t(Dt*T(Qr),He*Br)/Ct,Br&&L(ur*v(Qr)/(Je*ut*Br))/dt]},wt}function R(He,Je,ut,dt){var Ct=w/3;He=n(He,l),Je=n(Je,l),He=s(He,S),Je=s(Je,w-l),ut=n(ut,0),ut=s(ut,100-l),dt=n(dt,l);var wt=ut/100+1,Dt=dt/100,ur=z(wt*r(Ct))/Ct,mr=v(He)/v(ur*S),Er=Je/w,Br=F(Dt*v(He/2)/v(Je/2)),Qr=Br/F(Er*mr*ur),ga=1/(Br*F(Er*mr*ur));return Ne(Qr,ga,mr,ur,Er)}function ae(){var He=65*h,Je=60*h,ut=20,dt=200,Ct=x.geoProjectionMutator(R),wt=Ct(He,Je,ut,dt);return wt.poleline=function(Dt){return arguments.length?Ct(He=+Dt*h,Je,ut,dt):He*m},wt.parallels=function(Dt){return arguments.length?Ct(He,Je=+Dt*h,ut,dt):Je*m},wt.inflation=function(Dt){return arguments.length?Ct(He,Je,ut=+Dt,dt):ut},wt.ratio=function(Dt){return arguments.length?Ct(He,Je,ut,dt=+Dt):dt},wt.scale(163.775)}function we(){return ae().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Se=4*w+3*F(3),Oe=2*F(2*w*F(3)/Se),pt=tt(Oe*F(3)/w,Oe,Se/6);function At(){return x.geoProjection(pt).scale(176.84)}function Bt(He,Je){return[He*F(1-3*Je*Je/(w*w)),Je]}Bt.invert=function(He,Je){return[He/F(1-3*Je*Je/(w*w)),Je]};function $t(){return x.geoProjection(Bt).scale(152.63)}function br(He,Je){var ut=r(Je),dt=r(He)*ut,Ct=1-dt,wt=r(He=t(v(He)*ut,-v(Je))),Dt=v(He);return ut=F(1-dt*dt),[Dt*ut-wt*Ct,-wt*ut-Dt*Ct]}br.invert=function(He,Je){var ut=(He*He+Je*Je)/-2,dt=F(-ut*(2+ut)),Ct=Je*ut+He*dt,wt=He*ut-Je*dt,Dt=F(wt*wt+Ct*Ct);return[t(dt*Ct,Dt*(1+ut)),Dt?-L(dt*wt/Dt):0]};function Ar(){return x.geoProjection(br).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Yr(He,Je){var ut=ue(He,Je);return[(ut[0]+He/S)/2,(ut[1]+Je)/2]}Yr.invert=function(He,Je){var ut=He,dt=Je,Ct=25;do{var wt=r(dt),Dt=v(dt),ur=v(2*dt),mr=Dt*Dt,Er=wt*wt,Br=v(ut),Qr=r(ut/2),ga=v(ut/2),Sa=ga*ga,Oa=1-Er*Qr*Qr,di=Oa?z(wt*Qr)*F(Wi=1/Oa):Wi=0,Wi,Gi=.5*(2*di*wt*ga+ut/S)-He,on=.5*(di*Dt+dt)-Je,Tn=.5*Wi*(Er*Sa+di*wt*Qr*mr)+.5/S,Wn=Wi*(Br*ur/4-di*Dt*ga),Bn=.125*Wi*(ur*ga-di*Dt*Er*Br),Ao=.5*Wi*(mr*Qr+di*Sa*wt)+.5,ss=Wn*Bn-Ao*Tn,So=(on*Wn-Gi*Ao)/ss,Ko=(Gi*Bn-on*Tn)/ss;ut-=So,dt-=Ko}while((M(So)>l||M(Ko)>l)&&--Ct>0);return[ut,dt]};function sa(){return x.geoProjection(Yr).scale(158.837)}d.geoNaturalEarth=x.geoNaturalEarth1,d.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,d.geoAiry=Q,d.geoAiryRaw=W,d.geoAitoff=le,d.geoAitoffRaw=ue,d.geoArmadillo=G,d.geoArmadilloRaw=he,d.geoAugust=J,d.geoAugustRaw=$,d.geoBaker=j,d.geoBakerRaw=ie,d.geoBerghaus=re,d.geoBerghausRaw=ee,d.geoBertin1953=it,d.geoBertin1953Raw=Xe,d.geoBoggs=rt,d.geoBoggsRaw=Fe,d.geoBonne=Vt,d.geoBonneRaw=kt,d.geoBottomley=Sr,d.geoBottomleyRaw=Zt,d.geoBromley=jr,d.geoBromleyRaw=xr,d.geoChamberlin=Me,d.geoChamberlinRaw=Be,d.geoChamberlinAfrica=Ue,d.geoCollignon=Ce,d.geoCollignonRaw=qe,d.geoCraig=Pe,d.geoCraigRaw=Te,d.geoCraster=Tt,d.geoCrasterRaw=yt,d.geoCylindricalEqualArea=Gt,d.geoCylindricalEqualAreaRaw=Ot,d.geoCylindricalStereographic=Qt,d.geoCylindricalStereographicRaw=rr,d.geoEckert1=la,d.geoEckert1Raw=Tr,d.geoEckert2=Ba,d.geoEckert2Raw=Ua,d.geoEckert3=ei,d.geoEckert3Raw=Ra,d.geoEckert4=ti,d.geoEckert4Raw=za,d.geoEckert5=Jt,d.geoEckert5Raw=Ci,d.geoEckert6=Kt,d.geoEckert6Raw=Nt,d.geoEisenlohr=ta,d.geoEisenlohrRaw=Pr,d.geoFahey=Ia,d.geoFaheyRaw=ra,d.geoFoucaut=$a,d.geoFoucautRaw=Ha,d.geoFoucautSinusoidal=mi,d.geoFoucautSinusoidalRaw=ai,d.geoGilbert=Nr,d.geoGingery=Gr,d.geoGingeryRaw=Or,d.geoGinzburg4=aa,d.geoGinzburg4Raw=Ur,d.geoGinzburg5=fa,d.geoGinzburg5Raw=da,d.geoGinzburg6=dr,d.geoGinzburg6Raw=It,d.geoGinzburg8=ia,d.geoGinzburg8Raw=kr,d.geoGinzburg9=Fa,d.geoGinzburg9Raw=Ca,d.geoGringorten=Li,d.geoGringortenRaw=ha,d.geoGuyou=pn,d.geoGuyouRaw=Xn,d.geoHammer=Ae,d.geoHammerRaw=ce,d.geoHammerRetroazimuthal=Ts,d.geoHammerRetroazimuthalRaw=Jo,d.geoHealpix=os,d.geoHealpixRaw=To,d.geoHill=Os,d.geoHillRaw=Ys,d.geoHomolosine=uo,d.geoHomolosineRaw=Bs,d.geoHufnagel=ms,d.geoHufnagelRaw=$s,d.geoHyperelliptical=po,d.geoHyperellipticalRaw=Sn,d.geoInterrupt=$n,d.geoInterruptedBoggs=au,d.geoInterruptedHomolosine=xu,d.geoInterruptedMollweide=Ns,d.geoInterruptedMollweideHemispheres=Eu,d.geoInterruptedSinuMollweide=Cu,d.geoInterruptedSinusoidal=pf,d.geoKavrayskiy7=Vc,d.geoKavrayskiy7Raw=Us,d.geoLagrange=nu,d.geoLagrangeRaw=Sf,d.geoLarrivee=Ou,d.geoLarriveeRaw=ic,d.geoLaskowski=vl,d.geoLaskowskiRaw=il,d.geoLittrow=Vs,d.geoLittrowRaw=gs,d.geoLoximuthal=Nl,d.geoLoximuthalRaw=nc,d.geoMiller=cl,d.geoMillerRaw=qu,d.geoModifiedStereographic=Kl,d.geoModifiedStereographicRaw=yh,d.geoModifiedStereographicAlaska=Vu,d.geoModifiedStereographicGs48=Ul,d.geoModifiedStereographicGs50=Mf,d.geoModifiedStereographicMiller=wc,d.geoModifiedStereographicLee=rf,d.geoMollweide=Ee,d.geoMollweideRaw=lt,d.geoMtFlatPolarParabolic=Nc,d.geoMtFlatPolarParabolicRaw=af,d.geoMtFlatPolarQuartic=Of,d.geoMtFlatPolarQuarticRaw=Ff,d.geoMtFlatPolarSinusoidal=Ef,d.geoMtFlatPolarSinusoidalRaw=Gu,d.geoNaturalEarth2=Hc,d.geoNaturalEarth2Raw=oc,d.geoNellHammer=Uc,d.geoNellHammerRaw=Jl,d.geoInterruptedQuarticAuthalic=Gs,d.geoNicolosi=lh,d.geoNicolosiRaw=Cf,d.geoPatterson=vu,d.geoPattersonRaw=dc,d.geoPolyconic=Ml,d.geoPolyconicRaw=bu,d.geoPolyhedral=nf,d.geoPolyhedralButterfly=ol,d.geoPolyhedralCollignon=kf,d.geoPolyhedralWaterman=hl,d.geoProject=ru,d.geoGringortenQuincuncial=er,d.geoPeirceQuincuncial=yr,d.geoPierceQuincuncial=yr,d.geoQuantize=na,d.geoQuincuncial=kc,d.geoRectangularPolyconic=La,d.geoRectangularPolyconicRaw=$r,d.geoRobinson=Zi,d.geoRobinsonRaw=Pi,d.geoSatellite=Ri,d.geoSatelliteRaw=dn,d.geoSinuMollweide=tl,d.geoSinuMollweideRaw=Cn,d.geoSinusoidal=Lt,d.geoSinusoidalRaw=Qe,d.geoStitch=sl,d.geoTimes=Io,d.geoTimesRaw=Un,d.geoTwoPointAzimuthal=Iu,d.geoTwoPointAzimuthalRaw=Ls,d.geoTwoPointAzimuthalUsa=ou,d.geoTwoPointEquidistant=yu,d.geoTwoPointEquidistantRaw=Zu,d.geoTwoPointEquidistantUsa=Lc,d.geoVanDerGrinten=wu,d.geoVanDerGrintenRaw=Pc,d.geoVanDerGrinten2=fo,d.geoVanDerGrinten2Raw=gc,d.geoVanDerGrinten3=Ic,d.geoVanDerGrinten3Raw=zo,d.geoVanDerGrinten4=Yu,d.geoVanDerGrinten4Raw=lc,d.geoWagner=ae,d.geoWagner7=we,d.geoWagnerRaw=R,d.geoWagner4=At,d.geoWagner4Raw=pt,d.geoWagner6=$t,d.geoWagner6Raw=Bt,d.geoWiechel=Ar,d.geoWiechelRaw=br,d.geoWinkel3=sa,d.geoWinkel3Raw=Yr,Object.defineProperty(d,"__esModule",{value:!0})})}}),UU=Ze({"src/plots/geo/zoom.js"(Z,q){"use strict";var d=On(),x=ca(),A=oo(),M=Math.PI/180,e=180/Math.PI,t={cursor:"pointer"},r={cursor:"auto"};function o(m,h){var P=m.projection,L;return h._isScoped?L=n:h._isClipped?L=c:L=s,L(m,P)}q.exports=o;function a(m,h){return d.behavior.zoom().translate(h.translate()).scale(h.scale())}function i(m,h,P){var L=m.id,z=m.graphDiv,F=z.layout,B=F[L],O=z._fullLayout,I=O[L],N={},U={};function W(Q,ue){N[L+"."+Q]=x.nestedProperty(B,Q).get(),A.call("_storeDirectGUIEdit",F,O._preGUI,N);var le=x.nestedProperty(I,Q);le.get()!==ue&&(le.set(ue),x.nestedProperty(B,Q).set(ue),U[L+"."+Q]=ue)}P(W),W("projection.scale",h.scale()/m.fitScale),W("fitbounds",!1),z.emit("plotly_relayout",U)}function n(m,h){var P=a(m,h);function L(){d.select(this).style(t)}function z(){h.scale(d.event.scale).translate(d.event.translate),m.render(!0);var O=h.invert(m.midPt);m.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/m.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function F(O){var I=h.invert(m.midPt);O("center.lon",I[0]),O("center.lat",I[1])}function B(){d.select(this).style(r),i(m,h,F)}return P.on("zoomstart",L).on("zoom",z).on("zoomend",B),P}function s(m,h){var P=a(m,h),L=2,z,F,B,O,I,N,U,W,Q;function ue(X){return h.invert(X)}function le(X){var oe=ue(X);if(!oe)return!0;var ie=h(oe);return Math.abs(ie[0]-X[0])>L||Math.abs(ie[1]-X[1])>L}function he(){d.select(this).style(t),z=d.mouse(this),F=h.rotate(),B=h.translate(),O=F,I=ue(z)}function G(){if(N=d.mouse(this),le(z)){P.scale(h.scale()),P.translate(h.translate());return}h.scale(d.event.scale),h.translate([B[0],d.event.translate[1]]),I?ue(N)&&(W=ue(N),U=[O[0]+(W[0]-I[0]),F[1],F[2]],h.rotate(U),O=U):(z=N,I=ue(z)),Q=!0,m.render(!0);var X=h.rotate(),oe=h.invert(m.midPt);m.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/m.fitScale,"geo.center.lon":oe[0],"geo.center.lat":oe[1],"geo.projection.rotation.lon":-X[0]})}function $(){d.select(this).style(r),Q&&i(m,h,J)}function J(X){var oe=h.rotate(),ie=h.invert(m.midPt);X("projection.rotation.lon",-oe[0]),X("center.lon",ie[0]),X("center.lat",ie[1])}return P.on("zoomstart",he).on("zoom",G).on("zoomend",$),P}function c(m,h){var P={r:h.rotate(),k:h.scale()},L=a(m,h),z=u(L,"zoomstart","zoom","zoomend"),F=0,B=L.on,O;L.on("zoomstart",function(){d.select(this).style(t);var Q=d.mouse(this),ue=h.rotate(),le=ue,he=h.translate(),G=g(ue);O=f(h,Q),B.call(L,"zoom",function(){var $=d.mouse(this);if(h.scale(P.k=d.event.scale),!O)Q=$,O=f(h,Q);else if(f(h,$)){h.rotate(ue).translate(he);var J=f(h,$),X=T(O,J),oe=E(v(G,X)),ie=P.r=l(oe,O,le);(!isFinite(ie[0])||!isFinite(ie[1])||!isFinite(ie[2]))&&(ie=le),h.rotate(ie),le=ie}N(z.of(this,arguments))}),I(z.of(this,arguments))}).on("zoomend",function(){d.select(this).style(r),B.call(L,"zoom",null),U(z.of(this,arguments)),i(m,h,W)}).on("zoom.redraw",function(){m.render(!0);var Q=h.rotate();m.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/m.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function I(Q){F++||Q({type:"zoomstart"})}function N(Q){Q({type:"zoom"})}function U(Q){--F||Q({type:"zoomend"})}function W(Q){var ue=h.rotate();Q("projection.rotation.lon",-ue[0]),Q("projection.rotation.lat",-ue[1])}return d.rebind(L,z,"on")}function f(m,h){var P=m.invert(h);return P&&isFinite(P[0])&&isFinite(P[1])&&y(P)}function g(m){var h=.5*m[0]*M,P=.5*m[1]*M,L=.5*m[2]*M,z=Math.sin(h),F=Math.cos(h),B=Math.sin(P),O=Math.cos(P),I=Math.sin(L),N=Math.cos(L);return[F*O*N+z*B*I,z*O*N-F*B*I,F*B*N+z*O*I,F*O*I-z*B*N]}function v(m,h){var P=m[0],L=m[1],z=m[2],F=m[3],B=h[0],O=h[1],I=h[2],N=h[3];return[P*B-L*O-z*I-F*N,P*O+L*B+z*N-F*I,P*I-L*N+z*B+F*O,P*N+L*I-z*O+F*B]}function T(m,h){if(!(!m||!h)){var P=p(m,h),L=Math.sqrt(b(P,P)),z=.5*Math.acos(Math.max(-1,Math.min(1,b(m,h)))),F=Math.sin(z)/L;return L&&[Math.cos(z),P[2]*F,-P[1]*F,P[0]*F]}}function l(m,h,P){var L=S(h,2,m[0]);L=S(L,1,m[1]),L=S(L,0,m[2]-P[2]);var z=h[0],F=h[1],B=h[2],O=L[0],I=L[1],N=L[2],U=Math.atan2(F,z)*e,W=Math.sqrt(z*z+F*F),Q,ue;Math.abs(I)>W?(ue=(I>0?90:-90)-U,Q=0):(ue=Math.asin(I/W)*e-U,Q=Math.sqrt(W*W-I*I));var le=180-ue-2*U,he=(Math.atan2(N,O)-Math.atan2(B,Q))*e,G=(Math.atan2(N,O)-Math.atan2(B,-Q))*e,$=_(P[0],P[1],ue,he),J=_(P[0],P[1],le,G);return $<=J?[ue,he,P[2]]:[le,G,P[2]]}function _(m,h,P,L){var z=w(P-m),F=w(L-h);return Math.sqrt(z*z+F*F)}function w(m){return(m%360+540)%360-180}function S(m,h,P){var L=P*M,z=m.slice(),F=h===0?1:0,B=h===2?1:2,O=Math.cos(L),I=Math.sin(L);return z[F]=m[F]*O-m[B]*I,z[B]=m[B]*O+m[F]*I,z}function E(m){return[Math.atan2(2*(m[0]*m[1]+m[2]*m[3]),1-2*(m[1]*m[1]+m[2]*m[2]))*e,Math.asin(Math.max(-1,Math.min(1,2*(m[0]*m[2]-m[3]*m[1]))))*e,Math.atan2(2*(m[0]*m[3]+m[1]*m[2]),1-2*(m[2]*m[2]+m[3]*m[3]))*e]}function y(m){var h=m[0]*M,P=m[1]*M,L=Math.cos(P);return[L*Math.cos(h),L*Math.sin(h),Math.sin(P)]}function b(m,h){for(var P=0,L=0,z=m.length;L<z;++L)P+=m[L]*h[L];return P}function p(m,h){return[m[1]*h[2]-m[2]*h[1],m[2]*h[0]-m[0]*h[2],m[0]*h[1]-m[1]*h[0]]}function u(m){for(var h=0,P=arguments.length,L=[];++h<P;)L.push(arguments[h]);var z=d.dispatch.apply(null,L);return z.of=function(F,B){return function(O){var I;try{I=O.sourceEvent=d.event,O.target=m,d.event=O,z[O.type].apply(F,B)}finally{d.event=I}}},z}}}),jU=Ze({"src/plots/geo/geo.js"(Z,q){"use strict";var d=On(),x=DE(),A=x.geoPath,M=x.geoDistance,e=NU(),t=oo(),r=ca(),o=r.strTranslate,a=Yn(),i=as(),n=ef(),s=xc(),c=Wo(),f=Yd().getAutoRange,g=Tp(),v=Tf().prepSelect,T=Tf().clearOutline,l=Tf().selectOnClick,_=UU(),w=gx(),S=v0(),E=nT(),y=PE().feature;function b(P){this.id=P.id,this.graphDiv=P.graphDiv,this.container=P.container,this.topojsonURL=P.topojsonURL,this.isStatic=P.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 p=b.prototype;q.exports=function(L){return new b(L)},p.plot=function(P,L,z,F){var B=this;if(F)return B.update(P,L,!0);B._geoCalcData=P,B._fullLayout=L;var O=L[this.id],I=[],N=!1;for(var U in w.layerNameToAdjective)if(U!=="frame"&&O["show"+U]){N=!0;break}for(var W=!1,Q=0;Q<P.length;Q++){var ue=P[0][0].trace;ue._geo=B,ue.locationmode&&(N=!0);var le=ue.marker;if(le){var he=le.angle,G=le.angleref;(he||G==="north"||G==="previous")&&(W=!0)}}if(this._hasMarkerAngles=W,N){var $=E.getTopojsonName(O);(B.topojson===null||$!==B.topojsonName)&&(B.topojsonName=$,PlotlyGeoAssets.topojson[B.topojsonName]===void 0&&I.push(B.fetchTopojson()))}I=I.concat(S.fetchTraceGeoData(P)),z.push(new Promise(function(J,X){Promise.all(I).then(function(){B.topojson=PlotlyGeoAssets.topojson[B.topojsonName],B.update(P,L),J()}).catch(X)}))},p.fetchTopojson=function(){var P=this,L=E.getTopojsonPath(P.topojsonURL,P.topojsonName);return new Promise(function(z,F){d.json(L,function(B,O){if(B)return B.status===404?F(new Error(["plotly.js could not find topojson file at",L+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):F(new Error(["unexpected error while fetching topojson file at",L].join(" ")));PlotlyGeoAssets.topojson[P.topojsonName]=O,z()})})},p.update=function(P,L,z){var F=L[this.id];this.hasChoropleth=!1;for(var B=0;B<P.length;B++){var O=P[B],I=O[0].trace;I.type==="choropleth"&&(this.hasChoropleth=!0),I.visible===!0&&I._length>0&&I._module.calcGeoJSON(O,L)}if(!z){var N=this.updateProjection(P,L);if(N)return;(!this.viewInitial||this.scope!==F.scope)&&this.saveViewInitial(F)}this.scope=F.scope,this.updateBaseLayers(L,F),this.updateDims(L,F),this.updateFx(L,F),s.generalUpdatePerTraceModule(this.graphDiv,this,P,F);var U=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=U.selectAll(".point"),this.dataPoints.text=U.selectAll("text"),this.dataPaths.line=U.selectAll(".js-line");var W=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=W.selectAll("path"),this._render()},p.updateProjection=function(P,L){var z=this.graphDiv,F=L[this.id],B=L._size,O=F.domain,I=F.projection,N=F.lonaxis,U=F.lataxis,W=N._ax,Q=U._ax,ue=this.projection=u(F),le=[[B.l+B.w*O.x[0],B.t+B.h*(1-O.y[1])],[B.l+B.w*O.x[1],B.t+B.h*(1-O.y[0])]],he=F.center||{},G=I.rotation||{},$=N.range||[],J=U.range||[];if(F.fitbounds){W._length=le[1][0]-le[0][0],Q._length=le[1][1]-le[0][1],W.range=f(z,W),Q.range=f(z,Q);var X=(W.range[0]+W.range[1])/2,oe=(Q.range[0]+Q.range[1])/2;if(F._isScoped)he={lon:X,lat:oe};else if(F._isClipped){he={lon:X,lat:oe},G={lon:X,lat:oe,roll:G.roll};var ie=I.type,j=w.lonaxisSpan[ie]/2||180,ee=w.lataxisSpan[ie]/2||90;$=[X-j,X+j],J=[oe-ee,oe+ee]}else he={lon:X,lat:oe},G={lon:X,lat:G.lat,roll:G.roll}}ue.center([he.lon-G.lon,he.lat-G.lat]).rotate([-G.lon,-G.lat,G.roll]).parallels(I.parallels);var re=h($,J);ue.fitExtent(le,re);var ce=this.bounds=ue.getBounds(re),be=this.fitScale=ue.scale(),Ae=ue.translate();if(F.fitbounds){var ze=ue.getBounds(h(W.range,Q.range)),Re=Math.min((ce[1][0]-ce[0][0])/(ze[1][0]-ze[0][0]),(ce[1][1]-ce[0][1])/(ze[1][1]-ze[0][1]));isFinite(Re)?ue.scale(Re*be):r.warn("Something went wrong during"+this.id+"fitbounds computations.")}else ue.scale(I.scale*be);var Xe=this.midPt=[(ce[0][0]+ce[1][0])/2,(ce[0][1]+ce[1][1])/2];if(ue.translate([Ae[0]+(Xe[0]-Ae[0]),Ae[1]+(Xe[1]-Ae[1])]).clipExtent(ce),F._isAlbersUsa){var it=ue([he.lon,he.lat]),ot=ue.translate();ue.translate([ot[0]-(it[0]-ot[0]),ot[1]-(it[1]-ot[1])])}},p.updateBaseLayers=function(P,L){var z=this,F=z.topojson,B=z.layers,O=z.basePaths;function I(le){return le==="lonaxis"||le==="lataxis"}function N(le){return!!w.lineLayers[le]}function U(le){return!!w.fillLayers[le]}var W=this.hasChoropleth?w.layersForChoropleth:w.layers,Q=W.filter(function(le){return N(le)||U(le)?L["show"+le]:I(le)?L[le].showgrid:!0}),ue=z.framework.selectAll(".layer").data(Q,String);ue.exit().each(function(le){delete B[le],delete O[le],d.select(this).remove()}),ue.enter().append("g").attr("class",function(le){return"layer "+le}).each(function(le){var he=B[le]=d.select(this);le==="bg"?z.bgRect=he.append("rect").style("pointer-events","all"):I(le)?O[le]=he.append("path").style("fill","none"):le==="backplot"?he.append("g").classed("choroplethlayer",!0):le==="frontplot"?he.append("g").classed("scatterlayer",!0):N(le)?O[le]=he.append("path").style("fill","none").style("stroke-miterlimit",2):U(le)&&(O[le]=he.append("path").style("stroke","none"))}),ue.order(),ue.each(function(le){var he=O[le],G=w.layerNameToAdjective[le];le==="frame"?he.datum(w.sphereSVG):N(le)||U(le)?he.datum(y(F,F.objects[le])):I(le)&&he.datum(m(le,L,P)).call(a.stroke,L[le].gridcolor).call(i.dashLine,L[le].griddash,L[le].gridwidth),N(le)?he.call(a.stroke,L[G+"color"]).call(i.dashLine,"",L[G+"width"]):U(le)&&he.call(a.fill,L[G+"color"])})},p.updateDims=function(P,L){var z=this.bounds,F=(L.framewidth||0)/2,B=z[0][0]-F,O=z[0][1]-F,I=z[1][0]-B+F,N=z[1][1]-O+F;i.setRect(this.clipRect,B,O,I,N),this.bgRect.call(i.setRect,B,O,I,N).call(a.fill,L.bgcolor),this.xaxis._offset=B,this.xaxis._length=I,this.yaxis._offset=O,this.yaxis._length=N},p.updateFx=function(P,L){var z=this,F=z.graphDiv,B=z.bgRect,O=P.dragmode,I=P.clickmode;if(z.isStatic)return;function N(){var ue=z.viewInitial,le={};for(var he in ue)le[z.id+"."+he]=ue[he];t.call("_guiRelayout",F,le),F.emit("plotly_doubleclick",null)}function U(ue){return z.projection.invert([ue[0]+z.xaxis._offset,ue[1]+z.yaxis._offset])}var W=function(ue,le){if(le.isRect){var he=ue.range={};he[z.id]=[U([le.xmin,le.ymin]),U([le.xmax,le.ymax])]}else{var G=ue.lassoPoints={};G[z.id]=le.map(U)}},Q={element:z.bgRect.node(),gd:F,plotinfo:{id:z.id,xaxis:z.xaxis,yaxis:z.yaxis,fillRangeItems:W},xaxes:[z.xaxis],yaxes:[z.yaxis],subplot:z.id,clickFn:function(ue){ue===2&&T(F)}};O==="pan"?(B.node().onmousedown=null,B.call(_(z,L)),B.on("dblclick.zoom",N),F._context._scrollZoom.geo||B.on("wheel.zoom",null)):(O==="select"||O==="lasso")&&(B.on(".zoom",null),Q.prepFn=function(ue,le,he){v(ue,le,he,Q,O)},g.init(Q)),B.on("mousemove",function(){var ue=z.projection.invert(r.getPositionFromD3Event());if(!ue)return g.unhover(F,d.event);z.xaxis.p2c=function(){return ue[0]},z.yaxis.p2c=function(){return ue[1]},n.hover(F,d.event,z.id)}),B.on("mouseout",function(){F._dragging||g.unhover(F,d.event)}),B.on("click",function(){O!=="select"&&O!=="lasso"&&(I.indexOf("select")>-1&&l(d.event,F,[z.xaxis],[z.yaxis],z.id,Q),I.indexOf("event")>-1&&n.click(F,d.event))})},p.makeFramework=function(){var P=this,L=P.graphDiv,z=L._fullLayout,F="clip"+z._uid+P.id;P.clipDef=z._clips.append("clipPath").attr("id",F),P.clipRect=P.clipDef.append("rect"),P.framework=d.select(P.container).append("g").attr("class","geo "+P.id).call(i.setClipUrl,F,L),P.project=function(B){var O=P.projection(B);return O?[O[0]-P.xaxis._offset,O[1]-P.yaxis._offset]:[null,null]},P.xaxis={_id:"x",c2p:function(B){return P.project(B)[0]}},P.yaxis={_id:"y",c2p:function(B){return P.project(B)[1]}},P.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(P.mockAxis,z)},p.saveViewInitial=function(P){var L=P.center||{},z=P.projection,F=z.rotation||{};this.viewInitial={fitbounds:P.fitbounds,"projection.scale":z.scale};var B;P._isScoped?B={"center.lon":L.lon,"center.lat":L.lat}:P._isClipped?B={"projection.rotation.lon":F.lon,"projection.rotation.lat":F.lat}:B={"center.lon":L.lon,"center.lat":L.lat,"projection.rotation.lon":F.lon},r.extendFlat(this.viewInitial,B)},p.render=function(P){this._hasMarkerAngles&&P?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},p._render=function(){var P=this.projection,L=P.getPath(),z;function F(O){var I=P(O.lonlat);return I?o(I[0],I[1]):null}function B(O){return P.isLonLatOverEdges(O.lonlat)?"none":null}for(z in this.basePaths)this.basePaths[z].attr("d",L);for(z in this.dataPaths)this.dataPaths[z].attr("d",function(O){return L(O.geojson)});for(z in this.dataPoints)this.dataPoints[z].attr("display",B).attr("transform",F)};function u(P){var L=P.projection,z=L.type,F=w.projNames[z];F="geo"+r.titleCase(F);for(var B=x[F]||e[F],O=B(),I=P._isSatellite?Math.acos(1/L.distance)*180/Math.PI:P._isClipped?w.lonaxisSpan[z]/2:null,N=["center","rotate","parallels","clipExtent"],U=function(ue){return ue?O:[]},W=0;W<N.length;W++){var Q=N[W];typeof O[Q]!="function"&&(O[Q]=U)}return O.isLonLatOverEdges=function(ue){if(O(ue)===null)return!0;if(I){var le=O.rotate(),he=M(ue,[-le[0],-le[1]]),G=I*Math.PI/180;return he>G}else return!1},O.getPath=function(){return A().projection(O)},O.getBounds=function(ue){return O.getPath().bounds(ue)},O.precision(w.precision),P._isSatellite&&O.tilt(L.tilt).distance(L.distance),I&&O.clipAngle(I-w.clipPad),O}function m(P,L,z){var F=1e-6,B=2.5,O=L[P],I=w.scopeDefaults[L.scope],N,U,W;P==="lonaxis"?(N=I.lonaxisRange,U=I.lataxisRange,W=function(oe,ie){return[oe,ie]}):P==="lataxis"&&(N=I.lataxisRange,U=I.lonaxisRange,W=function(oe,ie){return[ie,oe]});var Q={type:"linear",range:[N[0],N[1]-F],tick0:O.tick0,dtick:O.dtick};c.setConvert(Q,z);var ue=c.calcTicks(Q);!L.isScoped&&P==="lonaxis"&&ue.pop();for(var le=ue.length,he=new Array(le),G=0;G<le;G++)for(var $=ue[G].x,J=he[G]=[],X=U[0];X<U[1]+B;X+=B)J.push(W($,X));return{type:"MultiLineString",coordinates:he}}function h(P,L){var z=w.clipPad,F=P[0]+z,B=P[1]-z,O=L[0]+z,I=L[1]-z;F>0&&B<0&&(B+=360);var N=(B-F)/4;return{type:"Polygon",coordinates:[[[F,O],[F,I],[F+N,I],[F+2*N,I],[F+3*N,I],[B,I],[B,O],[B-N,O],[B-2*N,O],[B-3*N,O],[F,O]]]}}}}),zE=Ze({"src/plots/geo/layout_attributes.js"(Z,q){"use strict";var d=oh(),x=bc().attributes,A=Gh().dash,M=gx(),e=pc().overrideAll,t=Km(),r={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:d.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:A},o=q.exports=e({domain:x({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:t(M.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:t(M.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:d.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:M.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:M.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:M.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:M.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:d.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:d.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:d.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:d.background},lonaxis:r,lataxis:r},"plot","from-root");o.uirevision={valType:"any",editType:"none"}}}),qU=Ze({"src/plots/geo/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=i0(),A=Hh().getSubplotData,M=gx(),e=zE(),t=M.axesNames;q.exports=function(a,i,n){x(a,i,n,{type:"geo",attributes:e,handleDefaults:r,fullData:n,partition:"y"})};function r(o,a,i,n){var s=A(n.fullData,"geo",n.id),c=s.map(function(J){return J.index}),f=i("resolution"),g=i("scope"),v=M.scopeDefaults[g],T=i("projection.type",v.projType),l=a._isAlbersUsa=T==="albers usa";l&&(g=a.scope="usa");var _=a._isScoped=g!=="world",w=a._isSatellite=T==="satellite",S=a._isConic=T.indexOf("conic")!==-1||T==="albers",E=a._isClipped=!!M.lonaxisSpan[T];if(o.visible===!1){var y=d.extendDeep({},a._template);y.showcoastlines=!1,y.showcountries=!1,y.showframe=!1,y.showlakes=!1,y.showland=!1,y.showocean=!1,y.showrivers=!1,y.showsubunits=!1,y.lonaxis&&(y.lonaxis.showgrid=!1),y.lataxis&&(y.lataxis.showgrid=!1),a._template=y}for(var b=i("visible"),p,u=0;u<t.length;u++){var m=t[u],h=[30,10][u],P;if(_)P=v[m+"Range"];else{var L=M[m+"Span"],z=(L[T]||L["*"])/2,F=i("projection.rotation."+m.substr(0,3),v.projRotate[u]);P=[F-z,F+z]}var B=i(m+".range",P);i(m+".tick0"),i(m+".dtick",h),p=i(m+".showgrid",b?void 0:!1),p&&(i(m+".gridcolor"),i(m+".gridwidth"),i(m+".griddash")),a[m]._ax={type:"linear",_id:m.slice(0,3),_traceIndices:c,setScale:d.identity,c2l:d.identity,r2l:d.identity,autorange:!0,range:B.slice(),_m:1,_input:{}}}var O=a.lonaxis.range,I=a.lataxis.range,N=O[0],U=O[1];N>0&&U<0&&(U+=360);var W=(N+U)/2,Q;if(!l){var ue=_?v.projRotate:[W,0,0];Q=i("projection.rotation.lon",ue[0]),i("projection.rotation.lat",ue[1]),i("projection.rotation.roll",ue[2]),p=i("showcoastlines",!_&&b),p&&(i("coastlinecolor"),i("coastlinewidth")),p=i("showocean",b?void 0:!1),p&&i("oceancolor")}var le,he;if(l?(le=-96.6,he=38.7):(le=_?W:Q,he=(I[0]+I[1])/2),i("center.lon",le),i("center.lat",he),w&&(i("projection.tilt"),i("projection.distance")),S){var G=v.projParallels||[0,60];i("projection.parallels",G)}i("projection.scale"),p=i("showland",b?void 0:!1),p&&i("landcolor"),p=i("showlakes",b?void 0:!1),p&&i("lakecolor"),p=i("showrivers",b?void 0:!1),p&&(i("rivercolor"),i("riverwidth")),p=i("showcountries",_&&g!=="usa"&&b),p&&(i("countrycolor"),i("countrywidth")),(g==="usa"||g==="north america"&&f===50)&&(i("showsubunits",b),i("subunitcolor"),i("subunitwidth")),_||(p=i("showframe",b),p&&(i("framecolor"),i("framewidth"))),i("bgcolor");var $=i("fitbounds");$&&(delete a.projection.scale,_?(delete a.center.lon,delete a.center.lat):E?(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon,delete a.projection.rotation.lat,delete a.lonaxis.range,delete a.lataxis.range):(delete a.center.lon,delete a.center.lat,delete a.projection.rotation.lon))}}}),FE=Ze({"src/plots/geo/index.js"(Z,q){"use strict";var d=Hh().getSubplotCalcData,x=ca().counterRegex,A=jU(),M="geo",e=x(M),t={};t[M]={valType:"subplotid",dflt:M,editType:"calc"};function r(i){for(var n=i._fullLayout,s=i.calcdata,c=n._subplots[M],f=0;f<c.length;f++){var g=c[f],v=d(s,M,g),T=n[g],l=T._subplot;l||(l=A({id:g,graphDiv:i,container:n._geolayer.node(),topojsonURL:i._context.topojsonURL,staticPlot:i._context.staticPlot}),n[g]._subplot=l),l.plot(v,n,i._promises)}}function o(i,n,s,c){for(var f=c._subplots[M]||[],g=0;g<f.length;g++){var v=f[g],T=c[v]._subplot;!n[v]&&T&&(T.framework.remove(),T.clipDef.remove())}}function a(i){for(var n=i._fullLayout,s=n._subplots[M],c=0;c<s.length;c++){var f=n[s[c]],g=f._subplot;g.updateFx(n,f)}}q.exports={attr:M,name:M,idRoot:M,idRegex:e,attrRegex:e,attributes:t,layoutAttributes:zE(),supplyLayoutDefaults:qU(),plot:r,updateFx:a,clean:o}}}),VU=Ze({"src/traces/scattergeo/index.js"(Z,q){"use strict";q.exports={attributes:dg(),supplyDefaults:LU(),colorbar:hp(),formatLabels:PU(),calc:iT(),calcGeoJSON:RE().calcGeoJSON,plot:RE().plot,style:IE(),styleOnSelect:ed().styleOnSelect,hoverPoints:FU(),eventData:OU(),selectPoints:BU(),moduleType:"trace",name:"scattergeo",basePlotModule:FE(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}}),GU=Ze({"lib/scattergeo.js"(Z,q){"use strict";q.exports=VU()}}),C1=Ze({"src/traces/choropleth/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=dg(),A=Mu(),M=eu(),e=oh().defaultLine,t=rs().extendFlat,r=x.marker.line;q.exports=t({locations:{valType:"data_array",editType:"calc"},locationmode:x.locationmode,z:{valType:"data_array",editType:"calc"},geojson:t({},x.geojson,{}),featureidkey:x.featureidkey,text:t({},x.text,{}),hovertext:t({},x.hovertext,{}),marker:{line:{color:t({},r.color,{dflt:e}),width:t({},r.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:x.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:x.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:t({},M.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:d(),showlegend:t({},M.showlegend,{dflt:!1})},A("",{cLetter:"z",editTypeOverride:"calc"}))}}),HU=Ze({"src/traces/choropleth/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=C1(),M=["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(" ");q.exports=function(t,r,o,a){function i(T,l){return d.coerce(t,r,A,T,l)}var n=i("locations"),s=i("z");if(!(n&&n.length&&d.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(n.length,s.length);var c=i("geojson"),f;(typeof c=="string"&&c!==""||d.isPlainObject(c))&&(f="geojson-id");var g=i("locationmode",f);g==="country names"&&d.warn(M),g==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate");var v=i("marker.line.width");v&&i("marker.line.color"),i("marker.opacity"),x(t,r,a,i,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(r,i)}}}),lT=Ze({"src/traces/choropleth/calc.js"(Z,q){"use strict";var d=ns(),x=qs().BADNUM,A=wp(),M=Av(),e=Od();function t(r){return r&&typeof r=="string"}q.exports=function(o,a){var i=a._length,n=new Array(i),s;a.geojson?s=function(T){return t(T)||d(T)}:s=t;for(var c=0;c<i;c++){var f=n[c]={},g=a.locations[c],v=a.z[c];s(g)&&d(v)?(f.loc=g,f.z=v):(f.loc=null,f.z=x),f.index=c}return M(n,a),A(o,a,{vals:a.z,containerStr:"",cLetter:"z"}),e(n,a),n}}}),uT=Ze({"src/traces/choropleth/style.js"(Z,q){"use strict";var d=On(),x=Yn(),A=as(),M=rc();function e(o,a){a&&t(o,a)}function t(o,a){var i=a[0].trace,n=a[0].node3,s=n.selectAll(".choroplethlocation"),c=i.marker||{},f=c.line||{},g=M.makeColorScaleFuncFromTrace(i);s.each(function(v){d.select(this).attr("fill",g(v.z)).call(x.stroke,v.mlc||f.color).call(A.dashLine,"",v.mlw||f.width||0).style("opacity",c.opacity)}),A.selectedPointStyle(s,i)}function r(o,a){var i=a[0].node3,n=a[0].trace;n.selectedpoints?A.selectedPointStyle(i.selectAll(".choroplethlocation"),n):t(o,a)}q.exports={style:e,styleOnSelect:r}}}),OE=Ze({"src/traces/choropleth/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=v0(),M=nT().getTopojsonFeatures,e=Yd().findExtremes,t=uT().style;function r(a,i,n){var s=i.layers.backplot.select(".choroplethlayer");x.makeTraceGroups(s,n,"trace choropleth").each(function(c){var f=d.select(this),g=f.selectAll("path.choroplethlocation").data(x.identity);g.enter().append("path").classed("choroplethlocation",!0),g.exit().remove(),t(a,c)})}function o(a,i){for(var n=a[0].trace,s=i[n.geo],c=s._subplot,f=n.locationmode,g=n._length,v=f==="geojson-id"?A.extractTraceFeature(a):M(n,c.topojson),T=[],l=[],_=0;_<g;_++){var w=a[_],S=f==="geojson-id"?w.fOut:A.locationToFeature(f,w.loc,v);if(S){w.geojson=S,w.ct=S.properties.ct,w._polygons=A.feature2polygons(S);var E=A.computeBbox(S);T.push(E[0],E[2]),l.push(E[1],E[3])}else w.geojson=null}if(s.fitbounds==="geojson"&&f==="geojson-id"){var y=A.computeBbox(A.getTraceGeojson(n));T=[y[0],y[2]],l=[y[1],y[3]]}var b={padded:!0};n._extremes.lon=e(s.lonaxis._ax,T,b),n._extremes.lat=e(s.lataxis._ax,l,b)}q.exports={calcGeoJSON:o,plot:r}}}),cT=Ze({"src/traces/choropleth/hover.js"(Z,q){"use strict";var d=Wo(),x=C1(),A=ca().fillText;q.exports=function(t,r,o){var a=t.cd,i=a[0].trace,n=t.subplot,s,c,f,g,v=[r,o],T=[r+360,o];for(c=0;c<a.length;c++)if(s=a[c],g=!1,s._polygons){for(f=0;f<s._polygons.length;f++)s._polygons[f].contains(v)&&(g=!g),s._polygons[f].contains(T)&&(g=!g);if(g)break}if(!(!g||!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=d.tickText(n.mockAxis,n.mockAxis.c2l(s.z),"hover").text,t.hovertemplate=s.hovertemplate,M(t,i,s),[t]};function M(e,t,r){if(!t.hovertemplate){var o=r.hi||t.hoverinfo,a=String(r.loc),i=o==="all"?x.hoverinfo.flags:o.split("+"),n=i.indexOf("name")!==-1,s=i.indexOf("location")!==-1,c=i.indexOf("z")!==-1,f=i.indexOf("text")!==-1,g=!n&&s,v=[];g?e.nameOverride=a:(n&&(e.nameOverride=t.name),s&&v.push(a)),c&&v.push(e.zLabel),f&&A(r,t,v),e.extraText=v.join("<br>")}}}}),fT=Ze({"src/traces/choropleth/event_data.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t){x.location=A.location,x.z=A.z;var r=e[t];return r.fIn&&r.fIn.properties&&(x.properties=r.fIn.properties),x.ct=r.ct,x}}}),hT=Ze({"src/traces/choropleth/select.js"(Z,q){"use strict";q.exports=function(x,A){var M=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a,i,n,s;if(A===!1)for(o=0;o<M.length;o++)M[o].selected=0;else for(o=0;o<M.length;o++)a=M[o],i=a.ct,i&&(n=e.c2p(i),s=t.c2p(i),A.contains([n,s],null,o,x)?(r.push({pointNumber:o,lon:i[0],lat:i[1]}),a.selected=1):a.selected=0);return r}}}),WU=Ze({"src/traces/choropleth/index.js"(Z,q){"use strict";q.exports={attributes:C1(),supplyDefaults:HU(),colorbar:a0(),calc:lT(),calcGeoJSON:OE().calcGeoJSON,plot:OE().plot,style:uT().style,styleOnSelect:uT().styleOnSelect,hoverPoints:cT(),eventData:fT(),selectPoints:hT(),moduleType:"trace",name:"choropleth",basePlotModule:FE(),categories:["geo","noOpacity","showLegend"],meta:{}}}}),XU=Ze({"lib/choropleth.js"(Z,q){"use strict";q.exports=WU()}}),pT=Ze({"src/traces/scattergl/hover.js"(Z,q){"use strict";var d=oo(),x=ca(),A=l1();function M(t,r,o,a){var i=t.cd,n=i[0].t,s=i[0].trace,c=t.xa,f=t.ya,g=n.x,v=n.y,T=c.c2p(r),l=f.c2p(o),_=t.distance,w;if(n.tree){var S=c.p2c(T-_),E=c.p2c(T+_),y=f.p2c(l-_),b=f.p2c(l+_);a==="x"?w=n.tree.range(Math.min(S,E),Math.min(f._rl[0],f._rl[1]),Math.max(S,E),Math.max(f._rl[0],f._rl[1])):w=n.tree.range(Math.min(S,E),Math.min(y,b),Math.max(S,E),Math.max(y,b))}else w=n.ids;var p,u,m,h,P,L,z,F,B,O=_;if(a==="x"){var I=!!s.xperiodalignment,N=!!s.yperiodalignment;for(P=0;P<w.length;P++){if(p=w[P],m=g[p],L=Math.abs(c.c2p(m)-T),I){var U=c.c2p(s._xStarts[p]),W=c.c2p(s._xEnds[p]);L=T>=Math.min(U,W)&&T<=Math.max(U,W)?0:1/0}if(L<O){if(O=L,h=v[p],z=f.c2p(h)-l,N){var Q=f.c2p(s._yStarts[p]),ue=f.c2p(s._yEnds[p]);z=l>=Math.min(Q,ue)&&l<=Math.max(Q,ue)?0:1/0}B=Math.sqrt(L*L+z*z),u=w[P]}}}else for(P=w.length-1;P>-1;P--)p=w[P],m=g[p],h=v[p],L=c.c2p(m)-T,z=f.c2p(h)-l,F=Math.sqrt(L*L+z*z),F<O&&(O=B=F,u=p);return t.index=u,t.distance=O,t.dxy=B,u===void 0?[t]:[e(t,g,v,s)]}function e(t,r,o,a){var i=t.xa,n=t.ya,s=t.distance,c=t.dxy,f=t.index,g={pointNumber:f,x:r[f],y:o[f]};g.tx=x.isArrayOrTypedArray(a.text)?a.text[f]:a.text,g.htx=Array.isArray(a.hovertext)?a.hovertext[f]:a.hovertext,g.data=Array.isArray(a.customdata)?a.customdata[f]:a.customdata,g.tp=Array.isArray(a.textposition)?a.textposition[f]:a.textposition;var v=a.textfont;v&&(g.ts=x.isArrayOrTypedArray(v.size)?v.size[f]:v.size,g.tc=x.isArrayOrTypedArray(v.color)?v.color[f]:v.color,g.tf=Array.isArray(v.family)?v.family[f]:v.family,g.tw=Array.isArray(v.weight)?v.weight[f]:v.weight,g.ty=Array.isArray(v.style)?v.style[f]:v.style,g.tv=Array.isArray(v.variant)?v.variant[f]:v.variant);var T=a.marker;T&&(g.ms=x.isArrayOrTypedArray(T.size)?T.size[f]:T.size,g.mo=x.isArrayOrTypedArray(T.opacity)?T.opacity[f]:T.opacity,g.mx=x.isArrayOrTypedArray(T.symbol)?T.symbol[f]:T.symbol,g.ma=x.isArrayOrTypedArray(T.angle)?T.angle[f]:T.angle,g.mc=x.isArrayOrTypedArray(T.color)?T.color[f]:T.color);var l=T&&T.line;l&&(g.mlc=Array.isArray(l.color)?l.color[f]:l.color,g.mlw=x.isArrayOrTypedArray(l.width)?l.width[f]:l.width);var _=T&&T.gradient;_&&_.type!=="none"&&(g.mgt=Array.isArray(_.type)?_.type[f]:_.type,g.mgc=Array.isArray(_.color)?_.color[f]:_.color);var w=i.c2p(g.x,!0),S=n.c2p(g.y,!0),E=g.mrc||1,y=a.hoverlabel;y&&(g.hbg=Array.isArray(y.bgcolor)?y.bgcolor[f]:y.bgcolor,g.hbc=Array.isArray(y.bordercolor)?y.bordercolor[f]:y.bordercolor,g.hts=x.isArrayOrTypedArray(y.font.size)?y.font.size[f]:y.font.size,g.htc=Array.isArray(y.font.color)?y.font.color[f]:y.font.color,g.htf=Array.isArray(y.font.family)?y.font.family[f]:y.font.family,g.hnl=x.isArrayOrTypedArray(y.namelength)?y.namelength[f]:y.namelength);var b=a.hoverinfo;b&&(g.hi=Array.isArray(b)?b[f]:b);var p=a.hovertemplate;p&&(g.ht=Array.isArray(p)?p[f]:p);var u={};u[t.index]=g;var m=a._origX,h=a._origY,P=x.extendFlat({},t,{color:A(a,g),x0:w-E,x1:w+E,xLabelVal:m?m[f]:g.x,y0:S-E,y1:S+E,yLabelVal:h?h[f]:g.y,cd:u,distance:s,spikeDistance:c,hovertemplate:g.ht});return g.htx?P.text=g.htx:g.tx?P.text=g.tx:a.text&&(P.text=a.text),x.fillText(g,a,P),d.getComponentMethod("errorbars","hoverInfo")(g,a,P),P}q.exports={hoverPoints:M,calcHover:e}}}),m0=Ze({"src/traces/scattergl/constants.js"(Z,q){"use strict";var d=20;q.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:d,SYMBOL_STROKE:d/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]}}}}),_x=Ze({"src/traces/scattergl/attributes.js"(Z,q){"use strict";var d=eu(),x=tc(),A=$d(),M=tf(),e=Qc().axisHoverFormat,t=Mu(),r=Km(),o=rs().extendFlat,a=pc().overrideAll,i=m0().DASHES,n=M.line,s=M.marker,c=s.line,f=q.exports=a({x:M.x,x0:M.x0,dx:M.dx,y:M.y,y0:M.y0,dy:M.dy,xperiod:M.xperiod,yperiod:M.yperiod,xperiod0:M.xperiod0,yperiod0:M.yperiod0,xperiodalignment:M.xperiodalignment,yperiodalignment:M.yperiodalignment,xhoverformat:e("x"),yhoverformat:e("y"),text:M.text,hovertext:M.hovertext,textposition:M.textposition,textfont:x({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:n.color,width:n.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:r(i),dflt:"solid"}},marker:o({},t("marker"),{symbol:s.symbol,angle:s.angle,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:o({},t("marker.line"),{width:c.width})}),connectgaps:M.connectgaps,fill:o({},M.fill,{dflt:"none"}),fillcolor:A(),selected:{marker:M.selected.marker,textfont:M.selected.textfont},unselected:{marker:M.unselected.marker,textfont:M.unselected.textfont},opacity:d.opacity},"calc","nested");f.x.editType=f.y.editType=f.x0.editType=f.y0.editType="calc+clearAxisTypes",f.hovertemplate=M.hovertemplate,f.texttemplate=M.texttemplate}}),dT=Ze({"src/traces/scattergl/helpers.js"(Z){"use strict";var q=m0();Z.isOpenSymbol=function(d){return typeof d=="string"?q.OPEN_RE.test(d):d%200>100},Z.isDotSymbol=function(d){return typeof d=="string"?q.DOT_RE.test(d):d>200}}}),ZU=Ze({"src/traces/scattergl/defaults.js"(Z,q){"use strict";var d=ca(),x=oo(),A=dT(),M=_x(),e=Tv(),t=Fu(),r=n1(),o=Qd(),a=md(),i=Dd(),n=ev(),s=zd();q.exports=function(f,g,v,T){function l(u,m){return d.coerce(f,g,M,u,m)}var _=f.marker?A.isOpenSymbol(f.marker.symbol):!1,w=t.isBubble(f),S=r(f,g,T,l);if(!S){g.visible=!1;return}o(f,g,T,l),l("xhoverformat"),l("yhoverformat");var E=S<e.PTS_LINESONLY?"lines+markers":"lines";l("text"),l("hovertext"),l("hovertemplate"),l("mode",E),t.hasMarkers(g)&&(a(f,g,v,T,l,{noAngleRef:!0,noStandOff:!0}),l("marker.line.width",_||w?1:0)),t.hasLines(g)&&(l("connectgaps"),i(f,g,v,T,l),l("line.shape")),t.hasText(g)&&(l("texttemplate"),s(f,g,T,l,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var y=(g.line||{}).color,b=(g.marker||{}).color;l("fill"),g.fill!=="none"&&n(f,g,v,l);var p=x.getComponentMethod("errorbars","supplyDefaults");p(f,g,y||b||v,{axis:"y"}),p(f,g,y||b||v,{axis:"x",inherit:"y"}),d.coerceSelectionMarkerOpacity(g,l)}}}),YU=Ze({"src/traces/scattergl/format_labels.js"(Z,q){"use strict";var d=P2();q.exports=function(A,M,e){var t=A.i;return"x"in A||(A.x=M._x[t]),"y"in A||(A.y=M._y[t]),d(A,M,e)}}}),KU=Ze({"node_modules/binary-search-bounds/search-bounds.js"(Z,q){"use strict";function d(r,o,a,i,n){for(var s=n+1;i<=n;){var c=i+n>>>1,f=r[c],g=a!==void 0?a(f,o):f-o;g>=0?(s=c,n=c-1):i=c+1}return s}function x(r,o,a,i,n){for(var s=n+1;i<=n;){var c=i+n>>>1,f=r[c],g=a!==void 0?a(f,o):f-o;g>0?(s=c,n=c-1):i=c+1}return s}function A(r,o,a,i,n){for(var s=i-1;i<=n;){var c=i+n>>>1,f=r[c],g=a!==void 0?a(f,o):f-o;g<0?(s=c,i=c+1):n=c-1}return s}function M(r,o,a,i,n){for(var s=i-1;i<=n;){var c=i+n>>>1,f=r[c],g=a!==void 0?a(f,o):f-o;g<=0?(s=c,i=c+1):n=c-1}return s}function e(r,o,a,i,n){for(;i<=n;){var s=i+n>>>1,c=r[s],f=a!==void 0?a(c,o):c-o;if(f===0)return s;f<=0?i=s+1:n=s-1}return-1}function t(r,o,a,i,n,s){return typeof a=="function"?s(r,o,a,i===void 0?0:i|0,n===void 0?r.length-1:n|0):s(r,o,void 0,a===void 0?0:a|0,i===void 0?r.length-1:i|0)}q.exports={ge:function(r,o,a,i,n){return t(r,o,a,i,n,d)},gt:function(r,o,a,i,n){return t(r,o,a,i,n,x)},lt:function(r,o,a,i,n){return t(r,o,a,i,n,A)},le:function(r,o,a,i,n){return t(r,o,a,i,n,M)},eq:function(r,o,a,i,n){return t(r,o,a,i,n,e)}}}}),Ev=Ze({"node_modules/pick-by-alias/index.js"(Z,q){"use strict";q.exports=function(M,e,t){var r={},o,a;if(typeof e=="string"&&(e=x(e)),Array.isArray(e)){var i={};for(a=0;a<e.length;a++)i[e[a]]=!0;e=i}for(o in e)e[o]=x(e[o]);var n={};for(o in e){var s=e[o];if(Array.isArray(s))for(a=0;a<s.length;a++){var c=s[a];if(t&&(n[c]=!0),c in M){if(r[o]=M[c],t)for(var f=a;f<s.length;f++)n[s[f]]=!0;break}}else o in M&&(e[o]&&(r[o]=M[o]),t&&(n[o]=!0))}if(t)for(o in M)n[o]||(r[o]=M[o]);return r};var d={};function x(A){return d[A]?d[A]:(typeof A=="string"&&(A=d[A]=A.split(/\s*,\s*|\s+/)),A)}}}),k1=Ze({"node_modules/parse-rect/index.js"(Z,q){"use strict";var d=Ev();q.exports=x;function x(A){var M;return arguments.length>1&&(A=arguments),typeof A=="string"?A=A.split(/\s/).map(parseFloat):typeof A=="number"&&(A=[A]),A.length&&typeof A[0]=="number"?A.length===1?M={width:A[0],height:A[0],x:0,y:0}:A.length===2?M={width:A[0],height:A[1],x:0,y:0}:M={x:A[0],y:A[1],width:A[2]-A[0]||0,height:A[3]-A[1]||0}:A&&(A=d(A,{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"}),M={x:A.left||0,y:A.top||0},A.width==null?A.right?M.width=A.right-M.x:M.width=0:M.width=A.width,A.height==null?A.bottom?M.height=A.bottom-M.y:M.height=0:M.height=A.height),M}}}),vg=Ze({"node_modules/array-bounds/index.js"(Z,q){"use strict";q.exports=d;function d(x,A){if(!x||x.length==null)throw Error("Argument should be an array");A==null?A=1:A=Math.floor(A);for(var M=Array(A*2),e=0;e<A;e++){for(var t=-1/0,r=1/0,o=e,a=x.length;o<a;o+=A)x[o]>t&&(t=x[o]),x[o]<r&&(r=x[o]);M[e]=r,M[A+e]=t}return M}}}),JU=Ze({"node_modules/defined/index.js"(Z,q){q.exports=function(){for(var d=0;d<arguments.length;d++)if(arguments[d]!==void 0)return arguments[d]}}}),mg=Ze({"node_modules/flatten-vertex-data/index.js"(Z,q){var d=Q3();q.exports=x;function x(A,M,e){if(!A)throw new TypeError("must specify data as first parameter");if(e=+(e||0)|0,Array.isArray(A)&&A[0]&&typeof A[0][0]=="number"){var t=A[0].length,r=A.length*t,o,a,i,n;(!M||typeof M=="string")&&(M=new(d(M||"float32"))(r+e));var s=M.length-e;if(r!==s)throw new Error("source length "+r+" ("+t+"x"+A.length+") does not match destination length "+s);for(o=0,i=e;o<A.length;o++)for(a=0;a<t;a++)M[i++]=A[o][a]===null?NaN:A[o][a]}else if(!M||typeof M=="string"){var c=d(M||"float32");if(Array.isArray(A)||M==="array")for(M=new c(A.length+e),o=0,i=e,n=M.length;i<n;i++,o++)M[i]=A[o]===null?NaN:A[o];else e===0?M=new c(A):(M=new c(A.length+e),M.set(A,e))}else M.set(A,e);return M}}}),$U=Ze({"node_modules/is-obj/index.js"(Z,q){"use strict";q.exports=function(d){var x=typeof d;return d!==null&&(x==="object"||x==="function")}}}),QU=Ze({"node_modules/math-log2/index.js"(Z,q){"use strict";q.exports=Math.log2||function(d){return Math.log(d)*Math.LOG2E}}}),ej=Ze({"node_modules/@plotly/point-cluster/quad.js"(Z,q){"use strict";var d=KU(),x=vx(),A=k1(),M=vg(),e=Ev(),t=JU(),r=mg(),o=$U(),a=Q3(),i=QU(),n=1073741824;q.exports=function(f,g){g||(g={}),f=r(f,"float64"),g=e(g,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let v=t(g.maxDepth,255),T=t(g.bounds,M(f,2));T[0]===T[2]&&T[2]++,T[1]===T[3]&&T[3]++;let l=s(f,T),_=f.length>>>1,w;g.dtype||(g.dtype="array"),typeof g.dtype=="string"?w=new(a(g.dtype))(_):g.dtype&&(w=g.dtype,Array.isArray(w)&&(w.length=_));for(let L=0;L<_;++L)w[L]=L;let S=[],E=[],y=[],b=[];u(0,0,1,w,0,1);let p=0;for(let L=0;L<S.length;L++){let z=S[L];if(w.set)w.set(z,p);else for(let B=0,O=z.length;B<O;B++)w[B+p]=z[B];let F=p+S[L].length;b[L]=[p,F],p=F}return w.range=m,w;function u(L,z,F,B,O,I){if(!B.length)return null;let N=S[O]||(S[O]=[]),U=y[O]||(y[O]=[]),W=E[O]||(E[O]=[]),Q=N.length;if(O++,O>v||I>n){for(let oe=0;oe<B.length;oe++)N.push(B[oe]),U.push(I),W.push(null,null,null,null);return Q}if(N.push(B[0]),U.push(I),B.length<=1)return W.push(null,null,null,null),Q;let ue=F*.5,le=L+ue,he=z+ue,G=[],$=[],J=[],X=[];for(let oe=1,ie=B.length;oe<ie;oe++){let j=B[oe],ee=l[j*2],re=l[j*2+1];ee<le?re<he?G.push(j):$.push(j):re<he?J.push(j):X.push(j)}return I<<=2,W.push(u(L,z,ue,G,O,I),u(L,he,ue,$,O,I+1),u(le,z,ue,J,O,I+2),u(le,he,ue,X,O,I+3)),Q}function m(...L){let z;if(o(L[L.length-1])){let J=L.pop();!L.length&&(J.x!=null||J.l!=null||J.left!=null)&&(L=[J],z={}),z=e(J,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else z={};L.length||(L=T);let F=A(...L),[B,O,I,N]=[Math.min(F.x,F.x+F.width),Math.min(F.y,F.y+F.height),Math.max(F.x,F.x+F.width),Math.max(F.y,F.y+F.height)],[U,W,Q,ue]=s([B,O,I,N],T),le=t(z.level,S.length);if(z.d!=null){let J;typeof z.d=="number"?J=[z.d,z.d]:z.d.length&&(J=z.d),le=Math.min(Math.max(Math.ceil(-i(Math.abs(J[0])/(T[2]-T[0]))),Math.ceil(-i(Math.abs(J[1])/(T[3]-T[1])))),le)}if(le=Math.min(le,S.length),z.lod)return h(U,W,Q,ue,le);let he=[];G(0,0,1,0,0,1);function G(J,X,oe,ie,j,ee){if(j===null||ee===null)return;let re=J+oe,ce=X+oe;if(U>re||W>ce||Q<J||ue<X||ie>=le||j===ee)return;let be=S[ie];ee===void 0&&(ee=be.length);for(let Ee=j;Ee<ee;Ee++){let _e=be[Ee],fe=f[_e*2],Fe=f[_e*2+1];fe>=B&&fe<=I&&Fe>=O&&Fe<=N&&he.push(_e)}let Ae=E[ie],ze=Ae[j*4+0],Re=Ae[j*4+1],Xe=Ae[j*4+2],it=Ae[j*4+3],ot=$(Ae,j+1),tt=oe*.5,lt=ie+1;G(J,X,tt,lt,ze,Re||Xe||it||ot),G(J,X+tt,tt,lt,Re,Xe||it||ot),G(J+tt,X,tt,lt,Xe,it||ot),G(J+tt,X+tt,tt,lt,it,ot)}function $(J,X){let oe=null,ie=0;for(;oe===null;)if(oe=J[X*4+ie],ie++,ie>J.length)return null;return oe}return he}function h(L,z,F,B,O){let I=[];for(let N=0;N<O;N++){let U=y[N],W=b[N][0],Q=P(L,z,N),ue=P(F,B,N),le=d.ge(U,Q),he=d.gt(U,ue,le,U.length-1);I[N]=[le+W,he+W]}return I}function P(L,z,F){let B=1,O=.5,I=.5,N=.5;for(let U=0;U<F;U++)B<<=2,B+=L<O?z<I?0:1:z<I?2:3,N*=.5,O+=L<O?-N:N,I+=z<I?-N:N;return B}};function s(c,f){let[g,v,T,l]=f,_=1/(T-g),w=1/(l-v),S=new Array(c.length);for(let E=0,y=c.length/2;E<y;E++)S[2*E]=x((c[2*E]-g)*_,0,1),S[2*E+1]=x((c[2*E+1]-v)*w,0,1);return S}}}),vT=Ze({"node_modules/@plotly/point-cluster/index.js"(Z,q){"use strict";q.exports=ej()}}),BE=Ze({"node_modules/abs-svg-path/index.js"(Z,q){q.exports=d;function d(x){var A=0,M=0,e=0,t=0;return x.map(function(r){r=r.slice();var o=r[0],a=o.toUpperCase();if(o!=a)switch(r[0]=a,o){case"a":r[6]+=e,r[7]+=t;break;case"v":r[1]+=t;break;case"h":r[1]+=e;break;default:for(var i=1;i<r.length;)r[i++]+=e,r[i++]+=t}switch(a){case"Z":e=A,t=M;break;case"H":e=r[1];break;case"V":t=r[1];break;case"M":e=A=r[1],t=M=r[2];break;default:e=r[r.length-2],t=r[r.length-1]}return r})}}}),tj=Ze({"node_modules/svg-arc-to-cubic-bezier/cjs/index.js"(Z,q){"use strict";Object.defineProperty(Z,"__esModule",{value:!0});var d=function(){function o(a,i){var n=[],s=!0,c=!1,f=void 0;try{for(var g=a[Symbol.iterator](),v;!(s=(v=g.next()).done)&&(n.push(v.value),!(i&&n.length===i));s=!0);}catch(T){c=!0,f=T}finally{try{!s&&g.return&&g.return()}finally{if(c)throw f}}return n}return function(a,i){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a))return o(a,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=Math.PI*2,A=function(a,i,n,s,c,f,g){var v=a.x,T=a.y;v*=i,T*=n;var l=s*v-c*T,_=c*v+s*T;return{x:l+f,y:_+g}},M=function(a,i){var n=i===1.5707963267948966?.551915024494:i===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(i/4),s=Math.cos(a),c=Math.sin(a),f=Math.cos(a+i),g=Math.sin(a+i);return[{x:s-c*n,y:c+s*n},{x:f+g*n,y:g-f*n},{x:f,y:g}]},e=function(a,i,n,s){var c=a*s-i*n<0?-1:1,f=a*n+i*s;return f>1&&(f=1),f<-1&&(f=-1),c*Math.acos(f)},t=function(a,i,n,s,c,f,g,v,T,l,_,w){var S=Math.pow(c,2),E=Math.pow(f,2),y=Math.pow(_,2),b=Math.pow(w,2),p=S*E-S*b-E*y;p<0&&(p=0),p/=S*b+E*y,p=Math.sqrt(p)*(g===v?-1:1);var u=p*c/f*w,m=p*-f/c*_,h=l*u-T*m+(a+n)/2,P=T*u+l*m+(i+s)/2,L=(_-u)/c,z=(w-m)/f,F=(-_-u)/c,B=(-w-m)/f,O=e(1,0,L,z),I=e(L,z,F,B);return v===0&&I>0&&(I-=x),v===1&&I<0&&(I+=x),[h,P,O,I]},r=function(a){var i=a.px,n=a.py,s=a.cx,c=a.cy,f=a.rx,g=a.ry,v=a.xAxisRotation,T=v===void 0?0:v,l=a.largeArcFlag,_=l===void 0?0:l,w=a.sweepFlag,S=w===void 0?0:w,E=[];if(f===0||g===0)return[];var y=Math.sin(T*x/360),b=Math.cos(T*x/360),p=b*(i-s)/2+y*(n-c)/2,u=-y*(i-s)/2+b*(n-c)/2;if(p===0&&u===0)return[];f=Math.abs(f),g=Math.abs(g);var m=Math.pow(p,2)/Math.pow(f,2)+Math.pow(u,2)/Math.pow(g,2);m>1&&(f*=Math.sqrt(m),g*=Math.sqrt(m));var h=t(i,n,s,c,f,g,_,S,y,b,p,u),P=d(h,4),L=P[0],z=P[1],F=P[2],B=P[3],O=Math.abs(B)/(x/4);Math.abs(1-O)<1e-7&&(O=1);var I=Math.max(Math.ceil(O),1);B/=I;for(var N=0;N<I;N++)E.push(M(F,B)),F+=B;return E.map(function(U){var W=A(U[0],f,g,b,y,L,z),Q=W.x,ue=W.y,le=A(U[1],f,g,b,y,L,z),he=le.x,G=le.y,$=A(U[2],f,g,b,y,L,z),J=$.x,X=$.y;return{x1:Q,y1:ue,x2:he,y2:G,x:J,y:X}})};Z.default=r,q.exports=Z.default}}),rj=Ze({"node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js"(Z,q){"use strict";q.exports=x;var d=tj();function x(e){for(var t,r=[],o=0,a=0,i=0,n=0,s=null,c=null,f=0,g=0,v=0,T=e.length;v<T;v++){var l=e[v],_=l[0];switch(_){case"M":i=l[1],n=l[2];break;case"A":var w=d({px:f,py:g,cx:l[6],cy:l[7],rx:l[1],ry:l[2],xAxisRotation:l[3],largeArcFlag:l[4],sweepFlag:l[5]});if(!w.length)continue;for(var S=0,E;S<w.length;S++)E=w[S],l=["C",E.x1,E.y1,E.x2,E.y2,E.x,E.y],S<w.length-1&&r.push(l);break;case"S":var y=f,b=g;(t=="C"||t=="S")&&(y+=y-o,b+=b-a),l=["C",y,b,l[1],l[2],l[3],l[4]];break;case"T":t=="Q"||t=="T"?(s=f*2-s,c=g*2-c):(s=f,c=g),l=M(f,g,s,c,l[1],l[2]);break;case"Q":s=l[1],c=l[2],l=M(f,g,l[1],l[2],l[3],l[4]);break;case"L":l=A(f,g,l[1],l[2]);break;case"H":l=A(f,g,l[1],g);break;case"V":l=A(f,g,f,l[1]);break;case"Z":l=A(f,g,i,n);break}t=_,f=l[l.length-2],g=l[l.length-1],l.length>4?(o=l[l.length-4],a=l[l.length-3]):(o=f,a=g),r.push(l)}return r}function A(e,t,r,o){return["C",e,t,r,o,r,o]}function M(e,t,r,o,a,i){return["C",e/3+2/3*r,t/3+2/3*o,a/3+2/3*r,i/3+2/3*o,a,i]}}}),NE=Ze({"node_modules/is-svg-path/index.js"(Z,q){"use strict";q.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),aj=Ze({"node_modules/svg-path-bounds/index.js"(Z,q){"use strict";var d=M_(),x=BE(),A=rj(),M=NE(),e=Y_();q.exports=t;function t(r){if(Array.isArray(r)&&r.length===1&&typeof r[0]=="string"&&(r=r[0]),typeof r=="string"&&(e(M(r),"String is not an SVG path."),r=d(r)),e(Array.isArray(r),"Argument should be a string or an array of path segments."),r=x(r),r=A(r),!r.length)return[0,0,0,0];for(var o=[1/0,1/0,-1/0,-1/0],a=0,i=r.length;a<i;a++)for(var n=r[a].slice(1),s=0;s<n.length;s+=2)n[s+0]<o[0]&&(o[0]=n[s+0]),n[s+1]<o[1]&&(o[1]=n[s+1]),n[s+0]>o[2]&&(o[2]=n[s+0]),n[s+1]>o[3]&&(o[3]=n[s+1]);return o}}}),ij=Ze({"node_modules/normalize-svg-path/index.js"(Z,q){var d=Math.PI,x=o(120);q.exports=A;function A(a){for(var i,n=[],s=0,c=0,f=0,g=0,v=null,T=null,l=0,_=0,w=0,S=a.length;w<S;w++){var E=a[w],y=E[0];switch(y){case"M":f=E[1],g=E[2];break;case"A":E=t(l,_,E[1],E[2],o(E[3]),E[4],E[5],E[6],E[7]),E.unshift("C"),E.length>7&&(n.push(E.splice(0,7)),E.unshift("C"));break;case"S":var b=l,p=_;(i=="C"||i=="S")&&(b+=b-s,p+=p-c),E=["C",b,p,E[1],E[2],E[3],E[4]];break;case"T":i=="Q"||i=="T"?(v=l*2-v,T=_*2-T):(v=l,T=_),E=e(l,_,v,T,E[1],E[2]);break;case"Q":v=E[1],T=E[2],E=e(l,_,E[1],E[2],E[3],E[4]);break;case"L":E=M(l,_,E[1],E[2]);break;case"H":E=M(l,_,E[1],_);break;case"V":E=M(l,_,l,E[1]);break;case"Z":E=M(l,_,f,g);break}i=y,l=E[E.length-2],_=E[E.length-1],E.length>4?(s=E[E.length-4],c=E[E.length-3]):(s=l,c=_),n.push(E)}return n}function M(a,i,n,s){return["C",a,i,n,s,n,s]}function e(a,i,n,s,c,f){return["C",a/3+2/3*n,i/3+2/3*s,c/3+2/3*n,f/3+2/3*s,c,f]}function t(a,i,n,s,c,f,g,v,T,l){if(l)h=l[0],P=l[1],u=l[2],m=l[3];else{var _=r(a,i,-c);a=_.x,i=_.y,_=r(v,T,-c),v=_.x,T=_.y;var w=(a-v)/2,S=(i-T)/2,E=w*w/(n*n)+S*S/(s*s);E>1&&(E=Math.sqrt(E),n=E*n,s=E*s);var y=n*n,b=s*s,p=(f==g?-1:1)*Math.sqrt(Math.abs((y*b-y*S*S-b*w*w)/(y*S*S+b*w*w)));p==1/0&&(p=1);var u=p*n*S/s+(a+v)/2,m=p*-s*w/n+(i+T)/2,h=Math.asin(((i-m)/s).toFixed(9)),P=Math.asin(((T-m)/s).toFixed(9));h=a<u?d-h:h,P=v<u?d-P:P,h<0&&(h=d*2+h),P<0&&(P=d*2+P),g&&h>P&&(h=h-d*2),!g&&P>h&&(P=P-d*2)}if(Math.abs(P-h)>x){var L=P,z=v,F=T;P=h+x*(g&&P>h?1:-1),v=u+n*Math.cos(P),T=m+s*Math.sin(P);var B=t(v,T,n,s,c,0,g,z,F,[P,L,u,m])}var O=Math.tan((P-h)/4),I=4/3*n*O,N=4/3*s*O,U=[2*a-(a+I*Math.sin(h)),2*i-(i-N*Math.cos(h)),v+I*Math.sin(P),T-N*Math.cos(P),v,T];if(l)return U;B&&(U=U.concat(B));for(var W=0;W<U.length;){var Q=r(U[W],U[W+1],c);U[W++]=Q.x,U[W++]=Q.y}return U}function r(a,i,n){return{x:a*Math.cos(n)-i*Math.sin(n),y:a*Math.sin(n)+i*Math.cos(n)}}function o(a){return a*(d/180)}}}),nj=Ze({"node_modules/draw-svg-path/index.js"(Z,q){var d=BE(),x=ij(),A={M:"moveTo",C:"bezierCurveTo"};q.exports=function(M,e){M.beginPath(),x(d(e)).forEach(function(t){var r=t[0],o=t.slice(1);M[A[r]].apply(M,o)}),M.closePath()}}}),oj=Ze({"node_modules/bitmap-sdf/index.js"(Z,q){"use strict";var d=vx();q.exports=A;var x=1e20;function A(t,r){r||(r={});var o=r.cutoff==null?.25:r.cutoff,a=r.radius==null?8:r.radius,i=r.channel||0,n,s,c,f,g,v,T,l,_,w,S;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");n=r.width,s=r.height,f=t,r.stride?v=r.stride:v=Math.floor(t.length/n/s)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(l=t,T=l.getContext("2d"),n=l.width,s=l.height,_=T.getImageData(0,0,n,s),f=_.data,v=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(l=t.canvas,T=t,n=l.width,s=l.height,_=T.getImageData(0,0,n,s),f=_.data,v=4):window.ImageData&&t instanceof window.ImageData&&(_=t,n=t.width,s=t.height,f=_.data,v=4);if(c=Math.max(n,s),window.Uint8ClampedArray&&f instanceof window.Uint8ClampedArray||window.Uint8Array&&f instanceof window.Uint8Array)for(g=f,f=Array(n*s),w=0,S=g.length;w<S;w++)f[w]=g[w*v+i]/255;else if(v!==1)throw Error("Raw data can have only 1 value per pixel");var E=Array(n*s),y=Array(n*s),b=Array(c),p=Array(c),u=Array(c+1),m=Array(c);for(w=0,S=n*s;w<S;w++){var h=f[w];E[w]=h===1?0:h===0?x:Math.pow(Math.max(0,.5-h),2),y[w]=h===1?x:h===0?0:Math.pow(Math.max(0,h-.5),2)}M(E,n,s,b,p,m,u),M(y,n,s,b,p,m,u);var P=window.Float32Array?new Float32Array(n*s):new Array(n*s);for(w=0,S=n*s;w<S;w++)P[w]=d(1-((E[w]-y[w])/a+o),0,1);return P}function M(t,r,o,a,i,n,s){for(var c=0;c<r;c++){for(var f=0;f<o;f++)a[f]=t[f*r+c];for(e(a,i,n,s,o),f=0;f<o;f++)t[f*r+c]=i[f]}for(f=0;f<o;f++){for(c=0;c<r;c++)a[c]=t[f*r+c];for(e(a,i,n,s,r),c=0;c<r;c++)t[f*r+c]=Math.sqrt(i[c])}}function e(t,r,o,a,i){o[0]=0,a[0]=-x,a[1]=+x;for(var n=1,s=0;n<i;n++){for(var c=(t[n]+n*n-(t[o[s]]+o[s]*o[s]))/(2*n-2*o[s]);c<=a[s];)s--,c=(t[n]+n*n-(t[o[s]]+o[s]*o[s]))/(2*n-2*o[s]);s++,o[s]=n,a[s]=c,a[s+1]=+x}for(n=0,s=0;n<i;n++){for(;a[s+1]<n;)s++;r[n]=(n-o[s])*(n-o[s])+t[o[s]]}}}}),sj=Ze({"node_modules/svg-path-sdf/index.js"(Z,q){"use strict";var d=aj(),x=M_(),A=nj(),M=NE(),e=oj(),t=document.createElement("canvas"),r=t.getContext("2d");q.exports=o;function o(n,s){if(!M(n))throw Error("Argument should be valid svg path string");s||(s={});var c,f;s.shape?(c=s.shape[0],f=s.shape[1]):(c=t.width=s.w||s.width||200,f=t.height=s.h||s.height||200);var g=Math.min(c,f),v=s.stroke||0,T=s.viewbox||s.viewBox||d(n),l=[c/(T[2]-T[0]),f/(T[3]-T[1])],_=Math.min(l[0]||0,l[1]||0)/2;if(r.fillStyle="black",r.fillRect(0,0,c,f),r.fillStyle="white",v&&(typeof v!="number"&&(v=1),v>0?r.strokeStyle="white":r.strokeStyle="black",r.lineWidth=Math.abs(v)),r.translate(c*.5,f*.5),r.scale(_,_),i()){var w=new Path2D(n);r.fill(w),v&&r.stroke(w)}else{var S=x(n);A(r,S),r.fill(),v&&r.stroke()}r.setTransform(1,0,0,1,0,0);var E=e(r,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:g*.5});return E}var a;function i(){if(a!=null)return a;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return a=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(s);var c=n.getImageData(0,0,1,1);return a=c&&c.data&&c.data[3]===255}}}),gg=Ze({"src/traces/scattergl/convert.js"(Z,q){"use strict";var d=ns(),x=sj(),A=h0(),M=oo(),e=ca(),t=e.isArrayOrTypedArray,r=as(),o=$c(),a=em().formatColor,i=Fu(),n=r1(),s=dT(),c=m0(),f=Zm().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=Qp().appendArrayPointValue;function T(B,O){var I,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},U=B._context.plotGlPixelRatio;if(O.visible!==!0)return N;if(i.hasText(O)&&(N.text=l(B,O),N.textSel=E(B,O,O.selected),N.textUnsel=E(B,O,O.unselected)),i.hasMarkers(O)&&(N.marker=w(B,O),N.markerSel=S(B,O,O.selected),N.markerUnsel=S(B,O,O.unselected),!O.unselected&&t(O.marker.opacity))){var W=O.marker.opacity;for(N.markerUnsel.opacity=new Array(W.length),I=0;I<W.length;I++)N.markerUnsel.opacity[I]=f*W[I]}if(i.hasLines(O)){N.line={overlay:!0,thickness:O.line.width*U,color:O.line.color,opacity:O.opacity};var Q=(c.DASHES[O.line.dash]||[1]).slice();for(I=0;I<Q.length;++I)Q[I]*=O.line.width*U;N.line.dashes=Q}return O.error_x&&O.error_x.visible&&(N.errorX=y(O,O.error_x,U)),O.error_y&&O.error_y.visible&&(N.errorY=y(O,O.error_y,U)),O.fill&&O.fill!=="none"&&(N.fill={closed:!0,fill:O.fillcolor,thickness:0}),N}function l(B,O){var I=B._fullLayout,N=O._length,U=O.textfont,W=O.textposition,Q=t(W)?W:[W],ue=U.color,le=U.size,he=U.family,G=U.weight,$=U.style,J=U.variant,X={},oe,ie=B._context.plotGlPixelRatio,j=O.texttemplate;if(j){X.text=[];var ee=I._d3locale,re=Array.isArray(j),ce=re?Math.min(j.length,N):N,be=re?function(tt){return j[tt]}:function(){return j};for(oe=0;oe<ce;oe++){var Ae={i:oe},ze=O._module.formatLabels(Ae,O,I),Re={};v(Re,O,oe);var Xe=O._meta||{};X.text.push(e.texttemplateString(be(oe),ze,ee,Re,Ae,Xe))}}else t(O.text)&&O.text.length<N?X.text=O.text.slice():X.text=O.text;if(t(X.text))for(oe=X.text.length;oe<N;oe++)X.text[oe]="";for(X.opacity=O.opacity,X.font={},X.align=[],X.baseline=[],oe=0;oe<Q.length;oe++){var it=Q[oe].split(/\s+/);switch(it[1]){case"left":X.align.push("right");break;case"right":X.align.push("left");break;default:X.align.push(it[1])}switch(it[0]){case"top":X.baseline.push("bottom");break;case"bottom":X.baseline.push("top");break;default:X.baseline.push(it[0])}}if(t(ue))for(X.color=new Array(N),oe=0;oe<N;oe++)X.color[oe]=ue[oe];else X.color=ue;if(t(le)||Array.isArray(he)||t(G)||Array.isArray($)||Array.isArray(J))for(X.font=new Array(N),oe=0;oe<N;oe++){var ot=X.font[oe]={};ot.size=(e.isTypedArray(le)?le[oe]:t(le)?d(le[oe])?le[oe]:0:le)*ie,ot.family=Array.isArray(he)?he[oe]:he,ot.weight=_(t(G)?G[oe]:G),ot.style=Array.isArray($)?$[oe]:$,ot.variant=Array.isArray(J)?J[oe]:J}else X.font={size:le*ie,family:he,weight:_(G),style:$,variant:J};return X}function _(B){return B<=1e3?B>500?"bold":"normal":B}function w(B,O){var I=O._length,N=O.marker,U={},W,Q=t(N.symbol),ue=t(N.angle),le=t(N.color),he=t(N.line.color),G=t(N.opacity),$=t(N.size),J=t(N.line.width),X;if(Q||(X=s.isOpenSymbol(N.symbol)),Q||le||he||G||ue){U.symbols=new Array(I),U.angles=new Array(I),U.colors=new Array(I),U.borderColors=new Array(I);var oe=N.symbol,ie=N.angle,j=a(N,N.opacity,I),ee=a(N.line,N.opacity,I);if(!t(ee[0])){var re=ee;for(ee=Array(I),W=0;W<I;W++)ee[W]=re}if(!t(j[0])){var ce=j;for(j=Array(I),W=0;W<I;W++)j[W]=ce}if(!t(oe)){var be=oe;for(oe=Array(I),W=0;W<I;W++)oe[W]=be}if(!t(ie)){var Ae=ie;for(ie=Array(I),W=0;W<I;W++)ie[W]=Ae}for(U.symbols=oe,U.angles=ie,U.colors=j,U.borderColors=ee,W=0;W<I;W++)Q&&(X=s.isOpenSymbol(N.symbol[W])),X&&(ee[W]=j[W].slice(),j[W]=j[W].slice(),j[W][3]=0);for(U.opacity=O.opacity,U.markers=new Array(I),W=0;W<I;W++)U.markers[W]=P({mx:U.symbols[W],ma:U.angles[W]},O)}else X?(U.color=A(N.color,"uint8"),U.color[3]=0,U.borderColor=A(N.color,"uint8")):(U.color=A(N.color,"uint8"),U.borderColor=A(N.line.color,"uint8")),U.opacity=O.opacity*N.opacity,U.marker=P({mx:N.symbol,ma:N.angle},O);var ze=1,Re=n(O,ze),Xe;if($||J){var it=U.sizes=new Array(I),ot=U.borderSizes=new Array(I),tt=0,lt;if($){for(W=0;W<I;W++)it[W]=Re(N.size[W]),tt+=it[W];lt=tt/I}else for(Xe=Re(N.size),W=0;W<I;W++)it[W]=Xe;if(J)for(W=0;W<I;W++)ot[W]=N.line.width[W];else for(Xe=N.line.width,W=0;W<I;W++)ot[W]=Xe;U.sizeAvg=lt}else U.size=Re(N&&N.size||10),U.borderSizes=Re(N.line.width);return U}function S(B,O,I){var N=O.marker,U={};return I&&(I.marker&&I.marker.symbol?U=w(B,e.extendFlat({},N,I.marker)):I.marker&&(I.marker.size&&(U.size=I.marker.size),I.marker.color&&(U.colors=I.marker.color),I.marker.opacity!==void 0&&(U.opacity=I.marker.opacity))),U}function E(B,O,I){var N={};if(!I)return N;if(I.textfont){var U={opacity:1,text:O.text,texttemplate:O.texttemplate,textposition:O.textposition,textfont:e.extendFlat({},O.textfont)};I.textfont&&e.extendFlat(U.textfont,I.textfont),N=l(B,U)}return N}function y(B,O,I){var N={capSize:O.width*2*I,lineWidth:O.thickness*I,color:O.color};return O.copy_ystyle&&(N=B.error_y),N}var b=c.SYMBOL_SDF_SIZE,p=c.SYMBOL_SIZE,u=c.SYMBOL_STROKE,m={},h=r.symbolFuncs[0](p*.05);function P(B,O){var I=B.mx;if(I==="circle")return null;var N,U,W=r.symbolNumber(I),Q=r.symbolFuncs[W%100],ue=!!r.symbolNoDot[W%100],le=!!r.symbolNoFill[W%100],he=s.isDotSymbol(I);if(B.ma&&(I+="_"+B.ma),m[I])return m[I];var G=r.getMarkerAngle(B,O);return he&&!ue?N=Q(p*1.1,G)+h:N=Q(p,G),U=x(N,{w:b,h:b,viewBox:[-p,-p,p,p],stroke:le?u:-u}),m[I]=U,U||null}function L(B,O,I){var N=I.length,U=N/2,W,Q;if(i.hasLines(O)&&U)if(O.line.shape==="hv"){for(W=[],Q=0;Q<U-1;Q++)isNaN(I[Q*2])||isNaN(I[Q*2+1])?W.push(NaN,NaN,NaN,NaN):(W.push(I[Q*2],I[Q*2+1]),!isNaN(I[Q*2+2])&&!isNaN(I[Q*2+3])?W.push(I[Q*2+2],I[Q*2+1]):W.push(NaN,NaN));W.push(I[N-2],I[N-1])}else if(O.line.shape==="hvh"){for(W=[],Q=0;Q<U-1;Q++)if(isNaN(I[Q*2])||isNaN(I[Q*2+1])||isNaN(I[Q*2+2])||isNaN(I[Q*2+3]))!isNaN(I[Q*2])&&!isNaN(I[Q*2+1])?W.push(I[Q*2],I[Q*2+1]):W.push(NaN,NaN),W.push(NaN,NaN);else{var ue=(I[Q*2]+I[Q*2+2])/2;W.push(I[Q*2],I[Q*2+1],ue,I[Q*2+1],ue,I[Q*2+3])}W.push(I[N-2],I[N-1])}else if(O.line.shape==="vhv"){for(W=[],Q=0;Q<U-1;Q++)if(isNaN(I[Q*2])||isNaN(I[Q*2+1])||isNaN(I[Q*2+2])||isNaN(I[Q*2+3]))!isNaN(I[Q*2])&&!isNaN(I[Q*2+1])?W.push(I[Q*2],I[Q*2+1]):W.push(NaN,NaN),W.push(NaN,NaN);else{var le=(I[Q*2+1]+I[Q*2+3])/2;W.push(I[Q*2],I[Q*2+1],I[Q*2],le,I[Q*2+2],le)}W.push(I[N-2],I[N-1])}else if(O.line.shape==="vh"){for(W=[],Q=0;Q<U-1;Q++)isNaN(I[Q*2])||isNaN(I[Q*2+1])?W.push(NaN,NaN,NaN,NaN):(W.push(I[Q*2],I[Q*2+1]),!isNaN(I[Q*2+2])&&!isNaN(I[Q*2+3])?W.push(I[Q*2],I[Q*2+3]):W.push(NaN,NaN));W.push(I[N-2],I[N-1])}else W=I;var he=!1;for(Q=0;Q<W.length;Q++)if(isNaN(W[Q])){he=!0;break}var G=he||W.length>c.TOO_MANY_POINTS||i.hasMarkers(O)?"rect":"round";if(he&&O.connectgaps){var $=W[0],J=W[1];for(Q=0;Q<W.length;Q+=2)isNaN(W[Q])||isNaN(W[Q+1])?(W[Q]=$,W[Q+1]=J):($=W[Q],J=W[Q+1])}return{join:G,positions:W}}function z(B,O,I,N,U){var W=M.getComponentMethod("errorbars","makeComputeError"),Q=o.getFromId(B,O.xaxis,"x"),ue=o.getFromId(B,O.yaxis,"y"),le=I.length/2,he={};function G($,J){var X=J._id.charAt(0),oe=O["error_"+X];if(oe&&oe.visible&&(J.type==="linear"||J.type==="log")){for(var ie=W(oe),j={x:0,y:1}[X],ee={x:[0,1,2,3],y:[2,3,0,1]}[X],re=new Float64Array(4*le),ce=1/0,be=-1/0,Ae=0,ze=0;Ae<le;Ae++,ze+=4){var Re=$[Ae];if(d(Re)){var Xe=I[Ae*2+j],it=ie(Re,Ae),ot=it[0],tt=it[1];if(d(ot)&&d(tt)){var lt=Re-ot,Ee=Re+tt;re[ze+ee[0]]=Xe-J.c2l(lt),re[ze+ee[1]]=J.c2l(Ee)-Xe,re[ze+ee[2]]=0,re[ze+ee[3]]=0,ce=Math.min(ce,Re-ot),be=Math.max(be,Re+tt)}}}he[X]={positions:I,errors:re,_bnds:[ce,be]}}}return G(N,Q),G(U,ue),he}function F(B,O,I,N){var U=O._length,W={},Q;if(i.hasMarkers(O)){var ue=I.font,le=I.align,he=I.baseline;for(W.offset=new Array(U),Q=0;Q<U;Q++){var G=N.sizes?N.sizes[Q]:N.size,$=t(ue)?ue[Q].size:ue.size,J=t(le)?le.length>1?le[Q]:le[0]:le,X=t(he)?he.length>1?he[Q]:he[0]:he,oe=g[J],ie=g[X],j=G?G/.8+1:0,ee=-ie*j-ie*.5;W.offset[Q]=[oe*j/$,ee/$]}}return W}q.exports={style:T,markerStyle:w,markerSelection:S,linePositions:L,errorBarPositions:z,textPosition:F}}}),UE=Ze({"src/traces/scattergl/scene_update.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){var e=M._scene,t={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},r={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return M._scene||(e=M._scene={},e.init=function(){d.extendFlat(e,r,t)},e.init(),e.update=function(a){var i=d.repeat(a,e.count);if(e.fill2d&&e.fill2d.update(i),e.scatter2d&&e.scatter2d.update(i),e.line2d&&e.line2d.update(i),e.error2d&&e.error2d.update(i.concat(i)),e.select2d&&e.select2d.update(i),e.glText)for(var n=0;n<e.count;n++)e.glText[n].update(a)},e.draw=function(){for(var a=e.count,i=e.fill2d,n=e.error2d,s=e.line2d,c=e.scatter2d,f=e.glText,g=e.select2d,v=e.selectBatch,T=e.unselectBatch,l=0;l<a;l++){if(i&&e.fillOrder[l]&&i.draw(e.fillOrder[l]),s&&e.lineOptions[l]&&s.draw(l),n&&(e.errorXOptions[l]&&n.draw(l),e.errorYOptions[l]&&n.draw(l+a)),c&&e.markerOptions[l])if(T[l].length){var _=d.repeat([],e.count);_[l]=T[l],c.draw(_)}else v[l].length||c.draw(l);f[l]&&e.textOptions[l]&&f[l].render()}g&&g.draw(v),e.dirty=!1},e.destroy=function(){e.fill2d&&e.fill2d.destroy&&e.fill2d.destroy(),e.scatter2d&&e.scatter2d.destroy&&e.scatter2d.destroy(),e.error2d&&e.error2d.destroy&&e.error2d.destroy(),e.line2d&&e.line2d.destroy&&e.line2d.destroy(),e.select2d&&e.select2d.destroy&&e.select2d.destroy(),e.glText&&e.glText.forEach(function(a){a.destroy&&a.destroy()}),e.lineOptions=null,e.fillOptions=null,e.markerOptions=null,e.markerSelectedOptions=null,e.markerUnselectedOptions=null,e.errorXOptions=null,e.errorYOptions=null,e.textOptions=null,e.textSelectedOptions=null,e.textUnselectedOptions=null,e.selectBatch=null,e.unselectBatch=null,M._scene=null}),e.dirty||d.extendFlat(e,t),e}}}),lj=Ze({"src/traces/scattergl/calc.js"(Z,q){"use strict";var d=vT(),x=ca(),A=$c(),M=Yd().findExtremes,e=tv(),t=Bd(),r=t.calcMarkerSize,o=t.calcAxisExpansion,a=t.setFirstScatter,i=Fd(),n=gg(),s=UE(),c=qs().BADNUM,f=m0().TOO_MANY_POINTS;q.exports=function(l,_){var w=l._fullLayout,S=_._xA=A.getFromId(l,_.xaxis,"x"),E=_._yA=A.getFromId(l,_.yaxis,"y"),y=w._plots[_.xaxis+_.yaxis],b=_._length,p=b>=f,u=b*2,m={},h,P=S.makeCalcdata(_,"x"),L=E.makeCalcdata(_,"y"),z=e(_,S,"x",P),F=e(_,E,"y",L),B=z.vals,O=F.vals;_._x=B,_._y=O,_.xperiodalignment&&(_._origX=P,_._xStarts=z.starts,_._xEnds=z.ends),_.yperiodalignment&&(_._origY=L,_._yStarts=F.starts,_._yEnds=F.ends);var I=new Array(u),N=new Array(b);for(h=0;h<b;h++)I[h*2]=B[h]===c?NaN:B[h],I[h*2+1]=O[h]===c?NaN:O[h],N[h]=h;if(S.type==="log")for(h=0;h<u;h+=2)I[h]=S.c2l(I[h]);if(E.type==="log")for(h=1;h<u;h+=2)I[h]=E.c2l(I[h]);p&&S.type!=="log"&&E.type!=="log"?m.tree=d(I):m.ids=N,i(l,_);var U=v(l,y,_,I,B,O),W=s(l,y);a(w,_);var Q;return p?U.marker&&(Q=U.marker.sizeAvg||Math.max(U.marker.size,3)):Q=r(_,b),o(l,_,S,E,B,O,Q),U.errorX&&g(_,S,U.errorX),U.errorY&&g(_,E,U.errorY),U.fill&&!W.fill2d&&(W.fill2d=!0),U.marker&&!W.scatter2d&&(W.scatter2d=!0),U.line&&!W.line2d&&(W.line2d=!0),(U.errorX||U.errorY)&&!W.error2d&&(W.error2d=!0),U.text&&!W.glText&&(W.glText=!0),U.marker&&(U.marker.snap=b),W.lineOptions.push(U.line),W.errorXOptions.push(U.errorX),W.errorYOptions.push(U.errorY),W.fillOptions.push(U.fill),W.markerOptions.push(U.marker),W.markerSelectedOptions.push(U.markerSel),W.markerUnselectedOptions.push(U.markerUnsel),W.textOptions.push(U.text),W.textSelectedOptions.push(U.textSel),W.textUnselectedOptions.push(U.textUnsel),W.selectBatch.push([]),W.unselectBatch.push([]),m._scene=W,m.index=W.count,m.x=B,m.y=O,m.positions=I,W.count++,[{x:!1,y:!1,t:m,trace:_}]};function g(T,l,_){var w=T._extremes[l._id],S=M(l,_._bnds,{padded:!0});w.min=w.min.concat(S.min),w.max=w.max.concat(S.max)}function v(T,l,_,w,S,E){var y=n.style(T,_);if(y.marker&&(y.marker.positions=w),y.line&&w.length>1&&x.extendFlat(y.line,n.linePositions(T,_,w)),y.errorX||y.errorY){var b=n.errorBarPositions(T,_,w,S,E);y.errorX&&x.extendFlat(y.errorX,b.x),y.errorY&&x.extendFlat(y.errorY,b.y)}return y.text&&(x.extendFlat(y.text,{positions:w},n.textPosition(T,_,y.text,y.marker)),x.extendFlat(y.textSel,{positions:w},n.textPosition(T,_,y.text,y.markerSel)),x.extendFlat(y.textUnsel,{positions:w},n.textPosition(T,_,y.text,y.markerUnsel))),y}}}),jE=Ze({"src/traces/scattergl/edit_style.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Zm().DESELECTDIM;function M(e){var t=e[0],r=t.trace,o=t.t,a=o._scene,i=o.index,n=a.selectBatch[i],s=a.unselectBatch[i],c=a.textOptions[i],f=a.textSelectedOptions[i]||{},g=a.textUnselectedOptions[i]||{},v=d.extendFlat({},c),T,l;if(n.length||s.length){var _=f.color,w=g.color,S=c.color,E=d.isArrayOrTypedArray(S);for(v.color=new Array(r._length),T=0;T<n.length;T++)l=n[T],v.color[l]=_||(E?S[l]:S);for(T=0;T<s.length;T++){l=s[T];var y=E?S[l]:S;v.color[l]=w||(_?y:x.addOpacity(y,A))}}a.glText[i].update(v)}q.exports={styleTextSelection:M}}}),qE=Ze({"src/traces/scattergl/select.js"(Z,q){"use strict";var d=Fu(),x=jE().styleTextSelection;q.exports=function(M,e){var t=M.cd,r=M.xaxis,o=M.yaxis,a=[],i=t[0].trace,n=t[0].t,s=i._length,c=n.x,f=n.y,g=n._scene,v=n.index;if(!g)return a;var T=d.hasText(i),l=d.hasMarkers(i),_=!l&&!T;if(i.visible!==!0||_)return a;var w=[],S=[];if(e!==!1&&!e.degenerate)for(var E=0;E<s;E++)e.contains([n.xpx[E],n.ypx[E]],!1,E,M)?(w.push(E),a.push({pointNumber:E,x:r.c2d(c[E]),y:o.c2d(f[E])})):S.push(E);if(l){var y=g.scatter2d;if(!w.length&&!S.length){var b=new Array(g.count);b[v]=g.markerOptions[v],y.update.apply(y,b)}else if(!g.selectBatch[v].length&&!g.unselectBatch[v].length){var p=new Array(g.count);p[v]=g.markerUnselectedOptions[v],y.update.apply(y,p)}}return g.selectBatch[v]=w,g.unselectBatch[v]=S,T&&x(t),a}}}),uj=Ze({"src/traces/scattergl/base_index.js"(Z,q){"use strict";var d=pT();q.exports={moduleType:"trace",name:"scattergl",basePlotModule:Zf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:_x(),supplyDefaults:ZU(),crossTraceDefaults:D5(),colorbar:hp(),formatLabels:YU(),calc:lj(),hoverPoints:d.hoverPoints,selectPoints:qE(),meta:{}}}}),cj=Ze({"node_modules/color-id/index.js"(Z,q){"use strict";var d=vx();q.exports=x,q.exports.to=x,q.exports.from=A;function x(M,e){e==null&&(e=!0);var t=M[0],r=M[1],o=M[2],a=M[3];a==null&&(a=e?1:255),e&&(t*=255,r*=255,o*=255,a*=255),t=d(t,0,255)&255,r=d(r,0,255)&255,o=d(o,0,255)&255,a=d(a,0,255)&255;var i=t*16777216+(r<<16)+(o<<8)+a;return i}function A(M,e){M=+M;var t=M>>>24,r=(M&16711680)>>>16,o=(M&65280)>>>8,a=M&255;return e===!1?[t,r,o,a]:[t/255,r/255,o/255,a/255]}}}),sh=Ze({"node_modules/object-assign/index.js"(Z,q){"use strict";var d=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;function M(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function e(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var r={},o=0;o<10;o++)r["_"+String.fromCharCode(o)]=o;var a=Object.getOwnPropertyNames(r).map(function(n){return r[n]});if(a.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(n){i[n]=n}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}q.exports=e()?Object.assign:function(t,r){for(var o,a=M(t),i,n=1;n<arguments.length;n++){o=Object(arguments[n]);for(var s in o)x.call(o,s)&&(a[s]=o[s]);if(d){i=d(o);for(var c=0;c<i.length;c++)A.call(o,i[c])&&(a[i[c]]=o[i[c]])}}return a}}}),fj=Ze({"node_modules/glslify/browser.js"(Z,q){q.exports=function(d){typeof d=="string"&&(d=[d]);for(var x=[].slice.call(arguments,1),A=[],M=0;M<d.length-1;M++)A.push(d[M],x[M]||"");return A.push(d[M]),A.join("")}}}),VE=Ze({"node_modules/update-diff/index.js"(Z,q){"use strict";q.exports=function(x,A,M){Array.isArray(M)||(M=[].slice.call(arguments,2));for(var e=0,t=M.length;e<t;e++){var r=M[e];for(var o in r)if(!(A[o]!==void 0&&!Array.isArray(A[o])&&x[o]===A[o])&&o in A){var a;if(r[o]===!0)a=A[o];else{if(r[o]===!1)continue;if(typeof r[o]=="function"&&(a=r[o](A[o],x,A),a===void 0))continue}x[o]=a}}return x}}}),hj=Ze({"node_modules/is-iexplorer/index.js"(Z,q){"use strict";q.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),mT=Ze({"node_modules/to-float32/index.js"(Z,q){"use strict";q.exports=A,q.exports.float32=q.exports.float=A,q.exports.fract32=q.exports.fract=x;var d=new Float32Array(1);function x(M,e){if(M.length){if(M instanceof Float32Array)return new Float32Array(M.length);e instanceof Float32Array||(e=A(M));for(var t=0,r=e.length;t<r;t++)e[t]=M[t]-e[t];return e}return A(M-A(M))}function A(M){return M.length?M instanceof Float32Array?M:new Float32Array(M):(d[0]=M,d[0])}}}),GE=Ze({"node_modules/regl-scatter2d/bundle.js"(Z,q){"use strict";function d(m,h){var P=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(P!=null){var L,z,F,B,O=[],I=!0,N=!1;try{if(F=(P=P.call(m)).next,h===0){if(Object(P)!==P)return;I=!1}else for(;!(I=(L=F.call(P)).done)&&(O.push(L.value),O.length!==h);I=!0);}catch(U){N=!0,z=U}finally{try{if(!I&&P.return!=null&&(B=P.return(),Object(B)!==B))return}finally{if(N)throw z}}return O}}function x(m,h){return e(m)||d(m,h)||r(m,h)||i()}function A(m){return M(m)||t(m)||r(m)||a()}function M(m){if(Array.isArray(m))return o(m)}function e(m){if(Array.isArray(m))return m}function t(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}function r(m,h){if(m){if(typeof m=="string")return o(m,h);var P=Object.prototype.toString.call(m).slice(8,-1);if(P==="Object"&&m.constructor&&(P=m.constructor.name),P==="Map"||P==="Set")return Array.from(m);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return o(m,h)}}function o(m,h){(h==null||h>m.length)&&(h=m.length);for(var P=0,L=new Array(h);P<h;P++)L[P]=m[P];return L}function a(){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 i(){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 n=h0(),s=vg(),c=cj(),f=vT(),g=sh(),v=fj(),T=Ev(),l=VE(),_=mg(),w=hj(),S=mT(),E=k1(),y=b;function b(m,h){var P=this;if(!(this instanceof b))return new b(m,h);typeof m=="function"?(h||(h={}),h.regl=m):(h=m,m=null),h&&h.length&&(h.positions=h),m=h.regl;var L=m._gl,z,F=[],B={},O=[],I=[null],N=[null],U=255,W=100;this.tooManyColors=w,z=m.texture({data:new Uint8Array(U*4),width:U,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),g(this,{regl:m,gl:L,groups:O,markerCache:N,markerTextures:I,palette:F,paletteIds:B,paletteTexture:z,maxColors:U,maxSize:W,canvas:L.canvas}),this.update(h);var Q={uniforms:{constPointSize:!!h.constPointSize,opacity:m.prop("opacity"),paletteSize:function(G,$){return[P.tooManyColors?0:U,z.height]},pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:z},attributes:{x:function(G,$){return $.xAttr||{buffer:$.positionBuffer,stride:8,offset:0}},y:function(G,$){return $.yAttr||{buffer:$.positionBuffer,stride:8,offset:4}},xFract:function(G,$){return $.xAttr?{constant:[0,0]}:{buffer:$.positionFractBuffer,stride:8,offset:0}},yFract:function(G,$){return $.yAttr?{constant:[0,0]}:{buffer:$.positionFractBuffer,stride:8,offset:4}},size:function(G,$){return $.size.length?{buffer:$.sizeBuffer,stride:2,offset:0}:{constant:[Math.round($.size*255/P.maxSize)]}},borderSize:function(G,$){return $.borderSize.length?{buffer:$.sizeBuffer,stride:2,offset:1}:{constant:[Math.round($.borderSize*255/P.maxSize)]}},colorId:function(G,$){return $.color.length?{buffer:$.colorBuffer,stride:P.tooManyColors?8:4,offset:0}:{constant:P.tooManyColors?F.slice($.color*4,$.color*4+4):[$.color]}},borderColorId:function(G,$){return $.borderColor.length?{buffer:$.colorBuffer,stride:P.tooManyColors?8:4,offset:P.tooManyColors?4:2}:{constant:P.tooManyColors?F.slice($.borderColor*4,$.borderColor*4+4):[$.borderColor]}},isActive:function(G,$){return $.activation===!0?{constant:[1]}:$.activation?$.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:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},ue=g({},Q);ue.frag=v([`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;
}
}
`]),ue.vert=v([`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=m(ue);var le=g({},Q);le.frag=v([`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;
}
`]),le.vert=v([`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;
}
`]),w&&(le.frag=le.frag.replace("smoothstep","smoothStep"),ue.frag=ue.frag.replace("smoothstep","smoothStep")),this.drawCircle=m(le)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var m=this,h=arguments.length,P=new Array(h),L=0;L<h;L++)P[L]=arguments[L];var z=this.groups;if(P.length===1&&Array.isArray(P[0])&&(P[0][0]===null||Array.isArray(P[0][0]))&&(P=P[0]),this.regl._refresh(),P.length)for(var F=0;F<P.length;F++)this.drawItem(F,P[F]);else z.forEach(function(B,O){m.drawItem(O)});return this},b.prototype.drawItem=function(m,h){var P=this.groups,L=P[m];if(typeof h=="number"&&(m=h,L=P[h],h=null),!!(L&&L.count&&L.opacity)){L.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,L,h));for(var z=[],F=1;F<L.activation.length;F++)!L.activation[F]||L.activation[F]!==!0&&!L.activation[F].data.length||z.push.apply(z,A(this.getMarkerDrawOptions(F,L,h)));z.length&&this.drawMarker(z)}},b.prototype.getMarkerDrawOptions=function(m,h,P){var L=h.range,z=h.tree,F=h.viewport,B=h.activation,O=h.selectionBuffer,I=h.count,N=this.regl;if(!z)return P?[g({},h,{markerTexture:this.markerTextures[m],activation:B[m],count:P.length,elements:P,offset:0})]:[g({},h,{markerTexture:this.markerTextures[m],activation:B[m],offset:0})];var U=[],W=z.range(L,{lod:!0,px:[(L[2]-L[0])/F.width,(L[3]-L[1])/F.height]});if(P){for(var Q=B[m],ue=Q.data,le=new Uint8Array(I),he=0;he<P.length;he++){var G=P[he];le[G]=ue?ue[G]:1}O.subdata(le)}for(var $=W.length;$--;){var J=x(W[$],2),X=J[0],oe=J[1];U.push(g({},h,{markerTexture:this.markerTextures[m],activation:P?O:B[m],offset:X,count:oe-X}))}return U},b.prototype.update=function(){for(var m=this,h=arguments.length,P=new Array(h),L=0;L<h;L++)P[L]=arguments[L];if(P.length){P.length===1&&Array.isArray(P[0])&&(P=P[0]);var z=this.groups,F=this.gl,B=this.regl,O=this.maxSize,I=this.maxColors,N=this.palette;this.groups=z=P.map(function(U,W){var Q=z[W];if(U===void 0)return Q;U===null?U={positions:null}:typeof U=="function"?U={ondraw:U}:typeof U[0]=="number"&&(U={positions:U}),U=T(U,{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"}),U.positions===null&&(U.positions=[]),U.tooManyColors!=null&&(m.tooManyColors=U.tooManyColors),Q||(z[W]=Q={id:W,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:B.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:B.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:B.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:B.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:B.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},U=g({},b.defaults,U)),U.positions&&!("marker"in U)&&(U.marker=Q.marker,delete Q.marker),U.marker&&!("positions"in U)&&(U.positions=Q.positions,delete Q.positions);var ue=0,le=0;if(l(Q,U,[{snap:!0,size:function(tt,lt){return tt==null&&(tt=b.defaults.size),ue+=tt&&tt.length?1:0,tt},borderSize:function(tt,lt){return tt==null&&(tt=b.defaults.borderSize),ue+=tt&&tt.length?1:0,tt},opacity:parseFloat,color:function(tt,lt){return tt==null&&(tt=b.defaults.color),tt=m.updateColor(tt),le++,tt},borderColor:function(tt,lt){return tt==null&&(tt=b.defaults.borderColor),tt=m.updateColor(tt),le++,tt},bounds:function(tt,lt,Ee){return"range"in Ee||(Ee.range=null),tt},positions:function(tt,lt,Ee){var _e=lt.snap,fe=lt.positionBuffer,Fe=lt.positionFractBuffer,rt=lt.selectionBuffer;if(tt.x||tt.y)return tt.x.length?lt.xAttr={buffer:B.buffer(tt.x),offset:0,stride:4,count:tt.x.length}:lt.xAttr={buffer:tt.x.buffer,offset:tt.x.offset*4||0,stride:(tt.x.stride||1)*4,count:tt.x.count},tt.y.length?lt.yAttr={buffer:B.buffer(tt.y),offset:0,stride:4,count:tt.y.length}:lt.yAttr={buffer:tt.y.buffer,offset:tt.y.offset*4||0,stride:(tt.y.stride||1)*4,count:tt.y.count},lt.count=Math.max(lt.xAttr.count,lt.yAttr.count),tt;tt=_(tt,"float64");var st=lt.count=Math.floor(tt.length/2),Qe=lt.bounds=st?s(tt,2):null;if(!Ee.range&&!lt.range&&(delete lt.range,Ee.range=Qe),!Ee.marker&&!lt.marker&&(delete lt.marker,Ee.marker=null),_e&&(_e===!0||st>_e)?lt.tree=f(tt,{bounds:Qe}):_e&&_e.length&&(lt.tree=_e),lt.tree){var Lt={primitive:"points",usage:"static",data:lt.tree,type:"uint32"};lt.elements?lt.elements(Lt):lt.elements=B.elements(Lt)}var kt=S.float32(tt);fe({data:kt,usage:"dynamic"});var Vt=S.fract32(tt,kt);return Fe({data:Vt,usage:"dynamic"}),rt({data:new Uint8Array(st),type:"uint8",usage:"stream"}),tt}},{marker:function(tt,lt,Ee){var _e=lt.activation;if(_e.forEach(function(Vt){return Vt&&Vt.destroy&&Vt.destroy()}),_e.length=0,!tt||typeof tt[0]=="number"){var fe=m.addMarker(tt);_e[fe]=!0}else{for(var Fe=[],rt=0,st=Math.min(tt.length,lt.count);rt<st;rt++){var Qe=m.addMarker(tt[rt]);Fe[Qe]||(Fe[Qe]=new Uint8Array(lt.count)),Fe[Qe][rt]=1}for(var Lt=0;Lt<Fe.length;Lt++)if(Fe[Lt]){var kt={data:Fe[Lt],type:"uint8",usage:"static"};_e[Lt]?_e[Lt](kt):_e[Lt]=B.buffer(kt),_e[Lt].data=Fe[Lt]}}return tt},range:function(tt,lt,Ee){var _e=lt.bounds;if(_e)return tt||(tt=_e),lt.scale=[1/(tt[2]-tt[0]),1/(tt[3]-tt[1])],lt.translate=[-tt[0],-tt[1]],lt.scaleFract=S.fract(lt.scale),lt.translateFract=S.fract(lt.translate),tt},viewport:function(tt){var lt=E(tt||[F.drawingBufferWidth,F.drawingBufferHeight]);return lt}}]),ue){var he=Q,G=he.count,$=he.size,J=he.borderSize,X=he.sizeBuffer,oe=new Uint8Array(G*2);if($.length||J.length)for(var ie=0;ie<G;ie++)oe[ie*2]=Math.round(($[ie]==null?$:$[ie])*255/O),oe[ie*2+1]=Math.round((J[ie]==null?J:J[ie])*255/O);X({data:oe,usage:"dynamic"})}if(le){var j=Q,ee=j.count,re=j.color,ce=j.borderColor,be=j.colorBuffer,Ae;if(m.tooManyColors){if(re.length||ce.length){Ae=new Uint8Array(ee*8);for(var ze=0;ze<ee;ze++){var Re=re[ze];Ae[ze*8]=N[Re*4],Ae[ze*8+1]=N[Re*4+1],Ae[ze*8+2]=N[Re*4+2],Ae[ze*8+3]=N[Re*4+3];var Xe=ce[ze];Ae[ze*8+4]=N[Xe*4],Ae[ze*8+5]=N[Xe*4+1],Ae[ze*8+6]=N[Xe*4+2],Ae[ze*8+7]=N[Xe*4+3]}}}else if(re.length||ce.length){Ae=new Uint8Array(ee*4+2);for(var it=0;it<ee;it++)re[it]!=null&&(Ae[it*4]=re[it]%I,Ae[it*4+1]=Math.floor(re[it]/I)),ce[it]!=null&&(Ae[it*4+2]=ce[it]%I,Ae[it*4+3]=Math.floor(ce[it]/I))}be({data:Ae||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return Q})}},b.prototype.addMarker=function(m){var h=this.markerTextures,P=this.regl,L=this.markerCache,z=m==null?0:L.indexOf(m);if(z>=0)return z;var F;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)F=m;else{F=new Uint8Array(m.length);for(var B=0,O=m.length;B<O;B++)F[B]=m[B]*255}var I=Math.floor(Math.sqrt(F.length));return z=h.length,L.push(m),h.push(P.texture({channels:1,data:F,radius:I,mag:"linear",min:"linear"})),z},b.prototype.updateColor=function(m){var h=this.paletteIds,P=this.palette,L=this.maxColors;Array.isArray(m)||(m=[m]);var z=[];if(typeof m[0]=="number"){var F=[];if(Array.isArray(m))for(var B=0;B<m.length;B+=4)F.push(m.slice(B,B+4));else for(var O=0;O<m.length;O+=4)F.push(m.subarray(O,O+4));m=F}for(var I=0;I<m.length;I++){var N=m[I];N=n(N,"uint8");var U=c(N,!1);if(h[U]==null){var W=P.length;h[U]=Math.floor(W/4),P[W]=N[0],P[W+1]=N[1],P[W+2]=N[2],P[W+3]=N[3]}z[I]=h[U]}return!this.tooManyColors&&P.length>L*4&&(this.tooManyColors=!0),this.updatePalette(P),z.length===1?z[0]:z},b.prototype.updatePalette=function(m){if(!this.tooManyColors){var h=this.maxColors,P=this.paletteTexture,L=Math.ceil(m.length*.25/h);if(L>1){m=m.slice();for(var z=m.length*.25%h;z<L*h;z++)m.push(0,0,0,0)}P.height<L&&P.resize(h,L),P.subimage({width:Math.min(m.length*.25,h),height:L,data:m},0,0)}},b.prototype.destroy=function(){return this.groups.forEach(function(m){m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(function(h){return h&&h.destroy&&h.destroy()}),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(m){return m&&m.destroy&&m.destroy()}),this};var p=sh(),u=function(h,P){var L=new y(h,P),z=L.render.bind(L);return p(z,{render:z,update:L.update.bind(L),draw:L.draw.bind(L),destroy:L.destroy.bind(L),regl:L.regl,gl:L.gl,canvas:L.gl.canvas,groups:L.groups,markers:L.markerCache,palette:L.palette}),z};q.exports=u}}),pj=Ze({"node_modules/earcut/src/earcut.js"(Z,q){"use strict";q.exports=d,q.exports.default=d;function d(B,O,I){I=I||2;var N=O&&O.length,U=N?O[0]*I:B.length,W=x(B,0,U,I,!0),Q=[];if(!W||W.next===W.prev)return Q;var ue,le,he,G,$,J,X;if(N&&(W=a(B,O,W,I)),B.length>80*I){ue=he=B[0],le=G=B[1];for(var oe=I;oe<U;oe+=I)$=B[oe],J=B[oe+1],$<ue&&(ue=$),J<le&&(le=J),$>he&&(he=$),J>G&&(G=J);X=Math.max(he-ue,G-le),X=X!==0?32767/X:0}return M(W,Q,I,ue,le,X,0),Q}function x(B,O,I,N,U){var W,Q;if(U===F(B,O,I,N)>0)for(W=O;W<I;W+=N)Q=P(W,B[W],B[W+1],Q);else for(W=I-N;W>=O;W-=N)Q=P(W,B[W],B[W+1],Q);return Q&&S(Q,Q.next)&&(L(Q),Q=Q.next),Q}function A(B,O){if(!B)return B;O||(O=B);var I=B,N;do if(N=!1,!I.steiner&&(S(I,I.next)||w(I.prev,I,I.next)===0)){if(L(I),I=O=I.prev,I===I.next)break;N=!0}else I=I.next;while(N||I!==O);return O}function M(B,O,I,N,U,W,Q){if(B){!Q&&W&&f(B,N,U,W);for(var ue=B,le,he;B.prev!==B.next;){if(le=B.prev,he=B.next,W?t(B,N,U,W):e(B)){O.push(le.i/I|0),O.push(B.i/I|0),O.push(he.i/I|0),L(B),B=he.next,ue=he.next;continue}if(B=he,B===ue){Q?Q===1?(B=r(A(B),O,I),M(B,O,I,N,U,W,2)):Q===2&&o(B,O,I,N,U,W):M(A(B),O,I,N,U,W,1);break}}}}function e(B){var O=B.prev,I=B,N=B.next;if(w(O,I,N)>=0)return!1;for(var U=O.x,W=I.x,Q=N.x,ue=O.y,le=I.y,he=N.y,G=U<W?U<Q?U:Q:W<Q?W:Q,$=ue<le?ue<he?ue:he:le<he?le:he,J=U>W?U>Q?U:Q:W>Q?W:Q,X=ue>le?ue>he?ue:he:le>he?le:he,oe=N.next;oe!==O;){if(oe.x>=G&&oe.x<=J&&oe.y>=$&&oe.y<=X&&l(U,ue,W,le,Q,he,oe.x,oe.y)&&w(oe.prev,oe,oe.next)>=0)return!1;oe=oe.next}return!0}function t(B,O,I,N){var U=B.prev,W=B,Q=B.next;if(w(U,W,Q)>=0)return!1;for(var ue=U.x,le=W.x,he=Q.x,G=U.y,$=W.y,J=Q.y,X=ue<le?ue<he?ue:he:le<he?le:he,oe=G<$?G<J?G:J:$<J?$:J,ie=ue>le?ue>he?ue:he:le>he?le:he,j=G>$?G>J?G:J:$>J?$:J,ee=v(X,oe,O,I,N),re=v(ie,j,O,I,N),ce=B.prevZ,be=B.nextZ;ce&&ce.z>=ee&&be&&be.z<=re;){if(ce.x>=X&&ce.x<=ie&&ce.y>=oe&&ce.y<=j&&ce!==U&&ce!==Q&&l(ue,G,le,$,he,J,ce.x,ce.y)&&w(ce.prev,ce,ce.next)>=0||(ce=ce.prevZ,be.x>=X&&be.x<=ie&&be.y>=oe&&be.y<=j&&be!==U&&be!==Q&&l(ue,G,le,$,he,J,be.x,be.y)&&w(be.prev,be,be.next)>=0))return!1;be=be.nextZ}for(;ce&&ce.z>=ee;){if(ce.x>=X&&ce.x<=ie&&ce.y>=oe&&ce.y<=j&&ce!==U&&ce!==Q&&l(ue,G,le,$,he,J,ce.x,ce.y)&&w(ce.prev,ce,ce.next)>=0)return!1;ce=ce.prevZ}for(;be&&be.z<=re;){if(be.x>=X&&be.x<=ie&&be.y>=oe&&be.y<=j&&be!==U&&be!==Q&&l(ue,G,le,$,he,J,be.x,be.y)&&w(be.prev,be,be.next)>=0)return!1;be=be.nextZ}return!0}function r(B,O,I){var N=B;do{var U=N.prev,W=N.next.next;!S(U,W)&&E(U,N,N.next,W)&&u(U,W)&&u(W,U)&&(O.push(U.i/I|0),O.push(N.i/I|0),O.push(W.i/I|0),L(N),L(N.next),N=B=W),N=N.next}while(N!==B);return A(N)}function o(B,O,I,N,U,W){var Q=B;do{for(var ue=Q.next.next;ue!==Q.prev;){if(Q.i!==ue.i&&_(Q,ue)){var le=h(Q,ue);Q=A(Q,Q.next),le=A(le,le.next),M(Q,O,I,N,U,W,0),M(le,O,I,N,U,W,0);return}ue=ue.next}Q=Q.next}while(Q!==B)}function a(B,O,I,N){var U=[],W,Q,ue,le,he;for(W=0,Q=O.length;W<Q;W++)ue=O[W]*N,le=W<Q-1?O[W+1]*N:B.length,he=x(B,ue,le,N,!1),he===he.next&&(he.steiner=!0),U.push(T(he));for(U.sort(i),W=0;W<U.length;W++)I=n(U[W],I);return I}function i(B,O){return B.x-O.x}function n(B,O){var I=s(B,O);if(!I)return O;var N=h(I,B);return A(N,N.next),A(I,I.next)}function s(B,O){var I=O,N=B.x,U=B.y,W=-1/0,Q;do{if(U<=I.y&&U>=I.next.y&&I.next.y!==I.y){var ue=I.x+(U-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(ue<=N&&ue>W&&(W=ue,Q=I.x<I.next.x?I:I.next,ue===N))return Q}I=I.next}while(I!==O);if(!Q)return null;var le=Q,he=Q.x,G=Q.y,$=1/0,J;I=Q;do N>=I.x&&I.x>=he&&N!==I.x&&l(U<G?N:W,U,he,G,U<G?W:N,U,I.x,I.y)&&(J=Math.abs(U-I.y)/(N-I.x),u(I,B)&&(J<$||J===$&&(I.x>Q.x||I.x===Q.x&&c(Q,I)))&&(Q=I,$=J)),I=I.next;while(I!==le);return Q}function c(B,O){return w(B.prev,B,O.prev)<0&&w(O.next,B,B.next)<0}function f(B,O,I,N){var U=B;do U.z===0&&(U.z=v(U.x,U.y,O,I,N)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,g(U)}function g(B){var O,I,N,U,W,Q,ue,le,he=1;do{for(I=B,B=null,W=null,Q=0;I;){for(Q++,N=I,ue=0,O=0;O<he&&(ue++,N=N.nextZ,!!N);O++);for(le=he;ue>0||le>0&&N;)ue!==0&&(le===0||!N||I.z<=N.z)?(U=I,I=I.nextZ,ue--):(U=N,N=N.nextZ,le--),W?W.nextZ=U:B=U,U.prevZ=W,W=U;I=N}W.nextZ=null,he*=2}while(Q>1);return B}function v(B,O,I,N,U){return B=(B-I)*U|0,O=(O-N)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,O=(O|O<<8)&16711935,O=(O|O<<4)&252645135,O=(O|O<<2)&858993459,O=(O|O<<1)&1431655765,B|O<<1}function T(B){var O=B,I=B;do(O.x<I.x||O.x===I.x&&O.y<I.y)&&(I=O),O=O.next;while(O!==B);return I}function l(B,O,I,N,U,W,Q,ue){return(U-Q)*(O-ue)>=(B-Q)*(W-ue)&&(B-Q)*(N-ue)>=(I-Q)*(O-ue)&&(I-Q)*(W-ue)>=(U-Q)*(N-ue)}function _(B,O){return B.next.i!==O.i&&B.prev.i!==O.i&&!p(B,O)&&(u(B,O)&&u(O,B)&&m(B,O)&&(w(B.prev,B,O.prev)||w(B,O.prev,O))||S(B,O)&&w(B.prev,B,B.next)>0&&w(O.prev,O,O.next)>0)}function w(B,O,I){return(O.y-B.y)*(I.x-O.x)-(O.x-B.x)*(I.y-O.y)}function S(B,O){return B.x===O.x&&B.y===O.y}function E(B,O,I,N){var U=b(w(B,O,I)),W=b(w(B,O,N)),Q=b(w(I,N,B)),ue=b(w(I,N,O));return!!(U!==W&&Q!==ue||U===0&&y(B,I,O)||W===0&&y(B,N,O)||Q===0&&y(I,B,N)||ue===0&&y(I,O,N))}function y(B,O,I){return O.x<=Math.max(B.x,I.x)&&O.x>=Math.min(B.x,I.x)&&O.y<=Math.max(B.y,I.y)&&O.y>=Math.min(B.y,I.y)}function b(B){return B>0?1:B<0?-1:0}function p(B,O){var I=B;do{if(I.i!==B.i&&I.next.i!==B.i&&I.i!==O.i&&I.next.i!==O.i&&E(I,I.next,B,O))return!0;I=I.next}while(I!==B);return!1}function u(B,O){return w(B.prev,B,B.next)<0?w(B,O,B.next)>=0&&w(B,B.prev,O)>=0:w(B,O,B.prev)<0||w(B,B.next,O)<0}function m(B,O){var I=B,N=!1,U=(B.x+O.x)/2,W=(B.y+O.y)/2;do I.y>W!=I.next.y>W&&I.next.y!==I.y&&U<(I.next.x-I.x)*(W-I.y)/(I.next.y-I.y)+I.x&&(N=!N),I=I.next;while(I!==B);return N}function h(B,O){var I=new z(B.i,B.x,B.y),N=new z(O.i,O.x,O.y),U=B.next,W=O.prev;return B.next=O,O.prev=B,I.next=U,U.prev=I,N.next=I,I.prev=N,W.next=N,N.prev=W,N}function P(B,O,I,N){var U=new z(B,O,I);return N?(U.next=N.next,U.prev=N,N.next.prev=U,N.next=U):(U.prev=U,U.next=U),U}function L(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function z(B,O,I){this.i=B,this.x=O,this.y=I,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}d.deviation=function(B,O,I,N){var U=O&&O.length,W=U?O[0]*I:B.length,Q=Math.abs(F(B,0,W,I));if(U)for(var ue=0,le=O.length;ue<le;ue++){var he=O[ue]*I,G=ue<le-1?O[ue+1]*I:B.length;Q-=Math.abs(F(B,he,G,I))}var $=0;for(ue=0;ue<N.length;ue+=3){var J=N[ue]*I,X=N[ue+1]*I,oe=N[ue+2]*I;$+=Math.abs((B[J]-B[oe])*(B[X+1]-B[J+1])-(B[J]-B[X])*(B[oe+1]-B[J+1]))}return Q===0&&$===0?0:Math.abs(($-Q)/Q)};function F(B,O,I,N){for(var U=0,W=O,Q=I-N;W<I;W+=N)U+=(B[Q]-B[W])*(B[W+1]+B[Q+1]),Q=W;return U}d.flatten=function(B){for(var O=B[0][0].length,I={vertices:[],holes:[],dimensions:O},N=0,U=0;U<B.length;U++){for(var W=0;W<B[U].length;W++)for(var Q=0;Q<O;Q++)I.vertices.push(B[U][W][Q]);U>0&&(N+=B[U-1].length,I.holes.push(N))}return I}}}),dj=Ze({"node_modules/array-normalize/index.js"(Z,q){"use strict";var d=vg();q.exports=x;function x(A,M,e){if(!A||A.length==null)throw Error("Argument should be an array");M==null&&(M=1),e==null&&(e=d(A,M));for(var t=0;t<M;t++){var r=e[M+t],o=e[t],a=t,i=A.length;if(r===1/0&&o===-1/0)for(a=t;a<i;a+=M)A[a]=A[a]===r?1:A[a]===o?0:.5;else if(r===1/0)for(a=t;a<i;a+=M)A[a]=A[a]===r?1:0;else if(o===-1/0)for(a=t;a<i;a+=M)A[a]=A[a]===o?0:1;else{var n=r-o;for(a=t;a<i;a+=M)isNaN(A[a])||(A[a]=n===0?.5:(A[a]-o)/n)}}return A}}}),vj=Ze({"node_modules/es6-weak-map/is-implemented.js"(Z,q){"use strict";q.exports=function(){var d,x;if(typeof WeakMap!="function")return!1;try{d=new WeakMap([[x={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(d)!=="[object WeakMap]"||typeof d.set!="function"||d.set({},1)!==d||typeof d.delete!="function"||typeof d.has!="function"||d.get(x)!=="one")}}}),mj=Ze({"node_modules/es5-ext/function/noop.js"(Z,q){"use strict";q.exports=function(){}}}),g0=Ze({"node_modules/es5-ext/object/is-value.js"(Z,q){"use strict";var d=mj()();q.exports=function(x){return x!==d&&x!==null}}}),HE=Ze({"node_modules/es5-ext/object/set-prototype-of/is-implemented.js"(Z,q){"use strict";var d=Object.create,x=Object.getPrototypeOf,A={};q.exports=function(){var M=Object.setPrototypeOf,e=arguments[0]||d;return typeof M!="function"?!1:x(M(e(null),A))===A}}}),WE=Ze({"node_modules/es5-ext/object/is-object.js"(Z,q){"use strict";var d=g0(),x={function:!0,object:!0};q.exports=function(A){return d(A)&&x[typeof A]||!1}}}),tm=Ze({"node_modules/es5-ext/object/valid-value.js"(Z,q){"use strict";var d=g0();q.exports=function(x){if(!d(x))throw new TypeError("Cannot use null or undefined");return x}}}),gj=Ze({"node_modules/es5-ext/object/create.js"(Z,q){"use strict";var d=Object.create,x;HE()()||(x=XE()),q.exports=function(){var A,M,e;return!x||x.level!==1?d:(A={},M={},e={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){if(t==="__proto__"){M[t]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}M[t]=e}),Object.defineProperties(A,M),Object.defineProperty(x,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:A}),function(t,r){return d(t===null?A:t,r)})}()}}),XE=Ze({"node_modules/es5-ext/object/set-prototype-of/shim.js"(Z,q){"use strict";var d=WE(),x=tm(),A=Object.prototype.isPrototypeOf,M=Object.defineProperty,e={configurable:!0,enumerable:!1,writable:!0,value:void 0},t;t=function(r,o){if(x(r),o===null||d(o))return r;throw new TypeError("Prototype must be null or an object")},q.exports=function(r){var o,a;return r?(r.level===2?r.set?(a=r.set,o=function(i,n){return a.call(t(i,n),n),i}):o=function(i,n){return t(i,n).__proto__=n,i}:o=function i(n,s){var c;return t(n,s),c=A.call(i.nullPolyfill,n),c&&delete i.nullPolyfill.__proto__,s===null&&(s=i.nullPolyfill),n.__proto__=s,c&&M(i.nullPolyfill,"__proto__",e),n},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r=Object.create(null),o={},a,i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(i){try{a=i.set,a.call(r,o)}catch{}if(Object.getPrototypeOf(r)===o)return{set:a,level:2}}return r.__proto__=o,Object.getPrototypeOf(r)===o?{level:2}:(r={},r.__proto__=o,Object.getPrototypeOf(r)===o?{level:1}:!1)}()),gj()}}),gT=Ze({"node_modules/es5-ext/object/set-prototype-of/index.js"(Z,q){"use strict";q.exports=HE()()?Object.setPrototypeOf:XE()}}),yj=Ze({"node_modules/es5-ext/object/valid-object.js"(Z,q){"use strict";var d=WE();q.exports=function(x){if(!d(x))throw new TypeError(x+" is not an Object");return x}}}),_j=Ze({"node_modules/es5-ext/string/random-uniq.js"(Z,q){"use strict";var d=Object.create(null),x=Math.random;q.exports=function(){var A;do A=x().toString(36).slice(2);while(d[A]);return A}}}),yg=Ze({"node_modules/type/value/is.js"(Z,q){"use strict";var d=void 0;q.exports=function(x){return x!==d&&x!==null}}}),yT=Ze({"node_modules/type/object/is.js"(Z,q){"use strict";var d=yg(),x={object:!0,function:!0,undefined:!0};q.exports=function(A){return d(A)?hasOwnProperty.call(x,typeof A):!1}}}),xj=Ze({"node_modules/type/prototype/is.js"(Z,q){"use strict";var d=yT();q.exports=function(x){if(!d(x))return!1;try{return x.constructor?x.constructor.prototype===x:!1}catch{return!1}}}}),bj=Ze({"node_modules/type/function/is.js"(Z,q){"use strict";var d=xj();q.exports=function(x){if(typeof x!="function"||!hasOwnProperty.call(x,"length"))return!1;try{if(typeof x.length!="number"||typeof x.call!="function"||typeof x.apply!="function")return!1}catch{return!1}return!d(x)}}}),ZE=Ze({"node_modules/type/plain-function/is.js"(Z,q){"use strict";var d=bj(),x=/^\s*class[\s{/}]/,A=Function.prototype.toString;q.exports=function(M){return!(!d(M)||x.test(A.call(M)))}}}),wj=Ze({"node_modules/es5-ext/object/assign/is-implemented.js"(Z,q){"use strict";q.exports=function(){var d=Object.assign,x;return typeof d!="function"?!1:(x={foo:"raz"},d(x,{bar:"dwa"},{trzy:"trzy"}),x.foo+x.bar+x.trzy==="razdwatrzy")}}}),Tj=Ze({"node_modules/es5-ext/object/keys/is-implemented.js"(Z,q){"use strict";q.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}}),Aj=Ze({"node_modules/es5-ext/object/keys/shim.js"(Z,q){"use strict";var d=g0(),x=Object.keys;q.exports=function(A){return x(d(A)?Object(A):A)}}}),Sj=Ze({"node_modules/es5-ext/object/keys/index.js"(Z,q){"use strict";q.exports=Tj()()?Object.keys:Aj()}}),Mj=Ze({"node_modules/es5-ext/object/assign/shim.js"(Z,q){"use strict";var d=Sj(),x=tm(),A=Math.max;q.exports=function(M,e){var t,r,o=A(arguments.length,2),a;for(M=Object(x(M)),a=function(i){try{M[i]=e[i]}catch(n){t||(t=n)}},r=1;r<o;++r)e=arguments[r],d(e).forEach(a);if(t!==void 0)throw t;return M}}}),_T=Ze({"node_modules/es5-ext/object/assign/index.js"(Z,q){"use strict";q.exports=wj()()?Object.assign:Mj()}}),YE=Ze({"node_modules/es5-ext/object/normalize-options.js"(Z,q){"use strict";var d=g0(),x=Array.prototype.forEach,A=Object.create,M=function(e,t){var r;for(r in e)t[r]=e[r]};q.exports=function(e){var t=A(null);return x.call(arguments,function(r){d(r)&&M(Object(r),t)}),t}}}),Ej=Ze({"node_modules/es5-ext/string/#/contains/is-implemented.js"(Z,q){"use strict";var d="razdwatrzy";q.exports=function(){return typeof d.contains!="function"?!1:d.contains("dwa")===!0&&d.contains("foo")===!1}}}),Cj=Ze({"node_modules/es5-ext/string/#/contains/shim.js"(Z,q){"use strict";var d=String.prototype.indexOf;q.exports=function(x){return d.call(this,x,arguments[1])>-1}}}),KE=Ze({"node_modules/es5-ext/string/#/contains/index.js"(Z,q){"use strict";q.exports=Ej()()?String.prototype.contains:Cj()}}),rm=Ze({"node_modules/d/index.js"(Z,q){"use strict";var d=yg(),x=ZE(),A=_T(),M=YE(),e=KE(),t=q.exports=function(r,o){var a,i,n,s,c;return arguments.length<2||typeof r!="string"?(s=o,o=r,r=null):s=arguments[2],d(r)?(a=e.call(r,"c"),i=e.call(r,"e"),n=e.call(r,"w")):(a=n=!0,i=!1),c={value:o,configurable:a,enumerable:i,writable:n},s?A(M(s),c):c};t.gs=function(r,o,a){var i,n,s,c;return typeof r!="string"?(s=a,a=o,o=r,r=null):s=arguments[3],d(o)?x(o)?d(a)?x(a)||(s=a,a=void 0):a=void 0:(s=o,o=a=void 0):o=void 0,d(r)?(i=e.call(r,"c"),n=e.call(r,"e")):(i=!0,n=!1),c={get:o,set:a,configurable:i,enumerable:n},s?A(M(s),c):c}}}),xx=Ze({"node_modules/es5-ext/function/is-arguments.js"(Z,q){"use strict";var d=Object.prototype.toString,x=d.call(function(){return arguments}());q.exports=function(A){return d.call(A)===x}}}),bx=Ze({"node_modules/es5-ext/string/is-string.js"(Z,q){"use strict";var d=Object.prototype.toString,x=d.call("");q.exports=function(A){return typeof A=="string"||A&&typeof A=="object"&&(A instanceof String||d.call(A)===x)||!1}}}),kj=Ze({"node_modules/ext/global-this/is-implemented.js"(Z,q){"use strict";q.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),Lj=Ze({"node_modules/ext/global-this/implementation.js"(Z,q){var d=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};q.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return d()}try{return __global__||d()}finally{delete Object.prototype.__global__}}()}}),wx=Ze({"node_modules/ext/global-this/index.js"(Z,q){"use strict";q.exports=kj()()?globalThis:Lj()}}),Pj=Ze({"node_modules/es6-symbol/is-implemented.js"(Z,q){"use strict";var d=wx(),x={object:!0,symbol:!0};q.exports=function(){var A=d.Symbol,M;if(typeof A!="function")return!1;M=A("test symbol");try{String(M)}catch{return!1}return!(!x[typeof A.iterator]||!x[typeof A.toPrimitive]||!x[typeof A.toStringTag])}}}),Ij=Ze({"node_modules/es6-symbol/is-symbol.js"(Z,q){"use strict";q.exports=function(d){return d?typeof d=="symbol"?!0:!d.constructor||d.constructor.name!=="Symbol"?!1:d[d.constructor.toStringTag]==="Symbol":!1}}}),JE=Ze({"node_modules/es6-symbol/validate-symbol.js"(Z,q){"use strict";var d=Ij();q.exports=function(x){if(!d(x))throw new TypeError(x+" is not a symbol");return x}}}),Rj=Ze({"node_modules/es6-symbol/lib/private/generate-name.js"(Z,q){"use strict";var d=rm(),x=Object.create,A=Object.defineProperty,M=Object.prototype,e=x(null);q.exports=function(t){for(var r=0,o,a;e[t+(r||"")];)++r;return t+=r||"",e[t]=!0,o="@@"+t,A(M,o,d.gs(null,function(i){a||(a=!0,A(this,o,d(i)),a=!1)})),o}}}),Dj=Ze({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(Z,q){"use strict";var d=rm(),x=wx().Symbol;q.exports=function(A){return Object.defineProperties(A,{hasInstance:d("",x&&x.hasInstance||A("hasInstance")),isConcatSpreadable:d("",x&&x.isConcatSpreadable||A("isConcatSpreadable")),iterator:d("",x&&x.iterator||A("iterator")),match:d("",x&&x.match||A("match")),replace:d("",x&&x.replace||A("replace")),search:d("",x&&x.search||A("search")),species:d("",x&&x.species||A("species")),split:d("",x&&x.split||A("split")),toPrimitive:d("",x&&x.toPrimitive||A("toPrimitive")),toStringTag:d("",x&&x.toStringTag||A("toStringTag")),unscopables:d("",x&&x.unscopables||A("unscopables"))})}}}),zj=Ze({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(Z,q){"use strict";var d=rm(),x=JE(),A=Object.create(null);q.exports=function(M){return Object.defineProperties(M,{for:d(function(e){return A[e]?A[e]:A[e]=M(String(e))}),keyFor:d(function(e){var t;x(e);for(t in A)if(A[t]===e)return t})})}}}),Fj=Ze({"node_modules/es6-symbol/polyfill.js"(Z,q){"use strict";var d=rm(),x=JE(),A=wx().Symbol,M=Rj(),e=Dj(),t=zj(),r=Object.create,o=Object.defineProperties,a=Object.defineProperty,i,n,s;if(typeof A=="function")try{String(A()),s=!0}catch{}else A=null;n=function(f){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return i(f)},q.exports=i=function c(f){var g;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?A(f):(g=r(n.prototype),f=f===void 0?"":String(f),o(g,{__description__:d("",f),__name__:d("",M(f))}))},e(i),t(i),o(n.prototype,{constructor:d(i),toString:d("",function(){return this.__name__})}),o(i.prototype,{toString:d(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:d(function(){return x(this)})}),a(i.prototype,i.toPrimitive,d("",function(){var c=x(this);return typeof c=="symbol"?c:c.toString()})),a(i.prototype,i.toStringTag,d("c","Symbol")),a(n.prototype,i.toStringTag,d("c",i.prototype[i.toStringTag])),a(n.prototype,i.toPrimitive,d("c",i.prototype[i.toPrimitive]))}}),y0=Ze({"node_modules/es6-symbol/index.js"(Z,q){"use strict";q.exports=Pj()()?wx().Symbol:Fj()}}),Oj=Ze({"node_modules/es5-ext/array/#/clear.js"(Z,q){"use strict";var d=tm();q.exports=function(){return d(this).length=0,this}}}),L1=Ze({"node_modules/es5-ext/object/valid-callable.js"(Z,q){"use strict";q.exports=function(d){if(typeof d!="function")throw new TypeError(d+" is not a function");return d}}}),Bj=Ze({"node_modules/type/string/coerce.js"(Z,q){"use strict";var d=yg(),x=yT(),A=Object.prototype.toString;q.exports=function(M){if(!d(M))return null;if(x(M)){var e=M.toString;if(typeof e!="function"||e===A)return null}try{return""+M}catch{return null}}}}),Nj=Ze({"node_modules/type/lib/safe-to-string.js"(Z,q){"use strict";q.exports=function(d){try{return d.toString()}catch{try{return String(d)}catch{return null}}}}}),Uj=Ze({"node_modules/type/lib/to-short-string.js"(Z,q){"use strict";var d=Nj(),x=/[\n\r\u2028\u2029]/g;q.exports=function(A){var M=d(A);return M===null?"<Non-coercible to string value>":(M.length>100&&(M=M.slice(0,99)+"\u2026"),M=M.replace(x,function(e){switch(e){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),M)}}}),$E=Ze({"node_modules/type/lib/resolve-exception.js"(Z,q){"use strict";var d=yg(),x=yT(),A=Bj(),M=Uj(),e=function(t,r){return t.replace("%v",M(r))};q.exports=function(t,r,o){if(!x(o))throw new TypeError(e(r,t));if(!d(t)){if("default"in o)return o.default;if(o.isOptional)return null}var a=A(o.errorMessage);throw d(a)||(a=r),new TypeError(e(a,t))}}}),jj=Ze({"node_modules/type/value/ensure.js"(Z,q){"use strict";var d=$E(),x=yg();q.exports=function(A){return x(A)?A:d(A,"Cannot use %v",arguments[1])}}}),qj=Ze({"node_modules/type/plain-function/ensure.js"(Z,q){"use strict";var d=$E(),x=ZE();q.exports=function(A){return x(A)?A:d(A,"%v is not a plain function",arguments[1])}}}),Vj=Ze({"node_modules/es5-ext/array/from/is-implemented.js"(Z,q){"use strict";q.exports=function(){var d=Array.from,x,A;return typeof d!="function"?!1:(x=["raz","dwa"],A=d(x),!!(A&&A!==x&&A[1]==="dwa"))}}}),Gj=Ze({"node_modules/es5-ext/function/is-function.js"(Z,q){"use strict";var d=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);q.exports=function(A){return typeof A=="function"&&x(d.call(A))}}}),Hj=Ze({"node_modules/es5-ext/math/sign/is-implemented.js"(Z,q){"use strict";q.exports=function(){var d=Math.sign;return typeof d!="function"?!1:d(10)===1&&d(-20)===-1}}}),Wj=Ze({"node_modules/es5-ext/math/sign/shim.js"(Z,q){"use strict";q.exports=function(d){return d=Number(d),isNaN(d)||d===0?d:d>0?1:-1}}}),Xj=Ze({"node_modules/es5-ext/math/sign/index.js"(Z,q){"use strict";q.exports=Hj()()?Math.sign:Wj()}}),Zj=Ze({"node_modules/es5-ext/number/to-integer.js"(Z,q){"use strict";var d=Xj(),x=Math.abs,A=Math.floor;q.exports=function(M){return isNaN(M)?0:(M=Number(M),M===0||!isFinite(M)?M:d(M)*A(x(M)))}}}),Yj=Ze({"node_modules/es5-ext/number/to-pos-integer.js"(Z,q){"use strict";var d=Zj(),x=Math.max;q.exports=function(A){return x(0,d(A))}}}),Kj=Ze({"node_modules/es5-ext/array/from/shim.js"(Z,q){"use strict";var d=y0().iterator,x=xx(),A=Gj(),M=Yj(),e=L1(),t=tm(),r=g0(),o=bx(),a=Array.isArray,i=Function.prototype.call,n={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;q.exports=function(c){var f=arguments[1],g=arguments[2],v,T,l,_,w,S,E,y,b,p;if(c=Object(t(c)),r(f)&&e(f),!this||this===Array||!A(this)){if(!f){if(x(c))return w=c.length,w!==1?Array.apply(null,c):(_=new Array(1),_[0]=c[0],_);if(a(c)){for(_=new Array(w=c.length),T=0;T<w;++T)_[T]=c[T];return _}}_=[]}else v=this;if(!a(c)){if((b=c[d])!==void 0){for(E=e(b).call(c),v&&(_=new v),y=E.next(),T=0;!y.done;)p=f?i.call(f,g,y.value,T):y.value,v?(n.value=p,s(_,T,n)):_[T]=p,y=E.next(),++T;w=T}else if(o(c)){for(w=c.length,v&&(_=new v),T=0,l=0;T<w;++T)p=c[T],T+1<w&&(S=p.charCodeAt(0),S>=55296&&S<=56319&&(p+=c[++T])),p=f?i.call(f,g,p,l):p,v?(n.value=p,s(_,l,n)):_[l]=p,++l;w=l}}if(w===void 0)for(w=M(c.length),v&&(_=new v(w)),T=0;T<w;++T)p=f?i.call(f,g,c[T],T):c[T],v?(n.value=p,s(_,T,n)):_[T]=p;return v&&(n.value=null,_.length=w),_}}}),Jj=Ze({"node_modules/es5-ext/array/from/index.js"(Z,q){"use strict";q.exports=Vj()()?Array.from:Kj()}}),$j=Ze({"node_modules/es5-ext/object/copy.js"(Z,q){"use strict";var d=Jj(),x=_T(),A=tm();q.exports=function(M){var e=Object(A(M)),t=arguments[1],r=Object(arguments[2]);if(e!==M&&!t)return e;var o={};return t?d(t,function(a){(r.ensure||a in M)&&(o[a]=M[a])}):x(o,M),o}}}),Qj=Ze({"node_modules/es5-ext/object/_iterate.js"(Z,q){"use strict";var d=L1(),x=tm(),A=Function.prototype.bind,M=Function.prototype.call,e=Object.keys,t=Object.prototype.propertyIsEnumerable;q.exports=function(r,o){return function(a,i){var n,s=arguments[2],c=arguments[3];return a=Object(x(a)),d(i),n=e(a),c&&n.sort(typeof c=="function"?A.call(c,a):void 0),typeof r!="function"&&(r=n[r]),M.call(r,n,function(f,g){return t.call(a,f)?M.call(i,s,a[f],f,a,g):o})}}}}),eq=Ze({"node_modules/es5-ext/object/for-each.js"(Z,q){"use strict";q.exports=Qj()("forEach")}}),tq=Ze({"node_modules/es5-ext/object/map.js"(Z,q){"use strict";var d=L1(),x=eq(),A=Function.prototype.call;q.exports=function(M,e){var t={},r=arguments[2];return d(e),x(M,function(o,a,i,n){t[a]=A.call(e,r,o,a,i,n)}),t}}}),rq=Ze({"node_modules/d/auto-bind.js"(Z,q){"use strict";var d=yg(),x=jj(),A=qj(),M=$j(),e=YE(),t=tq(),r=Function.prototype.bind,o=Object.defineProperty,a=Object.prototype.hasOwnProperty,i;i=function(n,s,c){var f=x(s)&&A(s.value),g;return g=M(s),delete g.writable,delete g.value,g.get=function(){return!c.overwriteDefinition&&a.call(this,n)?f:(s.value=r.call(f,c.resolveContext?c.resolveContext(this):this),o(this,n,s),this[n])},g},q.exports=function(n){var s=e(arguments[1]);return d(s.resolveContext)&&A(s.resolveContext),t(n,function(c,f){return i(f,c,s)})}}}),QE=Ze({"node_modules/es6-iterator/index.js"(Z,q){"use strict";var d=Oj(),x=_T(),A=L1(),M=tm(),e=rm(),t=rq(),r=y0(),o=Object.defineProperty,a=Object.defineProperties,i;q.exports=i=function(n,s){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");a(this,{__list__:e("w",M(n)),__context__:e("w",s),__nextIndex__:e("w",0)}),s&&(A(s.on),s.on("_add",this._onAdd),s.on("_delete",this._onDelete),s.on("_clear",this._onClear))},delete i.prototype.constructor,a(i.prototype,x({_next:e(function(){var n;if(this.__list__){if(this.__redo__&&(n=this.__redo__.shift(),n!==void 0))return n;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:e(function(){return this._createResult(this._next())}),_createResult:e(function(n){return n===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(n)}}),_resolve:e(function(n){return this.__list__[n]}),_unBind:e(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:e(function(){return"[object "+(this[r.toStringTag]||"Object")+"]"})},t({_onAdd:e(function(n){if(!(n>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){o(this,"__redo__",e("c",[n]));return}this.__redo__.forEach(function(s,c){s>=n&&(this.__redo__[c]=++s)},this),this.__redo__.push(n)}}),_onDelete:e(function(n){var s;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(n),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,f){c>n&&(this.__redo__[f]=--c)},this)))}),_onClear:e(function(){this.__redo__&&d.call(this.__redo__),this.__nextIndex__=0})}))),o(i.prototype,r.iterator,e(function(){return this}))}}),aq=Ze({"node_modules/es6-iterator/array.js"(Z,q){"use strict";var d=gT(),x=KE(),A=rm(),M=y0(),e=QE(),t=Object.defineProperty,r;r=q.exports=function(o,a){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e.call(this,o),a?x.call(a,"key+value")?a="key+value":x.call(a,"key")?a="key":a="value":a="value",t(this,"__kind__",A("",a))},d&&d(r,e),delete r.prototype.constructor,r.prototype=Object.create(e.prototype,{_resolve:A(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),t(r.prototype,M.toStringTag,A("c","Array Iterator"))}}),iq=Ze({"node_modules/es6-iterator/string.js"(Z,q){"use strict";var d=gT(),x=rm(),A=y0(),M=QE(),e=Object.defineProperty,t;t=q.exports=function(r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");r=String(r),M.call(this,r),e(this,"__length__",x("",r.length))},d&&d(t,M),delete t.prototype.constructor,t.prototype=Object.create(M.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:x(function(r){var o=this.__list__[r],a;return this.__nextIndex__===this.__length__?o:(a=o.charCodeAt(0),a>=55296&&a<=56319?o+this.__list__[this.__nextIndex__++]:o)})}),e(t.prototype,A.toStringTag,x("c","String Iterator"))}}),nq=Ze({"node_modules/es6-iterator/is-iterable.js"(Z,q){"use strict";var d=xx(),x=g0(),A=bx(),M=y0().iterator,e=Array.isArray;q.exports=function(t){return x(t)?e(t)||A(t)||d(t)?!0:typeof t[M]=="function":!1}}}),oq=Ze({"node_modules/es6-iterator/valid-iterable.js"(Z,q){"use strict";var d=nq();q.exports=function(x){if(!d(x))throw new TypeError(x+" is not iterable");return x}}}),e6=Ze({"node_modules/es6-iterator/get.js"(Z,q){"use strict";var d=xx(),x=bx(),A=aq(),M=iq(),e=oq(),t=y0().iterator;q.exports=function(r){return typeof e(r)[t]=="function"?r[t]():d(r)?new A(r):x(r)?new M(r):new A(r)}}}),sq=Ze({"node_modules/es6-iterator/for-of.js"(Z,q){"use strict";var d=xx(),x=L1(),A=bx(),M=e6(),e=Array.isArray,t=Function.prototype.call,r=Array.prototype.some;q.exports=function(o,a){var i,n=arguments[2],s,c,f,g,v,T,l;if(e(o)||d(o)?i="array":A(o)?i="string":o=M(o),x(a),c=function(){f=!0},i==="array"){r.call(o,function(_){return t.call(a,n,_,c),f});return}if(i==="string"){for(v=o.length,g=0;g<v&&(T=o[g],g+1<v&&(l=T.charCodeAt(0),l>=55296&&l<=56319&&(T+=o[++g])),t.call(a,n,T,c),!f);++g);return}for(s=o.next();!s.done;){if(t.call(a,n,s.value,c),f)return;s=o.next()}}}}),lq=Ze({"node_modules/es6-weak-map/is-native-implemented.js"(Z,q){"use strict";q.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),uq=Ze({"node_modules/es6-weak-map/polyfill.js"(Z,q){"use strict";var d=g0(),x=gT(),A=yj(),M=tm(),e=_j(),t=rm(),r=e6(),o=sq(),a=y0().toStringTag,i=lq(),n=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,f=Object.getPrototypeOf,g;q.exports=g=function(){var v=arguments[0],T;if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");return T=i&&x&&WeakMap!==g?x(new WeakMap,f(this)):this,d(v)&&(n(v)||(v=r(v))),s(T,"__weakMapData__",t("c","$weakMap$"+e())),v&&o(v,function(l){M(l),T.set(l[0],l[1])}),T},i&&(x&&x(g,WeakMap),g.prototype=Object.create(WeakMap.prototype,{constructor:t(g)})),Object.defineProperties(g.prototype,{delete:t(function(v){return c.call(A(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:t(function(v){if(c.call(A(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:t(function(v){return c.call(A(v),this.__weakMapData__)}),set:t(function(v,T){return s(A(v),this.__weakMapData__,t("c",T)),this}),toString:t(function(){return"[object WeakMap]"})}),s(g.prototype,a,t("c","WeakMap"))}}),t6=Ze({"node_modules/es6-weak-map/index.js"(Z,q){"use strict";q.exports=vj()()?WeakMap:uq()}}),cq=Ze({"node_modules/array-find-index/index.js"(Z,q){"use strict";q.exports=function(d,x,A){if(typeof Array.prototype.findIndex=="function")return d.findIndex(x,A);if(typeof x!="function")throw new TypeError("predicate must be a function");var M=Object(d),e=M.length;if(e===0)return-1;for(var t=0;t<e;t++)if(x.call(A,M[t],t,M))return t;return-1}}}),r6=Ze({"node_modules/regl-line2d/index.js"(Z,q){"use strict";var d=h0(),x=vg(),A=sh(),M=Ev(),e=mg(),t=pj(),r=dj(),{float32:o,fract32:a}=mT(),i=t6(),n=k1(),s=cq(),c=`
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.;
}
`,f=`
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;
}
`,g=`
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;
}
`,v=`
precision highp float;
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}
`,T=`
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;
}
}
}
`,l=`
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;
}
`;q.exports=_;function _(w,S){if(!(this instanceof _))return new _(w,S);if(typeof w=="function"?(S||(S={}),S.regl=w):S=w,S.length&&(S.positions=S),w=S.regl,!w.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=w._gl,this.regl=w,this.passes=[],this.shaders=_.shaders.has(w)?_.shaders.get(w):_.shaders.set(w,_.createShaders(w)).get(w),this.update(S)}_.dashMult=2,_.maxPatternLength=256,_.precisionThreshold=3e6,_.maxPoints=1e4,_.maxLines=2048,_.shaders=new i,_.createShaders=function(w){let S=w.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),E={primitive:"triangle strip",instances:w.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,m)=>m.join==="round"?2:1,miterLimit:w.prop("miterLimit"),scale:w.prop("scale"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),thickness:w.prop("thickness"),dashTexture:w.prop("dashTexture"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),dashLength:w.prop("dashLength"),viewport:(u,m)=>[m.viewport.x,m.viewport.y,u.viewportWidth,u.viewportHeight],depth:w.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:(u,m)=>!m.overlay},stencil:{enable:!1},scissor:{enable:!0,box:w.prop("viewport")},viewport:w.prop("viewport")},y=w(A({vert:c,frag:f,attributes:{lineEnd:{buffer:S,divisor:0,stride:8,offset:0},lineTop:{buffer:S,divisor:0,stride:8,offset:4},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},E)),b;try{b=w(A({cull:{enable:!0,face:"back"},vert:T,frag:l,attributes:{lineEnd:{buffer:S,divisor:0,stride:8,offset:0},lineTop:{buffer:S,divisor:0,stride:8,offset:4},aColor:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:w.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},E))}catch{b=y}return{fill:w({primitive:"triangle",elements:(u,m)=>m.triangles,offset:0,vert:g,frag:v,uniforms:{scale:w.prop("scale"),color:w.prop("fill"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),viewport:(u,m)=>[m.viewport.x,m.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:w.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8}},blend:E.blend,depth:{enable:!1},scissor:E.scissor,stencil:E.stencil,viewport:E.viewport}),rect:y,miter:b}},_.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},_.prototype.render=function(...w){w.length&&this.update(...w),this.draw()},_.prototype.draw=function(...w){return(w.length?w:this.passes).forEach((S,E)=>{if(S&&Array.isArray(S))return this.draw(...S);typeof S=="number"&&(S=this.passes[S]),S&&S.count>1&&S.opacity&&(this.regl._refresh(),S.fill&&S.triangles&&S.triangles.length>2&&this.shaders.fill(S),S.thickness&&(S.scale[0]*S.viewport.width>_.precisionThreshold||S.scale[1]*S.viewport.height>_.precisionThreshold?this.shaders.rect(S):S.join==="rect"||!S.join&&(S.thickness<=2||S.count>=_.maxPoints)?this.shaders.rect(S):this.shaders.miter(S)))}),this},_.prototype.update=function(w){if(!w)return;w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);let{regl:S,gl:E}=this;if(w.forEach((b,p)=>{let u=this.passes[p];if(b!==void 0){if(b===null){this.passes[p]=null;return}if(typeof b[0]=="number"&&(b={positions:b}),b=M(b,{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"}),u||(this.passes[p]=u={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:S.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:S.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:S.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:S.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},b=A({},_.defaults,b)),b.thickness!=null&&(u.thickness=parseFloat(b.thickness)),b.opacity!=null&&(u.opacity=parseFloat(b.opacity)),b.miterLimit!=null&&(u.miterLimit=parseFloat(b.miterLimit)),b.overlay!=null&&(u.overlay=!!b.overlay,p<_.maxLines&&(u.depth=2*(_.maxLines-1-p%_.maxLines)/_.maxLines-1)),b.join!=null&&(u.join=b.join),b.hole!=null&&(u.hole=b.hole),b.fill!=null&&(u.fill=b.fill?d(b.fill,"uint8"):null),b.viewport!=null&&(u.viewport=n(b.viewport)),u.viewport||(u.viewport=n([E.drawingBufferWidth,E.drawingBufferHeight])),b.close!=null&&(u.close=b.close),b.positions===null&&(b.positions=[]),b.positions){let P,L;if(b.positions.x&&b.positions.y){let O=b.positions.x,I=b.positions.y;L=u.count=Math.max(O.length,I.length),P=new Float64Array(L*2);for(let N=0;N<L;N++)P[N*2]=O[N],P[N*2+1]=I[N]}else P=e(b.positions,"float64"),L=u.count=Math.floor(P.length/2);let z=u.bounds=x(P,2);if(u.fill){let O=[],I={},N=0;for(let U=0,W=0,Q=u.count;U<Q;U++){let ue=P[U*2],le=P[U*2+1];isNaN(ue)||isNaN(le)||ue==null||le==null?(ue=P[N*2],le=P[N*2+1],I[U]=N):N=U,O[W++]=ue,O[W++]=le}if(b.splitNull){u.count-1 in I||(I[u.count]=u.count-1);let U=Object.keys(I).map(Number).sort((le,he)=>le-he),W=[],Q=0,ue=u.hole!=null?u.hole[0]:null;if(ue!=null){let le=s(U,he=>he>=ue);U=U.slice(0,le),U.push(ue)}for(let le=0;le<U.length;le++){let he=O.slice(Q*2,U[le]*2).concat(ue?O.slice(ue*2):[]),G=(u.hole||[]).map(J=>J-ue+(U[le]-Q)),$=t(he,G);$=$.map(J=>J+Q+(J+Q<U[le]?0:ue-U[le])),W.push(...$),Q=U[le]+1}for(let le=0,he=W.length;le<he;le++)I[W[le]]!=null&&(W[le]=I[W[le]]);u.triangles=W}else{let U=t(O,u.hole||[]);for(let W=0,Q=U.length;W<Q;W++)I[U[W]]!=null&&(U[W]=I[U[W]]);u.triangles=U}}let F=new Float64Array(P);r(F,2,z);let B=new Float64Array(L*2+6);u.close?P[0]===P[L*2-2]&&P[1]===P[L*2-1]?(B[0]=F[L*2-4],B[1]=F[L*2-3]):(B[0]=F[L*2-2],B[1]=F[L*2-1]):(B[0]=F[0],B[1]=F[1]),B.set(F,2),u.close?P[0]===P[L*2-2]&&P[1]===P[L*2-1]?(B[L*2+2]=F[2],B[L*2+3]=F[3],u.count-=1):(B[L*2+2]=F[0],B[L*2+3]=F[1],B[L*2+4]=F[2],B[L*2+5]=F[3]):(B[L*2+2]=F[L*2-2],B[L*2+3]=F[L*2-1],B[L*2+4]=F[L*2-2],B[L*2+5]=F[L*2-1]);var m=o(B);u.positionBuffer(m);var h=a(B,m);u.positionFractBuffer(h)}if(b.range?u.range=b.range:u.range||(u.range=u.bounds),(b.range||b.positions)&&u.count){let P=u.bounds,L=P[2]-P[0],z=P[3]-P[1],F=u.range[2]-u.range[0],B=u.range[3]-u.range[1];u.scale=[L/F,z/B],u.translate=[-u.range[0]/F+P[0]/F||0,-u.range[1]/B+P[1]/B||0],u.scaleFract=a(u.scale),u.translateFract=a(u.translate)}if(b.dashes){let P=0,L;if(!b.dashes||b.dashes.length<2)P=1,L=new Uint8Array([255,255,255,255,255,255,255,255]);else{P=0;for(let B=0;B<b.dashes.length;++B)P+=b.dashes[B];L=new Uint8Array(P*_.dashMult);let z=0,F=255;for(let B=0;B<2;B++)for(let O=0;O<b.dashes.length;++O){for(let I=0,N=b.dashes[O]*_.dashMult*.5;I<N;++I)L[z++]=F;F^=255}}u.dashLength=P,u.dashTexture({channels:1,data:L,width:L.length,height:1,mag:"linear",min:"linear"},0,0)}if(b.color){let P=u.count,L=b.color;L||(L="transparent");let z=new Uint8Array(P*4+4);if(!Array.isArray(L)||typeof L[0]=="number"){let F=d(L,"uint8");for(let B=0;B<P+1;B++)z.set(F,B*4)}else{for(let F=0;F<P;F++){let B=d(L[F],"uint8");z.set(B,F*4)}z.set(d(L[0],"uint8"),P*4)}u.colorBuffer({usage:"dynamic",type:"uint8",data:z})}}}),w.length<this.passes.length){for(let b=w.length;b<this.passes.length;b++){let p=this.passes[b];p&&(p.colorBuffer.destroy(),p.positionBuffer.destroy(),p.dashTexture.destroy())}this.passes.length=w.length}let y=[];for(let b=0;b<this.passes.length;b++)this.passes[b]!==null&&y.push(this.passes[b]);return this.passes=y,this},_.prototype.destroy=function(){return this.passes.forEach(w=>{w.colorBuffer.destroy(),w.positionBuffer.destroy(),w.dashTexture.destroy()}),this.passes.length=0,this}}}),fq=Ze({"node_modules/regl-error2d/index.js"(Z,q){"use strict";var d=vg(),x=h0(),A=VE(),M=Ev(),e=sh(),t=mg(),{float32:r,fract32:o}=mT();q.exports=i;var a=[[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 i(n,s){if(typeof n=="function"?(s||(s={}),s.regl=n):s=n,s.length&&(s.positions=s),n=s.regl,!n.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=n._gl,f,g,v,T,l,_,w={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},S=[];return T=n.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),g=n.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=n.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=n.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),_=n.buffer({usage:"static",type:"float",data:a}),p(s),f=n({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:n.prop("range"),lineWidth:n.prop("lineWidth"),capSize:n.prop("capSize"),opacity:n.prop("opacity"),scale:n.prop("scale"),translate:n.prop("translate"),scaleFract:n.prop("scaleFract"),translateFract:n.prop("translateFract"),viewport:(m,h)=>[h.viewport.x,h.viewport.y,m.viewportWidth,m.viewportHeight]},attributes:{color:{buffer:T,offset:(m,h)=>h.offset*4,divisor:1},position:{buffer:g,offset:(m,h)=>h.offset*8,divisor:1},positionFract:{buffer:v,offset:(m,h)=>h.offset*8,divisor:1},error:{buffer:l,offset:(m,h)=>h.offset*16,divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,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:n.prop("viewport")},viewport:n.prop("viewport"),stencil:!1,instances:n.prop("count"),count:a.length}),e(E,{update:p,draw:y,destroy:u,regl:n,gl:c,canvas:c.canvas,groups:S}),E;function E(m){m?p(m):m===null&&u(),y()}function y(m){if(typeof m=="number")return b(m);m&&!Array.isArray(m)&&(m=[m]),n._refresh(),S.forEach((h,P)=>{if(h){if(m&&(m[P]?h.draw=!0:h.draw=!1),!h.draw){h.draw=!0;return}b(P)}})}function b(m){typeof m=="number"&&(m=S[m]),m!=null&&m&&m.count&&m.color&&m.opacity&&m.positions&&m.positions.length>1&&(m.scaleRatio=[m.scale[0]*m.viewport.width,m.scale[1]*m.viewport.height],f(m),m.after&&m.after(m))}function p(m){if(!m)return;m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);let h=0,P=0;if(E.groups=S=m.map((F,B)=>{let O=S[B];if(F)typeof F=="function"?F={after:F}:typeof F[0]=="number"&&(F={positions:F});else return O;return F=M(F,{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"}),O||(S[B]=O={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},F=e({},w,F)),A(O,F,[{lineWidth:I=>+I*.5,capSize:I=>+I*.5,opacity:parseFloat,errors:I=>(I=t(I),P+=I.length,I),positions:(I,N)=>(I=t(I,"float64"),N.count=Math.floor(I.length/2),N.bounds=d(I,2),N.offset=h,h+=N.count,I)},{color:(I,N)=>{let U=N.count;if(I||(I="transparent"),!Array.isArray(I)||typeof I[0]=="number"){let Q=I;I=Array(U);for(let ue=0;ue<U;ue++)I[ue]=Q}if(I.length<U)throw Error("Not enough colors");let W=new Uint8Array(U*4);for(let Q=0;Q<U;Q++){let ue=x(I[Q],"uint8");W.set(ue,Q*4)}return W},range:(I,N,U)=>{let W=N.bounds;return I||(I=W),N.scale=[1/(I[2]-I[0]),1/(I[3]-I[1])],N.translate=[-I[0],-I[1]],N.scaleFract=o(N.scale),N.translateFract=o(N.translate),I},viewport:I=>{let N;return Array.isArray(I)?N={x:I[0],y:I[1],width:I[2]-I[0],height:I[3]-I[1]}:I?(N={x:I.x||I.left||0,y:I.y||I.top||0},I.right?N.width=I.right-N.x:N.width=I.w||I.width||0,I.bottom?N.height=I.bottom-N.y:N.height=I.h||I.height||0):N={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},N}}]),O}),h||P){let F=S.reduce((N,U,W)=>N+(U?U.count:0),0),B=new Float64Array(F*2),O=new Uint8Array(F*4),I=new Float32Array(F*4);S.forEach((N,U)=>{if(!N)return;let{positions:W,count:Q,offset:ue,color:le,errors:he}=N;Q&&(O.set(le,ue*4),I.set(he,ue*4),B.set(W,ue*2))});var L=r(B);g(L);var z=o(B,L);v(z),T(O),l(I)}}function u(){g.destroy(),v.destroy(),T.destroy(),l.destroy(),_.destroy()}}}}),hq=Ze({"node_modules/unquote/index.js"(Z,q){var d=/[\'\"]/;q.exports=function(A){return A?(d.test(A.charAt(0))&&(A=A.substr(1)),d.test(A.charAt(A.length-1))&&(A=A.substr(0,A.length-1)),A):""}}}),a6=Ze({"node_modules/css-global-keywords/index.json"(Z,q){q.exports=["inherit","initial","unset"]}}),i6=Ze({"node_modules/css-system-font-keywords/index.json"(Z,q){q.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),n6=Ze({"node_modules/css-font-weight-keywords/index.json"(Z,q){q.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),o6=Ze({"node_modules/css-font-style-keywords/index.json"(Z,q){q.exports=["normal","italic","oblique"]}}),s6=Ze({"node_modules/css-font-stretch-keywords/index.json"(Z,q){q.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),pq=Ze({"node_modules/parenthesis/index.js"(Z,q){"use strict";function d(M,e){if(typeof M!="string")return[M];var t=[M];typeof e=="string"||Array.isArray(e)?e={brackets:e}:e||(e={});var r=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],o=e.escape||"___",a=!!e.flat;r.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function g(v,T,l){var _=t.push(v.slice(s[0].length,-s[1].length))-1;return f.push(_),o+_+o}t.forEach(function(v,T){for(var l,_=0;v!=l;)if(l=v,v=v.replace(c,g),_++>1e4)throw Error("References have circular dependency. Please, check them.");t[T]=v}),f=f.reverse(),t=t.map(function(v){return f.forEach(function(T){v=v.replace(new RegExp("(\\"+o+T+"\\"+o+")","g"),s[0]+"$1"+s[1])}),v})});var i=new RegExp("\\"+o+"([0-9]+)\\"+o);function n(s,c,f){for(var g=[],v,T=0;v=i.exec(s);){if(T++>1e4)throw Error("Circular references in parenthesis");g.push(s.slice(0,v.index)),g.push(n(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return g.push(s),g}return a?t:n(t[0],t)}function x(M,e){if(e&&e.flat){var t=e&&e.escape||"___",r=M[0],o;if(!r)return"";for(var a=new RegExp("\\"+t+"([0-9]+)\\"+t),i=0;r!=o;){if(i++>1e4)throw Error("Circular references in "+M);o=r,r=r.replace(a,n)}return r}return M.reduce(function s(c,f){return Array.isArray(f)&&(f=f.reduce(s,"")),c+f},"");function n(s,c){if(M[c]==null)throw Error("Reference "+c+"is undefined");return M[c]}}function A(M,e){return Array.isArray(M)?x(M,e):d(M,e)}A.parse=d,A.stringify=x,q.exports=A}}),dq=Ze({"node_modules/string-split-by/index.js"(Z,q){"use strict";var d=pq();q.exports=function(A,M,e){if(A==null)throw Error("First argument should be a string");if(M==null)throw Error("Separator should be a string or a RegExp");e?(typeof e=="string"||Array.isArray(e))&&(e={ignore:e}):e={},e.escape==null&&(e.escape=!0),e.ignore==null?e.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof e.ignore=="string"&&(e.ignore=[e.ignore]),e.ignore=e.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var t=d.parse(A,{flat:!0,brackets:e.ignore}),r=t[0],o=r.split(M);if(e.escape){for(var a=[],i=0;i<o.length;i++){var n=o[i],s=o[i+1];n[n.length-1]==="\\"&&n[n.length-2]!=="\\"?(a.push(n+M+s),i++):a.push(n)}o=a}for(var i=0;i<o.length;i++)t[0]=o[i],o[i]=d.stringify(t,{flat:!0});return o}}}),vq=Ze({"node_modules/css-font-size-keywords/index.json"(Z,q){q.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}}),l6=Ze({"node_modules/css-font/lib/util.js"(Z,q){"use strict";var d=vq();q.exports={isSize:function(A){return/^[\d\.]/.test(A)||A.indexOf("/")!==-1||d.indexOf(A)!==-1}}}}),mq=Ze({"node_modules/css-font/parse.js"(Z,q){"use strict";var d=hq(),x=a6(),A=i6(),M=n6(),e=o6(),t=s6(),r=dq(),o=l6().isSize;q.exports=i;var a=i.cache={};function i(s){if(typeof s!="string")throw new Error("Font argument must be a string.");if(a[s])return a[s];if(s==="")throw new Error("Cannot parse an empty string.");if(A.indexOf(s)!==-1)return a[s]={system:s};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=r(s,/\s+/),g;g=f.shift();){if(x.indexOf(g)!==-1)return["style","variant","weight","stretch"].forEach(function(T){c[T]=g}),a[s]=c;if(e.indexOf(g)!==-1){c.style=g;continue}if(g==="normal"||g==="small-caps"){c.variant=g;continue}if(t.indexOf(g)!==-1){c.stretch=g;continue}if(M.indexOf(g)!==-1){c.weight=g;continue}if(o(g)){var v=r(g,"/");if(c.size=v[0],v[1]!=null?c.lineHeight=n(v[1]):f[0]==="/"&&(f.shift(),c.lineHeight=n(f.shift())),!f.length)throw new Error("Missing required font-family.");return c.family=r(f.join(" "),/\s*,\s*/).map(d),a[s]=c}throw new Error("Unknown or unsupported font token: "+g)}throw new Error("Missing required font-size.")}function n(s){var c=parseFloat(s);return c.toString()===s?c:s}}}),u6=Ze({"node_modules/css-font/stringify.js"(Z,q){"use strict";var d=Ev(),x=l6().isSize,A=s(a6()),M=s(i6()),e=s(n6()),t=s(o6()),r=s(s6()),o={normal:1,"small-caps":1},a={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},i={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};q.exports=function(f){if(f=d(f,{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"}),f.system)return f.system&&n(f.system,M),f.system;if(n(f.style,t),n(f.variant,o),n(f.weight,e),n(f.stretch,r),f.size==null&&(f.size=i.size),typeof f.size=="number"&&(f.size+="px"),!x)throw Error("Bad size value `"+f.size+"`");f.family||(f.family=i.family),Array.isArray(f.family)&&(f.family.length||(f.family=[i.family]),f.family=f.family.map(function(v){return a[v]?v:'"'+v+'"'}).join(", "));var g=[];return g.push(f.style),f.variant!==f.style&&g.push(f.variant),f.weight!==f.variant&&f.weight!==f.style&&g.push(f.weight),f.stretch!==f.weight&&f.stretch!==f.variant&&f.stretch!==f.style&&g.push(f.stretch),g.push(f.size+(f.lineHeight==null||f.lineHeight==="normal"||f.lineHeight+""=="1"?"":"/"+f.lineHeight)),g.push(f.family),g.filter(Boolean).join(" ")};function n(c,f){if(c&&!f[c]&&!A[c])throw Error("Unknown keyword `"+c+"`");return c}function s(c){for(var f={},g=0;g<c.length;g++)f[c[g]]=1;return f}}}),gq=Ze({"node_modules/css-font/index.js"(Z,q){"use strict";q.exports={parse:mq(),stringify:u6()}}}),yq=Ze({"node_modules/regl/dist/regl.unchecked.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?q.exports=x():d.createREGL=x()})(Z,function(){"use strict";var d=function(nt,Yt){for(var cr=Object.keys(Yt),ua=0;ua<cr.length;++ua)nt[cr[ua]]=Yt[cr[ua]];return nt},x=0,A=0,M=5,e=6;function t(nt,Yt){this.id=x++,this.type=nt,this.data=Yt}function r(nt){return nt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function o(nt){if(nt.length===0)return[];var Yt=nt.charAt(0),cr=nt.charAt(nt.length-1);if(nt.length>1&&Yt===cr&&(Yt==='"'||Yt==="'"))return['"'+r(nt.substr(1,nt.length-2))+'"'];var ua=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(nt);if(ua)return o(nt.substr(0,ua.index)).concat(o(ua[1])).concat(o(nt.substr(ua.index+ua[0].length)));var Aa=nt.split(".");if(Aa.length===1)return['"'+r(nt)+'"'];for(var xa=[],wa=0;wa<Aa.length;++wa)xa=xa.concat(o(Aa[wa]));return xa}function a(nt){return"["+o(nt).join("][")+"]"}function i(nt,Yt){return new t(nt,a(Yt+""))}function n(nt){return typeof nt=="function"&&!nt._reglType||nt instanceof t}function s(nt,Yt){if(typeof nt=="function")return new t(A,nt);if(typeof nt=="number"||typeof nt=="boolean")return new t(M,nt);if(Array.isArray(nt))return new t(e,nt.map(function(cr,ua){return s(cr,Yt+"["+ua+"]")}));if(nt instanceof t)return nt}var c={DynamicVariable:t,define:i,isDynamic:n,unbox:s,accessor:a},f={next:typeof requestAnimationFrame=="function"?function(nt){return requestAnimationFrame(nt)}:function(nt){return setTimeout(nt,16)},cancel:typeof cancelAnimationFrame=="function"?function(nt){return cancelAnimationFrame(nt)}:clearTimeout},g=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function v(){var nt={"":0},Yt=[""];return{id:function(cr){var ua=nt[cr];return ua||(ua=nt[cr]=Yt.length,Yt.push(cr),ua)},str:function(cr){return Yt[cr]}}}function T(nt,Yt,cr){var ua=document.createElement("canvas");d(ua.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),nt.appendChild(ua),nt===document.body&&(ua.style.position="absolute",d(nt.style,{margin:0,padding:0}));function Aa(){var Ja=window.innerWidth,Ai=window.innerHeight;if(nt!==document.body){var bi=ua.getBoundingClientRect();Ja=bi.right-bi.left,Ai=bi.bottom-bi.top}ua.width=cr*Ja,ua.height=cr*Ai}var xa;nt!==document.body&&typeof ResizeObserver=="function"?(xa=new ResizeObserver(function(){setTimeout(Aa)}),xa.observe(nt)):window.addEventListener("resize",Aa,!1);function wa(){xa?xa.disconnect():window.removeEventListener("resize",Aa),nt.removeChild(ua)}return Aa(),{canvas:ua,onDestroy:wa}}function l(nt,Yt){function cr(ua){try{return nt.getContext(ua,Yt)}catch{return null}}return cr("webgl")||cr("experimental-webgl")||cr("webgl-experimental")}function _(nt){return typeof nt.nodeName=="string"&&typeof nt.appendChild=="function"&&typeof nt.getBoundingClientRect=="function"}function w(nt){return typeof nt.drawArrays=="function"||typeof nt.drawElements=="function"}function S(nt){return typeof nt=="string"?nt.split():nt}function E(nt){return typeof nt=="string"?document.querySelector(nt):nt}function y(nt){var Yt=nt||{},cr,ua,Aa,xa,wa={},Ja=[],Ai=[],bi=typeof window>"u"?1:window.devicePixelRatio,fi=!1,yn={},Oi=function(ea){},ki=function(){};if(typeof Yt=="string"?cr=document.querySelector(Yt):typeof Yt=="object"&&(_(Yt)?cr=Yt:w(Yt)?(xa=Yt,Aa=xa.canvas):("gl"in Yt?xa=Yt.gl:"canvas"in Yt?Aa=E(Yt.canvas):"container"in Yt&&(ua=E(Yt.container)),"attributes"in Yt&&(wa=Yt.attributes),"extensions"in Yt&&(Ja=S(Yt.extensions)),"optionalExtensions"in Yt&&(Ai=S(Yt.optionalExtensions)),"onDone"in Yt&&(Oi=Yt.onDone),"profile"in Yt&&(fi=!!Yt.profile),"pixelRatio"in Yt&&(bi=+Yt.pixelRatio),"cachedCode"in Yt&&(yn=Yt.cachedCode))),cr&&(cr.nodeName.toLowerCase()==="canvas"?Aa=cr:ua=cr),!xa){if(!Aa){var qa=T(ua||document.body,Oi,bi);if(!qa)return null;Aa=qa.canvas,ki=qa.onDestroy}wa.premultipliedAlpha===void 0&&(wa.premultipliedAlpha=!0),xa=l(Aa,wa)}return xa?{gl:xa,canvas:Aa,container:ua,extensions:Ja,optionalExtensions:Ai,pixelRatio:bi,profile:fi,cachedCode:yn,onDone:Oi,onDestroy:ki}:(ki(),Oi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(nt,Yt){var cr={};function ua(wa){var Ja=wa.toLowerCase(),Ai;try{Ai=cr[Ja]=nt.getExtension(Ja)}catch{}return!!Ai}for(var Aa=0;Aa<Yt.extensions.length;++Aa){var xa=Yt.extensions[Aa];if(!ua(xa))return Yt.onDestroy(),Yt.onDone('"'+xa+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Yt.optionalExtensions.forEach(ua),{extensions:cr,restore:function(){Object.keys(cr).forEach(function(wa){if(cr[wa]&&!ua(wa))throw new Error("(regl): error restoring extension "+wa)})}}}function p(nt,Yt){for(var cr=Array(nt),ua=0;ua<nt;++ua)cr[ua]=Yt(ua);return cr}var u=5120,m=5121,h=5122,P=5123,L=5124,z=5125,F=5126;function B(nt){for(var Yt=16;Yt<=1<<28;Yt*=16)if(nt<=Yt)return Yt;return 0}function O(nt){var Yt,cr;return Yt=(nt>65535)<<4,nt>>>=Yt,cr=(nt>255)<<3,nt>>>=cr,Yt|=cr,cr=(nt>15)<<2,nt>>>=cr,Yt|=cr,cr=(nt>3)<<1,nt>>>=cr,Yt|=cr,Yt|nt>>1}function I(){var nt=p(8,function(){return[]});function Yt(xa){var wa=B(xa),Ja=nt[O(wa)>>2];return Ja.length>0?Ja.pop():new ArrayBuffer(wa)}function cr(xa){nt[O(xa.byteLength)>>2].push(xa)}function ua(xa,wa){var Ja=null;switch(xa){case u:Ja=new Int8Array(Yt(wa),0,wa);break;case m:Ja=new Uint8Array(Yt(wa),0,wa);break;case h:Ja=new Int16Array(Yt(2*wa),0,wa);break;case P:Ja=new Uint16Array(Yt(2*wa),0,wa);break;case L:Ja=new Int32Array(Yt(4*wa),0,wa);break;case z:Ja=new Uint32Array(Yt(4*wa),0,wa);break;case F:Ja=new Float32Array(Yt(4*wa),0,wa);break;default:return null}return Ja.length!==wa?Ja.subarray(0,wa):Ja}function Aa(xa){cr(xa.buffer)}return{alloc:Yt,free:cr,allocType:ua,freeType:Aa}}var N=I();N.zero=I();var U=3408,W=3410,Q=3411,ue=3412,le=3413,he=3414,G=3415,$=33901,J=33902,X=3379,oe=3386,ie=34921,j=36347,ee=36348,re=35661,ce=35660,be=34930,Ae=36349,ze=34076,Re=34024,Xe=7936,it=7937,ot=7938,tt=35724,lt=34047,Ee=36063,_e=34852,fe=3553,Fe=34067,rt=34069,st=33984,Qe=6408,Lt=5126,kt=5121,Vt=36160,Zt=36053,Sr=36064,xr=16384,jr=function(nt,Yt){var cr=1;Yt.ext_texture_filter_anisotropic&&(cr=nt.getParameter(lt));var ua=1,Aa=1;Yt.webgl_draw_buffers&&(ua=nt.getParameter(_e),Aa=nt.getParameter(Ee));var xa=!!Yt.oes_texture_float;if(xa){var wa=nt.createTexture();nt.bindTexture(fe,wa),nt.texImage2D(fe,0,Qe,1,1,0,Qe,Lt,null);var Ja=nt.createFramebuffer();if(nt.bindFramebuffer(Vt,Ja),nt.framebufferTexture2D(Vt,Sr,fe,wa,0),nt.bindTexture(fe,null),nt.checkFramebufferStatus(Vt)!==Zt)xa=!1;else{nt.viewport(0,0,1,1),nt.clearColor(1,0,0,1),nt.clear(xr);var Ai=N.allocType(Lt,4);nt.readPixels(0,0,1,1,Qe,Lt,Ai),nt.getError()?xa=!1:(nt.deleteFramebuffer(Ja),nt.deleteTexture(wa),xa=Ai[0]===1),N.freeType(Ai)}}var bi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),fi=!0;if(!bi){var yn=nt.createTexture(),Oi=N.allocType(kt,36);nt.activeTexture(st),nt.bindTexture(Fe,yn),nt.texImage2D(rt,0,Qe,3,3,0,Qe,kt,Oi),N.freeType(Oi),nt.bindTexture(Fe,null),nt.deleteTexture(yn),fi=!nt.getError()}return{colorBits:[nt.getParameter(W),nt.getParameter(Q),nt.getParameter(ue),nt.getParameter(le)],depthBits:nt.getParameter(he),stencilBits:nt.getParameter(G),subpixelBits:nt.getParameter(U),extensions:Object.keys(Yt).filter(function(ki){return!!Yt[ki]}),maxAnisotropic:cr,maxDrawbuffers:ua,maxColorAttachments:Aa,pointSizeDims:nt.getParameter($),lineWidthDims:nt.getParameter(J),maxViewportDims:nt.getParameter(oe),maxCombinedTextureUnits:nt.getParameter(re),maxCubeMapSize:nt.getParameter(ze),maxRenderbufferSize:nt.getParameter(Re),maxTextureUnits:nt.getParameter(be),maxTextureSize:nt.getParameter(X),maxAttributes:nt.getParameter(ie),maxVertexUniforms:nt.getParameter(j),maxVertexTextureUnits:nt.getParameter(ce),maxVaryingVectors:nt.getParameter(ee),maxFragmentUniforms:nt.getParameter(Ae),glsl:nt.getParameter(tt),renderer:nt.getParameter(it),vendor:nt.getParameter(Xe),version:nt.getParameter(ot),readFloat:xa,npotTextureCube:fi}},wr=function(nt){return nt instanceof Uint8Array||nt instanceof Uint16Array||nt instanceof Uint32Array||nt instanceof Int8Array||nt instanceof Int16Array||nt instanceof Int32Array||nt instanceof Float32Array||nt instanceof Float64Array||nt instanceof Uint8ClampedArray};function Ir(nt){return!!nt&&typeof nt=="object"&&Array.isArray(nt.shape)&&Array.isArray(nt.stride)&&typeof nt.offset=="number"&&nt.shape.length===nt.stride.length&&(Array.isArray(nt.data)||wr(nt.data))}var bt=function(nt){return Object.keys(nt).map(function(Yt){return nt[Yt]})},Be={shape:Te,flatten:Ce};function Ke(nt,Yt,cr){for(var ua=0;ua<Yt;++ua)cr[ua]=nt[ua]}function Ue(nt,Yt,cr,ua){for(var Aa=0,xa=0;xa<Yt;++xa)for(var wa=nt[xa],Ja=0;Ja<cr;++Ja)ua[Aa++]=wa[Ja]}function Me(nt,Yt,cr,ua,Aa,xa){for(var wa=xa,Ja=0;Ja<Yt;++Ja)for(var Ai=nt[Ja],bi=0;bi<cr;++bi)for(var fi=Ai[bi],yn=0;yn<ua;++yn)Aa[wa++]=fi[yn]}function qe(nt,Yt,cr,ua,Aa){for(var xa=1,wa=cr+1;wa<Yt.length;++wa)xa*=Yt[wa];var Ja=Yt[cr];if(Yt.length-cr===4){var Ai=Yt[cr+1],bi=Yt[cr+2],fi=Yt[cr+3];for(wa=0;wa<Ja;++wa)Me(nt[wa],Ai,bi,fi,ua,Aa),Aa+=xa}else for(wa=0;wa<Ja;++wa)qe(nt[wa],Yt,cr+1,ua,Aa),Aa+=xa}function Ce(nt,Yt,cr,ua){var Aa=1;if(Yt.length)for(var xa=0;xa<Yt.length;++xa)Aa*=Yt[xa];else Aa=0;var wa=ua||N.allocType(cr,Aa);switch(Yt.length){case 0:break;case 1:Ke(nt,Yt[0],wa);break;case 2:Ue(nt,Yt[0],Yt[1],wa);break;case 3:Me(nt,Yt[0],Yt[1],Yt[2],wa,0);break;default:qe(nt,Yt,0,wa,0)}return wa}function Te(nt){for(var Yt=[],cr=nt;cr.length;cr=cr[0])Yt.push(cr.length);return Yt}var Pe={"[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},at=5120,yt=5122,Tt=5124,Ot=5121,Gt=5123,rr=5125,Qt=5126,Tr=5126,la={int8:at,int16:yt,int32:Tt,uint8:Ot,uint16:Gt,uint32:rr,float:Qt,float32:Tr},Ua=35048,Ba=35040,Ra={dynamic:Ua,stream:Ba,static:35044},ei=Be.flatten,za=Be.shape,ti=35044,Ci=35040,Jt=5121,Nt=5126,Kt=[];Kt[5120]=1,Kt[5122]=2,Kt[5124]=4,Kt[5121]=1,Kt[5123]=2,Kt[5125]=4,Kt[5126]=4;function Wt(nt){return Pe[Object.prototype.toString.call(nt)]|0}function Pr(nt,Yt){for(var cr=0;cr<Yt.length;++cr)nt[cr]=Yt[cr]}function ta(nt,Yt,cr,ua,Aa,xa,wa){for(var Ja=0,Ai=0;Ai<cr;++Ai)for(var bi=0;bi<ua;++bi)nt[Ja++]=Yt[Aa*Ai+xa*bi+wa]}function ma(nt,Yt,cr,ua){var Aa=0,xa={};function wa(ea){this.id=Aa++,this.buffer=nt.createBuffer(),this.type=ea,this.usage=ti,this.byteLength=0,this.dimension=1,this.dtype=Jt,this.persistentData=null,cr.profile&&(this.stats={size:0})}wa.prototype.bind=function(){nt.bindBuffer(this.type,this.buffer)},wa.prototype.destroy=function(){Oi(this)};var Ja=[];function Ai(ea,Ea){var ii=Ja.pop();return ii||(ii=new wa(ea)),ii.bind(),yn(ii,Ea,Ci,0,1,!1),ii}function bi(ea){Ja.push(ea)}function fi(ea,Ea,ii){ea.byteLength=Ea.byteLength,nt.bufferData(ea.type,Ea,ii)}function yn(ea,Ea,ii,gi,Wa,ji){var Ii;if(ea.usage=ii,Array.isArray(Ea)){if(ea.dtype=gi||Nt,Ea.length>0){var hn;if(Array.isArray(Ea[0])){Ii=za(Ea);for(var Za=1,Va=1;Va<Ii.length;++Va)Za*=Ii[Va];ea.dimension=Za,hn=ei(Ea,Ii,ea.dtype),fi(ea,hn,ii),ji?ea.persistentData=hn:N.freeType(hn)}else if(typeof Ea[0]=="number"){ea.dimension=Wa;var $i=N.allocType(ea.dtype,Ea.length);Pr($i,Ea),fi(ea,$i,ii),ji?ea.persistentData=$i:N.freeType($i)}else wr(Ea[0])&&(ea.dimension=Ea[0].length,ea.dtype=gi||Wt(Ea[0])||Nt,hn=ei(Ea,[Ea.length,Ea[0].length],ea.dtype),fi(ea,hn,ii),ji?ea.persistentData=hn:N.freeType(hn))}}else if(wr(Ea))ea.dtype=gi||Wt(Ea),ea.dimension=Wa,fi(ea,Ea,ii),ji&&(ea.persistentData=new Uint8Array(new Uint8Array(Ea.buffer)));else if(Ir(Ea)){Ii=Ea.shape;var zi=Ea.stride,Si=Ea.offset,Ti=0,Ki=0,mn=0,In=0;Ii.length===1?(Ti=Ii[0],Ki=1,mn=zi[0],In=0):Ii.length===2&&(Ti=Ii[0],Ki=Ii[1],mn=zi[0],In=zi[1]),ea.dtype=gi||Wt(Ea.data)||Nt,ea.dimension=Ki;var Di=N.allocType(ea.dtype,Ti*Ki);ta(Di,Ea.data,Ti,Ki,mn,In,Si),fi(ea,Di,ii),ji?ea.persistentData=Di:N.freeType(Di)}else Ea instanceof ArrayBuffer&&(ea.dtype=Jt,ea.dimension=Wa,fi(ea,Ea,ii),ji&&(ea.persistentData=new Uint8Array(new Uint8Array(Ea))))}function Oi(ea){Yt.bufferCount--,ua(ea);var Ea=ea.buffer;nt.deleteBuffer(Ea),ea.buffer=null,delete xa[ea.id]}function ki(ea,Ea,ii,gi){Yt.bufferCount++;var Wa=new wa(Ea);xa[Wa.id]=Wa;function ji(Za){var Va=ti,$i=null,zi=0,Si=0,Ti=1;return Array.isArray(Za)||wr(Za)||Ir(Za)||Za instanceof ArrayBuffer?$i=Za:typeof Za=="number"?zi=Za|0:Za&&("data"in Za&&($i=Za.data),"usage"in Za&&(Va=Ra[Za.usage]),"type"in Za&&(Si=la[Za.type]),"dimension"in Za&&(Ti=Za.dimension|0),"length"in Za&&(zi=Za.length|0)),Wa.bind(),$i?yn(Wa,$i,Va,Si,Ti,gi):(zi&&nt.bufferData(Wa.type,zi,Va),Wa.dtype=Si||Jt,Wa.usage=Va,Wa.dimension=Ti,Wa.byteLength=zi),cr.profile&&(Wa.stats.size=Wa.byteLength*Kt[Wa.dtype]),ji}function Ii(Za,Va){nt.bufferSubData(Wa.type,Va,Za)}function hn(Za,Va){var $i=(Va||0)|0,zi;if(Wa.bind(),wr(Za)||Za instanceof ArrayBuffer)Ii(Za,$i);else if(Array.isArray(Za)){if(Za.length>0){if(typeof Za[0]=="number"){var Si=N.allocType(Wa.dtype,Za.length);Pr(Si,Za),Ii(Si,$i),N.freeType(Si)}else if(Array.isArray(Za[0])||wr(Za[0])){zi=za(Za);var Ti=ei(Za,zi,Wa.dtype);Ii(Ti,$i),N.freeType(Ti)}}}else if(Ir(Za)){zi=Za.shape;var Ki=Za.stride,mn=0,In=0,Di=0,nn=0;zi.length===1?(mn=zi[0],In=1,Di=Ki[0],nn=0):zi.length===2&&(mn=zi[0],In=zi[1],Di=Ki[0],nn=Ki[1]);var En=Array.isArray(Za.data)?Wa.dtype:Wt(Za.data),Rn=N.allocType(En,mn*In);ta(Rn,Za.data,mn,In,Di,nn,Za.offset),Ii(Rn,$i),N.freeType(Rn)}return ji}return ii||ji(ea),ji._reglType="buffer",ji._buffer=Wa,ji.subdata=hn,cr.profile&&(ji.stats=Wa.stats),ji.destroy=function(){Oi(Wa)},ji}function qa(){bt(xa).forEach(function(ea){ea.buffer=nt.createBuffer(),nt.bindBuffer(ea.type,ea.buffer),nt.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return cr.profile&&(Yt.getTotalBufferSize=function(){var ea=0;return Object.keys(xa).forEach(function(Ea){ea+=xa[Ea].stats.size}),ea}),{create:ki,createStream:Ai,destroyStream:bi,clear:function(){bt(xa).forEach(Oi),Ja.forEach(Oi)},getBuffer:function(ea){return ea&&ea._buffer instanceof wa?ea._buffer:null},restore:qa,_initBuffer:yn}}var ra=0,Ia=0,Ha=1,$a=1,ai=4,mi=4,xt={points:ra,point:Ia,lines:Ha,line:$a,triangles:ai,triangle:mi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ct=0,Nr=1,Or=4,Rr=5120,Lr=5121,Gr=5122,Kr=5123,Ur=5124,aa=5125,da=34963,fa=35040,It=35044;function dr(nt,Yt,cr,ua){var Aa={},xa=0,wa={uint8:Lr,uint16:Kr};Yt.oes_element_index_uint&&(wa.uint32=aa);function Ja(qa){this.id=xa++,Aa[this.id]=this,this.buffer=qa,this.primType=Or,this.vertCount=0,this.type=0}Ja.prototype.bind=function(){this.buffer.bind()};var Ai=[];function bi(qa){var ea=Ai.pop();return ea||(ea=new Ja(cr.create(null,da,!0,!1)._buffer)),yn(ea,qa,fa,-1,-1,0,0),ea}function fi(qa){Ai.push(qa)}function yn(qa,ea,Ea,ii,gi,Wa,ji){qa.buffer.bind();var Ii;if(ea){var hn=ji;!ji&&(!wr(ea)||Ir(ea)&&!wr(ea.data))&&(hn=Yt.oes_element_index_uint?aa:Kr),cr._initBuffer(qa.buffer,ea,Ea,hn,3)}else nt.bufferData(da,Wa,Ea),qa.buffer.dtype=Ii||Lr,qa.buffer.usage=Ea,qa.buffer.dimension=3,qa.buffer.byteLength=Wa;if(Ii=ji,!ji){switch(qa.buffer.dtype){case Lr:case Rr:Ii=Lr;break;case Kr:case Gr:Ii=Kr;break;case aa:case Ur:Ii=aa;break;default:}qa.buffer.dtype=Ii}qa.type=Ii;var Za=gi;Za<0&&(Za=qa.buffer.byteLength,Ii===Kr?Za>>=1:Ii===aa&&(Za>>=2)),qa.vertCount=Za;var Va=ii;if(ii<0){Va=Or;var $i=qa.buffer.dimension;$i===1&&(Va=ct),$i===2&&(Va=Nr),$i===3&&(Va=Or)}qa.primType=Va}function Oi(qa){ua.elementsCount--,delete Aa[qa.id],qa.buffer.destroy(),qa.buffer=null}function ki(qa,ea){var Ea=cr.create(null,da,!0),ii=new Ja(Ea._buffer);ua.elementsCount++;function gi(Wa){if(!Wa)Ea(),ii.primType=Or,ii.vertCount=0,ii.type=Lr;else if(typeof Wa=="number")Ea(Wa),ii.primType=Or,ii.vertCount=Wa|0,ii.type=Lr;else{var ji=null,Ii=It,hn=-1,Za=-1,Va=0,$i=0;Array.isArray(Wa)||wr(Wa)||Ir(Wa)?ji=Wa:("data"in Wa&&(ji=Wa.data),"usage"in Wa&&(Ii=Ra[Wa.usage]),"primitive"in Wa&&(hn=xt[Wa.primitive]),"count"in Wa&&(Za=Wa.count|0),"type"in Wa&&($i=wa[Wa.type]),"length"in Wa?Va=Wa.length|0:(Va=Za,$i===Kr||$i===Gr?Va*=2:($i===aa||$i===Ur)&&(Va*=4))),yn(ii,ji,Ii,hn,Za,Va,$i)}return gi}return gi(qa),gi._reglType="elements",gi._elements=ii,gi.subdata=function(Wa,ji){return Ea.subdata(Wa,ji),gi},gi.destroy=function(){Oi(ii)},gi}return{create:ki,createStream:bi,destroyStream:fi,getElements:function(qa){return typeof qa=="function"&&qa._elements instanceof Ja?qa._elements:null},clear:function(){bt(Aa).forEach(Oi)}}}var kr=new Float32Array(1),ia=new Uint32Array(kr.buffer),Ca=5123;function Fa(nt){for(var Yt=N.allocType(Ca,nt.length),cr=0;cr<nt.length;++cr)if(isNaN(nt[cr]))Yt[cr]=65535;else if(nt[cr]===1/0)Yt[cr]=31744;else if(nt[cr]===-1/0)Yt[cr]=64512;else{kr[0]=nt[cr];var ua=ia[0],Aa=ua>>>31<<15,xa=(ua<<1>>>24)-127,wa=ua>>13&1023;if(xa<-24)Yt[cr]=Aa;else if(xa<-14){var Ja=-14-xa;Yt[cr]=Aa+(wa+1024>>Ja)}else xa>15?Yt[cr]=Aa+31744:Yt[cr]=Aa+(xa+15<<10)+wa}return Yt}function Ya(nt){return Array.isArray(nt)||wr(nt)}var ha=34467,Da=3553,Xi=34067,Li=34069,fn=6408,An=6406,kn=6407,zn=6409,Xn=6410,to=32854,mo=32855,pn=36194,Jo=32819,Xo=32820,Ts=33635,Po=34042,so=6402,Vn=34041,To=35904,qo=35906,Oo=36193,lo=33776,Co=33777,os=33778,Ys=33779,Os=35986,Yo=35987,Ui=34798,Cn=35840,tl=35841,Bs=35842,uo=35843,$s=36196,ms=5121,Is=5123,rl=5125,Sn=5126,po=10242,ro=10243,As=10497,al=33071,$n=33648,zs=10240,au=10241,fl=9728,xu=9729,zl=9984,Ns=9985,iu=9986,Eu=9987,Bc=33170,Cu=4352,Af=4353,pf=4354,Us=34046,Vc=3317,Sf=37440,nu=37441,Ll=37443,ic=37444,Ou=33984,il=[zl,iu,Ns,Eu],vl=[0,zn,Xn,kn,fn],gs={};gs[zn]=gs[An]=gs[so]=1,gs[Vn]=gs[Xn]=2,gs[kn]=gs[To]=3,gs[fn]=gs[qo]=4;function Vs(nt){return"[object "+nt+"]"}var nc=Vs("HTMLCanvasElement"),Nl=Vs("OffscreenCanvas"),qu=Vs("CanvasRenderingContext2D"),cl=Vs("ImageBitmap"),yh=Vs("HTMLImageElement"),ls=Vs("HTMLVideoElement"),_h=Object.keys(Pe).concat([nc,Nl,qu,cl,yh,ls]),Ss=[];Ss[ms]=1,Ss[Sn]=4,Ss[Oo]=2,Ss[Is]=2,Ss[rl]=4;var Qn=[];Qn[to]=2,Qn[mo]=2,Qn[pn]=2,Qn[Vn]=4,Qn[lo]=.5,Qn[Co]=.5,Qn[os]=1,Qn[Ys]=1,Qn[Os]=.5,Qn[Yo]=1,Qn[Ui]=1,Qn[Cn]=.5,Qn[tl]=.25,Qn[Bs]=.5,Qn[uo]=.25,Qn[$s]=.5;function Gc(nt){return Array.isArray(nt)&&(nt.length===0||typeof nt[0]=="number")}function Vu(nt){if(!Array.isArray(nt))return!1;var Yt=nt.length;return!(Yt===0||!Ya(nt[0]))}function Ul(nt){return Object.prototype.toString.call(nt)}function Mf(nt){return Ul(nt)===nc}function wc(nt){return Ul(nt)===Nl}function rf(nt){return Ul(nt)===qu}function Kl(nt){return Ul(nt)===cl}function Yf(nt){return Ul(nt)===yh}function zf(nt){return Ul(nt)===ls}function af(nt){if(!nt)return!1;var Yt=Ul(nt);return _h.indexOf(Yt)>=0?!0:Gc(nt)||Vu(nt)||Ir(nt)}function Nc(nt){return Pe[Object.prototype.toString.call(nt)]|0}function Ff(nt,Yt){var cr=Yt.length;switch(nt.type){case ms:case Is:case rl:case Sn:var ua=N.allocType(nt.type,cr);ua.set(Yt),nt.data=ua;break;case Oo:nt.data=Fa(Yt);break;default:}}function Of(nt,Yt){return N.allocType(nt.type===Oo?Sn:nt.type,Yt)}function Gu(nt,Yt){nt.type===Oo?(nt.data=Fa(Yt),N.freeType(Yt)):nt.data=Yt}function Ef(nt,Yt,cr,ua,Aa,xa){for(var wa=nt.width,Ja=nt.height,Ai=nt.channels,bi=wa*Ja*Ai,fi=Of(nt,bi),yn=0,Oi=0;Oi<Ja;++Oi)for(var ki=0;ki<wa;++ki)for(var qa=0;qa<Ai;++qa)fi[yn++]=Yt[cr*ki+ua*Oi+Aa*qa+xa];Gu(nt,fi)}function oc(nt,Yt,cr,ua,Aa,xa){var wa;if(typeof Qn[nt]<"u"?wa=Qn[nt]:wa=gs[nt]*Ss[Yt],xa&&(wa*=6),Aa){for(var Ja=0,Ai=cr;Ai>=1;)Ja+=wa*Ai*Ai,Ai/=2;return Ja}else return wa*cr*ua}function Hc(nt,Yt,cr,ua,Aa,xa,wa){var Ja={"don't care":Cu,"dont care":Cu,nice:pf,fast:Af},Ai={repeat:As,clamp:al,mirror:$n},bi={nearest:fl,linear:xu},fi=d({mipmap:Eu,"nearest mipmap nearest":zl,"linear mipmap nearest":Ns,"nearest mipmap linear":iu,"linear mipmap linear":Eu},bi),yn={none:0,browser:ic},Oi={uint8:ms,rgba4:Jo,rgb565:Ts,"rgb5 a1":Xo},ki={alpha:An,luminance:zn,"luminance alpha":Xn,rgb:kn,rgba:fn,rgba4:to,"rgb5 a1":mo,rgb565:pn},qa={};Yt.ext_srgb&&(ki.srgb=To,ki.srgba=qo),Yt.oes_texture_float&&(Oi.float32=Oi.float=Sn),Yt.oes_texture_half_float&&(Oi.float16=Oi["half float"]=Oo),Yt.webgl_depth_texture&&(d(ki,{depth:so,"depth stencil":Vn}),d(Oi,{uint16:Is,uint32:rl,"depth stencil":Po})),Yt.webgl_compressed_texture_s3tc&&d(qa,{"rgb s3tc dxt1":lo,"rgba s3tc dxt1":Co,"rgba s3tc dxt3":os,"rgba s3tc dxt5":Ys}),Yt.webgl_compressed_texture_atc&&d(qa,{"rgb atc":Os,"rgba atc explicit alpha":Yo,"rgba atc interpolated alpha":Ui}),Yt.webgl_compressed_texture_pvrtc&&d(qa,{"rgb pvrtc 4bppv1":Cn,"rgb pvrtc 2bppv1":tl,"rgba pvrtc 4bppv1":Bs,"rgba pvrtc 2bppv1":uo}),Yt.webgl_compressed_texture_etc1&&(qa["rgb etc1"]=$s);var ea=Array.prototype.slice.call(nt.getParameter(ha));Object.keys(qa).forEach(function(Le){var $e=qa[Le];ea.indexOf($e)>=0&&(ki[Le]=$e)});var Ea=Object.keys(ki);cr.textureFormats=Ea;var ii=[];Object.keys(ki).forEach(function(Le){var $e=ki[Le];ii[$e]=Le});var gi=[];Object.keys(Oi).forEach(function(Le){var $e=Oi[Le];gi[$e]=Le});var Wa=[];Object.keys(bi).forEach(function(Le){var $e=bi[Le];Wa[$e]=Le});var ji=[];Object.keys(fi).forEach(function(Le){var $e=fi[Le];ji[$e]=Le});var Ii=[];Object.keys(Ai).forEach(function(Le){var $e=Ai[Le];Ii[$e]=Le});var hn=Ea.reduce(function(Le,$e){var mt=ki[$e];return mt===zn||mt===An||mt===zn||mt===Xn||mt===so||mt===Vn||Yt.ext_srgb&&(mt===To||mt===qo)?Le[mt]=mt:mt===mo||$e.indexOf("rgba")>=0?Le[mt]=fn:Le[mt]=kn,Le},{});function Za(){this.internalformat=fn,this.format=fn,this.type=ms,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ic,this.width=0,this.height=0,this.channels=0}function Va(Le,$e){Le.internalformat=$e.internalformat,Le.format=$e.format,Le.type=$e.type,Le.compressed=$e.compressed,Le.premultiplyAlpha=$e.premultiplyAlpha,Le.flipY=$e.flipY,Le.unpackAlignment=$e.unpackAlignment,Le.colorSpace=$e.colorSpace,Le.width=$e.width,Le.height=$e.height,Le.channels=$e.channels}function $i(Le,$e){if(!(typeof $e!="object"||!$e)){if("premultiplyAlpha"in $e&&(Le.premultiplyAlpha=$e.premultiplyAlpha),"flipY"in $e&&(Le.flipY=$e.flipY),"alignment"in $e&&(Le.unpackAlignment=$e.alignment),"colorSpace"in $e&&(Le.colorSpace=yn[$e.colorSpace]),"type"in $e){var mt=$e.type;Le.type=Oi[mt]}var jt=Le.width,_r=Le.height,Fr=Le.channels,hr=!1;"shape"in $e?(jt=$e.shape[0],_r=$e.shape[1],$e.shape.length===3&&(Fr=$e.shape[2],hr=!0)):("radius"in $e&&(jt=_r=$e.radius),"width"in $e&&(jt=$e.width),"height"in $e&&(_r=$e.height),"channels"in $e&&(Fr=$e.channels,hr=!0)),Le.width=jt|0,Le.height=_r|0,Le.channels=Fr|0;var gt=!1;if("format"in $e){var Et=$e.format,Ft=Le.internalformat=ki[Et];Le.format=hn[Ft],Et in Oi&&("type"in $e||(Le.type=Oi[Et])),Et in qa&&(Le.compressed=!0),gt=!0}!hr&&gt?Le.channels=gs[Le.format]:hr&&!gt&&Le.channels!==vl[Le.format]&&(Le.format=Le.internalformat=vl[Le.channels])}}function zi(Le){nt.pixelStorei(Sf,Le.flipY),nt.pixelStorei(nu,Le.premultiplyAlpha),nt.pixelStorei(Ll,Le.colorSpace),nt.pixelStorei(Vc,Le.unpackAlignment)}function Si(){Za.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ti(Le,$e){var mt=null;if(af($e)?mt=$e:$e&&($i(Le,$e),"x"in $e&&(Le.xOffset=$e.x|0),"y"in $e&&(Le.yOffset=$e.y|0),af($e.data)&&(mt=$e.data)),$e.copy){var jt=Aa.viewportWidth,_r=Aa.viewportHeight;Le.width=Le.width||jt-Le.xOffset,Le.height=Le.height||_r-Le.yOffset,Le.needsCopy=!0}else if(!mt)Le.width=Le.width||1,Le.height=Le.height||1,Le.channels=Le.channels||4;else if(wr(mt))Le.channels=Le.channels||4,Le.data=mt,!("type"in $e)&&Le.type===ms&&(Le.type=Nc(mt));else if(Gc(mt))Le.channels=Le.channels||4,Ff(Le,mt),Le.alignment=1,Le.needsFree=!0;else if(Ir(mt)){var Fr=mt.data;!Array.isArray(Fr)&&Le.type===ms&&(Le.type=Nc(Fr));var hr=mt.shape,gt=mt.stride,Et,Ft,ir,fr,sr,pr;hr.length===3?(ir=hr[2],pr=gt[2]):(ir=1,pr=1),Et=hr[0],Ft=hr[1],fr=gt[0],sr=gt[1],Le.alignment=1,Le.width=Et,Le.height=Ft,Le.channels=ir,Le.format=Le.internalformat=vl[ir],Le.needsFree=!0,Ef(Le,Fr,fr,sr,pr,mt.offset)}else if(Mf(mt)||wc(mt)||rf(mt))Mf(mt)||wc(mt)?Le.element=mt:Le.element=mt.canvas,Le.width=Le.element.width,Le.height=Le.element.height,Le.channels=4;else if(Kl(mt))Le.element=mt,Le.width=mt.width,Le.height=mt.height,Le.channels=4;else if(Yf(mt))Le.element=mt,Le.width=mt.naturalWidth,Le.height=mt.naturalHeight,Le.channels=4;else if(zf(mt))Le.element=mt,Le.width=mt.videoWidth,Le.height=mt.videoHeight,Le.channels=4;else if(Vu(mt)){var lr=Le.width||mt[0].length,Xt=Le.height||mt.length,or=Le.channels;Ya(mt[0][0])?or=or||mt[0][0].length:or=or||1;for(var qt=Be.shape(mt),Dr=1,Jr=0;Jr<qt.length;++Jr)Dr*=qt[Jr];var ba=Of(Le,Dr);Be.flatten(mt,qt,"",ba),Gu(Le,ba),Le.alignment=1,Le.width=lr,Le.height=Xt,Le.channels=or,Le.format=Le.internalformat=vl[or],Le.needsFree=!0}Le.type===Sn||Le.type}function Ki(Le,$e,mt){var jt=Le.element,_r=Le.data,Fr=Le.internalformat,hr=Le.format,gt=Le.type,Et=Le.width,Ft=Le.height;zi(Le),jt?nt.texImage2D($e,mt,hr,hr,gt,jt):Le.compressed?nt.compressedTexImage2D($e,mt,Fr,Et,Ft,0,_r):Le.needsCopy?(ua(),nt.copyTexImage2D($e,mt,hr,Le.xOffset,Le.yOffset,Et,Ft,0)):nt.texImage2D($e,mt,hr,Et,Ft,0,hr,gt,_r||null)}function mn(Le,$e,mt,jt,_r){var Fr=Le.element,hr=Le.data,gt=Le.internalformat,Et=Le.format,Ft=Le.type,ir=Le.width,fr=Le.height;zi(Le),Fr?nt.texSubImage2D($e,_r,mt,jt,Et,Ft,Fr):Le.compressed?nt.compressedTexSubImage2D($e,_r,mt,jt,gt,ir,fr,hr):Le.needsCopy?(ua(),nt.copyTexSubImage2D($e,_r,mt,jt,Le.xOffset,Le.yOffset,ir,fr)):nt.texSubImage2D($e,_r,mt,jt,ir,fr,Et,Ft,hr)}var In=[];function Di(){return In.pop()||new Si}function nn(Le){Le.needsFree&&N.freeType(Le.data),Si.call(Le),In.push(Le)}function En(){Za.call(this),this.genMipmaps=!1,this.mipmapHint=Cu,this.mipmask=0,this.images=Array(16)}function Rn(Le,$e,mt){var jt=Le.images[0]=Di();Le.mipmask=1,jt.width=Le.width=$e,jt.height=Le.height=mt,jt.channels=Le.channels=4}function Gn(Le,$e){var mt=null;if(af($e))mt=Le.images[0]=Di(),Va(mt,Le),Ti(mt,$e),Le.mipmask=1;else if($i(Le,$e),Array.isArray($e.mipmap))for(var jt=$e.mipmap,_r=0;_r<jt.length;++_r)mt=Le.images[_r]=Di(),Va(mt,Le),mt.width>>=_r,mt.height>>=_r,Ti(mt,jt[_r]),Le.mipmask|=1<<_r;else mt=Le.images[0]=Di(),Va(mt,Le),Ti(mt,$e),Le.mipmask=1;Va(Le,Le.images[0]),Le.compressed&&(Le.internalformat===lo||Le.internalformat===Co||Le.internalformat===os||Le.internalformat)}function Ps(Le,$e){for(var mt=Le.images,jt=0;jt<mt.length;++jt){if(!mt[jt])return;Ki(mt[jt],$e,jt)}}var xl=[];function ho(){var Le=xl.pop()||new En;Za.call(Le),Le.mipmask=0;for(var $e=0;$e<16;++$e)Le.images[$e]=null;return Le}function Hl(Le){for(var $e=Le.images,mt=0;mt<$e.length;++mt)$e[mt]&&nn($e[mt]),$e[mt]=null;xl.push(Le)}function fs(){this.minFilter=fl,this.magFilter=fl,this.wrapS=al,this.wrapT=al,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=Cu}function Al(Le,$e){if("min"in $e){var mt=$e.min;Le.minFilter=fi[mt],il.indexOf(Le.minFilter)>=0&&!("faces"in $e)&&(Le.genMipmaps=!0)}if("mag"in $e){var jt=$e.mag;Le.magFilter=bi[jt]}var _r=Le.wrapS,Fr=Le.wrapT;if("wrap"in $e){var hr=$e.wrap;typeof hr=="string"?_r=Fr=Ai[hr]:Array.isArray(hr)&&(_r=Ai[hr[0]],Fr=Ai[hr[1]])}else{if("wrapS"in $e){var gt=$e.wrapS;_r=Ai[gt]}if("wrapT"in $e){var Et=$e.wrapT;Fr=Ai[Et]}}if(Le.wrapS=_r,Le.wrapT=Fr,"anisotropic"in $e){var Ft=$e.anisotropic;Le.anisotropic=$e.anisotropic}if("mipmap"in $e){var ir=!1;switch(typeof $e.mipmap){case"string":Le.mipmapHint=Ja[$e.mipmap],Le.genMipmaps=!0,ir=!0;break;case"boolean":ir=Le.genMipmaps=$e.mipmap;break;case"object":Le.genMipmaps=!1,ir=!0;break;default:}ir&&!("min"in $e)&&(Le.minFilter=zl)}}function El(Le,$e){nt.texParameteri($e,au,Le.minFilter),nt.texParameteri($e,zs,Le.magFilter),nt.texParameteri($e,po,Le.wrapS),nt.texParameteri($e,ro,Le.wrapT),Yt.ext_texture_filter_anisotropic&&nt.texParameteri($e,Us,Le.anisotropic),Le.genMipmaps&&(nt.hint(Bc,Le.mipmapHint),nt.generateMipmap($e))}var Ql=0,Fs={},pl=cr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Hn(Le){Za.call(this),this.mipmask=0,this.internalformat=fn,this.id=Ql++,this.refCount=1,this.target=Le,this.texture=nt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,wa.profile&&(this.stats={size:0})}function Cl(Le){nt.activeTexture(Ou),nt.bindTexture(Le.target,Le.texture)}function Lo(){var Le=bl[0];Le?nt.bindTexture(Le.target,Le.texture):nt.bindTexture(Da,null)}function ve(Le){var $e=Le.texture,mt=Le.unit,jt=Le.target;mt>=0&&(nt.activeTexture(Ou+mt),nt.bindTexture(jt,null),bl[mt]=null),nt.deleteTexture($e),Le.texture=null,Le.params=null,Le.pixels=null,Le.refCount=0,delete Fs[Le.id],xa.textureCount--}d(Hn.prototype,{bind:function(){var Le=this;Le.bindCount+=1;var $e=Le.unit;if($e<0){for(var mt=0;mt<pl;++mt){var jt=bl[mt];if(jt){if(jt.bindCount>0)continue;jt.unit=-1}bl[mt]=Le,$e=mt;break}$e>=pl,wa.profile&&xa.maxTextureUnits<$e+1&&(xa.maxTextureUnits=$e+1),Le.unit=$e,nt.activeTexture(Ou+$e),nt.bindTexture(Le.target,Le.texture)}return $e},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ve(this)}});function Y(Le,$e){var mt=new Hn(Da);Fs[mt.id]=mt,xa.textureCount++;function jt(hr,gt){var Et=mt.texInfo;fs.call(Et);var Ft=ho();return typeof hr=="number"?typeof gt=="number"?Rn(Ft,hr|0,gt|0):Rn(Ft,hr|0,hr|0):hr?(Al(Et,hr),Gn(Ft,hr)):Rn(Ft,1,1),Et.genMipmaps&&(Ft.mipmask=(Ft.width<<1)-1),mt.mipmask=Ft.mipmask,Va(mt,Ft),mt.internalformat=Ft.internalformat,jt.width=Ft.width,jt.height=Ft.height,Cl(mt),Ps(Ft,Da),El(Et,Da),Lo(),Hl(Ft),wa.profile&&(mt.stats.size=oc(mt.internalformat,mt.type,Ft.width,Ft.height,Et.genMipmaps,!1)),jt.format=ii[mt.internalformat],jt.type=gi[mt.type],jt.mag=Wa[Et.magFilter],jt.min=ji[Et.minFilter],jt.wrapS=Ii[Et.wrapS],jt.wrapT=Ii[Et.wrapT],jt}function _r(hr,gt,Et,Ft){var ir=gt|0,fr=Et|0,sr=Ft|0,pr=Di();return Va(pr,mt),pr.width=0,pr.height=0,Ti(pr,hr),pr.width=pr.width||(mt.width>>sr)-ir,pr.height=pr.height||(mt.height>>sr)-fr,Cl(mt),mn(pr,Da,ir,fr,sr),Lo(),nn(pr),jt}function Fr(hr,gt){var Et=hr|0,Ft=gt|0||Et;if(Et===mt.width&&Ft===mt.height)return jt;jt.width=mt.width=Et,jt.height=mt.height=Ft,Cl(mt);for(var ir=0;mt.mipmask>>ir;++ir){var fr=Et>>ir,sr=Ft>>ir;if(!fr||!sr)break;nt.texImage2D(Da,ir,mt.format,fr,sr,0,mt.format,mt.type,null)}return Lo(),wa.profile&&(mt.stats.size=oc(mt.internalformat,mt.type,Et,Ft,!1,!1)),jt}return jt(Le,$e),jt.subimage=_r,jt.resize=Fr,jt._reglType="texture2d",jt._texture=mt,wa.profile&&(jt.stats=mt.stats),jt.destroy=function(){mt.decRef()},jt}function ye(Le,$e,mt,jt,_r,Fr){var hr=new Hn(Xi);Fs[hr.id]=hr,xa.cubeCount++;var gt=new Array(6);function Et(fr,sr,pr,lr,Xt,or){var qt,Dr=hr.texInfo;for(fs.call(Dr),qt=0;qt<6;++qt)gt[qt]=ho();if(typeof fr=="number"||!fr){var Jr=fr|0||1;for(qt=0;qt<6;++qt)Rn(gt[qt],Jr,Jr)}else if(typeof fr=="object")if(sr)Gn(gt[0],fr),Gn(gt[1],sr),Gn(gt[2],pr),Gn(gt[3],lr),Gn(gt[4],Xt),Gn(gt[5],or);else if(Al(Dr,fr),$i(hr,fr),"faces"in fr){var ba=fr.faces;for(qt=0;qt<6;++qt)Va(gt[qt],hr),Gn(gt[qt],ba[qt])}else for(qt=0;qt<6;++qt)Gn(gt[qt],fr);for(Va(hr,gt[0]),Dr.genMipmaps?hr.mipmask=(gt[0].width<<1)-1:hr.mipmask=gt[0].mipmask,hr.internalformat=gt[0].internalformat,Et.width=gt[0].width,Et.height=gt[0].height,Cl(hr),qt=0;qt<6;++qt)Ps(gt[qt],Li+qt);for(El(Dr,Xi),Lo(),wa.profile&&(hr.stats.size=oc(hr.internalformat,hr.type,Et.width,Et.height,Dr.genMipmaps,!0)),Et.format=ii[hr.internalformat],Et.type=gi[hr.type],Et.mag=Wa[Dr.magFilter],Et.min=ji[Dr.minFilter],Et.wrapS=Ii[Dr.wrapS],Et.wrapT=Ii[Dr.wrapT],qt=0;qt<6;++qt)Hl(gt[qt]);return Et}function Ft(fr,sr,pr,lr,Xt){var or=pr|0,qt=lr|0,Dr=Xt|0,Jr=Di();return Va(Jr,hr),Jr.width=0,Jr.height=0,Ti(Jr,sr),Jr.width=Jr.width||(hr.width>>Dr)-or,Jr.height=Jr.height||(hr.height>>Dr)-qt,Cl(hr),mn(Jr,Li+fr,or,qt,Dr),Lo(),nn(Jr),Et}function ir(fr){var sr=fr|0;if(sr!==hr.width){Et.width=hr.width=sr,Et.height=hr.height=sr,Cl(hr);for(var pr=0;pr<6;++pr)for(var lr=0;hr.mipmask>>lr;++lr)nt.texImage2D(Li+pr,lr,hr.format,sr>>lr,sr>>lr,0,hr.format,hr.type,null);return Lo(),wa.profile&&(hr.stats.size=oc(hr.internalformat,hr.type,Et.width,Et.height,!1,!0)),Et}}return Et(Le,$e,mt,jt,_r,Fr),Et.subimage=Ft,Et.resize=ir,Et._reglType="textureCube",Et._texture=hr,wa.profile&&(Et.stats=hr.stats),Et.destroy=function(){hr.decRef()},Et}function te(){for(var Le=0;Le<pl;++Le)nt.activeTexture(Ou+Le),nt.bindTexture(Da,null),bl[Le]=null;bt(Fs).forEach(ve),xa.cubeCount=0,xa.textureCount=0}wa.profile&&(xa.getTotalTextureSize=function(){var Le=0;return Object.keys(Fs).forEach(function($e){Le+=Fs[$e].stats.size}),Le});function me(){for(var Le=0;Le<pl;++Le){var $e=bl[Le];$e&&($e.bindCount=0,$e.unit=-1,bl[Le]=null)}bt(Fs).forEach(function(mt){mt.texture=nt.createTexture(),nt.bindTexture(mt.target,mt.texture);for(var jt=0;jt<32;++jt)if(mt.mipmask&1<<jt)if(mt.target===Da)nt.texImage2D(Da,jt,mt.internalformat,mt.width>>jt,mt.height>>jt,0,mt.internalformat,mt.type,null);else for(var _r=0;_r<6;++_r)nt.texImage2D(Li+_r,jt,mt.internalformat,mt.width>>jt,mt.height>>jt,0,mt.internalformat,mt.type,null);El(mt.texInfo,mt.target)})}function Ge(){for(var Le=0;Le<pl;++Le){var $e=bl[Le];$e&&($e.bindCount=0,$e.unit=-1,bl[Le]=null),nt.activeTexture(Ou+Le),nt.bindTexture(Da,null),nt.bindTexture(Xi,null)}}return{create2D:Y,createCube:ye,clear:te,getTexture:function(Le){return null},restore:me,refresh:Ge}}var Jl=36161,Uc=32854,Tc=32855,Gs=36194,Cf=33189,lh=36168,Bf=34041,Wc=35907,Kf=34836,ku=34842,Nf=34843,ml=[];ml[Uc]=2,ml[Tc]=2,ml[Gs]=2,ml[Cf]=2,ml[lh]=1,ml[Bf]=4,ml[Wc]=4,ml[Kf]=16,ml[ku]=8,ml[Nf]=6;function Lu(nt,Yt,cr){return ml[nt]*Yt*cr}var Ac=function(nt,Yt,cr,ua,Aa){var xa={rgba4:Uc,rgb565:Gs,"rgb5 a1":Tc,depth:Cf,stencil:lh,"depth stencil":Bf};Yt.ext_srgb&&(xa.srgba=Wc),Yt.ext_color_buffer_half_float&&(xa.rgba16f=ku,xa.rgb16f=Nf),Yt.webgl_color_buffer_float&&(xa.rgba32f=Kf);var wa=[];Object.keys(xa).forEach(function(ki){var qa=xa[ki];wa[qa]=ki});var Ja=0,Ai={};function bi(ki){this.id=Ja++,this.refCount=1,this.renderbuffer=ki,this.format=Uc,this.width=0,this.height=0,Aa.profile&&(this.stats={size:0})}bi.prototype.decRef=function(){--this.refCount<=0&&fi(this)};function fi(ki){var qa=ki.renderbuffer;nt.bindRenderbuffer(Jl,null),nt.deleteRenderbuffer(qa),ki.renderbuffer=null,ki.refCount=0,delete Ai[ki.id],ua.renderbufferCount--}function yn(ki,qa){var ea=new bi(nt.createRenderbuffer());Ai[ea.id]=ea,ua.renderbufferCount++;function Ea(gi,Wa){var ji=0,Ii=0,hn=Uc;if(typeof gi=="object"&&gi){var Za=gi;if("shape"in Za){var Va=Za.shape;ji=Va[0]|0,Ii=Va[1]|0}else"radius"in Za&&(ji=Ii=Za.radius|0),"width"in Za&&(ji=Za.width|0),"height"in Za&&(Ii=Za.height|0);"format"in Za&&(hn=xa[Za.format])}else typeof gi=="number"?(ji=gi|0,typeof Wa=="number"?Ii=Wa|0:Ii=ji):gi||(ji=Ii=1);if(!(ji===ea.width&&Ii===ea.height&&hn===ea.format))return Ea.width=ea.width=ji,Ea.height=ea.height=Ii,ea.format=hn,nt.bindRenderbuffer(Jl,ea.renderbuffer),nt.renderbufferStorage(Jl,hn,ji,Ii),Aa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height)),Ea.format=wa[ea.format],Ea}function ii(gi,Wa){var ji=gi|0,Ii=Wa|0||ji;return ji===ea.width&&Ii===ea.height||(Ea.width=ea.width=ji,Ea.height=ea.height=Ii,nt.bindRenderbuffer(Jl,ea.renderbuffer),nt.renderbufferStorage(Jl,ea.format,ji,Ii),Aa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height))),Ea}return Ea(ki,qa),Ea.resize=ii,Ea._reglType="renderbuffer",Ea._renderbuffer=ea,Aa.profile&&(Ea.stats=ea.stats),Ea.destroy=function(){ea.decRef()},Ea}Aa.profile&&(ua.getTotalRenderbufferSize=function(){var ki=0;return Object.keys(Ai).forEach(function(qa){ki+=Ai[qa].stats.size}),ki});function Oi(){bt(Ai).forEach(function(ki){ki.renderbuffer=nt.createRenderbuffer(),nt.bindRenderbuffer(Jl,ki.renderbuffer),nt.renderbufferStorage(Jl,ki.format,ki.width,ki.height)}),nt.bindRenderbuffer(Jl,null)}return{create:yn,clear:function(){bt(Ai).forEach(fi)},restore:Oi}},nl=36160,dc=36161,vu=3553,bu=34069,Ml=36064,Uf=36096,Jf=36128,Bu=33306,Sc=36053,vc=36193,Lh=5121,nf=5126,df=6407,Nu=6408,of=[];of[Nu]=4,of[df]=3;var tu=[];tu[Lh]=1,tu[nf]=4,tu[vc]=2;function Xc(nt,Yt,cr,ua,Aa,xa){var wa={cur:null,next:null,dirty:!1,setFBO:null},Ja=["rgba"],Ai=["rgba4","rgb565","rgb5 a1"];Yt.ext_srgb&&Ai.push("srgba"),Yt.ext_color_buffer_half_float&&Ai.push("rgba16f","rgb16f"),Yt.webgl_color_buffer_float&&Ai.push("rgba32f");var bi=["uint8"];Yt.oes_texture_half_float&&bi.push("half float","float16"),Yt.oes_texture_float&&bi.push("float","float32");function fi(Si,Ti,Ki){this.target=Si,this.texture=Ti,this.renderbuffer=Ki;var mn=0,In=0;Ti?(mn=Ti.width,In=Ti.height):Ki&&(mn=Ki.width,In=Ki.height),this.width=mn,this.height=In}function yn(Si){Si&&(Si.texture&&Si.texture._texture.decRef(),Si.renderbuffer&&Si.renderbuffer._renderbuffer.decRef())}function Oi(Si,Ti,Ki){if(Si)if(Si.texture){var mn=Si.texture._texture,In=Math.max(1,mn.width),Di=Math.max(1,mn.height);mn.refCount+=1}else{var nn=Si.renderbuffer._renderbuffer;nn.refCount+=1}}function ki(Si,Ti){Ti&&(Ti.texture?nt.framebufferTexture2D(nl,Si,Ti.target,Ti.texture._texture.texture,0):nt.framebufferRenderbuffer(nl,Si,dc,Ti.renderbuffer._renderbuffer.renderbuffer))}function qa(Si){var Ti=vu,Ki=null,mn=null,In=Si;typeof Si=="object"&&(In=Si.data,"target"in Si&&(Ti=Si.target|0));var Di=In._reglType;return Di==="texture2d"||Di==="textureCube"?Ki=In:Di==="renderbuffer"&&(mn=In,Ti=dc),new fi(Ti,Ki,mn)}function ea(Si,Ti,Ki,mn,In){if(Ki){var Di=ua.create2D({width:Si,height:Ti,format:mn,type:In});return Di._texture.refCount=0,new fi(vu,Di,null)}else{var nn=Aa.create({width:Si,height:Ti,format:mn});return nn._renderbuffer.refCount=0,new fi(dc,null,nn)}}function Ea(Si){return Si&&(Si.texture||Si.renderbuffer)}function ii(Si,Ti,Ki){Si&&(Si.texture?Si.texture.resize(Ti,Ki):Si.renderbuffer&&Si.renderbuffer.resize(Ti,Ki),Si.width=Ti,Si.height=Ki)}var gi=0,Wa={};function ji(){this.id=gi++,Wa[this.id]=this,this.framebuffer=nt.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Ii(Si){Si.colorAttachments.forEach(yn),yn(Si.depthAttachment),yn(Si.stencilAttachment),yn(Si.depthStencilAttachment)}function hn(Si){var Ti=Si.framebuffer;nt.deleteFramebuffer(Ti),Si.framebuffer=null,xa.framebufferCount--,delete Wa[Si.id]}function Za(Si){var Ti;nt.bindFramebuffer(nl,Si.framebuffer);var Ki=Si.colorAttachments;for(Ti=0;Ti<Ki.length;++Ti)ki(Ml+Ti,Ki[Ti]);for(Ti=Ki.length;Ti<cr.maxColorAttachments;++Ti)nt.framebufferTexture2D(nl,Ml+Ti,vu,null,0);nt.framebufferTexture2D(nl,Bu,vu,null,0),nt.framebufferTexture2D(nl,Uf,vu,null,0),nt.framebufferTexture2D(nl,Jf,vu,null,0),ki(Uf,Si.depthAttachment),ki(Jf,Si.stencilAttachment),ki(Bu,Si.depthStencilAttachment);var mn=nt.checkFramebufferStatus(nl);nt.isContextLost(),nt.bindFramebuffer(nl,wa.next?wa.next.framebuffer:null),wa.cur=wa.next,nt.getError()}function Va(Si,Ti){var Ki=new ji;xa.framebufferCount++;function mn(Di,nn){var En,Rn=0,Gn=0,Ps=!0,xl=!0,ho=null,Hl=!0,fs="rgba",Al="uint8",El=1,Ql=null,Fs=null,pl=null,bl=!1;if(typeof Di=="number")Rn=Di|0,Gn=nn|0||Rn;else if(!Di)Rn=Gn=1;else{var Hn=Di;if("shape"in Hn){var Cl=Hn.shape;Rn=Cl[0],Gn=Cl[1]}else"radius"in Hn&&(Rn=Gn=Hn.radius),"width"in Hn&&(Rn=Hn.width),"height"in Hn&&(Gn=Hn.height);("color"in Hn||"colors"in Hn)&&(ho=Hn.color||Hn.colors,Array.isArray(ho)),ho||("colorCount"in Hn&&(El=Hn.colorCount|0),"colorTexture"in Hn&&(Hl=!!Hn.colorTexture,fs="rgba4"),"colorType"in Hn&&(Al=Hn.colorType,Hl||(Al==="half float"||Al==="float16"?fs="rgba16f":(Al==="float"||Al==="float32")&&(fs="rgba32f"))),"colorFormat"in Hn&&(fs=Hn.colorFormat,Ja.indexOf(fs)>=0?Hl=!0:Ai.indexOf(fs)>=0&&(Hl=!1))),("depthTexture"in Hn||"depthStencilTexture"in Hn)&&(bl=!!(Hn.depthTexture||Hn.depthStencilTexture)),"depth"in Hn&&(typeof Hn.depth=="boolean"?Ps=Hn.depth:(Ql=Hn.depth,xl=!1)),"stencil"in Hn&&(typeof Hn.stencil=="boolean"?xl=Hn.stencil:(Fs=Hn.stencil,Ps=!1)),"depthStencil"in Hn&&(typeof Hn.depthStencil=="boolean"?Ps=xl=Hn.depthStencil:(pl=Hn.depthStencil,Ps=!1,xl=!1))}var Lo=null,ve=null,Y=null,ye=null;if(Array.isArray(ho))Lo=ho.map(qa);else if(ho)Lo=[qa(ho)];else for(Lo=new Array(El),En=0;En<El;++En)Lo[En]=ea(Rn,Gn,Hl,fs,Al);Rn=Rn||Lo[0].width,Gn=Gn||Lo[0].height,Ql?ve=qa(Ql):Ps&&!xl&&(ve=ea(Rn,Gn,bl,"depth","uint32")),Fs?Y=qa(Fs):xl&&!Ps&&(Y=ea(Rn,Gn,!1,"stencil","uint8")),pl?ye=qa(pl):!Ql&&!Fs&&xl&&Ps&&(ye=ea(Rn,Gn,bl,"depth stencil","depth stencil"));var te=null;for(En=0;En<Lo.length;++En)if(Oi(Lo[En],Rn,Gn),Lo[En]&&Lo[En].texture){var me=of[Lo[En].texture._texture.format]*tu[Lo[En].texture._texture.type];te===null&&(te=me)}return Oi(ve,Rn,Gn),Oi(Y,Rn,Gn),Oi(ye,Rn,Gn),Ii(Ki),Ki.width=Rn,Ki.height=Gn,Ki.colorAttachments=Lo,Ki.depthAttachment=ve,Ki.stencilAttachment=Y,Ki.depthStencilAttachment=ye,mn.color=Lo.map(Ea),mn.depth=Ea(ve),mn.stencil=Ea(Y),mn.depthStencil=Ea(ye),mn.width=Ki.width,mn.height=Ki.height,Za(Ki),mn}function In(Di,nn){var En=Math.max(Di|0,1),Rn=Math.max(nn|0||En,1);if(En===Ki.width&&Rn===Ki.height)return mn;for(var Gn=Ki.colorAttachments,Ps=0;Ps<Gn.length;++Ps)ii(Gn[Ps],En,Rn);return ii(Ki.depthAttachment,En,Rn),ii(Ki.stencilAttachment,En,Rn),ii(Ki.depthStencilAttachment,En,Rn),Ki.width=mn.width=En,Ki.height=mn.height=Rn,Za(Ki),mn}return mn(Si,Ti),d(mn,{resize:In,_reglType:"framebuffer",_framebuffer:Ki,destroy:function(){hn(Ki),Ii(Ki)},use:function(Di){wa.setFBO({framebuffer:mn},Di)}})}function $i(Si){var Ti=Array(6);function Ki(In){var Di,nn={color:null},En=0,Rn=null,Gn="rgba",Ps="uint8",xl=1;if(typeof In=="number")En=In|0;else if(!In)En=1;else{var ho=In;if("shape"in ho){var Hl=ho.shape;En=Hl[0]}else"radius"in ho&&(En=ho.radius|0),"width"in ho?(En=ho.width|0,"height"in ho):"height"in ho&&(En=ho.height|0);("color"in ho||"colors"in ho)&&(Rn=ho.color||ho.colors,Array.isArray(Rn)),Rn||("colorCount"in ho&&(xl=ho.colorCount|0),"colorType"in ho&&(Ps=ho.colorType),"colorFormat"in ho&&(Gn=ho.colorFormat)),"depth"in ho&&(nn.depth=ho.depth),"stencil"in ho&&(nn.stencil=ho.stencil),"depthStencil"in ho&&(nn.depthStencil=ho.depthStencil)}var fs;if(Rn)if(Array.isArray(Rn))for(fs=[],Di=0;Di<Rn.length;++Di)fs[Di]=Rn[Di];else fs=[Rn];else{fs=Array(xl);var Al={radius:En,format:Gn,type:Ps};for(Di=0;Di<xl;++Di)fs[Di]=ua.createCube(Al)}for(nn.color=Array(fs.length),Di=0;Di<fs.length;++Di){var El=fs[Di];En=En||El.width,nn.color[Di]={target:bu,data:fs[Di]}}for(Di=0;Di<6;++Di){for(var Ql=0;Ql<fs.length;++Ql)nn.color[Ql].target=bu+Di;Di>0&&(nn.depth=Ti[0].depth,nn.stencil=Ti[0].stencil,nn.depthStencil=Ti[0].depthStencil),Ti[Di]?Ti[Di](nn):Ti[Di]=Va(nn)}return d(Ki,{width:En,height:En,color:fs})}function mn(In){var Di,nn=In|0;if(nn===Ki.width)return Ki;var En=Ki.color;for(Di=0;Di<En.length;++Di)En[Di].resize(nn);for(Di=0;Di<6;++Di)Ti[Di].resize(nn);return Ki.width=Ki.height=nn,Ki}return Ki(Si),d(Ki,{faces:Ti,resize:mn,_reglType:"framebufferCube",destroy:function(){Ti.forEach(function(In){In.destroy()})}})}function zi(){wa.cur=null,wa.next=null,wa.dirty=!0,bt(Wa).forEach(function(Si){Si.framebuffer=nt.createFramebuffer(),Za(Si)})}return d(wa,{getFramebuffer:function(Si){if(typeof Si=="function"&&Si._reglType==="framebuffer"){var Ti=Si._framebuffer;if(Ti instanceof ji)return Ti}return null},create:Va,createCube:$i,clear:function(){bt(Wa).forEach(hn)},restore:zi})}var uh=5126,vf=34962,ol=34963;function mu(){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=uh,this.offset=0,this.stride=0,this.divisor=0}function Pu(nt,Yt,cr,ua,Aa,xa,wa){for(var Ja=cr.maxAttributes,Ai=new Array(Ja),bi=0;bi<Ja;++bi)Ai[bi]=new mu;var fi=0,yn={},Oi={Record:mu,scope:{},state:Ai,currentVAO:null,targetVAO:null,restore:qa()?Ii:function(){},createVAO:hn,getVAO:Ea,destroyBuffer:ki,setVAO:qa()?ii:gi,clear:qa()?Wa:function(){}};function ki(Za){for(var Va=0;Va<Ai.length;++Va){var $i=Ai[Va];$i.buffer===Za&&(nt.disableVertexAttribArray(Va),$i.buffer=null)}}function qa(){return Yt.oes_vertex_array_object}function ea(){return Yt.angle_instanced_arrays}function Ea(Za){return typeof Za=="function"&&Za._vao?Za._vao:null}function ii(Za){if(Za!==Oi.currentVAO){var Va=qa();Za?Va.bindVertexArrayOES(Za.vao):Va.bindVertexArrayOES(null),Oi.currentVAO=Za}}function gi(Za){if(Za!==Oi.currentVAO){if(Za)Za.bindAttrs();else{for(var Va=ea(),$i=0;$i<Ai.length;++$i){var zi=Ai[$i];zi.buffer?(nt.enableVertexAttribArray($i),zi.buffer.bind(),nt.vertexAttribPointer($i,zi.size,zi.type,zi.normalized,zi.stride,zi.offfset),Va&&zi.divisor&&Va.vertexAttribDivisorANGLE($i,zi.divisor)):(nt.disableVertexAttribArray($i),nt.vertexAttrib4f($i,zi.x,zi.y,zi.z,zi.w))}wa.elements?nt.bindBuffer(ol,wa.elements.buffer.buffer):nt.bindBuffer(ol,null)}Oi.currentVAO=Za}}function Wa(){bt(yn).forEach(function(Za){Za.destroy()})}function ji(){this.id=++fi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Za=qa();Za?this.vao=Za.createVertexArrayOES():this.vao=null,yn[this.id]=this,this.buffers=[]}ji.prototype.bindAttrs=function(){for(var Za=ea(),Va=this.attributes,$i=0;$i<Va.length;++$i){var zi=Va[$i];zi.buffer?(nt.enableVertexAttribArray($i),nt.bindBuffer(vf,zi.buffer.buffer),nt.vertexAttribPointer($i,zi.size,zi.type,zi.normalized,zi.stride,zi.offset),Za&&zi.divisor&&Za.vertexAttribDivisorANGLE($i,zi.divisor)):(nt.disableVertexAttribArray($i),nt.vertexAttrib4f($i,zi.x,zi.y,zi.z,zi.w))}for(var Si=Va.length;Si<Ja;++Si)nt.disableVertexAttribArray(Si);var Ti=xa.getElements(this.elements);Ti?nt.bindBuffer(ol,Ti.buffer.buffer):nt.bindBuffer(ol,null)},ji.prototype.refresh=function(){var Za=qa();Za&&(Za.bindVertexArrayOES(this.vao),this.bindAttrs(),Oi.currentVAO=null,Za.bindVertexArrayOES(null))},ji.prototype.destroy=function(){if(this.vao){var Za=qa();this===Oi.currentVAO&&(Oi.currentVAO=null,Za.bindVertexArrayOES(null)),Za.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),yn[this.id]&&(delete yn[this.id],ua.vaoCount-=1)};function Ii(){var Za=qa();Za&&bt(yn).forEach(function(Va){Va.refresh()})}function hn(Za){var Va=new ji;ua.vaoCount+=1;function $i(zi){var Si;if(Array.isArray(zi))Si=zi,Va.elements&&Va.ownsElements&&Va.elements.destroy(),Va.elements=null,Va.ownsElements=!1,Va.offset=0,Va.count=0,Va.instances=-1,Va.primitive=4;else{if(zi.elements){var Ti=zi.elements;Va.ownsElements?typeof Ti=="function"&&Ti._reglType==="elements"?(Va.elements.destroy(),Va.ownsElements=!1):(Va.elements(Ti),Va.ownsElements=!1):xa.getElements(zi.elements)?(Va.elements=zi.elements,Va.ownsElements=!1):(Va.elements=xa.create(zi.elements),Va.ownsElements=!0)}else Va.elements=null,Va.ownsElements=!1;Si=zi.attributes,Va.offset=0,Va.count=-1,Va.instances=-1,Va.primitive=4,Va.elements&&(Va.count=Va.elements._elements.vertCount,Va.primitive=Va.elements._elements.primType),"offset"in zi&&(Va.offset=zi.offset|0),"count"in zi&&(Va.count=zi.count|0),"instances"in zi&&(Va.instances=zi.instances|0),"primitive"in zi&&(Va.primitive=xt[zi.primitive])}var Ki={},mn=Va.attributes;mn.length=Si.length;for(var In=0;In<Si.length;++In){var Di=Si[In],nn=mn[In]=new mu,En=Di.data||Di;if(Array.isArray(En)||wr(En)||Ir(En)){var Rn;Va.buffers[In]&&(Rn=Va.buffers[In],wr(En)&&Rn._buffer.byteLength>=En.byteLength?Rn.subdata(En):(Rn.destroy(),Va.buffers[In]=null)),Va.buffers[In]||(Rn=Va.buffers[In]=Aa.create(Di,vf,!1,!0)),nn.buffer=Aa.getBuffer(Rn),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1,Ki[In]=1}else Aa.getBuffer(Di)?(nn.buffer=Aa.getBuffer(Di),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1):Aa.getBuffer(Di.buffer)?(nn.buffer=Aa.getBuffer(Di.buffer),nn.size=(+Di.size||nn.buffer.dimension)|0,nn.normalized=!!Di.normalized||!1,"type"in Di?nn.type=la[Di.type]:nn.type=nn.buffer.dtype,nn.offset=(Di.offset||0)|0,nn.stride=(Di.stride||0)|0,nn.divisor=(Di.divisor||0)|0,nn.state=1):"x"in Di&&(nn.x=+Di.x||0,nn.y=+Di.y||0,nn.z=+Di.z||0,nn.w=+Di.w||0,nn.state=2)}for(var Gn=0;Gn<Va.buffers.length;++Gn)!Ki[Gn]&&Va.buffers[Gn]&&(Va.buffers[Gn].destroy(),Va.buffers[Gn]=null);return Va.refresh(),$i}return $i.destroy=function(){for(var zi=0;zi<Va.buffers.length;++zi)Va.buffers[zi]&&Va.buffers[zi].destroy();Va.buffers.length=0,Va.ownsElements&&(Va.elements.destroy(),Va.elements=null,Va.ownsElements=!1),Va.destroy()},$i._vao=Va,$i._reglType="vao",$i(Za)}return Oi}var kf=35632,hl=35633,sf=35718,Mc=35721;function Hu(nt,Yt,cr,ua){var Aa={},xa={};function wa(ea,Ea,ii,gi){this.name=ea,this.id=Ea,this.location=ii,this.info=gi}function Ja(ea,Ea){for(var ii=0;ii<ea.length;++ii)if(ea[ii].id===Ea.id){ea[ii].location=Ea.location;return}ea.push(Ea)}function Ai(ea,Ea,ii){var gi=ea===kf?Aa:xa,Wa=gi[Ea];if(!Wa){var ji=Yt.str(Ea);Wa=nt.createShader(ea),nt.shaderSource(Wa,ji),nt.compileShader(Wa),gi[Ea]=Wa}return Wa}var bi={},fi=[],yn=0;function Oi(ea,Ea){this.id=yn++,this.fragId=ea,this.vertId=Ea,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,ua.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ki(ea,Ea,ii){var gi,Wa,ji=Ai(kf,ea.fragId),Ii=Ai(hl,ea.vertId),hn=ea.program=nt.createProgram();if(nt.attachShader(hn,ji),nt.attachShader(hn,Ii),ii)for(gi=0;gi<ii.length;++gi){var Za=ii[gi];nt.bindAttribLocation(hn,Za[0],Za[1])}nt.linkProgram(hn);var Va=nt.getProgramParameter(hn,sf);ua.profile&&(ea.stats.uniformsCount=Va);var $i=ea.uniforms;for(gi=0;gi<Va;++gi)if(Wa=nt.getActiveUniform(hn,gi),Wa)if(Wa.size>1)for(var zi=0;zi<Wa.size;++zi){var Si=Wa.name.replace("[0]","["+zi+"]");Ja($i,new wa(Si,Yt.id(Si),nt.getUniformLocation(hn,Si),Wa))}else Ja($i,new wa(Wa.name,Yt.id(Wa.name),nt.getUniformLocation(hn,Wa.name),Wa));var Ti=nt.getProgramParameter(hn,Mc);ua.profile&&(ea.stats.attributesCount=Ti);var Ki=ea.attributes;for(gi=0;gi<Ti;++gi)Wa=nt.getActiveAttrib(hn,gi),Wa&&Ja(Ki,new wa(Wa.name,Yt.id(Wa.name),nt.getAttribLocation(hn,Wa.name),Wa))}ua.profile&&(cr.getMaxUniformsCount=function(){var ea=0;return fi.forEach(function(Ea){Ea.stats.uniformsCount>ea&&(ea=Ea.stats.uniformsCount)}),ea},cr.getMaxAttributesCount=function(){var ea=0;return fi.forEach(function(Ea){Ea.stats.attributesCount>ea&&(ea=Ea.stats.attributesCount)}),ea});function qa(){Aa={},xa={};for(var ea=0;ea<fi.length;++ea)ki(fi[ea],null,fi[ea].attributes.map(function(Ea){return[Ea.location,Ea.name]}))}return{clear:function(){var ea=nt.deleteShader.bind(nt);bt(Aa).forEach(ea),Aa={},bt(xa).forEach(ea),xa={},fi.forEach(function(Ea){nt.deleteProgram(Ea.program)}),fi.length=0,bi={},cr.shaderCount=0},program:function(ea,Ea,ii,gi){var Wa=bi[Ea];Wa||(Wa=bi[Ea]={});var ji=Wa[ea];if(ji&&(ji.refCount++,!gi))return ji;var Ii=new Oi(Ea,ea);return cr.shaderCount++,ki(Ii,ii,gi),ji||(Wa[ea]=Ii),fi.push(Ii),d(Ii,{destroy:function(){if(Ii.refCount--,Ii.refCount<=0){nt.deleteProgram(Ii.program);var hn=fi.indexOf(Ii);fi.splice(hn,1),cr.shaderCount--}Wa[Ii.vertId].refCount<=0&&(nt.deleteShader(xa[Ii.vertId]),delete xa[Ii.vertId],delete bi[Ii.fragId][Ii.vertId]),Object.keys(bi[Ii.fragId]).length||(nt.deleteShader(Aa[Ii.fragId]),delete Aa[Ii.fragId],delete bi[Ii.fragId])}})},restore:qa,shader:Ai,frag:-1,vert:-1}}var mf=6408,Wu=5121,Zc=3333,Lf=5126;function ru(nt,Yt,cr,ua,Aa,xa,wa){function Ja(fi){var yn;Yt.next===null?yn=Wu:yn=Yt.next.colorAttachments[0].texture._texture.type;var Oi=0,ki=0,qa=ua.framebufferWidth,ea=ua.framebufferHeight,Ea=null;wr(fi)?Ea=fi:fi&&(Oi=fi.x|0,ki=fi.y|0,qa=(fi.width||ua.framebufferWidth-Oi)|0,ea=(fi.height||ua.framebufferHeight-ki)|0,Ea=fi.data||null),cr();var ii=qa*ea*4;return Ea||(yn===Wu?Ea=new Uint8Array(ii):yn===Lf&&(Ea=Ea||new Float32Array(ii))),nt.pixelStorei(Zc,4),nt.readPixels(Oi,ki,qa,ea,mf,yn,Ea),Ea}function Ai(fi){var yn;return Yt.setFBO({framebuffer:fi.framebuffer},function(){yn=Ja(fi)}),yn}function bi(fi){return!fi||!("framebuffer"in fi)?Ja(fi):Ai(fi)}return bi}var jf=0,Xu="";function Ec(nt){return gu(mc(sc(nt)))}function mc(nt){return er(Ri(kc(nt),nt.length*8))}function jl(nt,Yt){var cr=kc(nt);cr.length>16&&(cr=Ri(cr,nt.length*8));for(var ua=Array(16),Aa=Array(16),xa=0;xa<16;xa++)ua[xa]=cr[xa]^909522486,Aa[xa]=cr[xa]^1549556828;var wa=Ri(ua.concat(kc(Yt)),512+Yt.length*8);return er(Ri(Aa.concat(wa),768))}function gu(nt){for(var Yt=jf?"0123456789ABCDEF":"0123456789abcdef",cr="",ua,Aa=0;Aa<nt.length;Aa++)ua=nt.charCodeAt(Aa),cr+=Yt.charAt(ua>>>4&15)+Yt.charAt(ua&15);return cr}function Cc(nt){for(var Yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cr="",ua=nt.length,Aa=0;Aa<ua;Aa+=3)for(var xa=nt.charCodeAt(Aa)<<16|(Aa+1<ua?nt.charCodeAt(Aa+1)<<8:0)|(Aa+2<ua?nt.charCodeAt(Aa+2):0),wa=0;wa<4;wa++)Aa*8+wa*6>nt.length*8?cr+=Xu:cr+=Yt.charAt(xa>>>6*(3-wa)&63);return cr}function Yc(nt,Yt){var cr=Yt.length,ua=Array(),Aa,xa,wa,Ja,Ai=Array(Math.ceil(nt.length/2));for(Aa=0;Aa<Ai.length;Aa++)Ai[Aa]=nt.charCodeAt(Aa*2)<<8|nt.charCodeAt(Aa*2+1);for(;Ai.length>0;){for(Ja=Array(),wa=0,Aa=0;Aa<Ai.length;Aa++)wa=(wa<<16)+Ai[Aa],xa=Math.floor(wa/cr),wa-=xa*cr,(Ja.length>0||xa>0)&&(Ja[Ja.length]=xa);ua[ua.length]=wa,Ai=Ja}var bi="";for(Aa=ua.length-1;Aa>=0;Aa--)bi+=Yt.charAt(ua[Aa]);var fi=Math.ceil(nt.length*8/(Math.log(Yt.length)/Math.log(2)));for(Aa=bi.length;Aa<fi;Aa++)bi=Yt[0]+bi;return bi}function sc(nt){for(var Yt="",cr=-1,ua,Aa;++cr<nt.length;)ua=nt.charCodeAt(cr),Aa=cr+1<nt.length?nt.charCodeAt(cr+1):0,55296<=ua&&ua<=56319&&56320<=Aa&&Aa<=57343&&(ua=65536+((ua&1023)<<10)+(Aa&1023),cr++),ua<=127?Yt+=String.fromCharCode(ua):ua<=2047?Yt+=String.fromCharCode(192|ua>>>6&31,128|ua&63):ua<=65535?Yt+=String.fromCharCode(224|ua>>>12&15,128|ua>>>6&63,128|ua&63):ua<=2097151&&(Yt+=String.fromCharCode(240|ua>>>18&7,128|ua>>>12&63,128|ua>>>6&63,128|ua&63));return Yt}function kc(nt){for(var Yt=Array(nt.length>>2),cr=0;cr<Yt.length;cr++)Yt[cr]=0;for(var cr=0;cr<nt.length*8;cr+=8)Yt[cr>>5]|=(nt.charCodeAt(cr/8)&255)<<24-cr%32;return Yt}function er(nt){for(var Yt="",cr=0;cr<nt.length*32;cr+=8)Yt+=String.fromCharCode(nt[cr>>5]>>>24-cr%32&255);return Yt}function yr(nt,Yt){return nt>>>Yt|nt<<32-Yt}function na(nt,Yt){return nt>>>Yt}function $r(nt,Yt,cr){return nt&Yt^~nt&cr}function La(nt,Yt,cr){return nt&Yt^nt&cr^Yt&cr}function hi(nt){return yr(nt,2)^yr(nt,13)^yr(nt,22)}function Pi(nt){return yr(nt,6)^yr(nt,11)^yr(nt,25)}function Zi(nt){return yr(nt,7)^yr(nt,18)^na(nt,3)}function tn(nt){return yr(nt,17)^yr(nt,19)^na(nt,10)}var dn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ri(nt,Yt){var cr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ua=new Array(64),Aa,xa,wa,Ja,Ai,bi,fi,yn,Oi,ki,qa,ea;for(nt[Yt>>5]|=128<<24-Yt%32,nt[(Yt+64>>9<<4)+15]=Yt,Oi=0;Oi<nt.length;Oi+=16){for(Aa=cr[0],xa=cr[1],wa=cr[2],Ja=cr[3],Ai=cr[4],bi=cr[5],fi=cr[6],yn=cr[7],ki=0;ki<64;ki++)ki<16?ua[ki]=nt[ki+Oi]:ua[ki]=Fi(Fi(Fi(tn(ua[ki-2]),ua[ki-7]),Zi(ua[ki-15])),ua[ki-16]),qa=Fi(Fi(Fi(Fi(yn,Pi(Ai)),$r(Ai,bi,fi)),dn[ki]),ua[ki]),ea=Fi(hi(Aa),La(Aa,xa,wa)),yn=fi,fi=bi,bi=Ai,Ai=Fi(Ja,qa),Ja=wa,wa=xa,xa=Aa,Aa=Fi(qa,ea);cr[0]=Fi(Aa,cr[0]),cr[1]=Fi(xa,cr[1]),cr[2]=Fi(wa,cr[2]),cr[3]=Fi(Ja,cr[3]),cr[4]=Fi(Ai,cr[4]),cr[5]=Fi(bi,cr[5]),cr[6]=Fi(fi,cr[6]),cr[7]=Fi(yn,cr[7])}return cr}function Fi(nt,Yt){var cr=(nt&65535)+(Yt&65535),ua=(nt>>16)+(Yt>>16)+(cr>>16);return ua<<16|cr&65535}function qi(nt){return Array.prototype.slice.call(nt)}function _i(nt){return qi(nt).join("")}function Mn(nt){var Yt=nt&&nt.cache,cr=0,ua=[],Aa=[],xa=[];function wa(qa,ea){var Ea=ea&&ea.stable;if(!Ea){for(var ii=0;ii<Aa.length;++ii)if(Aa[ii]===qa&&!xa[ii])return ua[ii]}var gi="g"+cr++;return ua.push(gi),Aa.push(qa),xa.push(Ea),gi}function Ja(){var qa=[];function ea(){qa.push.apply(qa,qi(arguments))}var Ea=[];function ii(){var gi="v"+cr++;return Ea.push(gi),arguments.length>0&&(qa.push(gi,"="),qa.push.apply(qa,qi(arguments)),qa.push(";")),gi}return d(ea,{def:ii,toString:function(){return _i([Ea.length>0?"var "+Ea.join(",")+";":"",_i(qa)])}})}function Ai(){var qa=Ja(),ea=Ja(),Ea=qa.toString,ii=ea.toString;function gi(Wa,ji){ea(Wa,ji,"=",qa.def(Wa,ji),";")}return d(function(){qa.apply(qa,qi(arguments))},{def:qa.def,entry:qa,exit:ea,save:gi,set:function(Wa,ji,Ii){gi(Wa,ji),qa(Wa,ji,"=",Ii,";")},toString:function(){return Ea()+ii()}})}function bi(){var qa=_i(arguments),ea=Ai(),Ea=Ai(),ii=ea.toString,gi=Ea.toString;return d(ea,{then:function(){return ea.apply(ea,qi(arguments)),this},else:function(){return Ea.apply(Ea,qi(arguments)),this},toString:function(){var Wa=gi();return Wa&&(Wa="else{"+Wa+"}"),_i(["if(",qa,"){",ii(),"}",Wa])}})}var fi=Ja(),yn={};function Oi(qa,ea){var Ea=[];function ii(){var hn="a"+Ea.length;return Ea.push(hn),hn}ea=ea||0;for(var gi=0;gi<ea;++gi)ii();var Wa=Ai(),ji=Wa.toString,Ii=yn[qa]=d(Wa,{arg:ii,toString:function(){return _i(["function(",Ea.join(),"){",ji(),"}"])}});return Ii}function ki(){var qa=['"use strict";',fi,"return {"];Object.keys(yn).forEach(function(gi){qa.push('"',gi,'":',yn[gi].toString(),",")}),qa.push("}");var ea=_i(qa).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Ea;if(Yt&&(Ea=Ec(ea),Yt[Ea]))return Yt[Ea].apply(null,Aa);var ii=Function.apply(null,ua.concat(ea));return Yt&&(Yt[Ea]=ii),ii.apply(null,Aa)}return{global:fi,link:wa,block:Ja,proc:Oi,scope:Ai,cond:bi,compile:ki}}var Kn="xyzw".split(""),ao=5121,Jn=1,co=2,wn=0,un=1,_o=2,Qo=3,xs=4,Qs=5,Rs=6,Ks="dither",ys="blend.enable",Fl="blend.color",yl="blend.equation",sl="blend.func",Un="depth.enable",Io="depth.func",Xs="depth.range",Ls="depth.mask",ou="colorMask",Iu="cull.enable",Zu="cull.face",Lc="frontFace",yu="lineWidth",Pc="polygonOffset.enable",wu="polygonOffset.offset",gc="sample.alpha",fo="sample.enable",zo="sample.coverage",Ic="stencil.enable",lc="stencil.mask",Yu="stencil.func",Ne="stencil.opFront",R="stencil.opBack",ae="scissor.enable",we="scissor.box",Se="viewport",Oe="profile",pt="framebuffer",At="vert",Bt="frag",$t="elements",br="primitive",Ar="count",Yr="offset",sa="instances",He="vao",Je="Width",ut="Height",dt=pt+Je,Ct=pt+ut,wt=Se+Je,Dt=Se+ut,ur="drawingBuffer",mr=ur+Je,Er=ur+ut,Br=[sl,yl,Yu,Ne,R,zo,Se,we,wu],Qr=34962,ga=34963,Sa=2884,Oa=3042,di=3024,Wi=2960,Gi=2929,on=3089,Tn=32823,Wn=32926,Bn=32928,Ao=5126,ss=35664,So=35665,Ko=35666,hs=5124,ll=35667,Js=35668,es=35669,ts=35670,Pl=35671,$l=35672,Ru=35673,hu=35674,wl=35675,su=35676,uc=35678,ql=35680,Vl=4,de=1028,De=1029,et=2304,vt=2305,_t=32775,St=32776,ar=519,zt=7680,gr=0,Vr=1,Wr=32774,Ta=513,ya=36160,ri=36064,ni={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},Ma={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},Na={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ka={cw:et,ccw:vt};function vi(nt){return Array.isArray(nt)||wr(nt)||Ir(nt)}function ui(nt){return nt.sort(function(Yt,cr){return Yt===Se?-1:cr===Se?1:Yt<cr?-1:1})}function Pa(nt,Yt,cr,ua){this.thisDep=nt,this.contextDep=Yt,this.propDep=cr,this.append=ua}function sn(nt){return nt&&!(nt.thisDep||nt.contextDep||nt.propDep)}function an(nt){return new Pa(!1,!1,!1,nt)}function vn(nt,Yt){var cr=nt.type;if(cr===wn){var ua=nt.data.length;return new Pa(!0,ua>=1,ua>=2,Yt)}else if(cr===xs){var Aa=nt.data;return new Pa(Aa.thisDep,Aa.contextDep,Aa.propDep,Yt)}else{if(cr===Qs)return new Pa(!1,!1,!1,Yt);if(cr===Rs){for(var xa=!1,wa=!1,Ja=!1,Ai=0;Ai<nt.data.length;++Ai){var bi=nt.data[Ai];if(bi.type===un)Ja=!0;else if(bi.type===_o)wa=!0;else if(bi.type===Qo)xa=!0;else if(bi.type===wn){xa=!0;var fi=bi.data;fi>=1&&(wa=!0),fi>=2&&(Ja=!0)}else bi.type===xs&&(xa=xa||bi.data.thisDep,wa=wa||bi.data.contextDep,Ja=Ja||bi.data.propDep)}return new Pa(xa,wa,Ja,Yt)}else return new Pa(cr===Qo,cr===_o,cr===un,Yt)}}var Pn=new Pa(!1,!1,!1,function(){});function Zn(nt,Yt,cr,ua,Aa,xa,wa,Ja,Ai,bi,fi,yn,Oi,ki,qa,ea){var Ea=bi.Record,ii={add:32774,subtract:32778,"reverse subtract":32779};cr.ext_blend_minmax&&(ii.min=_t,ii.max=St);var gi=cr.angle_instanced_arrays,Wa=cr.webgl_draw_buffers,ji=cr.oes_vertex_array_object,Ii={dirty:!0,profile:ea.profile},hn={},Za=[],Va={},$i={};function zi(gt){return gt.replace(".","_")}function Si(gt,Et,Ft){var ir=zi(gt);Za.push(gt),hn[ir]=Ii[ir]=!!Ft,Va[ir]=Et}function Ti(gt,Et,Ft){var ir=zi(gt);Za.push(gt),Array.isArray(Ft)?(Ii[ir]=Ft.slice(),hn[ir]=Ft.slice()):Ii[ir]=hn[ir]=Ft,$i[ir]=Et}function Ki(gt){return!!isNaN(gt)}Si(Ks,di),Si(ys,Oa),Ti(Fl,"blendColor",[0,0,0,0]),Ti(yl,"blendEquationSeparate",[Wr,Wr]),Ti(sl,"blendFuncSeparate",[Vr,gr,Vr,gr]),Si(Un,Gi,!0),Ti(Io,"depthFunc",Ta),Ti(Xs,"depthRange",[0,1]),Ti(Ls,"depthMask",!0),Ti(ou,ou,[!0,!0,!0,!0]),Si(Iu,Sa),Ti(Zu,"cullFace",De),Ti(Lc,Lc,vt),Ti(yu,yu,1),Si(Pc,Tn),Ti(wu,"polygonOffset",[0,0]),Si(gc,Wn),Si(fo,Bn),Ti(zo,"sampleCoverage",[1,!1]),Si(Ic,Wi),Ti(lc,"stencilMask",-1),Ti(Yu,"stencilFunc",[ar,0,-1]),Ti(Ne,"stencilOpSeparate",[de,zt,zt,zt]),Ti(R,"stencilOpSeparate",[De,zt,zt,zt]),Si(ae,on),Ti(we,"scissor",[0,0,nt.drawingBufferWidth,nt.drawingBufferHeight]),Ti(Se,Se,[0,0,nt.drawingBufferWidth,nt.drawingBufferHeight]);var mn={gl:nt,context:Oi,strings:Yt,next:hn,current:Ii,draw:yn,elements:xa,buffer:Aa,shader:fi,attributes:bi.state,vao:bi,uniforms:Ai,framebuffer:Ja,extensions:cr,timer:ki,isBufferArgs:vi},In={primTypes:xt,compareFuncs:Ma,blendFuncs:ni,blendEquations:ii,stencilOps:Na,glTypes:la,orientationType:Ka};Wa&&(In.backBuffer=[De],In.drawBuffer=p(ua.maxDrawbuffers,function(gt){return gt===0?[0]:p(gt,function(Et){return ri+Et})}));var Di=0;function nn(){var gt=Mn({cache:qa}),Et=gt.link,Ft=gt.global;gt.id=Di++,gt.batchId="0";var ir=Et(mn),fr=gt.shared={props:"a0"};Object.keys(mn).forEach(function(or){fr[or]=Ft.def(ir,".",or)});var sr=gt.next={},pr=gt.current={};Object.keys($i).forEach(function(or){Array.isArray(Ii[or])&&(sr[or]=Ft.def(fr.next,".",or),pr[or]=Ft.def(fr.current,".",or))});var lr=gt.constants={};Object.keys(In).forEach(function(or){lr[or]=Ft.def(JSON.stringify(In[or]))}),gt.invoke=function(or,qt){switch(qt.type){case wn:var Dr=["this",fr.context,fr.props,gt.batchId];return or.def(Et(qt.data),".call(",Dr.slice(0,Math.max(qt.data.length+1,4)),")");case un:return or.def(fr.props,qt.data);case _o:return or.def(fr.context,qt.data);case Qo:return or.def("this",qt.data);case xs:return qt.data.append(gt,or),qt.data.ref;case Qs:return qt.data.toString();case Rs:return qt.data.map(function(Jr){return gt.invoke(or,Jr)})}},gt.attribCache={};var Xt={};return gt.scopeAttrib=function(or){var qt=Yt.id(or);if(qt in Xt)return Xt[qt];var Dr=bi.scope[qt];Dr||(Dr=bi.scope[qt]=new Ea);var Jr=Xt[qt]=Et(Dr);return Jr},gt}function En(gt){var Et=gt.static,Ft=gt.dynamic,ir;if(Oe in Et){var fr=!!Et[Oe];ir=an(function(pr,lr){return fr}),ir.enable=fr}else if(Oe in Ft){var sr=Ft[Oe];ir=vn(sr,function(pr,lr){return pr.invoke(lr,sr)})}return ir}function Rn(gt,Et){var Ft=gt.static,ir=gt.dynamic;if(pt in Ft){var fr=Ft[pt];return fr?(fr=Ja.getFramebuffer(fr),an(function(pr,lr){var Xt=pr.link(fr),or=pr.shared;lr.set(or.framebuffer,".next",Xt);var qt=or.context;return lr.set(qt,"."+dt,Xt+".width"),lr.set(qt,"."+Ct,Xt+".height"),Xt})):an(function(pr,lr){var Xt=pr.shared;lr.set(Xt.framebuffer,".next","null");var or=Xt.context;return lr.set(or,"."+dt,or+"."+mr),lr.set(or,"."+Ct,or+"."+Er),"null"})}else if(pt in ir){var sr=ir[pt];return vn(sr,function(pr,lr){var Xt=pr.invoke(lr,sr),or=pr.shared,qt=or.framebuffer,Dr=lr.def(qt,".getFramebuffer(",Xt,")");lr.set(qt,".next",Dr);var Jr=or.context;return lr.set(Jr,"."+dt,Dr+"?"+Dr+".width:"+Jr+"."+mr),lr.set(Jr,"."+Ct,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Gn(gt,Et,Ft){var ir=gt.static,fr=gt.dynamic;function sr(Xt){if(Xt in ir){var or=ir[Xt],qt=!0,Dr=or.x|0,Jr=or.y|0,ba,yi;return"width"in or?ba=or.width|0:qt=!1,"height"in or?yi=or.height|0:qt=!1,new Pa(!qt&&Et&&Et.thisDep,!qt&&Et&&Et.contextDep,!qt&&Et&&Et.propDep,function(Ji,Bi){var pi=Ji.shared.context,wi=ba;"width"in or||(wi=Bi.def(pi,".",dt,"-",Dr));var Mi=yi;return"height"in or||(Mi=Bi.def(pi,".",Ct,"-",Jr)),[Dr,Jr,wi,Mi]})}else if(Xt in fr){var Xa=fr[Xt],si=vn(Xa,function(Ji,Bi){var pi=Ji.invoke(Bi,Xa),wi=Ji.shared.context,Mi=Bi.def(pi,".x|0"),Vi=Bi.def(pi,".y|0"),cn=Bi.def('"width" in ',pi,"?",pi,".width|0:","(",wi,".",dt,"-",Mi,")"),xo=Bi.def('"height" in ',pi,"?",pi,".height|0:","(",wi,".",Ct,"-",Vi,")");return[Mi,Vi,cn,xo]});return Et&&(si.thisDep=si.thisDep||Et.thisDep,si.contextDep=si.contextDep||Et.contextDep,si.propDep=si.propDep||Et.propDep),si}else return Et?new Pa(Et.thisDep,Et.contextDep,Et.propDep,function(Ji,Bi){var pi=Ji.shared.context;return[0,0,Bi.def(pi,".",dt),Bi.def(pi,".",Ct)]}):null}var pr=sr(Se);if(pr){var lr=pr;pr=new Pa(pr.thisDep,pr.contextDep,pr.propDep,function(Xt,or){var qt=lr.append(Xt,or),Dr=Xt.shared.context;return or.set(Dr,"."+wt,qt[2]),or.set(Dr,"."+Dt,qt[3]),qt})}return{viewport:pr,scissor_box:sr(we)}}function Ps(gt,Et){var Ft=gt.static,ir=typeof Ft[Bt]=="string"&&typeof Ft[At]=="string";if(ir){if(Object.keys(Et.dynamic).length>0)return null;var fr=Et.static,sr=Object.keys(fr);if(sr.length>0&&typeof fr[sr[0]]=="number"){for(var pr=[],lr=0;lr<sr.length;++lr)pr.push([fr[sr[lr]]|0,sr[lr]]);return pr}}return null}function xl(gt,Et,Ft){var ir=gt.static,fr=gt.dynamic;function sr(qt){if(qt in ir){var Dr=Yt.id(ir[qt]),Jr=an(function(){return Dr});return Jr.id=Dr,Jr}else if(qt in fr){var ba=fr[qt];return vn(ba,function(yi,Xa){var si=yi.invoke(Xa,ba),Ji=Xa.def(yi.shared.strings,".id(",si,")");return Ji})}return null}var pr=sr(Bt),lr=sr(At),Xt=null,or;return sn(pr)&&sn(lr)?(Xt=fi.program(lr.id,pr.id,null,Ft),or=an(function(qt,Dr){return qt.link(Xt)})):or=new Pa(pr&&pr.thisDep||lr&&lr.thisDep,pr&&pr.contextDep||lr&&lr.contextDep,pr&&pr.propDep||lr&&lr.propDep,function(qt,Dr){var Jr=qt.shared.shader,ba;pr?ba=pr.append(qt,Dr):ba=Dr.def(Jr,".",Bt);var yi;lr?yi=lr.append(qt,Dr):yi=Dr.def(Jr,".",At);var Xa=Jr+".program("+yi+","+ba;return Dr.def(Xa+")")}),{frag:pr,vert:lr,progVar:or,program:Xt}}function ho(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={},sr=!1;function pr(){if(He in Ft){var Bi=Ft[He];return Bi!==null&&bi.getVAO(Bi)===null&&(Bi=bi.createVAO(Bi)),sr=!0,fr.vao=Bi,an(function(wi){var Mi=bi.getVAO(Bi);return Mi?wi.link(Mi):"null"})}else if(He in ir){sr=!0;var pi=ir[He];return vn(pi,function(wi,Mi){var Vi=wi.invoke(Mi,pi);return Mi.def(wi.shared.vao+".getVAO("+Vi+")")})}return null}var lr=pr(),Xt=!1;function or(){if($t in Ft){var Bi=Ft[$t];if(fr.elements=Bi,vi(Bi)){var pi=fr.elements=xa.create(Bi,!0);Bi=xa.getElements(pi),Xt=!0}else Bi&&(Bi=xa.getElements(Bi),Xt=!0);var wi=an(function(Vi,cn){if(Bi){var xo=Vi.link(Bi);return Vi.ELEMENTS=xo,xo}return Vi.ELEMENTS=null,null});return wi.value=Bi,wi}else if($t in ir){Xt=!0;var Mi=ir[$t];return vn(Mi,function(Vi,cn){var xo=Vi.shared,jo=xo.isBufferArgs,ks=xo.elements,Fo=Vi.invoke(cn,Mi),bs=cn.def("null"),Hs=cn.def(jo,"(",Fo,")"),pu=Vi.cond(Hs).then(bs,"=",ks,".createStream(",Fo,");").else(bs,"=",ks,".getElements(",Fo,");");return cn.entry(pu),cn.exit(Vi.cond(Hs).then(ks,".destroyStream(",bs,");")),Vi.ELEMENTS=bs,bs})}else if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(Vi,cn){return cn.def(Vi.shared.vao+".currentVAO?"+Vi.shared.elements+".getElements("+Vi.shared.vao+".currentVAO.elements):null")});return null}var qt=or();function Dr(){if(br in Ft){var Bi=Ft[br];return fr.primitive=Bi,an(function(wi,Mi){return xt[Bi]})}else if(br in ir){var pi=ir[br];return vn(pi,function(wi,Mi){var Vi=wi.constants.primTypes,cn=wi.invoke(Mi,pi);return Mi.def(Vi,"[",cn,"]")})}else{if(Xt)return sn(qt)?qt.value?an(function(wi,Mi){return Mi.def(wi.ELEMENTS,".primType")}):an(function(){return Vl}):new Pa(qt.thisDep,qt.contextDep,qt.propDep,function(wi,Mi){var Vi=wi.ELEMENTS;return Mi.def(Vi,"?",Vi,".primType:",Vl)});if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(wi,Mi){return Mi.def(wi.shared.vao+".currentVAO?"+wi.shared.vao+".currentVAO.primitive:"+Vl)})}return null}function Jr(Bi,pi){if(Bi in Ft){var wi=Ft[Bi]|0;return pi?fr.offset=wi:fr.instances=wi,an(function(Vi,cn){return pi&&(Vi.OFFSET=wi),wi})}else if(Bi in ir){var Mi=ir[Bi];return vn(Mi,function(Vi,cn){var xo=Vi.invoke(cn,Mi);return pi&&(Vi.OFFSET=xo),xo})}else if(pi){if(Xt)return an(function(Vi,cn){return Vi.OFFSET=0,0});if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(Vi,cn){return cn.def(Vi.shared.vao+".currentVAO?"+Vi.shared.vao+".currentVAO.offset:0")})}else if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(Vi,cn){return cn.def(Vi.shared.vao+".currentVAO?"+Vi.shared.vao+".currentVAO.instances:-1")});return null}var ba=Jr(Yr,!0);function yi(){if(Ar in Ft){var Bi=Ft[Ar]|0;return fr.count=Bi,an(function(){return Bi})}else if(Ar in ir){var pi=ir[Ar];return vn(pi,function(cn,xo){var jo=cn.invoke(xo,pi);return jo})}else if(Xt)if(sn(qt)){if(qt)return ba?new Pa(ba.thisDep,ba.contextDep,ba.propDep,function(cn,xo){var jo=xo.def(cn.ELEMENTS,".vertCount-",cn.OFFSET);return jo}):an(function(cn,xo){return xo.def(cn.ELEMENTS,".vertCount")});var wi=an(function(){return-1});return wi}else{var Mi=new Pa(qt.thisDep||ba.thisDep,qt.contextDep||ba.contextDep,qt.propDep||ba.propDep,function(cn,xo){var jo=cn.ELEMENTS;return cn.OFFSET?xo.def(jo,"?",jo,".vertCount-",cn.OFFSET,":-1"):xo.def(jo,"?",jo,".vertCount:-1")});return Mi}else if(sr){var Vi=new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(cn,xo){return xo.def(cn.shared.vao,".currentVAO?",cn.shared.vao,".currentVAO.count:-1")});return Vi}return null}var Xa=Dr(),si=yi(),Ji=Jr(sa,!1);return{elements:qt,primitive:Xa,count:si,instances:Ji,offset:ba,vao:lr,vaoActive:sr,elementsActive:Xt,static:fr}}function Hl(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={};return Za.forEach(function(sr){var pr=zi(sr);function lr(Xt,or){if(sr in Ft){var qt=Xt(Ft[sr]);fr[pr]=an(function(){return qt})}else if(sr in ir){var Dr=ir[sr];fr[pr]=vn(Dr,function(Jr,ba){return or(Jr,ba,Jr.invoke(ba,Dr))})}}switch(sr){case Iu:case ys:case Ks:case Ic:case Un:case ae:case Pc:case gc:case fo:case Ls:return lr(function(Xt){return Xt},function(Xt,or,qt){return qt});case Io:return lr(function(Xt){return Ma[Xt]},function(Xt,or,qt){var Dr=Xt.constants.compareFuncs;return or.def(Dr,"[",qt,"]")});case Xs:return lr(function(Xt){return Xt},function(Xt,or,qt){var Dr=or.def("+",qt,"[0]"),Jr=or.def("+",qt,"[1]");return[Dr,Jr]});case sl:return lr(function(Xt){var or="srcRGB"in Xt?Xt.srcRGB:Xt.src,qt="srcAlpha"in Xt?Xt.srcAlpha:Xt.src,Dr="dstRGB"in Xt?Xt.dstRGB:Xt.dst,Jr="dstAlpha"in Xt?Xt.dstAlpha:Xt.dst;return[ni[or],ni[Dr],ni[qt],ni[Jr]]},function(Xt,or,qt){var Dr=Xt.constants.blendFuncs;function Jr(pi,wi){var Mi=or.def('"',pi,wi,'" in ',qt,"?",qt,".",pi,wi,":",qt,".",pi);return Mi}var ba=Jr("src","RGB"),yi=Jr("dst","RGB"),Xa=or.def(Dr,"[",ba,"]"),si=or.def(Dr,"[",Jr("src","Alpha"),"]"),Ji=or.def(Dr,"[",yi,"]"),Bi=or.def(Dr,"[",Jr("dst","Alpha"),"]");return[Xa,Ji,si,Bi]});case yl:return lr(function(Xt){if(typeof Xt=="string")return[ii[Xt],ii[Xt]];if(typeof Xt=="object")return[ii[Xt.rgb],ii[Xt.alpha]]},function(Xt,or,qt){var Dr=Xt.constants.blendEquations,Jr=or.def(),ba=or.def(),yi=Xt.cond("typeof ",qt,'==="string"');return yi.then(Jr,"=",ba,"=",Dr,"[",qt,"];"),yi.else(Jr,"=",Dr,"[",qt,".rgb];",ba,"=",Dr,"[",qt,".alpha];"),or(yi),[Jr,ba]});case Fl:return lr(function(Xt){return p(4,function(or){return+Xt[or]})},function(Xt,or,qt){return p(4,function(Dr){return or.def("+",qt,"[",Dr,"]")})});case lc:return lr(function(Xt){return Xt|0},function(Xt,or,qt){return or.def(qt,"|0")});case Yu:return lr(function(Xt){var or=Xt.cmp||"keep",qt=Xt.ref||0,Dr="mask"in Xt?Xt.mask:-1;return[Ma[or],qt,Dr]},function(Xt,or,qt){var Dr=Xt.constants.compareFuncs,Jr=or.def('"cmp" in ',qt,"?",Dr,"[",qt,".cmp]",":",zt),ba=or.def(qt,".ref|0"),yi=or.def('"mask" in ',qt,"?",qt,".mask|0:-1");return[Jr,ba,yi]});case Ne:case R:return lr(function(Xt){var or=Xt.fail||"keep",qt=Xt.zfail||"keep",Dr=Xt.zpass||"keep";return[sr===R?De:de,Na[or],Na[qt],Na[Dr]]},function(Xt,or,qt){var Dr=Xt.constants.stencilOps;function Jr(ba){return or.def('"',ba,'" in ',qt,"?",Dr,"[",qt,".",ba,"]:",zt)}return[sr===R?De:de,Jr("fail"),Jr("zfail"),Jr("zpass")]});case wu:return lr(function(Xt){var or=Xt.factor|0,qt=Xt.units|0;return[or,qt]},function(Xt,or,qt){var Dr=or.def(qt,".factor|0"),Jr=or.def(qt,".units|0");return[Dr,Jr]});case Zu:return lr(function(Xt){var or=0;return Xt==="front"?or=de:Xt==="back"&&(or=De),or},function(Xt,or,qt){return or.def(qt,'==="front"?',de,":",De)});case yu:return lr(function(Xt){return Xt},function(Xt,or,qt){return qt});case Lc:return lr(function(Xt){return Ka[Xt]},function(Xt,or,qt){return or.def(qt+'==="cw"?'+et+":"+vt)});case ou:return lr(function(Xt){return Xt.map(function(or){return!!or})},function(Xt,or,qt){return p(4,function(Dr){return"!!"+qt+"["+Dr+"]"})});case zo:return lr(function(Xt){var or="value"in Xt?Xt.value:1,qt=!!Xt.invert;return[or,qt]},function(Xt,or,qt){var Dr=or.def('"value" in ',qt,"?+",qt,".value:1"),Jr=or.def("!!",qt,".invert");return[Dr,Jr]})}}),fr}function fs(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={};return Object.keys(Ft).forEach(function(sr){var pr=Ft[sr],lr;if(typeof pr=="number"||typeof pr=="boolean")lr=an(function(){return pr});else if(typeof pr=="function"){var Xt=pr._reglType;Xt==="texture2d"||Xt==="textureCube"?lr=an(function(or){return or.link(pr)}):(Xt==="framebuffer"||Xt==="framebufferCube")&&(lr=an(function(or){return or.link(pr.color[0])}))}else Ya(pr)&&(lr=an(function(or){var qt=or.global.def("[",p(pr.length,function(Dr){return pr[Dr]}),"]");return qt}));lr.value=pr,fr[sr]=lr}),Object.keys(ir).forEach(function(sr){var pr=ir[sr];fr[sr]=vn(pr,function(lr,Xt){return lr.invoke(Xt,pr)})}),fr}function Al(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={};return Object.keys(Ft).forEach(function(sr){var pr=Ft[sr],lr=Yt.id(sr),Xt=new Ea;if(vi(pr))Xt.state=Jn,Xt.buffer=Aa.getBuffer(Aa.create(pr,Qr,!1,!0)),Xt.type=0;else{var or=Aa.getBuffer(pr);if(or)Xt.state=Jn,Xt.buffer=or,Xt.type=0;else if("constant"in pr){var qt=pr.constant;Xt.buffer="null",Xt.state=co,typeof qt=="number"?Xt.x=qt:Kn.forEach(function(Ji,Bi){Bi<qt.length&&(Xt[Ji]=qt[Bi])})}else{vi(pr.buffer)?or=Aa.getBuffer(Aa.create(pr.buffer,Qr,!1,!0)):or=Aa.getBuffer(pr.buffer);var Dr=pr.offset|0,Jr=pr.stride|0,ba=pr.size|0,yi=!!pr.normalized,Xa=0;"type"in pr&&(Xa=la[pr.type]);var si=pr.divisor|0;Xt.buffer=or,Xt.state=Jn,Xt.size=ba,Xt.normalized=yi,Xt.type=Xa||or.dtype,Xt.offset=Dr,Xt.stride=Jr,Xt.divisor=si}}fr[sr]=an(function(Ji,Bi){var pi=Ji.attribCache;if(lr in pi)return pi[lr];var wi={isStream:!1};return Object.keys(Xt).forEach(function(Mi){wi[Mi]=Xt[Mi]}),Xt.buffer&&(wi.buffer=Ji.link(Xt.buffer),wi.type=wi.type||wi.buffer+".dtype"),pi[lr]=wi,wi})}),Object.keys(ir).forEach(function(sr){var pr=ir[sr];function lr(Xt,or){var qt=Xt.invoke(or,pr),Dr=Xt.shared,Jr=Xt.constants,ba=Dr.isBufferArgs,yi=Dr.buffer,Xa={isStream:or.def(!1)},si=new Ea;si.state=Jn,Object.keys(si).forEach(function(wi){Xa[wi]=or.def(""+si[wi])});var Ji=Xa.buffer,Bi=Xa.type;or("if(",ba,"(",qt,")){",Xa.isStream,"=true;",Ji,"=",yi,".createStream(",Qr,",",qt,");",Bi,"=",Ji,".dtype;","}else{",Ji,"=",yi,".getBuffer(",qt,");","if(",Ji,"){",Bi,"=",Ji,".dtype;",'}else if("constant" in ',qt,"){",Xa.state,"=",co,";","if(typeof "+qt+'.constant === "number"){',Xa[Kn[0]],"=",qt,".constant;",Kn.slice(1).map(function(wi){return Xa[wi]}).join("="),"=0;","}else{",Kn.map(function(wi,Mi){return Xa[wi]+"="+qt+".constant.length>"+Mi+"?"+qt+".constant["+Mi+"]:0;"}).join(""),"}}else{","if(",ba,"(",qt,".buffer)){",Ji,"=",yi,".createStream(",Qr,",",qt,".buffer);","}else{",Ji,"=",yi,".getBuffer(",qt,".buffer);","}",Bi,'="type" in ',qt,"?",Jr.glTypes,"[",qt,".type]:",Ji,".dtype;",Xa.normalized,"=!!",qt,".normalized;");function pi(wi){or(Xa[wi],"=",qt,".",wi,"|0;")}return pi("size"),pi("offset"),pi("stride"),pi("divisor"),or("}}"),or.exit("if(",Xa.isStream,"){",yi,".destroyStream(",Ji,");","}"),Xa}fr[sr]=vn(pr,lr)}),fr}function El(gt){var Et=gt.static,Ft=gt.dynamic,ir={};return Object.keys(Et).forEach(function(fr){var sr=Et[fr];ir[fr]=an(function(pr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:pr.link(sr)})}),Object.keys(Ft).forEach(function(fr){var sr=Ft[fr];ir[fr]=vn(sr,function(pr,lr){return pr.invoke(lr,sr)})}),ir}function Ql(gt,Et,Ft,ir,fr){var sr=gt.static,pr=gt.dynamic,lr=Ps(gt,Et),Xt=Rn(gt,fr),or=Gn(gt,Xt,fr),qt=ho(gt,fr),Dr=Hl(gt,fr),Jr=xl(gt,fr,lr);function ba(pi){var wi=or[pi];wi&&(Dr[pi]=wi)}ba(Se),ba(zi(we));var yi=Object.keys(Dr).length>0,Xa={framebuffer:Xt,draw:qt,shader:Jr,state:Dr,dirty:yi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Xa.profile=En(gt,fr),Xa.uniforms=fs(Ft,fr),Xa.drawVAO=Xa.scopeVAO=qt.vao,!Xa.drawVAO&&Jr.program&&!lr&&cr.angle_instanced_arrays&&qt.static.elements){var si=!0,Ji=Jr.program.attributes.map(function(pi){var wi=Et.static[pi];return si=si&&!!wi,wi});if(si&&Ji.length>0){var Bi=bi.getVAO(bi.createVAO({attributes:Ji,elements:qt.static.elements}));Xa.drawVAO=new Pa(null,null,null,function(pi,wi){return pi.link(Bi)}),Xa.useVAO=!0}}return lr?Xa.useVAO=!0:Xa.attributes=Al(Et,fr),Xa.context=El(ir,fr),Xa}function Fs(gt,Et,Ft){var ir=gt.shared,fr=ir.context,sr=gt.scope();Object.keys(Ft).forEach(function(pr){Et.save(fr,"."+pr);var lr=Ft[pr],Xt=lr.append(gt,Et);Array.isArray(Xt)?sr(fr,".",pr,"=[",Xt.join(),"];"):sr(fr,".",pr,"=",Xt,";")}),Et(sr)}function pl(gt,Et,Ft,ir){var fr=gt.shared,sr=fr.gl,pr=fr.framebuffer,lr;Wa&&(lr=Et.def(fr.extensions,".webgl_draw_buffers"));var Xt=gt.constants,or=Xt.drawBuffer,qt=Xt.backBuffer,Dr;Ft?Dr=Ft.append(gt,Et):Dr=Et.def(pr,".next"),ir||Et("if(",Dr,"!==",pr,".cur){"),Et("if(",Dr,"){",sr,".bindFramebuffer(",ya,",",Dr,".framebuffer);"),Wa&&Et(lr,".drawBuffersWEBGL(",or,"[",Dr,".colorAttachments.length]);"),Et("}else{",sr,".bindFramebuffer(",ya,",null);"),Wa&&Et(lr,".drawBuffersWEBGL(",qt,");"),Et("}",pr,".cur=",Dr,";"),ir||Et("}")}function bl(gt,Et,Ft){var ir=gt.shared,fr=ir.gl,sr=gt.current,pr=gt.next,lr=ir.current,Xt=ir.next,or=gt.cond(lr,".dirty");Za.forEach(function(qt){var Dr=zi(qt);if(!(Dr in Ft.state)){var Jr,ba;if(Dr in pr){Jr=pr[Dr],ba=sr[Dr];var yi=p(Ii[Dr].length,function(si){return or.def(Jr,"[",si,"]")});or(gt.cond(yi.map(function(si,Ji){return si+"!=="+ba+"["+Ji+"]"}).join("||")).then(fr,".",$i[Dr],"(",yi,");",yi.map(function(si,Ji){return ba+"["+Ji+"]="+si}).join(";"),";"))}else{Jr=or.def(Xt,".",Dr);var Xa=gt.cond(Jr,"!==",lr,".",Dr);or(Xa),Dr in Va?Xa(gt.cond(Jr).then(fr,".enable(",Va[Dr],");").else(fr,".disable(",Va[Dr],");"),lr,".",Dr,"=",Jr,";"):Xa(fr,".",$i[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&or(lr,".dirty=false;"),Et(or)}function Hn(gt,Et,Ft,ir){var fr=gt.shared,sr=gt.current,pr=fr.current,lr=fr.gl,Xt;ui(Object.keys(Ft)).forEach(function(or){var qt=Ft[or];if(!(ir&&!ir(qt))){var Dr=qt.append(gt,Et);if(Va[or]){var Jr=Va[or];sn(qt)?(Xt=gt.link(Dr,{stable:!0}),Et(gt.cond(Xt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Et(pr,".",or,"=",Xt,";")):(Et(gt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Et(pr,".",or,"=",Dr,";"))}else if(Ya(Dr)){var ba=sr[or];Et(lr,".",$i[or],"(",Dr,");",Dr.map(function(yi,Xa){return ba+"["+Xa+"]="+yi}).join(";"),";")}else sn(qt)?(Xt=gt.link(Dr,{stable:!0}),Et(lr,".",$i[or],"(",Xt,");",pr,".",or,"=",Xt,";")):Et(lr,".",$i[or],"(",Dr,");",pr,".",or,"=",Dr,";")}})}function Cl(gt,Et){gi&&(gt.instancing=Et.def(gt.shared.extensions,".angle_instanced_arrays"))}function Lo(gt,Et,Ft,ir,fr){var sr=gt.shared,pr=gt.stats,lr=sr.current,Xt=sr.timer,or=Ft.profile;function qt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ba(pi){Dr=Et.def(),pi(Dr,"=",qt(),";"),typeof fr=="string"?pi(pr,".count+=",fr,";"):pi(pr,".count++;"),ki&&(ir?(Jr=Et.def(),pi(Jr,"=",Xt,".getNumPendingQueries();")):pi(Xt,".beginQuery(",pr,");"))}function yi(pi){pi(pr,".cpuTime+=",qt(),"-",Dr,";"),ki&&(ir?pi(Xt,".pushScopeStats(",Jr,",",Xt,".getNumPendingQueries(),",pr,");"):pi(Xt,".endQuery();"))}function Xa(pi){var wi=Et.def(lr,".profile");Et(lr,".profile=",pi,";"),Et.exit(lr,".profile=",wi,";")}var si;if(or){if(sn(or)){or.enable?(ba(Et),yi(Et.exit),Xa("true")):Xa("false");return}si=or.append(gt,Et),Xa(si)}else si=Et.def(lr,".profile");var Ji=gt.block();ba(Ji),Et("if(",si,"){",Ji,"}");var Bi=gt.block();yi(Bi),Et.exit("if(",si,"){",Bi,"}")}function ve(gt,Et,Ft,ir,fr){var sr=gt.shared;function pr(Xt){switch(Xt){case ss:case ll:case Pl:return 2;case So:case Js:case $l:return 3;case Ko:case es:case Ru:return 4;default:return 1}}function lr(Xt,or,qt){var Dr=sr.gl,Jr=Et.def(Xt,".location"),ba=Et.def(sr.attributes,"[",Jr,"]"),yi=qt.state,Xa=qt.buffer,si=[qt.x,qt.y,qt.z,qt.w],Ji=["buffer","normalized","offset","stride"];function Bi(){Et("if(!",ba,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var wi=qt.type,Mi;if(qt.size?Mi=Et.def(qt.size,"||",or):Mi=or,Et("if(",ba,".type!==",wi,"||",ba,".size!==",Mi,"||",Ji.map(function(cn){return ba+"."+cn+"!=="+qt[cn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Xa,".buffer);",Dr,".vertexAttribPointer(",[Jr,Mi,wi,qt.normalized,qt.stride,qt.offset],");",ba,".type=",wi,";",ba,".size=",Mi,";",Ji.map(function(cn){return ba+"."+cn+"="+qt[cn]+";"}).join(""),"}"),gi){var Vi=qt.divisor;Et("if(",ba,".divisor!==",Vi,"){",gt.instancing,".vertexAttribDivisorANGLE(",[Jr,Vi],");",ba,".divisor=",Vi,";}")}}function pi(){Et("if(",ba,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ba,".buffer=null;","}if(",Kn.map(function(wi,Mi){return ba+"."+wi+"!=="+si[Mi]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",si,");",Kn.map(function(wi,Mi){return ba+"."+wi+"="+si[Mi]+";"}).join(""),"}")}yi===Jn?Bi():yi===co?pi():(Et("if(",yi,"===",Jn,"){"),Bi(),Et("}else{"),pi(),Et("}"))}ir.forEach(function(Xt){var or=Xt.name,qt=Ft.attributes[or],Dr;if(qt){if(!fr(qt))return;Dr=qt.append(gt,Et)}else{if(!fr(Pn))return;var Jr=gt.scopeAttrib(or);Dr={},Object.keys(new Ea).forEach(function(ba){Dr[ba]=Et.def(Jr,".",ba)})}lr(gt.link(Xt),pr(Xt.info.type),Dr)})}function Y(gt,Et,Ft,ir,fr,sr){for(var pr=gt.shared,lr=pr.gl,Xt,or=0;or<ir.length;++or){var qt=ir[or],Dr=qt.name,Jr=qt.info.type,ba=Ft.uniforms[Dr],yi=gt.link(qt),Xa=yi+".location",si;if(ba){if(!fr(ba))continue;if(sn(ba)){var Ji=ba.value;if(Jr===uc||Jr===ql){var Bi=gt.link(Ji._texture||Ji.color[0]._texture);Et(lr,".uniform1i(",Xa,",",Bi+".bind());"),Et.exit(Bi,".unbind();")}else if(Jr===hu||Jr===wl||Jr===su){var pi=gt.global.def("new Float32Array(["+Array.prototype.slice.call(Ji)+"])"),wi=2;Jr===wl?wi=3:Jr===su&&(wi=4),Et(lr,".uniformMatrix",wi,"fv(",Xa,",false,",pi,");")}else{switch(Jr){case Ao:Xt="1f";break;case ss:Xt="2f";break;case So:Xt="3f";break;case Ko:Xt="4f";break;case ts:Xt="1i";break;case hs:Xt="1i";break;case Pl:Xt="2i";break;case ll:Xt="2i";break;case $l:Xt="3i";break;case Js:Xt="3i";break;case Ru:Xt="4i";break;case es:Xt="4i";break}Et(lr,".uniform",Xt,"(",Xa,",",Ya(Ji)?Array.prototype.slice.call(Ji):Ji,");")}continue}else si=ba.append(gt,Et)}else{if(!fr(Pn))continue;si=Et.def(pr.uniforms,"[",Yt.id(Dr),"]")}Jr===uc?Et("if(",si,"&&",si,'._reglType==="framebuffer"){',si,"=",si,".color[0];","}"):Jr===ql&&Et("if(",si,"&&",si,'._reglType==="framebufferCube"){',si,"=",si,".color[0];","}");var Mi=1;switch(Jr){case uc:case ql:var Vi=Et.def(si,"._texture");Et(lr,".uniform1i(",Xa,",",Vi,".bind());"),Et.exit(Vi,".unbind();");continue;case hs:case ts:Xt="1i";break;case ll:case Pl:Xt="2i",Mi=2;break;case Js:case $l:Xt="3i",Mi=3;break;case es:case Ru:Xt="4i",Mi=4;break;case Ao:Xt="1f";break;case ss:Xt="2f",Mi=2;break;case So:Xt="3f",Mi=3;break;case Ko:Xt="4f",Mi=4;break;case hu:Xt="Matrix2fv";break;case wl:Xt="Matrix3fv";break;case su:Xt="Matrix4fv";break}if(Xt.charAt(0)==="M"){Et(lr,".uniform",Xt,"(",Xa,",");var cn=Math.pow(Jr-hu+2,2),xo=gt.global.def("new Float32Array(",cn,")");Array.isArray(si)?Et("false,(",p(cn,function(Hs){return xo+"["+Hs+"]="+si[Hs]}),",",xo,")"):Et("false,(Array.isArray(",si,")||",si," instanceof Float32Array)?",si,":(",p(cn,function(Hs){return xo+"["+Hs+"]="+si+"["+Hs+"]"}),",",xo,")"),Et(");")}else if(Mi>1){for(var jo=[],ks=[],Fo=0;Fo<Mi;++Fo)Array.isArray(si)?ks.push(si[Fo]):ks.push(Et.def(si+"["+Fo+"]")),sr&&jo.push(Et.def());sr&&Et("if(!",gt.batchId,"||",jo.map(function(Hs,pu){return Hs+"!=="+ks[pu]}).join("||"),"){",jo.map(function(Hs,pu){return Hs+"="+ks[pu]+";"}).join("")),Et(lr,".uniform",Xt,"(",Xa,",",ks.join(","),");"),sr&&Et("}")}else{if(sr){var bs=Et.def();Et("if(!",gt.batchId,"||",bs,"!==",si,"){",bs,"=",si,";")}Et(lr,".uniform",Xt,"(",Xa,",",si,");"),sr&&Et("}")}}}function ye(gt,Et,Ft,ir){var fr=gt.shared,sr=fr.gl,pr=fr.draw,lr=ir.draw;function Xt(){var Mi=lr.elements,Vi,cn=Et;return Mi?((Mi.contextDep&&ir.contextDynamic||Mi.propDep)&&(cn=Ft),Vi=Mi.append(gt,cn),lr.elementsActive&&cn("if("+Vi+")"+sr+".bindBuffer("+ga+","+Vi+".buffer.buffer);")):(Vi=cn.def(),cn(Vi,"=",pr,".",$t,";","if(",Vi,"){",sr,".bindBuffer(",ga,",",Vi,".buffer.buffer);}","else if(",fr.vao,".currentVAO){",Vi,"=",gt.shared.elements+".getElements("+fr.vao,".currentVAO.elements);",ji?"":"if("+Vi+")"+sr+".bindBuffer("+ga+","+Vi+".buffer.buffer);","}")),Vi}function or(){var Mi=lr.count,Vi,cn=Et;return Mi?((Mi.contextDep&&ir.contextDynamic||Mi.propDep)&&(cn=Ft),Vi=Mi.append(gt,cn)):Vi=cn.def(pr,".",Ar),Vi}var qt=Xt();function Dr(Mi){var Vi=lr[Mi];return Vi?Vi.contextDep&&ir.contextDynamic||Vi.propDep?Vi.append(gt,Ft):Vi.append(gt,Et):Et.def(pr,".",Mi)}var Jr=Dr(br),ba=Dr(Yr),yi=or();if(typeof yi=="number"){if(yi===0)return}else Ft("if(",yi,"){"),Ft.exit("}");var Xa,si;gi&&(Xa=Dr(sa),si=gt.instancing);var Ji=qt+".type",Bi=lr.elements&&sn(lr.elements)&&!lr.vaoActive;function pi(){function Mi(){Ft(si,".drawElementsInstancedANGLE(",[Jr,yi,Ji,ba+"<<(("+Ji+"-"+ao+")>>1)",Xa],");")}function Vi(){Ft(si,".drawArraysInstancedANGLE(",[Jr,ba,yi,Xa],");")}qt&&qt!=="null"?Bi?Mi():(Ft("if(",qt,"){"),Mi(),Ft("}else{"),Vi(),Ft("}")):Vi()}function wi(){function Mi(){Ft(sr+".drawElements("+[Jr,yi,Ji,ba+"<<(("+Ji+"-"+ao+")>>1)"]+");")}function Vi(){Ft(sr+".drawArrays("+[Jr,ba,yi]+");")}qt&&qt!=="null"?Bi?Mi():(Ft("if(",qt,"){"),Mi(),Ft("}else{"),Vi(),Ft("}")):Vi()}gi&&(typeof Xa!="number"||Xa>=0)?typeof Xa=="string"?(Ft("if(",Xa,">0){"),pi(),Ft("}else if(",Xa,"<0){"),wi(),Ft("}")):pi():wi()}function te(gt,Et,Ft,ir,fr){var sr=nn(),pr=sr.proc("body",fr);return gi&&(sr.instancing=pr.def(sr.shared.extensions,".angle_instanced_arrays")),gt(sr,pr,Ft,ir),sr.compile().body}function me(gt,Et,Ft,ir){Cl(gt,Et),Ft.useVAO?Ft.drawVAO?Et(gt.shared.vao,".setVAO(",Ft.drawVAO.append(gt,Et),");"):Et(gt.shared.vao,".setVAO(",gt.shared.vao,".targetVAO);"):(Et(gt.shared.vao,".setVAO(null);"),ve(gt,Et,Ft,ir.attributes,function(){return!0})),Y(gt,Et,Ft,ir.uniforms,function(){return!0},!1),ye(gt,Et,Et,Ft)}function Ge(gt,Et){var Ft=gt.proc("draw",1);Cl(gt,Ft),Fs(gt,Ft,Et.context),pl(gt,Ft,Et.framebuffer),bl(gt,Ft,Et),Hn(gt,Ft,Et.state),Lo(gt,Ft,Et,!1,!0);var ir=Et.shader.progVar.append(gt,Ft);if(Ft(gt.shared.gl,".useProgram(",ir,".program);"),Et.shader.program)me(gt,Ft,Et,Et.shader.program);else{Ft(gt.shared.vao,".setVAO(null);");var fr=gt.global.def("{}"),sr=Ft.def(ir,".id"),pr=Ft.def(fr,"[",sr,"]");Ft(gt.cond(pr).then(pr,".call(this,a0);").else(pr,"=",fr,"[",sr,"]=",gt.link(function(lr){return te(me,gt,Et,lr,1)}),"(",ir,");",pr,".call(this,a0);"))}Object.keys(Et.state).length>0&&Ft(gt.shared.current,".dirty=true;"),gt.shared.vao&&Ft(gt.shared.vao,".setVAO(null);")}function Le(gt,Et,Ft,ir){gt.batchId="a1",Cl(gt,Et);function fr(){return!0}ve(gt,Et,Ft,ir.attributes,fr),Y(gt,Et,Ft,ir.uniforms,fr,!1),ye(gt,Et,Et,Ft)}function $e(gt,Et,Ft,ir){Cl(gt,Et);var fr=Ft.contextDep,sr=Et.def(),pr="a0",lr="a1",Xt=Et.def();gt.shared.props=Xt,gt.batchId=sr;var or=gt.scope(),qt=gt.scope();Et(or.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Xt,"=",pr,"[",sr,"];",qt,"}",or.exit);function Dr(Ji){return Ji.contextDep&&fr||Ji.propDep}function Jr(Ji){return!Dr(Ji)}if(Ft.needsContext&&Fs(gt,qt,Ft.context),Ft.needsFramebuffer&&pl(gt,qt,Ft.framebuffer),Hn(gt,qt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Lo(gt,qt,Ft,!1,!0),ir)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?qt(gt.shared.vao,".setVAO(",Ft.drawVAO.append(gt,qt),");"):or(gt.shared.vao,".setVAO(",Ft.drawVAO.append(gt,or),");"):or(gt.shared.vao,".setVAO(",gt.shared.vao,".targetVAO);"):(or(gt.shared.vao,".setVAO(null);"),ve(gt,or,Ft,ir.attributes,Jr),ve(gt,qt,Ft,ir.attributes,Dr)),Y(gt,or,Ft,ir.uniforms,Jr,!1),Y(gt,qt,Ft,ir.uniforms,Dr,!0),ye(gt,or,qt,Ft);else{var ba=gt.global.def("{}"),yi=Ft.shader.progVar.append(gt,qt),Xa=qt.def(yi,".id"),si=qt.def(ba,"[",Xa,"]");qt(gt.shared.gl,".useProgram(",yi,".program);","if(!",si,"){",si,"=",ba,"[",Xa,"]=",gt.link(function(Ji){return te(Le,gt,Ft,Ji,2)}),"(",yi,");}",si,".call(this,a0[",sr,"],",sr,");")}}function mt(gt,Et){var Ft=gt.proc("batch",2);gt.batchId="0",Cl(gt,Ft);var ir=!1,fr=!0;Object.keys(Et.context).forEach(function(ba){ir=ir||Et.context[ba].propDep}),ir||(Fs(gt,Ft,Et.context),fr=!1);var sr=Et.framebuffer,pr=!1;sr?(sr.propDep?ir=pr=!0:sr.contextDep&&ir&&(pr=!0),pr||pl(gt,Ft,sr)):pl(gt,Ft,null),Et.state.viewport&&Et.state.viewport.propDep&&(ir=!0);function lr(ba){return ba.contextDep&&ir||ba.propDep}bl(gt,Ft,Et),Hn(gt,Ft,Et.state,function(ba){return!lr(ba)}),(!Et.profile||!lr(Et.profile))&&Lo(gt,Ft,Et,!1,"a1"),Et.contextDep=ir,Et.needsContext=fr,Et.needsFramebuffer=pr;var Xt=Et.shader.progVar;if(Xt.contextDep&&ir||Xt.propDep)$e(gt,Ft,Et,null);else{var or=Xt.append(gt,Ft);if(Ft(gt.shared.gl,".useProgram(",or,".program);"),Et.shader.program)$e(gt,Ft,Et,Et.shader.program);else{Ft(gt.shared.vao,".setVAO(null);");var qt=gt.global.def("{}"),Dr=Ft.def(or,".id"),Jr=Ft.def(qt,"[",Dr,"]");Ft(gt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",qt,"[",Dr,"]=",gt.link(function(ba){return te($e,gt,Et,ba,2)}),"(",or,");",Jr,".call(this,a0,a1);"))}}Object.keys(Et.state).length>0&&Ft(gt.shared.current,".dirty=true;"),gt.shared.vao&&Ft(gt.shared.vao,".setVAO(null);")}function jt(gt,Et){var Ft=gt.proc("scope",3);gt.batchId="a2";var ir=gt.shared,fr=ir.current;if(Fs(gt,Ft,Et.context),Et.framebuffer&&Et.framebuffer.append(gt,Ft),ui(Object.keys(Et.state)).forEach(function(lr){var Xt=Et.state[lr],or=Xt.append(gt,Ft);Ya(or)?or.forEach(function(qt,Dr){Ki(qt)?Ft.set(gt.next[lr],"["+Dr+"]",qt):Ft.set(gt.next[lr],"["+Dr+"]",gt.link(qt,{stable:!0}))}):sn(Xt)?Ft.set(ir.next,"."+lr,gt.link(or,{stable:!0})):Ft.set(ir.next,"."+lr,or)}),Lo(gt,Ft,Et,!0,!0),[$t,Yr,Ar,sa,br].forEach(function(lr){var Xt=Et.draw[lr];if(Xt){var or=Xt.append(gt,Ft);Ki(or)?Ft.set(ir.draw,"."+lr,or):Ft.set(ir.draw,"."+lr,gt.link(or),{stable:!0})}}),Object.keys(Et.uniforms).forEach(function(lr){var Xt=Et.uniforms[lr].append(gt,Ft);Array.isArray(Xt)&&(Xt="["+Xt.map(function(or){return Ki(or)?or:gt.link(or,{stable:!0})})+"]"),Ft.set(ir.uniforms,"["+gt.link(Yt.id(lr),{stable:!0})+"]",Xt)}),Object.keys(Et.attributes).forEach(function(lr){var Xt=Et.attributes[lr].append(gt,Ft),or=gt.scopeAttrib(lr);Object.keys(new Ea).forEach(function(qt){Ft.set(or,"."+qt,Xt[qt])})}),Et.scopeVAO){var sr=Et.scopeVAO.append(gt,Ft);Ki(sr)?Ft.set(ir.vao,".targetVAO",sr):Ft.set(ir.vao,".targetVAO",gt.link(sr,{stable:!0}))}function pr(lr){var Xt=Et.shader[lr];if(Xt){var or=Xt.append(gt,Ft);Ki(or)?Ft.set(ir.shader,"."+lr,or):Ft.set(ir.shader,"."+lr,gt.link(or,{stable:!0}))}}pr(At),pr(Bt),Object.keys(Et.state).length>0&&(Ft(fr,".dirty=true;"),Ft.exit(fr,".dirty=true;")),Ft("a1(",gt.shared.context,",a0,",gt.batchId,");")}function _r(gt){if(!(typeof gt!="object"||Ya(gt))){for(var Et=Object.keys(gt),Ft=0;Ft<Et.length;++Ft)if(c.isDynamic(gt[Et[Ft]]))return!0;return!1}}function Fr(gt,Et,Ft){var ir=Et.static[Ft];if(!ir||!_r(ir))return;var fr=gt.global,sr=Object.keys(ir),pr=!1,lr=!1,Xt=!1,or=gt.global.def("{}");sr.forEach(function(Dr){var Jr=ir[Dr];if(c.isDynamic(Jr)){typeof Jr=="function"&&(Jr=ir[Dr]=c.unbox(Jr));var ba=vn(Jr,null);pr=pr||ba.thisDep,Xt=Xt||ba.propDep,lr=lr||ba.contextDep}else{switch(fr(or,".",Dr,"="),typeof Jr){case"number":fr(Jr);break;case"string":fr('"',Jr,'"');break;case"object":Array.isArray(Jr)&&fr("[",Jr.join(),"]");break;default:fr(gt.link(Jr));break}fr(";")}});function qt(Dr,Jr){sr.forEach(function(ba){var yi=ir[ba];if(c.isDynamic(yi)){var Xa=Dr.invoke(Jr,yi);Jr(or,".",ba,"=",Xa,";")}})}Et.dynamic[Ft]=new c.DynamicVariable(xs,{thisDep:pr,contextDep:lr,propDep:Xt,ref:or,append:qt}),delete Et.static[Ft]}function hr(gt,Et,Ft,ir,fr){var sr=nn();sr.stats=sr.link(fr),Object.keys(Et.static).forEach(function(lr){Fr(sr,Et,lr)}),Br.forEach(function(lr){Fr(sr,gt,lr)});var pr=Ql(gt,Et,Ft,ir,sr);return pr.shader.program&&(pr.shader.program.attributes.sort(function(lr,Xt){return lr.name<Xt.name?-1:1}),pr.shader.program.uniforms.sort(function(lr,Xt){return lr.name<Xt.name?-1:1})),Ge(sr,pr),jt(sr,pr),mt(sr,pr),d(sr.compile(),{destroy:function(){pr.shader.program.destroy()}})}return{next:hn,current:Ii,procs:function(){var gt=nn(),Et=gt.proc("poll"),Ft=gt.proc("refresh"),ir=gt.block();Et(ir),Ft(ir);var fr=gt.shared,sr=fr.gl,pr=fr.next,lr=fr.current;ir(lr,".dirty=false;"),pl(gt,Et),pl(gt,Ft,null,!0);var Xt;gi&&(Xt=gt.link(gi)),cr.oes_vertex_array_object&&Ft(gt.link(cr.oes_vertex_array_object),".bindVertexArrayOES(null);");var or=Ft.def(fr.attributes),qt=Ft.def(0),Dr=gt.cond(qt,".buffer");Dr.then(sr,".enableVertexAttribArray(i);",sr,".bindBuffer(",Qr,",",qt,".buffer.buffer);",sr,".vertexAttribPointer(i,",qt,".size,",qt,".type,",qt,".normalized,",qt,".stride,",qt,".offset);").else(sr,".disableVertexAttribArray(i);",sr,".vertexAttrib4f(i,",qt,".x,",qt,".y,",qt,".z,",qt,".w);",qt,".buffer=null;");var Jr=gt.link(ua.maxAttributes,{stable:!0});return Ft("for(var i=0;i<",Jr,";++i){",qt,"=",or,"[i];",Dr,"}"),gi&&Ft("for(var i=0;i<",Jr,";++i){",Xt,".vertexAttribDivisorANGLE(i,",or,"[i].divisor);","}"),Ft(gt.shared.vao,".currentVAO=null;",gt.shared.vao,".setVAO(",gt.shared.vao,".targetVAO);"),Object.keys(Va).forEach(function(ba){var yi=Va[ba],Xa=ir.def(pr,".",ba),si=gt.block();si("if(",Xa,"){",sr,".enable(",yi,")}else{",sr,".disable(",yi,")}",lr,".",ba,"=",Xa,";"),Ft(si),Et("if(",Xa,"!==",lr,".",ba,"){",si,"}")}),Object.keys($i).forEach(function(ba){var yi=$i[ba],Xa=Ii[ba],si,Ji,Bi=gt.block();if(Bi(sr,".",yi,"("),Ya(Xa)){var pi=Xa.length;si=gt.global.def(pr,".",ba),Ji=gt.global.def(lr,".",ba),Bi(p(pi,function(wi){return si+"["+wi+"]"}),");",p(pi,function(wi){return Ji+"["+wi+"]="+si+"["+wi+"];"}).join("")),Et("if(",p(pi,function(wi){return si+"["+wi+"]!=="+Ji+"["+wi+"]"}).join("||"),"){",Bi,"}")}else si=ir.def(pr,".",ba),Ji=ir.def(lr,".",ba),Bi(si,");",lr,".",ba,"=",si,";"),Et("if(",si,"!==",Ji,"){",Bi,"}");Ft(Bi)}),gt.compile()}(),compile:hr}}function eo(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var $o=34918,io=34919,Zo=35007,ul=function(nt,Yt){if(!Yt.ext_disjoint_timer_query)return null;var cr=[];function ua(){return cr.pop()||Yt.ext_disjoint_timer_query.createQueryEXT()}function Aa(ii){cr.push(ii)}var xa=[];function wa(ii){var gi=ua();Yt.ext_disjoint_timer_query.beginQueryEXT(Zo,gi),xa.push(gi),ki(xa.length-1,xa.length,ii)}function Ja(){Yt.ext_disjoint_timer_query.endQueryEXT(Zo)}function Ai(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var bi=[];function fi(){return bi.pop()||new Ai}function yn(ii){bi.push(ii)}var Oi=[];function ki(ii,gi,Wa){var ji=fi();ji.startQueryIndex=ii,ji.endQueryIndex=gi,ji.sum=0,ji.stats=Wa,Oi.push(ji)}var qa=[],ea=[];function Ea(){var ii,gi,Wa=xa.length;if(Wa!==0){ea.length=Math.max(ea.length,Wa+1),qa.length=Math.max(qa.length,Wa+1),qa[0]=0,ea[0]=0;var ji=0;for(ii=0,gi=0;gi<xa.length;++gi){var Ii=xa[gi];Yt.ext_disjoint_timer_query.getQueryObjectEXT(Ii,io)?(ji+=Yt.ext_disjoint_timer_query.getQueryObjectEXT(Ii,$o),Aa(Ii)):xa[ii++]=Ii,qa[gi+1]=ji,ea[gi+1]=ii}for(xa.length=ii,ii=0,gi=0;gi<Oi.length;++gi){var hn=Oi[gi],Za=hn.startQueryIndex,Va=hn.endQueryIndex;hn.sum+=qa[Va]-qa[Za];var $i=ea[Za],zi=ea[Va];zi===$i?(hn.stats.gpuTime+=hn.sum/1e6,yn(hn)):(hn.startQueryIndex=$i,hn.endQueryIndex=zi,Oi[ii++]=hn)}Oi.length=ii}}return{beginQuery:wa,endQuery:Ja,pushScopeStats:ki,update:Ea,getNumPendingQueries:function(){return xa.length},clear:function(){cr.push.apply(cr,xa);for(var ii=0;ii<cr.length;ii++)Yt.ext_disjoint_timer_query.deleteQueryEXT(cr[ii]);xa.length=0,cr.length=0},restore:function(){xa.length=0,cr.length=0}}},el=16384,_l=256,gn=1024,vo=34962,cs="webglcontextlost",ps="webglcontextrestored",Tl=1,Gl=2,Tu=3;function Il(nt,Yt){for(var cr=0;cr<nt.length;++cr)if(nt[cr]===Yt)return cr;return-1}function yc(nt){var Yt=y(nt);if(!Yt)return null;var cr=Yt.gl,ua=cr.getContextAttributes(),Aa=cr.isContextLost(),xa=b(cr,Yt);if(!xa)return null;var wa=v(),Ja=eo(),Ai=Yt.cachedCode||{},bi=xa.extensions,fi=ul(cr,bi),yn=g(),Oi=cr.drawingBufferWidth,ki=cr.drawingBufferHeight,qa={tick:0,time:0,viewportWidth:Oi,viewportHeight:ki,framebufferWidth:Oi,framebufferHeight:ki,drawingBufferWidth:Oi,drawingBufferHeight:ki,pixelRatio:Yt.pixelRatio},ea={},Ea={elements:null,primitive:4,count:-1,offset:0,instances:-1},ii=jr(cr,bi),gi=ma(cr,Ja,Yt,Ii),Wa=dr(cr,bi,gi,Ja),ji=Pu(cr,bi,ii,Ja,gi,Wa,Ea);function Ii(te){return ji.destroyBuffer(te)}var hn=Hu(cr,wa,Ja,Yt),Za=Hc(cr,bi,ii,function(){zi.procs.poll()},qa,Ja,Yt),Va=Ac(cr,bi,ii,Ja,Yt),$i=Xc(cr,bi,ii,Za,Va,Ja),zi=Zn(cr,wa,bi,ii,gi,Wa,Za,$i,ea,ji,hn,Ea,qa,fi,Ai,Yt),Si=ru(cr,$i,zi.procs.poll,qa,ua,bi,ii),Ti=zi.next,Ki=cr.canvas,mn=[],In=[],Di=[],nn=[Yt.onDestroy],En=null;function Rn(){if(mn.length===0){fi&&fi.update(),En=null;return}En=f.next(Rn),bl();for(var te=mn.length-1;te>=0;--te){var me=mn[te];me&&me(qa,null,0)}cr.flush(),fi&&fi.update()}function Gn(){!En&&mn.length>0&&(En=f.next(Rn))}function Ps(){En&&(f.cancel(Rn),En=null)}function xl(te){te.preventDefault(),Aa=!0,Ps(),In.forEach(function(me){me()})}function ho(te){cr.getError(),Aa=!1,xa.restore(),hn.restore(),gi.restore(),Za.restore(),Va.restore(),$i.restore(),ji.restore(),fi&&fi.restore(),zi.procs.refresh(),Gn(),Di.forEach(function(me){me()})}Ki&&(Ki.addEventListener(cs,xl,!1),Ki.addEventListener(ps,ho,!1));function Hl(){mn.length=0,Ps(),Ki&&(Ki.removeEventListener(cs,xl),Ki.removeEventListener(ps,ho)),hn.clear(),$i.clear(),Va.clear(),ji.clear(),Za.clear(),Wa.clear(),gi.clear(),fi&&fi.clear(),nn.forEach(function(te){te()})}function fs(te){function me(sr){var pr=d({},sr);delete pr.uniforms,delete pr.attributes,delete pr.context,delete pr.vao,"stencil"in pr&&pr.stencil.op&&(pr.stencil.opBack=pr.stencil.opFront=pr.stencil.op,delete pr.stencil.op);function lr(Xt){if(Xt in pr){var or=pr[Xt];delete pr[Xt],Object.keys(or).forEach(function(qt){pr[Xt+"."+qt]=or[qt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(pr.vao=sr.vao),pr}function Ge(sr,pr){var lr={},Xt={};return Object.keys(sr).forEach(function(or){var qt=sr[or];if(c.isDynamic(qt)){Xt[or]=c.unbox(qt,or);return}else if(pr&&Array.isArray(qt)){for(var Dr=0;Dr<qt.length;++Dr)if(c.isDynamic(qt[Dr])){Xt[or]=c.unbox(qt,or);return}}lr[or]=qt}),{dynamic:Xt,static:lr}}var Le=Ge(te.context||{},!0),$e=Ge(te.uniforms||{},!0),mt=Ge(te.attributes||{},!1),jt=Ge(me(te),!1),_r={gpuTime:0,cpuTime:0,count:0},Fr=zi.compile(jt,mt,$e,Le,_r),hr=Fr.draw,gt=Fr.batch,Et=Fr.scope,Ft=[];function ir(sr){for(;Ft.length<sr;)Ft.push(null);return Ft}function fr(sr,pr){var lr;if(typeof sr=="function")return Et.call(this,null,sr,0);if(typeof pr=="function")if(typeof sr=="number")for(lr=0;lr<sr;++lr)Et.call(this,null,pr,lr);else if(Array.isArray(sr))for(lr=0;lr<sr.length;++lr)Et.call(this,sr[lr],pr,lr);else return Et.call(this,sr,pr,0);else if(typeof sr=="number"){if(sr>0)return gt.call(this,ir(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return gt.call(this,sr,sr.length)}else return hr.call(this,sr)}return d(fr,{stats:_r,destroy:function(){Fr.destroy()}})}var Al=$i.setFBO=fs({framebuffer:c.define.call(null,Tl,"framebuffer")});function El(te,me){var Ge=0;zi.procs.poll();var Le=me.color;Le&&(cr.clearColor(+Le[0]||0,+Le[1]||0,+Le[2]||0,+Le[3]||0),Ge|=el),"depth"in me&&(cr.clearDepth(+me.depth),Ge|=_l),"stencil"in me&&(cr.clearStencil(me.stencil|0),Ge|=gn),cr.clear(Ge)}function Ql(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var me=0;me<6;++me)Al(d({framebuffer:te.framebuffer.faces[me]},te),El);else Al(te,El);else El(null,te)}function Fs(te){mn.push(te);function me(){var Ge=Il(mn,te);function Le(){var $e=Il(mn,Le);mn[$e]=mn[mn.length-1],mn.length-=1,mn.length<=0&&Ps()}mn[Ge]=Le}return Gn(),{cancel:me}}function pl(){var te=Ti.viewport,me=Ti.scissor_box;te[0]=te[1]=me[0]=me[1]=0,qa.viewportWidth=qa.framebufferWidth=qa.drawingBufferWidth=te[2]=me[2]=cr.drawingBufferWidth,qa.viewportHeight=qa.framebufferHeight=qa.drawingBufferHeight=te[3]=me[3]=cr.drawingBufferHeight}function bl(){qa.tick+=1,qa.time=Cl(),pl(),zi.procs.poll()}function Hn(){Za.refresh(),pl(),zi.procs.refresh(),fi&&fi.update()}function Cl(){return(g()-yn)/1e3}Hn();function Lo(te,me){var Ge;switch(te){case"frame":return Fs(me);case"lost":Ge=In;break;case"restore":Ge=Di;break;case"destroy":Ge=nn;break;default:}return Ge.push(me),{cancel:function(){for(var Le=0;Le<Ge.length;++Le)if(Ge[Le]===me){Ge[Le]=Ge[Ge.length-1],Ge.pop();return}}}}function ve(){return Ai}function Y(te){Object.entries(te).forEach(function(me){Ai[me[0]]=me[1]})}var ye=d(fs,{clear:Ql,prop:c.define.bind(null,Tl),context:c.define.bind(null,Gl),this:c.define.bind(null,Tu),draw:fs({}),buffer:function(te){return gi.create(te,vo,!1,!1)},elements:function(te){return Wa.create(te,!1)},texture:Za.create2D,cube:Za.createCube,renderbuffer:Va.create,framebuffer:$i.create,framebufferCube:$i.createCube,vao:ji.createVAO,attributes:ua,frame:Fs,on:Lo,limits:ii,hasExtension:function(te){return ii.extensions.indexOf(te.toLowerCase())>=0},read:Si,destroy:Hl,_gl:cr,_refresh:Hn,poll:function(){bl(),fi&&fi.update()},now:Cl,stats:Ja,getCachedCode:ve,preloadCachedCode:Y});return Yt.onDone(null,ye),ye}return yc})}}),_q=Ze({"node_modules/gl-util/context.js"(Z,q){"use strict";var d=Ev();q.exports=function(o){if(o?typeof o=="string"&&(o={container:o}):o={},A(o)?o={container:o}:M(o)?o={container:o}:e(o)?o={gl:o}:o=d(o,{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),o.pixelRatio||(o.pixelRatio=window.pixelRatio||1),o.gl)return o.gl;if(o.canvas&&(o.container=o.canvas.parentNode),o.container){if(typeof o.container=="string"){var a=document.querySelector(o.container);if(!a)throw Error("Element "+o.container+" is not found");o.container=a}A(o.container)?(o.canvas=o.container,o.container=o.canvas.parentNode):o.canvas||(o.canvas=t(),o.container.appendChild(o.canvas),x(o))}else if(!o.canvas)if(typeof document<"u")o.container=document.body||document.documentElement,o.canvas=t(),o.container.appendChild(o.canvas),x(o);else throw Error("Not DOM environment. Use headless-gl.");return o.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(i){try{o.gl=o.canvas.getContext(i,o.attrs)}catch{}return o.gl}),o.gl};function x(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*window.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*window.innerHeight);else{var o=r.container.getBoundingClientRect();r.canvas.width=r.width||o.right-o.left,r.canvas.height=r.height||o.bottom-o.top}}function A(r){return typeof r.getContext=="function"&&"width"in r&&"height"in r}function M(r){return typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.getBoundingClientRect=="function"}function e(r){return typeof r.drawArrays=="function"||typeof r.drawElements=="function"}function t(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}}}),xq=Ze({"node_modules/font-atlas/index.js"(Z,q){"use strict";var d=u6(),x=[32,126];q.exports=A;function A(M){M=M||{};var e=M.shape?M.shape:M.canvas?[M.canvas.width,M.canvas.height]:[512,512],t=M.canvas||document.createElement("canvas"),r=M.font,o=typeof M.step=="number"?[M.step,M.step]:M.step||[32,32],a=M.chars||x;if(r&&typeof r!="string"&&(r=d(r)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var i=[],n=a[0],s=0;n<=a[1];n++)i[s++]=String.fromCharCode(n);a=i}e=e.slice(),t.width=e[0],t.height=e[1];var c=t.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,t.width,t.height),c.font=r,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var f=o[0]/2,g=o[1]/2,n=0;n<a.length;n++)c.fillText(a[n],f,g),(f+=o[0])>e[0]-o[0]/2&&(f=o[0]/2,g+=o[1]);return t}}}),c6=Ze({"node_modules/bit-twiddle/twiddle.js"(Z){"use strict";"use restrict";var q=32;Z.INT_BITS=q,Z.INT_MAX=2147483647,Z.INT_MIN=-1<<q-1,Z.sign=function(A){return(A>0)-(A<0)},Z.abs=function(A){var M=A>>q-1;return(A^M)-M},Z.min=function(A,M){return M^(A^M)&-(A<M)},Z.max=function(A,M){return A^(A^M)&-(A<M)},Z.isPow2=function(A){return!(A&A-1)&&!!A},Z.log2=function(A){var M,e;return M=(A>65535)<<4,A>>>=M,e=(A>255)<<3,A>>>=e,M|=e,e=(A>15)<<2,A>>>=e,M|=e,e=(A>3)<<1,A>>>=e,M|=e,M|A>>1},Z.log10=function(A){return A>=1e9?9:A>=1e8?8:A>=1e7?7:A>=1e6?6:A>=1e5?5:A>=1e4?4:A>=1e3?3:A>=100?2:A>=10?1:0},Z.popCount=function(A){return A=A-(A>>>1&1431655765),A=(A&858993459)+(A>>>2&858993459),(A+(A>>>4)&252645135)*16843009>>>24};function d(A){var M=32;return A&=-A,A&&M--,A&65535&&(M-=16),A&16711935&&(M-=8),A&252645135&&(M-=4),A&858993459&&(M-=2),A&1431655765&&(M-=1),M}Z.countTrailingZeros=d,Z.nextPow2=function(A){return A+=A===0,--A,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A+1},Z.prevPow2=function(A){return A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A-(A>>>1)},Z.parity=function(A){return A^=A>>>16,A^=A>>>8,A^=A>>>4,A&=15,27030>>>A&1};var x=new Array(256);(function(A){for(var M=0;M<256;++M){var e=M,t=M,r=7;for(e>>>=1;e;e>>>=1)t<<=1,t|=e&1,--r;A[M]=t<<r&255}})(x),Z.reverse=function(A){return x[A&255]<<24|x[A>>>8&255]<<16|x[A>>>16&255]<<8|x[A>>>24&255]},Z.interleave2=function(A,M){return A&=65535,A=(A|A<<8)&16711935,A=(A|A<<4)&252645135,A=(A|A<<2)&858993459,A=(A|A<<1)&1431655765,M&=65535,M=(M|M<<8)&16711935,M=(M|M<<4)&252645135,M=(M|M<<2)&858993459,M=(M|M<<1)&1431655765,A|M<<1},Z.deinterleave2=function(A,M){return A=A>>>M&1431655765,A=(A|A>>>1)&858993459,A=(A|A>>>2)&252645135,A=(A|A>>>4)&16711935,A=(A|A>>>16)&65535,A<<16>>16},Z.interleave3=function(A,M,e){return A&=1023,A=(A|A<<16)&4278190335,A=(A|A<<8)&251719695,A=(A|A<<4)&3272356035,A=(A|A<<2)&1227133513,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,A|=M<<1,e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,A|e<<2},Z.deinterleave3=function(A,M){return A=A>>>M&1227133513,A=(A|A>>>2)&3272356035,A=(A|A>>>4)&251719695,A=(A|A>>>8)&4278190335,A=(A|A>>>16)&1023,A<<22>>22},Z.nextCombination=function(A){var M=A|A-1;return M+1|(~M&-~M)-1>>>d(A)+1}}}),bq=Ze({"node_modules/dup/dup.js"(Z,q){"use strict";function d(M,e,t){var r=M[t]|0;if(r<=0)return[];var o=new Array(r),a;if(t===M.length-1)for(a=0;a<r;++a)o[a]=e;else for(a=0;a<r;++a)o[a]=d(M,e,t+1);return o}function x(M,e){var t,r;for(t=new Array(M),r=0;r<M;++r)t[r]=e;return t}function A(M,e){switch(typeof e>"u"&&(e=0),typeof M){case"number":if(M>0)return x(M|0,e);break;case"object":if(typeof M.length=="number")return d(M,e,0);break}return[]}q.exports=A}}),wq=Ze({"node_modules/typedarray-pool/pool.js"(Z){"use strict";var q=c6(),d=bq(),x=tg().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:d([32,0]),UINT16:d([32,0]),UINT32:d([32,0]),BIGUINT64:d([32,0]),INT8:d([32,0]),INT16:d([32,0]),INT32:d([32,0]),BIGINT64:d([32,0]),FLOAT:d([32,0]),DOUBLE:d([32,0]),DATA:d([32,0]),UINT8C:d([32,0]),BUFFER:d([32,0])});var A=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",e=typeof BigInt64Array<"u",t=window.__TYPEDARRAY_POOL;t.UINT8C||(t.UINT8C=d([32,0])),t.BIGUINT64||(t.BIGUINT64=d([32,0])),t.BIGINT64||(t.BIGINT64=d([32,0])),t.BUFFER||(t.BUFFER=d([32,0]));var r=t.DATA,o=t.BUFFER;Z.free=function(u){if(x.isBuffer(u))o[q.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var m=u.length||u.byteLength,h=q.log2(m)|0;r[h].push(u)}};function a(p){if(p){var u=p.length||p.byteLength,m=q.log2(u);r[m].push(p)}}function i(p){a(p.buffer)}Z.freeUint8=Z.freeUint16=Z.freeUint32=Z.freeBigUint64=Z.freeInt8=Z.freeInt16=Z.freeInt32=Z.freeBigInt64=Z.freeFloat32=Z.freeFloat=Z.freeFloat64=Z.freeDouble=Z.freeUint8Clamped=Z.freeDataView=i,Z.freeArrayBuffer=a,Z.freeBuffer=function(u){o[q.log2(u.length)].push(u)},Z.malloc=function(u,m){if(m===void 0||m==="arraybuffer")return n(u);switch(m){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return f(u);case"int8":return g(u);case"int16":return v(u);case"int32":return T(u);case"float":case"float32":return l(u);case"double":case"float64":return _(u);case"uint8_clamped":return w(u);case"bigint64":return E(u);case"biguint64":return S(u);case"buffer":return b(u);case"data":case"dataview":return y(u);default:return null}return null};function n(u){var u=q.nextPow2(u),m=q.log2(u),h=r[m];return h.length>0?h.pop():new ArrayBuffer(u)}Z.mallocArrayBuffer=n;function s(p){return new Uint8Array(n(p),0,p)}Z.mallocUint8=s;function c(p){return new Uint16Array(n(2*p),0,p)}Z.mallocUint16=c;function f(p){return new Uint32Array(n(4*p),0,p)}Z.mallocUint32=f;function g(p){return new Int8Array(n(p),0,p)}Z.mallocInt8=g;function v(p){return new Int16Array(n(2*p),0,p)}Z.mallocInt16=v;function T(p){return new Int32Array(n(4*p),0,p)}Z.mallocInt32=T;function l(p){return new Float32Array(n(4*p),0,p)}Z.mallocFloat32=Z.mallocFloat=l;function _(p){return new Float64Array(n(8*p),0,p)}Z.mallocFloat64=Z.mallocDouble=_;function w(p){return A?new Uint8ClampedArray(n(p),0,p):s(p)}Z.mallocUint8Clamped=w;function S(p){return M?new BigUint64Array(n(8*p),0,p):null}Z.mallocBigUint64=S;function E(p){return e?new BigInt64Array(n(8*p),0,p):null}Z.mallocBigInt64=E;function y(p){return new DataView(n(p),0,p)}Z.mallocDataView=y;function b(p){p=q.nextPow2(p);var u=q.log2(p),m=o[u];return m.length>0?m.pop():new x(p)}Z.mallocBuffer=b,Z.clearCache=function(){for(var u=0;u<32;++u)t.UINT8[u].length=0,t.UINT16[u].length=0,t.UINT32[u].length=0,t.INT8[u].length=0,t.INT16[u].length=0,t.INT32[u].length=0,t.FLOAT[u].length=0,t.DOUBLE[u].length=0,t.BIGUINT64[u].length=0,t.BIGINT64[u].length=0,t.UINT8C[u].length=0,r[u].length=0,o[u].length=0}}}),Tq=Ze({"node_modules/is-plain-obj/index.js"(Z,q){"use strict";var d=Object.prototype.toString;q.exports=function(x){var A;return d.call(x)==="[object Object]"&&(A=Object.getPrototypeOf(x),A===null||A===Object.getPrototypeOf({}))}}}),f6=Ze({"node_modules/parse-unit/index.js"(Z,q){q.exports=function(x,A){A||(A=[0,""]),x=String(x);var M=parseFloat(x,10);return A[0]=M,A[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",A}}}),Aq=Ze({"node_modules/to-px/topx.js"(Z,q){"use strict";var d=f6();q.exports=e;var x=96;function A(t,r){var o=d(getComputedStyle(t).getPropertyValue(r));return o[0]*e(o[1],t)}function M(t,r){var o=document.createElement("div");o.style["font-size"]="128"+t,r.appendChild(o);var a=A(o,"font-size")/128;return r.removeChild(o),a}function e(t,r){switch(r=r||document.body,t=(t||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),t){case"%":return r.clientHeight/100;case"ch":case"ex":return M(t,r);case"em":return A(r,"font-size");case"rem":return A(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 x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),Sq=Ze({"node_modules/detect-kerning/index.js"(Z,q){"use strict";q.exports=M;var d=M.canvas=document.createElement("canvas"),x=d.getContext("2d"),A=e([32,126]);M.createPairs=e,M.ascii=A;function M(t,r){Array.isArray(t)&&(t=t.join(", "));var o={},a,i=16,n=.05;r&&(r.length===2&&typeof r[0]=="number"?a=e(r):Array.isArray(r)?a=r:(r.o?a=e(r.o):r.pairs&&(a=r.pairs),r.fontSize&&(i=r.fontSize),r.threshold!=null&&(n=r.threshold))),a||(a=A),x.font=i+"px "+t;for(var s=0;s<a.length;s++){var c=a[s],f=x.measureText(c[0]).width+x.measureText(c[1]).width,g=x.measureText(c).width;if(Math.abs(f-g)>i*n){var v=(g-f)/i;o[c]=v*1e3}}return o}function e(t){for(var r=[],o=t[0];o<=t[1];o++)for(var a=String.fromCharCode(o),i=t[0];i<t[1];i++){var n=String.fromCharCode(i),s=a+n;r.push(s)}return r}}}),Mq=Ze({"node_modules/font-measure/index.js"(Z,q){"use strict";q.exports=d,d.canvas=document.createElement("canvas"),d.cache={};function d(n,t){t||(t={}),(typeof n=="string"||Array.isArray(n))&&(t.family=n);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var o=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",i=t.style||t.fontStyle||"",n=[i,a,o].join(" ")+"px "+r,s=t.origin||"top";if(d.cache[r]&&o<=d.cache[r].em)return x(d.cache[r],s);var c=t.canvas||d.canvas,f=c.getContext("2d"),g={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"},v=Math.ceil(o*1.5);c.height=v,c.width=v*.5,f.font=n;var T="H",l={top:0};f.clearRect(0,0,v,v),f.textBaseline="top",f.fillStyle="black",f.fillText(T,0,0);var _=A(f.getImageData(0,0,v,v));f.clearRect(0,0,v,v),f.textBaseline="bottom",f.fillText(T,0,v);var w=A(f.getImageData(0,0,v,v));l.lineHeight=l.bottom=v-w+_,f.clearRect(0,0,v,v),f.textBaseline="alphabetic",f.fillText(T,0,v);var S=A(f.getImageData(0,0,v,v)),E=v-S-1+_;l.baseline=l.alphabetic=E,f.clearRect(0,0,v,v),f.textBaseline="middle",f.fillText(T,0,v*.5);var y=A(f.getImageData(0,0,v,v));l.median=l.middle=v-y-1+_-v*.5,f.clearRect(0,0,v,v),f.textBaseline="hanging",f.fillText(T,0,v*.5);var b=A(f.getImageData(0,0,v,v));l.hanging=v-b-1+_-v*.5,f.clearRect(0,0,v,v),f.textBaseline="ideographic",f.fillText(T,0,v);var p=A(f.getImageData(0,0,v,v));if(l.ideographic=v-p-1+_,g.upper&&(f.clearRect(0,0,v,v),f.textBaseline="top",f.fillText(g.upper,0,0),l.upper=A(f.getImageData(0,0,v,v)),l.capHeight=l.baseline-l.upper),g.lower&&(f.clearRect(0,0,v,v),f.textBaseline="top",f.fillText(g.lower,0,0),l.lower=A(f.getImageData(0,0,v,v)),l.xHeight=l.baseline-l.lower),g.tittle&&(f.clearRect(0,0,v,v),f.textBaseline="top",f.fillText(g.tittle,0,0),l.tittle=A(f.getImageData(0,0,v,v))),g.ascent&&(f.clearRect(0,0,v,v),f.textBaseline="top",f.fillText(g.ascent,0,0),l.ascent=A(f.getImageData(0,0,v,v))),g.descent&&(f.clearRect(0,0,v,v),f.textBaseline="top",f.fillText(g.descent,0,0),l.descent=M(f.getImageData(0,0,v,v))),g.overshoot){f.clearRect(0,0,v,v),f.textBaseline="top",f.fillText(g.overshoot,0,0);var u=M(f.getImageData(0,0,v,v));l.overshoot=u-E}for(var m in l)l[m]/=o;return l.em=o,d.cache[r]=l,x(l,s)}function x(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var o in e)o!=="em"&&(r[o]=e[o]-t);return r}function A(e){for(var t=e.height,r=e.data,o=3;o<r.length;o+=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}function M(e){for(var t=e.height,r=e.data,o=r.length-1;o>0;o-=4)if(r[o]!==0)return Math.floor((o-3)*.25/t)}}}),Eq=Ze({"node_modules/gl-text/dist.js"(Z,q){"use strict";var d=gq(),x=Ev(),A=yq(),M=_q(),e=t6(),t=h0(),r=xq(),o=wq(),a=k1(),i=Tq(),n=f6(),s=Aq(),c=Sq(),f=sh(),g=Mq(),v=mg(),T=c6(),l=T.nextPow2,_=new e,w=!1;document.body&&(S=document.body.appendChild(document.createElement("div")),S.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(S).fontStretch&&(w=!0),document.body.removeChild(S));var S,E=function(p){y(p)?(p={regl:p},this.gl=p.regl._gl):this.gl=M(p),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=p.regl||A({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(),_.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(i(p)?p:{})};E.prototype.createShader=function(){var p=this.regl,u=p({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:p.prop("count"),offset:p.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:p.this("sizeBuffer")},width:{offset:0,stride:8,buffer:p.this("sizeBuffer")},char:p.this("charBuffer"),position:p.this("position")},uniforms:{atlasSize:function(h,P){return[P.atlas.width,P.atlas.height]},atlasDim:function(h,P){return[P.atlas.cols,P.atlas.rows]},atlas:function(h,P){return P.atlas.texture},charStep:function(h,P){return P.atlas.step},em:function(h,P){return P.atlas.em},color:p.prop("color"),opacity:p.prop("opacity"),viewport:p.this("viewportArray"),scale:p.this("scale"),align:p.prop("align"),baseline:p.prop("baseline"),translate:p.this("translate"),positionOffset:p.prop("positionOffset")},primitive:"points",viewport:p.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;
}`}),m={};return{regl:p,draw:u,atlas:m}},E.prototype.update=function(p){var u=this;if(typeof p=="string")p={text:p};else if(!p)return;p=x(p,{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),p.opacity!=null&&(Array.isArray(p.opacity)?this.opacity=p.opacity.map(function(fe){return parseFloat(fe)}):this.opacity=parseFloat(p.opacity)),p.viewport!=null&&(this.viewport=a(p.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]),p.kerning!=null&&(this.kerning=p.kerning),p.offset!=null&&(typeof p.offset=="number"&&(p.offset=[p.offset,0]),this.positionOffset=v(p.offset)),p.direction&&(this.direction=p.direction),p.range&&(this.range=p.range,this.scale=[1/(p.range[2]-p.range[0]),1/(p.range[3]-p.range[1])],this.translate=[-p.range[0],-p.range[1]]),p.scale&&(this.scale=p.scale),p.translate&&(this.translate=p.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!p.font&&(p.font=E.baseFontSize+"px sans-serif");var m=!1,h=!1;if(p.font&&(Array.isArray(p.font)?p.font:[p.font]).forEach(function(fe,Fe){if(typeof fe=="string")try{fe=d.parse(fe)}catch{fe=d.parse(E.baseFontSize+"px "+fe)}else{var rt=fe.style,st=fe.weight,Qe=fe.stretch,Lt=fe.variant;fe=d.parse(d.stringify(fe)),rt&&(fe.style=rt),st&&(fe.weight=st),Qe&&(fe.stretch=Qe),Lt&&(fe.variant=Lt)}var kt=d.stringify({size:E.baseFontSize,family:fe.family,stretch:w?fe.stretch:void 0,variant:fe.variant,weight:fe.weight,style:fe.style}),Vt=n(fe.size),Zt=Math.round(Vt[0]*s(Vt[1]));if(Zt!==u.fontSize[Fe]&&(h=!0,u.fontSize[Fe]=Zt),(!u.font[Fe]||kt!=u.font[Fe].baseString)&&(m=!0,u.font[Fe]=E.fonts[kt],!u.font[Fe])){var Sr=fe.family.join(", "),xr=[fe.style];fe.style!=fe.variant&&xr.push(fe.variant),fe.variant!=fe.weight&&xr.push(fe.weight),w&&fe.weight!=fe.stretch&&xr.push(fe.stretch),u.font[Fe]={baseString:kt,family:Sr,weight:fe.weight,stretch:fe.stretch,style:fe.style,variant:fe.variant,width:{},kerning:{},metrics:g(Sr,{origin:"top",fontSize:E.baseFontSize,fontStyle:xr.join(" ")})},E.fonts[kt]=u.font[Fe]}}),(m||h)&&this.font.forEach(function(fe,Fe){var rt=d.stringify({size:u.fontSize[Fe],family:fe.family,stretch:w?fe.stretch:void 0,variant:fe.variant,weight:fe.weight,style:fe.style});if(u.fontAtlas[Fe]=u.shader.atlas[rt],!u.fontAtlas[Fe]){var st=fe.metrics;u.shader.atlas[rt]=u.fontAtlas[Fe]={fontString:rt,step:Math.ceil(u.fontSize[Fe]*st.bottom*.5)*2,em:u.fontSize[Fe],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}p.text==null&&(p.text=u.text)}),typeof p.text=="string"&&p.position&&p.position.length>2){for(var P=Array(p.position.length*.5),L=0;L<P.length;L++)P[L]=p.text;p.text=P}var z;if(p.text!=null||m){if(this.textOffsets=[0],Array.isArray(p.text)){this.count=p.text[0].length,this.counts=[this.count];for(var F=1;F<p.text.length;F++)this.textOffsets[F]=this.textOffsets[F-1]+p.text[F-1].length,this.count+=p.text[F].length,this.counts.push(p.text[F].length);this.text=p.text.join("")}else this.text=p.text,this.count=this.text.length,this.counts=[this.count];z=[],this.font.forEach(function(fe,Fe){E.atlasContext.font=fe.baseString;for(var rt=u.fontAtlas[Fe],st=0;st<u.text.length;st++){var Qe=u.text.charAt(st);if(rt.ids[Qe]==null&&(rt.ids[Qe]=rt.chars.length,rt.chars.push(Qe),z.push(Qe)),fe.width[Qe]==null&&(fe.width[Qe]=E.atlasContext.measureText(Qe).width/E.baseFontSize,u.kerning)){var Lt=[];for(var kt in fe.width)Lt.push(kt+Qe,Qe+kt);f(fe.kerning,c(fe.family,{pairs:Lt}))}}})}if(p.position)if(p.position.length>2){for(var B=!p.position[0].length,O=o.mallocFloat(this.count*2),I=0,N=0;I<this.counts.length;I++){var U=this.counts[I];if(B)for(var W=0;W<U;W++)O[N++]=p.position[I*2],O[N++]=p.position[I*2+1];else for(var Q=0;Q<U;Q++)O[N++]=p.position[I][0],O[N++]=p.position[I][1]}this.position.call?this.position({type:"float",data:O}):this.position=this.regl.buffer({type:"float",data:O}),o.freeFloat(O)}else this.position.destroy&&this.position.destroy(),this.position={constant:p.position};if(p.text||m){var ue=o.mallocUint8(this.count),le=o.mallocFloat(this.count*2);this.textWidth=[];for(var he=0,G=0;he<this.counts.length;he++){for(var $=this.counts[he],J=this.font[he]||this.font[0],X=this.fontAtlas[he]||this.fontAtlas[0],oe=0;oe<$;oe++){var ie=this.text.charAt(G),j=this.text.charAt(G-1);if(ue[G]=X.ids[ie],le[G*2]=J.width[ie],oe){var ee=le[G*2-2],re=le[G*2],ce=le[G*2-1],be=ce+ee*.5+re*.5;if(this.kerning){var Ae=J.kerning[j+ie];Ae&&(be+=Ae*.001)}le[G*2+1]=be}else le[G*2+1]=le[G*2]*.5;G++}this.textWidth.push(le.length?le[G*2-2]*.5+le[G*2-1]:0)}p.align||(p.align=this.align),this.charBuffer({data:ue,type:"uint8",usage:"stream"}),this.sizeBuffer({data:le,type:"float",usage:"stream"}),o.freeUint8(ue),o.freeFloat(le),z.length&&this.font.forEach(function(fe,Fe){var rt=u.fontAtlas[Fe],st=rt.step,Qe=Math.floor(E.maxAtlasSize/st),Lt=Math.min(Qe,rt.chars.length),kt=Math.ceil(rt.chars.length/Lt),Vt=l(Lt*st),Zt=l(kt*st);rt.width=Vt,rt.height=Zt,rt.rows=kt,rt.cols=Lt,rt.em&&rt.texture({data:r({canvas:E.atlasCanvas,font:rt.fontString,chars:rt.chars,shape:[Vt,Zt],step:[st,st]})})})}if(p.align&&(this.align=p.align,this.alignOffset=this.textWidth.map(function(fe,Fe){var rt=Array.isArray(u.align)?u.align.length>1?u.align[Fe]:u.align[0]:u.align;if(typeof rt=="number")return rt;switch(rt){case"right":case"end":return-fe;case"center":case"centre":case"middle":return-fe*.5}return 0})),this.baseline==null&&p.baseline==null&&(p.baseline=0),p.baseline!=null&&(this.baseline=p.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(fe,Fe){var rt=(u.font[Fe]||u.font[0]).metrics,st=0;return st+=rt.bottom*.5,typeof fe=="number"?st+=fe-rt.baseline:st+=-rt[fe],st*=-1,st})),p.color!=null)if(p.color||(p.color="transparent"),typeof p.color=="string"||!isNaN(p.color))this.color=t(p.color,"uint8");else{var ze;if(typeof p.color[0]=="number"&&p.color.length>this.counts.length){var Re=p.color.length;ze=o.mallocUint8(Re);for(var Xe=(p.color.subarray||p.color.slice).bind(p.color),it=0;it<Re;it+=4)ze.set(t(Xe(it,it+4),"uint8"),it)}else{var ot=p.color.length;ze=o.mallocUint8(ot*4);for(var tt=0;tt<ot;tt++)ze.set(t(p.color[tt]||0,"uint8"),tt*4)}this.color=ze}if(p.position||p.text||p.color||p.baseline||p.align||p.font||p.offset||p.opacity){var lt=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(lt){var Ee=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(Ee);for(var _e=0;_e<this.batch.length;_e++)this.batch[_e]={count:this.counts.length>1?this.counts[_e]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[_e]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(_e*4,_e*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[_e]:this.opacity,baseline:this.baselineOffset[_e]!=null?this.baselineOffset[_e]:this.baselineOffset[0],align:this.align?this.alignOffset[_e]!=null?this.alignOffset[_e]:this.alignOffset[0]:0,atlas:this.fontAtlas[_e]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(_e*2,_e*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=[]}},E.prototype.destroy=function(){},E.prototype.kerning=!0,E.prototype.position={constant:new Float32Array(2)},E.prototype.translate=null,E.prototype.scale=null,E.prototype.font=null,E.prototype.text="",E.prototype.positionOffset=[0,0],E.prototype.opacity=1,E.prototype.color=new Uint8Array([0,0,0,255]),E.prototype.alignOffset=[0,0],E.maxAtlasSize=1024,E.atlasCanvas=document.createElement("canvas"),E.atlasContext=E.atlasCanvas.getContext("2d",{alpha:!1}),E.baseFontSize=64,E.fonts={};function y(b){return typeof b=="function"&&b._gl&&b.prop&&b.texture&&b.buffer}q.exports=E}}),Cq=Ze({"node_modules/@plotly/regl/dist/regl.unchecked.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?q.exports=x():d.createREGL=x()})(Z,function(){"use strict";var d=function(nt,Yt){for(var cr=Object.keys(Yt),ua=0;ua<cr.length;++ua)nt[cr[ua]]=Yt[cr[ua]];return nt},x=0,A=0,M=5,e=6;function t(nt,Yt){this.id=x++,this.type=nt,this.data=Yt}function r(nt){return nt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function o(nt){if(nt.length===0)return[];var Yt=nt.charAt(0),cr=nt.charAt(nt.length-1);if(nt.length>1&&Yt===cr&&(Yt==='"'||Yt==="'"))return['"'+r(nt.substr(1,nt.length-2))+'"'];var ua=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(nt);if(ua)return o(nt.substr(0,ua.index)).concat(o(ua[1])).concat(o(nt.substr(ua.index+ua[0].length)));var Aa=nt.split(".");if(Aa.length===1)return['"'+r(nt)+'"'];for(var xa=[],wa=0;wa<Aa.length;++wa)xa=xa.concat(o(Aa[wa]));return xa}function a(nt){return"["+o(nt).join("][")+"]"}function i(nt,Yt){return new t(nt,a(Yt+""))}function n(nt){return typeof nt=="function"&&!nt._reglType||nt instanceof t}function s(nt,Yt){if(typeof nt=="function")return new t(A,nt);if(typeof nt=="number"||typeof nt=="boolean")return new t(M,nt);if(Array.isArray(nt))return new t(e,nt.map(function(cr,ua){return s(cr,Yt+"["+ua+"]")}));if(nt instanceof t)return nt}var c={DynamicVariable:t,define:i,isDynamic:n,unbox:s,accessor:a},f={next:typeof requestAnimationFrame=="function"?function(nt){return requestAnimationFrame(nt)}:function(nt){return setTimeout(nt,16)},cancel:typeof cancelAnimationFrame=="function"?function(nt){return cancelAnimationFrame(nt)}:clearTimeout},g=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function v(){var nt={"":0},Yt=[""];return{id:function(cr){var ua=nt[cr];return ua||(ua=nt[cr]=Yt.length,Yt.push(cr),ua)},str:function(cr){return Yt[cr]}}}function T(nt,Yt,cr){var ua=document.createElement("canvas");d(ua.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),nt.appendChild(ua),nt===document.body&&(ua.style.position="absolute",d(nt.style,{margin:0,padding:0}));function Aa(){var Ja=window.innerWidth,Ai=window.innerHeight;if(nt!==document.body){var bi=ua.getBoundingClientRect();Ja=bi.right-bi.left,Ai=bi.bottom-bi.top}ua.width=cr*Ja,ua.height=cr*Ai}var xa;nt!==document.body&&typeof ResizeObserver=="function"?(xa=new ResizeObserver(function(){setTimeout(Aa)}),xa.observe(nt)):window.addEventListener("resize",Aa,!1);function wa(){xa?xa.disconnect():window.removeEventListener("resize",Aa),nt.removeChild(ua)}return Aa(),{canvas:ua,onDestroy:wa}}function l(nt,Yt){function cr(ua){try{return nt.getContext(ua,Yt)}catch{return null}}return cr("webgl")||cr("experimental-webgl")||cr("webgl-experimental")}function _(nt){return typeof nt.nodeName=="string"&&typeof nt.appendChild=="function"&&typeof nt.getBoundingClientRect=="function"}function w(nt){return typeof nt.drawArrays=="function"||typeof nt.drawElements=="function"}function S(nt){return typeof nt=="string"?nt.split():nt}function E(nt){return typeof nt=="string"?document.querySelector(nt):nt}function y(nt){var Yt=nt||{},cr,ua,Aa,xa,wa={},Ja=[],Ai=[],bi=typeof window>"u"?1:window.devicePixelRatio,fi=!1,yn={},Oi=function(ea){},ki=function(){};if(typeof Yt=="string"?cr=document.querySelector(Yt):typeof Yt=="object"&&(_(Yt)?cr=Yt:w(Yt)?(xa=Yt,Aa=xa.canvas):("gl"in Yt?xa=Yt.gl:"canvas"in Yt?Aa=E(Yt.canvas):"container"in Yt&&(ua=E(Yt.container)),"attributes"in Yt&&(wa=Yt.attributes),"extensions"in Yt&&(Ja=S(Yt.extensions)),"optionalExtensions"in Yt&&(Ai=S(Yt.optionalExtensions)),"onDone"in Yt&&(Oi=Yt.onDone),"profile"in Yt&&(fi=!!Yt.profile),"pixelRatio"in Yt&&(bi=+Yt.pixelRatio),"cachedCode"in Yt&&(yn=Yt.cachedCode))),cr&&(cr.nodeName.toLowerCase()==="canvas"?Aa=cr:ua=cr),!xa){if(!Aa){var qa=T(ua||document.body,Oi,bi);if(!qa)return null;Aa=qa.canvas,ki=qa.onDestroy}wa.premultipliedAlpha===void 0&&(wa.premultipliedAlpha=!0),xa=l(Aa,wa)}return xa?{gl:xa,canvas:Aa,container:ua,extensions:Ja,optionalExtensions:Ai,pixelRatio:bi,profile:fi,cachedCode:yn,onDone:Oi,onDestroy:ki}:(ki(),Oi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function b(nt,Yt){var cr={};function ua(wa){var Ja=wa.toLowerCase(),Ai;try{Ai=cr[Ja]=nt.getExtension(Ja)}catch{}return!!Ai}for(var Aa=0;Aa<Yt.extensions.length;++Aa){var xa=Yt.extensions[Aa];if(!ua(xa))return Yt.onDestroy(),Yt.onDone('"'+xa+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return Yt.optionalExtensions.forEach(ua),{extensions:cr,restore:function(){Object.keys(cr).forEach(function(wa){if(cr[wa]&&!ua(wa))throw new Error("(regl): error restoring extension "+wa)})}}}function p(nt,Yt){for(var cr=Array(nt),ua=0;ua<nt;++ua)cr[ua]=Yt(ua);return cr}var u=5120,m=5121,h=5122,P=5123,L=5124,z=5125,F=5126;function B(nt){for(var Yt=16;Yt<=1<<28;Yt*=16)if(nt<=Yt)return Yt;return 0}function O(nt){var Yt,cr;return Yt=(nt>65535)<<4,nt>>>=Yt,cr=(nt>255)<<3,nt>>>=cr,Yt|=cr,cr=(nt>15)<<2,nt>>>=cr,Yt|=cr,cr=(nt>3)<<1,nt>>>=cr,Yt|=cr,Yt|nt>>1}function I(){var nt=p(8,function(){return[]});function Yt(xa){var wa=B(xa),Ja=nt[O(wa)>>2];return Ja.length>0?Ja.pop():new ArrayBuffer(wa)}function cr(xa){nt[O(xa.byteLength)>>2].push(xa)}function ua(xa,wa){var Ja=null;switch(xa){case u:Ja=new Int8Array(Yt(wa),0,wa);break;case m:Ja=new Uint8Array(Yt(wa),0,wa);break;case h:Ja=new Int16Array(Yt(2*wa),0,wa);break;case P:Ja=new Uint16Array(Yt(2*wa),0,wa);break;case L:Ja=new Int32Array(Yt(4*wa),0,wa);break;case z:Ja=new Uint32Array(Yt(4*wa),0,wa);break;case F:Ja=new Float32Array(Yt(4*wa),0,wa);break;default:return null}return Ja.length!==wa?Ja.subarray(0,wa):Ja}function Aa(xa){cr(xa.buffer)}return{alloc:Yt,free:cr,allocType:ua,freeType:Aa}}var N=I();N.zero=I();var U=3408,W=3410,Q=3411,ue=3412,le=3413,he=3414,G=3415,$=33901,J=33902,X=3379,oe=3386,ie=34921,j=36347,ee=36348,re=35661,ce=35660,be=34930,Ae=36349,ze=34076,Re=34024,Xe=7936,it=7937,ot=7938,tt=35724,lt=34047,Ee=36063,_e=34852,fe=3553,Fe=34067,rt=34069,st=33984,Qe=6408,Lt=5126,kt=5121,Vt=36160,Zt=36053,Sr=36064,xr=16384,jr=function(nt,Yt){var cr=1;Yt.ext_texture_filter_anisotropic&&(cr=nt.getParameter(lt));var ua=1,Aa=1;Yt.webgl_draw_buffers&&(ua=nt.getParameter(_e),Aa=nt.getParameter(Ee));var xa=!!Yt.oes_texture_float;if(xa){var wa=nt.createTexture();nt.bindTexture(fe,wa),nt.texImage2D(fe,0,Qe,1,1,0,Qe,Lt,null);var Ja=nt.createFramebuffer();if(nt.bindFramebuffer(Vt,Ja),nt.framebufferTexture2D(Vt,Sr,fe,wa,0),nt.bindTexture(fe,null),nt.checkFramebufferStatus(Vt)!==Zt)xa=!1;else{nt.viewport(0,0,1,1),nt.clearColor(1,0,0,1),nt.clear(xr);var Ai=N.allocType(Lt,4);nt.readPixels(0,0,1,1,Qe,Lt,Ai),nt.getError()?xa=!1:(nt.deleteFramebuffer(Ja),nt.deleteTexture(wa),xa=Ai[0]===1),N.freeType(Ai)}}var bi=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),fi=!0;if(!bi){var yn=nt.createTexture(),Oi=N.allocType(kt,36);nt.activeTexture(st),nt.bindTexture(Fe,yn),nt.texImage2D(rt,0,Qe,3,3,0,Qe,kt,Oi),N.freeType(Oi),nt.bindTexture(Fe,null),nt.deleteTexture(yn),fi=!nt.getError()}return{colorBits:[nt.getParameter(W),nt.getParameter(Q),nt.getParameter(ue),nt.getParameter(le)],depthBits:nt.getParameter(he),stencilBits:nt.getParameter(G),subpixelBits:nt.getParameter(U),extensions:Object.keys(Yt).filter(function(ki){return!!Yt[ki]}),maxAnisotropic:cr,maxDrawbuffers:ua,maxColorAttachments:Aa,pointSizeDims:nt.getParameter($),lineWidthDims:nt.getParameter(J),maxViewportDims:nt.getParameter(oe),maxCombinedTextureUnits:nt.getParameter(re),maxCubeMapSize:nt.getParameter(ze),maxRenderbufferSize:nt.getParameter(Re),maxTextureUnits:nt.getParameter(be),maxTextureSize:nt.getParameter(X),maxAttributes:nt.getParameter(ie),maxVertexUniforms:nt.getParameter(j),maxVertexTextureUnits:nt.getParameter(ce),maxVaryingVectors:nt.getParameter(ee),maxFragmentUniforms:nt.getParameter(Ae),glsl:nt.getParameter(tt),renderer:nt.getParameter(it),vendor:nt.getParameter(Xe),version:nt.getParameter(ot),readFloat:xa,npotTextureCube:fi}},wr=function(nt){return nt instanceof Uint8Array||nt instanceof Uint16Array||nt instanceof Uint32Array||nt instanceof Int8Array||nt instanceof Int16Array||nt instanceof Int32Array||nt instanceof Float32Array||nt instanceof Float64Array||nt instanceof Uint8ClampedArray};function Ir(nt){return!!nt&&typeof nt=="object"&&Array.isArray(nt.shape)&&Array.isArray(nt.stride)&&typeof nt.offset=="number"&&nt.shape.length===nt.stride.length&&(Array.isArray(nt.data)||wr(nt.data))}var bt=function(nt){return Object.keys(nt).map(function(Yt){return nt[Yt]})},Be={shape:Te,flatten:Ce};function Ke(nt,Yt,cr){for(var ua=0;ua<Yt;++ua)cr[ua]=nt[ua]}function Ue(nt,Yt,cr,ua){for(var Aa=0,xa=0;xa<Yt;++xa)for(var wa=nt[xa],Ja=0;Ja<cr;++Ja)ua[Aa++]=wa[Ja]}function Me(nt,Yt,cr,ua,Aa,xa){for(var wa=xa,Ja=0;Ja<Yt;++Ja)for(var Ai=nt[Ja],bi=0;bi<cr;++bi)for(var fi=Ai[bi],yn=0;yn<ua;++yn)Aa[wa++]=fi[yn]}function qe(nt,Yt,cr,ua,Aa){for(var xa=1,wa=cr+1;wa<Yt.length;++wa)xa*=Yt[wa];var Ja=Yt[cr];if(Yt.length-cr===4){var Ai=Yt[cr+1],bi=Yt[cr+2],fi=Yt[cr+3];for(wa=0;wa<Ja;++wa)Me(nt[wa],Ai,bi,fi,ua,Aa),Aa+=xa}else for(wa=0;wa<Ja;++wa)qe(nt[wa],Yt,cr+1,ua,Aa),Aa+=xa}function Ce(nt,Yt,cr,ua){var Aa=1;if(Yt.length)for(var xa=0;xa<Yt.length;++xa)Aa*=Yt[xa];else Aa=0;var wa=ua||N.allocType(cr,Aa);switch(Yt.length){case 0:break;case 1:Ke(nt,Yt[0],wa);break;case 2:Ue(nt,Yt[0],Yt[1],wa);break;case 3:Me(nt,Yt[0],Yt[1],Yt[2],wa,0);break;default:qe(nt,Yt,0,wa,0)}return wa}function Te(nt){for(var Yt=[],cr=nt;cr.length;cr=cr[0])Yt.push(cr.length);return Yt}var Pe={"[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},at=5120,yt=5122,Tt=5124,Ot=5121,Gt=5123,rr=5125,Qt=5126,Tr=5126,la={int8:at,int16:yt,int32:Tt,uint8:Ot,uint16:Gt,uint32:rr,float:Qt,float32:Tr},Ua=35048,Ba=35040,Ra={dynamic:Ua,stream:Ba,static:35044},ei=Be.flatten,za=Be.shape,ti=35044,Ci=35040,Jt=5121,Nt=5126,Kt=[];Kt[5120]=1,Kt[5122]=2,Kt[5124]=4,Kt[5121]=1,Kt[5123]=2,Kt[5125]=4,Kt[5126]=4;function Wt(nt){return Pe[Object.prototype.toString.call(nt)]|0}function Pr(nt,Yt){for(var cr=0;cr<Yt.length;++cr)nt[cr]=Yt[cr]}function ta(nt,Yt,cr,ua,Aa,xa,wa){for(var Ja=0,Ai=0;Ai<cr;++Ai)for(var bi=0;bi<ua;++bi)nt[Ja++]=Yt[Aa*Ai+xa*bi+wa]}function ma(nt,Yt,cr,ua){var Aa=0,xa={};function wa(ea){this.id=Aa++,this.buffer=nt.createBuffer(),this.type=ea,this.usage=ti,this.byteLength=0,this.dimension=1,this.dtype=Jt,this.persistentData=null,cr.profile&&(this.stats={size:0})}wa.prototype.bind=function(){nt.bindBuffer(this.type,this.buffer)},wa.prototype.destroy=function(){Oi(this)};var Ja=[];function Ai(ea,Ea){var ii=Ja.pop();return ii||(ii=new wa(ea)),ii.bind(),yn(ii,Ea,Ci,0,1,!1),ii}function bi(ea){Ja.push(ea)}function fi(ea,Ea,ii){ea.byteLength=Ea.byteLength,nt.bufferData(ea.type,Ea,ii)}function yn(ea,Ea,ii,gi,Wa,ji){var Ii;if(ea.usage=ii,Array.isArray(Ea)){if(ea.dtype=gi||Nt,Ea.length>0){var hn;if(Array.isArray(Ea[0])){Ii=za(Ea);for(var Za=1,Va=1;Va<Ii.length;++Va)Za*=Ii[Va];ea.dimension=Za,hn=ei(Ea,Ii,ea.dtype),fi(ea,hn,ii),ji?ea.persistentData=hn:N.freeType(hn)}else if(typeof Ea[0]=="number"){ea.dimension=Wa;var $i=N.allocType(ea.dtype,Ea.length);Pr($i,Ea),fi(ea,$i,ii),ji?ea.persistentData=$i:N.freeType($i)}else wr(Ea[0])&&(ea.dimension=Ea[0].length,ea.dtype=gi||Wt(Ea[0])||Nt,hn=ei(Ea,[Ea.length,Ea[0].length],ea.dtype),fi(ea,hn,ii),ji?ea.persistentData=hn:N.freeType(hn))}}else if(wr(Ea))ea.dtype=gi||Wt(Ea),ea.dimension=Wa,fi(ea,Ea,ii),ji&&(ea.persistentData=new Uint8Array(new Uint8Array(Ea.buffer)));else if(Ir(Ea)){Ii=Ea.shape;var zi=Ea.stride,Si=Ea.offset,Ti=0,Ki=0,mn=0,In=0;Ii.length===1?(Ti=Ii[0],Ki=1,mn=zi[0],In=0):Ii.length===2&&(Ti=Ii[0],Ki=Ii[1],mn=zi[0],In=zi[1]),ea.dtype=gi||Wt(Ea.data)||Nt,ea.dimension=Ki;var Di=N.allocType(ea.dtype,Ti*Ki);ta(Di,Ea.data,Ti,Ki,mn,In,Si),fi(ea,Di,ii),ji?ea.persistentData=Di:N.freeType(Di)}else Ea instanceof ArrayBuffer&&(ea.dtype=Jt,ea.dimension=Wa,fi(ea,Ea,ii),ji&&(ea.persistentData=new Uint8Array(new Uint8Array(Ea))))}function Oi(ea){Yt.bufferCount--,ua(ea);var Ea=ea.buffer;nt.deleteBuffer(Ea),ea.buffer=null,delete xa[ea.id]}function ki(ea,Ea,ii,gi){Yt.bufferCount++;var Wa=new wa(Ea);xa[Wa.id]=Wa;function ji(Za){var Va=ti,$i=null,zi=0,Si=0,Ti=1;return Array.isArray(Za)||wr(Za)||Ir(Za)||Za instanceof ArrayBuffer?$i=Za:typeof Za=="number"?zi=Za|0:Za&&("data"in Za&&($i=Za.data),"usage"in Za&&(Va=Ra[Za.usage]),"type"in Za&&(Si=la[Za.type]),"dimension"in Za&&(Ti=Za.dimension|0),"length"in Za&&(zi=Za.length|0)),Wa.bind(),$i?yn(Wa,$i,Va,Si,Ti,gi):(zi&&nt.bufferData(Wa.type,zi,Va),Wa.dtype=Si||Jt,Wa.usage=Va,Wa.dimension=Ti,Wa.byteLength=zi),cr.profile&&(Wa.stats.size=Wa.byteLength*Kt[Wa.dtype]),ji}function Ii(Za,Va){nt.bufferSubData(Wa.type,Va,Za)}function hn(Za,Va){var $i=(Va||0)|0,zi;if(Wa.bind(),wr(Za)||Za instanceof ArrayBuffer)Ii(Za,$i);else if(Array.isArray(Za)){if(Za.length>0){if(typeof Za[0]=="number"){var Si=N.allocType(Wa.dtype,Za.length);Pr(Si,Za),Ii(Si,$i),N.freeType(Si)}else if(Array.isArray(Za[0])||wr(Za[0])){zi=za(Za);var Ti=ei(Za,zi,Wa.dtype);Ii(Ti,$i),N.freeType(Ti)}}}else if(Ir(Za)){zi=Za.shape;var Ki=Za.stride,mn=0,In=0,Di=0,nn=0;zi.length===1?(mn=zi[0],In=1,Di=Ki[0],nn=0):zi.length===2&&(mn=zi[0],In=zi[1],Di=Ki[0],nn=Ki[1]);var En=Array.isArray(Za.data)?Wa.dtype:Wt(Za.data),Rn=N.allocType(En,mn*In);ta(Rn,Za.data,mn,In,Di,nn,Za.offset),Ii(Rn,$i),N.freeType(Rn)}return ji}return ii||ji(ea),ji._reglType="buffer",ji._buffer=Wa,ji.subdata=hn,cr.profile&&(ji.stats=Wa.stats),ji.destroy=function(){Oi(Wa)},ji}function qa(){bt(xa).forEach(function(ea){ea.buffer=nt.createBuffer(),nt.bindBuffer(ea.type,ea.buffer),nt.bufferData(ea.type,ea.persistentData||ea.byteLength,ea.usage)})}return cr.profile&&(Yt.getTotalBufferSize=function(){var ea=0;return Object.keys(xa).forEach(function(Ea){ea+=xa[Ea].stats.size}),ea}),{create:ki,createStream:Ai,destroyStream:bi,clear:function(){bt(xa).forEach(Oi),Ja.forEach(Oi)},getBuffer:function(ea){return ea&&ea._buffer instanceof wa?ea._buffer:null},restore:qa,_initBuffer:yn}}var ra=0,Ia=0,Ha=1,$a=1,ai=4,mi=4,xt={points:ra,point:Ia,lines:Ha,line:$a,triangles:ai,triangle:mi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ct=0,Nr=1,Or=4,Rr=5120,Lr=5121,Gr=5122,Kr=5123,Ur=5124,aa=5125,da=34963,fa=35040,It=35044;function dr(nt,Yt,cr,ua){var Aa={},xa=0,wa={uint8:Lr,uint16:Kr};Yt.oes_element_index_uint&&(wa.uint32=aa);function Ja(qa){this.id=xa++,Aa[this.id]=this,this.buffer=qa,this.primType=Or,this.vertCount=0,this.type=0}Ja.prototype.bind=function(){this.buffer.bind()};var Ai=[];function bi(qa){var ea=Ai.pop();return ea||(ea=new Ja(cr.create(null,da,!0,!1)._buffer)),yn(ea,qa,fa,-1,-1,0,0),ea}function fi(qa){Ai.push(qa)}function yn(qa,ea,Ea,ii,gi,Wa,ji){qa.buffer.bind();var Ii;if(ea){var hn=ji;!ji&&(!wr(ea)||Ir(ea)&&!wr(ea.data))&&(hn=Yt.oes_element_index_uint?aa:Kr),cr._initBuffer(qa.buffer,ea,Ea,hn,3)}else nt.bufferData(da,Wa,Ea),qa.buffer.dtype=Ii||Lr,qa.buffer.usage=Ea,qa.buffer.dimension=3,qa.buffer.byteLength=Wa;if(Ii=ji,!ji){switch(qa.buffer.dtype){case Lr:case Rr:Ii=Lr;break;case Kr:case Gr:Ii=Kr;break;case aa:case Ur:Ii=aa;break;default:}qa.buffer.dtype=Ii}qa.type=Ii;var Za=gi;Za<0&&(Za=qa.buffer.byteLength,Ii===Kr?Za>>=1:Ii===aa&&(Za>>=2)),qa.vertCount=Za;var Va=ii;if(ii<0){Va=Or;var $i=qa.buffer.dimension;$i===1&&(Va=ct),$i===2&&(Va=Nr),$i===3&&(Va=Or)}qa.primType=Va}function Oi(qa){ua.elementsCount--,delete Aa[qa.id],qa.buffer.destroy(),qa.buffer=null}function ki(qa,ea){var Ea=cr.create(null,da,!0),ii=new Ja(Ea._buffer);ua.elementsCount++;function gi(Wa){if(!Wa)Ea(),ii.primType=Or,ii.vertCount=0,ii.type=Lr;else if(typeof Wa=="number")Ea(Wa),ii.primType=Or,ii.vertCount=Wa|0,ii.type=Lr;else{var ji=null,Ii=It,hn=-1,Za=-1,Va=0,$i=0;Array.isArray(Wa)||wr(Wa)||Ir(Wa)?ji=Wa:("data"in Wa&&(ji=Wa.data),"usage"in Wa&&(Ii=Ra[Wa.usage]),"primitive"in Wa&&(hn=xt[Wa.primitive]),"count"in Wa&&(Za=Wa.count|0),"type"in Wa&&($i=wa[Wa.type]),"length"in Wa?Va=Wa.length|0:(Va=Za,$i===Kr||$i===Gr?Va*=2:($i===aa||$i===Ur)&&(Va*=4))),yn(ii,ji,Ii,hn,Za,Va,$i)}return gi}return gi(qa),gi._reglType="elements",gi._elements=ii,gi.subdata=function(Wa,ji){return Ea.subdata(Wa,ji),gi},gi.destroy=function(){Oi(ii)},gi}return{create:ki,createStream:bi,destroyStream:fi,getElements:function(qa){return typeof qa=="function"&&qa._elements instanceof Ja?qa._elements:null},clear:function(){bt(Aa).forEach(Oi)}}}var kr=new Float32Array(1),ia=new Uint32Array(kr.buffer),Ca=5123;function Fa(nt){for(var Yt=N.allocType(Ca,nt.length),cr=0;cr<nt.length;++cr)if(isNaN(nt[cr]))Yt[cr]=65535;else if(nt[cr]===1/0)Yt[cr]=31744;else if(nt[cr]===-1/0)Yt[cr]=64512;else{kr[0]=nt[cr];var ua=ia[0],Aa=ua>>>31<<15,xa=(ua<<1>>>24)-127,wa=ua>>13&1023;if(xa<-24)Yt[cr]=Aa;else if(xa<-14){var Ja=-14-xa;Yt[cr]=Aa+(wa+1024>>Ja)}else xa>15?Yt[cr]=Aa+31744:Yt[cr]=Aa+(xa+15<<10)+wa}return Yt}function Ya(nt){return Array.isArray(nt)||wr(nt)}var ha=34467,Da=3553,Xi=34067,Li=34069,fn=6408,An=6406,kn=6407,zn=6409,Xn=6410,to=32854,mo=32855,pn=36194,Jo=32819,Xo=32820,Ts=33635,Po=34042,so=6402,Vn=34041,To=35904,qo=35906,Oo=36193,lo=33776,Co=33777,os=33778,Ys=33779,Os=35986,Yo=35987,Ui=34798,Cn=35840,tl=35841,Bs=35842,uo=35843,$s=36196,ms=5121,Is=5123,rl=5125,Sn=5126,po=10242,ro=10243,As=10497,al=33071,$n=33648,zs=10240,au=10241,fl=9728,xu=9729,zl=9984,Ns=9985,iu=9986,Eu=9987,Bc=33170,Cu=4352,Af=4353,pf=4354,Us=34046,Vc=3317,Sf=37440,nu=37441,Ll=37443,ic=37444,Ou=33984,il=[zl,iu,Ns,Eu],vl=[0,zn,Xn,kn,fn],gs={};gs[zn]=gs[An]=gs[so]=1,gs[Vn]=gs[Xn]=2,gs[kn]=gs[To]=3,gs[fn]=gs[qo]=4;function Vs(nt){return"[object "+nt+"]"}var nc=Vs("HTMLCanvasElement"),Nl=Vs("OffscreenCanvas"),qu=Vs("CanvasRenderingContext2D"),cl=Vs("ImageBitmap"),yh=Vs("HTMLImageElement"),ls=Vs("HTMLVideoElement"),_h=Object.keys(Pe).concat([nc,Nl,qu,cl,yh,ls]),Ss=[];Ss[ms]=1,Ss[Sn]=4,Ss[Oo]=2,Ss[Is]=2,Ss[rl]=4;var Qn=[];Qn[to]=2,Qn[mo]=2,Qn[pn]=2,Qn[Vn]=4,Qn[lo]=.5,Qn[Co]=.5,Qn[os]=1,Qn[Ys]=1,Qn[Os]=.5,Qn[Yo]=1,Qn[Ui]=1,Qn[Cn]=.5,Qn[tl]=.25,Qn[Bs]=.5,Qn[uo]=.25,Qn[$s]=.5;function Gc(nt){return Array.isArray(nt)&&(nt.length===0||typeof nt[0]=="number")}function Vu(nt){if(!Array.isArray(nt))return!1;var Yt=nt.length;return!(Yt===0||!Ya(nt[0]))}function Ul(nt){return Object.prototype.toString.call(nt)}function Mf(nt){return Ul(nt)===nc}function wc(nt){return Ul(nt)===Nl}function rf(nt){return Ul(nt)===qu}function Kl(nt){return Ul(nt)===cl}function Yf(nt){return Ul(nt)===yh}function zf(nt){return Ul(nt)===ls}function af(nt){if(!nt)return!1;var Yt=Ul(nt);return _h.indexOf(Yt)>=0?!0:Gc(nt)||Vu(nt)||Ir(nt)}function Nc(nt){return Pe[Object.prototype.toString.call(nt)]|0}function Ff(nt,Yt){var cr=Yt.length;switch(nt.type){case ms:case Is:case rl:case Sn:var ua=N.allocType(nt.type,cr);ua.set(Yt),nt.data=ua;break;case Oo:nt.data=Fa(Yt);break;default:}}function Of(nt,Yt){return N.allocType(nt.type===Oo?Sn:nt.type,Yt)}function Gu(nt,Yt){nt.type===Oo?(nt.data=Fa(Yt),N.freeType(Yt)):nt.data=Yt}function Ef(nt,Yt,cr,ua,Aa,xa){for(var wa=nt.width,Ja=nt.height,Ai=nt.channels,bi=wa*Ja*Ai,fi=Of(nt,bi),yn=0,Oi=0;Oi<Ja;++Oi)for(var ki=0;ki<wa;++ki)for(var qa=0;qa<Ai;++qa)fi[yn++]=Yt[cr*ki+ua*Oi+Aa*qa+xa];Gu(nt,fi)}function oc(nt,Yt,cr,ua,Aa,xa){var wa;if(typeof Qn[nt]<"u"?wa=Qn[nt]:wa=gs[nt]*Ss[Yt],xa&&(wa*=6),Aa){for(var Ja=0,Ai=cr;Ai>=1;)Ja+=wa*Ai*Ai,Ai/=2;return Ja}else return wa*cr*ua}function Hc(nt,Yt,cr,ua,Aa,xa,wa){var Ja={"don't care":Cu,"dont care":Cu,nice:pf,fast:Af},Ai={repeat:As,clamp:al,mirror:$n},bi={nearest:fl,linear:xu},fi=d({mipmap:Eu,"nearest mipmap nearest":zl,"linear mipmap nearest":Ns,"nearest mipmap linear":iu,"linear mipmap linear":Eu},bi),yn={none:0,browser:ic},Oi={uint8:ms,rgba4:Jo,rgb565:Ts,"rgb5 a1":Xo},ki={alpha:An,luminance:zn,"luminance alpha":Xn,rgb:kn,rgba:fn,rgba4:to,"rgb5 a1":mo,rgb565:pn},qa={};Yt.ext_srgb&&(ki.srgb=To,ki.srgba=qo),Yt.oes_texture_float&&(Oi.float32=Oi.float=Sn),Yt.oes_texture_half_float&&(Oi.float16=Oi["half float"]=Oo),Yt.webgl_depth_texture&&(d(ki,{depth:so,"depth stencil":Vn}),d(Oi,{uint16:Is,uint32:rl,"depth stencil":Po})),Yt.webgl_compressed_texture_s3tc&&d(qa,{"rgb s3tc dxt1":lo,"rgba s3tc dxt1":Co,"rgba s3tc dxt3":os,"rgba s3tc dxt5":Ys}),Yt.webgl_compressed_texture_atc&&d(qa,{"rgb atc":Os,"rgba atc explicit alpha":Yo,"rgba atc interpolated alpha":Ui}),Yt.webgl_compressed_texture_pvrtc&&d(qa,{"rgb pvrtc 4bppv1":Cn,"rgb pvrtc 2bppv1":tl,"rgba pvrtc 4bppv1":Bs,"rgba pvrtc 2bppv1":uo}),Yt.webgl_compressed_texture_etc1&&(qa["rgb etc1"]=$s);var ea=Array.prototype.slice.call(nt.getParameter(ha));Object.keys(qa).forEach(function(Le){var $e=qa[Le];ea.indexOf($e)>=0&&(ki[Le]=$e)});var Ea=Object.keys(ki);cr.textureFormats=Ea;var ii=[];Object.keys(ki).forEach(function(Le){var $e=ki[Le];ii[$e]=Le});var gi=[];Object.keys(Oi).forEach(function(Le){var $e=Oi[Le];gi[$e]=Le});var Wa=[];Object.keys(bi).forEach(function(Le){var $e=bi[Le];Wa[$e]=Le});var ji=[];Object.keys(fi).forEach(function(Le){var $e=fi[Le];ji[$e]=Le});var Ii=[];Object.keys(Ai).forEach(function(Le){var $e=Ai[Le];Ii[$e]=Le});var hn=Ea.reduce(function(Le,$e){var mt=ki[$e];return mt===zn||mt===An||mt===zn||mt===Xn||mt===so||mt===Vn||Yt.ext_srgb&&(mt===To||mt===qo)?Le[mt]=mt:mt===mo||$e.indexOf("rgba")>=0?Le[mt]=fn:Le[mt]=kn,Le},{});function Za(){this.internalformat=fn,this.format=fn,this.type=ms,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ic,this.width=0,this.height=0,this.channels=0}function Va(Le,$e){Le.internalformat=$e.internalformat,Le.format=$e.format,Le.type=$e.type,Le.compressed=$e.compressed,Le.premultiplyAlpha=$e.premultiplyAlpha,Le.flipY=$e.flipY,Le.unpackAlignment=$e.unpackAlignment,Le.colorSpace=$e.colorSpace,Le.width=$e.width,Le.height=$e.height,Le.channels=$e.channels}function $i(Le,$e){if(!(typeof $e!="object"||!$e)){if("premultiplyAlpha"in $e&&(Le.premultiplyAlpha=$e.premultiplyAlpha),"flipY"in $e&&(Le.flipY=$e.flipY),"alignment"in $e&&(Le.unpackAlignment=$e.alignment),"colorSpace"in $e&&(Le.colorSpace=yn[$e.colorSpace]),"type"in $e){var mt=$e.type;Le.type=Oi[mt]}var jt=Le.width,_r=Le.height,Fr=Le.channels,hr=!1;"shape"in $e?(jt=$e.shape[0],_r=$e.shape[1],$e.shape.length===3&&(Fr=$e.shape[2],hr=!0)):("radius"in $e&&(jt=_r=$e.radius),"width"in $e&&(jt=$e.width),"height"in $e&&(_r=$e.height),"channels"in $e&&(Fr=$e.channels,hr=!0)),Le.width=jt|0,Le.height=_r|0,Le.channels=Fr|0;var gt=!1;if("format"in $e){var Et=$e.format,Ft=Le.internalformat=ki[Et];Le.format=hn[Ft],Et in Oi&&("type"in $e||(Le.type=Oi[Et])),Et in qa&&(Le.compressed=!0),gt=!0}!hr&&gt?Le.channels=gs[Le.format]:hr&&!gt&&Le.channels!==vl[Le.format]&&(Le.format=Le.internalformat=vl[Le.channels])}}function zi(Le){nt.pixelStorei(Sf,Le.flipY),nt.pixelStorei(nu,Le.premultiplyAlpha),nt.pixelStorei(Ll,Le.colorSpace),nt.pixelStorei(Vc,Le.unpackAlignment)}function Si(){Za.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ti(Le,$e){var mt=null;if(af($e)?mt=$e:$e&&($i(Le,$e),"x"in $e&&(Le.xOffset=$e.x|0),"y"in $e&&(Le.yOffset=$e.y|0),af($e.data)&&(mt=$e.data)),$e.copy){var jt=Aa.viewportWidth,_r=Aa.viewportHeight;Le.width=Le.width||jt-Le.xOffset,Le.height=Le.height||_r-Le.yOffset,Le.needsCopy=!0}else if(!mt)Le.width=Le.width||1,Le.height=Le.height||1,Le.channels=Le.channels||4;else if(wr(mt))Le.channels=Le.channels||4,Le.data=mt,!("type"in $e)&&Le.type===ms&&(Le.type=Nc(mt));else if(Gc(mt))Le.channels=Le.channels||4,Ff(Le,mt),Le.alignment=1,Le.needsFree=!0;else if(Ir(mt)){var Fr=mt.data;!Array.isArray(Fr)&&Le.type===ms&&(Le.type=Nc(Fr));var hr=mt.shape,gt=mt.stride,Et,Ft,ir,fr,sr,pr;hr.length===3?(ir=hr[2],pr=gt[2]):(ir=1,pr=1),Et=hr[0],Ft=hr[1],fr=gt[0],sr=gt[1],Le.alignment=1,Le.width=Et,Le.height=Ft,Le.channels=ir,Le.format=Le.internalformat=vl[ir],Le.needsFree=!0,Ef(Le,Fr,fr,sr,pr,mt.offset)}else if(Mf(mt)||wc(mt)||rf(mt))Mf(mt)||wc(mt)?Le.element=mt:Le.element=mt.canvas,Le.width=Le.element.width,Le.height=Le.element.height,Le.channels=4;else if(Kl(mt))Le.element=mt,Le.width=mt.width,Le.height=mt.height,Le.channels=4;else if(Yf(mt))Le.element=mt,Le.width=mt.naturalWidth,Le.height=mt.naturalHeight,Le.channels=4;else if(zf(mt))Le.element=mt,Le.width=mt.videoWidth,Le.height=mt.videoHeight,Le.channels=4;else if(Vu(mt)){var lr=Le.width||mt[0].length,Xt=Le.height||mt.length,or=Le.channels;Ya(mt[0][0])?or=or||mt[0][0].length:or=or||1;for(var qt=Be.shape(mt),Dr=1,Jr=0;Jr<qt.length;++Jr)Dr*=qt[Jr];var ba=Of(Le,Dr);Be.flatten(mt,qt,"",ba),Gu(Le,ba),Le.alignment=1,Le.width=lr,Le.height=Xt,Le.channels=or,Le.format=Le.internalformat=vl[or],Le.needsFree=!0}Le.type===Sn||Le.type}function Ki(Le,$e,mt){var jt=Le.element,_r=Le.data,Fr=Le.internalformat,hr=Le.format,gt=Le.type,Et=Le.width,Ft=Le.height;zi(Le),jt?nt.texImage2D($e,mt,hr,hr,gt,jt):Le.compressed?nt.compressedTexImage2D($e,mt,Fr,Et,Ft,0,_r):Le.needsCopy?(ua(),nt.copyTexImage2D($e,mt,hr,Le.xOffset,Le.yOffset,Et,Ft,0)):nt.texImage2D($e,mt,hr,Et,Ft,0,hr,gt,_r||null)}function mn(Le,$e,mt,jt,_r){var Fr=Le.element,hr=Le.data,gt=Le.internalformat,Et=Le.format,Ft=Le.type,ir=Le.width,fr=Le.height;zi(Le),Fr?nt.texSubImage2D($e,_r,mt,jt,Et,Ft,Fr):Le.compressed?nt.compressedTexSubImage2D($e,_r,mt,jt,gt,ir,fr,hr):Le.needsCopy?(ua(),nt.copyTexSubImage2D($e,_r,mt,jt,Le.xOffset,Le.yOffset,ir,fr)):nt.texSubImage2D($e,_r,mt,jt,ir,fr,Et,Ft,hr)}var In=[];function Di(){return In.pop()||new Si}function nn(Le){Le.needsFree&&N.freeType(Le.data),Si.call(Le),In.push(Le)}function En(){Za.call(this),this.genMipmaps=!1,this.mipmapHint=Cu,this.mipmask=0,this.images=Array(16)}function Rn(Le,$e,mt){var jt=Le.images[0]=Di();Le.mipmask=1,jt.width=Le.width=$e,jt.height=Le.height=mt,jt.channels=Le.channels=4}function Gn(Le,$e){var mt=null;if(af($e))mt=Le.images[0]=Di(),Va(mt,Le),Ti(mt,$e),Le.mipmask=1;else if($i(Le,$e),Array.isArray($e.mipmap))for(var jt=$e.mipmap,_r=0;_r<jt.length;++_r)mt=Le.images[_r]=Di(),Va(mt,Le),mt.width>>=_r,mt.height>>=_r,Ti(mt,jt[_r]),Le.mipmask|=1<<_r;else mt=Le.images[0]=Di(),Va(mt,Le),Ti(mt,$e),Le.mipmask=1;Va(Le,Le.images[0]),Le.compressed&&(Le.internalformat===lo||Le.internalformat===Co||Le.internalformat===os||Le.internalformat)}function Ps(Le,$e){for(var mt=Le.images,jt=0;jt<mt.length;++jt){if(!mt[jt])return;Ki(mt[jt],$e,jt)}}var xl=[];function ho(){var Le=xl.pop()||new En;Za.call(Le),Le.mipmask=0;for(var $e=0;$e<16;++$e)Le.images[$e]=null;return Le}function Hl(Le){for(var $e=Le.images,mt=0;mt<$e.length;++mt)$e[mt]&&nn($e[mt]),$e[mt]=null;xl.push(Le)}function fs(){this.minFilter=fl,this.magFilter=fl,this.wrapS=al,this.wrapT=al,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=Cu}function Al(Le,$e){if("min"in $e){var mt=$e.min;Le.minFilter=fi[mt],il.indexOf(Le.minFilter)>=0&&!("faces"in $e)&&(Le.genMipmaps=!0)}if("mag"in $e){var jt=$e.mag;Le.magFilter=bi[jt]}var _r=Le.wrapS,Fr=Le.wrapT;if("wrap"in $e){var hr=$e.wrap;typeof hr=="string"?_r=Fr=Ai[hr]:Array.isArray(hr)&&(_r=Ai[hr[0]],Fr=Ai[hr[1]])}else{if("wrapS"in $e){var gt=$e.wrapS;_r=Ai[gt]}if("wrapT"in $e){var Et=$e.wrapT;Fr=Ai[Et]}}if(Le.wrapS=_r,Le.wrapT=Fr,"anisotropic"in $e){var Ft=$e.anisotropic;Le.anisotropic=$e.anisotropic}if("mipmap"in $e){var ir=!1;switch(typeof $e.mipmap){case"string":Le.mipmapHint=Ja[$e.mipmap],Le.genMipmaps=!0,ir=!0;break;case"boolean":ir=Le.genMipmaps=$e.mipmap;break;case"object":Le.genMipmaps=!1,ir=!0;break;default:}ir&&!("min"in $e)&&(Le.minFilter=zl)}}function El(Le,$e){nt.texParameteri($e,au,Le.minFilter),nt.texParameteri($e,zs,Le.magFilter),nt.texParameteri($e,po,Le.wrapS),nt.texParameteri($e,ro,Le.wrapT),Yt.ext_texture_filter_anisotropic&&nt.texParameteri($e,Us,Le.anisotropic),Le.genMipmaps&&(nt.hint(Bc,Le.mipmapHint),nt.generateMipmap($e))}var Ql=0,Fs={},pl=cr.maxTextureUnits,bl=Array(pl).map(function(){return null});function Hn(Le){Za.call(this),this.mipmask=0,this.internalformat=fn,this.id=Ql++,this.refCount=1,this.target=Le,this.texture=nt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new fs,wa.profile&&(this.stats={size:0})}function Cl(Le){nt.activeTexture(Ou),nt.bindTexture(Le.target,Le.texture)}function Lo(){var Le=bl[0];Le?nt.bindTexture(Le.target,Le.texture):nt.bindTexture(Da,null)}function ve(Le){var $e=Le.texture,mt=Le.unit,jt=Le.target;mt>=0&&(nt.activeTexture(Ou+mt),nt.bindTexture(jt,null),bl[mt]=null),nt.deleteTexture($e),Le.texture=null,Le.params=null,Le.pixels=null,Le.refCount=0,delete Fs[Le.id],xa.textureCount--}d(Hn.prototype,{bind:function(){var Le=this;Le.bindCount+=1;var $e=Le.unit;if($e<0){for(var mt=0;mt<pl;++mt){var jt=bl[mt];if(jt){if(jt.bindCount>0)continue;jt.unit=-1}bl[mt]=Le,$e=mt;break}$e>=pl,wa.profile&&xa.maxTextureUnits<$e+1&&(xa.maxTextureUnits=$e+1),Le.unit=$e,nt.activeTexture(Ou+$e),nt.bindTexture(Le.target,Le.texture)}return $e},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&ve(this)}});function Y(Le,$e){var mt=new Hn(Da);Fs[mt.id]=mt,xa.textureCount++;function jt(hr,gt){var Et=mt.texInfo;fs.call(Et);var Ft=ho();return typeof hr=="number"?typeof gt=="number"?Rn(Ft,hr|0,gt|0):Rn(Ft,hr|0,hr|0):hr?(Al(Et,hr),Gn(Ft,hr)):Rn(Ft,1,1),Et.genMipmaps&&(Ft.mipmask=(Ft.width<<1)-1),mt.mipmask=Ft.mipmask,Va(mt,Ft),mt.internalformat=Ft.internalformat,jt.width=Ft.width,jt.height=Ft.height,Cl(mt),Ps(Ft,Da),El(Et,Da),Lo(),Hl(Ft),wa.profile&&(mt.stats.size=oc(mt.internalformat,mt.type,Ft.width,Ft.height,Et.genMipmaps,!1)),jt.format=ii[mt.internalformat],jt.type=gi[mt.type],jt.mag=Wa[Et.magFilter],jt.min=ji[Et.minFilter],jt.wrapS=Ii[Et.wrapS],jt.wrapT=Ii[Et.wrapT],jt}function _r(hr,gt,Et,Ft){var ir=gt|0,fr=Et|0,sr=Ft|0,pr=Di();return Va(pr,mt),pr.width=0,pr.height=0,Ti(pr,hr),pr.width=pr.width||(mt.width>>sr)-ir,pr.height=pr.height||(mt.height>>sr)-fr,Cl(mt),mn(pr,Da,ir,fr,sr),Lo(),nn(pr),jt}function Fr(hr,gt){var Et=hr|0,Ft=gt|0||Et;if(Et===mt.width&&Ft===mt.height)return jt;jt.width=mt.width=Et,jt.height=mt.height=Ft,Cl(mt);for(var ir=0;mt.mipmask>>ir;++ir){var fr=Et>>ir,sr=Ft>>ir;if(!fr||!sr)break;nt.texImage2D(Da,ir,mt.format,fr,sr,0,mt.format,mt.type,null)}return Lo(),wa.profile&&(mt.stats.size=oc(mt.internalformat,mt.type,Et,Ft,!1,!1)),jt}return jt(Le,$e),jt.subimage=_r,jt.resize=Fr,jt._reglType="texture2d",jt._texture=mt,wa.profile&&(jt.stats=mt.stats),jt.destroy=function(){mt.decRef()},jt}function ye(Le,$e,mt,jt,_r,Fr){var hr=new Hn(Xi);Fs[hr.id]=hr,xa.cubeCount++;var gt=new Array(6);function Et(fr,sr,pr,lr,Xt,or){var qt,Dr=hr.texInfo;for(fs.call(Dr),qt=0;qt<6;++qt)gt[qt]=ho();if(typeof fr=="number"||!fr){var Jr=fr|0||1;for(qt=0;qt<6;++qt)Rn(gt[qt],Jr,Jr)}else if(typeof fr=="object")if(sr)Gn(gt[0],fr),Gn(gt[1],sr),Gn(gt[2],pr),Gn(gt[3],lr),Gn(gt[4],Xt),Gn(gt[5],or);else if(Al(Dr,fr),$i(hr,fr),"faces"in fr){var ba=fr.faces;for(qt=0;qt<6;++qt)Va(gt[qt],hr),Gn(gt[qt],ba[qt])}else for(qt=0;qt<6;++qt)Gn(gt[qt],fr);for(Va(hr,gt[0]),Dr.genMipmaps?hr.mipmask=(gt[0].width<<1)-1:hr.mipmask=gt[0].mipmask,hr.internalformat=gt[0].internalformat,Et.width=gt[0].width,Et.height=gt[0].height,Cl(hr),qt=0;qt<6;++qt)Ps(gt[qt],Li+qt);for(El(Dr,Xi),Lo(),wa.profile&&(hr.stats.size=oc(hr.internalformat,hr.type,Et.width,Et.height,Dr.genMipmaps,!0)),Et.format=ii[hr.internalformat],Et.type=gi[hr.type],Et.mag=Wa[Dr.magFilter],Et.min=ji[Dr.minFilter],Et.wrapS=Ii[Dr.wrapS],Et.wrapT=Ii[Dr.wrapT],qt=0;qt<6;++qt)Hl(gt[qt]);return Et}function Ft(fr,sr,pr,lr,Xt){var or=pr|0,qt=lr|0,Dr=Xt|0,Jr=Di();return Va(Jr,hr),Jr.width=0,Jr.height=0,Ti(Jr,sr),Jr.width=Jr.width||(hr.width>>Dr)-or,Jr.height=Jr.height||(hr.height>>Dr)-qt,Cl(hr),mn(Jr,Li+fr,or,qt,Dr),Lo(),nn(Jr),Et}function ir(fr){var sr=fr|0;if(sr!==hr.width){Et.width=hr.width=sr,Et.height=hr.height=sr,Cl(hr);for(var pr=0;pr<6;++pr)for(var lr=0;hr.mipmask>>lr;++lr)nt.texImage2D(Li+pr,lr,hr.format,sr>>lr,sr>>lr,0,hr.format,hr.type,null);return Lo(),wa.profile&&(hr.stats.size=oc(hr.internalformat,hr.type,Et.width,Et.height,!1,!0)),Et}}return Et(Le,$e,mt,jt,_r,Fr),Et.subimage=Ft,Et.resize=ir,Et._reglType="textureCube",Et._texture=hr,wa.profile&&(Et.stats=hr.stats),Et.destroy=function(){hr.decRef()},Et}function te(){for(var Le=0;Le<pl;++Le)nt.activeTexture(Ou+Le),nt.bindTexture(Da,null),bl[Le]=null;bt(Fs).forEach(ve),xa.cubeCount=0,xa.textureCount=0}wa.profile&&(xa.getTotalTextureSize=function(){var Le=0;return Object.keys(Fs).forEach(function($e){Le+=Fs[$e].stats.size}),Le});function me(){for(var Le=0;Le<pl;++Le){var $e=bl[Le];$e&&($e.bindCount=0,$e.unit=-1,bl[Le]=null)}bt(Fs).forEach(function(mt){mt.texture=nt.createTexture(),nt.bindTexture(mt.target,mt.texture);for(var jt=0;jt<32;++jt)if(mt.mipmask&1<<jt)if(mt.target===Da)nt.texImage2D(Da,jt,mt.internalformat,mt.width>>jt,mt.height>>jt,0,mt.internalformat,mt.type,null);else for(var _r=0;_r<6;++_r)nt.texImage2D(Li+_r,jt,mt.internalformat,mt.width>>jt,mt.height>>jt,0,mt.internalformat,mt.type,null);El(mt.texInfo,mt.target)})}function Ge(){for(var Le=0;Le<pl;++Le){var $e=bl[Le];$e&&($e.bindCount=0,$e.unit=-1,bl[Le]=null),nt.activeTexture(Ou+Le),nt.bindTexture(Da,null),nt.bindTexture(Xi,null)}}return{create2D:Y,createCube:ye,clear:te,getTexture:function(Le){return null},restore:me,refresh:Ge}}var Jl=36161,Uc=32854,Tc=32855,Gs=36194,Cf=33189,lh=36168,Bf=34041,Wc=35907,Kf=34836,ku=34842,Nf=34843,ml=[];ml[Uc]=2,ml[Tc]=2,ml[Gs]=2,ml[Cf]=2,ml[lh]=1,ml[Bf]=4,ml[Wc]=4,ml[Kf]=16,ml[ku]=8,ml[Nf]=6;function Lu(nt,Yt,cr){return ml[nt]*Yt*cr}var Ac=function(nt,Yt,cr,ua,Aa){var xa={rgba4:Uc,rgb565:Gs,"rgb5 a1":Tc,depth:Cf,stencil:lh,"depth stencil":Bf};Yt.ext_srgb&&(xa.srgba=Wc),Yt.ext_color_buffer_half_float&&(xa.rgba16f=ku,xa.rgb16f=Nf),Yt.webgl_color_buffer_float&&(xa.rgba32f=Kf);var wa=[];Object.keys(xa).forEach(function(ki){var qa=xa[ki];wa[qa]=ki});var Ja=0,Ai={};function bi(ki){this.id=Ja++,this.refCount=1,this.renderbuffer=ki,this.format=Uc,this.width=0,this.height=0,Aa.profile&&(this.stats={size:0})}bi.prototype.decRef=function(){--this.refCount<=0&&fi(this)};function fi(ki){var qa=ki.renderbuffer;nt.bindRenderbuffer(Jl,null),nt.deleteRenderbuffer(qa),ki.renderbuffer=null,ki.refCount=0,delete Ai[ki.id],ua.renderbufferCount--}function yn(ki,qa){var ea=new bi(nt.createRenderbuffer());Ai[ea.id]=ea,ua.renderbufferCount++;function Ea(gi,Wa){var ji=0,Ii=0,hn=Uc;if(typeof gi=="object"&&gi){var Za=gi;if("shape"in Za){var Va=Za.shape;ji=Va[0]|0,Ii=Va[1]|0}else"radius"in Za&&(ji=Ii=Za.radius|0),"width"in Za&&(ji=Za.width|0),"height"in Za&&(Ii=Za.height|0);"format"in Za&&(hn=xa[Za.format])}else typeof gi=="number"?(ji=gi|0,typeof Wa=="number"?Ii=Wa|0:Ii=ji):gi||(ji=Ii=1);if(!(ji===ea.width&&Ii===ea.height&&hn===ea.format))return Ea.width=ea.width=ji,Ea.height=ea.height=Ii,ea.format=hn,nt.bindRenderbuffer(Jl,ea.renderbuffer),nt.renderbufferStorage(Jl,hn,ji,Ii),Aa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height)),Ea.format=wa[ea.format],Ea}function ii(gi,Wa){var ji=gi|0,Ii=Wa|0||ji;return ji===ea.width&&Ii===ea.height||(Ea.width=ea.width=ji,Ea.height=ea.height=Ii,nt.bindRenderbuffer(Jl,ea.renderbuffer),nt.renderbufferStorage(Jl,ea.format,ji,Ii),Aa.profile&&(ea.stats.size=Lu(ea.format,ea.width,ea.height))),Ea}return Ea(ki,qa),Ea.resize=ii,Ea._reglType="renderbuffer",Ea._renderbuffer=ea,Aa.profile&&(Ea.stats=ea.stats),Ea.destroy=function(){ea.decRef()},Ea}Aa.profile&&(ua.getTotalRenderbufferSize=function(){var ki=0;return Object.keys(Ai).forEach(function(qa){ki+=Ai[qa].stats.size}),ki});function Oi(){bt(Ai).forEach(function(ki){ki.renderbuffer=nt.createRenderbuffer(),nt.bindRenderbuffer(Jl,ki.renderbuffer),nt.renderbufferStorage(Jl,ki.format,ki.width,ki.height)}),nt.bindRenderbuffer(Jl,null)}return{create:yn,clear:function(){bt(Ai).forEach(fi)},restore:Oi}},nl=36160,dc=36161,vu=3553,bu=34069,Ml=36064,Uf=36096,Jf=36128,Bu=33306,Sc=36053,vc=36193,Lh=5121,nf=5126,df=6407,Nu=6408,of=[];of[Nu]=4,of[df]=3;var tu=[];tu[Lh]=1,tu[nf]=4,tu[vc]=2;function Xc(nt,Yt,cr,ua,Aa,xa){var wa={cur:null,next:null,dirty:!1,setFBO:null},Ja=["rgba"],Ai=["rgba4","rgb565","rgb5 a1"];Yt.ext_srgb&&Ai.push("srgba"),Yt.ext_color_buffer_half_float&&Ai.push("rgba16f","rgb16f"),Yt.webgl_color_buffer_float&&Ai.push("rgba32f");var bi=["uint8"];Yt.oes_texture_half_float&&bi.push("half float","float16"),Yt.oes_texture_float&&bi.push("float","float32");function fi(Si,Ti,Ki){this.target=Si,this.texture=Ti,this.renderbuffer=Ki;var mn=0,In=0;Ti?(mn=Ti.width,In=Ti.height):Ki&&(mn=Ki.width,In=Ki.height),this.width=mn,this.height=In}function yn(Si){Si&&(Si.texture&&Si.texture._texture.decRef(),Si.renderbuffer&&Si.renderbuffer._renderbuffer.decRef())}function Oi(Si,Ti,Ki){if(Si)if(Si.texture){var mn=Si.texture._texture,In=Math.max(1,mn.width),Di=Math.max(1,mn.height);mn.refCount+=1}else{var nn=Si.renderbuffer._renderbuffer;nn.refCount+=1}}function ki(Si,Ti){Ti&&(Ti.texture?nt.framebufferTexture2D(nl,Si,Ti.target,Ti.texture._texture.texture,0):nt.framebufferRenderbuffer(nl,Si,dc,Ti.renderbuffer._renderbuffer.renderbuffer))}function qa(Si){var Ti=vu,Ki=null,mn=null,In=Si;typeof Si=="object"&&(In=Si.data,"target"in Si&&(Ti=Si.target|0));var Di=In._reglType;return Di==="texture2d"||Di==="textureCube"?Ki=In:Di==="renderbuffer"&&(mn=In,Ti=dc),new fi(Ti,Ki,mn)}function ea(Si,Ti,Ki,mn,In){if(Ki){var Di=ua.create2D({width:Si,height:Ti,format:mn,type:In});return Di._texture.refCount=0,new fi(vu,Di,null)}else{var nn=Aa.create({width:Si,height:Ti,format:mn});return nn._renderbuffer.refCount=0,new fi(dc,null,nn)}}function Ea(Si){return Si&&(Si.texture||Si.renderbuffer)}function ii(Si,Ti,Ki){Si&&(Si.texture?Si.texture.resize(Ti,Ki):Si.renderbuffer&&Si.renderbuffer.resize(Ti,Ki),Si.width=Ti,Si.height=Ki)}var gi=0,Wa={};function ji(){this.id=gi++,Wa[this.id]=this,this.framebuffer=nt.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Ii(Si){Si.colorAttachments.forEach(yn),yn(Si.depthAttachment),yn(Si.stencilAttachment),yn(Si.depthStencilAttachment)}function hn(Si){var Ti=Si.framebuffer;nt.deleteFramebuffer(Ti),Si.framebuffer=null,xa.framebufferCount--,delete Wa[Si.id]}function Za(Si){var Ti;nt.bindFramebuffer(nl,Si.framebuffer);var Ki=Si.colorAttachments;for(Ti=0;Ti<Ki.length;++Ti)ki(Ml+Ti,Ki[Ti]);for(Ti=Ki.length;Ti<cr.maxColorAttachments;++Ti)nt.framebufferTexture2D(nl,Ml+Ti,vu,null,0);nt.framebufferTexture2D(nl,Bu,vu,null,0),nt.framebufferTexture2D(nl,Uf,vu,null,0),nt.framebufferTexture2D(nl,Jf,vu,null,0),ki(Uf,Si.depthAttachment),ki(Jf,Si.stencilAttachment),ki(Bu,Si.depthStencilAttachment);var mn=nt.checkFramebufferStatus(nl);nt.isContextLost(),nt.bindFramebuffer(nl,wa.next?wa.next.framebuffer:null),wa.cur=wa.next,nt.getError()}function Va(Si,Ti){var Ki=new ji;xa.framebufferCount++;function mn(Di,nn){var En,Rn=0,Gn=0,Ps=!0,xl=!0,ho=null,Hl=!0,fs="rgba",Al="uint8",El=1,Ql=null,Fs=null,pl=null,bl=!1;if(typeof Di=="number")Rn=Di|0,Gn=nn|0||Rn;else if(!Di)Rn=Gn=1;else{var Hn=Di;if("shape"in Hn){var Cl=Hn.shape;Rn=Cl[0],Gn=Cl[1]}else"radius"in Hn&&(Rn=Gn=Hn.radius),"width"in Hn&&(Rn=Hn.width),"height"in Hn&&(Gn=Hn.height);("color"in Hn||"colors"in Hn)&&(ho=Hn.color||Hn.colors,Array.isArray(ho)),ho||("colorCount"in Hn&&(El=Hn.colorCount|0),"colorTexture"in Hn&&(Hl=!!Hn.colorTexture,fs="rgba4"),"colorType"in Hn&&(Al=Hn.colorType,Hl||(Al==="half float"||Al==="float16"?fs="rgba16f":(Al==="float"||Al==="float32")&&(fs="rgba32f"))),"colorFormat"in Hn&&(fs=Hn.colorFormat,Ja.indexOf(fs)>=0?Hl=!0:Ai.indexOf(fs)>=0&&(Hl=!1))),("depthTexture"in Hn||"depthStencilTexture"in Hn)&&(bl=!!(Hn.depthTexture||Hn.depthStencilTexture)),"depth"in Hn&&(typeof Hn.depth=="boolean"?Ps=Hn.depth:(Ql=Hn.depth,xl=!1)),"stencil"in Hn&&(typeof Hn.stencil=="boolean"?xl=Hn.stencil:(Fs=Hn.stencil,Ps=!1)),"depthStencil"in Hn&&(typeof Hn.depthStencil=="boolean"?Ps=xl=Hn.depthStencil:(pl=Hn.depthStencil,Ps=!1,xl=!1))}var Lo=null,ve=null,Y=null,ye=null;if(Array.isArray(ho))Lo=ho.map(qa);else if(ho)Lo=[qa(ho)];else for(Lo=new Array(El),En=0;En<El;++En)Lo[En]=ea(Rn,Gn,Hl,fs,Al);Rn=Rn||Lo[0].width,Gn=Gn||Lo[0].height,Ql?ve=qa(Ql):Ps&&!xl&&(ve=ea(Rn,Gn,bl,"depth","uint32")),Fs?Y=qa(Fs):xl&&!Ps&&(Y=ea(Rn,Gn,!1,"stencil","uint8")),pl?ye=qa(pl):!Ql&&!Fs&&xl&&Ps&&(ye=ea(Rn,Gn,bl,"depth stencil","depth stencil"));var te=null;for(En=0;En<Lo.length;++En)if(Oi(Lo[En],Rn,Gn),Lo[En]&&Lo[En].texture){var me=of[Lo[En].texture._texture.format]*tu[Lo[En].texture._texture.type];te===null&&(te=me)}return Oi(ve,Rn,Gn),Oi(Y,Rn,Gn),Oi(ye,Rn,Gn),Ii(Ki),Ki.width=Rn,Ki.height=Gn,Ki.colorAttachments=Lo,Ki.depthAttachment=ve,Ki.stencilAttachment=Y,Ki.depthStencilAttachment=ye,mn.color=Lo.map(Ea),mn.depth=Ea(ve),mn.stencil=Ea(Y),mn.depthStencil=Ea(ye),mn.width=Ki.width,mn.height=Ki.height,Za(Ki),mn}function In(Di,nn){var En=Math.max(Di|0,1),Rn=Math.max(nn|0||En,1);if(En===Ki.width&&Rn===Ki.height)return mn;for(var Gn=Ki.colorAttachments,Ps=0;Ps<Gn.length;++Ps)ii(Gn[Ps],En,Rn);return ii(Ki.depthAttachment,En,Rn),ii(Ki.stencilAttachment,En,Rn),ii(Ki.depthStencilAttachment,En,Rn),Ki.width=mn.width=En,Ki.height=mn.height=Rn,Za(Ki),mn}return mn(Si,Ti),d(mn,{resize:In,_reglType:"framebuffer",_framebuffer:Ki,destroy:function(){hn(Ki),Ii(Ki)},use:function(Di){wa.setFBO({framebuffer:mn},Di)}})}function $i(Si){var Ti=Array(6);function Ki(In){var Di,nn={color:null},En=0,Rn=null,Gn="rgba",Ps="uint8",xl=1;if(typeof In=="number")En=In|0;else if(!In)En=1;else{var ho=In;if("shape"in ho){var Hl=ho.shape;En=Hl[0]}else"radius"in ho&&(En=ho.radius|0),"width"in ho?(En=ho.width|0,"height"in ho):"height"in ho&&(En=ho.height|0);("color"in ho||"colors"in ho)&&(Rn=ho.color||ho.colors,Array.isArray(Rn)),Rn||("colorCount"in ho&&(xl=ho.colorCount|0),"colorType"in ho&&(Ps=ho.colorType),"colorFormat"in ho&&(Gn=ho.colorFormat)),"depth"in ho&&(nn.depth=ho.depth),"stencil"in ho&&(nn.stencil=ho.stencil),"depthStencil"in ho&&(nn.depthStencil=ho.depthStencil)}var fs;if(Rn)if(Array.isArray(Rn))for(fs=[],Di=0;Di<Rn.length;++Di)fs[Di]=Rn[Di];else fs=[Rn];else{fs=Array(xl);var Al={radius:En,format:Gn,type:Ps};for(Di=0;Di<xl;++Di)fs[Di]=ua.createCube(Al)}for(nn.color=Array(fs.length),Di=0;Di<fs.length;++Di){var El=fs[Di];En=En||El.width,nn.color[Di]={target:bu,data:fs[Di]}}for(Di=0;Di<6;++Di){for(var Ql=0;Ql<fs.length;++Ql)nn.color[Ql].target=bu+Di;Di>0&&(nn.depth=Ti[0].depth,nn.stencil=Ti[0].stencil,nn.depthStencil=Ti[0].depthStencil),Ti[Di]?Ti[Di](nn):Ti[Di]=Va(nn)}return d(Ki,{width:En,height:En,color:fs})}function mn(In){var Di,nn=In|0;if(nn===Ki.width)return Ki;var En=Ki.color;for(Di=0;Di<En.length;++Di)En[Di].resize(nn);for(Di=0;Di<6;++Di)Ti[Di].resize(nn);return Ki.width=Ki.height=nn,Ki}return Ki(Si),d(Ki,{faces:Ti,resize:mn,_reglType:"framebufferCube",destroy:function(){Ti.forEach(function(In){In.destroy()})}})}function zi(){wa.cur=null,wa.next=null,wa.dirty=!0,bt(Wa).forEach(function(Si){Si.framebuffer=nt.createFramebuffer(),Za(Si)})}return d(wa,{getFramebuffer:function(Si){if(typeof Si=="function"&&Si._reglType==="framebuffer"){var Ti=Si._framebuffer;if(Ti instanceof ji)return Ti}return null},create:Va,createCube:$i,clear:function(){bt(Wa).forEach(hn)},restore:zi})}var uh=5126,vf=34962,ol=34963;function mu(){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=uh,this.offset=0,this.stride=0,this.divisor=0}function Pu(nt,Yt,cr,ua,Aa,xa,wa){for(var Ja=cr.maxAttributes,Ai=new Array(Ja),bi=0;bi<Ja;++bi)Ai[bi]=new mu;var fi=0,yn={},Oi={Record:mu,scope:{},state:Ai,currentVAO:null,targetVAO:null,restore:qa()?Ii:function(){},createVAO:hn,getVAO:Ea,destroyBuffer:ki,setVAO:qa()?ii:gi,clear:qa()?Wa:function(){}};function ki(Za){for(var Va=0;Va<Ai.length;++Va){var $i=Ai[Va];$i.buffer===Za&&(nt.disableVertexAttribArray(Va),$i.buffer=null)}}function qa(){return Yt.oes_vertex_array_object}function ea(){return Yt.angle_instanced_arrays}function Ea(Za){return typeof Za=="function"&&Za._vao?Za._vao:null}function ii(Za){if(Za!==Oi.currentVAO){var Va=qa();Za?Va.bindVertexArrayOES(Za.vao):Va.bindVertexArrayOES(null),Oi.currentVAO=Za}}function gi(Za){if(Za!==Oi.currentVAO){if(Za)Za.bindAttrs();else{for(var Va=ea(),$i=0;$i<Ai.length;++$i){var zi=Ai[$i];zi.buffer?(nt.enableVertexAttribArray($i),zi.buffer.bind(),nt.vertexAttribPointer($i,zi.size,zi.type,zi.normalized,zi.stride,zi.offfset),Va&&zi.divisor&&Va.vertexAttribDivisorANGLE($i,zi.divisor)):(nt.disableVertexAttribArray($i),nt.vertexAttrib4f($i,zi.x,zi.y,zi.z,zi.w))}wa.elements?nt.bindBuffer(ol,wa.elements.buffer.buffer):nt.bindBuffer(ol,null)}Oi.currentVAO=Za}}function Wa(){bt(yn).forEach(function(Za){Za.destroy()})}function ji(){this.id=++fi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Za=qa();Za?this.vao=Za.createVertexArrayOES():this.vao=null,yn[this.id]=this,this.buffers=[]}ji.prototype.bindAttrs=function(){for(var Za=ea(),Va=this.attributes,$i=0;$i<Va.length;++$i){var zi=Va[$i];zi.buffer?(nt.enableVertexAttribArray($i),nt.bindBuffer(vf,zi.buffer.buffer),nt.vertexAttribPointer($i,zi.size,zi.type,zi.normalized,zi.stride,zi.offset),Za&&zi.divisor&&Za.vertexAttribDivisorANGLE($i,zi.divisor)):(nt.disableVertexAttribArray($i),nt.vertexAttrib4f($i,zi.x,zi.y,zi.z,zi.w))}for(var Si=Va.length;Si<Ja;++Si)nt.disableVertexAttribArray(Si);var Ti=xa.getElements(this.elements);Ti?nt.bindBuffer(ol,Ti.buffer.buffer):nt.bindBuffer(ol,null)},ji.prototype.refresh=function(){var Za=qa();Za&&(Za.bindVertexArrayOES(this.vao),this.bindAttrs(),Oi.currentVAO=null,Za.bindVertexArrayOES(null))},ji.prototype.destroy=function(){if(this.vao){var Za=qa();this===Oi.currentVAO&&(Oi.currentVAO=null,Za.bindVertexArrayOES(null)),Za.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),yn[this.id]&&(delete yn[this.id],ua.vaoCount-=1)};function Ii(){var Za=qa();Za&&bt(yn).forEach(function(Va){Va.refresh()})}function hn(Za){var Va=new ji;ua.vaoCount+=1;function $i(zi){var Si;if(Array.isArray(zi))Si=zi,Va.elements&&Va.ownsElements&&Va.elements.destroy(),Va.elements=null,Va.ownsElements=!1,Va.offset=0,Va.count=0,Va.instances=-1,Va.primitive=4;else{if(zi.elements){var Ti=zi.elements;Va.ownsElements?typeof Ti=="function"&&Ti._reglType==="elements"?(Va.elements.destroy(),Va.ownsElements=!1):(Va.elements(Ti),Va.ownsElements=!1):xa.getElements(zi.elements)?(Va.elements=zi.elements,Va.ownsElements=!1):(Va.elements=xa.create(zi.elements),Va.ownsElements=!0)}else Va.elements=null,Va.ownsElements=!1;Si=zi.attributes,Va.offset=0,Va.count=-1,Va.instances=-1,Va.primitive=4,Va.elements&&(Va.count=Va.elements._elements.vertCount,Va.primitive=Va.elements._elements.primType),"offset"in zi&&(Va.offset=zi.offset|0),"count"in zi&&(Va.count=zi.count|0),"instances"in zi&&(Va.instances=zi.instances|0),"primitive"in zi&&(Va.primitive=xt[zi.primitive])}var Ki={},mn=Va.attributes;mn.length=Si.length;for(var In=0;In<Si.length;++In){var Di=Si[In],nn=mn[In]=new mu,En=Di.data||Di;if(Array.isArray(En)||wr(En)||Ir(En)){var Rn;Va.buffers[In]&&(Rn=Va.buffers[In],wr(En)&&Rn._buffer.byteLength>=En.byteLength?Rn.subdata(En):(Rn.destroy(),Va.buffers[In]=null)),Va.buffers[In]||(Rn=Va.buffers[In]=Aa.create(Di,vf,!1,!0)),nn.buffer=Aa.getBuffer(Rn),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1,Ki[In]=1}else Aa.getBuffer(Di)?(nn.buffer=Aa.getBuffer(Di),nn.size=nn.buffer.dimension|0,nn.normalized=!1,nn.type=nn.buffer.dtype,nn.offset=0,nn.stride=0,nn.divisor=0,nn.state=1):Aa.getBuffer(Di.buffer)?(nn.buffer=Aa.getBuffer(Di.buffer),nn.size=(+Di.size||nn.buffer.dimension)|0,nn.normalized=!!Di.normalized||!1,"type"in Di?nn.type=la[Di.type]:nn.type=nn.buffer.dtype,nn.offset=(Di.offset||0)|0,nn.stride=(Di.stride||0)|0,nn.divisor=(Di.divisor||0)|0,nn.state=1):"x"in Di&&(nn.x=+Di.x||0,nn.y=+Di.y||0,nn.z=+Di.z||0,nn.w=+Di.w||0,nn.state=2)}for(var Gn=0;Gn<Va.buffers.length;++Gn)!Ki[Gn]&&Va.buffers[Gn]&&(Va.buffers[Gn].destroy(),Va.buffers[Gn]=null);return Va.refresh(),$i}return $i.destroy=function(){for(var zi=0;zi<Va.buffers.length;++zi)Va.buffers[zi]&&Va.buffers[zi].destroy();Va.buffers.length=0,Va.ownsElements&&(Va.elements.destroy(),Va.elements=null,Va.ownsElements=!1),Va.destroy()},$i._vao=Va,$i._reglType="vao",$i(Za)}return Oi}var kf=35632,hl=35633,sf=35718,Mc=35721;function Hu(nt,Yt,cr,ua){var Aa={},xa={};function wa(ea,Ea,ii,gi){this.name=ea,this.id=Ea,this.location=ii,this.info=gi}function Ja(ea,Ea){for(var ii=0;ii<ea.length;++ii)if(ea[ii].id===Ea.id){ea[ii].location=Ea.location;return}ea.push(Ea)}function Ai(ea,Ea,ii){var gi=ea===kf?Aa:xa,Wa=gi[Ea];if(!Wa){var ji=Yt.str(Ea);Wa=nt.createShader(ea),nt.shaderSource(Wa,ji),nt.compileShader(Wa),gi[Ea]=Wa}return Wa}var bi={},fi=[],yn=0;function Oi(ea,Ea){this.id=yn++,this.fragId=ea,this.vertId=Ea,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,ua.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ki(ea,Ea,ii){var gi,Wa,ji=Ai(kf,ea.fragId),Ii=Ai(hl,ea.vertId),hn=ea.program=nt.createProgram();if(nt.attachShader(hn,ji),nt.attachShader(hn,Ii),ii)for(gi=0;gi<ii.length;++gi){var Za=ii[gi];nt.bindAttribLocation(hn,Za[0],Za[1])}nt.linkProgram(hn);var Va=nt.getProgramParameter(hn,sf);ua.profile&&(ea.stats.uniformsCount=Va);var $i=ea.uniforms;for(gi=0;gi<Va;++gi)if(Wa=nt.getActiveUniform(hn,gi),Wa)if(Wa.size>1)for(var zi=0;zi<Wa.size;++zi){var Si=Wa.name.replace("[0]","["+zi+"]");Ja($i,new wa(Si,Yt.id(Si),nt.getUniformLocation(hn,Si),Wa))}else Ja($i,new wa(Wa.name,Yt.id(Wa.name),nt.getUniformLocation(hn,Wa.name),Wa));var Ti=nt.getProgramParameter(hn,Mc);ua.profile&&(ea.stats.attributesCount=Ti);var Ki=ea.attributes;for(gi=0;gi<Ti;++gi)Wa=nt.getActiveAttrib(hn,gi),Wa&&Ja(Ki,new wa(Wa.name,Yt.id(Wa.name),nt.getAttribLocation(hn,Wa.name),Wa))}ua.profile&&(cr.getMaxUniformsCount=function(){var ea=0;return fi.forEach(function(Ea){Ea.stats.uniformsCount>ea&&(ea=Ea.stats.uniformsCount)}),ea},cr.getMaxAttributesCount=function(){var ea=0;return fi.forEach(function(Ea){Ea.stats.attributesCount>ea&&(ea=Ea.stats.attributesCount)}),ea});function qa(){Aa={},xa={};for(var ea=0;ea<fi.length;++ea)ki(fi[ea],null,fi[ea].attributes.map(function(Ea){return[Ea.location,Ea.name]}))}return{clear:function(){var ea=nt.deleteShader.bind(nt);bt(Aa).forEach(ea),Aa={},bt(xa).forEach(ea),xa={},fi.forEach(function(Ea){nt.deleteProgram(Ea.program)}),fi.length=0,bi={},cr.shaderCount=0},program:function(ea,Ea,ii,gi){var Wa=bi[Ea];Wa||(Wa=bi[Ea]={});var ji=Wa[ea];if(ji&&(ji.refCount++,!gi))return ji;var Ii=new Oi(Ea,ea);return cr.shaderCount++,ki(Ii,ii,gi),ji||(Wa[ea]=Ii),fi.push(Ii),d(Ii,{destroy:function(){if(Ii.refCount--,Ii.refCount<=0){nt.deleteProgram(Ii.program);var hn=fi.indexOf(Ii);fi.splice(hn,1),cr.shaderCount--}Wa[Ii.vertId].refCount<=0&&(nt.deleteShader(xa[Ii.vertId]),delete xa[Ii.vertId],delete bi[Ii.fragId][Ii.vertId]),Object.keys(bi[Ii.fragId]).length||(nt.deleteShader(Aa[Ii.fragId]),delete Aa[Ii.fragId],delete bi[Ii.fragId])}})},restore:qa,shader:Ai,frag:-1,vert:-1}}var mf=6408,Wu=5121,Zc=3333,Lf=5126;function ru(nt,Yt,cr,ua,Aa,xa,wa){function Ja(fi){var yn;Yt.next===null?yn=Wu:yn=Yt.next.colorAttachments[0].texture._texture.type;var Oi=0,ki=0,qa=ua.framebufferWidth,ea=ua.framebufferHeight,Ea=null;wr(fi)?Ea=fi:fi&&(Oi=fi.x|0,ki=fi.y|0,qa=(fi.width||ua.framebufferWidth-Oi)|0,ea=(fi.height||ua.framebufferHeight-ki)|0,Ea=fi.data||null),cr();var ii=qa*ea*4;return Ea||(yn===Wu?Ea=new Uint8Array(ii):yn===Lf&&(Ea=Ea||new Float32Array(ii))),nt.pixelStorei(Zc,4),nt.readPixels(Oi,ki,qa,ea,mf,yn,Ea),Ea}function Ai(fi){var yn;return Yt.setFBO({framebuffer:fi.framebuffer},function(){yn=Ja(fi)}),yn}function bi(fi){return!fi||!("framebuffer"in fi)?Ja(fi):Ai(fi)}return bi}var jf=0,Xu="";function Ec(nt){return gu(mc(sc(nt)))}function mc(nt){return er(Ri(kc(nt),nt.length*8))}function jl(nt,Yt){var cr=kc(nt);cr.length>16&&(cr=Ri(cr,nt.length*8));for(var ua=Array(16),Aa=Array(16),xa=0;xa<16;xa++)ua[xa]=cr[xa]^909522486,Aa[xa]=cr[xa]^1549556828;var wa=Ri(ua.concat(kc(Yt)),512+Yt.length*8);return er(Ri(Aa.concat(wa),768))}function gu(nt){for(var Yt=jf?"0123456789ABCDEF":"0123456789abcdef",cr="",ua,Aa=0;Aa<nt.length;Aa++)ua=nt.charCodeAt(Aa),cr+=Yt.charAt(ua>>>4&15)+Yt.charAt(ua&15);return cr}function Cc(nt){for(var Yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cr="",ua=nt.length,Aa=0;Aa<ua;Aa+=3)for(var xa=nt.charCodeAt(Aa)<<16|(Aa+1<ua?nt.charCodeAt(Aa+1)<<8:0)|(Aa+2<ua?nt.charCodeAt(Aa+2):0),wa=0;wa<4;wa++)Aa*8+wa*6>nt.length*8?cr+=Xu:cr+=Yt.charAt(xa>>>6*(3-wa)&63);return cr}function Yc(nt,Yt){var cr=Yt.length,ua=Array(),Aa,xa,wa,Ja,Ai=Array(Math.ceil(nt.length/2));for(Aa=0;Aa<Ai.length;Aa++)Ai[Aa]=nt.charCodeAt(Aa*2)<<8|nt.charCodeAt(Aa*2+1);for(;Ai.length>0;){for(Ja=Array(),wa=0,Aa=0;Aa<Ai.length;Aa++)wa=(wa<<16)+Ai[Aa],xa=Math.floor(wa/cr),wa-=xa*cr,(Ja.length>0||xa>0)&&(Ja[Ja.length]=xa);ua[ua.length]=wa,Ai=Ja}var bi="";for(Aa=ua.length-1;Aa>=0;Aa--)bi+=Yt.charAt(ua[Aa]);var fi=Math.ceil(nt.length*8/(Math.log(Yt.length)/Math.log(2)));for(Aa=bi.length;Aa<fi;Aa++)bi=Yt[0]+bi;return bi}function sc(nt){for(var Yt="",cr=-1,ua,Aa;++cr<nt.length;)ua=nt.charCodeAt(cr),Aa=cr+1<nt.length?nt.charCodeAt(cr+1):0,55296<=ua&&ua<=56319&&56320<=Aa&&Aa<=57343&&(ua=65536+((ua&1023)<<10)+(Aa&1023),cr++),ua<=127?Yt+=String.fromCharCode(ua):ua<=2047?Yt+=String.fromCharCode(192|ua>>>6&31,128|ua&63):ua<=65535?Yt+=String.fromCharCode(224|ua>>>12&15,128|ua>>>6&63,128|ua&63):ua<=2097151&&(Yt+=String.fromCharCode(240|ua>>>18&7,128|ua>>>12&63,128|ua>>>6&63,128|ua&63));return Yt}function kc(nt){for(var Yt=Array(nt.length>>2),cr=0;cr<Yt.length;cr++)Yt[cr]=0;for(var cr=0;cr<nt.length*8;cr+=8)Yt[cr>>5]|=(nt.charCodeAt(cr/8)&255)<<24-cr%32;return Yt}function er(nt){for(var Yt="",cr=0;cr<nt.length*32;cr+=8)Yt+=String.fromCharCode(nt[cr>>5]>>>24-cr%32&255);return Yt}function yr(nt,Yt){return nt>>>Yt|nt<<32-Yt}function na(nt,Yt){return nt>>>Yt}function $r(nt,Yt,cr){return nt&Yt^~nt&cr}function La(nt,Yt,cr){return nt&Yt^nt&cr^Yt&cr}function hi(nt){return yr(nt,2)^yr(nt,13)^yr(nt,22)}function Pi(nt){return yr(nt,6)^yr(nt,11)^yr(nt,25)}function Zi(nt){return yr(nt,7)^yr(nt,18)^na(nt,3)}function tn(nt){return yr(nt,17)^yr(nt,19)^na(nt,10)}var dn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ri(nt,Yt){var cr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ua=new Array(64),Aa,xa,wa,Ja,Ai,bi,fi,yn,Oi,ki,qa,ea;for(nt[Yt>>5]|=128<<24-Yt%32,nt[(Yt+64>>9<<4)+15]=Yt,Oi=0;Oi<nt.length;Oi+=16){for(Aa=cr[0],xa=cr[1],wa=cr[2],Ja=cr[3],Ai=cr[4],bi=cr[5],fi=cr[6],yn=cr[7],ki=0;ki<64;ki++)ki<16?ua[ki]=nt[ki+Oi]:ua[ki]=Fi(Fi(Fi(tn(ua[ki-2]),ua[ki-7]),Zi(ua[ki-15])),ua[ki-16]),qa=Fi(Fi(Fi(Fi(yn,Pi(Ai)),$r(Ai,bi,fi)),dn[ki]),ua[ki]),ea=Fi(hi(Aa),La(Aa,xa,wa)),yn=fi,fi=bi,bi=Ai,Ai=Fi(Ja,qa),Ja=wa,wa=xa,xa=Aa,Aa=Fi(qa,ea);cr[0]=Fi(Aa,cr[0]),cr[1]=Fi(xa,cr[1]),cr[2]=Fi(wa,cr[2]),cr[3]=Fi(Ja,cr[3]),cr[4]=Fi(Ai,cr[4]),cr[5]=Fi(bi,cr[5]),cr[6]=Fi(fi,cr[6]),cr[7]=Fi(yn,cr[7])}return cr}function Fi(nt,Yt){var cr=(nt&65535)+(Yt&65535),ua=(nt>>16)+(Yt>>16)+(cr>>16);return ua<<16|cr&65535}function qi(nt){return Array.prototype.slice.call(nt)}function _i(nt){return qi(nt).join("")}function Mn(nt){var Yt=nt&&nt.cache,cr=0,ua=[],Aa=[],xa=[];function wa(qa,ea){var Ea=ea&&ea.stable;if(!Ea){for(var ii=0;ii<Aa.length;++ii)if(Aa[ii]===qa&&!xa[ii])return ua[ii]}var gi="g"+cr++;return ua.push(gi),Aa.push(qa),xa.push(Ea),gi}function Ja(){var qa=[];function ea(){qa.push.apply(qa,qi(arguments))}var Ea=[];function ii(){var gi="v"+cr++;return Ea.push(gi),arguments.length>0&&(qa.push(gi,"="),qa.push.apply(qa,qi(arguments)),qa.push(";")),gi}return d(ea,{def:ii,toString:function(){return _i([Ea.length>0?"var "+Ea.join(",")+";":"",_i(qa)])}})}function Ai(){var qa=Ja(),ea=Ja(),Ea=qa.toString,ii=ea.toString;function gi(Wa,ji){ea(Wa,ji,"=",qa.def(Wa,ji),";")}return d(function(){qa.apply(qa,qi(arguments))},{def:qa.def,entry:qa,exit:ea,save:gi,set:function(Wa,ji,Ii){gi(Wa,ji),qa(Wa,ji,"=",Ii,";")},toString:function(){return Ea()+ii()}})}function bi(){var qa=_i(arguments),ea=Ai(),Ea=Ai(),ii=ea.toString,gi=Ea.toString;return d(ea,{then:function(){return ea.apply(ea,qi(arguments)),this},else:function(){return Ea.apply(Ea,qi(arguments)),this},toString:function(){var Wa=gi();return Wa&&(Wa="else{"+Wa+"}"),_i(["if(",qa,"){",ii(),"}",Wa])}})}var fi=Ja(),yn={};function Oi(qa,ea){var Ea=[];function ii(){var hn="a"+Ea.length;return Ea.push(hn),hn}ea=ea||0;for(var gi=0;gi<ea;++gi)ii();var Wa=Ai(),ji=Wa.toString,Ii=yn[qa]=d(Wa,{arg:ii,toString:function(){return _i(["function(",Ea.join(),"){",ji(),"}"])}});return Ii}function ki(){var qa=['"use strict";',fi,"return {"];Object.keys(yn).forEach(function(gi){qa.push('"',gi,'":',yn[gi].toString(),",")}),qa.push("}");var ea=_i(qa).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Ea;if(Yt&&(Ea=Ec(ea),Yt[Ea]))return Yt[Ea].apply(null,Aa);var ii=Function.apply(null,ua.concat(ea));return Yt&&(Yt[Ea]=ii),ii.apply(null,Aa)}return{global:fi,link:wa,block:Ja,proc:Oi,scope:Ai,cond:bi,compile:ki}}var Kn="xyzw".split(""),ao=5121,Jn=1,co=2,wn=0,un=1,_o=2,Qo=3,xs=4,Qs=5,Rs=6,Ks="dither",ys="blend.enable",Fl="blend.color",yl="blend.equation",sl="blend.func",Un="depth.enable",Io="depth.func",Xs="depth.range",Ls="depth.mask",ou="colorMask",Iu="cull.enable",Zu="cull.face",Lc="frontFace",yu="lineWidth",Pc="polygonOffset.enable",wu="polygonOffset.offset",gc="sample.alpha",fo="sample.enable",zo="sample.coverage",Ic="stencil.enable",lc="stencil.mask",Yu="stencil.func",Ne="stencil.opFront",R="stencil.opBack",ae="scissor.enable",we="scissor.box",Se="viewport",Oe="profile",pt="framebuffer",At="vert",Bt="frag",$t="elements",br="primitive",Ar="count",Yr="offset",sa="instances",He="vao",Je="Width",ut="Height",dt=pt+Je,Ct=pt+ut,wt=Se+Je,Dt=Se+ut,ur="drawingBuffer",mr=ur+Je,Er=ur+ut,Br=[sl,yl,Yu,Ne,R,zo,Se,we,wu],Qr=34962,ga=34963,Sa=2884,Oa=3042,di=3024,Wi=2960,Gi=2929,on=3089,Tn=32823,Wn=32926,Bn=32928,Ao=5126,ss=35664,So=35665,Ko=35666,hs=5124,ll=35667,Js=35668,es=35669,ts=35670,Pl=35671,$l=35672,Ru=35673,hu=35674,wl=35675,su=35676,uc=35678,ql=35680,Vl=4,de=1028,De=1029,et=2304,vt=2305,_t=32775,St=32776,ar=519,zt=7680,gr=0,Vr=1,Wr=32774,Ta=513,ya=36160,ri=36064,ni={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},Ma={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},Na={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ka={cw:et,ccw:vt};function vi(nt){return Array.isArray(nt)||wr(nt)||Ir(nt)}function ui(nt){return nt.sort(function(Yt,cr){return Yt===Se?-1:cr===Se?1:Yt<cr?-1:1})}function Pa(nt,Yt,cr,ua){this.thisDep=nt,this.contextDep=Yt,this.propDep=cr,this.append=ua}function sn(nt){return nt&&!(nt.thisDep||nt.contextDep||nt.propDep)}function an(nt){return new Pa(!1,!1,!1,nt)}function vn(nt,Yt){var cr=nt.type;if(cr===wn){var ua=nt.data.length;return new Pa(!0,ua>=1,ua>=2,Yt)}else if(cr===xs){var Aa=nt.data;return new Pa(Aa.thisDep,Aa.contextDep,Aa.propDep,Yt)}else{if(cr===Qs)return new Pa(!1,!1,!1,Yt);if(cr===Rs){for(var xa=!1,wa=!1,Ja=!1,Ai=0;Ai<nt.data.length;++Ai){var bi=nt.data[Ai];if(bi.type===un)Ja=!0;else if(bi.type===_o)wa=!0;else if(bi.type===Qo)xa=!0;else if(bi.type===wn){xa=!0;var fi=bi.data;fi>=1&&(wa=!0),fi>=2&&(Ja=!0)}else bi.type===xs&&(xa=xa||bi.data.thisDep,wa=wa||bi.data.contextDep,Ja=Ja||bi.data.propDep)}return new Pa(xa,wa,Ja,Yt)}else return new Pa(cr===Qo,cr===_o,cr===un,Yt)}}var Pn=new Pa(!1,!1,!1,function(){});function Zn(nt,Yt,cr,ua,Aa,xa,wa,Ja,Ai,bi,fi,yn,Oi,ki,qa,ea){var Ea=bi.Record,ii={add:32774,subtract:32778,"reverse subtract":32779};cr.ext_blend_minmax&&(ii.min=_t,ii.max=St);var gi=cr.angle_instanced_arrays,Wa=cr.webgl_draw_buffers,ji=cr.oes_vertex_array_object,Ii={dirty:!0,profile:ea.profile},hn={},Za=[],Va={},$i={};function zi(gt){return gt.replace(".","_")}function Si(gt,Et,Ft){var ir=zi(gt);Za.push(gt),hn[ir]=Ii[ir]=!!Ft,Va[ir]=Et}function Ti(gt,Et,Ft){var ir=zi(gt);Za.push(gt),Array.isArray(Ft)?(Ii[ir]=Ft.slice(),hn[ir]=Ft.slice()):Ii[ir]=hn[ir]=Ft,$i[ir]=Et}function Ki(gt){return!!isNaN(gt)}Si(Ks,di),Si(ys,Oa),Ti(Fl,"blendColor",[0,0,0,0]),Ti(yl,"blendEquationSeparate",[Wr,Wr]),Ti(sl,"blendFuncSeparate",[Vr,gr,Vr,gr]),Si(Un,Gi,!0),Ti(Io,"depthFunc",Ta),Ti(Xs,"depthRange",[0,1]),Ti(Ls,"depthMask",!0),Ti(ou,ou,[!0,!0,!0,!0]),Si(Iu,Sa),Ti(Zu,"cullFace",De),Ti(Lc,Lc,vt),Ti(yu,yu,1),Si(Pc,Tn),Ti(wu,"polygonOffset",[0,0]),Si(gc,Wn),Si(fo,Bn),Ti(zo,"sampleCoverage",[1,!1]),Si(Ic,Wi),Ti(lc,"stencilMask",-1),Ti(Yu,"stencilFunc",[ar,0,-1]),Ti(Ne,"stencilOpSeparate",[de,zt,zt,zt]),Ti(R,"stencilOpSeparate",[De,zt,zt,zt]),Si(ae,on),Ti(we,"scissor",[0,0,nt.drawingBufferWidth,nt.drawingBufferHeight]),Ti(Se,Se,[0,0,nt.drawingBufferWidth,nt.drawingBufferHeight]);var mn={gl:nt,context:Oi,strings:Yt,next:hn,current:Ii,draw:yn,elements:xa,buffer:Aa,shader:fi,attributes:bi.state,vao:bi,uniforms:Ai,framebuffer:Ja,extensions:cr,timer:ki,isBufferArgs:vi},In={primTypes:xt,compareFuncs:Ma,blendFuncs:ni,blendEquations:ii,stencilOps:Na,glTypes:la,orientationType:Ka};Wa&&(In.backBuffer=[De],In.drawBuffer=p(ua.maxDrawbuffers,function(gt){return gt===0?[0]:p(gt,function(Et){return ri+Et})}));var Di=0;function nn(){var gt=Mn({cache:qa}),Et=gt.link,Ft=gt.global;gt.id=Di++,gt.batchId="0";var ir=Et(mn),fr=gt.shared={props:"a0"};Object.keys(mn).forEach(function(or){fr[or]=Ft.def(ir,".",or)});var sr=gt.next={},pr=gt.current={};Object.keys($i).forEach(function(or){Array.isArray(Ii[or])&&(sr[or]=Ft.def(fr.next,".",or),pr[or]=Ft.def(fr.current,".",or))});var lr=gt.constants={};Object.keys(In).forEach(function(or){lr[or]=Ft.def(JSON.stringify(In[or]))}),gt.invoke=function(or,qt){switch(qt.type){case wn:var Dr=["this",fr.context,fr.props,gt.batchId];return or.def(Et(qt.data),".call(",Dr.slice(0,Math.max(qt.data.length+1,4)),")");case un:return or.def(fr.props,qt.data);case _o:return or.def(fr.context,qt.data);case Qo:return or.def("this",qt.data);case xs:return qt.data.append(gt,or),qt.data.ref;case Qs:return qt.data.toString();case Rs:return qt.data.map(function(Jr){return gt.invoke(or,Jr)})}},gt.attribCache={};var Xt={};return gt.scopeAttrib=function(or){var qt=Yt.id(or);if(qt in Xt)return Xt[qt];var Dr=bi.scope[qt];Dr||(Dr=bi.scope[qt]=new Ea);var Jr=Xt[qt]=Et(Dr);return Jr},gt}function En(gt){var Et=gt.static,Ft=gt.dynamic,ir;if(Oe in Et){var fr=!!Et[Oe];ir=an(function(pr,lr){return fr}),ir.enable=fr}else if(Oe in Ft){var sr=Ft[Oe];ir=vn(sr,function(pr,lr){return pr.invoke(lr,sr)})}return ir}function Rn(gt,Et){var Ft=gt.static,ir=gt.dynamic;if(pt in Ft){var fr=Ft[pt];return fr?(fr=Ja.getFramebuffer(fr),an(function(pr,lr){var Xt=pr.link(fr),or=pr.shared;lr.set(or.framebuffer,".next",Xt);var qt=or.context;return lr.set(qt,"."+dt,Xt+".width"),lr.set(qt,"."+Ct,Xt+".height"),Xt})):an(function(pr,lr){var Xt=pr.shared;lr.set(Xt.framebuffer,".next","null");var or=Xt.context;return lr.set(or,"."+dt,or+"."+mr),lr.set(or,"."+Ct,or+"."+Er),"null"})}else if(pt in ir){var sr=ir[pt];return vn(sr,function(pr,lr){var Xt=pr.invoke(lr,sr),or=pr.shared,qt=or.framebuffer,Dr=lr.def(qt,".getFramebuffer(",Xt,")");lr.set(qt,".next",Dr);var Jr=or.context;return lr.set(Jr,"."+dt,Dr+"?"+Dr+".width:"+Jr+"."+mr),lr.set(Jr,"."+Ct,Dr+"?"+Dr+".height:"+Jr+"."+Er),Dr})}else return null}function Gn(gt,Et,Ft){var ir=gt.static,fr=gt.dynamic;function sr(Xt){if(Xt in ir){var or=ir[Xt],qt=!0,Dr=or.x|0,Jr=or.y|0,ba,yi;return"width"in or?ba=or.width|0:qt=!1,"height"in or?yi=or.height|0:qt=!1,new Pa(!qt&&Et&&Et.thisDep,!qt&&Et&&Et.contextDep,!qt&&Et&&Et.propDep,function(Ji,Bi){var pi=Ji.shared.context,wi=ba;"width"in or||(wi=Bi.def(pi,".",dt,"-",Dr));var Mi=yi;return"height"in or||(Mi=Bi.def(pi,".",Ct,"-",Jr)),[Dr,Jr,wi,Mi]})}else if(Xt in fr){var Xa=fr[Xt],si=vn(Xa,function(Ji,Bi){var pi=Ji.invoke(Bi,Xa),wi=Ji.shared.context,Mi=Bi.def(pi,".x|0"),Vi=Bi.def(pi,".y|0"),cn=Bi.def('"width" in ',pi,"?",pi,".width|0:","(",wi,".",dt,"-",Mi,")"),xo=Bi.def('"height" in ',pi,"?",pi,".height|0:","(",wi,".",Ct,"-",Vi,")");return[Mi,Vi,cn,xo]});return Et&&(si.thisDep=si.thisDep||Et.thisDep,si.contextDep=si.contextDep||Et.contextDep,si.propDep=si.propDep||Et.propDep),si}else return Et?new Pa(Et.thisDep,Et.contextDep,Et.propDep,function(Ji,Bi){var pi=Ji.shared.context;return[0,0,Bi.def(pi,".",dt),Bi.def(pi,".",Ct)]}):null}var pr=sr(Se);if(pr){var lr=pr;pr=new Pa(pr.thisDep,pr.contextDep,pr.propDep,function(Xt,or){var qt=lr.append(Xt,or),Dr=Xt.shared.context;return or.set(Dr,"."+wt,qt[2]),or.set(Dr,"."+Dt,qt[3]),qt})}return{viewport:pr,scissor_box:sr(we)}}function Ps(gt,Et){var Ft=gt.static,ir=typeof Ft[Bt]=="string"&&typeof Ft[At]=="string";if(ir){if(Object.keys(Et.dynamic).length>0)return null;var fr=Et.static,sr=Object.keys(fr);if(sr.length>0&&typeof fr[sr[0]]=="number"){for(var pr=[],lr=0;lr<sr.length;++lr)pr.push([fr[sr[lr]]|0,sr[lr]]);return pr}}return null}function xl(gt,Et,Ft){var ir=gt.static,fr=gt.dynamic;function sr(qt){if(qt in ir){var Dr=Yt.id(ir[qt]),Jr=an(function(){return Dr});return Jr.id=Dr,Jr}else if(qt in fr){var ba=fr[qt];return vn(ba,function(yi,Xa){var si=yi.invoke(Xa,ba),Ji=Xa.def(yi.shared.strings,".id(",si,")");return Ji})}return null}var pr=sr(Bt),lr=sr(At),Xt=null,or;return sn(pr)&&sn(lr)?(Xt=fi.program(lr.id,pr.id,null,Ft),or=an(function(qt,Dr){return qt.link(Xt)})):or=new Pa(pr&&pr.thisDep||lr&&lr.thisDep,pr&&pr.contextDep||lr&&lr.contextDep,pr&&pr.propDep||lr&&lr.propDep,function(qt,Dr){var Jr=qt.shared.shader,ba;pr?ba=pr.append(qt,Dr):ba=Dr.def(Jr,".",Bt);var yi;lr?yi=lr.append(qt,Dr):yi=Dr.def(Jr,".",At);var Xa=Jr+".program("+yi+","+ba;return Dr.def(Xa+")")}),{frag:pr,vert:lr,progVar:or,program:Xt}}function ho(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={},sr=!1;function pr(){if(He in Ft){var Bi=Ft[He];return Bi!==null&&bi.getVAO(Bi)===null&&(Bi=bi.createVAO(Bi)),sr=!0,fr.vao=Bi,an(function(wi){var Mi=bi.getVAO(Bi);return Mi?wi.link(Mi):"null"})}else if(He in ir){sr=!0;var pi=ir[He];return vn(pi,function(wi,Mi){var Vi=wi.invoke(Mi,pi);return Mi.def(wi.shared.vao+".getVAO("+Vi+")")})}return null}var lr=pr(),Xt=!1;function or(){if($t in Ft){var Bi=Ft[$t];if(fr.elements=Bi,vi(Bi)){var pi=fr.elements=xa.create(Bi,!0);Bi=xa.getElements(pi),Xt=!0}else Bi&&(Bi=xa.getElements(Bi),Xt=!0);var wi=an(function(Vi,cn){if(Bi){var xo=Vi.link(Bi);return Vi.ELEMENTS=xo,xo}return Vi.ELEMENTS=null,null});return wi.value=Bi,wi}else if($t in ir){Xt=!0;var Mi=ir[$t];return vn(Mi,function(Vi,cn){var xo=Vi.shared,jo=xo.isBufferArgs,ks=xo.elements,Fo=Vi.invoke(cn,Mi),bs=cn.def("null"),Hs=cn.def(jo,"(",Fo,")"),pu=Vi.cond(Hs).then(bs,"=",ks,".createStream(",Fo,");").else(bs,"=",ks,".getElements(",Fo,");");return cn.entry(pu),cn.exit(Vi.cond(Hs).then(ks,".destroyStream(",bs,");")),Vi.ELEMENTS=bs,bs})}else if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(Vi,cn){return cn.def(Vi.shared.vao+".currentVAO?"+Vi.shared.elements+".getElements("+Vi.shared.vao+".currentVAO.elements):null")});return null}var qt=or();function Dr(){if(br in Ft){var Bi=Ft[br];return fr.primitive=Bi,an(function(wi,Mi){return xt[Bi]})}else if(br in ir){var pi=ir[br];return vn(pi,function(wi,Mi){var Vi=wi.constants.primTypes,cn=wi.invoke(Mi,pi);return Mi.def(Vi,"[",cn,"]")})}else{if(Xt)return sn(qt)?qt.value?an(function(wi,Mi){return Mi.def(wi.ELEMENTS,".primType")}):an(function(){return Vl}):new Pa(qt.thisDep,qt.contextDep,qt.propDep,function(wi,Mi){var Vi=wi.ELEMENTS;return Mi.def(Vi,"?",Vi,".primType:",Vl)});if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(wi,Mi){return Mi.def(wi.shared.vao+".currentVAO?"+wi.shared.vao+".currentVAO.primitive:"+Vl)})}return null}function Jr(Bi,pi){if(Bi in Ft){var wi=Ft[Bi]|0;return pi?fr.offset=wi:fr.instances=wi,an(function(Vi,cn){return pi&&(Vi.OFFSET=wi),wi})}else if(Bi in ir){var Mi=ir[Bi];return vn(Mi,function(Vi,cn){var xo=Vi.invoke(cn,Mi);return pi&&(Vi.OFFSET=xo),xo})}else if(pi){if(Xt)return an(function(Vi,cn){return Vi.OFFSET=0,0});if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(Vi,cn){return cn.def(Vi.shared.vao+".currentVAO?"+Vi.shared.vao+".currentVAO.offset:0")})}else if(sr)return new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(Vi,cn){return cn.def(Vi.shared.vao+".currentVAO?"+Vi.shared.vao+".currentVAO.instances:-1")});return null}var ba=Jr(Yr,!0);function yi(){if(Ar in Ft){var Bi=Ft[Ar]|0;return fr.count=Bi,an(function(){return Bi})}else if(Ar in ir){var pi=ir[Ar];return vn(pi,function(cn,xo){var jo=cn.invoke(xo,pi);return jo})}else if(Xt)if(sn(qt)){if(qt)return ba?new Pa(ba.thisDep,ba.contextDep,ba.propDep,function(cn,xo){var jo=xo.def(cn.ELEMENTS,".vertCount-",cn.OFFSET);return jo}):an(function(cn,xo){return xo.def(cn.ELEMENTS,".vertCount")});var wi=an(function(){return-1});return wi}else{var Mi=new Pa(qt.thisDep||ba.thisDep,qt.contextDep||ba.contextDep,qt.propDep||ba.propDep,function(cn,xo){var jo=cn.ELEMENTS;return cn.OFFSET?xo.def(jo,"?",jo,".vertCount-",cn.OFFSET,":-1"):xo.def(jo,"?",jo,".vertCount:-1")});return Mi}else if(sr){var Vi=new Pa(lr.thisDep,lr.contextDep,lr.propDep,function(cn,xo){return xo.def(cn.shared.vao,".currentVAO?",cn.shared.vao,".currentVAO.count:-1")});return Vi}return null}var Xa=Dr(),si=yi(),Ji=Jr(sa,!1);return{elements:qt,primitive:Xa,count:si,instances:Ji,offset:ba,vao:lr,vaoActive:sr,elementsActive:Xt,static:fr}}function Hl(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={};return Za.forEach(function(sr){var pr=zi(sr);function lr(Xt,or){if(sr in Ft){var qt=Xt(Ft[sr]);fr[pr]=an(function(){return qt})}else if(sr in ir){var Dr=ir[sr];fr[pr]=vn(Dr,function(Jr,ba){return or(Jr,ba,Jr.invoke(ba,Dr))})}}switch(sr){case Iu:case ys:case Ks:case Ic:case Un:case ae:case Pc:case gc:case fo:case Ls:return lr(function(Xt){return Xt},function(Xt,or,qt){return qt});case Io:return lr(function(Xt){return Ma[Xt]},function(Xt,or,qt){var Dr=Xt.constants.compareFuncs;return or.def(Dr,"[",qt,"]")});case Xs:return lr(function(Xt){return Xt},function(Xt,or,qt){var Dr=or.def("+",qt,"[0]"),Jr=or.def("+",qt,"[1]");return[Dr,Jr]});case sl:return lr(function(Xt){var or="srcRGB"in Xt?Xt.srcRGB:Xt.src,qt="srcAlpha"in Xt?Xt.srcAlpha:Xt.src,Dr="dstRGB"in Xt?Xt.dstRGB:Xt.dst,Jr="dstAlpha"in Xt?Xt.dstAlpha:Xt.dst;return[ni[or],ni[Dr],ni[qt],ni[Jr]]},function(Xt,or,qt){var Dr=Xt.constants.blendFuncs;function Jr(pi,wi){var Mi=or.def('"',pi,wi,'" in ',qt,"?",qt,".",pi,wi,":",qt,".",pi);return Mi}var ba=Jr("src","RGB"),yi=Jr("dst","RGB"),Xa=or.def(Dr,"[",ba,"]"),si=or.def(Dr,"[",Jr("src","Alpha"),"]"),Ji=or.def(Dr,"[",yi,"]"),Bi=or.def(Dr,"[",Jr("dst","Alpha"),"]");return[Xa,Ji,si,Bi]});case yl:return lr(function(Xt){if(typeof Xt=="string")return[ii[Xt],ii[Xt]];if(typeof Xt=="object")return[ii[Xt.rgb],ii[Xt.alpha]]},function(Xt,or,qt){var Dr=Xt.constants.blendEquations,Jr=or.def(),ba=or.def(),yi=Xt.cond("typeof ",qt,'==="string"');return yi.then(Jr,"=",ba,"=",Dr,"[",qt,"];"),yi.else(Jr,"=",Dr,"[",qt,".rgb];",ba,"=",Dr,"[",qt,".alpha];"),or(yi),[Jr,ba]});case Fl:return lr(function(Xt){return p(4,function(or){return+Xt[or]})},function(Xt,or,qt){return p(4,function(Dr){return or.def("+",qt,"[",Dr,"]")})});case lc:return lr(function(Xt){return Xt|0},function(Xt,or,qt){return or.def(qt,"|0")});case Yu:return lr(function(Xt){var or=Xt.cmp||"keep",qt=Xt.ref||0,Dr="mask"in Xt?Xt.mask:-1;return[Ma[or],qt,Dr]},function(Xt,or,qt){var Dr=Xt.constants.compareFuncs,Jr=or.def('"cmp" in ',qt,"?",Dr,"[",qt,".cmp]",":",zt),ba=or.def(qt,".ref|0"),yi=or.def('"mask" in ',qt,"?",qt,".mask|0:-1");return[Jr,ba,yi]});case Ne:case R:return lr(function(Xt){var or=Xt.fail||"keep",qt=Xt.zfail||"keep",Dr=Xt.zpass||"keep";return[sr===R?De:de,Na[or],Na[qt],Na[Dr]]},function(Xt,or,qt){var Dr=Xt.constants.stencilOps;function Jr(ba){return or.def('"',ba,'" in ',qt,"?",Dr,"[",qt,".",ba,"]:",zt)}return[sr===R?De:de,Jr("fail"),Jr("zfail"),Jr("zpass")]});case wu:return lr(function(Xt){var or=Xt.factor|0,qt=Xt.units|0;return[or,qt]},function(Xt,or,qt){var Dr=or.def(qt,".factor|0"),Jr=or.def(qt,".units|0");return[Dr,Jr]});case Zu:return lr(function(Xt){var or=0;return Xt==="front"?or=de:Xt==="back"&&(or=De),or},function(Xt,or,qt){return or.def(qt,'==="front"?',de,":",De)});case yu:return lr(function(Xt){return Xt},function(Xt,or,qt){return qt});case Lc:return lr(function(Xt){return Ka[Xt]},function(Xt,or,qt){return or.def(qt+'==="cw"?'+et+":"+vt)});case ou:return lr(function(Xt){return Xt.map(function(or){return!!or})},function(Xt,or,qt){return p(4,function(Dr){return"!!"+qt+"["+Dr+"]"})});case zo:return lr(function(Xt){var or="value"in Xt?Xt.value:1,qt=!!Xt.invert;return[or,qt]},function(Xt,or,qt){var Dr=or.def('"value" in ',qt,"?+",qt,".value:1"),Jr=or.def("!!",qt,".invert");return[Dr,Jr]})}}),fr}function fs(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={};return Object.keys(Ft).forEach(function(sr){var pr=Ft[sr],lr;if(typeof pr=="number"||typeof pr=="boolean")lr=an(function(){return pr});else if(typeof pr=="function"){var Xt=pr._reglType;Xt==="texture2d"||Xt==="textureCube"?lr=an(function(or){return or.link(pr)}):(Xt==="framebuffer"||Xt==="framebufferCube")&&(lr=an(function(or){return or.link(pr.color[0])}))}else Ya(pr)&&(lr=an(function(or){var qt=or.global.def("[",p(pr.length,function(Dr){return pr[Dr]}),"]");return qt}));lr.value=pr,fr[sr]=lr}),Object.keys(ir).forEach(function(sr){var pr=ir[sr];fr[sr]=vn(pr,function(lr,Xt){return lr.invoke(Xt,pr)})}),fr}function Al(gt,Et){var Ft=gt.static,ir=gt.dynamic,fr={};return Object.keys(Ft).forEach(function(sr){var pr=Ft[sr],lr=Yt.id(sr),Xt=new Ea;if(vi(pr))Xt.state=Jn,Xt.buffer=Aa.getBuffer(Aa.create(pr,Qr,!1,!0)),Xt.type=0;else{var or=Aa.getBuffer(pr);if(or)Xt.state=Jn,Xt.buffer=or,Xt.type=0;else if("constant"in pr){var qt=pr.constant;Xt.buffer="null",Xt.state=co,typeof qt=="number"?Xt.x=qt:Kn.forEach(function(Ji,Bi){Bi<qt.length&&(Xt[Ji]=qt[Bi])})}else{vi(pr.buffer)?or=Aa.getBuffer(Aa.create(pr.buffer,Qr,!1,!0)):or=Aa.getBuffer(pr.buffer);var Dr=pr.offset|0,Jr=pr.stride|0,ba=pr.size|0,yi=!!pr.normalized,Xa=0;"type"in pr&&(Xa=la[pr.type]);var si=pr.divisor|0;Xt.buffer=or,Xt.state=Jn,Xt.size=ba,Xt.normalized=yi,Xt.type=Xa||or.dtype,Xt.offset=Dr,Xt.stride=Jr,Xt.divisor=si}}fr[sr]=an(function(Ji,Bi){var pi=Ji.attribCache;if(lr in pi)return pi[lr];var wi={isStream:!1};return Object.keys(Xt).forEach(function(Mi){wi[Mi]=Xt[Mi]}),Xt.buffer&&(wi.buffer=Ji.link(Xt.buffer),wi.type=wi.type||wi.buffer+".dtype"),pi[lr]=wi,wi})}),Object.keys(ir).forEach(function(sr){var pr=ir[sr];function lr(Xt,or){var qt=Xt.invoke(or,pr),Dr=Xt.shared,Jr=Xt.constants,ba=Dr.isBufferArgs,yi=Dr.buffer,Xa={isStream:or.def(!1)},si=new Ea;si.state=Jn,Object.keys(si).forEach(function(wi){Xa[wi]=or.def(""+si[wi])});var Ji=Xa.buffer,Bi=Xa.type;or("if(",ba,"(",qt,")){",Xa.isStream,"=true;",Ji,"=",yi,".createStream(",Qr,",",qt,");",Bi,"=",Ji,".dtype;","}else{",Ji,"=",yi,".getBuffer(",qt,");","if(",Ji,"){",Bi,"=",Ji,".dtype;",'}else if("constant" in ',qt,"){",Xa.state,"=",co,";","if(typeof "+qt+'.constant === "number"){',Xa[Kn[0]],"=",qt,".constant;",Kn.slice(1).map(function(wi){return Xa[wi]}).join("="),"=0;","}else{",Kn.map(function(wi,Mi){return Xa[wi]+"="+qt+".constant.length>"+Mi+"?"+qt+".constant["+Mi+"]:0;"}).join(""),"}}else{","if(",ba,"(",qt,".buffer)){",Ji,"=",yi,".createStream(",Qr,",",qt,".buffer);","}else{",Ji,"=",yi,".getBuffer(",qt,".buffer);","}",Bi,'="type" in ',qt,"?",Jr.glTypes,"[",qt,".type]:",Ji,".dtype;",Xa.normalized,"=!!",qt,".normalized;");function pi(wi){or(Xa[wi],"=",qt,".",wi,"|0;")}return pi("size"),pi("offset"),pi("stride"),pi("divisor"),or("}}"),or.exit("if(",Xa.isStream,"){",yi,".destroyStream(",Ji,");","}"),Xa}fr[sr]=vn(pr,lr)}),fr}function El(gt){var Et=gt.static,Ft=gt.dynamic,ir={};return Object.keys(Et).forEach(function(fr){var sr=Et[fr];ir[fr]=an(function(pr,lr){return typeof sr=="number"||typeof sr=="boolean"?""+sr:pr.link(sr)})}),Object.keys(Ft).forEach(function(fr){var sr=Ft[fr];ir[fr]=vn(sr,function(pr,lr){return pr.invoke(lr,sr)})}),ir}function Ql(gt,Et,Ft,ir,fr){var sr=gt.static,pr=gt.dynamic,lr=Ps(gt,Et),Xt=Rn(gt,fr),or=Gn(gt,Xt,fr),qt=ho(gt,fr),Dr=Hl(gt,fr),Jr=xl(gt,fr,lr);function ba(pi){var wi=or[pi];wi&&(Dr[pi]=wi)}ba(Se),ba(zi(we));var yi=Object.keys(Dr).length>0,Xa={framebuffer:Xt,draw:qt,shader:Jr,state:Dr,dirty:yi,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Xa.profile=En(gt,fr),Xa.uniforms=fs(Ft,fr),Xa.drawVAO=Xa.scopeVAO=qt.vao,!Xa.drawVAO&&Jr.program&&!lr&&cr.angle_instanced_arrays&&qt.static.elements){var si=!0,Ji=Jr.program.attributes.map(function(pi){var wi=Et.static[pi];return si=si&&!!wi,wi});if(si&&Ji.length>0){var Bi=bi.getVAO(bi.createVAO({attributes:Ji,elements:qt.static.elements}));Xa.drawVAO=new Pa(null,null,null,function(pi,wi){return pi.link(Bi)}),Xa.useVAO=!0}}return lr?Xa.useVAO=!0:Xa.attributes=Al(Et,fr),Xa.context=El(ir,fr),Xa}function Fs(gt,Et,Ft){var ir=gt.shared,fr=ir.context,sr=gt.scope();Object.keys(Ft).forEach(function(pr){Et.save(fr,"."+pr);var lr=Ft[pr],Xt=lr.append(gt,Et);Array.isArray(Xt)?sr(fr,".",pr,"=[",Xt.join(),"];"):sr(fr,".",pr,"=",Xt,";")}),Et(sr)}function pl(gt,Et,Ft,ir){var fr=gt.shared,sr=fr.gl,pr=fr.framebuffer,lr;Wa&&(lr=Et.def(fr.extensions,".webgl_draw_buffers"));var Xt=gt.constants,or=Xt.drawBuffer,qt=Xt.backBuffer,Dr;Ft?Dr=Ft.append(gt,Et):Dr=Et.def(pr,".next"),ir||Et("if(",Dr,"!==",pr,".cur){"),Et("if(",Dr,"){",sr,".bindFramebuffer(",ya,",",Dr,".framebuffer);"),Wa&&Et(lr,".drawBuffersWEBGL(",or,"[",Dr,".colorAttachments.length]);"),Et("}else{",sr,".bindFramebuffer(",ya,",null);"),Wa&&Et(lr,".drawBuffersWEBGL(",qt,");"),Et("}",pr,".cur=",Dr,";"),ir||Et("}")}function bl(gt,Et,Ft){var ir=gt.shared,fr=ir.gl,sr=gt.current,pr=gt.next,lr=ir.current,Xt=ir.next,or=gt.cond(lr,".dirty");Za.forEach(function(qt){var Dr=zi(qt);if(!(Dr in Ft.state)){var Jr,ba;if(Dr in pr){Jr=pr[Dr],ba=sr[Dr];var yi=p(Ii[Dr].length,function(si){return or.def(Jr,"[",si,"]")});or(gt.cond(yi.map(function(si,Ji){return si+"!=="+ba+"["+Ji+"]"}).join("||")).then(fr,".",$i[Dr],"(",yi,");",yi.map(function(si,Ji){return ba+"["+Ji+"]="+si}).join(";"),";"))}else{Jr=or.def(Xt,".",Dr);var Xa=gt.cond(Jr,"!==",lr,".",Dr);or(Xa),Dr in Va?Xa(gt.cond(Jr).then(fr,".enable(",Va[Dr],");").else(fr,".disable(",Va[Dr],");"),lr,".",Dr,"=",Jr,";"):Xa(fr,".",$i[Dr],"(",Jr,");",lr,".",Dr,"=",Jr,";")}}}),Object.keys(Ft.state).length===0&&or(lr,".dirty=false;"),Et(or)}function Hn(gt,Et,Ft,ir){var fr=gt.shared,sr=gt.current,pr=fr.current,lr=fr.gl,Xt;ui(Object.keys(Ft)).forEach(function(or){var qt=Ft[or];if(!(ir&&!ir(qt))){var Dr=qt.append(gt,Et);if(Va[or]){var Jr=Va[or];sn(qt)?(Xt=gt.link(Dr,{stable:!0}),Et(gt.cond(Xt).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Et(pr,".",or,"=",Xt,";")):(Et(gt.cond(Dr).then(lr,".enable(",Jr,");").else(lr,".disable(",Jr,");")),Et(pr,".",or,"=",Dr,";"))}else if(Ya(Dr)){var ba=sr[or];Et(lr,".",$i[or],"(",Dr,");",Dr.map(function(yi,Xa){return ba+"["+Xa+"]="+yi}).join(";"),";")}else sn(qt)?(Xt=gt.link(Dr,{stable:!0}),Et(lr,".",$i[or],"(",Xt,");",pr,".",or,"=",Xt,";")):Et(lr,".",$i[or],"(",Dr,");",pr,".",or,"=",Dr,";")}})}function Cl(gt,Et){gi&&(gt.instancing=Et.def(gt.shared.extensions,".angle_instanced_arrays"))}function Lo(gt,Et,Ft,ir,fr){var sr=gt.shared,pr=gt.stats,lr=sr.current,Xt=sr.timer,or=Ft.profile;function qt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Dr,Jr;function ba(pi){Dr=Et.def(),pi(Dr,"=",qt(),";"),typeof fr=="string"?pi(pr,".count+=",fr,";"):pi(pr,".count++;"),ki&&(ir?(Jr=Et.def(),pi(Jr,"=",Xt,".getNumPendingQueries();")):pi(Xt,".beginQuery(",pr,");"))}function yi(pi){pi(pr,".cpuTime+=",qt(),"-",Dr,";"),ki&&(ir?pi(Xt,".pushScopeStats(",Jr,",",Xt,".getNumPendingQueries(),",pr,");"):pi(Xt,".endQuery();"))}function Xa(pi){var wi=Et.def(lr,".profile");Et(lr,".profile=",pi,";"),Et.exit(lr,".profile=",wi,";")}var si;if(or){if(sn(or)){or.enable?(ba(Et),yi(Et.exit),Xa("true")):Xa("false");return}si=or.append(gt,Et),Xa(si)}else si=Et.def(lr,".profile");var Ji=gt.block();ba(Ji),Et("if(",si,"){",Ji,"}");var Bi=gt.block();yi(Bi),Et.exit("if(",si,"){",Bi,"}")}function ve(gt,Et,Ft,ir,fr){var sr=gt.shared;function pr(Xt){switch(Xt){case ss:case ll:case Pl:return 2;case So:case Js:case $l:return 3;case Ko:case es:case Ru:return 4;default:return 1}}function lr(Xt,or,qt){var Dr=sr.gl,Jr=Et.def(Xt,".location"),ba=Et.def(sr.attributes,"[",Jr,"]"),yi=qt.state,Xa=qt.buffer,si=[qt.x,qt.y,qt.z,qt.w],Ji=["buffer","normalized","offset","stride"];function Bi(){Et("if(!",ba,".buffer){",Dr,".enableVertexAttribArray(",Jr,");}");var wi=qt.type,Mi;if(qt.size?Mi=Et.def(qt.size,"||",or):Mi=or,Et("if(",ba,".type!==",wi,"||",ba,".size!==",Mi,"||",Ji.map(function(cn){return ba+"."+cn+"!=="+qt[cn]}).join("||"),"){",Dr,".bindBuffer(",Qr,",",Xa,".buffer);",Dr,".vertexAttribPointer(",[Jr,Mi,wi,qt.normalized,qt.stride,qt.offset],");",ba,".type=",wi,";",ba,".size=",Mi,";",Ji.map(function(cn){return ba+"."+cn+"="+qt[cn]+";"}).join(""),"}"),gi){var Vi=qt.divisor;Et("if(",ba,".divisor!==",Vi,"){",gt.instancing,".vertexAttribDivisorANGLE(",[Jr,Vi],");",ba,".divisor=",Vi,";}")}}function pi(){Et("if(",ba,".buffer){",Dr,".disableVertexAttribArray(",Jr,");",ba,".buffer=null;","}if(",Kn.map(function(wi,Mi){return ba+"."+wi+"!=="+si[Mi]}).join("||"),"){",Dr,".vertexAttrib4f(",Jr,",",si,");",Kn.map(function(wi,Mi){return ba+"."+wi+"="+si[Mi]+";"}).join(""),"}")}yi===Jn?Bi():yi===co?pi():(Et("if(",yi,"===",Jn,"){"),Bi(),Et("}else{"),pi(),Et("}"))}ir.forEach(function(Xt){var or=Xt.name,qt=Ft.attributes[or],Dr;if(qt){if(!fr(qt))return;Dr=qt.append(gt,Et)}else{if(!fr(Pn))return;var Jr=gt.scopeAttrib(or);Dr={},Object.keys(new Ea).forEach(function(ba){Dr[ba]=Et.def(Jr,".",ba)})}lr(gt.link(Xt),pr(Xt.info.type),Dr)})}function Y(gt,Et,Ft,ir,fr,sr){for(var pr=gt.shared,lr=pr.gl,Xt,or=0;or<ir.length;++or){var qt=ir[or],Dr=qt.name,Jr=qt.info.type,ba=Ft.uniforms[Dr],yi=gt.link(qt),Xa=yi+".location",si;if(ba){if(!fr(ba))continue;if(sn(ba)){var Ji=ba.value;if(Jr===uc||Jr===ql){var Bi=gt.link(Ji._texture||Ji.color[0]._texture);Et(lr,".uniform1i(",Xa,",",Bi+".bind());"),Et.exit(Bi,".unbind();")}else if(Jr===hu||Jr===wl||Jr===su){var pi=gt.global.def("new Float32Array(["+Array.prototype.slice.call(Ji)+"])"),wi=2;Jr===wl?wi=3:Jr===su&&(wi=4),Et(lr,".uniformMatrix",wi,"fv(",Xa,",false,",pi,");")}else{switch(Jr){case Ao:Xt="1f";break;case ss:Xt="2f";break;case So:Xt="3f";break;case Ko:Xt="4f";break;case ts:Xt="1i";break;case hs:Xt="1i";break;case Pl:Xt="2i";break;case ll:Xt="2i";break;case $l:Xt="3i";break;case Js:Xt="3i";break;case Ru:Xt="4i";break;case es:Xt="4i";break}Et(lr,".uniform",Xt,"(",Xa,",",Ya(Ji)?Array.prototype.slice.call(Ji):Ji,");")}continue}else si=ba.append(gt,Et)}else{if(!fr(Pn))continue;si=Et.def(pr.uniforms,"[",Yt.id(Dr),"]")}Jr===uc?Et("if(",si,"&&",si,'._reglType==="framebuffer"){',si,"=",si,".color[0];","}"):Jr===ql&&Et("if(",si,"&&",si,'._reglType==="framebufferCube"){',si,"=",si,".color[0];","}");var Mi=1;switch(Jr){case uc:case ql:var Vi=Et.def(si,"._texture");Et(lr,".uniform1i(",Xa,",",Vi,".bind());"),Et.exit(Vi,".unbind();");continue;case hs:case ts:Xt="1i";break;case ll:case Pl:Xt="2i",Mi=2;break;case Js:case $l:Xt="3i",Mi=3;break;case es:case Ru:Xt="4i",Mi=4;break;case Ao:Xt="1f";break;case ss:Xt="2f",Mi=2;break;case So:Xt="3f",Mi=3;break;case Ko:Xt="4f",Mi=4;break;case hu:Xt="Matrix2fv";break;case wl:Xt="Matrix3fv";break;case su:Xt="Matrix4fv";break}if(Xt.charAt(0)==="M"){Et(lr,".uniform",Xt,"(",Xa,",");var cn=Math.pow(Jr-hu+2,2),xo=gt.global.def("new Float32Array(",cn,")");Array.isArray(si)?Et("false,(",p(cn,function(Hs){return xo+"["+Hs+"]="+si[Hs]}),",",xo,")"):Et("false,(Array.isArray(",si,")||",si," instanceof Float32Array)?",si,":(",p(cn,function(Hs){return xo+"["+Hs+"]="+si+"["+Hs+"]"}),",",xo,")"),Et(");")}else if(Mi>1){for(var jo=[],ks=[],Fo=0;Fo<Mi;++Fo)Array.isArray(si)?ks.push(si[Fo]):ks.push(Et.def(si+"["+Fo+"]")),sr&&jo.push(Et.def());sr&&Et("if(!",gt.batchId,"||",jo.map(function(Hs,pu){return Hs+"!=="+ks[pu]}).join("||"),"){",jo.map(function(Hs,pu){return Hs+"="+ks[pu]+";"}).join("")),Et(lr,".uniform",Xt,"(",Xa,",",ks.join(","),");"),sr&&Et("}")}else{if(sr){var bs=Et.def();Et("if(!",gt.batchId,"||",bs,"!==",si,"){",bs,"=",si,";")}Et(lr,".uniform",Xt,"(",Xa,",",si,");"),sr&&Et("}")}}}function ye(gt,Et,Ft,ir){var fr=gt.shared,sr=fr.gl,pr=fr.draw,lr=ir.draw;function Xt(){var Mi=lr.elements,Vi,cn=Et;return Mi?((Mi.contextDep&&ir.contextDynamic||Mi.propDep)&&(cn=Ft),Vi=Mi.append(gt,cn),lr.elementsActive&&cn("if("+Vi+")"+sr+".bindBuffer("+ga+","+Vi+".buffer.buffer);")):(Vi=cn.def(),cn(Vi,"=",pr,".",$t,";","if(",Vi,"){",sr,".bindBuffer(",ga,",",Vi,".buffer.buffer);}","else if(",fr.vao,".currentVAO){",Vi,"=",gt.shared.elements+".getElements("+fr.vao,".currentVAO.elements);",ji?"":"if("+Vi+")"+sr+".bindBuffer("+ga+","+Vi+".buffer.buffer);","}")),Vi}function or(){var Mi=lr.count,Vi,cn=Et;return Mi?((Mi.contextDep&&ir.contextDynamic||Mi.propDep)&&(cn=Ft),Vi=Mi.append(gt,cn)):Vi=cn.def(pr,".",Ar),Vi}var qt=Xt();function Dr(Mi){var Vi=lr[Mi];return Vi?Vi.contextDep&&ir.contextDynamic||Vi.propDep?Vi.append(gt,Ft):Vi.append(gt,Et):Et.def(pr,".",Mi)}var Jr=Dr(br),ba=Dr(Yr),yi=or();if(typeof yi=="number"){if(yi===0)return}else Ft("if(",yi,"){"),Ft.exit("}");var Xa,si;gi&&(Xa=Dr(sa),si=gt.instancing);var Ji=qt+".type",Bi=lr.elements&&sn(lr.elements)&&!lr.vaoActive;function pi(){function Mi(){Ft(si,".drawElementsInstancedANGLE(",[Jr,yi,Ji,ba+"<<(("+Ji+"-"+ao+")>>1)",Xa],");")}function Vi(){Ft(si,".drawArraysInstancedANGLE(",[Jr,ba,yi,Xa],");")}qt&&qt!=="null"?Bi?Mi():(Ft("if(",qt,"){"),Mi(),Ft("}else{"),Vi(),Ft("}")):Vi()}function wi(){function Mi(){Ft(sr+".drawElements("+[Jr,yi,Ji,ba+"<<(("+Ji+"-"+ao+")>>1)"]+");")}function Vi(){Ft(sr+".drawArrays("+[Jr,ba,yi]+");")}qt&&qt!=="null"?Bi?Mi():(Ft("if(",qt,"){"),Mi(),Ft("}else{"),Vi(),Ft("}")):Vi()}gi&&(typeof Xa!="number"||Xa>=0)?typeof Xa=="string"?(Ft("if(",Xa,">0){"),pi(),Ft("}else if(",Xa,"<0){"),wi(),Ft("}")):pi():wi()}function te(gt,Et,Ft,ir,fr){var sr=nn(),pr=sr.proc("body",fr);return gi&&(sr.instancing=pr.def(sr.shared.extensions,".angle_instanced_arrays")),gt(sr,pr,Ft,ir),sr.compile().body}function me(gt,Et,Ft,ir){Cl(gt,Et),Ft.useVAO?Ft.drawVAO?Et(gt.shared.vao,".setVAO(",Ft.drawVAO.append(gt,Et),");"):Et(gt.shared.vao,".setVAO(",gt.shared.vao,".targetVAO);"):(Et(gt.shared.vao,".setVAO(null);"),ve(gt,Et,Ft,ir.attributes,function(){return!0})),Y(gt,Et,Ft,ir.uniforms,function(){return!0},!1),ye(gt,Et,Et,Ft)}function Ge(gt,Et){var Ft=gt.proc("draw",1);Cl(gt,Ft),Fs(gt,Ft,Et.context),pl(gt,Ft,Et.framebuffer),bl(gt,Ft,Et),Hn(gt,Ft,Et.state),Lo(gt,Ft,Et,!1,!0);var ir=Et.shader.progVar.append(gt,Ft);if(Ft(gt.shared.gl,".useProgram(",ir,".program);"),Et.shader.program)me(gt,Ft,Et,Et.shader.program);else{Ft(gt.shared.vao,".setVAO(null);");var fr=gt.global.def("{}"),sr=Ft.def(ir,".id"),pr=Ft.def(fr,"[",sr,"]");Ft(gt.cond(pr).then(pr,".call(this,a0);").else(pr,"=",fr,"[",sr,"]=",gt.link(function(lr){return te(me,gt,Et,lr,1)}),"(",ir,");",pr,".call(this,a0);"))}Object.keys(Et.state).length>0&&Ft(gt.shared.current,".dirty=true;"),gt.shared.vao&&Ft(gt.shared.vao,".setVAO(null);")}function Le(gt,Et,Ft,ir){gt.batchId="a1",Cl(gt,Et);function fr(){return!0}ve(gt,Et,Ft,ir.attributes,fr),Y(gt,Et,Ft,ir.uniforms,fr,!1),ye(gt,Et,Et,Ft)}function $e(gt,Et,Ft,ir){Cl(gt,Et);var fr=Ft.contextDep,sr=Et.def(),pr="a0",lr="a1",Xt=Et.def();gt.shared.props=Xt,gt.batchId=sr;var or=gt.scope(),qt=gt.scope();Et(or.entry,"for(",sr,"=0;",sr,"<",lr,";++",sr,"){",Xt,"=",pr,"[",sr,"];",qt,"}",or.exit);function Dr(Ji){return Ji.contextDep&&fr||Ji.propDep}function Jr(Ji){return!Dr(Ji)}if(Ft.needsContext&&Fs(gt,qt,Ft.context),Ft.needsFramebuffer&&pl(gt,qt,Ft.framebuffer),Hn(gt,qt,Ft.state,Dr),Ft.profile&&Dr(Ft.profile)&&Lo(gt,qt,Ft,!1,!0),ir)Ft.useVAO?Ft.drawVAO?Dr(Ft.drawVAO)?qt(gt.shared.vao,".setVAO(",Ft.drawVAO.append(gt,qt),");"):or(gt.shared.vao,".setVAO(",Ft.drawVAO.append(gt,or),");"):or(gt.shared.vao,".setVAO(",gt.shared.vao,".targetVAO);"):(or(gt.shared.vao,".setVAO(null);"),ve(gt,or,Ft,ir.attributes,Jr),ve(gt,qt,Ft,ir.attributes,Dr)),Y(gt,or,Ft,ir.uniforms,Jr,!1),Y(gt,qt,Ft,ir.uniforms,Dr,!0),ye(gt,or,qt,Ft);else{var ba=gt.global.def("{}"),yi=Ft.shader.progVar.append(gt,qt),Xa=qt.def(yi,".id"),si=qt.def(ba,"[",Xa,"]");qt(gt.shared.gl,".useProgram(",yi,".program);","if(!",si,"){",si,"=",ba,"[",Xa,"]=",gt.link(function(Ji){return te(Le,gt,Ft,Ji,2)}),"(",yi,");}",si,".call(this,a0[",sr,"],",sr,");")}}function mt(gt,Et){var Ft=gt.proc("batch",2);gt.batchId="0",Cl(gt,Ft);var ir=!1,fr=!0;Object.keys(Et.context).forEach(function(ba){ir=ir||Et.context[ba].propDep}),ir||(Fs(gt,Ft,Et.context),fr=!1);var sr=Et.framebuffer,pr=!1;sr?(sr.propDep?ir=pr=!0:sr.contextDep&&ir&&(pr=!0),pr||pl(gt,Ft,sr)):pl(gt,Ft,null),Et.state.viewport&&Et.state.viewport.propDep&&(ir=!0);function lr(ba){return ba.contextDep&&ir||ba.propDep}bl(gt,Ft,Et),Hn(gt,Ft,Et.state,function(ba){return!lr(ba)}),(!Et.profile||!lr(Et.profile))&&Lo(gt,Ft,Et,!1,"a1"),Et.contextDep=ir,Et.needsContext=fr,Et.needsFramebuffer=pr;var Xt=Et.shader.progVar;if(Xt.contextDep&&ir||Xt.propDep)$e(gt,Ft,Et,null);else{var or=Xt.append(gt,Ft);if(Ft(gt.shared.gl,".useProgram(",or,".program);"),Et.shader.program)$e(gt,Ft,Et,Et.shader.program);else{Ft(gt.shared.vao,".setVAO(null);");var qt=gt.global.def("{}"),Dr=Ft.def(or,".id"),Jr=Ft.def(qt,"[",Dr,"]");Ft(gt.cond(Jr).then(Jr,".call(this,a0,a1);").else(Jr,"=",qt,"[",Dr,"]=",gt.link(function(ba){return te($e,gt,Et,ba,2)}),"(",or,");",Jr,".call(this,a0,a1);"))}}Object.keys(Et.state).length>0&&Ft(gt.shared.current,".dirty=true;"),gt.shared.vao&&Ft(gt.shared.vao,".setVAO(null);")}function jt(gt,Et){var Ft=gt.proc("scope",3);gt.batchId="a2";var ir=gt.shared,fr=ir.current;if(Fs(gt,Ft,Et.context),Et.framebuffer&&Et.framebuffer.append(gt,Ft),ui(Object.keys(Et.state)).forEach(function(lr){var Xt=Et.state[lr],or=Xt.append(gt,Ft);Ya(or)?or.forEach(function(qt,Dr){Ki(qt)?Ft.set(gt.next[lr],"["+Dr+"]",qt):Ft.set(gt.next[lr],"["+Dr+"]",gt.link(qt,{stable:!0}))}):sn(Xt)?Ft.set(ir.next,"."+lr,gt.link(or,{stable:!0})):Ft.set(ir.next,"."+lr,or)}),Lo(gt,Ft,Et,!0,!0),[$t,Yr,Ar,sa,br].forEach(function(lr){var Xt=Et.draw[lr];if(Xt){var or=Xt.append(gt,Ft);Ki(or)?Ft.set(ir.draw,"."+lr,or):Ft.set(ir.draw,"."+lr,gt.link(or),{stable:!0})}}),Object.keys(Et.uniforms).forEach(function(lr){var Xt=Et.uniforms[lr].append(gt,Ft);Array.isArray(Xt)&&(Xt="["+Xt.map(function(or){return Ki(or)?or:gt.link(or,{stable:!0})})+"]"),Ft.set(ir.uniforms,"["+gt.link(Yt.id(lr),{stable:!0})+"]",Xt)}),Object.keys(Et.attributes).forEach(function(lr){var Xt=Et.attributes[lr].append(gt,Ft),or=gt.scopeAttrib(lr);Object.keys(new Ea).forEach(function(qt){Ft.set(or,"."+qt,Xt[qt])})}),Et.scopeVAO){var sr=Et.scopeVAO.append(gt,Ft);Ki(sr)?Ft.set(ir.vao,".targetVAO",sr):Ft.set(ir.vao,".targetVAO",gt.link(sr,{stable:!0}))}function pr(lr){var Xt=Et.shader[lr];if(Xt){var or=Xt.append(gt,Ft);Ki(or)?Ft.set(ir.shader,"."+lr,or):Ft.set(ir.shader,"."+lr,gt.link(or,{stable:!0}))}}pr(At),pr(Bt),Object.keys(Et.state).length>0&&(Ft(fr,".dirty=true;"),Ft.exit(fr,".dirty=true;")),Ft("a1(",gt.shared.context,",a0,",gt.batchId,");")}function _r(gt){if(!(typeof gt!="object"||Ya(gt))){for(var Et=Object.keys(gt),Ft=0;Ft<Et.length;++Ft)if(c.isDynamic(gt[Et[Ft]]))return!0;return!1}}function Fr(gt,Et,Ft){var ir=Et.static[Ft];if(!ir||!_r(ir))return;var fr=gt.global,sr=Object.keys(ir),pr=!1,lr=!1,Xt=!1,or=gt.global.def("{}");sr.forEach(function(Dr){var Jr=ir[Dr];if(c.isDynamic(Jr)){typeof Jr=="function"&&(Jr=ir[Dr]=c.unbox(Jr));var ba=vn(Jr,null);pr=pr||ba.thisDep,Xt=Xt||ba.propDep,lr=lr||ba.contextDep}else{switch(fr(or,".",Dr,"="),typeof Jr){case"number":fr(Jr);break;case"string":fr('"',Jr,'"');break;case"object":Array.isArray(Jr)&&fr("[",Jr.join(),"]");break;default:fr(gt.link(Jr));break}fr(";")}});function qt(Dr,Jr){sr.forEach(function(ba){var yi=ir[ba];if(c.isDynamic(yi)){var Xa=Dr.invoke(Jr,yi);Jr(or,".",ba,"=",Xa,";")}})}Et.dynamic[Ft]=new c.DynamicVariable(xs,{thisDep:pr,contextDep:lr,propDep:Xt,ref:or,append:qt}),delete Et.static[Ft]}function hr(gt,Et,Ft,ir,fr){var sr=nn();sr.stats=sr.link(fr),Object.keys(Et.static).forEach(function(lr){Fr(sr,Et,lr)}),Br.forEach(function(lr){Fr(sr,gt,lr)});var pr=Ql(gt,Et,Ft,ir,sr);return pr.shader.program&&(pr.shader.program.attributes.sort(function(lr,Xt){return lr.name<Xt.name?-1:1}),pr.shader.program.uniforms.sort(function(lr,Xt){return lr.name<Xt.name?-1:1})),Ge(sr,pr),jt(sr,pr),mt(sr,pr),d(sr.compile(),{destroy:function(){pr.shader.program.destroy()}})}return{next:hn,current:Ii,procs:function(){var gt=nn(),Et=gt.proc("poll"),Ft=gt.proc("refresh"),ir=gt.block();Et(ir),Ft(ir);var fr=gt.shared,sr=fr.gl,pr=fr.next,lr=fr.current;ir(lr,".dirty=false;"),pl(gt,Et),pl(gt,Ft,null,!0);var Xt;gi&&(Xt=gt.link(gi)),cr.oes_vertex_array_object&&Ft(gt.link(cr.oes_vertex_array_object),".bindVertexArrayOES(null);");var or=Ft.def(fr.attributes),qt=Ft.def(0),Dr=gt.cond(qt,".buffer");Dr.then(sr,".enableVertexAttribArray(i);",sr,".bindBuffer(",Qr,",",qt,".buffer.buffer);",sr,".vertexAttribPointer(i,",qt,".size,",qt,".type,",qt,".normalized,",qt,".stride,",qt,".offset);").else(sr,".disableVertexAttribArray(i);",sr,".vertexAttrib4f(i,",qt,".x,",qt,".y,",qt,".z,",qt,".w);",qt,".buffer=null;");var Jr=gt.link(ua.maxAttributes,{stable:!0});return Ft("for(var i=0;i<",Jr,";++i){",qt,"=",or,"[i];",Dr,"}"),gi&&Ft("for(var i=0;i<",Jr,";++i){",Xt,".vertexAttribDivisorANGLE(i,",or,"[i].divisor);","}"),Ft(gt.shared.vao,".currentVAO=null;",gt.shared.vao,".setVAO(",gt.shared.vao,".targetVAO);"),Object.keys(Va).forEach(function(ba){var yi=Va[ba],Xa=ir.def(pr,".",ba),si=gt.block();si("if(",Xa,"){",sr,".enable(",yi,")}else{",sr,".disable(",yi,")}",lr,".",ba,"=",Xa,";"),Ft(si),Et("if(",Xa,"!==",lr,".",ba,"){",si,"}")}),Object.keys($i).forEach(function(ba){var yi=$i[ba],Xa=Ii[ba],si,Ji,Bi=gt.block();if(Bi(sr,".",yi,"("),Ya(Xa)){var pi=Xa.length;si=gt.global.def(pr,".",ba),Ji=gt.global.def(lr,".",ba),Bi(p(pi,function(wi){return si+"["+wi+"]"}),");",p(pi,function(wi){return Ji+"["+wi+"]="+si+"["+wi+"];"}).join("")),Et("if(",p(pi,function(wi){return si+"["+wi+"]!=="+Ji+"["+wi+"]"}).join("||"),"){",Bi,"}")}else si=ir.def(pr,".",ba),Ji=ir.def(lr,".",ba),Bi(si,");",lr,".",ba,"=",si,";"),Et("if(",si,"!==",Ji,"){",Bi,"}");Ft(Bi)}),gt.compile()}(),compile:hr}}function eo(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var $o=34918,io=34919,Zo=35007,ul=function(nt,Yt){if(!Yt.ext_disjoint_timer_query)return null;var cr=[];function ua(){return cr.pop()||Yt.ext_disjoint_timer_query.createQueryEXT()}function Aa(ii){cr.push(ii)}var xa=[];function wa(ii){var gi=ua();Yt.ext_disjoint_timer_query.beginQueryEXT(Zo,gi),xa.push(gi),ki(xa.length-1,xa.length,ii)}function Ja(){Yt.ext_disjoint_timer_query.endQueryEXT(Zo)}function Ai(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var bi=[];function fi(){return bi.pop()||new Ai}function yn(ii){bi.push(ii)}var Oi=[];function ki(ii,gi,Wa){var ji=fi();ji.startQueryIndex=ii,ji.endQueryIndex=gi,ji.sum=0,ji.stats=Wa,Oi.push(ji)}var qa=[],ea=[];function Ea(){var ii,gi,Wa=xa.length;if(Wa!==0){ea.length=Math.max(ea.length,Wa+1),qa.length=Math.max(qa.length,Wa+1),qa[0]=0,ea[0]=0;var ji=0;for(ii=0,gi=0;gi<xa.length;++gi){var Ii=xa[gi];Yt.ext_disjoint_timer_query.getQueryObjectEXT(Ii,io)?(ji+=Yt.ext_disjoint_timer_query.getQueryObjectEXT(Ii,$o),Aa(Ii)):xa[ii++]=Ii,qa[gi+1]=ji,ea[gi+1]=ii}for(xa.length=ii,ii=0,gi=0;gi<Oi.length;++gi){var hn=Oi[gi],Za=hn.startQueryIndex,Va=hn.endQueryIndex;hn.sum+=qa[Va]-qa[Za];var $i=ea[Za],zi=ea[Va];zi===$i?(hn.stats.gpuTime+=hn.sum/1e6,yn(hn)):(hn.startQueryIndex=$i,hn.endQueryIndex=zi,Oi[ii++]=hn)}Oi.length=ii}}return{beginQuery:wa,endQuery:Ja,pushScopeStats:ki,update:Ea,getNumPendingQueries:function(){return xa.length},clear:function(){cr.push.apply(cr,xa);for(var ii=0;ii<cr.length;ii++)Yt.ext_disjoint_timer_query.deleteQueryEXT(cr[ii]);xa.length=0,cr.length=0},restore:function(){xa.length=0,cr.length=0}}},el=16384,_l=256,gn=1024,vo=34962,cs="webglcontextlost",ps="webglcontextrestored",Tl=1,Gl=2,Tu=3;function Il(nt,Yt){for(var cr=0;cr<nt.length;++cr)if(nt[cr]===Yt)return cr;return-1}function yc(nt){var Yt=y(nt);if(!Yt)return null;var cr=Yt.gl,ua=cr.getContextAttributes(),Aa=cr.isContextLost(),xa=b(cr,Yt);if(!xa)return null;var wa=v(),Ja=eo(),Ai=Yt.cachedCode||{},bi=xa.extensions,fi=ul(cr,bi),yn=g(),Oi=cr.drawingBufferWidth,ki=cr.drawingBufferHeight,qa={tick:0,time:0,viewportWidth:Oi,viewportHeight:ki,framebufferWidth:Oi,framebufferHeight:ki,drawingBufferWidth:Oi,drawingBufferHeight:ki,pixelRatio:Yt.pixelRatio},ea={},Ea={elements:null,primitive:4,count:-1,offset:0,instances:-1},ii=jr(cr,bi),gi=ma(cr,Ja,Yt,Ii),Wa=dr(cr,bi,gi,Ja),ji=Pu(cr,bi,ii,Ja,gi,Wa,Ea);function Ii(te){return ji.destroyBuffer(te)}var hn=Hu(cr,wa,Ja,Yt),Za=Hc(cr,bi,ii,function(){zi.procs.poll()},qa,Ja,Yt),Va=Ac(cr,bi,ii,Ja,Yt),$i=Xc(cr,bi,ii,Za,Va,Ja),zi=Zn(cr,wa,bi,ii,gi,Wa,Za,$i,ea,ji,hn,Ea,qa,fi,Ai,Yt),Si=ru(cr,$i,zi.procs.poll,qa,ua,bi,ii),Ti=zi.next,Ki=cr.canvas,mn=[],In=[],Di=[],nn=[Yt.onDestroy],En=null;function Rn(){if(mn.length===0){fi&&fi.update(),En=null;return}En=f.next(Rn),bl();for(var te=mn.length-1;te>=0;--te){var me=mn[te];me&&me(qa,null,0)}cr.flush(),fi&&fi.update()}function Gn(){!En&&mn.length>0&&(En=f.next(Rn))}function Ps(){En&&(f.cancel(Rn),En=null)}function xl(te){te.preventDefault(),Aa=!0,Ps(),In.forEach(function(me){me()})}function ho(te){cr.getError(),Aa=!1,xa.restore(),hn.restore(),gi.restore(),Za.restore(),Va.restore(),$i.restore(),ji.restore(),fi&&fi.restore(),zi.procs.refresh(),Gn(),Di.forEach(function(me){me()})}Ki&&(Ki.addEventListener(cs,xl,!1),Ki.addEventListener(ps,ho,!1));function Hl(){mn.length=0,Ps(),Ki&&(Ki.removeEventListener(cs,xl),Ki.removeEventListener(ps,ho)),hn.clear(),$i.clear(),Va.clear(),ji.clear(),Za.clear(),Wa.clear(),gi.clear(),fi&&fi.clear(),nn.forEach(function(te){te()})}function fs(te){function me(sr){var pr=d({},sr);delete pr.uniforms,delete pr.attributes,delete pr.context,delete pr.vao,"stencil"in pr&&pr.stencil.op&&(pr.stencil.opBack=pr.stencil.opFront=pr.stencil.op,delete pr.stencil.op);function lr(Xt){if(Xt in pr){var or=pr[Xt];delete pr[Xt],Object.keys(or).forEach(function(qt){pr[Xt+"."+qt]=or[qt]})}}return lr("blend"),lr("depth"),lr("cull"),lr("stencil"),lr("polygonOffset"),lr("scissor"),lr("sample"),"vao"in sr&&(pr.vao=sr.vao),pr}function Ge(sr,pr){var lr={},Xt={};return Object.keys(sr).forEach(function(or){var qt=sr[or];if(c.isDynamic(qt)){Xt[or]=c.unbox(qt,or);return}else if(pr&&Array.isArray(qt)){for(var Dr=0;Dr<qt.length;++Dr)if(c.isDynamic(qt[Dr])){Xt[or]=c.unbox(qt,or);return}}lr[or]=qt}),{dynamic:Xt,static:lr}}var Le=Ge(te.context||{},!0),$e=Ge(te.uniforms||{},!0),mt=Ge(te.attributes||{},!1),jt=Ge(me(te),!1),_r={gpuTime:0,cpuTime:0,count:0},Fr=zi.compile(jt,mt,$e,Le,_r),hr=Fr.draw,gt=Fr.batch,Et=Fr.scope,Ft=[];function ir(sr){for(;Ft.length<sr;)Ft.push(null);return Ft}function fr(sr,pr){var lr;if(typeof sr=="function")return Et.call(this,null,sr,0);if(typeof pr=="function")if(typeof sr=="number")for(lr=0;lr<sr;++lr)Et.call(this,null,pr,lr);else if(Array.isArray(sr))for(lr=0;lr<sr.length;++lr)Et.call(this,sr[lr],pr,lr);else return Et.call(this,sr,pr,0);else if(typeof sr=="number"){if(sr>0)return gt.call(this,ir(sr|0),sr|0)}else if(Array.isArray(sr)){if(sr.length)return gt.call(this,sr,sr.length)}else return hr.call(this,sr)}return d(fr,{stats:_r,destroy:function(){Fr.destroy()}})}var Al=$i.setFBO=fs({framebuffer:c.define.call(null,Tl,"framebuffer")});function El(te,me){var Ge=0;zi.procs.poll();var Le=me.color;Le&&(cr.clearColor(+Le[0]||0,+Le[1]||0,+Le[2]||0,+Le[3]||0),Ge|=el),"depth"in me&&(cr.clearDepth(+me.depth),Ge|=_l),"stencil"in me&&(cr.clearStencil(me.stencil|0),Ge|=gn),cr.clear(Ge)}function Ql(te){if("framebuffer"in te)if(te.framebuffer&&te.framebuffer_reglType==="framebufferCube")for(var me=0;me<6;++me)Al(d({framebuffer:te.framebuffer.faces[me]},te),El);else Al(te,El);else El(null,te)}function Fs(te){mn.push(te);function me(){var Ge=Il(mn,te);function Le(){var $e=Il(mn,Le);mn[$e]=mn[mn.length-1],mn.length-=1,mn.length<=0&&Ps()}mn[Ge]=Le}return Gn(),{cancel:me}}function pl(){var te=Ti.viewport,me=Ti.scissor_box;te[0]=te[1]=me[0]=me[1]=0,qa.viewportWidth=qa.framebufferWidth=qa.drawingBufferWidth=te[2]=me[2]=cr.drawingBufferWidth,qa.viewportHeight=qa.framebufferHeight=qa.drawingBufferHeight=te[3]=me[3]=cr.drawingBufferHeight}function bl(){qa.tick+=1,qa.time=Cl(),pl(),zi.procs.poll()}function Hn(){Za.refresh(),pl(),zi.procs.refresh(),fi&&fi.update()}function Cl(){return(g()-yn)/1e3}Hn();function Lo(te,me){var Ge;switch(te){case"frame":return Fs(me);case"lost":Ge=In;break;case"restore":Ge=Di;break;case"destroy":Ge=nn;break;default:}return Ge.push(me),{cancel:function(){for(var Le=0;Le<Ge.length;++Le)if(Ge[Le]===me){Ge[Le]=Ge[Ge.length-1],Ge.pop();return}}}}function ve(){return Ai}function Y(te){Object.entries(te).forEach(function(me){Ai[me[0]]=me[1]})}var ye=d(fs,{clear:Ql,prop:c.define.bind(null,Tl),context:c.define.bind(null,Gl),this:c.define.bind(null,Tu),draw:fs({}),buffer:function(te){return gi.create(te,vo,!1,!1)},elements:function(te){return Wa.create(te,!1)},texture:Za.create2D,cube:Za.createCube,renderbuffer:Va.create,framebuffer:$i.create,framebufferCube:$i.createCube,vao:ji.createVAO,attributes:ua,frame:Fs,on:Lo,limits:ii,hasExtension:function(te){return ii.extensions.indexOf(te.toLowerCase())>=0},read:Si,destroy:Hl,_gl:cr,_refresh:Hn,poll:function(){bl(),fi&&fi.update()},now:Cl,stats:Ja,getCachedCode:ve,preloadCachedCode:Y});return Yt.onDone(null,ye),ye}return yc})}}),xT=Ze({"src/lib/prepare_regl.js"(Z,q){"use strict";var d=wE(),x=Cq();q.exports=function(M,e,t){var r=M._fullLayout,o=!0;return r._glcanvas.each(function(a){if(a.regl){a.regl.preloadCachedCode(t);return}if(!(a.pick&&!r._has("parcoords"))){try{a.regl=x({canvas:this,attributes:{antialias:!a.pick,preserveDrawingBuffer:!0},pixelRatio:M._context.plotGlPixelRatio||window.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch{o=!1}a.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(i){M&&M.emit&&M.emit("plotly_webglcontextlost",{event:i,layer:a.key})},!1)}}),o||d({container:r._glcontainer.node()}),o}}}),h6=Ze({"src/traces/scattergl/plot.js"(c,q){"use strict";var d=GE(),x=r6(),A=fq(),M=Eq(),e=ca(),t=Jd().selectMode,r=xT(),o=Fu(),a=F5(),i=jE().styleTextSelection,n={};function s(f,g,v,T){var l=f._size,_=f.width*T,w=f.height*T,S=l.l*T,E=l.b*T,y=l.r*T,b=l.t*T,p=l.w*T,u=l.h*T;return[S+g.domain[0]*p,E+v.domain[0]*u,_-y-(1-g.domain[1])*p,w-b-(1-v.domain[1])*u]}var c=q.exports=function(g,v,T){if(T.length){var l=g._fullLayout,_=v._scene,w=v.xaxis,S=v.yaxis,E,y;if(_){var b=r(g,["ANGLE_instanced_arrays","OES_element_index_uint"],n);if(!b){_.init();return}var p=_.count,u=l._glcanvas.data()[0].regl;if(a(g,v,T),_.dirty){if((_.line2d||_.error2d)&&!(_.scatter2d||_.fill2d||_.glText)&&u.clear({color:!0,depth:!0}),_.error2d===!0&&(_.error2d=A(u)),_.line2d===!0&&(_.line2d=x(u)),_.scatter2d===!0&&(_.scatter2d=d(u)),_.fill2d===!0&&(_.fill2d=x(u)),_.glText===!0)for(_.glText=new Array(p),E=0;E<p;E++)_.glText[E]=new M(u);if(_.glText){if(p>_.glText.length){var m=p-_.glText.length;for(E=0;E<m;E++)_.glText.push(new M(u))}else if(p<_.glText.length){var h=_.glText.length-p,P=_.glText.splice(p,h);P.forEach(function(j){j.destroy()})}for(E=0;E<p;E++)_.glText[E].update(_.textOptions[E])}if(_.line2d&&(_.line2d.update(_.lineOptions),_.lineOptions=_.lineOptions.map(function(j){if(j&&j.positions){for(var ee=j.positions,re=0;re<ee.length&&(isNaN(ee[re])||isNaN(ee[re+1]));)re+=2;for(var ce=ee.length-2;ce>re&&(isNaN(ee[ce])||isNaN(ee[ce+1]));)ce-=2;j.positions=ee.slice(re,ce+2)}return j}),_.line2d.update(_.lineOptions)),_.error2d){var L=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(L)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=e.repeat(null,p),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(j,ee){var re=T[ee];if(!(!j||!re||!re[0]||!re[0].trace)){var ce=re[0],be=ce.trace,Ae=ce.t,ze=_.lineOptions[ee],Re,Xe,it=[];be._ownfill&&it.push(ee),be._nexttrace&&it.push(ee+1),it.length&&(_.fillOrder[ee]=it);var ot=[],tt=ze&&ze.positions||Ae.positions,lt,Ee;if(be.fill==="tozeroy"){for(lt=0;lt<tt.length&&isNaN(tt[lt+1]);)lt+=2;for(Ee=tt.length-2;Ee>lt&&isNaN(tt[Ee+1]);)Ee-=2;tt[lt+1]!==0&&(ot=[tt[lt],0]),ot=ot.concat(tt.slice(lt,Ee+2)),tt[Ee+1]!==0&&(ot=ot.concat([tt[Ee],0]))}else if(be.fill==="tozerox"){for(lt=0;lt<tt.length&&isNaN(tt[lt]);)lt+=2;for(Ee=tt.length-2;Ee>lt&&isNaN(tt[Ee]);)Ee-=2;tt[lt]!==0&&(ot=[0,tt[lt+1]]),ot=ot.concat(tt.slice(lt,Ee+2)),tt[Ee]!==0&&(ot=ot.concat([0,tt[Ee+1]]))}else if(be.fill==="toself"||be.fill==="tonext"){for(ot=[],Re=0,j.splitNull=!0,Xe=0;Xe<tt.length;Xe+=2)(isNaN(tt[Xe])||isNaN(tt[Xe+1]))&&(ot=ot.concat(tt.slice(Re,Xe)),ot.push(tt[Re],tt[Re+1]),ot.push(null,null),Re=Xe+2);ot=ot.concat(tt.slice(Re)),Re&&ot.push(tt[Re],tt[Re+1])}else{var _e=be._nexttrace;if(_e){var fe=_.lineOptions[ee+1];if(fe){var Fe=fe.positions;if(be.fill==="tonexty"){for(ot=tt.slice(),ee=Math.floor(Fe.length/2);ee--;){var rt=Fe[ee*2],st=Fe[ee*2+1];isNaN(rt)||isNaN(st)||ot.push(rt,st)}j.fill=_e.fillcolor}}}}if(be._prevtrace&&be._prevtrace.fill==="tonext"){var Qe=_.lineOptions[ee-1].positions,Lt=ot.length/2;Re=Lt;var kt=[Re];for(Xe=0;Xe<Qe.length;Xe+=2)(isNaN(Qe[Xe])||isNaN(Qe[Xe+1]))&&(kt.push(Xe/2+Lt+1),Re=Xe+2);ot=ot.concat(Qe),j.hole=kt}return j.fillmode=be.fill,j.opacity=be.opacity,j.positions=ot,j}}),_.fill2d.update(_.fillOptions))}var z=l.dragmode,F=t(z),B=l.clickmode.indexOf("select")>-1;for(E=0;E<p;E++){var O=T[E][0],I=O.trace,N=O.t,U=N.index,W=I._length,Q=N.x,ue=N.y;if(I.selectedpoints||F||B){if(F||(F=!0),I.selectedpoints){var le=_.selectBatch[U]=e.selIndices2selPoints(I),he={};for(y=0;y<le.length;y++)he[le[y]]=1;var G=[];for(y=0;y<W;y++)he[y]||G.push(y);_.unselectBatch[U]=G}var $=N.xpx=new Array(W),J=N.ypx=new Array(W);for(y=0;y<W;y++)$[y]=w.c2p(Q[y]),J[y]=S.c2p(ue[y])}else N.xpx=N.ypx=null}if(F){if(_.select2d||(_.select2d=d(l._glcanvas.data()[1].regl)),_.scatter2d){var X=new Array(p);for(E=0;E<p;E++)X[E]=_.selectBatch[E].length||_.unselectBatch[E].length?_.markerUnselectedOptions[E]:{};_.scatter2d.update(X)}_.select2d&&(_.select2d.update(_.markerOptions),_.select2d.update(_.markerSelectedOptions)),_.glText&&T.forEach(function(j){var ee=((j||[])[0]||{}).trace||{};o.hasText(ee)&&i(j)})}else _.scatter2d&&_.scatter2d.update(_.markerOptions);var oe={viewport:s(l,w,S,g._context.plotGlPixelRatio),range:[(w._rl||w.range)[0],(S._rl||S.range)[0],(w._rl||w.range)[1],(S._rl||S.range)[1]]},ie=e.repeat(oe,_.count);_.fill2d&&_.fill2d.update(ie),_.line2d&&_.line2d.update(ie),_.error2d&&_.error2d.update(ie.concat(ie)),_.scatter2d&&_.scatter2d.update(ie),_.select2d&&_.select2d.update(ie),_.glText&&_.glText.forEach(function(j){j.update(oe)})}}};c.reglPrecompiled=n}}),kq=Ze({"src/traces/scattergl/index.js"(Z,q){"use strict";var d=uj();d.plot=h6(),q.exports=d}}),Lq=Ze({"lib/scattergl.js"(Z,q){"use strict";q.exports=kq()}}),p6=Ze({"src/traces/splom/attributes.js"(Z,q){"use strict";var d=tf(),x=Mu(),A=Qc().axisHoverFormat,M=Cs().hovertemplateAttrs,e=_x(),t=kh().idRegex,r=Dl().templatedArray,o=rs().extendFlat,a=d.marker,i=a.line,n=o(x("marker.line",{editTypeOverride:"calc"}),{width:o({},i.width,{editType:"calc"}),editType:"calc"}),s=o(x("marker"),{symbol:a.symbol,angle:a.angle,size:o({},a.size,{editType:"markerSize"}),sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,opacity:a.opacity,colorbar:a.colorbar,line:n,editType:"calc"});s.color.editType=s.cmin.editType=s.cmax.editType="style";function c(f){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:t[f],editType:"plot"}}}q.exports={dimensions:r("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:o({},e.text,{}),hovertext:o({},e.hovertext,{}),hovertemplate:M(),xhoverformat:A("x"),yhoverformat:A("y"),marker:s,xaxes:c("x"),yaxes:c("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:e.selected.marker,editType:"calc"},unselected:{marker:e.unselected.marker,editType:"calc"},opacity:e.opacity}}}),bT=Ze({"src/traces/parcoords/merge_length.js"(Z,q){"use strict";q.exports=function(d,x,A,M){M||(M=1/0);var e,t;for(e=0;e<x.length;e++)t=x[e],t.visible&&(M=Math.min(M,t[A].length));for(M===1/0&&(M=0),d._length=M,e=0;e<x.length;e++)t=x[e],t.visible&&(t._length=M);return M}}}),Pq=Ze({"src/traces/splom/defaults.js"(Z,q){"use strict";var d=ca(),x=fp(),A=p6(),M=Fu(),e=md(),t=bT(),r=dT().isOpenSymbol;q.exports=function(n,s,c,f){function g(y,b){return d.coerce(n,s,A,y,b)}var v=x(n,s,{name:"dimensions",handleItemDefaults:o}),T=g("diagonal.visible"),l=g("showupperhalf"),_=g("showlowerhalf"),w=t(s,v,"values");if(!w||!T&&!l&&!_){s.visible=!1;return}g("text"),g("hovertext"),g("hovertemplate"),g("xhoverformat"),g("yhoverformat"),e(n,s,c,f,g,{noAngleRef:!0,noStandOff:!0});var S=r(s.marker.symbol),E=M.isBubble(s);g("marker.line.width",S||E?1:0),a(n,s,f,g),d.coerceSelectionMarkerOpacity(s,g)};function o(i,n){function s(f,g){return d.coerce(i,n,A.dimensions,f,g)}s("label");var c=s("values");c&&c.length?s("visible"):n.visible=!1,s("axis.type"),s("axis.matches")}function a(i,n,s,c){var f=n.dimensions,g=f.length,v=n.showupperhalf,T=n.showlowerhalf,l=n.diagonal.visible,_,w,S=new Array(g),E=new Array(g);for(_=0;_<g;_++){var y=_?_+1:"";S[_]="x"+y,E[_]="y"+y}var b=c("xaxes",S),p=c("yaxes",E),u=n._diag=new Array(g);n._xaxes={},n._yaxes={};var m=[],h=[];function P(W,Q,ue,le){if(W){var he=W.charAt(0),G=s._splomAxes[he];if(n["_"+he+"axes"][W]=1,le.push(W),!(W in G)){var $=G[W]={};ue&&($.label=ue.label||"",ue.visible&&ue.axis&&(ue.axis.type&&($.type=ue.axis.type),ue.axis.matches&&($.matches=Q)))}}}var L=!l&&!T,z=!l&&!v;for(n._axesDim={},_=0;_<g;_++){var F=f[_],B=_===0,O=_===g-1,I=B&&L||O&&z?void 0:b[_],N=B&&z||O&&L?void 0:p[_];P(I,N,F,m),P(N,I,F,h),u[_]=[I,N],n._axesDim[I]=_,n._axesDim[N]=_}for(_=0;_<m.length;_++)for(w=0;w<h.length;w++){var U=m[_]+h[w];(_>w&&v||_<w&&T||_===w&&(l||!T||!v))&&(s._splomSubplots[U]=1)}(!T||!l&&v&&T)&&(s._splomGridDflt.xside="bottom",s._splomGridDflt.yside="left")}}}),Iq=Ze({"src/traces/splom/scene_update.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){var e=A._fullLayout,t=M.uid,r=e._splomScenes;r||(r=e._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},a={matrix:!1,selectBatch:[],unselectBatch:[]},i=r[M.uid];return i||(i=r[t]=d.extendFlat({},o,a),i.draw=function(){i.matrix&&i.matrix.draw&&(i.selectBatch.length||i.unselectBatch.length?i.matrix.draw(i.unselectBatch,i.selectBatch):i.matrix.draw()),i.dirty=!1},i.destroy=function(){i.matrix&&i.matrix.destroy&&i.matrix.destroy(),i.matrixOptions=null,i.selectBatch=null,i.unselectBatch=null,i=null}),i.dirty||d.extendFlat(i,o),i}}}),Rq=Ze({"src/traces/splom/calc.js"(Z,q){"use strict";var d=ca(),x=$c(),A=Bd().calcMarkerSize,M=Bd().calcAxisExpansion,e=Fd(),t=gg().markerSelection,r=gg().markerStyle,o=Iq(),a=qs().BADNUM,i=m0().TOO_MANY_POINTS;q.exports=function(s,c){var f=c.dimensions,g=c._length,v={},T=v.cdata=[],l=v.data=[],_=c._visibleDims=[],w,S,E,y,b;function p(L,z){for(var F=L.makeCalcdata({v:z.values,vcalendar:c.calendar},"v"),B=0;B<F.length;B++)F[B]=F[B]===a?NaN:F[B];T.push(F),l.push(L.type==="log"?d.simpleMap(F,L.c2l):F)}for(w=0;w<f.length;w++)if(E=f[w],E.visible){if(y=x.getFromId(s,c._diag[w][0]),b=x.getFromId(s,c._diag[w][1]),y&&b&&y.type!==b.type){d.log("Skipping splom dimension "+w+" with conflicting axis types");continue}y?(p(y,E),b&&b.type==="category"&&(b._categories=y._categories.slice())):p(b,E),_.push(w)}e(s,c),d.extendFlat(v,r(s,c));var u=T.length,m=u*g>i,h;for(m?h=v.sizeAvg||Math.max(v.size,3):h=A(c,g),S=0;S<_.length;S++)w=_[S],E=f[w],y=x.getFromId(s,c._diag[w][0])||{},b=x.getFromId(s,c._diag[w][1])||{},M(s,c,y,b,T[S],T[S],h);var P=o(s,c);return P.matrix||(P.matrix=!0),P.matrixOptions=v,P.selectedOptions=t(s,c,c.selected),P.unselectedOptions=t(s,c,c.unselected),[{x:!1,y:!1,t:{},trace:c}]}}}),Dq=Ze({"node_modules/performance-now/lib/performance-now.js"(Z,q){(function(){var d,x,A,M,e,t;typeof performance<"u"&&performance!==null&&performance.now?q.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(q.exports=function(){return(d()-e)/1e6},x=process.hrtime,d=function(){var r;return r=x(),r[0]*1e9+r[1]},M=d(),t=process.uptime()*1e9,e=M-t):Date.now?(q.exports=function(){return Date.now()-A},A=Date.now()):(q.exports=function(){return new Date().getTime()-A},A=new Date().getTime())}).call(Z)}}),zq=Ze({"node_modules/raf/index.js"(Z,q){var d=Dq(),x=window,A=["moz","webkit"],M="AnimationFrame",e=x["request"+M],t=x["cancel"+M]||x["cancelRequest"+M];for(r=0;!e&&r<A.length;r++)e=x[A[r]+"Request"+M],t=x[A[r]+"Cancel"+M]||x[A[r]+"CancelRequest"+M];var r;(!e||!t)&&(o=0,a=0,i=[],n=1e3/60,e=function(s){if(i.length===0){var c=d(),f=Math.max(0,n-(c-o));o=f+c,setTimeout(function(){var g=i.slice(0);i.length=0;for(var v=0;v<g.length;v++)if(!g[v].cancelled)try{g[v].callback(o)}catch(T){setTimeout(function(){throw T},0)}},Math.round(f))}return i.push({handle:++a,callback:s,cancelled:!1}),a},t=function(s){for(var c=0;c<i.length;c++)i[c].handle===s&&(i[c].cancelled=!0)});var o,a,i,n;q.exports=function(s){return e.call(x,s)},q.exports.cancel=function(){t.apply(x,arguments)},q.exports.polyfill=function(s){s||(s=x),s.requestAnimationFrame=e,s.cancelAnimationFrame=t}}}),Fq=Ze({"node_modules/array-range/index.js"(Z,q){q.exports=function(x,A){var M=typeof x=="number",e=typeof A=="number";M&&!e?(A=x,x=0):!M&&!e&&(x=0,A=0),x=x|0,A=A|0;var t=A-x;if(t<0)throw new Error("array length must be positive");for(var r=new Array(t),o=0,a=x;o<t;o++,a++)r[o]=a;return r}}}),Oq=Ze({"node_modules/regl-splom/index.js"(Z,q){"use strict";var d=GE(),x=Ev(),A=vg(),M=zq(),e=Fq(),t=k1(),r=mg();q.exports=o;function o(s,c){if(!(this instanceof o))return new o(s,c);this.traces=[],this.passes={},this.regl=s,this.scatter=d(s),this.canvas=this.scatter.canvas}o.prototype.render=function(...s){return s.length&&this.update(...s),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=M(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,M(()=>{this.dirty=!1})),this)},o.prototype.update=function(...s){if(!s.length)return;for(let g=0;g<s.length;g++)this.updateItem(g,s[g]);this.traces=this.traces.filter(Boolean);let c=[],f=0;for(let g=0;g<this.traces.length;g++){let v=this.traces[g],T=this.traces[g].passes;for(let l=0;l<T.length;l++)c.push(this.passes[T[l]]);v.passOffset=f,f+=v.passes.length}return this.scatter.update(...c),this},o.prototype.updateItem=function(s,c){let{regl:f}=this;if(c===null)return this.traces[s]=null,this;if(!c)return this;let g=x(c,{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"}),v=this.traces[s]||(this.traces[s]={id:s,buffer:f.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:t([f._gl.drawingBufferWidth,f._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(g.color!=null&&(v.color=g.color),g.size!=null&&(v.size=g.size),g.marker!=null&&(v.marker=g.marker),g.borderColor!=null&&(v.borderColor=g.borderColor),g.borderSize!=null&&(v.borderSize=g.borderSize),g.opacity!=null&&(v.opacity=g.opacity),g.viewport&&(v.viewport=t(g.viewport)),g.diagonal!=null&&(v.diagonal=g.diagonal),g.upper!=null&&(v.upper=g.upper),g.lower!=null&&(v.lower=g.lower),g.data){v.buffer(r(g.data)),v.columns=g.data.length,v.count=g.data[0].length,v.bounds=[];for(let m=0;m<v.columns;m++)v.bounds[m]=A(g.data[m],1)}let T;g.range&&(v.range=g.range,T=v.range&&typeof v.range[0]!="number"),g.domain&&(v.domain=g.domain);let l=!1;g.padding!=null&&(Array.isArray(g.padding)&&g.padding.length===v.columns&&typeof g.padding[g.padding.length-1]=="number"?(v.padding=g.padding.map(n),l=!0):v.padding=n(g.padding));let _=v.columns,w=v.count,S=v.viewport.width,E=v.viewport.height,y=v.viewport.x,b=v.viewport.y,p=S/_,u=E/_;v.passes=[];for(let m=0;m<_;m++)for(let h=0;h<_;h++){if(!v.diagonal&&h===m||!v.upper&&m>h||!v.lower&&m<h)continue;let P=a(v.id,m,h),L=this.passes[P]||(this.passes[P]={});if(g.data&&(g.transpose?L.positions={x:{buffer:v.buffer,offset:h,count:w,stride:_},y:{buffer:v.buffer,offset:m,count:w,stride:_}}:L.positions={x:{buffer:v.buffer,offset:h*w,count:w},y:{buffer:v.buffer,offset:m*w,count:w}},L.bounds=i(v.bounds,m,h)),g.domain||g.viewport||g.data){let z=l?i(v.padding,m,h):v.padding;if(v.domain){let[F,B,O,I]=i(v.domain,m,h);L.viewport=[y+F*S+z[0],b+B*E+z[1],y+O*S-z[2],b+I*E-z[3]]}else L.viewport=[y+h*p+p*z[0],b+m*u+u*z[1],y+(h+1)*p-p*z[2],b+(m+1)*u-u*z[3]]}g.color&&(L.color=v.color),g.size&&(L.size=v.size),g.marker&&(L.marker=v.marker),g.borderSize&&(L.borderSize=v.borderSize),g.borderColor&&(L.borderColor=v.borderColor),g.opacity&&(L.opacity=v.opacity),g.range&&(L.range=T?i(v.range,m,h):v.range||L.bounds),v.passes.push(P)}return this},o.prototype.draw=function(...s){if(!s.length)this.scatter.draw();else{let c=[];for(let f=0;f<s.length;f++)if(typeof s[f]=="number"){let{passes:g,passOffset:v}=this.traces[s[f]];c.push(...e(v,v+g.length))}else if(s[f].length){let g=s[f],{passes:v,passOffset:T}=this.traces[f];v=v.map((l,_)=>{c[T+_]=g})}this.scatter.draw(...c)}return this},o.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function a(s,c,f){let g=s.id!=null?s.id:s,v=c,T=f;return g<<16|(v&255)<<8|T&255}function i(s,c,f){let g,v,T,l,_,w,S,E,y=s[c],b=s[f];return y.length>2?(g=y[0],T=y[2],v=y[1],l=y[3]):y.length?(g=v=y[0],T=l=y[1]):(g=y.x,v=y.y,T=y.x+y.width,l=y.y+y.height),b.length>2?(_=b[0],S=b[2],w=b[1],E=b[3]):b.length?(_=w=b[0],S=E=b[1]):(_=b.x,w=b.y,S=b.x+b.width,E=b.y+b.height),[_,v,S,l]}function n(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=t(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Bq=Ze({"src/traces/splom/plot.js"(Z,q){"use strict";var d=Oq(),x=ca(),A=$c(),M=Jd().selectMode;q.exports=function(r,o,a){if(a.length)for(var i=0;i<a.length;i++)e(r,a[i][0])};function e(t,r){var o=t._fullLayout,a=o._size,i=r.trace,n=r.t,s=o._splomScenes[i.uid],c=s.matrixOptions,f=c.cdata,g=o._glcanvas.data()[0].regl,v=o.dragmode,T,l,_,w,S;if(f.length!==0){c.lower=i.showupperhalf,c.upper=i.showlowerhalf,c.diagonal=i.diagonal.visible;var E=i._visibleDims,y=f.length,b=s.viewOpts={};for(b.ranges=new Array(y),b.domains=new Array(y),S=0;S<E.length;S++){_=E[S];var p=b.ranges[S]=new Array(4),u=b.domains[S]=new Array(4);T=A.getFromId(t,i._diag[_][0]),T&&(p[0]=T._rl[0],p[2]=T._rl[1],u[0]=T.domain[0],u[2]=T.domain[1]),l=A.getFromId(t,i._diag[_][1]),l&&(p[1]=l._rl[0],p[3]=l._rl[1],u[1]=l.domain[0],u[3]=l.domain[1])}var m=t._context.plotGlPixelRatio,h=a.l*m,P=a.b*m,L=a.w*m,z=a.h*m;b.viewport=[h,P,L+h,z+P],s.matrix===!0&&(s.matrix=d(g));var F=o.clickmode.indexOf("select")>-1,B=M(v)||!!i.selectedpoints||F,O=!0;if(B){var I=i._length;if(i.selectedpoints){s.selectBatch=i.selectedpoints;var N=i.selectedpoints,U={};for(_=0;_<N.length;_++)U[N[_]]=!0;var W=[];for(_=0;_<I;_++)U[_]||W.push(_);s.unselectBatch=W}var Q=n.xpx=new Array(y),ue=n.ypx=new Array(y);for(S=0;S<E.length;S++){if(_=E[S],T=A.getFromId(t,i._diag[_][0]),T)for(Q[S]=new Array(I),w=0;w<I;w++)Q[S][w]=T.c2p(f[S][w]);if(l=A.getFromId(t,i._diag[_][1]),l)for(ue[S]=new Array(I),w=0;w<I;w++)ue[S][w]=l.c2p(f[S][w])}if(s.selectBatch.length||s.unselectBatch.length){var le=x.extendFlat({},c,s.unselectedOptions,b),he=x.extendFlat({},c,s.selectedOptions,b);s.matrix.update(le,he),O=!1}}else n.xpx=n.ypx=null;if(O){var G=x.extendFlat({},c,b);s.matrix.update(G,null)}}}}}),d6=Ze({"src/traces/splom/helpers.js"(Z){"use strict";Z.getDimIndex=function(d,x){for(var A=x._id,M=A.charAt(0),e={x:0,y:1}[M],t=d._visibleDims,r=0;r<t.length;r++){var o=t[r];if(d._diag[o][e]===A)return r}return!1}}}),Nq=Ze({"src/traces/splom/hover.js"(Z,q){"use strict";var d=d6(),x=pT().calcHover,A=Wo().getFromId,M=rs().extendFlat;function e(r,o,a,i,n){n||(n={});var s=(i||"").charAt(0)==="x",c=(i||"").charAt(0)==="y",f=t(r,o,a);if((s||c)&&n.hoversubplots==="axis"&&f[0])for(var g=(s?r.xa:r.ya)._subplotsWith,v=n.gd,T=M({},r),l=0;l<g.length;l++){var _=g[l];if(_!==r.xa._id+r.ya._id){c?T.xa=A(v,_,"x"):T.ya=A(v,_,"y");var w=s||c,S=t(T,o,a,w);f=f.concat(S)}}return f}function t(r,o,a,i){var n=r.cd,s=n[0].trace,c=r.scene,f=c.matrixOptions.cdata,g=r.xa,v=r.ya,T=g.c2p(o),l=v.c2p(a),_=r.distance,w=d.getDimIndex(s,g),S=d.getDimIndex(s,v);if(w===!1||S===!1)return[r];for(var E=f[w],y=f[S],b,p,u=_,m=0;m<E.length;m++)if(!(i&&m!==r.index)){var h=E[m],P=y[m],L=g.c2p(h)-T,z=v.c2p(P)-l,F=Math.sqrt(L*L+z*z);(i||F<u)&&(u=p=F,b=m)}return r.index=b,r.distance=u,r.dxy=p,b===void 0?[r]:[x(r,E,y,s)]}q.exports={hoverPoints:e}}}),Uq=Ze({"src/traces/splom/select.js"(Z,q){"use strict";var d=ca(),x=d.pushUnique,A=Fu(),M=d6();q.exports=function(t,r){var o=t.cd,a=o[0].trace,i=o[0].t,n=t.scene,s=n.matrixOptions.cdata,c=t.xaxis,f=t.yaxis,g=[];if(!n)return g;var v=!A.hasMarkers(a)&&!A.hasText(a);if(a.visible!==!0||v)return g;var T=M.getDimIndex(a,c),l=M.getDimIndex(a,f);if(T===!1||l===!1)return g;var _=i.xpx[T],w=i.ypx[l],S=s[T],E=s[l],y=(t.scene.selectBatch||[]).slice(),b=[];if(r!==!1&&!r.degenerate)for(var p=0;p<S.length;p++)r.contains([_[p],w[p]],null,p,t)?(g.push({pointNumber:p,x:S[p],y:E[p]}),x(y,p)):y.indexOf(p)!==-1?x(y,p):b.push(p);var u=n.matrixOptions;return!y.length&&!b.length?n.matrix.update(u,null):!n.selectBatch.length&&!n.unselectBatch.length&&n.matrix.update(n.unselectedOptions,d.extendFlat({},u,n.selectedOptions,n.viewOpts)),n.selectBatch=y,n.unselectBatch=b,g}}}),jq=Ze({"src/traces/splom/edit_style.js"(Z,q){"use strict";var d=ca(),x=Fd(),A=gg().markerStyle;q.exports=function(e,t){var r=t.trace,o=e._fullLayout._splomScenes[r.uid];if(o){x(e,r),d.extendFlat(o.matrixOptions,A(e,r));var a=d.extendFlat({},o.matrixOptions,o.viewOpts);o.matrix.update(a,null)}}}}),qq=Ze({"src/traces/splom/base_index.js"(Z,q){"use strict";var d=oo(),x=W5();q.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:p6(),supplyDefaults:Pq(),colorbar:hp(),calc:Rq(),plot:Bq(),hoverPoints:Nq().hoverPoints,selectPoints:Uq(),editStyle:jq(),meta:{}},d.register(x)}}),Vq=Ze({"src/traces/splom/base_plot.js"(Z,q){"use strict";var d=r6(),x=oo(),A=xT(),M=Hh().getModuleCalcData,e=Zf(),t=$c().getFromId,r=Wo().shouldShowZeroLine,o="splom",a={};function i(v){var T=v._fullLayout,l=x.getModule(o),_=M(v.calcdata,l)[0],w=A(v,["ANGLE_instanced_arrays","OES_element_index_uint"],a);w&&(T._hasOnlyLargeSploms&&c(v),l.plot(v,{},_))}function n(v){var T=v.calcdata,l=v._fullLayout;l._hasOnlyLargeSploms&&c(v);for(var _=0;_<T.length;_++){var w=T[_][0],S=w.trace,E=l._splomScenes[S.uid];S.type==="splom"&&E&&E.matrix&&s(v,S,E)}}function s(v,T,l){for(var _=l.matrixOptions.data.length,w=T._visibleDims,S=l.viewOpts.ranges=new Array(_),E=0;E<w.length;E++){var y=w[E],b=S[E]=new Array(4),p=t(v,T._diag[y][0]);p&&(b[0]=p.r2l(p.range[0]),b[2]=p.r2l(p.range[1]));var u=t(v,T._diag[y][1]);u&&(b[1]=u.r2l(u.range[0]),b[3]=u.r2l(u.range[1]))}l.selectBatch.length||l.unselectBatch.length?l.matrix.update({ranges:S},{ranges:S}):l.matrix.update({ranges:S})}function c(v){var T=v._fullLayout,l=T._glcanvas.data()[0].regl,_=T._splomGrid;_||(_=T._splomGrid=d(l)),_.update(f(v))}function f(v){var T=v._context.plotGlPixelRatio,l=v._fullLayout,_=l._size,w=[0,0,l.width*T,l.height*T],S={},E;function y(W,Q,ue,le,he,G){ue*=T,le*=T,he*=T,G*=T;var $=Q[W+"color"],J=Q[W+"width"],X=String($+J);X in S?S[X].data.push(NaN,NaN,ue,le,he,G):S[X]={data:[ue,le,he,G],join:"rect",thickness:J*T,color:$,viewport:w,range:w,overlay:!1}}for(E in l._splomSubplots){var b=l._plots[E],p=b.xaxis,u=b.yaxis,m=p._gridVals,h=u._gridVals,P=p._offset,L=p._length,z=u._length,F=_.b+u.domain[0]*_.h,B=-u._m,O=-B*u.r2l(u.range[0],u.calendar),I,N;if(p.showgrid)for(E=0;E<m.length;E++)I=P+p.l2p(m[E].x),y("grid",p,I,F,I,F+z);if(u.showgrid)for(E=0;E<h.length;E++)N=F+O+B*h[E].x,y("grid",u,P,N,P+L,N);r(v,p,u)&&(I=P+p.l2p(0),y("zeroline",p,I,F,I,F+z)),r(v,u,p)&&(N=F+O+0,y("zeroline",u,P,N,P+L,N))}var U=[];for(E in S)U.push(S[E]);return U}function g(v,T,l,_){var w={},S;if(_._splomScenes){for(S=0;S<v.length;S++){var E=v[S];E.type==="splom"&&(w[E.uid]=1)}for(S=0;S<l.length;S++){var y=l[S];if(!w[y.uid]){var b=_._splomScenes[y.uid];b&&b.destroy&&b.destroy(),_._splomScenes[y.uid]=null,delete _._splomScenes[y.uid]}}}Object.keys(_._splomScenes||{}).length===0&&delete _._splomScenes,_._splomGrid&&!T._hasOnlyLargeSploms&&_._hasOnlyLargeSploms&&(_._splomGrid.destroy(),_._splomGrid=null,delete _._splomGrid),e.clean(v,T,l,_)}q.exports={name:o,attr:e.attr,attrRegex:e.attrRegex,layoutAttributes:e.layoutAttributes,supplyLayoutDefaults:e.supplyLayoutDefaults,drawFramework:e.drawFramework,plot:i,drag:n,updateGrid:c,clean:g,updateFx:e.updateFx,toSVG:e.toSVG,reglPrecompiled:a}}}),Gq=Ze({"src/traces/splom/index.js"(Z,q){"use strict";var d=qq();d.basePlotModule=Vq(),q.exports=d}}),Hq=Ze({"lib/splom.js"(Z,q){"use strict";q.exports=Gq()}}),v6=Ze({"src/traces/parcoords/attributes.js"(Z,q){"use strict";var d=Mu(),x=Wh(),A=tc(),M=bc().attributes,e=rs().extendFlat,t=Dl().templatedArray;q.exports={domain:M({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:A({editType:"plot"}),tickfont:A({autoShadowDflt:!0,editType:"plot"}),rangefont:A({editType:"plot"}),dimensions:t("dimension",{label:{valType:"string",editType:"plot"},tickvals:e({},x.tickvals,{editType:"plot"}),ticktext:e({},x.ticktext,{editType:"plot"}),tickformat:e({},x.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:e({editType:"calc"},d("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"}}}}),Tx=Ze({"src/traces/parcoords/constants.js"(Z,q){"use strict";q.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"}}}}),Cv=Ze({"src/lib/gup.js"(Z,q){"use strict";var d=S_();function x(A){return[A]}q.exports={keyFun:function(A){return A.key},repeat:x,descend:d,wrap:x,unwrap:function(A){return A[0]}}}}),m6=Ze({"src/traces/parcoords/axisbrush.js"(Z,q){"use strict";var d=Tx(),x=On(),A=Cv().keyFun,M=Cv().repeat,e=ca().sorterAsc,t=ca().strTranslate,r=d.bar.snapRatio;function o(U,W){return U*(1-r)+W*r}var a=d.bar.snapClose;function i(U,W){return U*(1-a)+W*a}function n(U,W,Q,ue){if(s(Q,ue))return Q;var le=U?-1:1,he=0,G=W.length-1;if(le<0){var $=he;he=G,G=$}for(var J=W[he],X=J,oe=he;le*oe<le*G;oe+=le){var ie=oe+le,j=W[ie];if(le*Q<le*i(J,j))return o(J,X);if(le*Q<le*j||ie===G)return o(j,J);X=J,J=j}}function s(U,W){for(var Q=0;Q<W.length;Q++)if(U>=W[Q][0]&&U<=W[Q][1])return!0;return!1}function c(U){U.attr("x",-d.bar.captureWidth/2).attr("width",d.bar.captureWidth)}function f(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function g(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var W=v(U.brush.filter.getConsolidated(),U.height),Q=[0],ue,le,he,G=W.length?W[0][0]:null,$=0;$<W.length;$++)ue=W[$],le=ue[1]-ue[0],Q.push(G),Q.push(le),he=$+1,he<W.length&&(G=W[he][0]-ue[1]);return Q.push(U.height),Q}function v(U,W){return U.map(function(Q){return Q.map(function(ue){return Math.max(0,ue*W)}).sort(e)})}function T(U,W){var Q=d.bar.handleHeight;if(!(W>U[1]+Q||W<U[0]-Q))return W>=.9*U[1]+.1*U[0]?"n":W<=.9*U[0]+.1*U[1]?"s":"ns"}function l(){x.select(document.body).style("cursor",null)}function _(U){U.attr("stroke-dasharray",g)}function w(U,W){var Q=x.select(U).selectAll(".highlight, .highlight-shadow"),ue=W?Q.transition().duration(d.bar.snapDuration).each("end",W):Q;_(ue)}function S(U,W){var Q=U.brush,ue=Q.filterSpecified,le=NaN,he={},G;if(ue){var $=U.height,J=Q.filter.getConsolidated(),X=v(J,$),oe=NaN,ie=NaN,j=NaN;for(G=0;G<=X.length;G++){var ee=X[G];if(ee&&ee[0]<=W&&W<=ee[1]){oe=G;break}else if(ie=G?G-1:NaN,ee&&ee[0]>W){j=G;break}}if(le=oe,isNaN(le)&&(isNaN(ie)||isNaN(j)?le=isNaN(ie)?j:ie:le=W-X[ie][1]<X[j][0]-W?ie:j),!isNaN(le)){var re=X[le],ce=T(re,W);ce&&(he.interval=J[le],he.intervalPix=re,he.region=ce)}}if(U.ordinal&&!he.region){var be=U.unitTickvals,Ae=U.unitToPaddedPx.invert(W);for(G=0;G<be.length;G++){var ze=[be[Math.max(G-1,0)]*.25+be[G]*.75,be[Math.min(G+1,be.length-1)]*.25+be[G]*.75];if(Ae>=ze[0]&&Ae<=ze[1]){he.clickableOrdinalRange=ze;break}}}return he}function E(U,W){x.event.sourceEvent.stopPropagation();var Q=W.height-x.mouse(U)[1]-2*d.verticalPadding,ue=W.unitToPaddedPx.invert(Q),le=W.brush,he=S(W,Q),G=he.interval,$=le.svgBrush;if($.wasDragged=!1,$.grabbingBar=he.region==="ns",$.grabbingBar){var J=G.map(W.unitToPaddedPx);$.grabPoint=Q-J[0]-d.verticalPadding,$.barLength=J[1]-J[0]}$.clickableOrdinalRange=he.clickableOrdinalRange,$.stayingIntervals=W.multiselect&&le.filterSpecified?le.filter.getConsolidated():[],G&&($.stayingIntervals=$.stayingIntervals.filter(function(X){return X[0]!==G[0]&&X[1]!==G[1]})),$.startExtent=he.region?G[he.region==="s"?1:0]:ue,W.parent.inBrushDrag=!0,$.brushStartCallback()}function y(U,W){x.event.sourceEvent.stopPropagation();var Q=W.height-x.mouse(U)[1]-2*d.verticalPadding,ue=W.brush.svgBrush;ue.wasDragged=!0,ue._dragging=!0,ue.grabbingBar?ue.newExtent=[Q-ue.grabPoint,Q+ue.barLength-ue.grabPoint].map(W.unitToPaddedPx.invert):ue.newExtent=[ue.startExtent,W.unitToPaddedPx.invert(Q)].sort(e),W.brush.filterSpecified=!0,ue.extent=ue.stayingIntervals.concat([ue.newExtent]),ue.brushCallback(W),w(U.parentNode)}function b(U,W){var Q=W.brush,ue=Q.filter,le=Q.svgBrush;le._dragging||(p(U,W),y(U,W),W.brush.svgBrush.wasDragged=!1),le._dragging=!1;var he=x.event;he.sourceEvent.stopPropagation();var G=le.grabbingBar;if(le.grabbingBar=!1,le.grabLocation=void 0,W.parent.inBrushDrag=!1,l(),!le.wasDragged){le.wasDragged=void 0,le.clickableOrdinalRange?Q.filterSpecified&&W.multiselect?le.extent.push(le.clickableOrdinalRange):(le.extent=[le.clickableOrdinalRange],Q.filterSpecified=!0):G?(le.extent=le.stayingIntervals,le.extent.length===0&&z(Q)):z(Q),le.brushCallback(W),w(U.parentNode),le.brushEndCallback(Q.filterSpecified?ue.getConsolidated():[]);return}var $=function(){ue.set(ue.getConsolidated())};if(W.ordinal){var J=W.unitTickvals;J[J.length-1]<J[0]&&J.reverse(),le.newExtent=[n(0,J,le.newExtent[0],le.stayingIntervals),n(1,J,le.newExtent[1],le.stayingIntervals)];var X=le.newExtent[1]>le.newExtent[0];le.extent=le.stayingIntervals.concat(X?[le.newExtent]:[]),le.extent.length||z(Q),le.brushCallback(W),X?w(U.parentNode,$):($(),w(U.parentNode))}else $();le.brushEndCallback(Q.filterSpecified?ue.getConsolidated():[])}function p(U,W){var Q=W.height-x.mouse(U)[1]-2*d.verticalPadding,ue=S(W,Q),le="crosshair";ue.clickableOrdinalRange?le="pointer":ue.region&&(le=ue.region+"-resize"),x.select(document.body).style("cursor",le)}function u(U){U.on("mousemove",function(W){x.event.preventDefault(),W.parent.inBrushDrag||p(this,W)}).on("mouseleave",function(W){W.parent.inBrushDrag||l()}).call(x.behavior.drag().on("dragstart",function(W){E(this,W)}).on("drag",function(W){y(this,W)}).on("dragend",function(W){b(this,W)}))}function m(U,W){return U[0]-W[0]}function h(U,W,Q){var ue=Q._context.staticPlot,le=U.selectAll(".background").data(M);le.enter().append("rect").classed("background",!0).call(c).call(f).style("pointer-events",ue?"none":"auto").attr("transform",t(0,d.verticalPadding)),le.call(u).attr("height",function($){return $.height-d.verticalPadding});var he=U.selectAll(".highlight-shadow").data(M);he.enter().append("line").classed("highlight-shadow",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width+d.bar.strokeWidth).attr("stroke",W).attr("opacity",d.bar.strokeOpacity).attr("stroke-linecap","butt"),he.attr("y1",function($){return $.height}).call(_);var G=U.selectAll(".highlight").data(M);G.enter().append("line").classed("highlight",!0).attr("x",-d.bar.width/2).attr("stroke-width",d.bar.width-d.bar.strokeWidth).attr("stroke",d.bar.fillColor).attr("opacity",d.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function($){return $.height}).call(_)}function P(U,W,Q){var ue=U.selectAll("."+d.cn.axisBrush).data(M,A);ue.enter().append("g").classed(d.cn.axisBrush,!0),h(ue,W,Q)}function L(U){return U.svgBrush.extent.map(function(W){return W.slice()})}function z(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function F(U){return function(Q){var ue=Q.brush,le=L(ue),he=le.slice();ue.filter.set(he),U()}}function B(U){for(var W=U.slice(),Q=[],ue,le=W.shift();le;){for(ue=le.slice();(le=W.shift())&&le[0]<=ue[1];)ue[1]=Math.max(ue[1],le[1]);Q.push(ue)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function O(){var U=[],W,Q;return{set:function(ue){U=ue.map(function(le){return le.slice().sort(e)}).sort(m),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),W=B(U),Q=U.reduce(function(le,he){return[Math.min(le[0],he[0]),Math.max(le[1],he[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return W},getBounds:function(){return Q}}}function I(U,W,Q,ue,le,he){var G=O();return G.set(Q),{filter:G,filterSpecified:W,svgBrush:{extent:[],brushStartCallback:ue,brushCallback:F(le),brushEndCallback:he}}}function N(U,W){if(Array.isArray(U[0])?(U=U.map(function(ue){return ue.sort(e)}),W.multiselect?U=B(U.sort(m)):U=[U[0]]):U=[U.sort(e)],W.tickvals){var Q=W.tickvals.slice().sort(e);if(U=U.map(function(ue){var le=[n(0,Q,ue[0],[]),n(1,Q,ue[1],[])];if(le[1]>le[0])return le}).filter(function(ue){return ue}),!U.length)return}return U.length>1?U:U[0]}q.exports={makeBrush:I,ensureAxisBrush:P,cleanRanges:N}}}),Wq=Ze({"src/traces/parcoords/defaults.js"(Z,q){"use strict";var d=ca(),x=bp().hasColorscale,A=gh(),M=bc().defaults,e=fp(),t=Wo(),r=v6(),o=m6(),a=Tx().maxDimensionCount,i=bT();function n(c,f,g,v,T){var l=T("line.color",g);if(x(c,"line")&&d.isArrayOrTypedArray(l)){if(l.length)return T("line.colorscale"),A(c,f,v,T,{prefix:"line.",cLetter:"c"}),l.length;f.line.color=g}return 1/0}function s(c,f,g,v){function T(E,y){return d.coerce(c,f,r.dimensions,E,y)}var l=T("values"),_=T("visible");if(l&&l.length||(_=f.visible=!1),_){T("label"),T("tickvals"),T("ticktext"),T("tickformat");var w=T("range");f._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:w},t.setConvert(f._ax,v.layout),T("multiselect");var S=T("constraintrange");S&&(f.constraintrange=o.cleanRanges(S,f))}}q.exports=function(f,g,v,T){function l(y,b){return d.coerce(f,g,r,y,b)}var _=f.dimensions;Array.isArray(_)&&_.length>a&&(d.log("parcoords traces support up to "+a+" dimensions at the moment"),_.splice(a));var w=e(f,g,{name:"dimensions",layout:T,handleItemDefaults:s}),S=n(f,g,v,T,l);M(g,T,l),(!Array.isArray(w)||!w.length)&&(g.visible=!1),i(g,w,"values",S);var E=d.extendFlat({},T.font,{size:Math.round(T.font.size/1.2)});d.coerceFont(l,"labelfont",E),d.coerceFont(l,"tickfont",E,{autoShadowDflt:!0}),d.coerceFont(l,"rangefont",E),l("labelangle"),l("labelside"),l("unselected.line.color"),l("unselected.line.opacity")}}}),Xq=Ze({"src/traces/parcoords/calc.js"(Z,q){"use strict";var d=ca().isArrayOrTypedArray,x=rc(),A=Cv().wrap;q.exports=function(t,r){var o,a;return x.hasColorscale(r,"line")&&d(r.line.color)?(o=r.line.color,a=x.extractOpts(r.line).colorscale,x.calc(t,r,{vals:o,containerStr:"line",cLetter:"c"})):(o=M(r._length),a=[[0,r.line.color],[1,r.line.color]]),A({lineColor:o,cscale:a})};function M(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}}});function Zq(Z){var q,d,x,A=[],M=1,e;if(typeof Z=="number")return{space:"rgb",values:[Z>>>16,(Z&65280)>>>8,Z&255],alpha:1};if(typeof Z=="number")return{space:"rgb",values:[Z>>>16,(Z&65280)>>>8,Z&255],alpha:1};if(Z=String(Z).toLowerCase(),wT.default[Z])A=wT.default[Z].slice(),e="rgb";else if(Z==="transparent")M=0,e="rgb",A=[0,0,0];else if(Z[0]==="#"){var t=Z.slice(1),r=t.length,o=r<=4;M=1,o?(A=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],r===4&&(M=parseInt(t[3]+t[3],16)/255)):(A=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],r===8&&(M=parseInt(t[6]+t[7],16)/255)),A[0]||(A[0]=0),A[1]||(A[1]=0),A[2]||(A[2]=0),e="rgb"}else if(x=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(Z)){var a=x[1];e=a.replace(/a$/,"");var i=e==="cmyk"?4:e==="gray"?1:3;A=x[2].trim().split(/\s*[,\/]\s*|\s+/),e==="color"&&(e=A.shift()),A=A.map(function(n,s){if(n[n.length-1]==="%")return n=parseFloat(n)/100,s===3?n:e==="rgb"?n*255:e[0]==="h"||e[0]==="l"&&!s?n*100:e==="lab"?n*125:e==="lch"?s<2?n*150:n*360:e[0]==="o"&&!s?n:e==="oklab"?n*.4:e==="oklch"?s<2?n*.4:n*360:n;if(e[s]==="h"||s===2&&e[e.length-1]==="h"){if(TT[n]!==void 0)return TT[n];if(n.endsWith("deg"))return parseFloat(n);if(n.endsWith("turn"))return parseFloat(n)*360;if(n.endsWith("grad"))return parseFloat(n)*360/400;if(n.endsWith("rad"))return parseFloat(n)*180/Math.PI}return n==="none"?0:parseFloat(n)}),M=A.length>i?A.pop():1}else/[0-9](?:\s|\/|,)/.test(Z)&&(A=Z.match(/([0-9]+)/g).map(function(n){return parseFloat(n)}),e=((d=(q=Z.match(/([a-z])/ig))==null?void 0:q.join(""))==null?void 0:d.toLowerCase())||"rgb");return{space:e,values:A,alpha:M}}var wT,g6,TT,Yq=wo({"node_modules/color-parse/index.js"(){wT=cu(_E(),1),g6=Zq,TT={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Ax,y6=wo({"node_modules/color-space/rgb.js"(){Ax={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Sx,Kq=wo({"node_modules/color-space/hsl.js"(){y6(),Sx={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(Z){var q=Z[0]/360,d=Z[1]/100,x=Z[2]/100,A,M,e,t,r,o=0;if(d===0)return r=x*255,[r,r,r];for(M=x<.5?x*(1+d):x+d-x*d,A=2*x-M,t=[0,0,0];o<3;)e=q+1/3*-(o-1),e<0?e++:e>1&&e--,r=6*e<1?A+(M-A)*6*e:2*e<1?M:3*e<2?A+(M-A)*(2/3-e)*6:A,t[o++]=r*255;return t}},Ax.hsl=function(Z){var q=Z[0]/255,d=Z[1]/255,x=Z[2]/255,A=Math.min(q,d,x),M=Math.max(q,d,x),e=M-A,t,r,o;return M===A?t=0:q===M?t=(d-x)/e:d===M?t=2+(x-q)/e:x===M&&(t=4+(q-d)/e),t=Math.min(t*60,360),t<0&&(t+=360),o=(A+M)/2,M===A?r=0:o<=.5?r=e/(M+A):r=e/(2-M-A),[t,r*100,o*100]}}}),_6={};Ws(_6,{default:()=>Jq});function Jq(Z){Array.isArray(Z)&&Z.raw&&(Z=String.raw(...arguments)),Z instanceof Number&&(Z=+Z);var q,d,x,A=g6(Z);if(!A.space)return[];let M=A.space[0]==="h"?Sx.min:Ax.min,e=A.space[0]==="h"?Sx.max:Ax.max;return q=Array(3),q[0]=Math.min(Math.max(A.values[0],M[0]),e[0]),q[1]=Math.min(Math.max(A.values[1],M[1]),e[1]),q[2]=Math.min(Math.max(A.values[2],M[2]),e[2]),A.space[0]==="h"&&(q=Sx.rgb(q)),q.push(Math.min(Math.max(A.alpha,0),1)),q}var $q=wo({"node_modules/color-rgba/index.js"(){Yq(),y6(),Kq()}}),x6=Ze({"src/traces/parcoords/helpers.js"(Z){"use strict";var q=ca().isTypedArray;Z.convertTypedArray=function(d){return q(d)?Array.prototype.slice.call(d):d},Z.isOrdinal=function(d){return!!d.tickvals},Z.isVisible=function(d){return d.visible||!("visible"in d)}}}),Qq=Ze({"src/traces/parcoords/lines.js"(Z,q){"use strict";var d=["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(`
`),x=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(`
`),A=Tx().maxDimensionCount,M=ca(),e=1e-6,t=2048,r=new Uint8Array(4),o=new Uint8Array(4),a={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function i(b){b.read({x:0,y:0,width:1,height:1,data:r})}function n(b,p,u,m,h){var P=b._gl;P.enable(P.SCISSOR_TEST),P.scissor(p,u,m,h),b.clear({color:[0,0,0,0],depth:1})}function s(b,p,u,m,h,P){var L=P.key;function z(F){var B=Math.min(m,h-F*m);F===0&&(window.cancelAnimationFrame(u.currentRafs[L]),delete u.currentRafs[L],n(b,P.scissorX,P.scissorY,P.scissorWidth,P.viewBoxSize[1])),!u.clearOnly&&(P.count=2*B,P.offset=2*F*m,p(P),F*m+B<h&&(u.currentRafs[L]=window.requestAnimationFrame(function(){z(F+1)})),u.drawCompleted=!1)}u.drawCompleted||(i(b),u.drawCompleted=!0),z(0)}function c(b){return Math.max(e,Math.min(1-e,b))}function f(b,p){for(var u=new Array(256),m=0;m<256;m++)u[m]=b(m/255).concat(p);return u}function g(b,p){return(b>>>8*p)%256/255}function v(b,p,u){for(var m=new Array(b*(A+4)),h=0,P=0;P<b;P++){for(var L=0;L<A;L++)m[h++]=L<p.length?p[L].paddedUnitValues[P]:.5;m[h++]=g(P,2),m[h++]=g(P,1),m[h++]=g(P,0),m[h++]=c(u[P])}return m}function T(b,p,u){for(var m=new Array(p*8),h=0,P=0;P<p;P++)for(var L=0;L<2;L++)for(var z=0;z<4;z++){var F=b*4+z,B=u[P*64+F];F===63&&L===0&&(B*=-1),m[h++]=B}return m}function l(b){var p="0"+b;return p.substr(p.length-2)}function _(b){return b<A?"p"+l(b+1)+"_"+l(b+4):"colors"}function w(b,p,u){for(var m=0;m<=A;m+=4)b[_(m)](T(m/4,p,u))}function S(b){for(var p={},u=0;u<=A;u+=4)p[_(u)]=b.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return p}function E(b,p,u,m,h,P,L,z,F,B,O,I,N,U){for(var W=[[],[]],Q=0;Q<64;Q++)W[0][Q]=Q===h?1:0,W[1][Q]=Q===P?1:0;L*=U,z*=U,F*=U,B*=U;var ue=b.lines.canvasOverdrag*U,le=b.domain,he=b.canvasWidth*U,G=b.canvasHeight*U,$=b.pad.l*U,J=b.pad.b*U,X=b.layoutHeight*U,oe=b.layoutWidth*U,ie=b.deselectedLines.color,j=b.deselectedLines.opacity,ee=M.extendFlat({key:O,resolution:[he,G],viewBoxPos:[L+ue,z],viewBoxSize:[F,B],i0:h,i1:P,dim0A:W[0].slice(0,16),dim0B:W[0].slice(16,32),dim0C:W[0].slice(32,48),dim0D:W[0].slice(48,64),dim1A:W[1].slice(0,16),dim1B:W[1].slice(16,32),dim1C:W[1].slice(32,48),dim1D:W[1].slice(48,64),drwLayer:I,contextColor:[ie[0]/255,ie[1]/255,ie[2]/255,j!=="auto"?ie[3]*j:Math.max(1/255,Math.pow(1/b.lines.color.length,1/3))],scissorX:(m===p?0:L+ue)+($-ue)+oe*le.x[0],scissorWidth:(m===u?he-L+ue:F+.5)+(m===p?L+ue:0),scissorY:z+J+X*le.y[0],scissorHeight:B,viewportX:$-ue+oe*le.x[0],viewportY:J+X*le.y[0],viewportWidth:he,viewportHeight:G},N);return ee}function y(b){var p=t-1,u=Math.max(0,Math.floor(b[0]*p),0),m=Math.min(p,Math.ceil(b[1]*p),p);return[Math.min(u,m),Math.max(u,m)]}q.exports=function(b,p){var u=p.context,m=p.pick,h=p.regl,P=h._gl,L=P.getParameter(P.ALIASED_LINE_WIDTH_RANGE),z=Math.max(L[0],Math.min(L[1],p.viewModel.plotGlPixelRatio)),F={currentRafs:{},drawCompleted:!0,clearOnly:!1},B,O,I,N,U=S(h),W,Q=h.texture(a),ue=[];he(p);var le=h({profile:!1,blend:{enable:u,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:!u,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:h.prop("scissorX"),y:h.prop("scissorY"),width:h.prop("scissorWidth"),height:h.prop("scissorHeight")}},viewport:{x:h.prop("viewportX"),y:h.prop("viewportY"),width:h.prop("viewportWidth"),height:h.prop("viewportHeight")},dither:!1,vert:d,frag:x,primitive:"lines",lineWidth:z,attributes:U,uniforms:{resolution:h.prop("resolution"),viewBoxPos:h.prop("viewBoxPos"),viewBoxSize:h.prop("viewBoxSize"),dim0A:h.prop("dim0A"),dim1A:h.prop("dim1A"),dim0B:h.prop("dim0B"),dim1B:h.prop("dim1B"),dim0C:h.prop("dim0C"),dim1C:h.prop("dim1C"),dim0D:h.prop("dim0D"),dim1D:h.prop("dim1D"),loA:h.prop("loA"),hiA:h.prop("hiA"),loB:h.prop("loB"),hiB:h.prop("hiB"),loC:h.prop("loC"),hiC:h.prop("hiC"),loD:h.prop("loD"),hiD:h.prop("hiD"),palette:Q,contextColor:h.prop("contextColor"),maskTexture:h.prop("maskTexture"),drwLayer:h.prop("drwLayer"),maskHeight:h.prop("maskHeight")},offset:h.prop("offset"),count:h.prop("count")});function he(ie){B=ie.model,O=ie.viewModel,I=O.dimensions.slice(),N=I[0]?I[0].values.length:0;var j=B.lines,ee=m?j.color.map(function(ce,be){return be/j.color.length}):j.color,re=v(N,I,ee);w(U,N,re),!u&&!m&&(Q=h.texture(M.extendFlat({data:f(B.unitToColor,255)},a)))}function G(ie){var j,ee,re,ce=[[],[]];for(re=0;re<64;re++){var be=!ie&&re<I.length?I[re].brush.filter.getBounds():[-1/0,1/0];ce[0][re]=be[0],ce[1][re]=be[1]}var Ae=t*8,ze=new Array(Ae);for(j=0;j<Ae;j++)ze[j]=255;if(!ie)for(j=0;j<I.length;j++){var Re=j%8,Xe=(j-Re)/8,it=Math.pow(2,Re),ot=I[j],tt=ot.brush.filter.get();if(!(tt.length<2)){var lt=y(tt[0])[1];for(ee=1;ee<tt.length;ee++){var Ee=y(tt[ee]);for(re=lt+1;re<Ee[0];re++)ze[re*8+Xe]&=~it;lt=Math.max(lt,Ee[1])}}}var _e={shape:[8,t],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:ze};return W?W(_e):W=h.texture(_e),{maskTexture:W,maskHeight:t,loA:ce[0].slice(0,16),loB:ce[0].slice(16,32),loC:ce[0].slice(32,48),loD:ce[0].slice(48,64),hiA:ce[1].slice(0,16),hiB:ce[1].slice(16,32),hiC:ce[1].slice(32,48),hiD:ce[1].slice(48,64)}}function $(ie,j,ee){var re=ie.length,ce,be,Ae,ze=1/0,Re=-1/0;for(ce=0;ce<re;ce++)ie[ce].dim0.canvasX<ze&&(ze=ie[ce].dim0.canvasX,be=ce),ie[ce].dim1.canvasX>Re&&(Re=ie[ce].dim1.canvasX,Ae=ce);re===0&&n(h,0,0,B.canvasWidth,B.canvasHeight);var Xe=G(u);for(ce=0;ce<re;ce++){var it=ie[ce],ot=it.dim0.crossfilterDimensionIndex,tt=it.dim1.crossfilterDimensionIndex,lt=it.canvasX,Ee=it.canvasY,_e=lt+it.panelSizeX,fe=it.plotGlPixelRatio;if(j||!ue[ot]||ue[ot][0]!==lt||ue[ot][1]!==_e){ue[ot]=[lt,_e];var Fe=E(B,be,Ae,ce,ot,tt,lt,Ee,it.panelSizeX,it.panelSizeY,it.dim0.crossfilterDimensionIndex,u?0:m?2:1,Xe,fe);F.clearOnly=ee;var rt=j?B.lines.blockLineCount:N;s(h,le,F,rt,N,Fe)}}}function J(ie,j){return h.read({x:ie,y:j,width:1,height:1,data:o}),o}function X(ie,j,ee,re){var ce=new Uint8Array(4*ee*re);return h.read({x:ie,y:j,width:ee,height:re,data:ce}),ce}function oe(){b.style["pointer-events"]="none",Q.destroy(),W&&W.destroy();for(var ie in U)U[ie].destroy()}return{render:$,readPixel:J,readPixels:X,destroy:oe,update:he}}}}),eV=Ze({"src/traces/parcoords/parcoords.js"(Z,q){"use strict";var d=On(),x=ca(),A=x.isArrayOrTypedArray,M=x.numberFormat,e=($q(),nh(_6)).default,t=Wo(),r=x.strRotate,o=x.strTranslate,a=fu(),i=as(),n=rc(),s=Cv(),c=s.keyFun,f=s.repeat,g=s.unwrap,v=x6(),T=Tx(),l=m6(),_=Qq();function w(ue,le,he){return x.aggNums(ue,null,le,he)}function S(ue,le){return y(w(Math.min,ue,le),w(Math.max,ue,le))}function E(ue){var le=ue.range;return le?y(le[0],le[1]):S(ue.values,ue._length)}function y(ue,le){return(isNaN(ue)||!isFinite(ue))&&(ue=0),(isNaN(le)||!isFinite(le))&&(le=0),ue===le&&(ue===0?(ue-=1,le+=1):(ue*=.9,le*=1.1)),[ue,le]}function b(ue,le){return le?function(he,G){var $=le[G];return $??ue(he)}:ue}function p(ue,le,he,G,$){var J=E(he);return G?d.scale.ordinal().domain(G.map(b(M(he.tickformat),$))).range(G.map(function(X){var oe=(X-J[0])/(J[1]-J[0]);return ue-le+oe*(2*le-ue)})):d.scale.linear().domain(J).range([ue-le,le])}function u(ue,le){return d.scale.linear().range([le,ue-le])}function m(ue,le){return d.scale.linear().domain(E(ue)).range([le,1-le])}function h(ue){if(ue.tickvals){var le=E(ue);return d.scale.ordinal().domain(ue.tickvals).range(ue.tickvals.map(function(he){return(he-le[0])/(le[1]-le[0])}))}}function P(ue){var le=ue.map(function(J){return J[0]}),he=ue.map(function(J){var X=e(J[1]);return d.rgb("rgb("+X[0]+","+X[1]+","+X[2]+")")}),G=function(J){return function(X){return X[J]}},$="rgb".split("").map(function(J){return d.scale.linear().clamp(!0).domain(le).range(he.map(G(J)))});return function(J){return $.map(function(X){return X(J)})}}function L(ue){return ue.dimensions.some(function(le){return le.brush.filterSpecified})}function z(ue,le,he){var G=g(le),$=G.trace,J=v.convertTypedArray(G.lineColor),X=$.line,oe={color:e($.unselected.line.color),opacity:$.unselected.line.opacity},ie=n.extractOpts(X),j=ie.reversescale?n.flipScale(G.cscale):G.cscale,ee=$.domain,re=$.dimensions,ce=ue.width,be=$.labelangle,Ae=$.labelside,ze=$.labelfont,Re=$.tickfont,Xe=$.rangefont,it=x.extendDeepNoArrays({},X,{color:J.map(d.scale.linear().domain(E({values:J,range:[ie.min,ie.max],_length:$._length}))),blockLineCount:T.blockLineCount,canvasOverdrag:T.overdrag*T.canvasPixelRatio}),ot=Math.floor(ce*(ee.x[1]-ee.x[0])),tt=Math.floor(ue.height*(ee.y[1]-ee.y[0])),lt=ue.margin||{l:80,r:80,t:100,b:80},Ee=ot,_e=tt;return{key:he,colCount:re.filter(v.isVisible).length,dimensions:re,tickDistance:T.tickDistance,unitToColor:P(j),lines:it,deselectedLines:oe,labelAngle:be,labelSide:Ae,labelFont:ze,tickFont:Re,rangeFont:Xe,layoutWidth:ce,layoutHeight:ue.height,domain:ee,translateX:ee.x[0]*ce,translateY:ue.height-ee.y[1]*ue.height,pad:lt,canvasWidth:Ee*T.canvasPixelRatio+2*it.canvasOverdrag,canvasHeight:_e*T.canvasPixelRatio,width:Ee,height:_e,canvasPixelRatio:T.canvasPixelRatio}}function F(ue,le,he){var G=he.width,$=he.height,J=he.dimensions,X=he.canvasPixelRatio,oe=function(ce){return G*ce/Math.max(1,he.colCount-1)},ie=T.verticalPadding/$,j=u($,T.verticalPadding),ee={key:he.key,xScale:oe,model:he,inBrushDrag:!1},re={};return ee.dimensions=J.filter(v.isVisible).map(function(ce,be){var Ae=m(ce,ie),ze=re[ce.label];re[ce.label]=(ze||0)+1;var Re=ce.label+(ze?"__"+ze:""),Xe=ce.constraintrange,it=Xe&&Xe.length;it&&!A(Xe[0])&&(Xe=[Xe]);var ot=it?Xe.map(function(Lt){return Lt.map(Ae)}):[[-1/0,1/0]],tt=function(){var Lt=ee;Lt.focusLayer&&Lt.focusLayer.render(Lt.panels,!0);var kt=L(Lt);!ue.contextShown()&&kt?(Lt.contextLayer&&Lt.contextLayer.render(Lt.panels,!0),ue.contextShown(!0)):ue.contextShown()&&!kt&&(Lt.contextLayer&&Lt.contextLayer.render(Lt.panels,!0,!0),ue.contextShown(!1))},lt=ce.values;lt.length>ce._length&&(lt=lt.slice(0,ce._length));var Ee=ce.tickvals,_e;function fe(Lt,kt){return{val:Lt,text:_e[kt]}}function Fe(Lt,kt){return Lt.val-kt.val}if(A(Ee)&&Ee.length){x.isTypedArray(Ee)&&(Ee=Array.from(Ee)),_e=ce.ticktext,!A(_e)||!_e.length?_e=Ee.map(M(ce.tickformat)):_e.length>Ee.length?_e=_e.slice(0,Ee.length):Ee.length>_e.length&&(Ee=Ee.slice(0,_e.length));for(var rt=1;rt<Ee.length;rt++)if(Ee[rt]<Ee[rt-1]){for(var st=Ee.map(fe).sort(Fe),Qe=0;Qe<Ee.length;Qe++)Ee[Qe]=st[Qe].val,_e[Qe]=st[Qe].text;break}}else Ee=void 0;return lt=v.convertTypedArray(lt),{key:Re,label:ce.label,tickFormat:ce.tickformat,tickvals:Ee,ticktext:_e,ordinal:v.isOrdinal(ce),multiselect:ce.multiselect,xIndex:be,crossfilterDimensionIndex:be,visibleIndex:ce._index,height:$,values:lt,paddedUnitValues:lt.map(Ae),unitTickvals:Ee&&Ee.map(Ae),xScale:oe,x:oe(be),canvasX:oe(be)*X,unitToPaddedPx:j,domainScale:p($,T.verticalPadding,ce,Ee,_e),ordinalScale:h(ce),parent:ee,model:he,brush:l.makeBrush(ue,it,ot,function(){ue.linePickActive(!1)},tt,function(Lt){if(ee.focusLayer.render(ee.panels,!0),ee.pickLayer&&ee.pickLayer.render(ee.panels,!0),ue.linePickActive(!0),le&&le.filterChanged){var kt=Ae.invert,Vt=Lt.map(function(Zt){return Zt.map(kt).sort(x.sorterAsc)}).sort(function(Zt,Sr){return Zt[0]-Sr[0]});le.filterChanged(ee.key,ce._index,Vt)}})}}),ee}function B(ue){ue.classed(T.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function O(){var ue=!0,le=!1;return{linePickActive:function(he){return arguments.length?ue=!!he:ue},contextShown:function(he){return arguments.length?le=!!he:le}}}function I(ue,le){var he=le==="top"?1:-1,G=ue*Math.PI/180,$=Math.sin(G),J=Math.cos(G);return{dir:he,dx:$,dy:J,degrees:ue}}function N(ue,le,he){for(var G=le.panels||(le.panels=[]),$=ue.data(),J=0;J<$.length-1;J++){var X=G[J]||(G[J]={}),oe=$[J],ie=$[J+1];X.dim0=oe,X.dim1=ie,X.canvasX=oe.canvasX,X.panelSizeX=ie.canvasX-oe.canvasX,X.panelSizeY=le.model.canvasHeight,X.y=0,X.canvasY=0,X.plotGlPixelRatio=he}}function U(ue){for(var le=0;le<ue.length;le++)for(var he=0;he<ue[le].length;he++)for(var G=ue[le][he].trace,$=G.dimensions,J=0;J<$.length;J++){var X=$[J].values,oe=$[J]._ax;oe&&(oe.range?oe.range=y(oe.range[0],oe.range[1]):oe.range=S(X,G._length),oe.dtick||(oe.dtick=.01*(Math.abs(oe.range[1]-oe.range[0])||1)),oe.tickformat=$[J].tickformat,t.calcTicks(oe),oe.cleanRange())}}function W(ue,le){return t.tickText(ue._ax,le,!1).text}function Q(ue,le){if(ue.ordinal)return"";var he=ue.domainScale.domain(),G=he[le?he.length-1:0];return W(ue.model.dimensions[ue.visibleIndex],G)}q.exports=function(le,he,G,$){var J=le._context.staticPlot,X=le._fullLayout,oe=X._toppaper,ie=X._glcontainer,j=le._context.plotGlPixelRatio,ee=le._fullLayout.paper_bgcolor;U(he);var re=O(),ce=he.filter(function(Qe){return g(Qe).trace.visible}).map(z.bind(0,G)).map(F.bind(0,re,$));ie.each(function(Qe,Lt){return x.extendFlat(Qe,ce[Lt])});var be=ie.selectAll(".gl-canvas").each(function(Qe){Qe.viewModel=ce[0],Qe.viewModel.plotGlPixelRatio=j,Qe.viewModel.paperColor=ee,Qe.model=Qe.viewModel?Qe.viewModel.model:null}),Ae=null,ze=be.filter(function(Qe){return Qe.pick});ze.style("pointer-events",J?"none":"auto").on("mousemove",function(Qe){if(re.linePickActive()&&Qe.lineLayer&&$&&$.hover){var Lt=d.event,kt=this.width,Vt=this.height,Zt=d.mouse(this),Sr=Zt[0],xr=Zt[1];if(Sr<0||xr<0||Sr>=kt||xr>=Vt)return;var jr=Qe.lineLayer.readPixel(Sr,Vt-1-xr),wr=jr[3]!==0,Ir=wr?jr[2]+256*(jr[1]+256*jr[0]):null,bt={x:Sr,y:xr,clientX:Lt.clientX,clientY:Lt.clientY,dataIndex:Qe.model.key,curveNumber:Ir};Ir!==Ae&&(wr?$.hover(bt):$.unhover&&$.unhover(bt),Ae=Ir)}}),be.style("opacity",function(Qe){return Qe.pick?0:1}),oe.style("background","rgba(255, 255, 255, 0)");var Re=oe.selectAll("."+T.cn.parcoords).data(ce,c);Re.exit().remove(),Re.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Re.attr("transform",function(Qe){return o(Qe.model.translateX,Qe.model.translateY)});var Xe=Re.selectAll("."+T.cn.parcoordsControlView).data(f,c);Xe.enter().append("g").classed(T.cn.parcoordsControlView,!0),Xe.attr("transform",function(Qe){return o(Qe.model.pad.l,Qe.model.pad.t)});var it=Xe.selectAll("."+T.cn.yAxis).data(function(Qe){return Qe.dimensions},c);it.enter().append("g").classed(T.cn.yAxis,!0),Xe.each(function(Qe){N(it,Qe,j)}),be.each(function(Qe){if(Qe.viewModel){!Qe.lineLayer||$?Qe.lineLayer=_(this,Qe):Qe.lineLayer.update(Qe),(Qe.key||Qe.key===0)&&(Qe.viewModel[Qe.key]=Qe.lineLayer);var Lt=!Qe.context||$;Qe.lineLayer.render(Qe.viewModel.panels,Lt)}}),it.attr("transform",function(Qe){return o(Qe.xScale(Qe.xIndex),0)}),it.call(d.behavior.drag().origin(function(Qe){return Qe}).on("drag",function(Qe){var Lt=Qe.parent;re.linePickActive(!1),Qe.x=Math.max(-T.overdrag,Math.min(Qe.model.width+T.overdrag,d.event.x)),Qe.canvasX=Qe.x*Qe.model.canvasPixelRatio,it.sort(function(kt,Vt){return kt.x-Vt.x}).each(function(kt,Vt){kt.xIndex=Vt,kt.x=Qe===kt?kt.x:kt.xScale(kt.xIndex),kt.canvasX=kt.x*kt.model.canvasPixelRatio}),N(it,Lt,j),it.filter(function(kt){return Math.abs(Qe.xIndex-kt.xIndex)!==0}).attr("transform",function(kt){return o(kt.xScale(kt.xIndex),0)}),d.select(this).attr("transform",o(Qe.x,0)),it.each(function(kt,Vt,Zt){Zt===Qe.parent.key&&(Lt.dimensions[Vt]=kt)}),Lt.contextLayer&&Lt.contextLayer.render(Lt.panels,!1,!L(Lt)),Lt.focusLayer.render&&Lt.focusLayer.render(Lt.panels)}).on("dragend",function(Qe){var Lt=Qe.parent;Qe.x=Qe.xScale(Qe.xIndex),Qe.canvasX=Qe.x*Qe.model.canvasPixelRatio,N(it,Lt,j),d.select(this).attr("transform",function(kt){return o(kt.x,0)}),Lt.contextLayer&&Lt.contextLayer.render(Lt.panels,!1,!L(Lt)),Lt.focusLayer&&Lt.focusLayer.render(Lt.panels),Lt.pickLayer&&Lt.pickLayer.render(Lt.panels,!0),re.linePickActive(!0),$&&$.axesMoved&&$.axesMoved(Lt.key,Lt.dimensions.map(function(kt){return kt.crossfilterDimensionIndex}))})),it.exit().remove();var ot=it.selectAll("."+T.cn.axisOverlays).data(f,c);ot.enter().append("g").classed(T.cn.axisOverlays,!0),ot.selectAll("."+T.cn.axis).remove();var tt=ot.selectAll("."+T.cn.axis).data(f,c);tt.enter().append("g").classed(T.cn.axis,!0),tt.each(function(Qe){var Lt=Qe.model.height/Qe.model.tickDistance,kt=Qe.domainScale,Vt=kt.domain();d.select(this).call(d.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Lt,Qe.tickFormat).tickValues(Qe.ordinal?Vt:null).tickFormat(function(Zt){return v.isOrdinal(Qe)?Zt:W(Qe.model.dimensions[Qe.visibleIndex],Zt)}).scale(kt)),i.font(tt.selectAll("text"),Qe.model.tickFont)}),tt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),tt.selectAll("text").style("cursor","default");var lt=ot.selectAll("."+T.cn.axisHeading).data(f,c);lt.enter().append("g").classed(T.cn.axisHeading,!0);var Ee=lt.selectAll("."+T.cn.axisTitle).data(f,c);Ee.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",J?"none":"auto"),Ee.text(function(Qe){return Qe.label}).each(function(Qe){var Lt=d.select(this);i.font(Lt,Qe.model.labelFont),a.convertToTspans(Lt,le)}).attr("transform",function(Qe){var Lt=I(Qe.model.labelAngle,Qe.model.labelSide),kt=T.axisTitleOffset;return(Lt.dir>0?"":o(0,2*kt+Qe.model.height))+r(Lt.degrees)+o(-kt*Lt.dx,-kt*Lt.dy)}).attr("text-anchor",function(Qe){var Lt=I(Qe.model.labelAngle,Qe.model.labelSide),kt=Math.abs(Lt.dx),Vt=Math.abs(Lt.dy);return 2*kt>Vt?Lt.dir*Lt.dx<0?"start":"end":"middle"});var _e=ot.selectAll("."+T.cn.axisExtent).data(f,c);_e.enter().append("g").classed(T.cn.axisExtent,!0);var fe=_e.selectAll("."+T.cn.axisExtentTop).data(f,c);fe.enter().append("g").classed(T.cn.axisExtentTop,!0),fe.attr("transform",o(0,-T.axisExtentOffset));var Fe=fe.selectAll("."+T.cn.axisExtentTopText).data(f,c);Fe.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(B),Fe.text(function(Qe){return Q(Qe,!0)}).each(function(Qe){i.font(d.select(this),Qe.model.rangeFont)});var rt=_e.selectAll("."+T.cn.axisExtentBottom).data(f,c);rt.enter().append("g").classed(T.cn.axisExtentBottom,!0),rt.attr("transform",function(Qe){return o(0,Qe.model.height+T.axisExtentOffset)});var st=rt.selectAll("."+T.cn.axisExtentBottomText).data(f,c);st.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),st.text(function(Qe){return Q(Qe,!1)}).each(function(Qe){i.font(d.select(this),Qe.model.rangeFont)}),l.ensureAxisBrush(ot,ee,le)}}}),b6=Ze({"src/traces/parcoords/plot.js"(r,q){"use strict";var d=eV(),x=xT(),A=x6().isVisible,M={};function e(o,a,i){var n=a.indexOf(i),s=o.indexOf(n);return s===-1&&(s+=a.length),s}function t(o,a){return function(n,s){return e(o,a,n)-e(o,a,s)}}var r=q.exports=function(a,i){var n=a._fullLayout,s=x(a,[],M);if(s){var c={},f={},g={},v={},T=n._size;i.forEach(function(E,y){var b=E[0].trace;g[y]=b.index;var p=v[y]=b.index;c[y]=a.data[p].dimensions,f[y]=a.data[p].dimensions.slice()});var l=function(E,y,b){var p=f[E][y],u=b.map(function(F){return F.slice()}),m="dimensions["+y+"].constraintrange",h=n._tracePreGUI[a._fullData[g[E]]._fullInput.uid];if(h[m]===void 0){var P=p.constraintrange;h[m]=P||null}var L=a._fullData[g[E]].dimensions[y];u.length?(u.length===1&&(u=u[0]),p.constraintrange=u,L.constraintrange=u.slice(),u=[u]):(delete p.constraintrange,delete L.constraintrange,u=null);var z={};z[m]=u,a.emit("plotly_restyle",[z,[v[E]]])},_=function(E){a.emit("plotly_hover",E)},w=function(E){a.emit("plotly_unhover",E)},S=function(E,y){var b=t(y,f[E].filter(A));c[E].sort(b),f[E].filter(function(p){return!A(p)}).sort(function(p){return f[E].indexOf(p)}).forEach(function(p){c[E].splice(c[E].indexOf(p),1),c[E].splice(f[E].indexOf(p),0,p)}),a.emit("plotly_restyle",[{dimensions:[c[E]]},[v[E]]])};d(a,i,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:l,hover:_,unhover:w,axesMoved:S})}};r.reglPrecompiled=M}}),tV=Ze({"src/traces/parcoords/base_plot.js"(Z){"use strict";var q=On(),d=Hh().getModuleCalcData,x=b6(),A=vd();Z.name="parcoords",Z.plot=function(M){var e=d(M.calcdata,"parcoords")[0];e.length&&x(M,e)},Z.clean=function(M,e,t,r){var o=r._has&&r._has("parcoords"),a=e._has&&e._has("parcoords");o&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},Z.toSVG=function(M){var e=M._fullLayout._glimages,t=q.select(M).selectAll(".svg-container"),r=t.filter(function(a,i){return i===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function o(){var a=this,i=a.toDataURL("image/png"),n=e.append("svg:image");n.attr({xmlns:A.svg,"xlink:href":i,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(o),window.setTimeout(function(){q.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),rV=Ze({"src/traces/parcoords/base_index.js"(Z,q){"use strict";q.exports={attributes:v6(),supplyDefaults:Wq(),calc:Xq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:tV(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),aV=Ze({"src/traces/parcoords/index.js"(Z,q){"use strict";var d=rV();d.plot=b6(),q.exports=d}}),iV=Ze({"lib/parcoords.js"(Z,q){"use strict";q.exports=aV()}}),w6=Ze({"src/traces/parcats/attributes.js"(Z,q){"use strict";var d=rs().extendFlat,x=eu(),A=tc(),M=Mu(),e=Cs().hovertemplateAttrs,t=bc().attributes,r=d({editType:"calc"},M("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});q.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:d({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:e({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:A({editType:"calc"}),tickfont:A({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:r,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}}}),nV=Ze({"src/traces/parcats/defaults.js"(Z,q){"use strict";var d=ca(),x=bp().hasColorscale,A=gh(),M=bc().defaults,e=fp(),t=w6(),r=bT(),o=xp().isTypedArraySpec;function a(n,s,c,f,g){g("line.shape"),g("line.hovertemplate");var v=g("line.color",f.colorway[0]);if(x(n,"line")&&d.isArrayOrTypedArray(v)){if(v.length)return g("line.colorscale"),A(n,s,f,g,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=c}return 1/0}function i(n,s){function c(w,S){return d.coerce(n,s,t.dimensions,w,S)}var f=c("values"),g=c("visible");if(f&&f.length||(g=s.visible=!1),g){c("label"),c("displayindex",s._index);var v=n.categoryarray,T=d.isArrayOrTypedArray(v)&&v.length>0||o(v),l;T&&(l="array");var _=c("categoryorder",l);_==="array"?(c("categoryarray"),c("ticktext")):(delete n.categoryarray,delete n.ticktext),!T&&_==="array"&&(s.categoryorder="trace")}}q.exports=function(s,c,f,g){function v(w,S){return d.coerce(s,c,t,w,S)}var T=e(s,c,{name:"dimensions",handleItemDefaults:i}),l=a(s,c,f,g,v);M(c,g,v),(!Array.isArray(T)||!T.length)&&(c.visible=!1),r(c,T,"values",l),v("hoveron"),v("hovertemplate"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var _=g.font;d.coerceFont(v,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),d.coerceFont(v,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),oV=Ze({"src/traces/parcats/calc.js"(Z,q){"use strict";var d=Cv().wrap,x=bp().hasColorscale,A=wp(),M=r5(),e=as(),t=ca(),r=ns();q.exports=function(_,w){var S=t.filterVisible(w.dimensions);if(S.length===0)return[];var E=S.map(function(G){var $;if(G.categoryorder==="trace")$=null;else if(G.categoryorder==="array")$=G.categoryarray;else{$=M(G.values);for(var J=!0,X=0;X<$.length;X++)if(!r($[X])){J=!1;break}$.sort(J?t.sorterAsc:void 0),G.categoryorder==="category descending"&&($=$.reverse())}return f(G.values,$)}),y,b,p;t.isArrayOrTypedArray(w.counts)?y=w.counts:y=[w.counts],g(S),S.forEach(function(G,$){v(G,E[$])});var u=w.line,m;u?(x(w,"line")&&A(_,w,{vals:w.line.color,containerStr:"line",cLetter:"c"}),m=e.tryColorscale(u)):m=t.identity;function h(G){var $,J;return t.isArrayOrTypedArray(u.color)?($=u.color[G%u.color.length],J=$):$=u.color,{color:m($),rawColor:J}}var P=S[0].values.length,L={},z=E.map(function(G){return G.inds});p=0;var F,B;for(F=0;F<P;F++){var O=[];for(B=0;B<z.length;B++)O.push(z[B][F]);b=y[F%y.length],p+=b;var I=h(F),N=O+"-"+I.rawColor;L[N]===void 0&&(L[N]=s(O,I.color,I.rawColor)),c(L[N],F,b)}var U=S.map(function(G,$){return a($,G._index,G._displayindex,G.label,p)});for(F=0;F<P;F++)for(b=y[F%y.length],B=0;B<U.length;B++){var W=U[B].containerInd,Q=E[B].inds[F],ue=U[B].categories;if(ue[Q]===void 0){var le=w.dimensions[W]._categoryarray[Q],he=w.dimensions[W]._ticktext[Q];ue[Q]=i(B,Q,le,he)}n(ue[Q],F,b)}return d(o(U,L,p))};function o(l,_,w){var S=l.map(function(E){return E.categories.length}).reduce(function(E,y){return Math.max(E,y)});return{dimensions:l,paths:_,trace:void 0,maxCats:S,count:w}}function a(l,_,w,S,E){return{dimensionInd:l,containerInd:_,displayInd:w,dimensionLabel:S,count:E,categories:[],dragX:null}}function i(l,_,w,S){return{dimensionInd:l,categoryInd:_,categoryValue:w,displayInd:_,categoryLabel:S,valueInds:[],count:0,dragY:null}}function n(l,_,w){l.valueInds.push(_),l.count+=w}function s(l,_,w){return{categoryInds:l,color:_,rawColor:w,valueInds:[],count:0}}function c(l,_,w){l.valueInds.push(_),l.count+=w}function f(l,_){_==null?_=[]:_=_.map(function(m){return m});var w={},S={},E=[];_.forEach(function(m,h){w[m]=0,S[m]=h});for(var y=0;y<l.length;y++){var b=l[y],p;w[b]===void 0?(w[b]=1,p=_.push(b)-1,S[b]=p):(w[b]++,p=S[b]),E.push(p)}var u=_.map(function(m){return w[m]});return{uniqueValues:_,uniqueCounts:u,inds:E}}function g(l){var _=l.map(function(S){return S.displayindex}),w;if(T(_))for(w=0;w<l.length;w++)l[w]._displayindex=l[w].displayindex;else for(w=0;w<l.length;w++)l[w]._displayindex=w}function v(l,_){l._categoryarray=_.uniqueValues,l.ticktext===null||l.ticktext===void 0?l._ticktext=[]:l._ticktext=l.ticktext.slice();for(var w=l._ticktext.length;w<_.uniqueValues.length;w++)l._ticktext.push(_.uniqueValues[w])}function T(l){for(var _=new Array(l.length),w=0;w<l.length;w++){if(l[w]<0||l[w]>=l.length||_[l[w]]!==void 0)return!1;_[l[w]]=!0}return!0}}}),sV=Ze({"src/traces/parcats/parcats.js"(Z,q){"use strict";var d=On(),x=(hg(),nh(f0)).interpolateNumber,A=C2(),M=ef(),e=ca(),t=e.strTranslate,r=as(),o=Ch(),a=fu();function i(X,oe,ie,j){var ee=oe._context.staticPlot,re=X.map(le.bind(0,oe,ie)),ce=j.selectAll("g.parcatslayer").data([null]);ce.enter().append("g").attr("class","parcatslayer").style("pointer-events",ee?"none":"all");var be=ce.selectAll("g.trace.parcats").data(re,n),Ae=be.enter().append("g").attr("class","trace parcats");be.attr("transform",function(fe){return t(fe.x,fe.y)}),Ae.append("g").attr("class","paths");var ze=be.select("g.paths"),Re=ze.selectAll("path.path").data(function(fe){return fe.paths},n);Re.attr("fill",function(fe){return fe.model.color});var Xe=Re.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(fe){return fe.model.color}).attr("fill-opacity",0);_(Xe),Re.attr("d",function(fe){return fe.svgD}),Xe.empty()||Re.sort(c),Re.exit().remove(),Re.on("mouseover",f).on("mouseout",g).on("click",l),Ae.append("g").attr("class","dimensions");var it=be.select("g.dimensions"),ot=it.selectAll("g.dimension").data(function(fe){return fe.dimensions},n);ot.enter().append("g").attr("class","dimension"),ot.attr("transform",function(fe){return t(fe.x,0)}),ot.exit().remove();var tt=ot.selectAll("g.category").data(function(fe){return fe.categories},n),lt=tt.enter().append("g").attr("class","category");tt.attr("transform",function(fe){return t(0,fe.y)}),lt.append("rect").attr("class","catrect").attr("pointer-events","none"),tt.select("rect.catrect").attr("fill","none").attr("width",function(fe){return fe.width}).attr("height",function(fe){return fe.height}),E(lt);var Ee=tt.selectAll("rect.bandrect").data(function(fe){return fe.bands},n);Ee.each(function(){e.raiseToTop(this)}),Ee.attr("fill",function(fe){return fe.color});var _e=Ee.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(fe){return fe.color}).attr("fill-opacity",0);Ee.attr("fill",function(fe){return fe.color}).attr("width",function(fe){return fe.width}).attr("height",function(fe){return fe.height}).attr("y",function(fe){return fe.y}).attr("cursor",function(fe){return fe.parcatsViewModel.arrangement==="fixed"?"default":fe.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),b(_e),Ee.exit().remove(),lt.append("text").attr("class","catlabel").attr("pointer-events","none"),tt.select("text.catlabel").attr("text-anchor",function(fe){return s(fe)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(fe){return s(fe)?fe.width+5:-5}).attr("y",function(fe){return fe.height/2}).text(function(fe){return fe.model.categoryLabel}).each(function(fe){r.font(d.select(this),fe.parcatsViewModel.categorylabelfont),a.convertToTspans(d.select(this),oe)}),lt.append("text").attr("class","dimlabel"),tt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(fe){return fe.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(fe){return fe.width/2}).attr("y",-5).text(function(fe,Fe){return Fe===0?fe.parcatsViewModel.model.dimensions[fe.model.dimensionInd].dimensionLabel:null}).each(function(fe){r.font(d.select(this),fe.parcatsViewModel.labelfont)}),tt.selectAll("rect.bandrect").on("mouseover",B).on("mouseout",O),tt.exit().remove(),ot.call(d.behavior.drag().origin(function(fe){return{x:fe.x,y:0}}).on("dragstart",I).on("drag",N).on("dragend",U)),be.each(function(fe){fe.traceSelection=d.select(this),fe.pathSelection=d.select(this).selectAll("g.paths").selectAll("path.path"),fe.dimensionSelection=d.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),be.exit().remove()}q.exports=function(X,oe,ie,j){i(ie,X,j,oe)};function n(X){return X.key}function s(X){var oe=X.parcatsViewModel.dimensions.length,ie=X.parcatsViewModel.dimensions[oe-1].model.dimensionInd;return X.model.dimensionInd===ie}function c(X,oe){return X.model.rawColor>oe.model.rawColor?1:X.model.rawColor<oe.model.rawColor?-1:0}function f(X){if(!X.parcatsViewModel.dragDimension&&X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),w(d.select(this));var oe=v(X),ie=T(X);if(X.parcatsViewModel.graphDiv.emit("plotly_hover",{points:oe,event:d.event,constraints:ie}),X.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var j=d.mouse(this)[0],ee=X.parcatsViewModel.graphDiv,re=X.parcatsViewModel.trace,ce=ee._fullLayout,be=ce._paperdiv.node().getBoundingClientRect(),Ae=X.parcatsViewModel.graphDiv.getBoundingClientRect(),ze,Re,Xe;for(Xe=0;Xe<X.leftXs.length-1;Xe++)if(X.leftXs[Xe]+X.dimWidths[Xe]-2<=j&&j<=X.leftXs[Xe+1]+2){var it=X.parcatsViewModel.dimensions[Xe],ot=X.parcatsViewModel.dimensions[Xe+1];ze=(it.x+it.width+ot.x)/2,Re=(X.topYs[Xe]+X.topYs[Xe+1]+X.height)/2;break}var tt=X.parcatsViewModel.x+ze,lt=X.parcatsViewModel.y+Re,Ee=o.mostReadable(X.model.color,["black","white"]),_e=X.model.count,fe=_e/X.parcatsViewModel.model.count,Fe={countLabel:_e,probabilityLabel:fe.toFixed(3)},rt=[];X.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&rt.push(["Count:",Fe.countLabel].join(" ")),X.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&rt.push(["P:",Fe.probabilityLabel].join(" "));var st=rt.join("<br>"),Qe=d.mouse(ee)[0];M.loneHover({trace:re,x:tt-be.left+Ae.left,y:lt-be.top+Ae.top,text:st,color:X.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ee,idealAlign:Qe<tt?"right":"left",hovertemplate:(re.line||{}).hovertemplate,hovertemplateLabels:Fe,eventData:[{data:re._input,fullData:re,count:_e,probability:fe}]},{container:ce._hoverlayer.node(),outerContainer:ce._paper.node(),gd:ee})}}}function g(X){if(!X.parcatsViewModel.dragDimension&&(_(d.select(this)),M.loneUnhover(X.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),X.parcatsViewModel.pathSelection.sort(c),X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var oe=v(X),ie=T(X);X.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:oe,event:d.event,constraints:ie})}}function v(X){for(var oe=[],ie=W(X.parcatsViewModel),j=0;j<X.model.valueInds.length;j++){var ee=X.model.valueInds[j];oe.push({curveNumber:ie,pointNumber:ee})}return oe}function T(X){for(var oe={},ie=X.parcatsViewModel.model.dimensions,j=0;j<ie.length;j++){var ee=ie[j],re=ee.categories[X.model.categoryInds[j]];oe[ee.containerInd]=re.categoryValue}return X.model.rawColor!==void 0&&(oe.color=X.model.rawColor),oe}function l(X){if(X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var oe=v(X),ie=T(X);X.parcatsViewModel.graphDiv.emit("plotly_click",{points:oe,event:d.event,constraints:ie})}}function _(X){X.attr("fill",function(oe){return oe.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function w(X){X.attr("fill-opacity",.8).attr("stroke",function(oe){return o.mostReadable(oe.model.color,["black","white"])}).attr("stroke-width",.3)}function S(X){X.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function E(X){X.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function y(X){X.attr("stroke","black").attr("stroke-width",1.5)}function b(X){X.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function p(X){var oe=X.parcatsViewModel.pathSelection,ie=X.categoryViewModel.model.dimensionInd,j=X.categoryViewModel.model.categoryInd;return oe.filter(function(ee){return ee.model.categoryInds[ie]===j&&ee.model.color===X.color})}function u(X){var oe=d.select(X.parentNode).selectAll("rect.bandrect");oe.each(function(ie){var j=p(ie);w(j),j.each(function(){e.raiseToTop(this)})}),S(d.select(X.parentNode))}function m(X){var oe=d.select(X).datum(),ie=p(oe);w(ie),ie.each(function(){e.raiseToTop(this)}),d.select(X.parentNode).selectAll("rect.bandrect").filter(function(j){return j.color===oe.color}).each(function(){e.raiseToTop(this),y(d.select(this))})}function h(X,oe,ie){var j=d.select(X).datum(),ee=j.categoryViewModel.model,re=j.parcatsViewModel.graphDiv,ce=d.select(X.parentNode).selectAll("rect.bandrect"),be=[];ce.each(function(ze){var Re=p(ze);Re.each(function(Xe){Array.prototype.push.apply(be,v(Xe))})});var Ae={};Ae[ee.dimensionInd]=ee.categoryValue,re.emit(oe,{points:be,event:ie,constraints:Ae})}function P(X,oe,ie){var j=d.select(X).datum(),ee=j.categoryViewModel.model,re=j.parcatsViewModel.graphDiv,ce=p(j),be=[];ce.each(function(ze){Array.prototype.push.apply(be,v(ze))});var Ae={};Ae[ee.dimensionInd]=ee.categoryValue,j.rawColor!==void 0&&(Ae.color=j.rawColor),re.emit(oe,{points:be,event:ie,constraints:Ae})}function L(X,oe,ie){X._fullLayout._calcInverseTransform(X);var j=X._fullLayout._invScaleX,ee=X._fullLayout._invScaleY,re=d.select(ie.parentNode).select("rect.catrect"),ce=re.node().getBoundingClientRect(),be=re.datum(),Ae=be.parcatsViewModel,ze=Ae.model.dimensions[be.model.dimensionInd],Re=Ae.trace,Xe=ce.top+ce.height/2,it,ot;Ae.dimensions.length>1&&ze.displayInd===Ae.dimensions.length-1?(it=ce.left,ot="left"):(it=ce.left+ce.width,ot="right");var tt=be.model.count,lt=be.model.categoryLabel,Ee=tt/be.parcatsViewModel.model.count,_e={countLabel:tt,categoryLabel:lt,probabilityLabel:Ee.toFixed(3)},fe=[];be.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&fe.push(["Count:",_e.countLabel].join(" ")),be.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&fe.push(["P("+_e.categoryLabel+"):",_e.probabilityLabel].join(" "));var Fe=fe.join("<br>");return{trace:Re,x:j*(it-oe.left),y:ee*(Xe-oe.top),text:Fe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ot,hovertemplate:Re.hovertemplate,hovertemplateLabels:_e,eventData:[{data:Re._input,fullData:Re,count:tt,category:lt,probability:Ee}]}}function z(X,oe,ie){var j=[];return d.select(ie.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ee=this;j.push(L(X,oe,ee))}),j}function F(X,oe,ie){X._fullLayout._calcInverseTransform(X);var j=X._fullLayout._invScaleX,ee=X._fullLayout._invScaleY,re=ie.getBoundingClientRect(),ce=d.select(ie).datum(),be=ce.categoryViewModel,Ae=be.parcatsViewModel,ze=Ae.model.dimensions[be.model.dimensionInd],Re=Ae.trace,Xe=re.y+re.height/2,it,ot;Ae.dimensions.length>1&&ze.displayInd===Ae.dimensions.length-1?(it=re.left,ot="left"):(it=re.left+re.width,ot="right");var tt=be.model.categoryLabel,lt=ce.parcatsViewModel.model.count,Ee=0;ce.categoryViewModel.bands.forEach(function(Zt){Zt.color===ce.color&&(Ee+=Zt.count)});var _e=be.model.count,fe=0;Ae.pathSelection.each(function(Zt){Zt.model.color===ce.color&&(fe+=Zt.model.count)});var Fe=Ee/lt,rt=Ee/fe,st=Ee/_e,Qe={countLabel:Ee,categoryLabel:tt,probabilityLabel:Fe.toFixed(3)},Lt=[];be.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Lt.push(["Count:",Qe.countLabel].join(" ")),be.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Lt.push("P(color \u2229 "+tt+"): "+Qe.probabilityLabel),Lt.push("P("+tt+" | color): "+rt.toFixed(3)),Lt.push("P(color | "+tt+"): "+st.toFixed(3)));var kt=Lt.join("<br>"),Vt=o.mostReadable(ce.color,["black","white"]);return{trace:Re,x:j*(it-oe.left),y:ee*(Xe-oe.top),text:kt,color:ce.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Vt,fontSize:10,idealAlign:ot,hovertemplate:Re.hovertemplate,hovertemplateLabels:Qe,eventData:[{data:Re._input,fullData:Re,category:tt,count:lt,probability:Fe,categorycount:_e,colorcount:fe,bandcolorcount:Ee}]}}function B(X){if(!X.parcatsViewModel.dragDimension&&X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var oe=d.mouse(this)[1];if(oe<-1)return;var ie=X.parcatsViewModel.graphDiv,j=ie._fullLayout,ee=j._paperdiv.node().getBoundingClientRect(),re=X.parcatsViewModel.hoveron,ce=this;if(re==="color"?(m(ce),P(ce,"plotly_hover",d.event)):(u(ce),h(ce,"plotly_hover",d.event)),X.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var be;re==="category"?be=L(ie,ee,ce):re==="color"?be=F(ie,ee,ce):re==="dimension"&&(be=z(ie,ee,ce)),be&&M.loneHover(be,{container:j._hoverlayer.node(),outerContainer:j._paper.node(),gd:ie})}}}function O(X){var oe=X.parcatsViewModel;if(!oe.dragDimension&&(_(oe.pathSelection),E(oe.dimensionSelection.selectAll("g.category")),b(oe.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),M.loneUnhover(oe.graphDiv._fullLayout._hoverlayer.node()),oe.pathSelection.sort(c),oe.hoverinfoItems.indexOf("skip")===-1)){var ie=X.parcatsViewModel.hoveron,j=this;ie==="color"?P(j,"plotly_unhover",d.event):h(j,"plotly_unhover",d.event)}}function I(X){X.parcatsViewModel.arrangement!=="fixed"&&(X.dragDimensionDisplayInd=X.model.displayInd,X.initialDragDimensionDisplayInds=X.parcatsViewModel.model.dimensions.map(function(oe){return oe.displayInd}),X.dragHasMoved=!1,X.dragCategoryDisplayInd=null,d.select(this).selectAll("g.category").select("rect.catrect").each(function(oe){var ie=d.mouse(this)[0],j=d.mouse(this)[1];-2<=ie&&ie<=oe.width+2&&-2<=j&&j<=oe.height+2&&(X.dragCategoryDisplayInd=oe.model.displayInd,X.initialDragCategoryDisplayInds=X.model.categories.map(function(ee){return ee.displayInd}),oe.model.dragY=oe.y,e.raiseToTop(this.parentNode),d.select(this.parentNode).selectAll("rect.bandrect").each(function(ee){ee.y<j&&j<=ee.y+ee.height&&(X.potentialClickBand=this)}))}),X.parcatsViewModel.dragDimension=X,M.loneUnhover(X.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function N(X){if(X.parcatsViewModel.arrangement!=="fixed"&&(X.dragHasMoved=!0,X.dragDimensionDisplayInd!==null)){var oe=X.dragDimensionDisplayInd,ie=oe-1,j=oe+1,ee=X.parcatsViewModel.dimensions[oe];if(X.dragCategoryDisplayInd!==null){var re=ee.categories[X.dragCategoryDisplayInd];re.model.dragY+=d.event.dy;var ce=re.model.dragY,be=re.model.displayInd,Ae=ee.categories,ze=Ae[be-1],Re=Ae[be+1];ze!==void 0&&ce<ze.y+ze.height/2&&(re.model.displayInd=ze.model.displayInd,ze.model.displayInd=be),Re!==void 0&&ce+re.height>Re.y+Re.height/2&&(re.model.displayInd=Re.model.displayInd,Re.model.displayInd=be),X.dragCategoryDisplayInd=re.model.displayInd}if(X.dragCategoryDisplayInd===null||X.parcatsViewModel.arrangement==="freeform"){ee.model.dragX=d.event.x;var Xe=X.parcatsViewModel.dimensions[ie],it=X.parcatsViewModel.dimensions[j];Xe!==void 0&&ee.model.dragX<Xe.x+Xe.width&&(ee.model.displayInd=Xe.model.displayInd,Xe.model.displayInd=oe),it!==void 0&&ee.model.dragX+ee.width>it.x&&(ee.model.displayInd=it.model.displayInd,it.model.displayInd=X.dragDimensionDisplayInd),X.dragDimensionDisplayInd=ee.model.displayInd}$(X.parcatsViewModel),G(X.parcatsViewModel),ue(X.parcatsViewModel),Q(X.parcatsViewModel)}}function U(X){if(X.parcatsViewModel.arrangement!=="fixed"&&X.dragDimensionDisplayInd!==null){d.select(this).selectAll("text").attr("font-weight","normal");var oe={},ie=W(X.parcatsViewModel),j=X.parcatsViewModel.model.dimensions.map(function(it){return it.displayInd}),ee=X.initialDragDimensionDisplayInds.some(function(it,ot){return it!==j[ot]});ee&&j.forEach(function(it,ot){var tt=X.parcatsViewModel.model.dimensions[ot].containerInd;oe["dimensions["+tt+"].displayindex"]=it});var re=!1;if(X.dragCategoryDisplayInd!==null){var ce=X.model.categories.map(function(it){return it.displayInd});if(re=X.initialDragCategoryDisplayInds.some(function(it,ot){return it!==ce[ot]}),re){var be=X.model.categories.slice().sort(function(it,ot){return it.displayInd-ot.displayInd}),Ae=be.map(function(it){return it.categoryValue}),ze=be.map(function(it){return it.categoryLabel});oe["dimensions["+X.model.containerInd+"].categoryarray"]=[Ae],oe["dimensions["+X.model.containerInd+"].ticktext"]=[ze],oe["dimensions["+X.model.containerInd+"].categoryorder"]="array"}}if(X.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!X.dragHasMoved&&X.potentialClickBand&&(X.parcatsViewModel.hoveron==="color"?P(X.potentialClickBand,"plotly_click",d.event.sourceEvent):h(X.potentialClickBand,"plotly_click",d.event.sourceEvent)),X.model.dragX=null,X.dragCategoryDisplayInd!==null){var Re=X.parcatsViewModel.dimensions[X.dragDimensionDisplayInd].categories[X.dragCategoryDisplayInd];Re.model.dragY=null,X.dragCategoryDisplayInd=null}X.dragDimensionDisplayInd=null,X.parcatsViewModel.dragDimension=null,X.dragHasMoved=null,X.potentialClickBand=null,$(X.parcatsViewModel),G(X.parcatsViewModel);var Xe=d.transition().duration(300).ease("cubic-in-out");Xe.each(function(){ue(X.parcatsViewModel,!0),Q(X.parcatsViewModel,!0)}).each("end",function(){(ee||re)&&A.restyle(X.parcatsViewModel.graphDiv,oe,[ie])})}}function W(X){for(var oe,ie=X.graphDiv._fullData,j=0;j<ie.length;j++)if(X.key===ie[j].uid){oe=j;break}return oe}function Q(X,oe){oe===void 0&&(oe=!1);function ie(j){return oe?j.transition():j}X.pathSelection.data(function(j){return j.paths},n),ie(X.pathSelection).attr("d",function(j){return j.svgD})}function ue(X,oe){oe===void 0&&(oe=!1);function ie(Ae){return oe?Ae.transition():Ae}X.dimensionSelection.data(function(Ae){return Ae.dimensions},n);var j=X.dimensionSelection.selectAll("g.category").data(function(Ae){return Ae.categories},n);ie(X.dimensionSelection).attr("transform",function(Ae){return t(Ae.x,0)}),ie(j).attr("transform",function(Ae){return t(0,Ae.y)});var ee=j.select(".dimlabel");ee.text(function(Ae,ze){return ze===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null});var re=j.select(".catlabel");re.attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).each(function(Ae){var ze,Re;s(Ae)?(ze=Ae.width+5,Re="start"):(ze=-5,Re="end"),d.select(this).selectAll("tspan").attr("x",ze).attr("text-anchor",Re)});var ce=j.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},n),be=ce.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ce.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}),b(be),ce.each(function(){e.raiseToTop(this)}),ce.exit().remove()}function le(X,oe,ie){var j=ie[0],ee=oe.margin||{l:80,r:80,t:100,b:80},re=j.trace,ce=re.domain,be=oe.width,Ae=oe.height,ze=Math.floor(be*(ce.x[1]-ce.x[0])),Re=Math.floor(Ae*(ce.y[1]-ce.y[0])),Xe=ce.x[0]*be+ee.l,it=oe.height-ce.y[1]*oe.height+ee.t,ot=re.line.shape,tt;re.hoverinfo==="all"?tt=["count","probability"]:tt=(re.hoverinfo||"").split("+");var lt={trace:re,key:re.uid,model:j,x:Xe,y:it,width:ze,height:Re,hoveron:re.hoveron,hoverinfoItems:tt,arrangement:re.arrangement,bundlecolors:re.bundlecolors,sortpaths:re.sortpaths,labelfont:re.labelfont,categorylabelfont:re.tickfont,pathShape:ot,dragDimension:null,margin:ee,paths:[],dimensions:[],graphDiv:X,traceSelection:null,pathSelection:null,dimensionSelection:null};return j.dimensions&&($(lt),G(lt)),lt}function he(X,oe,ie,j,ee){var re=[],ce=[],be,Ae;for(Ae=0;Ae<ie.length-1;Ae++)be=x(ie[Ae]+X[Ae],X[Ae+1]),re.push(be(ee)),ce.push(be(1-ee));var ze="M "+X[0]+","+oe[0];for(ze+="l"+ie[0]+",0 ",Ae=1;Ae<ie.length;Ae++)ze+="C"+re[Ae-1]+","+oe[Ae-1]+" "+ce[Ae-1]+","+oe[Ae]+" "+X[Ae]+","+oe[Ae],ze+="l"+ie[Ae]+",0 ";for(ze+="l0,"+j+" ",ze+="l -"+ie[ie.length-1]+",0 ",Ae=ie.length-2;Ae>=0;Ae--)ze+="C"+ce[Ae]+","+(oe[Ae+1]+j)+" "+re[Ae]+","+(oe[Ae]+j)+" "+(X[Ae]+ie[Ae])+","+(oe[Ae]+j),ze+="l-"+ie[Ae]+",0 ";return ze+="Z",ze}function G(X){var oe=X.dimensions,ie=X.model,j=oe.map(function(jr){return jr.categories.map(function(wr){return wr.y})}),ee=X.model.dimensions.map(function(jr){return jr.categories.map(function(wr){return wr.displayInd})}),re=X.model.dimensions.map(function(jr){return jr.displayInd}),ce=X.dimensions.map(function(jr){return jr.model.dimensionInd}),be=oe.map(function(jr){return jr.x}),Ae=oe.map(function(jr){return jr.width}),ze=[];for(var Re in ie.paths)ie.paths.hasOwnProperty(Re)&&ze.push(ie.paths[Re]);function Xe(jr){var wr=jr.categoryInds.map(function(bt,Be){return ee[Be][bt]}),Ir=ce.map(function(bt){return wr[bt]});return Ir}ze.sort(function(jr,wr){var Ir=Xe(jr),bt=Xe(wr);return X.sortpaths==="backward"&&(Ir.reverse(),bt.reverse()),Ir.push(jr.valueInds[0]),bt.push(wr.valueInds[0]),X.bundlecolors&&(Ir.unshift(jr.rawColor),bt.unshift(wr.rawColor)),Ir<bt?-1:Ir>bt?1:0});for(var it=new Array(ze.length),ot=oe[0].model.count,tt=oe[0].categories.map(function(jr){return jr.height}).reduce(function(jr,wr){return jr+wr}),lt=0;lt<ze.length;lt++){var Ee=ze[lt],_e;ot>0?_e=tt*(Ee.count/ot):_e=0;for(var fe=new Array(j.length),Fe=0;Fe<Ee.categoryInds.length;Fe++){var rt=Ee.categoryInds[Fe],st=ee[Fe][rt],Qe=re[Fe];fe[Qe]=j[Qe][st],j[Qe][st]+=_e;var Lt=X.dimensions[Qe].categories[st],kt=Lt.bands.length,Vt=Lt.bands[kt-1];if(Vt===void 0||Ee.rawColor!==Vt.rawColor){var Zt=Vt===void 0?0:Vt.y+Vt.height;Lt.bands.push({key:Zt,color:Ee.color,rawColor:Ee.rawColor,height:_e,width:Lt.width,count:Ee.count,y:Zt,categoryViewModel:Lt,parcatsViewModel:X})}else{var Sr=Lt.bands[kt-1];Sr.height+=_e,Sr.count+=Ee.count}}var xr;X.pathShape==="hspline"?xr=he(be,fe,Ae,_e,.5):xr=he(be,fe,Ae,_e,0),it[lt]={key:Ee.valueInds[0],model:Ee,height:_e,leftXs:be,topYs:fe,dimWidths:Ae,svgD:xr,parcatsViewModel:X}}X.paths=it}function $(X){var oe=X.model.dimensions.map(function(ce){return{displayInd:ce.displayInd,dimensionInd:ce.dimensionInd}});oe.sort(function(ce,be){return ce.displayInd-be.displayInd});var ie=[];for(var j in oe){var ee=oe[j].dimensionInd,re=X.model.dimensions[ee];ie.push(J(X,re))}X.dimensions=ie}function J(X,oe){var ie=40,j=16,ee=X.model.dimensions.length,re=oe.displayInd,ce,be,Ae;ee>1?ce=(X.width-2*ie-j)/(ee-1):ce=0,be=ie,Ae=be+ce*re;var ze=[],Re=X.model.maxCats,Xe=oe.categories.length,it=8,ot=oe.count,tt=X.height-it*(Re-1),lt,Ee,_e,fe,Fe,rt=(Re-Xe)*it/2,st=oe.categories.map(function(Qe){return{displayInd:Qe.displayInd,categoryInd:Qe.categoryInd}});for(st.sort(function(Qe,Lt){return Qe.displayInd-Lt.displayInd}),Fe=0;Fe<Xe;Fe++)fe=st[Fe].categoryInd,Ee=oe.categories[fe],ot>0?lt=Ee.count/ot*tt:lt=0,_e={key:Ee.valueInds[0],model:Ee,width:j,height:lt,y:Ee.dragY!==null?Ee.dragY:rt,bands:[],parcatsViewModel:X},rt=rt+lt+it,ze.push(_e);return{key:oe.dimensionInd,x:oe.dragX!==null?oe.dragX:Ae,y:0,width:j,model:oe,categories:ze,parcatsViewModel:X,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),T6=Ze({"src/traces/parcats/plot.js"(Z,q){"use strict";var d=sV();q.exports=function(A,M,e,t){var r=A._fullLayout,o=r._paper,a=r._size;d(A,o,M,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},e,t)}}}),lV=Ze({"src/traces/parcats/base_plot.js"(Z){"use strict";var q=Hh().getModuleCalcData,d=T6(),x="parcats";Z.name=x,Z.plot=function(A,M,e,t){var r=q(A.calcdata,x);if(r.length){var o=r[0];d(A,o,e,t)}},Z.clean=function(A,M,e,t){var r=t._has&&t._has("parcats"),o=M._has&&M._has("parcats");r&&!o&&t._paperdiv.selectAll(".parcats").remove()}}}),uV=Ze({"src/traces/parcats/index.js"(Z,q){"use strict";q.exports={attributes:w6(),supplyDefaults:nV(),calc:oV(),plot:T6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:lV(),categories:["noOpacity"],meta:{}}}}),cV=Ze({"lib/parcats.js"(Z,q){"use strict";q.exports=uV()}}),am=Ze({"src/plots/mapbox/constants.js"(Z,q){"use strict";var d=Km(),x="1.13.4",A='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',M=['\xA9 <a target="_blank" href="https://carto.com/">Carto</a>',A].join(" "),e=['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(" "),t=['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(" "),r={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:A,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:M,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:M,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:e,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:e,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:t,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"}},o=d(r);q.exports={requiredVersion:x,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:r,styleValuesNonMapbox:o,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@"+x+"."].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:",o.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')`}}}}),Mx=Ze({"src/plots/mapbox/layout_attributes.js"(Z,q){"use strict";var d=ca(),x=Yn().defaultLine,A=bc().attributes,M=tc(),e=tf().textposition,t=pc().overrideAll,r=Dl().templatedArray,o=am(),a=M({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var i=q.exports=t({_arrayAttrRegexps:[d.counterRegex("mapbox",".layers",!0)],domain:A({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:o.styleValuesMapbox.concat(o.styleValuesNonMapbox),dflt:o.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:r("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:x},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:x}},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:a,textposition:d.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");i.uirevision={valType:"any",editType:"none"}}}),AT=Ze({"src/traces/scattermapbox/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=$d(),M=dg(),e=tf(),t=Mx(),r=eu(),o=Mu(),a=rs().extendFlat,i=pc().overrideAll,n=Mx(),s=M.line,c=M.marker;q.exports=i({lon:M.lon,lat:M.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},n.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:a({},c.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:a({},e.hovertext,{}),line:{color:s.color,width:s.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode},o("marker")),fill:M.fill,fillcolor:A(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},r.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d()},"calc","nested")}}),A6=Ze({"src/traces/scattermapbox/constants.js"(Z,q){"use strict";var d=["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"];q.exports={isSupportedFont:function(x){return d.indexOf(x)!==-1}}}}),fV=Ze({"src/traces/scattermapbox/defaults.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=md(),M=Dd(),e=zd(),t=ev(),r=AT(),o=A6().isSupportedFont;q.exports=function(n,s,c,f){function g(m,h){return d.coerce(n,s,r,m,h)}function v(m,h){return d.coerce2(n,s,r,m,h)}var T=a(n,s,g);if(!T){s.visible=!1;return}if(g("text"),g("texttemplate"),g("hovertext"),g("hovertemplate"),g("mode"),g("below"),x.hasMarkers(s)){A(n,s,c,f,g,{noLine:!0,noAngle:!0}),g("marker.allowoverlap"),g("marker.angle");var l=s.marker;l.symbol!=="circle"&&(d.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),d.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(M(n,s,c,f,g,{noDash:!0}),g("connectgaps"));var _=v("cluster.maxzoom"),w=v("cluster.step"),S=v("cluster.color",s.marker&&s.marker.color||c),E=v("cluster.size"),y=v("cluster.opacity"),b=_!==!1||w!==!1||S!==!1||E!==!1||y!==!1,p=g("cluster.enabled",b);if(p||x.hasText(s)){var u=f.font.family;e(n,s,f,g,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}g("fill"),s.fill!=="none"&&t(n,s,c,g),d.coerceSelectionMarkerOpacity(s,g)};function a(i,n,s){var c=s("lon")||[],f=s("lat")||[],g=Math.min(c.length,f.length);return n._length=g,g}}}),S6=Ze({"src/traces/scattermapbox/format_labels.js"(Z,q){"use strict";var d=Wo();q.exports=function(A,M,e){var t={},r=e[M.subplot]._subplot,o=r.mockAxis,a=A.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),M6=Ze({"src/plots/mapbox/convert_text_opts.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){var e=A.split(" "),t=e[0],r=e[1],o=d.isArrayOrTypedArray(M)?d.mean(M):M,a=.5+o/100,i=1.5+o/100,n=["",""],s=[0,0];switch(t){case"top":n[0]="top",s[1]=-i;break;case"bottom":n[0]="bottom",s[1]=i;break}switch(r){case"left":n[1]="right",s[0]=-a;break;case"right":n[1]="left",s[0]=a;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:s}}}}),hV=Ze({"src/traces/scattermapbox/convert.js"(Z,q){"use strict";var d=ns(),x=ca(),A=qs().BADNUM,M=d0(),e=rc(),t=as(),r=r1(),o=Fu(),a=A6().isSupportedFont,i=M6(),n=Qp().appendArrayPointValue,s=fu().NEWLINES,c=fu().BR_TAG_ALL;q.exports=function(y,b){var p=b[0].trace,u=p.visible===!0&&p._length!==0,m=p.fill!=="none",h=o.hasLines(p),P=o.hasMarkers(p),L=o.hasText(p),z=P&&p.marker.symbol==="circle",F=P&&p.marker.symbol!=="circle",B=p.cluster&&p.cluster.enabled,O=f("fill"),I=f("line"),N=f("circle"),U=f("symbol"),W={fill:O,line:I,circle:N,symbol:U};if(!u)return W;var Q;if((m||h)&&(Q=M.calcTraceToLineCoords(b)),m&&(O.geojson=M.makePolygon(Q),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":p.fillcolor})),h&&(I.geojson=M.makeLine(Q),I.layout.visibility="visible",x.extendFlat(I.paint,{"line-width":p.line.width,"line-color":p.line.color,"line-opacity":p.opacity})),z){var ue=g(b);N.geojson=ue.geojson,N.layout.visibility="visible",B&&(N.filter=["!",["has","point_count"]],W.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(p.cluster.color,p.cluster.step),"circle-radius":w(p.cluster.size,p.cluster.step),"circle-opacity":w(p.cluster.opacity,p.cluster.step)}},W.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":S(p),"text-size":12}}),x.extendFlat(N.paint,{"circle-color":ue.mcc,"circle-radius":ue.mrc,"circle-opacity":ue.mo})}if(z&&B&&(N.filter=["!",["has","point_count"]]),(F||L)&&(U.geojson=v(b,y),x.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(U.layout,{"icon-size":p.marker.size/10}),"angle"in p.marker&&p.marker.angle!=="auto"&&x.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=p.marker.allowoverlap,x.extendFlat(U.paint,{"icon-opacity":p.opacity*p.marker.opacity,"icon-color":p.marker.color})),L)){var le=(p.marker||{}).size,he=i(p.textposition,le);x.extendFlat(U.layout,{"text-size":p.textfont.size,"text-anchor":he.anchor,"text-offset":he.offset,"text-font":S(p)}),x.extendFlat(U.paint,{"text-color":p.textfont.color,"text-opacity":p.opacity})}return W};function f(E){return{type:E,geojson:M.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(E){var y=E[0].trace,b=y.marker,p=y.selectedpoints,u=x.isArrayOrTypedArray(b.color),m=x.isArrayOrTypedArray(b.size),h=x.isArrayOrTypedArray(b.opacity),P;function L(le){return y.opacity*le}function z(le){return le/2}var F;u&&(e.hasColorscale(y,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var B;m&&(B=r(y));var O;h&&(O=function(le){var he=d(le)?+x.constrain(le,0,1):0;return L(he)});var I=[];for(P=0;P<E.length;P++){var N=E[P],U=N.lonlat;if(!_(U)){var W={};F&&(W.mcc=N.mcc=F(N.mc)),B&&(W.mrc=N.mrc=B(N.ms)),O&&(W.mo=O(N.mo)),p&&(W.selected=N.selected||0),I.push({type:"Feature",id:P+1,geometry:{type:"Point",coordinates:U},properties:W})}}var Q;if(p)for(Q=t.makeSelectedPointStyleFns(y),P=0;P<I.length;P++){var ue=I[P].properties;Q.selectedOpacityFn&&(ue.mo=L(Q.selectedOpacityFn(ue))),Q.selectedColorFn&&(ue.mcc=Q.selectedColorFn(ue)),Q.selectedSizeFn&&(ue.mrc=Q.selectedSizeFn(ue))}return{geojson:{type:"FeatureCollection",features:I},mcc:u||Q&&Q.selectedColorFn?{type:"identity",property:"mcc"}:b.color,mrc:m||Q&&Q.selectedSizeFn?{type:"identity",property:"mrc"}:z(b.size),mo:h||Q&&Q.selectedOpacityFn?{type:"identity",property:"mo"}:L(b.opacity)}}function v(E,y){for(var b=y._fullLayout,p=E[0].trace,u=p.marker||{},m=u.symbol,h=u.angle,P=m!=="circle"?T(m):l,L=h!=="auto"?T(h,!0):l,z=o.hasText(p)?T(p.text):l,F=[],B=0;B<E.length;B++){var O=E[B];if(!_(O.lonlat)){var I=p.texttemplate,N;if(I){var U=Array.isArray(I)?I[B]||"":I,W=p._module.formatLabels(O,p,b),Q={};n(Q,p,O.i);var ue=p._meta||{};N=x.texttemplateString(U,W,b._d3locale,Q,O,ue)}else N=z(B);N&&(N=N.replace(s,"").replace(c,`
`)),F.push({type:"Feature",geometry:{type:"Point",coordinates:O.lonlat},properties:{symbol:P(B),angle:L(B),text:N}})}}return{type:"FeatureCollection",features:F}}function T(E,y){return x.isArrayOrTypedArray(E)?y?function(b){return d(E[b])?+E[b]:0}:function(b){return E[b]}:E?function(){return E}:l}function l(){return""}function _(E){return E[0]===A}function w(E,y){var b;if(x.isArrayOrTypedArray(E)&&x.isArrayOrTypedArray(y)){b=["step",["get","point_count"],E[0]];for(var p=1;p<E.length;p++)b.push(y[p-1],E[p])}else b=E;return b}function S(E){var y=E.textfont,b=y.family,p=y.style,u=y.weight,m=b.split(" "),h=m[m.length-1]==="Italic";h&&m.pop(),h=h||p==="italic";var P=m.join(" ");u==="bold"&&m.indexOf("Bold")===-1?P+=" Bold":u<=1e3&&(m[0]==="Metropolis"?(P="Metropolis",u>850?P+=" Black":u>750?P+=" Extra Bold":u>650?P+=" Bold":u>550?P+=" Semi Bold":u>450?P+=" Medium":u>350?P+=" Regular":u>250?P+=" Light":u>150?P+=" Extra Light":P+=" Thin"):m.slice(0,2).join(" ")==="Open Sans"?(P="Open Sans",u>750?P+=" Extrabold":u>650?P+=" Bold":u>550?P+=" Semibold":u>350?P+=" Regular":P+=" Light"):m.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(P="Klokantech Noto Sans",m[3]==="CJK"&&(P+=" CJK"),P+=u>500?" Bold":" Regular")),h&&(P+=" Italic"),P==="Open Sans Regular Italic"?P="Open Sans Italic":P==="Open Sans Regular Bold"?P="Open Sans Bold":P==="Open Sans Regular Bold Italic"?P="Open Sans Bold Italic":P==="Klokantech Noto Sans Regular Italic"&&(P="Klokantech Noto Sans Italic"),a(P)||(P=b);var L=P.split(", ");return L}}}),pV=Ze({"src/traces/scattermapbox/plot.js"(Z,q){"use strict";var d=ca(),x=hV(),A=am().traceLayerPrefix,M={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,i){this.type="scattermapbox",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=i,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:A+o+"-fill",line:A+o+"-line",circle:A+o+"-circle",symbol:A+o+"-symbol",cluster:A+o+"-cluster",clusterCount:A+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var i={type:"geojson",data:o.geojson};a&&a.enabled&&d.extendFlat(i,{cluster:!0,clusterMaxZoom:a.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[r]);n?n.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],i)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var i={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(i.filter=o.filter);for(var n=this.layerIds[r],s,c=this.subplot.getMapLayers(),f=0;f<c.length;f++)if(c[f].id===n){s=!0;break}s?(this.subplot.setOptions(n,"setLayoutProperty",i.layout),i.layout.visibility==="visible"&&this.subplot.setOptions(n,"setPaintProperty",i.paint)):this.subplot.addLayer(i,a)},t.update=function(o){var a=o[0].trace,i=this.subplot,n=i.map,s=x(i.gd,o),c=i.belowLookup["trace-"+this.uid],f=!!(a.cluster&&a.cluster.enabled),g=!!this.clusterEnabled,v=this;function T(u){u||v.addSource("circle",s.circle,a.cluster);for(var m=M.cluster,h=0;h<m.length;h++){var P=m[h],L=s[P];v.addLayer(P,L,c)}}function l(u){for(var m=M.cluster,h=m.length-1;h>=0;h--){var P=m[h];n.removeLayer(v.layerIds[P])}u||n.removeSource(v.sourceIds.circle)}function _(u){for(var m=M.nonCluster,h=0;h<m.length;h++){var P=m[h],L=s[P];u||v.addSource(P,L),v.addLayer(P,L,c)}}function w(u){for(var m=M.nonCluster,h=m.length-1;h>=0;h--){var P=m[h];n.removeLayer(v.layerIds[P]),u||n.removeSource(v.sourceIds[P])}}function S(u){g?l(u):w(u)}function E(u){f?T(u):_(u)}function y(){for(var u=f?M.cluster:M.nonCluster,m=0;m<u.length;m++){var h=u[m],P=s[h];P&&(i.setOptions(v.layerIds[h],"setLayoutProperty",P.layout),P.layout.visibility==="visible"&&(h!=="cluster"&&v.setSourceData(h,P),i.setOptions(v.layerIds[h],"setPaintProperty",P.paint)))}}var b=this.isHidden,p=a.visible!==!0;p?b||S():b?p||E():g!==f?(S(),E()):(this.below!==c&&(S(!0),E(!0)),y()),this.clusterEnabled=f,this.isHidden=p,this.below=c,o[0].trace._glTrace=this},t.dispose=function(){for(var o=this.subplot.map,a=this.clusterEnabled?M.cluster:M.nonCluster,i=a.length-1;i>=0;i--){var n=a[i];o.removeLayer(this.layerIds[n]),o.removeSource(this.sourceIds[n])}},q.exports=function(o,a){var i=a[0].trace,n=i.cluster&&i.cluster.enabled,s=i.visible!==!0,c=new e(o,i.uid,n,s),f=x(o.gd,a),g=c.below=o.belowLookup["trace-"+i.uid],v,T,l;if(n)for(c.addSource("circle",f.circle,i.cluster),v=0;v<M.cluster.length;v++)T=M.cluster[v],l=f[T],c.addLayer(T,l,g);else for(v=0;v<M.nonCluster.length;v++)T=M.nonCluster[v],l=f[T],c.addSource(T,l,i.cluster),c.addLayer(T,l,g);return a[0].trace._glTrace=c,c}}}),ST=Ze({"src/traces/scattermapbox/hover.js"(Z,q){"use strict";var d=ef(),x=ca(),A=l1(),M=x.fillText,e=qs().BADNUM,t=am().traceLayerPrefix;function r(a,i,n){var s=a.cd,c=s[0].trace,f=a.xa,g=a.ya,v=a.subplot,T=[],l=t+c.uid+"-circle",_=c.cluster&&c.cluster.enabled;if(_){var w=v.map.queryRenderedFeatures(null,{layers:[l]});T=w.map(function(B){return B.id})}var S=i>=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=S*360,y=i-E;function b(B){var O=B.lonlat;if(O[0]===e||_&&T.indexOf(B.i+1)===-1)return 1/0;var I=x.modHalf(O[0],360),N=O[1],U=v.project([I,N]),W=U.x-f.c2p([y,N]),Q=U.y-g.c2p([I,n]),ue=Math.max(3,B.mrc||0);return Math.max(Math.sqrt(W*W+Q*Q)-ue,1-3/ue)}if(d.getClosest(s,b,a),a.index!==!1){var p=s[a.index],u=p.lonlat,m=[x.modHalf(u[0],360)+E,u[1]],h=f.c2p(m),P=g.c2p(m),L=p.mrc||1;a.x0=h-L,a.x1=h+L,a.y0=P-L,a.y1=P+L;var z={};z[c.subplot]={_subplot:v};var F=c._module.formatLabels(p,c,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=A(c,p),a.extraText=o(c,p,s[0].t.labels),a.hovertemplate=c.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,c=s.split("+"),f=c.indexOf("all")!==-1,g=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,T=i.lonlat,l=[];function _(w){return w+"\xB0"}return f||g&&v?l.push("("+_(T[1])+", "+_(T[0])+")"):g?l.push(n.lon+_(T[0])):v&&l.push(n.lat+_(T[1])),(f||c.indexOf("text")!==-1)&&M(i,a,l),l.join("<br>")}q.exports={hoverPoints:r,getExtraText:o}}}),dV=Ze({"src/traces/scattermapbox/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return x.lon=A.lon,x.lat=A.lat,x}}}),vV=Ze({"src/traces/scattermapbox/select.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=qs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!x.hasMarkers(n))return[];if(t===!1)for(s=0;s<r.length;s++)r[s].selected=0;else for(s=0;s<r.length;s++){var c=r[s],f=c.lonlat;if(f[0]!==A){var g=[d.modHalf(f[0],360),f[1]],v=[o.c2p(g),a.c2p(g)];t.contains(v,null,s,e)?(i.push({pointNumber:s,lon:f[0],lat:f[1]}),c.selected=1):c.selected=0}}return i}}}),E6=Ze({"node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?q.exports=x():(d=d||self,d.mapboxgl=x())})(Z,function(){"use strict";var d,x,A;function M(e,t){if(!d)d=t;else if(!x)x=t;else{var r="var sharedChunk = {}; ("+d+")(sharedChunk); ("+x+")(sharedChunk);",o={};d(o),A=t(o),typeof window<"u"&&(A.workerUrl=window.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}}return M(["exports"],function(e){"use strict";function t(C,k){return k={exports:{}},C(k,k.exports),k.exports}var r="1.13.4",o=a;function a(C,k,V,ne){this.cx=3*C,this.bx=3*(V-C)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*k,this.by=3*(ne-k)-this.cy,this.ay=1-this.cy-this.by,this.p1x=C,this.p1y=ne,this.p2x=V,this.p2y=ne}a.prototype.sampleCurveX=function(C){return((this.ax*C+this.bx)*C+this.cx)*C},a.prototype.sampleCurveY=function(C){return((this.ay*C+this.by)*C+this.cy)*C},a.prototype.sampleCurveDerivativeX=function(C){return(3*this.ax*C+2*this.bx)*C+this.cx},a.prototype.solveCurveX=function(C,k){typeof k>"u"&&(k=1e-6);var V,ne,xe,Ie,Ve;for(xe=C,Ve=0;Ve<8;Ve++){if(Ie=this.sampleCurveX(xe)-C,Math.abs(Ie)<k)return xe;var ht=this.sampleCurveDerivativeX(xe);if(Math.abs(ht)<1e-6)break;xe=xe-Ie/ht}if(V=0,ne=1,xe=C,xe<V)return V;if(xe>ne)return ne;for(;V<ne;){if(Ie=this.sampleCurveX(xe),Math.abs(Ie-C)<k)return xe;C>Ie?V=xe:ne=xe,xe=(ne-V)*.5+V}return xe},a.prototype.solve=function(C,k){return this.sampleCurveY(this.solveCurveX(C,k))};var i=n;function n(C,k){this.x=C,this.y=k}n.prototype={clone:function(){return new n(this.x,this.y)},add:function(C){return this.clone()._add(C)},sub:function(C){return this.clone()._sub(C)},multByPoint:function(C){return this.clone()._multByPoint(C)},divByPoint:function(C){return this.clone()._divByPoint(C)},mult:function(C){return this.clone()._mult(C)},div:function(C){return this.clone()._div(C)},rotate:function(C){return this.clone()._rotate(C)},rotateAround:function(C,k){return this.clone()._rotateAround(C,k)},matMult:function(C){return this.clone()._matMult(C)},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(C){return this.x===C.x&&this.y===C.y},dist:function(C){return Math.sqrt(this.distSqr(C))},distSqr:function(C){var k=C.x-this.x,V=C.y-this.y;return k*k+V*V},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(C){return Math.atan2(this.y-C.y,this.x-C.x)},angleWith:function(C){return this.angleWithSep(C.x,C.y)},angleWithSep:function(C,k){return Math.atan2(this.x*k-this.y*C,this.x*C+this.y*k)},_matMult:function(C){var k=C[0]*this.x+C[1]*this.y,V=C[2]*this.x+C[3]*this.y;return this.x=k,this.y=V,this},_add:function(C){return this.x+=C.x,this.y+=C.y,this},_sub:function(C){return this.x-=C.x,this.y-=C.y,this},_mult:function(C){return this.x*=C,this.y*=C,this},_div:function(C){return this.x/=C,this.y/=C,this},_multByPoint:function(C){return this.x*=C.x,this.y*=C.y,this},_divByPoint:function(C){return this.x/=C.x,this.y/=C.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var C=this.y;return this.y=this.x,this.x=-C,this},_rotate:function(C){var k=Math.cos(C),V=Math.sin(C),ne=k*this.x-V*this.y,xe=V*this.x+k*this.y;return this.x=ne,this.y=xe,this},_rotateAround:function(C,k){var V=Math.cos(C),ne=Math.sin(C),xe=k.x+V*(this.x-k.x)-ne*(this.y-k.y),Ie=k.y+ne*(this.x-k.x)+V*(this.y-k.y);return this.x=xe,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(C){return C instanceof n?C:Array.isArray(C)?new n(C[0],C[1]):C};var s=typeof self<"u"?self:{};function c(C,k){if(Array.isArray(C)){if(!Array.isArray(k)||C.length!==k.length)return!1;for(var V=0;V<C.length;V++)if(!c(C[V],k[V]))return!1;return!0}if(typeof C=="object"&&C!==null&&k!==null){if(typeof k!="object")return!1;var ne=Object.keys(C);if(ne.length!==Object.keys(k).length)return!1;for(var xe in C)if(!c(C[xe],k[xe]))return!1;return!0}return C===k}var f=Math.pow(2,53)-1;function g(C){if(C<=0)return 0;if(C>=1)return 1;var k=C*C,V=k*C;return 4*(C<.5?V:3*(C-k)+V-.75)}function v(C,k,V,ne){var xe=new o(C,k,V,ne);return function(Ie){return xe.solve(Ie)}}var T=v(.25,.1,.25,1);function l(C,k,V){return Math.min(V,Math.max(k,C))}function _(C,k,V){var ne=V-k,xe=((C-k)%ne+ne)%ne+k;return xe===k?V:xe}function w(C,k,V){if(!C.length)return V(null,[]);var ne=C.length,xe=new Array(C.length),Ie=null;C.forEach(function(Ve,ht){k(Ve,function(Rt,Ht){Rt&&(Ie=Rt),xe[ht]=Ht,--ne===0&&V(Ie,xe)})})}function S(C){var k=[];for(var V in C)k.push(C[V]);return k}function E(C,k){var V=[];for(var ne in C)ne in k||V.push(ne);return V}function y(C){for(var k=[],V=arguments.length-1;V-- >0;)k[V]=arguments[V+1];for(var ne=0,xe=k;ne<xe.length;ne+=1){var Ie=xe[ne];for(var Ve in Ie)C[Ve]=Ie[Ve]}return C}function b(C,k){for(var V={},ne=0;ne<k.length;ne++){var xe=k[ne];xe in C&&(V[xe]=C[xe])}return V}var p=1;function u(){return p++}function m(){function C(k){return k?(k^Math.random()*16>>k/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,C)}return C()}function h(C){return C<=1?1:Math.pow(2,Math.ceil(Math.log(C)/Math.LN2))}function P(C){return C?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(C):!1}function L(C,k){C.forEach(function(V){k[V]&&(k[V]=k[V].bind(k))})}function z(C,k){return C.indexOf(k,C.length-k.length)!==-1}function F(C,k,V){var ne={};for(var xe in C)ne[xe]=k.call(V||this,C[xe],xe,C);return ne}function B(C,k,V){var ne={};for(var xe in C)k.call(V||this,C[xe],xe,C)&&(ne[xe]=C[xe]);return ne}function O(C){return Array.isArray(C)?C.map(O):typeof C=="object"&&C?F(C,O):C}function I(C,k){for(var V=0;V<C.length;V++)if(k.indexOf(C[V])>=0)return!0;return!1}var N={};function U(C){N[C]||(typeof console<"u"&&console.warn(C),N[C]=!0)}function W(C,k,V){return(V.y-C.y)*(k.x-C.x)>(k.y-C.y)*(V.x-C.x)}function Q(C){for(var k=0,V=0,ne=C.length,xe=ne-1,Ie=void 0,Ve=void 0;V<ne;xe=V++)Ie=C[V],Ve=C[xe],k+=(Ve.x-Ie.x)*(Ie.y+Ve.y);return k}function ue(C){var k=C[0],V=C[1],ne=C[2];return V+=90,V*=Math.PI/180,ne*=Math.PI/180,{x:k*Math.cos(V)*Math.sin(ne),y:k*Math.sin(V)*Math.sin(ne),z:k*Math.cos(ne)}}function le(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function he(C){var k=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,V={};if(C.replace(k,function(xe,Ie,Ve,ht){var Rt=Ve||ht;return V[Ie]=Rt?Rt.toLowerCase():!0,""}),V["max-age"]){var ne=parseInt(V["max-age"],10);isNaN(ne)?delete V["max-age"]:V["max-age"]=ne}return V}var G=null;function $(C){if(G==null){var k=C.navigator?C.navigator.userAgent:null;G=!!C.safari||!!(k&&(/\b(iPad|iPhone|iPod)\b/.test(k)||k.match("Safari")&&!k.match("Chrome")))}return G}function J(C){try{var k=s[C];return k.setItem("_mapbox_test_",1),k.removeItem("_mapbox_test_"),!0}catch{return!1}}function X(C){return s.btoa(encodeURIComponent(C).replace(/%([0-9A-F]{2})/g,function(k,V){return String.fromCharCode(+("0x"+V))}))}function oe(C){return decodeURIComponent(s.atob(C).split("").map(function(k){return"%"+("00"+k.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var ie=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),j=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,ee=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,re,ce,be={now:ie,frame:function(k){var V=j(k);return{cancel:function(){return ee(V)}}},getImageData:function(k,V){V===void 0&&(V=0);var ne=s.document.createElement("canvas"),xe=ne.getContext("2d");if(!xe)throw new Error("failed to create canvas 2d context");return ne.width=k.width,ne.height=k.height,xe.drawImage(k,0,0,k.width,k.height),xe.getImageData(-V,-V,k.width+2*V,k.height+2*V)},resolveURL:function(k){return re||(re=s.document.createElement("a")),re.href=k,re.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(ce==null&&(ce=s.matchMedia("(prefers-reduced-motion: reduce)")),ce.matches):!1}},Ae={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},ze={supported:!1,testSupport:tt},Re,Xe=!1,it,ot=!1;s.document&&(it=s.document.createElement("img"),it.onload=function(){Re&&lt(Re),Re=null,ot=!0},it.onerror=function(){Xe=!0,Re=null},it.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function tt(C){Xe||!it||(ot?lt(C):Re=C)}function lt(C){var k=C.createTexture();C.bindTexture(C.TEXTURE_2D,k);try{if(C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,it),C.isContextLost())return;ze.supported=!0}catch{}C.deleteTexture(k),Xe=!0}var Ee="01";function _e(){for(var C="1",k="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",V="",ne=0;ne<10;ne++)V+=k[Math.floor(Math.random()*62)];var xe=12*60*60*1e3,Ie=[C,Ee,V].join(""),Ve=Date.now()+xe;return{token:Ie,tokenExpiresAt:Ve}}var fe=function(k,V){this._transformRequestFn=k,this._customAccessToken=V,this._createSkuToken()};fe.prototype._createSkuToken=function(){var k=_e();this._skuToken=k.token,this._skuTokenExpiresAt=k.tokenExpiresAt},fe.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},fe.prototype.transformRequest=function(k,V){return this._transformRequestFn?this._transformRequestFn(k,V)||{url:k}:{url:k}},fe.prototype.normalizeStyleURL=function(k,V){if(!Fe(k))return k;var ne=Vt(k);return ne.path="/styles/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||V)},fe.prototype.normalizeGlyphsURL=function(k,V){if(!Fe(k))return k;var ne=Vt(k);return ne.path="/fonts/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||V)},fe.prototype.normalizeSourceURL=function(k,V){if(!Fe(k))return k;var ne=Vt(k);return ne.path="/v4/"+ne.authority+".json",ne.params.push("secure"),this._makeAPIURL(ne,this._customAccessToken||V)},fe.prototype.normalizeSpriteURL=function(k,V,ne,xe){var Ie=Vt(k);return Fe(k)?(Ie.path="/styles/v1"+Ie.path+"/sprite"+V+ne,this._makeAPIURL(Ie,this._customAccessToken||xe)):(Ie.path+=""+V+ne,Zt(Ie))},fe.prototype.normalizeTileURL=function(k,V){if(this._isSkuTokenExpired()&&this._createSkuToken(),k&&!Fe(k))return k;var ne=Vt(k),xe=/(\.(png|jpg)\d*)(?=$)/,Ie=/^.+\/v4\//,Ve=be.devicePixelRatio>=2||V===512?"@2x":"",ht=ze.supported?".webp":"$1";ne.path=ne.path.replace(xe,""+Ve+ht),ne.path=ne.path.replace(Ie,"/"),ne.path="/v4"+ne.path;var Rt=this._customAccessToken||Lt(ne.params)||Ae.ACCESS_TOKEN;return Ae.REQUIRE_ACCESS_TOKEN&&Rt&&this._skuToken&&ne.params.push("sku="+this._skuToken),this._makeAPIURL(ne,Rt)},fe.prototype.canonicalizeTileURL=function(k,V){var ne="/v4/",xe=/\.[\w]+$/,Ie=Vt(k);if(!Ie.path.match(/(^\/v4\/)/)||!Ie.path.match(xe))return k;var Ve="mapbox://tiles/";Ve+=Ie.path.replace(ne,"");var ht=Ie.params;return V&&(ht=ht.filter(function(Rt){return!Rt.match(/^access_token=/)})),ht.length&&(Ve+="?"+ht.join("&")),Ve},fe.prototype.canonicalizeTileset=function(k,V){for(var ne=V?Fe(V):!1,xe=[],Ie=0,Ve=k.tiles||[];Ie<Ve.length;Ie+=1){var ht=Ve[Ie];st(ht)?xe.push(this.canonicalizeTileURL(ht,ne)):xe.push(ht)}return xe},fe.prototype._makeAPIURL=function(k,V){var ne="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",xe=Vt(Ae.API_URL);if(k.protocol=xe.protocol,k.authority=xe.authority,k.protocol==="http"){var Ie=k.params.indexOf("secure");Ie>=0&&k.params.splice(Ie,1)}if(xe.path!=="/"&&(k.path=""+xe.path+k.path),!Ae.REQUIRE_ACCESS_TOKEN)return Zt(k);if(V=V||Ae.ACCESS_TOKEN,!V)throw new Error("An API access token is required to use Mapbox GL. "+ne);if(V[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ne);return k.params=k.params.filter(function(Ve){return Ve.indexOf("access_token")===-1}),k.params.push("access_token="+V),Zt(k)};function Fe(C){return C.indexOf("mapbox:")===0}var rt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function st(C){return rt.test(C)}function Qe(C){return C.indexOf("sku=")>0&&st(C)}function Lt(C){for(var k=0,V=C;k<V.length;k+=1){var ne=V[k],xe=ne.match(/^access_token=(.*)$/);if(xe)return xe[1]}return null}var kt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Vt(C){var k=C.match(kt);if(!k)throw new Error("Unable to parse URL object");return{protocol:k[1],authority:k[2],path:k[3]||"/",params:k[4]?k[4].split("&"):[]}}function Zt(C){var k=C.params.length?"?"+C.params.join("&"):"";return C.protocol+"://"+C.authority+C.path+k}var Sr="mapbox.eventData";function xr(C){if(!C)return null;var k=C.split(".");if(!k||k.length!==3)return null;try{var V=JSON.parse(oe(k[1]));return V}catch{return null}}var jr=function(k){this.type=k,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};jr.prototype.getStorageKey=function(k){var V=xr(Ae.ACCESS_TOKEN),ne="";return V&&V.u?ne=X(V.u):ne=Ae.ACCESS_TOKEN||"",k?Sr+"."+k+":"+ne:Sr+":"+ne},jr.prototype.fetchEventData=function(){var k=J("localStorage"),V=this.getStorageKey(),ne=this.getStorageKey("uuid");if(k)try{var xe=s.localStorage.getItem(V);xe&&(this.eventData=JSON.parse(xe));var Ie=s.localStorage.getItem(ne);Ie&&(this.anonId=Ie)}catch{U("Unable to read from LocalStorage")}},jr.prototype.saveEventData=function(){var k=J("localStorage"),V=this.getStorageKey(),ne=this.getStorageKey("uuid");if(k)try{s.localStorage.setItem(ne,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(V,JSON.stringify(this.eventData))}catch{U("Unable to write to LocalStorage")}},jr.prototype.processRequests=function(k){},jr.prototype.postEvent=function(k,V,ne,xe){var Ie=this;if(Ae.EVENTS_URL){var Ve=Vt(Ae.EVENTS_URL);Ve.params.push("access_token="+(xe||Ae.ACCESS_TOKEN||""));var ht={event:this.type,created:new Date(k).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:Ee,userId:this.anonId},Rt=V?y(ht,V):ht,Ht={url:Zt(Ve),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Rt])};this.pendingRequest=ra(Ht,function(tr){Ie.pendingRequest=null,ne(tr),Ie.saveEventData(),Ie.processRequests(xe)})}},jr.prototype.queueRequest=function(k,V){this.queue.push(k),this.processRequests(V)};var wr=function(C){function k(){C.call(this,"map.load"),this.success={},this.skuToken=""}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.postMapLoadEvent=function(ne,xe,Ie,Ve){this.skuToken=Ie,(Ae.EVENTS_URL&&Ve||Ae.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(ht){return Fe(ht)||st(ht)}))&&this.queueRequest({id:xe,timestamp:Date.now()},Ve)},k.prototype.processRequests=function(ne){var xe=this;if(!(this.pendingRequest||this.queue.length===0)){var Ie=this.queue.shift(),Ve=Ie.id,ht=Ie.timestamp;Ve&&this.success[Ve]||(this.anonId||this.fetchEventData(),P(this.anonId)||(this.anonId=m()),this.postEvent(ht,{skuToken:this.skuToken},function(Rt){Rt||Ve&&(xe.success[Ve]=!0)},ne))}},k}(jr),Ir=function(C){function k(V){C.call(this,"appUserTurnstile"),this._customAccessToken=V}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.postTurnstileEvent=function(ne,xe){Ae.EVENTS_URL&&Ae.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(Ie){return Fe(Ie)||st(Ie)})&&this.queueRequest(Date.now(),xe)},k.prototype.processRequests=function(ne){var xe=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ie=xr(Ae.ACCESS_TOKEN),Ve=Ie?Ie.u:Ae.ACCESS_TOKEN,ht=Ve!==this.eventData.tokenU;P(this.anonId)||(this.anonId=m(),ht=!0);var Rt=this.queue.shift();if(this.eventData.lastSuccess){var Ht=new Date(this.eventData.lastSuccess),tr=new Date(Rt),Cr=(Rt-this.eventData.lastSuccess)/(24*60*60*1e3);ht=ht||Cr>=1||Cr<-1||Ht.getDate()!==tr.getDate()}else ht=!0;if(!ht)return this.processRequests();this.postEvent(Rt,{"enabled.telemetry":!1},function(Xr){Xr||(xe.eventData.lastSuccess=Rt,xe.eventData.tokenU=Ve)},ne)}},k}(jr),bt=new Ir,Be=bt.postTurnstileEvent.bind(bt),Ke=new wr,Ue=Ke.postMapLoadEvent.bind(Ke),Me="mapbox-tiles",qe=500,Ce=50,Te=1e3*60*7,Pe;function at(){s.caches&&!Pe&&(Pe=s.caches.open(Me))}var yt;function Tt(C,k){if(yt===void 0)try{new Response(new ReadableStream),yt=!0}catch{yt=!1}yt?k(C.body):C.blob().then(k)}function Ot(C,k,V){if(at(),!!Pe){var ne={status:k.status,statusText:k.statusText,headers:new s.Headers};k.headers.forEach(function(Ve,ht){return ne.headers.set(ht,Ve)});var xe=he(k.headers.get("Cache-Control")||"");if(!xe["no-store"]){xe["max-age"]&&ne.headers.set("Expires",new Date(V+xe["max-age"]*1e3).toUTCString());var Ie=new Date(ne.headers.get("Expires")).getTime()-V;Ie<Te||Tt(k,function(Ve){var ht=new s.Response(Ve,ne);at(),Pe&&Pe.then(function(Rt){return Rt.put(Gt(C.url),ht)}).catch(function(Rt){return U(Rt.message)})})}}}function Gt(C){var k=C.indexOf("?");return k<0?C:C.slice(0,k)}function rr(C,k){if(at(),!Pe)return k(null);var V=Gt(C.url);Pe.then(function(ne){ne.match(V).then(function(xe){var Ie=Qt(xe);ne.delete(V),Ie&&ne.put(V,xe.clone()),k(null,xe,Ie)}).catch(k)}).catch(k)}function Qt(C){if(!C)return!1;var k=new Date(C.headers.get("Expires")||0),V=he(C.headers.get("Cache-Control")||"");return k>Date.now()&&!V["no-cache"]}var Tr=1/0;function la(C){Tr++,Tr>Ce&&(C.getActor().send("enforceCacheSizeLimit",qe),Tr=0)}function Ua(C){at(),Pe&&Pe.then(function(k){k.keys().then(function(V){for(var ne=0;ne<V.length-C;ne++)k.delete(V[ne])})})}function Ba(C){var k=s.caches.delete(Me);C&&k.catch(C).then(function(){return C()})}function Ra(C,k){qe=C,Ce=k}var ei;function za(){return ei==null&&(ei=s.OffscreenCanvas&&new s.OffscreenCanvas(1,1).getContext("2d")&&typeof s.createImageBitmap=="function"),ei}var ti={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ti);var Ci=function(C){function k(V,ne,xe){ne===401&&st(xe)&&(V+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),C.call(this,V),this.status=ne,this.url=xe,this.name=this.constructor.name,this.message=V}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},k}(Error),Jt=le()?function(){return self.worker&&self.worker.referrer}:function(){return(s.location.protocol==="blob:"?s.parent:s).location.href},Nt=function(C){return/^file:/.test(C)||/^file:/.test(Jt())&&!/^\w+:/.test(C)};function Kt(C,k){var V=new s.AbortController,ne=new s.Request(C.url,{method:C.method||"GET",body:C.body,credentials:C.credentials,headers:C.headers,referrer:Jt(),signal:V.signal}),xe=!1,Ie=!1,Ve=Qe(ne.url);C.type==="json"&&ne.headers.set("Accept","application/json");var ht=function(Ht,tr,Cr){if(!Ie){if(Ht&&Ht.message!=="SecurityError"&&U(Ht),tr&&Cr)return Rt(tr);var Xr=Date.now();s.fetch(ne).then(function(qr){if(qr.ok){var pa=Ve?qr.clone():null;return Rt(qr,pa,Xr)}else return k(new Ci(qr.statusText,qr.status,C.url))}).catch(function(qr){qr.code!==20&&k(new Error(qr.message))})}},Rt=function(Ht,tr,Cr){(C.type==="arrayBuffer"?Ht.arrayBuffer():C.type==="json"?Ht.json():Ht.text()).then(function(Xr){Ie||(tr&&Cr&&Ot(ne,tr,Cr),xe=!0,k(null,Xr,Ht.headers.get("Cache-Control"),Ht.headers.get("Expires")))}).catch(function(Xr){Ie||k(new Error(Xr.message))})};return Ve?rr(ne,ht):ht(null,null),{cancel:function(){Ie=!0,xe||V.abort()}}}function Wt(C,k){var V=new s.XMLHttpRequest;V.open(C.method||"GET",C.url,!0),C.type==="arrayBuffer"&&(V.responseType="arraybuffer");for(var ne in C.headers)V.setRequestHeader(ne,C.headers[ne]);return C.type==="json"&&(V.responseType="text",V.setRequestHeader("Accept","application/json")),V.withCredentials=C.credentials==="include",V.onerror=function(){k(new Error(V.statusText))},V.onload=function(){if((V.status>=200&&V.status<300||V.status===0)&&V.response!==null){var xe=V.response;if(C.type==="json")try{xe=JSON.parse(V.response)}catch(Ie){return k(Ie)}k(null,xe,V.getResponseHeader("Cache-Control"),V.getResponseHeader("Expires"))}else k(new Ci(V.statusText,V.status,C.url))},V.send(C.body),{cancel:function(){return V.abort()}}}var Pr=function(C,k){if(!Nt(C.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return Kt(C,k);if(le()&&self.worker&&self.worker.actor){var V=!0;return self.worker.actor.send("getResource",C,k,void 0,V)}}return Wt(C,k)},ta=function(C,k){return Pr(y(C,{type:"json"}),k)},ma=function(C,k){return Pr(y(C,{type:"arrayBuffer"}),k)},ra=function(C,k){return Pr(y(C,{method:"POST"}),k)};function Ia(C){var k=s.document.createElement("a");return k.href=C,k.protocol===s.document.location.protocol&&k.host===s.document.location.host}var Ha="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function $a(C,k,V,ne){var xe=new s.Image,Ie=s.URL;xe.onload=function(){k(null,xe),Ie.revokeObjectURL(xe.src),xe.onload=null,s.requestAnimationFrame(function(){xe.src=Ha})},xe.onerror=function(){return k(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Ve=new s.Blob([new Uint8Array(C)],{type:"image/png"});xe.cacheControl=V,xe.expires=ne,xe.src=C.byteLength?Ie.createObjectURL(Ve):Ha}function ai(C,k){var V=new s.Blob([new Uint8Array(C)],{type:"image/png"});s.createImageBitmap(V).then(function(ne){k(null,ne)}).catch(function(ne){k(new Error("Could not load image because of "+ne.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var mi,xt,ct=function(){mi=[],xt=0};ct();var Nr=function(C,k){if(ze.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),xt>=Ae.MAX_PARALLEL_IMAGE_REQUESTS){var V={requestParameters:C,callback:k,cancelled:!1,cancel:function(){this.cancelled=!0}};return mi.push(V),V}xt++;var ne=!1,xe=function(){if(!ne)for(ne=!0,xt--;mi.length&&xt<Ae.MAX_PARALLEL_IMAGE_REQUESTS;){var Ve=mi.shift(),ht=Ve.requestParameters,Rt=Ve.callback,Ht=Ve.cancelled;Ht||(Ve.cancel=Nr(ht,Rt).cancel)}},Ie=ma(C,function(Ve,ht,Rt,Ht){xe(),Ve?k(Ve):ht&&(za()?ai(ht,k):$a(ht,k,Rt,Ht))});return{cancel:function(){Ie.cancel(),xe()}}},Or=function(C,k){var V=s.document.createElement("video");V.muted=!0,V.onloadstart=function(){k(null,V)};for(var ne=0;ne<C.length;ne++){var xe=s.document.createElement("source");Ia(C[ne])||(V.crossOrigin="Anonymous"),xe.src=C[ne],V.appendChild(xe)}return{cancel:function(){}}};function Rr(C,k,V){var ne=V[C]&&V[C].indexOf(k)!==-1;ne||(V[C]=V[C]||[],V[C].push(k))}function Lr(C,k,V){if(V&&V[C]){var ne=V[C].indexOf(k);ne!==-1&&V[C].splice(ne,1)}}var Gr=function(k,V){V===void 0&&(V={}),y(this,V),this.type=k},Kr=function(C){function k(V,ne){ne===void 0&&(ne={}),C.call(this,"error",y({error:V},ne))}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k}(Gr),Ur=function(){};Ur.prototype.on=function(k,V){return this._listeners=this._listeners||{},Rr(k,V,this._listeners),this},Ur.prototype.off=function(k,V){return Lr(k,V,this._listeners),Lr(k,V,this._oneTimeListeners),this},Ur.prototype.once=function(k,V){return this._oneTimeListeners=this._oneTimeListeners||{},Rr(k,V,this._oneTimeListeners),this},Ur.prototype.fire=function(k,V){typeof k=="string"&&(k=new Gr(k,V||{}));var ne=k.type;if(this.listens(ne)){k.target=this;for(var xe=this._listeners&&this._listeners[ne]?this._listeners[ne].slice():[],Ie=0,Ve=xe;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];ht.call(this,k)}for(var Rt=this._oneTimeListeners&&this._oneTimeListeners[ne]?this._oneTimeListeners[ne].slice():[],Ht=0,tr=Rt;Ht<tr.length;Ht+=1){var Cr=tr[Ht];Lr(ne,Cr,this._oneTimeListeners),Cr.call(this,k)}var Xr=this._eventedParent;Xr&&(y(k,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Xr.fire(k))}else k instanceof Kr&&console.error(k.error);return this},Ur.prototype.listens=function(k){return this._listeners&&this._listeners[k]&&this._listeners[k].length>0||this._oneTimeListeners&&this._oneTimeListeners[k]&&this._oneTimeListeners[k].length>0||this._eventedParent&&this._eventedParent.listens(k)},Ur.prototype.setEventedParent=function(k,V){return this._eventedParent=k,this._eventedParentData=V,this};var aa=8,da={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"}},fa={"*":{type:"source"}},It=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],dr={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:"*"}},kr={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:"*"}},ia={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:"*"}},Ca={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"}},Fa={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"}}},Ya={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"}}},ha={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"}},Da=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Xi={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Li={"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"}},fn={"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"}},An={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kn={"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"}},zn={"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"}},Xn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},to={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},mo={type:"array",value:"*"},pn={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Jo={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Xo={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Ts={type:"array",value:"*",minimum:1},Po={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}},so=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Vn={"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"}},To={"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"}},qo={"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"}},Oo={"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"}},lo={"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"}},Co={"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"}},os={"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"}},Ys={"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"}},Os={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Yo={"*":{type:"string"}},Ui={$version:aa,$root:da,sources:fa,source:It,source_vector:dr,source_raster:kr,source_raster_dem:ia,source_geojson:Ca,source_video:Fa,source_image:Ya,layer:ha,layout:Da,layout_background:Xi,layout_fill:Li,layout_circle:fn,layout_heatmap:An,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:kn,layout_symbol:zn,layout_raster:Xn,layout_hillshade:to,filter:mo,filter_operator:pn,geometry_type:Jo,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:Xo,expression:Ts,light:Po,paint:so,paint_fill:Vn,"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:To,paint_circle:qo,paint_heatmap:Oo,paint_symbol:lo,paint_raster:Co,paint_hillshade:os,paint_background:Ys,transition:Os,"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:Yo},Cn=function(k,V,ne,xe){this.message=(k?k+": ":"")+ne,xe&&(this.identifier=xe),V!=null&&V.__line__&&(this.line=V.__line__)};function tl(C){var k=C.key,V=C.value;return V?[new Cn(k,V,"constants have been deprecated as of v8")]:[]}function Bs(C){for(var k=[],V=arguments.length-1;V-- >0;)k[V]=arguments[V+1];for(var ne=0,xe=k;ne<xe.length;ne+=1){var Ie=xe[ne];for(var Ve in Ie)C[Ve]=Ie[Ve]}return C}function uo(C){return C instanceof Number||C instanceof String||C instanceof Boolean?C.valueOf():C}function $s(C){if(Array.isArray(C))return C.map($s);if(C instanceof Object&&!(C instanceof Number||C instanceof String||C instanceof Boolean)){var k={};for(var V in C)k[V]=$s(C[V]);return k}return uo(C)}var ms=function(C){function k(V,ne){C.call(this,ne),this.message=ne,this.key=V}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k}(Error),Is=function(k,V){V===void 0&&(V=[]),this.parent=k,this.bindings={};for(var ne=0,xe=V;ne<xe.length;ne+=1){var Ie=xe[ne],Ve=Ie[0],ht=Ie[1];this.bindings[Ve]=ht}};Is.prototype.concat=function(k){return new Is(this,k)},Is.prototype.get=function(k){if(this.bindings[k])return this.bindings[k];if(this.parent)return this.parent.get(k);throw new Error(k+" not found in scope.")},Is.prototype.has=function(k){return this.bindings[k]?!0:this.parent?this.parent.has(k):!1};var rl={kind:"null"},Sn={kind:"number"},po={kind:"string"},ro={kind:"boolean"},As={kind:"color"},al={kind:"object"},$n={kind:"value"},zs={kind:"error"},au={kind:"collator"},fl={kind:"formatted"},xu={kind:"resolvedImage"};function zl(C,k){return{kind:"array",itemType:C,N:k}}function Ns(C){if(C.kind==="array"){var k=Ns(C.itemType);return typeof C.N=="number"?"array<"+k+", "+C.N+">":C.itemType.kind==="value"?"array":"array<"+k+">"}else return C.kind}var iu=[rl,Sn,po,ro,As,fl,al,zl($n),xu];function Eu(C,k){if(k.kind==="error")return null;if(C.kind==="array"){if(k.kind==="array"&&(k.N===0&&k.itemType.kind==="value"||!Eu(C.itemType,k.itemType))&&(typeof C.N!="number"||C.N===k.N))return null}else{if(C.kind===k.kind)return null;if(C.kind==="value")for(var V=0,ne=iu;V<ne.length;V+=1){var xe=ne[V];if(!Eu(xe,k))return null}}return"Expected "+Ns(C)+" but found "+Ns(k)+" instead."}function Bc(C,k){return k.some(function(V){return V.kind===C.kind})}function Cu(C,k){return k.some(function(V){return V==="null"?C===null:V==="array"?Array.isArray(C):V==="object"?C&&!Array.isArray(C)&&typeof C=="object":V===typeof C})}var Af=t(function(C,k){var V={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 ne(Ht){return Ht=Math.round(Ht),Ht<0?0:Ht>255?255:Ht}function xe(Ht){return Ht<0?0:Ht>1?1:Ht}function Ie(Ht){return Ht[Ht.length-1]==="%"?ne(parseFloat(Ht)/100*255):ne(parseInt(Ht))}function Ve(Ht){return Ht[Ht.length-1]==="%"?xe(parseFloat(Ht)/100):xe(parseFloat(Ht))}function ht(Ht,tr,Cr){return Cr<0?Cr+=1:Cr>1&&(Cr-=1),Cr*6<1?Ht+(tr-Ht)*Cr*6:Cr*2<1?tr:Cr*3<2?Ht+(tr-Ht)*(2/3-Cr)*6:Ht}function Rt(Ht){var tr=Ht.replace(/ /g,"").toLowerCase();if(tr in V)return V[tr].slice();if(tr[0]==="#"){if(tr.length===4){var Cr=parseInt(tr.substr(1),16);return Cr>=0&&Cr<=4095?[(Cr&3840)>>4|(Cr&3840)>>8,Cr&240|(Cr&240)>>4,Cr&15|(Cr&15)<<4,1]:null}else if(tr.length===7){var Cr=parseInt(tr.substr(1),16);return Cr>=0&&Cr<=16777215?[(Cr&16711680)>>16,(Cr&65280)>>8,Cr&255,1]:null}return null}var Xr=tr.indexOf("("),qr=tr.indexOf(")");if(Xr!==-1&&qr+1===tr.length){var pa=tr.substr(0,Xr),ja=tr.substr(Xr+1,qr-(Xr+1)).split(","),Ei=1;switch(pa){case"rgba":if(ja.length!==4)return null;Ei=Ve(ja.pop());case"rgb":return ja.length!==3?null:[Ie(ja[0]),Ie(ja[1]),Ie(ja[2]),Ei];case"hsla":if(ja.length!==4)return null;Ei=Ve(ja.pop());case"hsl":if(ja.length!==3)return null;var li=(parseFloat(ja[0])%360+360)%360/360,en=Ve(ja[1]),Ni=Ve(ja[2]),Qi=Ni<=.5?Ni*(en+1):Ni+en-Ni*en,ln=Ni*2-Qi;return[ne(ht(ln,Qi,li+1/3)*255),ne(ht(ln,Qi,li)*255),ne(ht(ln,Qi,li-1/3)*255),Ei];default:return null}}return null}try{k.parseCSSColor=Rt}catch{}}),pf=Af.parseCSSColor,Us=function(k,V,ne,xe){xe===void 0&&(xe=1),this.r=k,this.g=V,this.b=ne,this.a=xe};Us.parse=function(k){if(k){if(k instanceof Us)return k;if(typeof k=="string"){var V=pf(k);if(V)return new Us(V[0]/255*V[3],V[1]/255*V[3],V[2]/255*V[3],V[3])}}},Us.prototype.toString=function(){var k=this.toArray(),V=k[0],ne=k[1],xe=k[2],Ie=k[3];return"rgba("+Math.round(V)+","+Math.round(ne)+","+Math.round(xe)+","+Ie+")"},Us.prototype.toArray=function(){var k=this,V=k.r,ne=k.g,xe=k.b,Ie=k.a;return Ie===0?[0,0,0,0]:[V*255/Ie,ne*255/Ie,xe*255/Ie,Ie]},Us.black=new Us(0,0,0,1),Us.white=new Us(1,1,1,1),Us.transparent=new Us(0,0,0,0),Us.red=new Us(1,0,0,1);var Vc=function(k,V,ne){k?this.sensitivity=V?"variant":"case":this.sensitivity=V?"accent":"base",this.locale=ne,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Vc.prototype.compare=function(k,V){return this.collator.compare(k,V)},Vc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Sf=function(k,V,ne,xe,Ie){this.text=k,this.image=V,this.scale=ne,this.fontStack=xe,this.textColor=Ie},nu=function(k){this.sections=k};nu.fromString=function(k){return new nu([new Sf(k,null,null,null,null)])},nu.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(k){return k.text.length!==0||k.image&&k.image.name.length!==0})},nu.factory=function(k){return k instanceof nu?k:nu.fromString(k)},nu.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(k){return k.text}).join("")},nu.prototype.serialize=function(){for(var k=["format"],V=0,ne=this.sections;V<ne.length;V+=1){var xe=ne[V];if(xe.image){k.push(["image",xe.image.name]);continue}k.push(xe.text);var Ie={};xe.fontStack&&(Ie["text-font"]=["literal",xe.fontStack.split(",")]),xe.scale&&(Ie["font-scale"]=xe.scale),xe.textColor&&(Ie["text-color"]=["rgba"].concat(xe.textColor.toArray())),k.push(Ie)}return k};var Ll=function(k){this.name=k.name,this.available=k.available};Ll.prototype.toString=function(){return this.name},Ll.fromString=function(k){return k?new Ll({name:k,available:!1}):null},Ll.prototype.serialize=function(){return["image",this.name]};function ic(C,k,V,ne){if(!(typeof C=="number"&&C>=0&&C<=255&&typeof k=="number"&&k>=0&&k<=255&&typeof V=="number"&&V>=0&&V<=255)){var xe=typeof ne=="number"?[C,k,V,ne]:[C,k,V];return"Invalid rgba value ["+xe.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ne>"u"||typeof ne=="number"&&ne>=0&&ne<=1?null:"Invalid rgba value ["+[C,k,V,ne].join(", ")+"]: 'a' must be between 0 and 1."}function Ou(C){if(C===null)return!0;if(typeof C=="string")return!0;if(typeof C=="boolean")return!0;if(typeof C=="number")return!0;if(C instanceof Us)return!0;if(C instanceof Vc)return!0;if(C instanceof nu)return!0;if(C instanceof Ll)return!0;if(Array.isArray(C)){for(var k=0,V=C;k<V.length;k+=1){var ne=V[k];if(!Ou(ne))return!1}return!0}else if(typeof C=="object"){for(var xe in C)if(!Ou(C[xe]))return!1;return!0}else return!1}function il(C){if(C===null)return rl;if(typeof C=="string")return po;if(typeof C=="boolean")return ro;if(typeof C=="number")return Sn;if(C instanceof Us)return As;if(C instanceof Vc)return au;if(C instanceof nu)return fl;if(C instanceof Ll)return xu;if(Array.isArray(C)){for(var k=C.length,V,ne=0,xe=C;ne<xe.length;ne+=1){var Ie=xe[ne],Ve=il(Ie);if(!V)V=Ve;else{if(V===Ve)continue;V=$n;break}}return zl(V||$n,k)}else return al}function vl(C){var k=typeof C;return C===null?"":k==="string"||k==="number"||k==="boolean"?String(C):C instanceof Us||C instanceof nu||C instanceof Ll?C.toString():JSON.stringify(C)}var gs=function(k,V){this.type=k,this.value=V};gs.parse=function(k,V){if(k.length!==2)return V.error("'literal' expression requires exactly one argument, but found "+(k.length-1)+" instead.");if(!Ou(k[1]))return V.error("invalid value");var ne=k[1],xe=il(ne),Ie=V.expectedType;return xe.kind==="array"&&xe.N===0&&Ie&&Ie.kind==="array"&&(typeof Ie.N!="number"||Ie.N===0)&&(xe=Ie),new gs(xe,ne)},gs.prototype.evaluate=function(){return this.value},gs.prototype.eachChild=function(){},gs.prototype.outputDefined=function(){return!0},gs.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Us?["rgba"].concat(this.value.toArray()):this.value instanceof nu?this.value.serialize():this.value};var Vs=function(k){this.name="ExpressionEvaluationError",this.message=k};Vs.prototype.toJSON=function(){return this.message};var nc={string:po,number:Sn,boolean:ro,object:al},Nl=function(k,V){this.type=k,this.args=V};Nl.parse=function(k,V){if(k.length<2)return V.error("Expected at least one argument.");var ne=1,xe,Ie=k[0];if(Ie==="array"){var Ve;if(k.length>2){var ht=k[1];if(typeof ht!="string"||!(ht in nc)||ht==="object")return V.error('The item type argument of "array" must be one of string, number, boolean',1);Ve=nc[ht],ne++}else Ve=$n;var Rt;if(k.length>3){if(k[2]!==null&&(typeof k[2]!="number"||k[2]<0||k[2]!==Math.floor(k[2])))return V.error('The length argument to "array" must be a positive integer literal',2);Rt=k[2],ne++}xe=zl(Ve,Rt)}else xe=nc[Ie];for(var Ht=[];ne<k.length;ne++){var tr=V.parse(k[ne],ne,$n);if(!tr)return null;Ht.push(tr)}return new Nl(xe,Ht)},Nl.prototype.evaluate=function(k){for(var V=0;V<this.args.length;V++){var ne=this.args[V].evaluate(k),xe=Eu(this.type,il(ne));if(xe){if(V===this.args.length-1)throw new Vs("Expected value to be of type "+Ns(this.type)+", but found "+Ns(il(ne))+" instead.")}else return ne}return null},Nl.prototype.eachChild=function(k){this.args.forEach(k)},Nl.prototype.outputDefined=function(){return this.args.every(function(k){return k.outputDefined()})},Nl.prototype.serialize=function(){var k=this.type,V=[k.kind];if(k.kind==="array"){var ne=k.itemType;if(ne.kind==="string"||ne.kind==="number"||ne.kind==="boolean"){V.push(ne.kind);var xe=k.N;(typeof xe=="number"||this.args.length>1)&&V.push(xe)}}return V.concat(this.args.map(function(Ie){return Ie.serialize()}))};var qu=function(k){this.type=fl,this.sections=k};qu.parse=function(k,V){if(k.length<2)return V.error("Expected at least one argument.");var ne=k[1];if(!Array.isArray(ne)&&typeof ne=="object")return V.error("First argument must be an image or text section.");for(var xe=[],Ie=!1,Ve=1;Ve<=k.length-1;++Ve){var ht=k[Ve];if(Ie&&typeof ht=="object"&&!Array.isArray(ht)){Ie=!1;var Rt=null;if(ht["font-scale"]&&(Rt=V.parse(ht["font-scale"],1,Sn),!Rt))return null;var Ht=null;if(ht["text-font"]&&(Ht=V.parse(ht["text-font"],1,zl(po)),!Ht))return null;var tr=null;if(ht["text-color"]&&(tr=V.parse(ht["text-color"],1,As),!tr))return null;var Cr=xe[xe.length-1];Cr.scale=Rt,Cr.font=Ht,Cr.textColor=tr}else{var Xr=V.parse(k[Ve],1,$n);if(!Xr)return null;var qr=Xr.type.kind;if(qr!=="string"&&qr!=="value"&&qr!=="null"&&qr!=="resolvedImage")return V.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ie=!0,xe.push({content:Xr,scale:null,font:null,textColor:null})}}return new qu(xe)},qu.prototype.evaluate=function(k){var V=function(ne){var xe=ne.content.evaluate(k);return il(xe)===xu?new Sf("",xe,null,null,null):new Sf(vl(xe),null,ne.scale?ne.scale.evaluate(k):null,ne.font?ne.font.evaluate(k).join(","):null,ne.textColor?ne.textColor.evaluate(k):null)};return new nu(this.sections.map(V))},qu.prototype.eachChild=function(k){for(var V=0,ne=this.sections;V<ne.length;V+=1){var xe=ne[V];k(xe.content),xe.scale&&k(xe.scale),xe.font&&k(xe.font),xe.textColor&&k(xe.textColor)}},qu.prototype.outputDefined=function(){return!1},qu.prototype.serialize=function(){for(var k=["format"],V=0,ne=this.sections;V<ne.length;V+=1){var xe=ne[V];k.push(xe.content.serialize());var Ie={};xe.scale&&(Ie["font-scale"]=xe.scale.serialize()),xe.font&&(Ie["text-font"]=xe.font.serialize()),xe.textColor&&(Ie["text-color"]=xe.textColor.serialize()),k.push(Ie)}return k};var cl=function(k){this.type=xu,this.input=k};cl.parse=function(k,V){if(k.length!==2)return V.error("Expected two arguments.");var ne=V.parse(k[1],1,po);return ne?new cl(ne):V.error("No image name provided.")},cl.prototype.evaluate=function(k){var V=this.input.evaluate(k),ne=Ll.fromString(V);return ne&&k.availableImages&&(ne.available=k.availableImages.indexOf(V)>-1),ne},cl.prototype.eachChild=function(k){k(this.input)},cl.prototype.outputDefined=function(){return!1},cl.prototype.serialize=function(){return["image",this.input.serialize()]};var yh={"to-boolean":ro,"to-color":As,"to-number":Sn,"to-string":po},ls=function(k,V){this.type=k,this.args=V};ls.parse=function(k,V){if(k.length<2)return V.error("Expected at least one argument.");var ne=k[0];if((ne==="to-boolean"||ne==="to-string")&&k.length!==2)return V.error("Expected one argument.");for(var xe=yh[ne],Ie=[],Ve=1;Ve<k.length;Ve++){var ht=V.parse(k[Ve],Ve,$n);if(!ht)return null;Ie.push(ht)}return new ls(xe,Ie)},ls.prototype.evaluate=function(k){if(this.type.kind==="boolean")return!!this.args[0].evaluate(k);if(this.type.kind==="color"){for(var V,ne,xe=0,Ie=this.args;xe<Ie.length;xe+=1){var Ve=Ie[xe];if(V=Ve.evaluate(k),ne=null,V instanceof Us)return V;if(typeof V=="string"){var ht=k.parseColor(V);if(ht)return ht}else if(Array.isArray(V)&&(V.length<3||V.length>4?ne="Invalid rbga value "+JSON.stringify(V)+": expected an array containing either three or four numeric values.":ne=ic(V[0],V[1],V[2],V[3]),!ne))return new Us(V[0]/255,V[1]/255,V[2]/255,V[3])}throw new Vs(ne||"Could not parse color from value '"+(typeof V=="string"?V:String(JSON.stringify(V)))+"'")}else if(this.type.kind==="number"){for(var Rt=null,Ht=0,tr=this.args;Ht<tr.length;Ht+=1){var Cr=tr[Ht];if(Rt=Cr.evaluate(k),Rt===null)return 0;var Xr=Number(Rt);if(!isNaN(Xr))return Xr}throw new Vs("Could not convert "+JSON.stringify(Rt)+" to number.")}else return this.type.kind==="formatted"?nu.fromString(vl(this.args[0].evaluate(k))):this.type.kind==="resolvedImage"?Ll.fromString(vl(this.args[0].evaluate(k))):vl(this.args[0].evaluate(k))},ls.prototype.eachChild=function(k){this.args.forEach(k)},ls.prototype.outputDefined=function(){return this.args.every(function(k){return k.outputDefined()})},ls.prototype.serialize=function(){if(this.type.kind==="formatted")return new qu([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new cl(this.args[0]).serialize();var k=["to-"+this.type.kind];return this.eachChild(function(V){k.push(V.serialize())}),k};var _h=["Unknown","Point","LineString","Polygon"],Ss=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ss.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ss.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?_h[this.feature.type]:this.feature.type:null},Ss.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ss.prototype.canonicalID=function(){return this.canonical},Ss.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ss.prototype.parseColor=function(k){var V=this._parseColorCache[k];return V||(V=this._parseColorCache[k]=Us.parse(k)),V};var Qn=function(k,V,ne,xe){this.name=k,this.type=V,this._evaluate=ne,this.args=xe};Qn.prototype.evaluate=function(k){return this._evaluate(k,this.args)},Qn.prototype.eachChild=function(k){this.args.forEach(k)},Qn.prototype.outputDefined=function(){return!1},Qn.prototype.serialize=function(){return[this.name].concat(this.args.map(function(k){return k.serialize()}))},Qn.parse=function(k,V){var ne,xe=k[0],Ie=Qn.definitions[xe];if(!Ie)return V.error('Unknown expression "'+xe+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Ve=Array.isArray(Ie)?Ie[0]:Ie.type,ht=Array.isArray(Ie)?[[Ie[1],Ie[2]]]:Ie.overloads,Rt=ht.filter(function(Eo){var Ro=Eo[0];return!Array.isArray(Ro)||Ro.length===k.length-1}),Ht=null,tr=0,Cr=Rt;tr<Cr.length;tr+=1){var Xr=Cr[tr],qr=Xr[0],pa=Xr[1];Ht=new nl(V.registry,V.path,null,V.scope);for(var ja=[],Ei=!1,li=1;li<k.length;li++){var en=k[li],Ni=Array.isArray(qr)?qr[li-1]:qr.type,Qi=Ht.parse(en,1+ja.length,Ni);if(!Qi){Ei=!0;break}ja.push(Qi)}if(!Ei){if(Array.isArray(qr)&&qr.length!==ja.length){Ht.error("Expected "+qr.length+" arguments, but found "+ja.length+" instead.");continue}for(var ln=0;ln<ja.length;ln++){var xn=Array.isArray(qr)?qr[ln]:qr.type,qn=ja[ln];Ht.concat(ln+1).checkSubtype(xn,qn.type)}if(Ht.errors.length===0)return new Qn(xe,Ve,pa,ja)}}if(Rt.length===1)(ne=V.errors).push.apply(ne,Ht.errors);else{for(var Nn=Rt.length?Rt:ht,Mo=Nn.map(function(Eo){var Ro=Eo[0];return Gc(Ro)}).join(" | "),no=[],yo=1;yo<k.length;yo++){var Ms=V.parse(k[yo],1+no.length);if(!Ms)return null;no.push(Ns(Ms.type))}V.error("Expected arguments of type "+Mo+", but found ("+no.join(", ")+") instead.")}return null},Qn.register=function(k,V){Qn.definitions=V;for(var ne in V)k[ne]=Qn};function Gc(C){return Array.isArray(C)?"("+C.map(Ns).join(", ")+")":"("+Ns(C.type)+"...)"}var Vu=function(k,V,ne){this.type=au,this.locale=ne,this.caseSensitive=k,this.diacriticSensitive=V};Vu.parse=function(k,V){if(k.length!==2)return V.error("Expected one argument.");var ne=k[1];if(typeof ne!="object"||Array.isArray(ne))return V.error("Collator options argument must be an object.");var xe=V.parse(ne["case-sensitive"]===void 0?!1:ne["case-sensitive"],1,ro);if(!xe)return null;var Ie=V.parse(ne["diacritic-sensitive"]===void 0?!1:ne["diacritic-sensitive"],1,ro);if(!Ie)return null;var Ve=null;return ne.locale&&(Ve=V.parse(ne.locale,1,po),!Ve)?null:new Vu(xe,Ie,Ve)},Vu.prototype.evaluate=function(k){return new Vc(this.caseSensitive.evaluate(k),this.diacriticSensitive.evaluate(k),this.locale?this.locale.evaluate(k):null)},Vu.prototype.eachChild=function(k){k(this.caseSensitive),k(this.diacriticSensitive),this.locale&&k(this.locale)},Vu.prototype.outputDefined=function(){return!1},Vu.prototype.serialize=function(){var k={};return k["case-sensitive"]=this.caseSensitive.serialize(),k["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(k.locale=this.locale.serialize()),["collator",k]};var Ul=8192;function Mf(C,k){C[0]=Math.min(C[0],k[0]),C[1]=Math.min(C[1],k[1]),C[2]=Math.max(C[2],k[0]),C[3]=Math.max(C[3],k[1])}function wc(C){return(180+C)/360}function rf(C){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+C*Math.PI/360)))/360}function Kl(C,k){return!(C[0]<=k[0]||C[2]>=k[2]||C[1]<=k[1]||C[3]>=k[3])}function Yf(C,k){var V=wc(C[0]),ne=rf(C[1]),xe=Math.pow(2,k.z);return[Math.round(V*xe*Ul),Math.round(ne*xe*Ul)]}function zf(C,k,V){var ne=C[0]-k[0],xe=C[1]-k[1],Ie=C[0]-V[0],Ve=C[1]-V[1];return ne*Ve-Ie*xe===0&&ne*Ie<=0&&xe*Ve<=0}function af(C,k,V){return k[1]>C[1]!=V[1]>C[1]&&C[0]<(V[0]-k[0])*(C[1]-k[1])/(V[1]-k[1])+k[0]}function Nc(C,k){for(var V=!1,ne=0,xe=k.length;ne<xe;ne++)for(var Ie=k[ne],Ve=0,ht=Ie.length;Ve<ht-1;Ve++){if(zf(C,Ie[Ve],Ie[Ve+1]))return!1;af(C,Ie[Ve],Ie[Ve+1])&&(V=!V)}return V}function Ff(C,k){for(var V=0;V<k.length;V++)if(Nc(C,k[V]))return!0;return!1}function Of(C,k){return C[0]*k[1]-C[1]*k[0]}function Gu(C,k,V,ne){var xe=C[0]-V[0],Ie=C[1]-V[1],Ve=k[0]-V[0],ht=k[1]-V[1],Rt=ne[0]-V[0],Ht=ne[1]-V[1],tr=xe*Ht-Rt*Ie,Cr=Ve*Ht-Rt*ht;return tr>0&&Cr<0||tr<0&&Cr>0}function Ef(C,k,V,ne){var xe=[k[0]-C[0],k[1]-C[1]],Ie=[ne[0]-V[0],ne[1]-V[1]];return Of(Ie,xe)===0?!1:!!(Gu(C,k,V,ne)&&Gu(V,ne,C,k))}function oc(C,k,V){for(var ne=0,xe=V;ne<xe.length;ne+=1)for(var Ie=xe[ne],Ve=0;Ve<Ie.length-1;++Ve)if(Ef(C,k,Ie[Ve],Ie[Ve+1]))return!0;return!1}function Hc(C,k){for(var V=0;V<C.length;++V)if(!Nc(C[V],k))return!1;for(var ne=0;ne<C.length-1;++ne)if(oc(C[ne],C[ne+1],k))return!1;return!0}function Jl(C,k){for(var V=0;V<k.length;V++)if(Hc(C,k[V]))return!0;return!1}function Uc(C,k,V){for(var ne=[],xe=0;xe<C.length;xe++){for(var Ie=[],Ve=0;Ve<C[xe].length;Ve++){var ht=Yf(C[xe][Ve],V);Mf(k,ht),Ie.push(ht)}ne.push(Ie)}return ne}function Tc(C,k,V){for(var ne=[],xe=0;xe<C.length;xe++){var Ie=Uc(C[xe],k,V);ne.push(Ie)}return ne}function Gs(C,k,V,ne){if(C[0]<V[0]||C[0]>V[2]){var xe=ne*.5,Ie=C[0]-V[0]>xe?-ne:V[0]-C[0]>xe?ne:0;Ie===0&&(Ie=C[0]-V[2]>xe?-ne:V[2]-C[0]>xe?ne:0),C[0]+=Ie}Mf(k,C)}function Cf(C){C[0]=C[1]=1/0,C[2]=C[3]=-1/0}function lh(C,k,V,ne){for(var xe=Math.pow(2,ne.z)*Ul,Ie=[ne.x*Ul,ne.y*Ul],Ve=[],ht=0,Rt=C;ht<Rt.length;ht+=1)for(var Ht=Rt[ht],tr=0,Cr=Ht;tr<Cr.length;tr+=1){var Xr=Cr[tr],qr=[Xr.x+Ie[0],Xr.y+Ie[1]];Gs(qr,k,V,xe),Ve.push(qr)}return Ve}function Bf(C,k,V,ne){for(var xe=Math.pow(2,ne.z)*Ul,Ie=[ne.x*Ul,ne.y*Ul],Ve=[],ht=0,Rt=C;ht<Rt.length;ht+=1){for(var Ht=Rt[ht],tr=[],Cr=0,Xr=Ht;Cr<Xr.length;Cr+=1){var qr=Xr[Cr],pa=[qr.x+Ie[0],qr.y+Ie[1]];Mf(k,pa),tr.push(pa)}Ve.push(tr)}if(k[2]-k[0]<=xe/2){Cf(k);for(var ja=0,Ei=Ve;ja<Ei.length;ja+=1)for(var li=Ei[ja],en=0,Ni=li;en<Ni.length;en+=1){var Qi=Ni[en];Gs(Qi,k,V,xe)}}return Ve}function Wc(C,k){var V=[1/0,1/0,-1/0,-1/0],ne=[1/0,1/0,-1/0,-1/0],xe=C.canonicalID();if(k.type==="Polygon"){var Ie=Uc(k.coordinates,ne,xe),Ve=lh(C.geometry(),V,ne,xe);if(!Kl(V,ne))return!1;for(var ht=0,Rt=Ve;ht<Rt.length;ht+=1){var Ht=Rt[ht];if(!Nc(Ht,Ie))return!1}}if(k.type==="MultiPolygon"){var tr=Tc(k.coordinates,ne,xe),Cr=lh(C.geometry(),V,ne,xe);if(!Kl(V,ne))return!1;for(var Xr=0,qr=Cr;Xr<qr.length;Xr+=1){var pa=qr[Xr];if(!Ff(pa,tr))return!1}}return!0}function Kf(C,k){var V=[1/0,1/0,-1/0,-1/0],ne=[1/0,1/0,-1/0,-1/0],xe=C.canonicalID();if(k.type==="Polygon"){var Ie=Uc(k.coordinates,ne,xe),Ve=Bf(C.geometry(),V,ne,xe);if(!Kl(V,ne))return!1;for(var ht=0,Rt=Ve;ht<Rt.length;ht+=1){var Ht=Rt[ht];if(!Hc(Ht,Ie))return!1}}if(k.type==="MultiPolygon"){var tr=Tc(k.coordinates,ne,xe),Cr=Bf(C.geometry(),V,ne,xe);if(!Kl(V,ne))return!1;for(var Xr=0,qr=Cr;Xr<qr.length;Xr+=1){var pa=qr[Xr];if(!Jl(pa,tr))return!1}}return!0}var ku=function(k,V){this.type=ro,this.geojson=k,this.geometries=V};ku.parse=function(k,V){if(k.length!==2)return V.error("'within' expression requires exactly one argument, but found "+(k.length-1)+" instead.");if(Ou(k[1])){var ne=k[1];if(ne.type==="FeatureCollection")for(var xe=0;xe<ne.features.length;++xe){var Ie=ne.features[xe].geometry.type;if(Ie==="Polygon"||Ie==="MultiPolygon")return new ku(ne,ne.features[xe].geometry)}else if(ne.type==="Feature"){var Ve=ne.geometry.type;if(Ve==="Polygon"||Ve==="MultiPolygon")return new ku(ne,ne.geometry)}else if(ne.type==="Polygon"||ne.type==="MultiPolygon")return new ku(ne,ne)}return V.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ku.prototype.evaluate=function(k){if(k.geometry()!=null&&k.canonicalID()!=null){if(k.geometryType()==="Point")return Wc(k,this.geometries);if(k.geometryType()==="LineString")return Kf(k,this.geometries)}return!1},ku.prototype.eachChild=function(){},ku.prototype.outputDefined=function(){return!0},ku.prototype.serialize=function(){return["within",this.geojson]};function Nf(C){if(C instanceof Qn){if(C.name==="get"&&C.args.length===1)return!1;if(C.name==="feature-state")return!1;if(C.name==="has"&&C.args.length===1)return!1;if(C.name==="properties"||C.name==="geometry-type"||C.name==="id")return!1;if(/^filter-/.test(C.name))return!1}if(C instanceof ku)return!1;var k=!0;return C.eachChild(function(V){k&&!Nf(V)&&(k=!1)}),k}function ml(C){if(C instanceof Qn&&C.name==="feature-state")return!1;var k=!0;return C.eachChild(function(V){k&&!ml(V)&&(k=!1)}),k}function Lu(C,k){if(C instanceof Qn&&k.indexOf(C.name)>=0)return!1;var V=!0;return C.eachChild(function(ne){V&&!Lu(ne,k)&&(V=!1)}),V}var Ac=function(k,V){this.type=V.type,this.name=k,this.boundExpression=V};Ac.parse=function(k,V){if(k.length!==2||typeof k[1]!="string")return V.error("'var' expression requires exactly one string literal argument.");var ne=k[1];return V.scope.has(ne)?new Ac(ne,V.scope.get(ne)):V.error('Unknown variable "'+ne+'". Make sure "'+ne+'" has been bound in an enclosing "let" expression before using it.',1)},Ac.prototype.evaluate=function(k){return this.boundExpression.evaluate(k)},Ac.prototype.eachChild=function(){},Ac.prototype.outputDefined=function(){return!1},Ac.prototype.serialize=function(){return["var",this.name]};var nl=function(k,V,ne,xe,Ie){V===void 0&&(V=[]),xe===void 0&&(xe=new Is),Ie===void 0&&(Ie=[]),this.registry=k,this.path=V,this.key=V.map(function(Ve){return"["+Ve+"]"}).join(""),this.scope=xe,this.errors=Ie,this.expectedType=ne};nl.prototype.parse=function(k,V,ne,xe,Ie){return Ie===void 0&&(Ie={}),V?this.concat(V,ne,xe)._parse(k,Ie):this._parse(k,Ie)},nl.prototype._parse=function(k,V){(k===null||typeof k=="string"||typeof k=="boolean"||typeof k=="number")&&(k=["literal",k]);function ne(tr,Cr,Xr){return Xr==="assert"?new Nl(Cr,[tr]):Xr==="coerce"?new ls(Cr,[tr]):tr}if(Array.isArray(k)){if(k.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var xe=k[0];if(typeof xe!="string")return this.error("Expression name must be a string, but found "+typeof xe+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ie=this.registry[xe];if(Ie){var Ve=Ie.parse(k,this);if(!Ve)return null;if(this.expectedType){var ht=this.expectedType,Rt=Ve.type;if((ht.kind==="string"||ht.kind==="number"||ht.kind==="boolean"||ht.kind==="object"||ht.kind==="array")&&Rt.kind==="value")Ve=ne(Ve,ht,V.typeAnnotation||"assert");else if((ht.kind==="color"||ht.kind==="formatted"||ht.kind==="resolvedImage")&&(Rt.kind==="value"||Rt.kind==="string"))Ve=ne(Ve,ht,V.typeAnnotation||"coerce");else if(this.checkSubtype(ht,Rt))return null}if(!(Ve instanceof gs)&&Ve.type.kind!=="resolvedImage"&&dc(Ve)){var Ht=new Ss;try{Ve=new gs(Ve.type,Ve.evaluate(Ht))}catch(tr){return this.error(tr.message),null}}return Ve}return this.error('Unknown expression "'+xe+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof k>"u"?this.error("'undefined' value invalid. Use null instead."):typeof k=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof k+" instead.")},nl.prototype.concat=function(k,V,ne){var xe=typeof k=="number"?this.path.concat(k):this.path,Ie=ne?this.scope.concat(ne):this.scope;return new nl(this.registry,xe,V||null,Ie,this.errors)},nl.prototype.error=function(k){for(var V=[],ne=arguments.length-1;ne-- >0;)V[ne]=arguments[ne+1];var xe=""+this.key+V.map(function(Ie){return"["+Ie+"]"}).join("");this.errors.push(new ms(xe,k))},nl.prototype.checkSubtype=function(k,V){var ne=Eu(k,V);return ne&&this.error(ne),ne};function dc(C){if(C instanceof Ac)return dc(C.boundExpression);if(C instanceof Qn&&C.name==="error")return!1;if(C instanceof Vu)return!1;if(C instanceof ku)return!1;var k=C instanceof ls||C instanceof Nl,V=!0;return C.eachChild(function(ne){k?V=V&&dc(ne):V=V&&ne instanceof gs}),V?Nf(C)&&Lu(C,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function vu(C,k){for(var V=C.length-1,ne=0,xe=V,Ie=0,Ve,ht;ne<=xe;)if(Ie=Math.floor((ne+xe)/2),Ve=C[Ie],ht=C[Ie+1],Ve<=k){if(Ie===V||k<ht)return Ie;ne=Ie+1}else if(Ve>k)xe=Ie-1;else throw new Vs("Input is not a number.");return 0}var bu=function(k,V,ne){this.type=k,this.input=V,this.labels=[],this.outputs=[];for(var xe=0,Ie=ne;xe<Ie.length;xe+=1){var Ve=Ie[xe],ht=Ve[0],Rt=Ve[1];this.labels.push(ht),this.outputs.push(Rt)}};bu.parse=function(k,V){if(k.length-1<4)return V.error("Expected at least 4 arguments, but found only "+(k.length-1)+".");if((k.length-1)%2!==0)return V.error("Expected an even number of arguments.");var ne=V.parse(k[1],1,Sn);if(!ne)return null;var xe=[],Ie=null;V.expectedType&&V.expectedType.kind!=="value"&&(Ie=V.expectedType);for(var Ve=1;Ve<k.length;Ve+=2){var ht=Ve===1?-1/0:k[Ve],Rt=k[Ve+1],Ht=Ve,tr=Ve+1;if(typeof ht!="number")return V.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ht);if(xe.length&&xe[xe.length-1][0]>=ht)return V.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ht);var Cr=V.parse(Rt,tr,Ie);if(!Cr)return null;Ie=Ie||Cr.type,xe.push([ht,Cr])}return new bu(Ie,ne,xe)},bu.prototype.evaluate=function(k){var V=this.labels,ne=this.outputs;if(V.length===1)return ne[0].evaluate(k);var xe=this.input.evaluate(k);if(xe<=V[0])return ne[0].evaluate(k);var Ie=V.length;if(xe>=V[Ie-1])return ne[Ie-1].evaluate(k);var Ve=vu(V,xe);return ne[Ve].evaluate(k)},bu.prototype.eachChild=function(k){k(this.input);for(var V=0,ne=this.outputs;V<ne.length;V+=1){var xe=ne[V];k(xe)}},bu.prototype.outputDefined=function(){return this.outputs.every(function(k){return k.outputDefined()})},bu.prototype.serialize=function(){for(var k=["step",this.input.serialize()],V=0;V<this.labels.length;V++)V>0&&k.push(this.labels[V]),k.push(this.outputs[V].serialize());return k};function Ml(C,k,V){return C*(1-V)+k*V}function Uf(C,k,V){return new Us(Ml(C.r,k.r,V),Ml(C.g,k.g,V),Ml(C.b,k.b,V),Ml(C.a,k.a,V))}function Jf(C,k,V){return C.map(function(ne,xe){return Ml(ne,k[xe],V)})}var Bu=Object.freeze({__proto__:null,number:Ml,color:Uf,array:Jf}),Sc=.95047,vc=1,Lh=1.08883,nf=4/29,df=6/29,Nu=3*df*df,of=df*df*df,tu=Math.PI/180,Xc=180/Math.PI;function uh(C){return C>of?Math.pow(C,1/3):C/Nu+nf}function vf(C){return C>df?C*C*C:Nu*(C-nf)}function ol(C){return 255*(C<=.0031308?12.92*C:1.055*Math.pow(C,1/2.4)-.055)}function mu(C){return C/=255,C<=.04045?C/12.92:Math.pow((C+.055)/1.055,2.4)}function Pu(C){var k=mu(C.r),V=mu(C.g),ne=mu(C.b),xe=uh((.4124564*k+.3575761*V+.1804375*ne)/Sc),Ie=uh((.2126729*k+.7151522*V+.072175*ne)/vc),Ve=uh((.0193339*k+.119192*V+.9503041*ne)/Lh);return{l:116*Ie-16,a:500*(xe-Ie),b:200*(Ie-Ve),alpha:C.a}}function kf(C){var k=(C.l+16)/116,V=isNaN(C.a)?k:k+C.a/500,ne=isNaN(C.b)?k:k-C.b/200;return k=vc*vf(k),V=Sc*vf(V),ne=Lh*vf(ne),new Us(ol(3.2404542*V-1.5371385*k-.4985314*ne),ol(-.969266*V+1.8760108*k+.041556*ne),ol(.0556434*V-.2040259*k+1.0572252*ne),C.alpha)}function hl(C,k,V){return{l:Ml(C.l,k.l,V),a:Ml(C.a,k.a,V),b:Ml(C.b,k.b,V),alpha:Ml(C.alpha,k.alpha,V)}}function sf(C){var k=Pu(C),V=k.l,ne=k.a,xe=k.b,Ie=Math.atan2(xe,ne)*Xc;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(ne*ne+xe*xe),l:V,alpha:C.a}}function Mc(C){var k=C.h*tu,V=C.c,ne=C.l;return kf({l:ne,a:Math.cos(k)*V,b:Math.sin(k)*V,alpha:C.alpha})}function Hu(C,k,V){var ne=k-C;return C+V*(ne>180||ne<-180?ne-360*Math.round(ne/360):ne)}function mf(C,k,V){return{h:Hu(C.h,k.h,V),c:Ml(C.c,k.c,V),l:Ml(C.l,k.l,V),alpha:Ml(C.alpha,k.alpha,V)}}var Wu={forward:Pu,reverse:kf,interpolate:hl},Zc={forward:sf,reverse:Mc,interpolate:mf},Lf=Object.freeze({__proto__:null,lab:Wu,hcl:Zc}),ru=function(k,V,ne,xe,Ie){this.type=k,this.operator=V,this.interpolation=ne,this.input=xe,this.labels=[],this.outputs=[];for(var Ve=0,ht=Ie;Ve<ht.length;Ve+=1){var Rt=ht[Ve],Ht=Rt[0],tr=Rt[1];this.labels.push(Ht),this.outputs.push(tr)}};ru.interpolationFactor=function(k,V,ne,xe){var Ie=0;if(k.name==="exponential")Ie=jf(V,k.base,ne,xe);else if(k.name==="linear")Ie=jf(V,1,ne,xe);else if(k.name==="cubic-bezier"){var Ve=k.controlPoints,ht=new o(Ve[0],Ve[1],Ve[2],Ve[3]);Ie=ht.solve(jf(V,1,ne,xe))}return Ie},ru.parse=function(k,V){var ne=k[0],xe=k[1],Ie=k[2],Ve=k.slice(3);if(!Array.isArray(xe)||xe.length===0)return V.error("Expected an interpolation type expression.",1);if(xe[0]==="linear")xe={name:"linear"};else if(xe[0]==="exponential"){var ht=xe[1];if(typeof ht!="number")return V.error("Exponential interpolation requires a numeric base.",1,1);xe={name:"exponential",base:ht}}else if(xe[0]==="cubic-bezier"){var Rt=xe.slice(1);if(Rt.length!==4||Rt.some(function(li){return typeof li!="number"||li<0||li>1}))return V.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);xe={name:"cubic-bezier",controlPoints:Rt}}else return V.error("Unknown interpolation type "+String(xe[0]),1,0);if(k.length-1<4)return V.error("Expected at least 4 arguments, but found only "+(k.length-1)+".");if((k.length-1)%2!==0)return V.error("Expected an even number of arguments.");if(Ie=V.parse(Ie,2,Sn),!Ie)return null;var Ht=[],tr=null;ne==="interpolate-hcl"||ne==="interpolate-lab"?tr=As:V.expectedType&&V.expectedType.kind!=="value"&&(tr=V.expectedType);for(var Cr=0;Cr<Ve.length;Cr+=2){var Xr=Ve[Cr],qr=Ve[Cr+1],pa=Cr+3,ja=Cr+4;if(typeof Xr!="number")return V.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',pa);if(Ht.length&&Ht[Ht.length-1][0]>=Xr)return V.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',pa);var Ei=V.parse(qr,ja,tr);if(!Ei)return null;tr=tr||Ei.type,Ht.push([Xr,Ei])}return tr.kind!=="number"&&tr.kind!=="color"&&!(tr.kind==="array"&&tr.itemType.kind==="number"&&typeof tr.N=="number")?V.error("Type "+Ns(tr)+" is not interpolatable."):new ru(tr,ne,xe,Ie,Ht)},ru.prototype.evaluate=function(k){var V=this.labels,ne=this.outputs;if(V.length===1)return ne[0].evaluate(k);var xe=this.input.evaluate(k);if(xe<=V[0])return ne[0].evaluate(k);var Ie=V.length;if(xe>=V[Ie-1])return ne[Ie-1].evaluate(k);var Ve=vu(V,xe),ht=V[Ve],Rt=V[Ve+1],Ht=ru.interpolationFactor(this.interpolation,xe,ht,Rt),tr=ne[Ve].evaluate(k),Cr=ne[Ve+1].evaluate(k);return this.operator==="interpolate"?Bu[this.type.kind.toLowerCase()](tr,Cr,Ht):this.operator==="interpolate-hcl"?Zc.reverse(Zc.interpolate(Zc.forward(tr),Zc.forward(Cr),Ht)):Wu.reverse(Wu.interpolate(Wu.forward(tr),Wu.forward(Cr),Ht))},ru.prototype.eachChild=function(k){k(this.input);for(var V=0,ne=this.outputs;V<ne.length;V+=1){var xe=ne[V];k(xe)}},ru.prototype.outputDefined=function(){return this.outputs.every(function(k){return k.outputDefined()})},ru.prototype.serialize=function(){var k;this.interpolation.name==="linear"?k=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?k=["linear"]:k=["exponential",this.interpolation.base]:k=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var V=[this.operator,k,this.input.serialize()],ne=0;ne<this.labels.length;ne++)V.push(this.labels[ne],this.outputs[ne].serialize());return V};function jf(C,k,V,ne){var xe=ne-V,Ie=C-V;return xe===0?0:k===1?Ie/xe:(Math.pow(k,Ie)-1)/(Math.pow(k,xe)-1)}var Xu=function(k,V){this.type=k,this.args=V};Xu.parse=function(k,V){if(k.length<2)return V.error("Expectected at least one argument.");var ne=null,xe=V.expectedType;xe&&xe.kind!=="value"&&(ne=xe);for(var Ie=[],Ve=0,ht=k.slice(1);Ve<ht.length;Ve+=1){var Rt=ht[Ve],Ht=V.parse(Rt,1+Ie.length,ne,void 0,{typeAnnotation:"omit"});if(!Ht)return null;ne=ne||Ht.type,Ie.push(Ht)}var tr=xe&&Ie.some(function(Cr){return Eu(xe,Cr.type)});return tr?new Xu($n,Ie):new Xu(ne,Ie)},Xu.prototype.evaluate=function(k){for(var V=null,ne=0,xe,Ie=0,Ve=this.args;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];if(ne++,V=ht.evaluate(k),V&&V instanceof Ll&&!V.available&&(xe||(xe=V.name),V=null,ne===this.args.length&&(V=xe)),V!==null)break}return V},Xu.prototype.eachChild=function(k){this.args.forEach(k)},Xu.prototype.outputDefined=function(){return this.args.every(function(k){return k.outputDefined()})},Xu.prototype.serialize=function(){var k=["coalesce"];return this.eachChild(function(V){k.push(V.serialize())}),k};var Ec=function(k,V){this.type=V.type,this.bindings=[].concat(k),this.result=V};Ec.prototype.evaluate=function(k){return this.result.evaluate(k)},Ec.prototype.eachChild=function(k){for(var V=0,ne=this.bindings;V<ne.length;V+=1){var xe=ne[V];k(xe[1])}k(this.result)},Ec.parse=function(k,V){if(k.length<4)return V.error("Expected at least 3 arguments, but found "+(k.length-1)+" instead.");for(var ne=[],xe=1;xe<k.length-1;xe+=2){var Ie=k[xe];if(typeof Ie!="string")return V.error("Expected string, but found "+typeof Ie+" instead.",xe);if(/[^a-zA-Z0-9_]/.test(Ie))return V.error("Variable names must contain only alphanumeric characters or '_'.",xe);var Ve=V.parse(k[xe+1],xe+1);if(!Ve)return null;ne.push([Ie,Ve])}var ht=V.parse(k[k.length-1],k.length-1,V.expectedType,ne);return ht?new Ec(ne,ht):null},Ec.prototype.outputDefined=function(){return this.result.outputDefined()},Ec.prototype.serialize=function(){for(var k=["let"],V=0,ne=this.bindings;V<ne.length;V+=1){var xe=ne[V],Ie=xe[0],Ve=xe[1];k.push(Ie,Ve.serialize())}return k.push(this.result.serialize()),k};var mc=function(k,V,ne){this.type=k,this.index=V,this.input=ne};mc.parse=function(k,V){if(k.length!==3)return V.error("Expected 2 arguments, but found "+(k.length-1)+" instead.");var ne=V.parse(k[1],1,Sn),xe=V.parse(k[2],2,zl(V.expectedType||$n));if(!ne||!xe)return null;var Ie=xe.type;return new mc(Ie.itemType,ne,xe)},mc.prototype.evaluate=function(k){var V=this.index.evaluate(k),ne=this.input.evaluate(k);if(V<0)throw new Vs("Array index out of bounds: "+V+" < 0.");if(V>=ne.length)throw new Vs("Array index out of bounds: "+V+" > "+(ne.length-1)+".");if(V!==Math.floor(V))throw new Vs("Array index must be an integer, but found "+V+" instead.");return ne[V]},mc.prototype.eachChild=function(k){k(this.index),k(this.input)},mc.prototype.outputDefined=function(){return!1},mc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var jl=function(k,V){this.type=ro,this.needle=k,this.haystack=V};jl.parse=function(k,V){if(k.length!==3)return V.error("Expected 2 arguments, but found "+(k.length-1)+" instead.");var ne=V.parse(k[1],1,$n),xe=V.parse(k[2],2,$n);return!ne||!xe?null:Bc(ne.type,[ro,po,Sn,rl,$n])?new jl(ne,xe):V.error("Expected first argument to be of type boolean, string, number or null, but found "+Ns(ne.type)+" instead")},jl.prototype.evaluate=function(k){var V=this.needle.evaluate(k),ne=this.haystack.evaluate(k);if(!ne)return!1;if(!Cu(V,["boolean","string","number","null"]))throw new Vs("Expected first argument to be of type boolean, string, number or null, but found "+Ns(il(V))+" instead.");if(!Cu(ne,["string","array"]))throw new Vs("Expected second argument to be of type array or string, but found "+Ns(il(ne))+" instead.");return ne.indexOf(V)>=0},jl.prototype.eachChild=function(k){k(this.needle),k(this.haystack)},jl.prototype.outputDefined=function(){return!0},jl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var gu=function(k,V,ne){this.type=Sn,this.needle=k,this.haystack=V,this.fromIndex=ne};gu.parse=function(k,V){if(k.length<=2||k.length>=5)return V.error("Expected 3 or 4 arguments, but found "+(k.length-1)+" instead.");var ne=V.parse(k[1],1,$n),xe=V.parse(k[2],2,$n);if(!ne||!xe)return null;if(!Bc(ne.type,[ro,po,Sn,rl,$n]))return V.error("Expected first argument to be of type boolean, string, number or null, but found "+Ns(ne.type)+" instead");if(k.length===4){var Ie=V.parse(k[3],3,Sn);return Ie?new gu(ne,xe,Ie):null}else return new gu(ne,xe)},gu.prototype.evaluate=function(k){var V=this.needle.evaluate(k),ne=this.haystack.evaluate(k);if(!Cu(V,["boolean","string","number","null"]))throw new Vs("Expected first argument to be of type boolean, string, number or null, but found "+Ns(il(V))+" instead.");if(!Cu(ne,["string","array"]))throw new Vs("Expected second argument to be of type array or string, but found "+Ns(il(ne))+" instead.");if(this.fromIndex){var xe=this.fromIndex.evaluate(k);return ne.indexOf(V,xe)}return ne.indexOf(V)},gu.prototype.eachChild=function(k){k(this.needle),k(this.haystack),this.fromIndex&&k(this.fromIndex)},gu.prototype.outputDefined=function(){return!1},gu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var k=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),k]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Cc=function(k,V,ne,xe,Ie,Ve){this.inputType=k,this.type=V,this.input=ne,this.cases=xe,this.outputs=Ie,this.otherwise=Ve};Cc.parse=function(k,V){if(k.length<5)return V.error("Expected at least 4 arguments, but found only "+(k.length-1)+".");if(k.length%2!==1)return V.error("Expected an even number of arguments.");var ne,xe;V.expectedType&&V.expectedType.kind!=="value"&&(xe=V.expectedType);for(var Ie={},Ve=[],ht=2;ht<k.length-1;ht+=2){var Rt=k[ht],Ht=k[ht+1];Array.isArray(Rt)||(Rt=[Rt]);var tr=V.concat(ht);if(Rt.length===0)return tr.error("Expected at least one branch label.");for(var Cr=0,Xr=Rt;Cr<Xr.length;Cr+=1){var qr=Xr[Cr];if(typeof qr!="number"&&typeof qr!="string")return tr.error("Branch labels must be numbers or strings.");if(typeof qr=="number"&&Math.abs(qr)>Number.MAX_SAFE_INTEGER)return tr.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof qr=="number"&&Math.floor(qr)!==qr)return tr.error("Numeric branch labels must be integer values.");if(!ne)ne=il(qr);else if(tr.checkSubtype(ne,il(qr)))return null;if(typeof Ie[String(qr)]<"u")return tr.error("Branch labels must be unique.");Ie[String(qr)]=Ve.length}var pa=V.parse(Ht,ht,xe);if(!pa)return null;xe=xe||pa.type,Ve.push(pa)}var ja=V.parse(k[1],1,$n);if(!ja)return null;var Ei=V.parse(k[k.length-1],k.length-1,xe);return!Ei||ja.type.kind!=="value"&&V.concat(1).checkSubtype(ne,ja.type)?null:new Cc(ne,xe,ja,Ie,Ve,Ei)},Cc.prototype.evaluate=function(k){var V=this.input.evaluate(k),ne=il(V)===this.inputType&&this.outputs[this.cases[V]]||this.otherwise;return ne.evaluate(k)},Cc.prototype.eachChild=function(k){k(this.input),this.outputs.forEach(k),k(this.otherwise)},Cc.prototype.outputDefined=function(){return this.outputs.every(function(k){return k.outputDefined()})&&this.otherwise.outputDefined()},Cc.prototype.serialize=function(){for(var k=this,V=["match",this.input.serialize()],ne=Object.keys(this.cases).sort(),xe=[],Ie={},Ve=0,ht=ne;Ve<ht.length;Ve+=1){var Rt=ht[Ve],Ht=Ie[this.cases[Rt]];Ht===void 0?(Ie[this.cases[Rt]]=xe.length,xe.push([this.cases[Rt],[Rt]])):xe[Ht][1].push(Rt)}for(var tr=function(ja){return k.inputType.kind==="number"?Number(ja):ja},Cr=0,Xr=xe;Cr<Xr.length;Cr+=1){var qr=Xr[Cr],Ht=qr[0],pa=qr[1];pa.length===1?V.push(tr(pa[0])):V.push(pa.map(tr)),V.push(this.outputs[outputIndex$1].serialize())}return V.push(this.otherwise.serialize()),V};var Yc=function(k,V,ne){this.type=k,this.branches=V,this.otherwise=ne};Yc.parse=function(k,V){if(k.length<4)return V.error("Expected at least 3 arguments, but found only "+(k.length-1)+".");if(k.length%2!==0)return V.error("Expected an odd number of arguments.");var ne;V.expectedType&&V.expectedType.kind!=="value"&&(ne=V.expectedType);for(var xe=[],Ie=1;Ie<k.length-1;Ie+=2){var Ve=V.parse(k[Ie],Ie,ro);if(!Ve)return null;var ht=V.parse(k[Ie+1],Ie+1,ne);if(!ht)return null;xe.push([Ve,ht]),ne=ne||ht.type}var Rt=V.parse(k[k.length-1],k.length-1,ne);return Rt?new Yc(ne,xe,Rt):null},Yc.prototype.evaluate=function(k){for(var V=0,ne=this.branches;V<ne.length;V+=1){var xe=ne[V],Ie=xe[0],Ve=xe[1];if(Ie.evaluate(k))return Ve.evaluate(k)}return this.otherwise.evaluate(k)},Yc.prototype.eachChild=function(k){for(var V=0,ne=this.branches;V<ne.length;V+=1){var xe=ne[V],Ie=xe[0],Ve=xe[1];k(Ie),k(Ve)}k(this.otherwise)},Yc.prototype.outputDefined=function(){return this.branches.every(function(k){var V=k[0],ne=k[1];return ne.outputDefined()})&&this.otherwise.outputDefined()},Yc.prototype.serialize=function(){var k=["case"];return this.eachChild(function(V){k.push(V.serialize())}),k};var sc=function(k,V,ne,xe){this.type=k,this.input=V,this.beginIndex=ne,this.endIndex=xe};sc.parse=function(k,V){if(k.length<=2||k.length>=5)return V.error("Expected 3 or 4 arguments, but found "+(k.length-1)+" instead.");var ne=V.parse(k[1],1,$n),xe=V.parse(k[2],2,Sn);if(!ne||!xe)return null;if(!Bc(ne.type,[zl($n),po,$n]))return V.error("Expected first argument to be of type array or string, but found "+Ns(ne.type)+" instead");if(k.length===4){var Ie=V.parse(k[3],3,Sn);return Ie?new sc(ne.type,ne,xe,Ie):null}else return new sc(ne.type,ne,xe)},sc.prototype.evaluate=function(k){var V=this.input.evaluate(k),ne=this.beginIndex.evaluate(k);if(!Cu(V,["string","array"]))throw new Vs("Expected first argument to be of type array or string, but found "+Ns(il(V))+" instead.");if(this.endIndex){var xe=this.endIndex.evaluate(k);return V.slice(ne,xe)}return V.slice(ne)},sc.prototype.eachChild=function(k){k(this.input),k(this.beginIndex),this.endIndex&&k(this.endIndex)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var k=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),k]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function kc(C,k){return C==="=="||C==="!="?k.kind==="boolean"||k.kind==="string"||k.kind==="number"||k.kind==="null"||k.kind==="value":k.kind==="string"||k.kind==="number"||k.kind==="value"}function er(C,k,V){return k===V}function yr(C,k,V){return k!==V}function na(C,k,V){return k<V}function $r(C,k,V){return k>V}function La(C,k,V){return k<=V}function hi(C,k,V){return k>=V}function Pi(C,k,V,ne){return ne.compare(k,V)===0}function Zi(C,k,V,ne){return!Pi(C,k,V,ne)}function tn(C,k,V,ne){return ne.compare(k,V)<0}function dn(C,k,V,ne){return ne.compare(k,V)>0}function Ri(C,k,V,ne){return ne.compare(k,V)<=0}function Fi(C,k,V,ne){return ne.compare(k,V)>=0}function qi(C,k,V){var ne=C!=="=="&&C!=="!=";return function(){function xe(Ie,Ve,ht){this.type=ro,this.lhs=Ie,this.rhs=Ve,this.collator=ht,this.hasUntypedArgument=Ie.type.kind==="value"||Ve.type.kind==="value"}return xe.parse=function(Ve,ht){if(Ve.length!==3&&Ve.length!==4)return ht.error("Expected two or three arguments.");var Rt=Ve[0],Ht=ht.parse(Ve[1],1,$n);if(!Ht)return null;if(!kc(Rt,Ht.type))return ht.concat(1).error('"'+Rt+`" comparisons are not supported for type '`+Ns(Ht.type)+"'.");var tr=ht.parse(Ve[2],2,$n);if(!tr)return null;if(!kc(Rt,tr.type))return ht.concat(2).error('"'+Rt+`" comparisons are not supported for type '`+Ns(tr.type)+"'.");if(Ht.type.kind!==tr.type.kind&&Ht.type.kind!=="value"&&tr.type.kind!=="value")return ht.error("Cannot compare types '"+Ns(Ht.type)+"' and '"+Ns(tr.type)+"'.");ne&&(Ht.type.kind==="value"&&tr.type.kind!=="value"?Ht=new Nl(tr.type,[Ht]):Ht.type.kind!=="value"&&tr.type.kind==="value"&&(tr=new Nl(Ht.type,[tr])));var Cr=null;if(Ve.length===4){if(Ht.type.kind!=="string"&&tr.type.kind!=="string"&&Ht.type.kind!=="value"&&tr.type.kind!=="value")return ht.error("Cannot use collator to compare non-string types.");if(Cr=ht.parse(Ve[3],3,au),!Cr)return null}return new xe(Ht,tr,Cr)},xe.prototype.evaluate=function(Ve){var ht=this.lhs.evaluate(Ve),Rt=this.rhs.evaluate(Ve);if(ne&&this.hasUntypedArgument){var Ht=il(ht),tr=il(Rt);if(Ht.kind!==tr.kind||!(Ht.kind==="string"||Ht.kind==="number"))throw new Vs('Expected arguments for "'+C+'" to be (string, string) or (number, number), but found ('+Ht.kind+", "+tr.kind+") instead.")}if(this.collator&&!ne&&this.hasUntypedArgument){var Cr=il(ht),Xr=il(Rt);if(Cr.kind!=="string"||Xr.kind!=="string")return k(Ve,ht,Rt)}return this.collator?V(Ve,ht,Rt,this.collator.evaluate(Ve)):k(Ve,ht,Rt)},xe.prototype.eachChild=function(Ve){Ve(this.lhs),Ve(this.rhs),this.collator&&Ve(this.collator)},xe.prototype.outputDefined=function(){return!0},xe.prototype.serialize=function(){var Ve=[C];return this.eachChild(function(ht){Ve.push(ht.serialize())}),Ve},xe}()}var _i=qi("==",er,Pi),Mn=qi("!=",yr,Zi),Kn=qi("<",na,tn),ao=qi(">",$r,dn),Jn=qi("<=",La,Ri),co=qi(">=",hi,Fi),wn=function(k,V,ne,xe,Ie){this.type=po,this.number=k,this.locale=V,this.currency=ne,this.minFractionDigits=xe,this.maxFractionDigits=Ie};wn.parse=function(k,V){if(k.length!==3)return V.error("Expected two arguments.");var ne=V.parse(k[1],1,Sn);if(!ne)return null;var xe=k[2];if(typeof xe!="object"||Array.isArray(xe))return V.error("NumberFormat options argument must be an object.");var Ie=null;if(xe.locale&&(Ie=V.parse(xe.locale,1,po),!Ie))return null;var Ve=null;if(xe.currency&&(Ve=V.parse(xe.currency,1,po),!Ve))return null;var ht=null;if(xe["min-fraction-digits"]&&(ht=V.parse(xe["min-fraction-digits"],1,Sn),!ht))return null;var Rt=null;return xe["max-fraction-digits"]&&(Rt=V.parse(xe["max-fraction-digits"],1,Sn),!Rt)?null:new wn(ne,Ie,Ve,ht,Rt)},wn.prototype.evaluate=function(k){return new Intl.NumberFormat(this.locale?this.locale.evaluate(k):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(k):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(k):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(k):void 0}).format(this.number.evaluate(k))},wn.prototype.eachChild=function(k){k(this.number),this.locale&&k(this.locale),this.currency&&k(this.currency),this.minFractionDigits&&k(this.minFractionDigits),this.maxFractionDigits&&k(this.maxFractionDigits)},wn.prototype.outputDefined=function(){return!1},wn.prototype.serialize=function(){var k={};return this.locale&&(k.locale=this.locale.serialize()),this.currency&&(k.currency=this.currency.serialize()),this.minFractionDigits&&(k["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(k["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),k]};var un=function(k){this.type=Sn,this.input=k};un.parse=function(k,V){if(k.length!==2)return V.error("Expected 1 argument, but found "+(k.length-1)+" instead.");var ne=V.parse(k[1],1);return ne?ne.type.kind!=="array"&&ne.type.kind!=="string"&&ne.type.kind!=="value"?V.error("Expected argument of type string or array, but found "+Ns(ne.type)+" instead."):new un(ne):null},un.prototype.evaluate=function(k){var V=this.input.evaluate(k);if(typeof V=="string")return V.length;if(Array.isArray(V))return V.length;throw new Vs("Expected value to be of type string or array, but found "+Ns(il(V))+" instead.")},un.prototype.eachChild=function(k){k(this.input)},un.prototype.outputDefined=function(){return!1},un.prototype.serialize=function(){var k=["length"];return this.eachChild(function(V){k.push(V.serialize())}),k};var _o={"==":_i,"!=":Mn,">":ao,"<":Kn,">=":co,"<=":Jn,array:Nl,at:mc,boolean:Nl,case:Yc,coalesce:Xu,collator:Vu,format:qu,image:cl,in:jl,"index-of":gu,interpolate:ru,"interpolate-hcl":ru,"interpolate-lab":ru,length:un,let:Ec,literal:gs,match:Cc,number:Nl,"number-format":wn,object:Nl,slice:sc,step:bu,string:Nl,"to-boolean":ls,"to-color":ls,"to-number":ls,"to-string":ls,var:Ac,within:ku};function Qo(C,k){var V=k[0],ne=k[1],xe=k[2],Ie=k[3];V=V.evaluate(C),ne=ne.evaluate(C),xe=xe.evaluate(C);var Ve=Ie?Ie.evaluate(C):1,ht=ic(V,ne,xe,Ve);if(ht)throw new Vs(ht);return new Us(V/255*Ve,ne/255*Ve,xe/255*Ve,Ve)}function xs(C,k){return C in k}function Qs(C,k){var V=k[C];return typeof V>"u"?null:V}function Rs(C,k,V,ne){for(;V<=ne;){var xe=V+ne>>1;if(k[xe]===C)return!0;k[xe]>C?ne=xe-1:V=xe+1}return!1}function Ks(C){return{type:C}}Qn.register(_o,{error:[zs,[po],function(C,k){var V=k[0];throw new Vs(V.evaluate(C))}],typeof:[po,[$n],function(C,k){var V=k[0];return Ns(il(V.evaluate(C)))}],"to-rgba":[zl(Sn,4),[As],function(C,k){var V=k[0];return V.evaluate(C).toArray()}],rgb:[As,[Sn,Sn,Sn],Qo],rgba:[As,[Sn,Sn,Sn,Sn],Qo],has:{type:ro,overloads:[[[po],function(C,k){var V=k[0];return xs(V.evaluate(C),C.properties())}],[[po,al],function(C,k){var V=k[0],ne=k[1];return xs(V.evaluate(C),ne.evaluate(C))}]]},get:{type:$n,overloads:[[[po],function(C,k){var V=k[0];return Qs(V.evaluate(C),C.properties())}],[[po,al],function(C,k){var V=k[0],ne=k[1];return Qs(V.evaluate(C),ne.evaluate(C))}]]},"feature-state":[$n,[po],function(C,k){var V=k[0];return Qs(V.evaluate(C),C.featureState||{})}],properties:[al,[],function(C){return C.properties()}],"geometry-type":[po,[],function(C){return C.geometryType()}],id:[$n,[],function(C){return C.id()}],zoom:[Sn,[],function(C){return C.globals.zoom}],"heatmap-density":[Sn,[],function(C){return C.globals.heatmapDensity||0}],"line-progress":[Sn,[],function(C){return C.globals.lineProgress||0}],accumulated:[$n,[],function(C){return C.globals.accumulated===void 0?null:C.globals.accumulated}],"+":[Sn,Ks(Sn),function(C,k){for(var V=0,ne=0,xe=k;ne<xe.length;ne+=1){var Ie=xe[ne];V+=Ie.evaluate(C)}return V}],"*":[Sn,Ks(Sn),function(C,k){for(var V=1,ne=0,xe=k;ne<xe.length;ne+=1){var Ie=xe[ne];V*=Ie.evaluate(C)}return V}],"-":{type:Sn,overloads:[[[Sn,Sn],function(C,k){var V=k[0],ne=k[1];return V.evaluate(C)-ne.evaluate(C)}],[[Sn],function(C,k){var V=k[0];return-V.evaluate(C)}]]},"/":[Sn,[Sn,Sn],function(C,k){var V=k[0],ne=k[1];return V.evaluate(C)/ne.evaluate(C)}],"%":[Sn,[Sn,Sn],function(C,k){var V=k[0],ne=k[1];return V.evaluate(C)%ne.evaluate(C)}],ln2:[Sn,[],function(){return Math.LN2}],pi:[Sn,[],function(){return Math.PI}],e:[Sn,[],function(){return Math.E}],"^":[Sn,[Sn,Sn],function(C,k){var V=k[0],ne=k[1];return Math.pow(V.evaluate(C),ne.evaluate(C))}],sqrt:[Sn,[Sn],function(C,k){var V=k[0];return Math.sqrt(V.evaluate(C))}],log10:[Sn,[Sn],function(C,k){var V=k[0];return Math.log(V.evaluate(C))/Math.LN10}],ln:[Sn,[Sn],function(C,k){var V=k[0];return Math.log(V.evaluate(C))}],log2:[Sn,[Sn],function(C,k){var V=k[0];return Math.log(V.evaluate(C))/Math.LN2}],sin:[Sn,[Sn],function(C,k){var V=k[0];return Math.sin(V.evaluate(C))}],cos:[Sn,[Sn],function(C,k){var V=k[0];return Math.cos(V.evaluate(C))}],tan:[Sn,[Sn],function(C,k){var V=k[0];return Math.tan(V.evaluate(C))}],asin:[Sn,[Sn],function(C,k){var V=k[0];return Math.asin(V.evaluate(C))}],acos:[Sn,[Sn],function(C,k){var V=k[0];return Math.acos(V.evaluate(C))}],atan:[Sn,[Sn],function(C,k){var V=k[0];return Math.atan(V.evaluate(C))}],min:[Sn,Ks(Sn),function(C,k){return Math.min.apply(Math,k.map(function(V){return V.evaluate(C)}))}],max:[Sn,Ks(Sn),function(C,k){return Math.max.apply(Math,k.map(function(V){return V.evaluate(C)}))}],abs:[Sn,[Sn],function(C,k){var V=k[0];return Math.abs(V.evaluate(C))}],round:[Sn,[Sn],function(C,k){var V=k[0],ne=V.evaluate(C);return ne<0?-Math.round(-ne):Math.round(ne)}],floor:[Sn,[Sn],function(C,k){var V=k[0];return Math.floor(V.evaluate(C))}],ceil:[Sn,[Sn],function(C,k){var V=k[0];return Math.ceil(V.evaluate(C))}],"filter-==":[ro,[po,$n],function(C,k){var V=k[0],ne=k[1];return C.properties()[V.value]===ne.value}],"filter-id-==":[ro,[$n],function(C,k){var V=k[0];return C.id()===V.value}],"filter-type-==":[ro,[po],function(C,k){var V=k[0];return C.geometryType()===V.value}],"filter-<":[ro,[po,$n],function(C,k){var V=k[0],ne=k[1],xe=C.properties()[V.value],Ie=ne.value;return typeof xe==typeof Ie&&xe<Ie}],"filter-id-<":[ro,[$n],function(C,k){var V=k[0],ne=C.id(),xe=V.value;return typeof ne==typeof xe&&ne<xe}],"filter->":[ro,[po,$n],function(C,k){var V=k[0],ne=k[1],xe=C.properties()[V.value],Ie=ne.value;return typeof xe==typeof Ie&&xe>Ie}],"filter-id->":[ro,[$n],function(C,k){var V=k[0],ne=C.id(),xe=V.value;return typeof ne==typeof xe&&ne>xe}],"filter-<=":[ro,[po,$n],function(C,k){var V=k[0],ne=k[1],xe=C.properties()[V.value],Ie=ne.value;return typeof xe==typeof Ie&&xe<=Ie}],"filter-id-<=":[ro,[$n],function(C,k){var V=k[0],ne=C.id(),xe=V.value;return typeof ne==typeof xe&&ne<=xe}],"filter->=":[ro,[po,$n],function(C,k){var V=k[0],ne=k[1],xe=C.properties()[V.value],Ie=ne.value;return typeof xe==typeof Ie&&xe>=Ie}],"filter-id->=":[ro,[$n],function(C,k){var V=k[0],ne=C.id(),xe=V.value;return typeof ne==typeof xe&&ne>=xe}],"filter-has":[ro,[$n],function(C,k){var V=k[0];return V.value in C.properties()}],"filter-has-id":[ro,[],function(C){return C.id()!==null&&C.id()!==void 0}],"filter-type-in":[ro,[zl(po)],function(C,k){var V=k[0];return V.value.indexOf(C.geometryType())>=0}],"filter-id-in":[ro,[zl($n)],function(C,k){var V=k[0];return V.value.indexOf(C.id())>=0}],"filter-in-small":[ro,[po,zl($n)],function(C,k){var V=k[0],ne=k[1];return ne.value.indexOf(C.properties()[V.value])>=0}],"filter-in-large":[ro,[po,zl($n)],function(C,k){var V=k[0],ne=k[1];return Rs(C.properties()[V.value],ne.value,0,ne.value.length-1)}],all:{type:ro,overloads:[[[ro,ro],function(C,k){var V=k[0],ne=k[1];return V.evaluate(C)&&ne.evaluate(C)}],[Ks(ro),function(C,k){for(var V=0,ne=k;V<ne.length;V+=1){var xe=ne[V];if(!xe.evaluate(C))return!1}return!0}]]},any:{type:ro,overloads:[[[ro,ro],function(C,k){var V=k[0],ne=k[1];return V.evaluate(C)||ne.evaluate(C)}],[Ks(ro),function(C,k){for(var V=0,ne=k;V<ne.length;V+=1){var xe=ne[V];if(xe.evaluate(C))return!0}return!1}]]},"!":[ro,[ro],function(C,k){var V=k[0];return!V.evaluate(C)}],"is-supported-script":[ro,[po],function(C,k){var V=k[0],ne=C.globals&&C.globals.isSupportedScript;return ne?ne(V.evaluate(C)):!0}],upcase:[po,[po],function(C,k){var V=k[0];return V.evaluate(C).toUpperCase()}],downcase:[po,[po],function(C,k){var V=k[0];return V.evaluate(C).toLowerCase()}],concat:[po,Ks($n),function(C,k){return k.map(function(V){return vl(V.evaluate(C))}).join("")}],"resolved-locale":[po,[au],function(C,k){var V=k[0];return V.evaluate(C).resolvedLocale()}]});function ys(C){return{result:"success",value:C}}function Fl(C){return{result:"error",value:C}}function yl(C){return C["property-type"]==="data-driven"||C["property-type"]==="cross-faded-data-driven"}function sl(C){return!!C.expression&&C.expression.parameters.indexOf("zoom")>-1}function Un(C){return!!C.expression&&C.expression.interpolated}function Io(C){return C instanceof Number?"number":C instanceof String?"string":C instanceof Boolean?"boolean":Array.isArray(C)?"array":C===null?"null":typeof C}function Xs(C){return typeof C=="object"&&C!==null&&!Array.isArray(C)}function Ls(C){return C}function ou(C,k){var V=k.type==="color",ne=C.stops&&typeof C.stops[0][0]=="object",xe=ne||C.property!==void 0,Ie=ne||!xe,Ve=C.type||(Un(k)?"exponential":"interval");if(V&&(C=Bs({},C),C.stops&&(C.stops=C.stops.map(function(Nn){return[Nn[0],Us.parse(Nn[1])]})),C.default?C.default=Us.parse(C.default):C.default=Us.parse(k.default)),C.colorSpace&&C.colorSpace!=="rgb"&&!Lf[C.colorSpace])throw new Error("Unknown color space: "+C.colorSpace);var ht,Rt,Ht;if(Ve==="exponential")ht=yu;else if(Ve==="interval")ht=Lc;else if(Ve==="categorical"){ht=Zu,Rt=Object.create(null);for(var tr=0,Cr=C.stops;tr<Cr.length;tr+=1){var Xr=Cr[tr];Rt[Xr[0]]=Xr[1]}Ht=typeof C.stops[0][0]}else if(Ve==="identity")ht=Pc;else throw new Error('Unknown function type "'+Ve+'"');if(ne){for(var qr={},pa=[],ja=0;ja<C.stops.length;ja++){var Ei=C.stops[ja],li=Ei[0].zoom;qr[li]===void 0&&(qr[li]={zoom:li,type:C.type,property:C.property,default:C.default,stops:[]},pa.push(li)),qr[li].stops.push([Ei[0].value,Ei[1]])}for(var en=[],Ni=0,Qi=pa;Ni<Qi.length;Ni+=1){var ln=Qi[Ni];en.push([qr[ln].zoom,ou(qr[ln],k)])}var xn={name:"linear"};return{kind:"composite",interpolationType:xn,interpolationFactor:ru.interpolationFactor.bind(void 0,xn),zoomStops:en.map(function(Nn){return Nn[0]}),evaluate:function(Mo,no){var yo=Mo.zoom;return yu({stops:en,base:C.base},k,yo).evaluate(yo,no)}}}else if(Ie){var qn=Ve==="exponential"?{name:"exponential",base:C.base!==void 0?C.base:1}:null;return{kind:"camera",interpolationType:qn,interpolationFactor:ru.interpolationFactor.bind(void 0,qn),zoomStops:C.stops.map(function(Nn){return Nn[0]}),evaluate:function(Nn){var Mo=Nn.zoom;return ht(C,k,Mo,Rt,Ht)}}}else return{kind:"source",evaluate:function(Mo,no){var yo=no&&no.properties?no.properties[C.property]:void 0;return yo===void 0?Iu(C.default,k.default):ht(C,k,yo,Rt,Ht)}}}function Iu(C,k,V){if(C!==void 0)return C;if(k!==void 0)return k;if(V!==void 0)return V}function Zu(C,k,V,ne,xe){var Ie=typeof V===xe?ne[V]:void 0;return Iu(Ie,C.default,k.default)}function Lc(C,k,V){if(Io(V)!=="number")return Iu(C.default,k.default);var ne=C.stops.length;if(ne===1||V<=C.stops[0][0])return C.stops[0][1];if(V>=C.stops[ne-1][0])return C.stops[ne-1][1];var xe=vu(C.stops.map(function(Ie){return Ie[0]}),V);return C.stops[xe][1]}function yu(C,k,V){var ne=C.base!==void 0?C.base:1;if(Io(V)!=="number")return Iu(C.default,k.default);var xe=C.stops.length;if(xe===1||V<=C.stops[0][0])return C.stops[0][1];if(V>=C.stops[xe-1][0])return C.stops[xe-1][1];var Ie=vu(C.stops.map(function(Cr){return Cr[0]}),V),Ve=wu(V,ne,C.stops[Ie][0],C.stops[Ie+1][0]),ht=C.stops[Ie][1],Rt=C.stops[Ie+1][1],Ht=Bu[k.type]||Ls;if(C.colorSpace&&C.colorSpace!=="rgb"){var tr=Lf[C.colorSpace];Ht=function(Cr,Xr){return tr.reverse(tr.interpolate(tr.forward(Cr),tr.forward(Xr),Ve))}}return typeof ht.evaluate=="function"?{evaluate:function(){for(var Xr=[],qr=arguments.length;qr--;)Xr[qr]=arguments[qr];var pa=ht.evaluate.apply(void 0,Xr),ja=Rt.evaluate.apply(void 0,Xr);if(!(pa===void 0||ja===void 0))return Ht(pa,ja,Ve)}}:Ht(ht,Rt,Ve)}function Pc(C,k,V){return k.type==="color"?V=Us.parse(V):k.type==="formatted"?V=nu.fromString(V.toString()):k.type==="resolvedImage"?V=Ll.fromString(V.toString()):Io(V)!==k.type&&(k.type!=="enum"||!k.values[V])&&(V=void 0),Iu(V,C.default,k.default)}function wu(C,k,V,ne){var xe=ne-V,Ie=C-V;return xe===0?0:k===1?Ie/xe:(Math.pow(k,Ie)-1)/(Math.pow(k,xe)-1)}var gc=function(k,V){this.expression=k,this._warningHistory={},this._evaluator=new Ss,this._defaultValue=V?Se(V):null,this._enumValues=V&&V.type==="enum"?V.values:null};gc.prototype.evaluateWithoutErrorHandling=function(k,V,ne,xe,Ie,Ve){return this._evaluator.globals=k,this._evaluator.feature=V,this._evaluator.featureState=ne,this._evaluator.canonical=xe,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ve,this.expression.evaluate(this._evaluator)},gc.prototype.evaluate=function(k,V,ne,xe,Ie,Ve){this._evaluator.globals=k,this._evaluator.feature=V||null,this._evaluator.featureState=ne||null,this._evaluator.canonical=xe,this._evaluator.availableImages=Ie||null,this._evaluator.formattedSection=Ve||null;try{var ht=this.expression.evaluate(this._evaluator);if(ht==null||typeof ht=="number"&&ht!==ht)return this._defaultValue;if(this._enumValues&&!(ht in this._enumValues))throw new Vs("Expected value to be one of "+Object.keys(this._enumValues).map(function(Rt){return JSON.stringify(Rt)}).join(", ")+", but found "+JSON.stringify(ht)+" instead.");return ht}catch(Rt){return this._warningHistory[Rt.message]||(this._warningHistory[Rt.message]=!0,typeof console<"u"&&console.warn(Rt.message)),this._defaultValue}};function fo(C){return Array.isArray(C)&&C.length>0&&typeof C[0]=="string"&&C[0]in _o}function zo(C,k){var V=new nl(_o,[],k?we(k):void 0),ne=V.parse(C,void 0,void 0,void 0,k&&k.type==="string"?{typeAnnotation:"coerce"}:void 0);return ne?ys(new gc(ne,k)):Fl(V.errors)}var Ic=function(k,V){this.kind=k,this._styleExpression=V,this.isStateDependent=k!=="constant"&&!ml(V.expression)};Ic.prototype.evaluateWithoutErrorHandling=function(k,V,ne,xe,Ie,Ve){return this._styleExpression.evaluateWithoutErrorHandling(k,V,ne,xe,Ie,Ve)},Ic.prototype.evaluate=function(k,V,ne,xe,Ie,Ve){return this._styleExpression.evaluate(k,V,ne,xe,Ie,Ve)};var lc=function(k,V,ne,xe){this.kind=k,this.zoomStops=ne,this._styleExpression=V,this.isStateDependent=k!=="camera"&&!ml(V.expression),this.interpolationType=xe};lc.prototype.evaluateWithoutErrorHandling=function(k,V,ne,xe,Ie,Ve){return this._styleExpression.evaluateWithoutErrorHandling(k,V,ne,xe,Ie,Ve)},lc.prototype.evaluate=function(k,V,ne,xe,Ie,Ve){return this._styleExpression.evaluate(k,V,ne,xe,Ie,Ve)},lc.prototype.interpolationFactor=function(k,V,ne){return this.interpolationType?ru.interpolationFactor(this.interpolationType,k,V,ne):0};function Yu(C,k){if(C=zo(C,k),C.result==="error")return C;var V=C.value.expression,ne=Nf(V);if(!ne&&!yl(k))return Fl([new ms("","data expressions not supported")]);var xe=Lu(V,["zoom"]);if(!xe&&!sl(k))return Fl([new ms("","zoom expressions not supported")]);var Ie=ae(V);if(!Ie&&!xe)return Fl([new ms("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof ms)return Fl([Ie]);if(Ie instanceof ru&&!Un(k))return Fl([new ms("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return ys(ne?new Ic("constant",C.value):new Ic("source",C.value));var Ve=Ie instanceof ru?Ie.interpolation:void 0;return ys(ne?new lc("camera",C.value,Ie.labels,Ve):new lc("composite",C.value,Ie.labels,Ve))}var Ne=function(k,V){this._parameters=k,this._specification=V,Bs(this,ou(this._parameters,this._specification))};Ne.deserialize=function(k){return new Ne(k._parameters,k._specification)},Ne.serialize=function(k){return{_parameters:k._parameters,_specification:k._specification}};function R(C,k){if(Xs(C))return new Ne(C,k);if(fo(C)){var V=Yu(C,k);if(V.result==="error")throw new Error(V.value.map(function(xe){return xe.key+": "+xe.message}).join(", "));return V.value}else{var ne=C;return typeof C=="string"&&k.type==="color"&&(ne=Us.parse(C)),{kind:"constant",evaluate:function(){return ne}}}}function ae(C){var k=null;if(C instanceof Ec)k=ae(C.result);else if(C instanceof Xu)for(var V=0,ne=C.args;V<ne.length;V+=1){var xe=ne[V];if(k=ae(xe),k)break}else(C instanceof bu||C instanceof ru)&&C.input instanceof Qn&&C.input.name==="zoom"&&(k=C);return k instanceof ms||C.eachChild(function(Ie){var Ve=ae(Ie);Ve instanceof ms?k=Ve:!k&&Ve?k=new ms("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):k&&Ve&&k!==Ve&&(k=new ms("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),k}function we(C){var k={color:As,string:po,number:Sn,enum:po,boolean:ro,formatted:fl,resolvedImage:xu};return C.type==="array"?zl(k[C.value]||$n,C.length):k[C.type]}function Se(C){return C.type==="color"&&Xs(C.default)?new Us(0,0,0,0):C.type==="color"?Us.parse(C.default)||null:C.default===void 0?null:C.default}function Oe(C){var k=C.key,V=C.value,ne=C.valueSpec||{},xe=C.objectElementValidators||{},Ie=C.style,Ve=C.styleSpec,ht=[],Rt=Io(V);if(Rt!=="object")return[new Cn(k,V,"object expected, "+Rt+" found")];for(var Ht in V){var tr=Ht.split(".")[0],Cr=ne[tr]||ne["*"],Xr=void 0;if(xe[tr])Xr=xe[tr];else if(ne[tr])Xr=So;else if(xe["*"])Xr=xe["*"];else if(ne["*"])Xr=So;else{ht.push(new Cn(k,V[Ht],'unknown property "'+Ht+'"'));continue}ht=ht.concat(Xr({key:(k&&k+".")+Ht,value:V[Ht],valueSpec:Cr,style:Ie,styleSpec:Ve,object:V,objectKey:Ht},V))}for(var qr in ne)xe[qr]||ne[qr].required&&ne[qr].default===void 0&&V[qr]===void 0&&ht.push(new Cn(k,V,'missing required property "'+qr+'"'));return ht}function pt(C){var k=C.value,V=C.valueSpec,ne=C.style,xe=C.styleSpec,Ie=C.key,Ve=C.arrayElementValidator||So;if(Io(k)!=="array")return[new Cn(Ie,k,"array expected, "+Io(k)+" found")];if(V.length&&k.length!==V.length)return[new Cn(Ie,k,"array length "+V.length+" expected, length "+k.length+" found")];if(V["min-length"]&&k.length<V["min-length"])return[new Cn(Ie,k,"array length at least "+V["min-length"]+" expected, length "+k.length+" found")];var ht={type:V.value,values:V.values};xe.$version<7&&(ht.function=V.function),Io(V.value)==="object"&&(ht=V.value);for(var Rt=[],Ht=0;Ht<k.length;Ht++)Rt=Rt.concat(Ve({array:k,arrayIndex:Ht,value:k[Ht],valueSpec:ht,style:ne,styleSpec:xe,key:Ie+"["+Ht+"]"}));return Rt}function At(C){var k=C.key,V=C.value,ne=C.valueSpec,xe=Io(V);return xe==="number"&&V!==V&&(xe="NaN"),xe!=="number"?[new Cn(k,V,"number expected, "+xe+" found")]:"minimum"in ne&&V<ne.minimum?[new Cn(k,V,V+" is less than the minimum value "+ne.minimum)]:"maximum"in ne&&V>ne.maximum?[new Cn(k,V,V+" is greater than the maximum value "+ne.maximum)]:[]}function Bt(C){var k=C.valueSpec,V=uo(C.value.type),ne,xe={},Ie,Ve,ht=V!=="categorical"&&C.value.property===void 0,Rt=!ht,Ht=Io(C.value.stops)==="array"&&Io(C.value.stops[0])==="array"&&Io(C.value.stops[0][0])==="object",tr=Oe({key:C.key,value:C.value,valueSpec:C.styleSpec.function,style:C.style,styleSpec:C.styleSpec,objectElementValidators:{stops:Cr,default:pa}});return V==="identity"&&ht&&tr.push(new Cn(C.key,C.value,'missing required property "property"')),V!=="identity"&&!C.value.stops&&tr.push(new Cn(C.key,C.value,'missing required property "stops"')),V==="exponential"&&C.valueSpec.expression&&!Un(C.valueSpec)&&tr.push(new Cn(C.key,C.value,"exponential functions not supported")),C.styleSpec.$version>=8&&(Rt&&!yl(C.valueSpec)?tr.push(new Cn(C.key,C.value,"property functions not supported")):ht&&!sl(C.valueSpec)&&tr.push(new Cn(C.key,C.value,"zoom functions not supported"))),(V==="categorical"||Ht)&&C.value.property===void 0&&tr.push(new Cn(C.key,C.value,'"property" property is required')),tr;function Cr(ja){if(V==="identity")return[new Cn(ja.key,ja.value,'identity function may not have a "stops" property')];var Ei=[],li=ja.value;return Ei=Ei.concat(pt({key:ja.key,value:li,valueSpec:ja.valueSpec,style:ja.style,styleSpec:ja.styleSpec,arrayElementValidator:Xr})),Io(li)==="array"&&li.length===0&&Ei.push(new Cn(ja.key,li,"array must have at least one stop")),Ei}function Xr(ja){var Ei=[],li=ja.value,en=ja.key;if(Io(li)!=="array")return[new Cn(en,li,"array expected, "+Io(li)+" found")];if(li.length!==2)return[new Cn(en,li,"array length 2 expected, length "+li.length+" found")];if(Ht){if(Io(li[0])!=="object")return[new Cn(en,li,"object expected, "+Io(li[0])+" found")];if(li[0].zoom===void 0)return[new Cn(en,li,"object stop key must have zoom")];if(li[0].value===void 0)return[new Cn(en,li,"object stop key must have value")];if(Ve&&Ve>uo(li[0].zoom))return[new Cn(en,li[0].zoom,"stop zoom values must appear in ascending order")];uo(li[0].zoom)!==Ve&&(Ve=uo(li[0].zoom),Ie=void 0,xe={}),Ei=Ei.concat(Oe({key:en+"[0]",value:li[0],valueSpec:{zoom:{}},style:ja.style,styleSpec:ja.styleSpec,objectElementValidators:{zoom:At,value:qr}}))}else Ei=Ei.concat(qr({key:en+"[0]",value:li[0],valueSpec:{},style:ja.style,styleSpec:ja.styleSpec},li));return fo($s(li[1]))?Ei.concat([new Cn(en+"[1]",li[1],"expressions are not allowed in function stops.")]):Ei.concat(So({key:en+"[1]",value:li[1],valueSpec:k,style:ja.style,styleSpec:ja.styleSpec}))}function qr(ja,Ei){var li=Io(ja.value),en=uo(ja.value),Ni=ja.value!==null?ja.value:Ei;if(!ne)ne=li;else if(li!==ne)return[new Cn(ja.key,Ni,li+" stop domain type must match previous stop domain type "+ne)];if(li!=="number"&&li!=="string"&&li!=="boolean")return[new Cn(ja.key,Ni,"stop domain value must be a number, string, or boolean")];if(li!=="number"&&V!=="categorical"){var Qi="number expected, "+li+" found";return yl(k)&&V===void 0&&(Qi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Cn(ja.key,Ni,Qi)]}return V==="categorical"&&li==="number"&&(!isFinite(en)||Math.floor(en)!==en)?[new Cn(ja.key,Ni,"integer expected, found "+en)]:V!=="categorical"&&li==="number"&&Ie!==void 0&&en<Ie?[new Cn(ja.key,Ni,"stop domain values must appear in ascending order")]:(Ie=en,V==="categorical"&&en in xe?[new Cn(ja.key,Ni,"stop domain values must be unique")]:(xe[en]=!0,[]))}function pa(ja){return So({key:ja.key,value:ja.value,valueSpec:k,style:ja.style,styleSpec:ja.styleSpec})}}function $t(C){var k=(C.expressionContext==="property"?Yu:zo)($s(C.value),C.valueSpec);if(k.result==="error")return k.value.map(function(ne){return new Cn(""+C.key+ne.key,C.value,ne.message)});var V=k.value.expression||k.value._styleExpression.expression;if(C.expressionContext==="property"&&C.propertyKey==="text-font"&&!V.outputDefined())return[new Cn(C.key,C.value,'Invalid data expression for "'+C.propertyKey+'". Output values must be contained as literals within the expression.')];if(C.expressionContext==="property"&&C.propertyType==="layout"&&!ml(V))return[new Cn(C.key,C.value,'"feature-state" data expressions are not supported with layout properties.')];if(C.expressionContext==="filter"&&!ml(V))return[new Cn(C.key,C.value,'"feature-state" data expressions are not supported with filters.')];if(C.expressionContext&&C.expressionContext.indexOf("cluster")===0){if(!Lu(V,["zoom","feature-state"]))return[new Cn(C.key,C.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(C.expressionContext==="cluster-initial"&&!Nf(V))return[new Cn(C.key,C.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function br(C){var k=C.value,V=C.key,ne=Io(k);return ne!=="boolean"?[new Cn(V,k,"boolean expected, "+ne+" found")]:[]}function Ar(C){var k=C.key,V=C.value,ne=Io(V);return ne!=="string"?[new Cn(k,V,"color expected, "+ne+" found")]:pf(V)===null?[new Cn(k,V,'color expected, "'+V+'" found')]:[]}function Yr(C){var k=C.key,V=C.value,ne=C.valueSpec,xe=[];return Array.isArray(ne.values)?ne.values.indexOf(uo(V))===-1&&xe.push(new Cn(k,V,"expected one of ["+ne.values.join(", ")+"], "+JSON.stringify(V)+" found")):Object.keys(ne.values).indexOf(uo(V))===-1&&xe.push(new Cn(k,V,"expected one of ["+Object.keys(ne.values).join(", ")+"], "+JSON.stringify(V)+" found")),xe}function sa(C){if(C===!0||C===!1)return!0;if(!Array.isArray(C)||C.length===0)return!1;switch(C[0]){case"has":return C.length>=2&&C[1]!=="$id"&&C[1]!=="$type";case"in":return C.length>=3&&(typeof C[1]!="string"||Array.isArray(C[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return C.length!==3||Array.isArray(C[1])||Array.isArray(C[2]);case"any":case"all":for(var k=0,V=C.slice(1);k<V.length;k+=1){var ne=V[k];if(!sa(ne)&&typeof ne!="boolean")return!1}return!0;default:return!0}}var He={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Je(C){if(C==null)return{filter:function(){return!0},needGeometry:!1};sa(C)||(C=Ct(C));var k=zo(C,He);if(k.result==="error")throw new Error(k.value.map(function(ne){return ne.key+": "+ne.message}).join(", "));var V=dt(C);return{filter:function(ne,xe,Ie){return k.value.evaluate(ne,xe,{},Ie)},needGeometry:V}}function ut(C,k){return C<k?-1:C>k?1:0}function dt(C){if(!Array.isArray(C))return!1;if(C[0]==="within")return!0;for(var k=1;k<C.length;k++)if(dt(C[k]))return!0;return!1}function Ct(C){if(!C)return!0;var k=C[0];if(C.length<=1)return k!=="any";var V=k==="=="?wt(C[1],C[2],"=="):k==="!="?Er(wt(C[1],C[2],"==")):k==="<"||k===">"||k==="<="||k===">="?wt(C[1],C[2],k):k==="any"?Dt(C.slice(1)):k==="all"?["all"].concat(C.slice(1).map(Ct)):k==="none"?["all"].concat(C.slice(1).map(Ct).map(Er)):k==="in"?ur(C[1],C.slice(2)):k==="!in"?Er(ur(C[1],C.slice(2))):k==="has"?mr(C[1]):k==="!has"?Er(mr(C[1])):k==="within"?C:!0;return V}function wt(C,k,V){switch(C){case"$type":return["filter-type-"+V,k];case"$id":return["filter-id-"+V,k];default:return["filter-"+V,C,k]}}function Dt(C){return["any"].concat(C.map(Ct))}function ur(C,k){if(k.length===0)return!1;switch(C){case"$type":return["filter-type-in",["literal",k]];case"$id":return["filter-id-in",["literal",k]];default:return k.length>200&&!k.some(function(V){return typeof V!=typeof k[0]})?["filter-in-large",C,["literal",k.sort(ut)]]:["filter-in-small",C,["literal",k]]}}function mr(C){switch(C){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",C]}}function Er(C){return["!",C]}function Br(C){return sa($s(C.value))?$t(Bs({},C,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qr(C)}function Qr(C){var k=C.value,V=C.key;if(Io(k)!=="array")return[new Cn(V,k,"array expected, "+Io(k)+" found")];var ne=C.styleSpec,xe,Ie=[];if(k.length<1)return[new Cn(V,k,"filter array must have at least 1 element")];switch(Ie=Ie.concat(Yr({key:V+"[0]",value:k[0],valueSpec:ne.filter_operator,style:C.style,styleSpec:C.styleSpec})),uo(k[0])){case"<":case"<=":case">":case">=":k.length>=2&&uo(k[1])==="$type"&&Ie.push(new Cn(V,k,'"$type" cannot be use with operator "'+k[0]+'"'));case"==":case"!=":k.length!==3&&Ie.push(new Cn(V,k,'filter array for operator "'+k[0]+'" must have 3 elements'));case"in":case"!in":k.length>=2&&(xe=Io(k[1]),xe!=="string"&&Ie.push(new Cn(V+"[1]",k[1],"string expected, "+xe+" found")));for(var Ve=2;Ve<k.length;Ve++)xe=Io(k[Ve]),uo(k[1])==="$type"?Ie=Ie.concat(Yr({key:V+"["+Ve+"]",value:k[Ve],valueSpec:ne.geometry_type,style:C.style,styleSpec:C.styleSpec})):xe!=="string"&&xe!=="number"&&xe!=="boolean"&&Ie.push(new Cn(V+"["+Ve+"]",k[Ve],"string, number, or boolean expected, "+xe+" found"));break;case"any":case"all":case"none":for(var ht=1;ht<k.length;ht++)Ie=Ie.concat(Qr({key:V+"["+ht+"]",value:k[ht],style:C.style,styleSpec:C.styleSpec}));break;case"has":case"!has":xe=Io(k[1]),k.length!==2?Ie.push(new Cn(V,k,'filter array for "'+k[0]+'" operator must have 2 elements')):xe!=="string"&&Ie.push(new Cn(V+"[1]",k[1],"string expected, "+xe+" found"));break;case"within":xe=Io(k[1]),k.length!==2?Ie.push(new Cn(V,k,'filter array for "'+k[0]+'" operator must have 2 elements')):xe!=="object"&&Ie.push(new Cn(V+"[1]",k[1],"object expected, "+xe+" found"));break}return Ie}function ga(C,k){var V=C.key,ne=C.style,xe=C.styleSpec,Ie=C.value,Ve=C.objectKey,ht=xe[k+"_"+C.layerType];if(!ht)return[];var Rt=Ve.match(/^(.*)-transition$/);if(k==="paint"&&Rt&&ht[Rt[1]]&&ht[Rt[1]].transition)return So({key:V,value:Ie,valueSpec:xe.transition,style:ne,styleSpec:xe});var Ht=C.valueSpec||ht[Ve];if(!Ht)return[new Cn(V,Ie,'unknown property "'+Ve+'"')];var tr;if(Io(Ie)==="string"&&yl(Ht)&&!Ht.tokens&&(tr=/^{([^}]+)}$/.exec(Ie)))return[new Cn(V,Ie,'"'+Ve+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(tr[1])+" }`.")];var Cr=[];return C.layerType==="symbol"&&(Ve==="text-field"&&ne&&!ne.glyphs&&Cr.push(new Cn(V,Ie,'use of "text-field" requires a style "glyphs" property')),Ve==="text-font"&&Xs($s(Ie))&&uo(Ie.type)==="identity"&&Cr.push(new Cn(V,Ie,'"text-font" does not support identity functions'))),Cr.concat(So({key:C.key,value:Ie,valueSpec:Ht,style:ne,styleSpec:xe,expressionContext:"property",propertyType:k,propertyKey:Ve}))}function Sa(C){return ga(C,"paint")}function Oa(C){return ga(C,"layout")}function di(C){var k=[],V=C.value,ne=C.key,xe=C.style,Ie=C.styleSpec;!V.type&&!V.ref&&k.push(new Cn(ne,V,'either "type" or "ref" is required'));var Ve=uo(V.type),ht=uo(V.ref);if(V.id)for(var Rt=uo(V.id),Ht=0;Ht<C.arrayIndex;Ht++){var tr=xe.layers[Ht];uo(tr.id)===Rt&&k.push(new Cn(ne,V.id,'duplicate layer id "'+V.id+'", previously used at line '+tr.id.__line__))}if("ref"in V){["type","source","source-layer","filter","layout"].forEach(function(pa){pa in V&&k.push(new Cn(ne,V[pa],'"'+pa+'" is prohibited for ref layers'))});var Cr;xe.layers.forEach(function(pa){uo(pa.id)===ht&&(Cr=pa)}),Cr?Cr.ref?k.push(new Cn(ne,V.ref,"ref cannot reference another ref layer")):Ve=uo(Cr.type):k.push(new Cn(ne,V.ref,'ref layer "'+ht+'" not found'))}else if(Ve!=="background")if(!V.source)k.push(new Cn(ne,V,'missing required property "source"'));else{var Xr=xe.sources&&xe.sources[V.source],qr=Xr&&uo(Xr.type);Xr?qr==="vector"&&Ve==="raster"?k.push(new Cn(ne,V.source,'layer "'+V.id+'" requires a raster source')):qr==="raster"&&Ve!=="raster"?k.push(new Cn(ne,V.source,'layer "'+V.id+'" requires a vector source')):qr==="vector"&&!V["source-layer"]?k.push(new Cn(ne,V,'layer "'+V.id+'" must specify a "source-layer"')):qr==="raster-dem"&&Ve!=="hillshade"?k.push(new Cn(ne,V.source,"raster-dem source can only be used with layer type 'hillshade'.")):Ve==="line"&&V.paint&&V.paint["line-gradient"]&&(qr!=="geojson"||!Xr.lineMetrics)&&k.push(new Cn(ne,V,'layer "'+V.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):k.push(new Cn(ne,V.source,'source "'+V.source+'" not found'))}return k=k.concat(Oe({key:ne,value:V,valueSpec:Ie.layer,style:C.style,styleSpec:C.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return So({key:ne+".type",value:V.type,valueSpec:Ie.layer.type,style:C.style,styleSpec:C.styleSpec,object:V,objectKey:"type"})},filter:Br,layout:function(ja){return Oe({layer:V,key:ja.key,value:ja.value,style:ja.style,styleSpec:ja.styleSpec,objectElementValidators:{"*":function(li){return Oa(Bs({layerType:Ve},li))}}})},paint:function(ja){return Oe({layer:V,key:ja.key,value:ja.value,style:ja.style,styleSpec:ja.styleSpec,objectElementValidators:{"*":function(li){return Sa(Bs({layerType:Ve},li))}}})}}})),k}function Wi(C){var k=C.value,V=C.key,ne=Io(k);return ne!=="string"?[new Cn(V,k,"string expected, "+ne+" found")]:[]}var Gi={promoteId:Tn};function on(C){var k=C.value,V=C.key,ne=C.styleSpec,xe=C.style;if(!k.type)return[new Cn(V,k,'"type" is required')];var Ie=uo(k.type),Ve;switch(Ie){case"vector":case"raster":case"raster-dem":return Ve=Oe({key:V,value:k,valueSpec:ne["source_"+Ie.replace("-","_")],style:C.style,styleSpec:ne,objectElementValidators:Gi}),Ve;case"geojson":if(Ve=Oe({key:V,value:k,valueSpec:ne.source_geojson,style:xe,styleSpec:ne,objectElementValidators:Gi}),k.cluster)for(var ht in k.clusterProperties){var Rt=k.clusterProperties[ht],Ht=Rt[0],tr=Rt[1],Cr=typeof Ht=="string"?[Ht,["accumulated"],["get",ht]]:Ht;Ve.push.apply(Ve,$t({key:V+"."+ht+".map",value:tr,expressionContext:"cluster-map"})),Ve.push.apply(Ve,$t({key:V+"."+ht+".reduce",value:Cr,expressionContext:"cluster-reduce"}))}return Ve;case"video":return Oe({key:V,value:k,valueSpec:ne.source_video,style:xe,styleSpec:ne});case"image":return Oe({key:V,value:k,valueSpec:ne.source_image,style:xe,styleSpec:ne});case"canvas":return[new Cn(V,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yr({key:V+".type",value:k.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:xe,styleSpec:ne})}}function Tn(C){var k=C.key,V=C.value;if(Io(V)==="string")return Wi({key:k,value:V});var ne=[];for(var xe in V)ne.push.apply(ne,Wi({key:k+"."+xe,value:V[xe]}));return ne}function Wn(C){var k=C.value,V=C.styleSpec,ne=V.light,xe=C.style,Ie=[],Ve=Io(k);if(k===void 0)return Ie;if(Ve!=="object")return Ie=Ie.concat([new Cn("light",k,"object expected, "+Ve+" found")]),Ie;for(var ht in k){var Rt=ht.match(/^(.*)-transition$/);Rt&&ne[Rt[1]]&&ne[Rt[1]].transition?Ie=Ie.concat(So({key:ht,value:k[ht],valueSpec:V.transition,style:xe,styleSpec:V})):ne[ht]?Ie=Ie.concat(So({key:ht,value:k[ht],valueSpec:ne[ht],style:xe,styleSpec:V})):Ie=Ie.concat([new Cn(ht,k[ht],'unknown property "'+ht+'"')])}return Ie}function Bn(C){return Wi(C).length===0?[]:$t(C)}function Ao(C){return Wi(C).length===0?[]:$t(C)}var ss={"*":function(){return[]},array:pt,boolean:br,number:At,color:Ar,constants:tl,enum:Yr,filter:Br,function:Bt,layer:di,object:Oe,source:on,light:Wn,string:Wi,formatted:Bn,resolvedImage:Ao};function So(C){var k=C.value,V=C.valueSpec,ne=C.styleSpec;if(V.expression&&Xs(uo(k)))return Bt(C);if(V.expression&&fo($s(k)))return $t(C);if(V.type&&ss[V.type])return ss[V.type](C);var xe=Oe(Bs({},C,{valueSpec:V.type?ne[V.type]:V}));return xe}function Ko(C){var k=C.value,V=C.key,ne=Wi(C);return ne.length||(k.indexOf("{fontstack}")===-1&&ne.push(new Cn(V,k,'"glyphs" url must include a "{fontstack}" token')),k.indexOf("{range}")===-1&&ne.push(new Cn(V,k,'"glyphs" url must include a "{range}" token'))),ne}function hs(C,k){k===void 0&&(k=Ui);var V=[];return V=V.concat(So({key:"",value:C,valueSpec:k.$root,styleSpec:k,style:C,objectElementValidators:{glyphs:Ko,"*":function(){return[]}}})),C.constants&&(V=V.concat(tl({key:"constants",value:C.constants,style:C,styleSpec:k}))),ll(V)}hs.source=Js(on),hs.light=Js(Wn),hs.layer=Js(di),hs.filter=Js(Br),hs.paintProperty=Js(Sa),hs.layoutProperty=Js(Oa);function ll(C){return[].concat(C).sort(function(k,V){return k.line-V.line})}function Js(C){return function(){for(var k=[],V=arguments.length;V--;)k[V]=arguments[V];return ll(C.apply(this,k))}}var es=hs,ts=es.light,Pl=es.paintProperty,$l=es.layoutProperty;function Ru(C,k){var V=!1;if(k&&k.length)for(var ne=0,xe=k;ne<xe.length;ne+=1){var Ie=xe[ne];C.fire(new Kr(new Error(Ie.message))),V=!0}return V}var hu=su,wl=3;function su(C,k,V){var ne=this.cells=[];if(C instanceof ArrayBuffer){this.arrayBuffer=C;var xe=new Int32Array(this.arrayBuffer);C=xe[0],k=xe[1],V=xe[2],this.d=k+2*V;for(var Ie=0;Ie<this.d*this.d;Ie++){var Ve=xe[wl+Ie],ht=xe[wl+Ie+1];ne.push(Ve===ht?null:xe.subarray(Ve,ht))}var Rt=xe[wl+ne.length],Ht=xe[wl+ne.length+1];this.keys=xe.subarray(Rt,Ht),this.bboxes=xe.subarray(Ht),this.insert=this._insertReadonly}else{this.d=k+2*V;for(var tr=0;tr<this.d*this.d;tr++)ne.push([]);this.keys=[],this.bboxes=[]}this.n=k,this.extent=C,this.padding=V,this.scale=k/C,this.uid=0;var Cr=V/k*C;this.min=-Cr,this.max=C+Cr}su.prototype.insert=function(C,k,V,ne,xe){this._forEachCell(k,V,ne,xe,this._insertCell,this.uid++),this.keys.push(C),this.bboxes.push(k),this.bboxes.push(V),this.bboxes.push(ne),this.bboxes.push(xe)},su.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},su.prototype._insertCell=function(C,k,V,ne,xe,Ie){this.cells[xe].push(Ie)},su.prototype.query=function(C,k,V,ne,xe){var Ie=this.min,Ve=this.max;if(C<=Ie&&k<=Ie&&Ve<=V&&Ve<=ne&&!xe)return Array.prototype.slice.call(this.keys);var ht=[],Rt={};return this._forEachCell(C,k,V,ne,this._queryCell,ht,Rt,xe),ht},su.prototype._queryCell=function(C,k,V,ne,xe,Ie,Ve,ht){var Rt=this.cells[xe];if(Rt!==null)for(var Ht=this.keys,tr=this.bboxes,Cr=0;Cr<Rt.length;Cr++){var Xr=Rt[Cr];if(Ve[Xr]===void 0){var qr=Xr*4;(ht?ht(tr[qr+0],tr[qr+1],tr[qr+2],tr[qr+3]):C<=tr[qr+2]&&k<=tr[qr+3]&&V>=tr[qr+0]&&ne>=tr[qr+1])?(Ve[Xr]=!0,Ie.push(Ht[Xr])):Ve[Xr]=!1}}},su.prototype._forEachCell=function(C,k,V,ne,xe,Ie,Ve,ht){for(var Rt=this._convertToCellCoord(C),Ht=this._convertToCellCoord(k),tr=this._convertToCellCoord(V),Cr=this._convertToCellCoord(ne),Xr=Rt;Xr<=tr;Xr++)for(var qr=Ht;qr<=Cr;qr++){var pa=this.d*qr+Xr;if(!(ht&&!ht(this._convertFromCellCoord(Xr),this._convertFromCellCoord(qr),this._convertFromCellCoord(Xr+1),this._convertFromCellCoord(qr+1)))&&xe.call(this,C,k,V,ne,pa,Ie,Ve,ht))return}},su.prototype._convertFromCellCoord=function(C){return(C-this.padding)/this.scale},su.prototype._convertToCellCoord=function(C){return Math.max(0,Math.min(this.d-1,Math.floor(C*this.scale)+this.padding))},su.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var C=this.cells,k=wl+this.cells.length+1+1,V=0,ne=0;ne<this.cells.length;ne++)V+=this.cells[ne].length;var xe=new Int32Array(k+V+this.keys.length+this.bboxes.length);xe[0]=this.extent,xe[1]=this.n,xe[2]=this.padding;for(var Ie=k,Ve=0;Ve<C.length;Ve++){var ht=C[Ve];xe[wl+Ve]=Ie,xe.set(ht,Ie),Ie+=ht.length}return xe[wl+C.length]=Ie,xe.set(this.keys,Ie),Ie+=this.keys.length,xe[wl+C.length+1]=Ie,xe.set(this.bboxes,Ie),Ie+=this.bboxes.length,xe.buffer};var uc=s.ImageData,ql=s.ImageBitmap,Vl={};function de(C,k,V){V===void 0&&(V={}),Object.defineProperty(k,"_classRegistryKey",{value:C,writeable:!1}),Vl[C]={klass:k,omit:V.omit||[],shallow:V.shallow||[]}}de("Object",Object),hu.serialize=function(k,V){var ne=k.toArrayBuffer();return V&&V.push(ne),{buffer:ne}},hu.deserialize=function(k){return new hu(k.buffer)},de("Grid",hu),de("Color",Us),de("Error",Error),de("ResolvedImage",Ll),de("StylePropertyFunction",Ne),de("StyleExpression",gc,{omit:["_evaluator"]}),de("ZoomDependentExpression",lc),de("ZoomConstantExpression",Ic),de("CompoundExpression",Qn,{omit:["_evaluate"]});for(var De in _o)_o[De]._classRegistryKey||de("Expression_"+De,_o[De]);function et(C){return C&&typeof ArrayBuffer<"u"&&(C instanceof ArrayBuffer||C.constructor&&C.constructor.name==="ArrayBuffer")}function vt(C){return ql&&C instanceof ql}function _t(C,k){if(C==null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||C instanceof Boolean||C instanceof Number||C instanceof String||C instanceof Date||C instanceof RegExp)return C;if(et(C)||vt(C))return k&&k.push(C),C;if(ArrayBuffer.isView(C)){var V=C;return k&&k.push(V.buffer),V}if(C instanceof uc)return k&&k.push(C.data.buffer),C;if(Array.isArray(C)){for(var ne=[],xe=0,Ie=C;xe<Ie.length;xe+=1){var Ve=Ie[xe];ne.push(_t(Ve,k))}return ne}if(typeof C=="object"){var ht=C.constructor,Rt=ht._classRegistryKey;if(!Rt)throw new Error("can't serialize object of unregistered class");var Ht=ht.serialize?ht.serialize(C,k):{};if(!ht.serialize){for(var tr in C)if(C.hasOwnProperty(tr)&&!(Vl[Rt].omit.indexOf(tr)>=0)){var Cr=C[tr];Ht[tr]=Vl[Rt].shallow.indexOf(tr)>=0?Cr:_t(Cr,k)}C instanceof Error&&(Ht.message=C.message)}if(Ht.$name)throw new Error("$name property is reserved for worker serialization logic.");return Rt!=="Object"&&(Ht.$name=Rt),Ht}throw new Error("can't serialize object of type "+typeof C)}function St(C){if(C==null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||C instanceof Boolean||C instanceof Number||C instanceof String||C instanceof Date||C instanceof RegExp||et(C)||vt(C)||ArrayBuffer.isView(C)||C instanceof uc)return C;if(Array.isArray(C))return C.map(St);if(typeof C=="object"){var k=C.$name||"Object",V=Vl[k],ne=V.klass;if(!ne)throw new Error("can't deserialize unregistered class "+k);if(ne.deserialize)return ne.deserialize(C);for(var xe=Object.create(ne.prototype),Ie=0,Ve=Object.keys(C);Ie<Ve.length;Ie+=1){var ht=Ve[Ie];if(ht!=="$name"){var Rt=C[ht];xe[ht]=Vl[k].shallow.indexOf(ht)>=0?Rt:St(Rt)}}return xe}throw new Error("can't deserialize object of type "+typeof C)}var ar=function(){this.first=!0};ar.prototype.update=function(k,V){var ne=Math.floor(k);return this.first?(this.first=!1,this.lastIntegerZoom=ne,this.lastIntegerZoomTime=0,this.lastZoom=k,this.lastFloorZoom=ne,!0):(this.lastFloorZoom>ne?(this.lastIntegerZoom=ne+1,this.lastIntegerZoomTime=V):this.lastFloorZoom<ne&&(this.lastIntegerZoom=ne,this.lastIntegerZoomTime=V),k!==this.lastZoom?(this.lastZoom=k,this.lastFloorZoom=ne,!0):!1)};var zt={"Latin-1 Supplement":function(C){return C>=128&&C<=255},Arabic:function(C){return C>=1536&&C<=1791},"Arabic Supplement":function(C){return C>=1872&&C<=1919},"Arabic Extended-A":function(C){return C>=2208&&C<=2303},"Hangul Jamo":function(C){return C>=4352&&C<=4607},"Unified Canadian Aboriginal Syllabics":function(C){return C>=5120&&C<=5759},Khmer:function(C){return C>=6016&&C<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(C){return C>=6320&&C<=6399},"General Punctuation":function(C){return C>=8192&&C<=8303},"Letterlike Symbols":function(C){return C>=8448&&C<=8527},"Number Forms":function(C){return C>=8528&&C<=8591},"Miscellaneous Technical":function(C){return C>=8960&&C<=9215},"Control Pictures":function(C){return C>=9216&&C<=9279},"Optical Character Recognition":function(C){return C>=9280&&C<=9311},"Enclosed Alphanumerics":function(C){return C>=9312&&C<=9471},"Geometric Shapes":function(C){return C>=9632&&C<=9727},"Miscellaneous Symbols":function(C){return C>=9728&&C<=9983},"Miscellaneous Symbols and Arrows":function(C){return C>=11008&&C<=11263},"CJK Radicals Supplement":function(C){return C>=11904&&C<=12031},"Kangxi Radicals":function(C){return C>=12032&&C<=12255},"Ideographic Description Characters":function(C){return C>=12272&&C<=12287},"CJK Symbols and Punctuation":function(C){return C>=12288&&C<=12351},Hiragana:function(C){return C>=12352&&C<=12447},Katakana:function(C){return C>=12448&&C<=12543},Bopomofo:function(C){return C>=12544&&C<=12591},"Hangul Compatibility Jamo":function(C){return C>=12592&&C<=12687},Kanbun:function(C){return C>=12688&&C<=12703},"Bopomofo Extended":function(C){return C>=12704&&C<=12735},"CJK Strokes":function(C){return C>=12736&&C<=12783},"Katakana Phonetic Extensions":function(C){return C>=12784&&C<=12799},"Enclosed CJK Letters and Months":function(C){return C>=12800&&C<=13055},"CJK Compatibility":function(C){return C>=13056&&C<=13311},"CJK Unified Ideographs Extension A":function(C){return C>=13312&&C<=19903},"Yijing Hexagram Symbols":function(C){return C>=19904&&C<=19967},"CJK Unified Ideographs":function(C){return C>=19968&&C<=40959},"Yi Syllables":function(C){return C>=40960&&C<=42127},"Yi Radicals":function(C){return C>=42128&&C<=42191},"Hangul Jamo Extended-A":function(C){return C>=43360&&C<=43391},"Hangul Syllables":function(C){return C>=44032&&C<=55215},"Hangul Jamo Extended-B":function(C){return C>=55216&&C<=55295},"Private Use Area":function(C){return C>=57344&&C<=63743},"CJK Compatibility Ideographs":function(C){return C>=63744&&C<=64255},"Arabic Presentation Forms-A":function(C){return C>=64336&&C<=65023},"Vertical Forms":function(C){return C>=65040&&C<=65055},"CJK Compatibility Forms":function(C){return C>=65072&&C<=65103},"Small Form Variants":function(C){return C>=65104&&C<=65135},"Arabic Presentation Forms-B":function(C){return C>=65136&&C<=65279},"Halfwidth and Fullwidth Forms":function(C){return C>=65280&&C<=65519}};function gr(C){for(var k=0,V=C;k<V.length;k+=1){var ne=V[k];if(ya(ne.charCodeAt(0)))return!0}return!1}function Vr(C){for(var k=0,V=C;k<V.length;k+=1){var ne=V[k];if(!Wr(ne.charCodeAt(0)))return!1}return!0}function Wr(C){return!(zt.Arabic(C)||zt["Arabic Supplement"](C)||zt["Arabic Extended-A"](C)||zt["Arabic Presentation Forms-A"](C)||zt["Arabic Presentation Forms-B"](C))}function Ta(C){return C<11904?!1:!!(zt["Bopomofo Extended"](C)||zt.Bopomofo(C)||zt["CJK Compatibility Forms"](C)||zt["CJK Compatibility Ideographs"](C)||zt["CJK Compatibility"](C)||zt["CJK Radicals Supplement"](C)||zt["CJK Strokes"](C)||zt["CJK Symbols and Punctuation"](C)||zt["CJK Unified Ideographs Extension A"](C)||zt["CJK Unified Ideographs"](C)||zt["Enclosed CJK Letters and Months"](C)||zt["Halfwidth and Fullwidth Forms"](C)||zt.Hiragana(C)||zt["Ideographic Description Characters"](C)||zt["Kangxi Radicals"](C)||zt["Katakana Phonetic Extensions"](C)||zt.Katakana(C)||zt["Vertical Forms"](C)||zt["Yi Radicals"](C)||zt["Yi Syllables"](C))}function ya(C){return C===746||C===747?!0:C<4352?!1:!!(zt["Bopomofo Extended"](C)||zt.Bopomofo(C)||zt["CJK Compatibility Forms"](C)&&!(C>=65097&&C<=65103)||zt["CJK Compatibility Ideographs"](C)||zt["CJK Compatibility"](C)||zt["CJK Radicals Supplement"](C)||zt["CJK Strokes"](C)||zt["CJK Symbols and Punctuation"](C)&&!(C>=12296&&C<=12305)&&!(C>=12308&&C<=12319)&&C!==12336||zt["CJK Unified Ideographs Extension A"](C)||zt["CJK Unified Ideographs"](C)||zt["Enclosed CJK Letters and Months"](C)||zt["Hangul Compatibility Jamo"](C)||zt["Hangul Jamo Extended-A"](C)||zt["Hangul Jamo Extended-B"](C)||zt["Hangul Jamo"](C)||zt["Hangul Syllables"](C)||zt.Hiragana(C)||zt["Ideographic Description Characters"](C)||zt.Kanbun(C)||zt["Kangxi Radicals"](C)||zt["Katakana Phonetic Extensions"](C)||zt.Katakana(C)&&C!==12540||zt["Halfwidth and Fullwidth Forms"](C)&&C!==65288&&C!==65289&&C!==65293&&!(C>=65306&&C<=65310)&&C!==65339&&C!==65341&&C!==65343&&!(C>=65371&&C<=65503)&&C!==65507&&!(C>=65512&&C<=65519)||zt["Small Form Variants"](C)&&!(C>=65112&&C<=65118)&&!(C>=65123&&C<=65126)||zt["Unified Canadian Aboriginal Syllabics"](C)||zt["Unified Canadian Aboriginal Syllabics Extended"](C)||zt["Vertical Forms"](C)||zt["Yijing Hexagram Symbols"](C)||zt["Yi Syllables"](C)||zt["Yi Radicals"](C))}function ri(C){return!!(zt["Latin-1 Supplement"](C)&&(C===167||C===169||C===174||C===177||C===188||C===189||C===190||C===215||C===247)||zt["General Punctuation"](C)&&(C===8214||C===8224||C===8225||C===8240||C===8241||C===8251||C===8252||C===8258||C===8263||C===8264||C===8265||C===8273)||zt["Letterlike Symbols"](C)||zt["Number Forms"](C)||zt["Miscellaneous Technical"](C)&&(C>=8960&&C<=8967||C>=8972&&C<=8991||C>=8996&&C<=9e3||C===9003||C>=9085&&C<=9114||C>=9150&&C<=9165||C===9167||C>=9169&&C<=9179||C>=9186&&C<=9215)||zt["Control Pictures"](C)&&C!==9251||zt["Optical Character Recognition"](C)||zt["Enclosed Alphanumerics"](C)||zt["Geometric Shapes"](C)||zt["Miscellaneous Symbols"](C)&&!(C>=9754&&C<=9759)||zt["Miscellaneous Symbols and Arrows"](C)&&(C>=11026&&C<=11055||C>=11088&&C<=11097||C>=11192&&C<=11243)||zt["CJK Symbols and Punctuation"](C)||zt.Katakana(C)||zt["Private Use Area"](C)||zt["CJK Compatibility Forms"](C)||zt["Small Form Variants"](C)||zt["Halfwidth and Fullwidth Forms"](C)||C===8734||C===8756||C===8757||C>=9984&&C<=10087||C>=10102&&C<=10131||C===65532||C===65533)}function ni(C){return!(ya(C)||ri(C))}function Ma(C){return zt.Arabic(C)||zt["Arabic Supplement"](C)||zt["Arabic Extended-A"](C)||zt["Arabic Presentation Forms-A"](C)||zt["Arabic Presentation Forms-B"](C)}function Na(C){return C>=1424&&C<=2303||zt["Arabic Presentation Forms-A"](C)||zt["Arabic Presentation Forms-B"](C)}function Ka(C,k){return!(!k&&Na(C)||C>=2304&&C<=3583||C>=3840&&C<=4255||zt.Khmer(C))}function vi(C){for(var k=0,V=C;k<V.length;k+=1){var ne=V[k];if(Na(ne.charCodeAt(0)))return!0}return!1}function ui(C,k){for(var V=0,ne=C;V<ne.length;V+=1){var xe=ne[V];if(!Ka(xe.charCodeAt(0),k))return!1}return!0}var Pa={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},sn=null,an=Pa.unavailable,vn=null,Pn=function(C){C&&typeof C=="string"&&C.indexOf("NetworkError")>-1&&(an=Pa.error),sn&&sn(C)};function Zn(){eo.fire(new Gr("pluginStateChange",{pluginStatus:an,pluginURL:vn}))}var eo=new Ur,$o=function(){return an},io=function(C){return C({pluginStatus:an,pluginURL:vn}),eo.on("pluginStateChange",C),C},Zo=function(C,k,V){if(V===void 0&&(V=!1),an===Pa.deferred||an===Pa.loading||an===Pa.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");vn=be.resolveURL(C),an=Pa.deferred,sn=k,Zn(),V||ul()},ul=function(){if(an!==Pa.deferred||!vn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");an=Pa.loading,Zn(),vn&&ma({url:vn},function(C){C?Pn(C):(an=Pa.loaded,Zn())})},el={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return an===Pa.loaded||el.applyArabicShaping!=null},isLoading:function(){return an===Pa.loading},setState:function(k){an=k.pluginStatus,vn=k.pluginURL},isParsed:function(){return el.applyArabicShaping!=null&&el.processBidirectionalText!=null&&el.processStyledBidirectionalText!=null},getPluginURL:function(){return vn}},_l=function(){!el.isLoading()&&!el.isLoaded()&&$o()==="deferred"&&ul()},gn=function(k,V){this.zoom=k,V?(this.now=V.now,this.fadeDuration=V.fadeDuration,this.zoomHistory=V.zoomHistory,this.transition=V.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ar,this.transition={})};gn.prototype.isSupportedScript=function(k){return ui(k,el.isLoaded())},gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},gn.prototype.getCrossfadeParameters=function(){var k=this.zoom,V=k-Math.floor(k),ne=this.crossFadingFactor();return k>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:V+(1-V)*ne}:{fromScale:.5,toScale:1,t:1-(1-ne)*V}};var vo=function(k,V){this.property=k,this.value=V,this.expression=R(V===void 0?k.specification.default:V,k.specification)};vo.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},vo.prototype.possiblyEvaluate=function(k,V,ne){return this.property.possiblyEvaluate(this,k,V,ne)};var cs=function(k){this.property=k,this.value=new vo(k,void 0)};cs.prototype.transitioned=function(k,V){return new Tl(this.property,this.value,V,y({},k.transition,this.transition),k.now)},cs.prototype.untransitioned=function(){return new Tl(this.property,this.value,null,{},0)};var ps=function(k){this._properties=k,this._values=Object.create(k.defaultTransitionablePropertyValues)};ps.prototype.getValue=function(k){return O(this._values[k].value.value)},ps.prototype.setValue=function(k,V){this._values.hasOwnProperty(k)||(this._values[k]=new cs(this._values[k].property)),this._values[k].value=new vo(this._values[k].property,V===null?void 0:O(V))},ps.prototype.getTransition=function(k){return O(this._values[k].transition)},ps.prototype.setTransition=function(k,V){this._values.hasOwnProperty(k)||(this._values[k]=new cs(this._values[k].property)),this._values[k].transition=O(V)||void 0},ps.prototype.serialize=function(){for(var k={},V=0,ne=Object.keys(this._values);V<ne.length;V+=1){var xe=ne[V],Ie=this.getValue(xe);Ie!==void 0&&(k[xe]=Ie);var Ve=this.getTransition(xe);Ve!==void 0&&(k[xe+"-transition"]=Ve)}return k},ps.prototype.transitioned=function(k,V){for(var ne=new Gl(this._properties),xe=0,Ie=Object.keys(this._values);xe<Ie.length;xe+=1){var Ve=Ie[xe];ne._values[Ve]=this._values[Ve].transitioned(k,V._values[Ve])}return ne},ps.prototype.untransitioned=function(){for(var k=new Gl(this._properties),V=0,ne=Object.keys(this._values);V<ne.length;V+=1){var xe=ne[V];k._values[xe]=this._values[xe].untransitioned()}return k};var Tl=function(k,V,ne,xe,Ie){this.property=k,this.value=V,this.begin=Ie+xe.delay||0,this.end=this.begin+xe.duration||0,k.specification.transition&&(xe.delay||xe.duration)&&(this.prior=ne)};Tl.prototype.possiblyEvaluate=function(k,V,ne){var xe=k.now||0,Ie=this.value.possiblyEvaluate(k,V,ne),Ve=this.prior;if(Ve){if(xe>this.end)return this.prior=null,Ie;if(this.value.isDataDriven())return this.prior=null,Ie;if(xe<this.begin)return Ve.possiblyEvaluate(k,V,ne);var ht=(xe-this.begin)/(this.end-this.begin);return this.property.interpolate(Ve.possiblyEvaluate(k,V,ne),Ie,g(ht))}else return Ie};var Gl=function(k){this._properties=k,this._values=Object.create(k.defaultTransitioningPropertyValues)};Gl.prototype.possiblyEvaluate=function(k,V,ne){for(var xe=new yc(this._properties),Ie=0,Ve=Object.keys(this._values);Ie<Ve.length;Ie+=1){var ht=Ve[Ie];xe._values[ht]=this._values[ht].possiblyEvaluate(k,V,ne)}return xe},Gl.prototype.hasTransition=function(){for(var k=0,V=Object.keys(this._values);k<V.length;k+=1){var ne=V[k];if(this._values[ne].prior)return!0}return!1};var Tu=function(k){this._properties=k,this._values=Object.create(k.defaultPropertyValues)};Tu.prototype.getValue=function(k){return O(this._values[k].value)},Tu.prototype.setValue=function(k,V){this._values[k]=new vo(this._values[k].property,V===null?void 0:O(V))},Tu.prototype.serialize=function(){for(var k={},V=0,ne=Object.keys(this._values);V<ne.length;V+=1){var xe=ne[V],Ie=this.getValue(xe);Ie!==void 0&&(k[xe]=Ie)}return k},Tu.prototype.possiblyEvaluate=function(k,V,ne){for(var xe=new yc(this._properties),Ie=0,Ve=Object.keys(this._values);Ie<Ve.length;Ie+=1){var ht=Ve[Ie];xe._values[ht]=this._values[ht].possiblyEvaluate(k,V,ne)}return xe};var Il=function(k,V,ne){this.property=k,this.value=V,this.parameters=ne};Il.prototype.isConstant=function(){return this.value.kind==="constant"},Il.prototype.constantOr=function(k){return this.value.kind==="constant"?this.value.value:k},Il.prototype.evaluate=function(k,V,ne,xe){return this.property.evaluate(this.value,this.parameters,k,V,ne,xe)};var yc=function(k){this._properties=k,this._values=Object.create(k.defaultPossiblyEvaluatedValues)};yc.prototype.get=function(k){return this._values[k]};var nt=function(k){this.specification=k};nt.prototype.possiblyEvaluate=function(k,V){return k.expression.evaluate(V)},nt.prototype.interpolate=function(k,V,ne){var xe=Bu[this.specification.type];return xe?xe(k,V,ne):k};var Yt=function(k,V){this.specification=k,this.overrides=V};Yt.prototype.possiblyEvaluate=function(k,V,ne,xe){return k.expression.kind==="constant"||k.expression.kind==="camera"?new Il(this,{kind:"constant",value:k.expression.evaluate(V,null,{},ne,xe)},V):new Il(this,k.expression,V)},Yt.prototype.interpolate=function(k,V,ne){if(k.value.kind!=="constant"||V.value.kind!=="constant")return k;if(k.value.value===void 0||V.value.value===void 0)return new Il(this,{kind:"constant",value:void 0},k.parameters);var xe=Bu[this.specification.type];return xe?new Il(this,{kind:"constant",value:xe(k.value.value,V.value.value,ne)},k.parameters):k},Yt.prototype.evaluate=function(k,V,ne,xe,Ie,Ve){return k.kind==="constant"?k.value:k.evaluate(V,ne,xe,Ie,Ve)};var cr=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.possiblyEvaluate=function(ne,xe,Ie,Ve){if(ne.value===void 0)return new Il(this,{kind:"constant",value:void 0},xe);if(ne.expression.kind==="constant"){var ht=ne.expression.evaluate(xe,null,{},Ie,Ve),Rt=ne.property.specification.type==="resolvedImage",Ht=Rt&&typeof ht!="string"?ht.name:ht,tr=this._calculate(Ht,Ht,Ht,xe);return new Il(this,{kind:"constant",value:tr},xe)}else if(ne.expression.kind==="camera"){var Cr=this._calculate(ne.expression.evaluate({zoom:xe.zoom-1}),ne.expression.evaluate({zoom:xe.zoom}),ne.expression.evaluate({zoom:xe.zoom+1}),xe);return new Il(this,{kind:"constant",value:Cr},xe)}else return new Il(this,ne.expression,xe)},k.prototype.evaluate=function(ne,xe,Ie,Ve,ht,Rt){if(ne.kind==="source"){var Ht=ne.evaluate(xe,Ie,Ve,ht,Rt);return this._calculate(Ht,Ht,Ht,xe)}else return ne.kind==="composite"?this._calculate(ne.evaluate({zoom:Math.floor(xe.zoom)-1},Ie,Ve),ne.evaluate({zoom:Math.floor(xe.zoom)},Ie,Ve),ne.evaluate({zoom:Math.floor(xe.zoom)+1},Ie,Ve),xe):ne.value},k.prototype._calculate=function(ne,xe,Ie,Ve){var ht=Ve.zoom;return ht>Ve.zoomHistory.lastIntegerZoom?{from:ne,to:xe}:{from:Ie,to:xe}},k.prototype.interpolate=function(ne){return ne},k}(Yt),ua=function(k){this.specification=k};ua.prototype.possiblyEvaluate=function(k,V,ne,xe){if(k.value!==void 0)if(k.expression.kind==="constant"){var Ie=k.expression.evaluate(V,null,{},ne,xe);return this._calculate(Ie,Ie,Ie,V)}else return this._calculate(k.expression.evaluate(new gn(Math.floor(V.zoom-1),V)),k.expression.evaluate(new gn(Math.floor(V.zoom),V)),k.expression.evaluate(new gn(Math.floor(V.zoom+1),V)),V)},ua.prototype._calculate=function(k,V,ne,xe){var Ie=xe.zoom;return Ie>xe.zoomHistory.lastIntegerZoom?{from:k,to:V}:{from:ne,to:V}},ua.prototype.interpolate=function(k){return k};var Aa=function(k){this.specification=k};Aa.prototype.possiblyEvaluate=function(k,V,ne,xe){return!!k.expression.evaluate(V,null,{},ne,xe)},Aa.prototype.interpolate=function(){return!1};var xa=function(k){this.properties=k,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var V in k){var ne=k[V];ne.specification.overridable&&this.overridableProperties.push(V);var xe=this.defaultPropertyValues[V]=new vo(ne,void 0),Ie=this.defaultTransitionablePropertyValues[V]=new cs(ne);this.defaultTransitioningPropertyValues[V]=Ie.untransitioned(),this.defaultPossiblyEvaluatedValues[V]=xe.possiblyEvaluate({})}};de("DataDrivenProperty",Yt),de("DataConstantProperty",nt),de("CrossFadedDataDrivenProperty",cr),de("CrossFadedProperty",ua),de("ColorRampProperty",Aa);var wa="-transition",Ja=function(C){function k(V,ne){if(C.call(this),this.id=V.id,this.type=V.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},V.type!=="custom"&&(V=V,this.metadata=V.metadata,this.minzoom=V.minzoom,this.maxzoom=V.maxzoom,V.type!=="background"&&(this.source=V.source,this.sourceLayer=V["source-layer"],this.filter=V.filter),ne.layout&&(this._unevaluatedLayout=new Tu(ne.layout)),ne.paint)){this._transitionablePaint=new ps(ne.paint);for(var xe in V.paint)this.setPaintProperty(xe,V.paint[xe],{validate:!1});for(var Ie in V.layout)this.setLayoutProperty(Ie,V.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(ne.paint)}}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},k.prototype.getLayoutProperty=function(ne){return ne==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ne)},k.prototype.setLayoutProperty=function(ne,xe,Ie){if(Ie===void 0&&(Ie={}),xe!=null){var Ve="layers."+this.id+".layout."+ne;if(this._validate($l,Ve,ne,xe,Ie))return}if(ne==="visibility"){this.visibility=xe;return}this._unevaluatedLayout.setValue(ne,xe)},k.prototype.getPaintProperty=function(ne){return z(ne,wa)?this._transitionablePaint.getTransition(ne.slice(0,-wa.length)):this._transitionablePaint.getValue(ne)},k.prototype.setPaintProperty=function(ne,xe,Ie){if(Ie===void 0&&(Ie={}),xe!=null){var Ve="layers."+this.id+".paint."+ne;if(this._validate(Pl,Ve,ne,xe,Ie))return!1}if(z(ne,wa))return this._transitionablePaint.setTransition(ne.slice(0,-wa.length),xe||void 0),!1;var ht=this._transitionablePaint._values[ne],Rt=ht.property.specification["property-type"]==="cross-faded-data-driven",Ht=ht.value.isDataDriven(),tr=ht.value;this._transitionablePaint.setValue(ne,xe),this._handleSpecialPaintPropertyUpdate(ne);var Cr=this._transitionablePaint._values[ne].value,Xr=Cr.isDataDriven();return Xr||Ht||Rt||this._handleOverridablePaintPropertyUpdate(ne,tr,Cr)},k.prototype._handleSpecialPaintPropertyUpdate=function(ne){},k.prototype._handleOverridablePaintPropertyUpdate=function(ne,xe,Ie){return!1},k.prototype.isHidden=function(ne){return this.minzoom&&ne<this.minzoom||this.maxzoom&&ne>=this.maxzoom?!0:this.visibility==="none"},k.prototype.updateTransitions=function(ne){this._transitioningPaint=this._transitionablePaint.transitioned(ne,this._transitioningPaint)},k.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},k.prototype.recalculate=function(ne,xe){ne.getCrossfadeParameters&&(this._crossfadeParameters=ne.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ne,void 0,xe)),this.paint=this._transitioningPaint.possiblyEvaluate(ne,void 0,xe)},k.prototype.serialize=function(){var ne={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&&(ne.layout=ne.layout||{},ne.layout.visibility=this.visibility),B(ne,function(xe,Ie){return xe!==void 0&&!(Ie==="layout"&&!Object.keys(xe).length)&&!(Ie==="paint"&&!Object.keys(xe).length)})},k.prototype._validate=function(ne,xe,Ie,Ve,ht){return ht===void 0&&(ht={}),ht&&ht.validate===!1?!1:Ru(this,ne.call(es,{key:xe,layerType:this.type,objectKey:Ie,value:Ve,styleSpec:Ui,style:{glyphs:!0,sprite:!0}}))},k.prototype.is3D=function(){return!1},k.prototype.isTileClipped=function(){return!1},k.prototype.hasOffscreenPass=function(){return!1},k.prototype.resize=function(){},k.prototype.isStateDependent=function(){for(var ne in this.paint._values){var xe=this.paint.get(ne);if(!(!(xe instanceof Il)||!yl(xe.property.specification))&&(xe.value.kind==="source"||xe.value.kind==="composite")&&xe.value.isStateDependent)return!0}return!1},k}(Ur),Ai={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bi=function(k,V){this._structArray=k,this._pos1=V*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},fi=128,yn=5,Oi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Oi.serialize=function(k,V){return k._trim(),V&&(k.isTransferred=!0,V.push(k.arrayBuffer)),{length:k.length,arrayBuffer:k.arrayBuffer}},Oi.deserialize=function(k){var V=Object.create(this.prototype);return V.arrayBuffer=k.arrayBuffer,V.length=k.length,V.capacity=k.arrayBuffer.byteLength/V.bytesPerElement,V._refreshViews(),V},Oi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Oi.prototype.clear=function(){this.length=0},Oi.prototype.resize=function(k){this.reserve(k),this.length=k},Oi.prototype.reserve=function(k){if(k>this.capacity){this.capacity=Math.max(k,Math.floor(this.capacity*yn),fi),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var V=this.uint8;this._refreshViews(),V&&this.uint8.set(V)}},Oi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ki(C,k){k===void 0&&(k=1);var V=0,ne=0,xe=C.map(function(Ve){var ht=qa(Ve.type),Rt=V=ea(V,Math.max(k,ht)),Ht=Ve.components||1;return ne=Math.max(ne,ht),V+=ht*Ht,{name:Ve.name,type:Ve.type,components:Ht,offset:Rt}}),Ie=ea(V,Math.max(ne,k));return{members:xe,size:Ie,alignment:k}}function qa(C){return Ai[C].BYTES_PER_ELEMENT}function ea(C,k){return Math.ceil(C/k)*k}var Ea=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,ne,xe)},k.prototype.emplace=function(ne,xe,Ie){var Ve=ne*2;return this.int16[Ve+0]=xe,this.int16[Ve+1]=Ie,ne},k}(Oi);Ea.prototype.bytesPerElement=4,de("StructArrayLayout2i4",Ea);var ii=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve){var ht=this.length;return this.resize(ht+1),this.emplace(ht,ne,xe,Ie,Ve)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht){var Rt=ne*4;return this.int16[Rt+0]=xe,this.int16[Rt+1]=Ie,this.int16[Rt+2]=Ve,this.int16[Rt+3]=ht,ne},k}(Oi);ii.prototype.bytesPerElement=8,de("StructArrayLayout4i8",ii);var gi=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,ne,xe,Ie,Ve,ht,Rt)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht){var tr=ne*6;return this.int16[tr+0]=xe,this.int16[tr+1]=Ie,this.int16[tr+2]=Ve,this.int16[tr+3]=ht,this.int16[tr+4]=Rt,this.int16[tr+5]=Ht,ne},k}(Oi);gi.prototype.bytesPerElement=12,de("StructArrayLayout2i4i12",gi);var Wa=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,ne,xe,Ie,Ve,ht,Rt)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht){var tr=ne*4,Cr=ne*8;return this.int16[tr+0]=xe,this.int16[tr+1]=Ie,this.uint8[Cr+4]=Ve,this.uint8[Cr+5]=ht,this.uint8[Cr+6]=Rt,this.uint8[Cr+7]=Ht,ne},k}(Oi);Wa.prototype.bytesPerElement=8,de("StructArrayLayout2i4ub8",Wa);var ji=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,ne,xe)},k.prototype.emplace=function(ne,xe,Ie){var Ve=ne*2;return this.float32[Ve+0]=xe,this.float32[Ve+1]=Ie,ne},k}(Oi);ji.prototype.bytesPerElement=8,de("StructArrayLayout2f8",ji);var Ii=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr){var qr=this.length;return this.resize(qr+1),this.emplace(qr,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr){var pa=ne*10;return this.uint16[pa+0]=xe,this.uint16[pa+1]=Ie,this.uint16[pa+2]=Ve,this.uint16[pa+3]=ht,this.uint16[pa+4]=Rt,this.uint16[pa+5]=Ht,this.uint16[pa+6]=tr,this.uint16[pa+7]=Cr,this.uint16[pa+8]=Xr,this.uint16[pa+9]=qr,ne},k}(Oi);Ii.prototype.bytesPerElement=20,de("StructArrayLayout10ui20",Ii);var hn=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa){var ja=this.length;return this.resize(ja+1),this.emplace(ja,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja){var Ei=ne*12;return this.int16[Ei+0]=xe,this.int16[Ei+1]=Ie,this.int16[Ei+2]=Ve,this.int16[Ei+3]=ht,this.uint16[Ei+4]=Rt,this.uint16[Ei+5]=Ht,this.uint16[Ei+6]=tr,this.uint16[Ei+7]=Cr,this.int16[Ei+8]=Xr,this.int16[Ei+9]=qr,this.int16[Ei+10]=pa,this.int16[Ei+11]=ja,ne},k}(Oi);hn.prototype.bytesPerElement=24,de("StructArrayLayout4i4ui4i24",hn);var Za=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie){var Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,ne,xe,Ie)},k.prototype.emplace=function(ne,xe,Ie,Ve){var ht=ne*3;return this.float32[ht+0]=xe,this.float32[ht+1]=Ie,this.float32[ht+2]=Ve,ne},k}(Oi);Za.prototype.bytesPerElement=12,de("StructArrayLayout3f12",Za);var Va=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},k.prototype.emplace=function(ne,xe){var Ie=ne*1;return this.uint32[Ie+0]=xe,ne},k}(Oi);Va.prototype.bytesPerElement=4,de("StructArrayLayout1ul4",Va);var $i=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.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)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr){var Xr=this.length;return this.resize(Xr+1),this.emplace(Xr,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr){var qr=ne*10,pa=ne*5;return this.int16[qr+0]=xe,this.int16[qr+1]=Ie,this.int16[qr+2]=Ve,this.int16[qr+3]=ht,this.int16[qr+4]=Rt,this.int16[qr+5]=Ht,this.uint32[pa+3]=tr,this.uint16[qr+8]=Cr,this.uint16[qr+9]=Xr,ne},k}(Oi);$i.prototype.bytesPerElement=20,de("StructArrayLayout6i1ul2ui20",$i);var zi=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,ne,xe,Ie,Ve,ht,Rt)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht){var tr=ne*6;return this.int16[tr+0]=xe,this.int16[tr+1]=Ie,this.int16[tr+2]=Ve,this.int16[tr+3]=ht,this.int16[tr+4]=Rt,this.int16[tr+5]=Ht,ne},k}(Oi);zi.prototype.bytesPerElement=12,de("StructArrayLayout2i2i2i12",zi);var Si=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht){var Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,ne,xe,Ie,Ve,ht)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt){var Ht=ne*4,tr=ne*8;return this.float32[Ht+0]=xe,this.float32[Ht+1]=Ie,this.float32[Ht+2]=Ve,this.int16[tr+6]=ht,this.int16[tr+7]=Rt,ne},k}(Oi);Si.prototype.bytesPerElement=16,de("StructArrayLayout2f1f2i16",Si);var Ti=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve){var ht=this.length;return this.resize(ht+1),this.emplace(ht,ne,xe,Ie,Ve)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht){var Rt=ne*12,Ht=ne*3;return this.uint8[Rt+0]=xe,this.uint8[Rt+1]=Ie,this.float32[Ht+1]=Ve,this.float32[Ht+2]=ht,ne},k}(Oi);Ti.prototype.bytesPerElement=12,de("StructArrayLayout2ub2f12",Ti);var Ki=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie){var Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,ne,xe,Ie)},k.prototype.emplace=function(ne,xe,Ie,Ve){var ht=ne*3;return this.uint16[ht+0]=xe,this.uint16[ht+1]=Ie,this.uint16[ht+2]=Ve,ne},k}(Oi);Ki.prototype.bytesPerElement=6,de("StructArrayLayout3ui6",Ki);var mn=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.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)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni){var Qi=this.length;return this.resize(Qi+1),this.emplace(Qi,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni,Qi){var ln=ne*24,xn=ne*12,qn=ne*48;return this.int16[ln+0]=xe,this.int16[ln+1]=Ie,this.uint16[ln+2]=Ve,this.uint16[ln+3]=ht,this.uint32[xn+2]=Rt,this.uint32[xn+3]=Ht,this.uint32[xn+4]=tr,this.uint16[ln+10]=Cr,this.uint16[ln+11]=Xr,this.uint16[ln+12]=qr,this.float32[xn+7]=pa,this.float32[xn+8]=ja,this.uint8[qn+36]=Ei,this.uint8[qn+37]=li,this.uint8[qn+38]=en,this.uint32[xn+10]=Ni,this.int16[ln+22]=Qi,ne},k}(Oi);mn.prototype.bytesPerElement=48,de("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",mn);var In=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.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)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni,Qi,ln,xn,qn,Nn,Mo,no,yo,Ms,Eo,Ro){var Zs=this.length;return this.resize(Zs+1),this.emplace(Zs,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni,Qi,ln,xn,qn,Nn,Mo,no,yo,Ms,Eo,Ro)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni,Qi,ln,xn,qn,Nn,Mo,no,yo,Ms,Eo,Ro,Zs){var _s=ne*34,Wl=ne*17;return this.int16[_s+0]=xe,this.int16[_s+1]=Ie,this.int16[_s+2]=Ve,this.int16[_s+3]=ht,this.int16[_s+4]=Rt,this.int16[_s+5]=Ht,this.int16[_s+6]=tr,this.int16[_s+7]=Cr,this.uint16[_s+8]=Xr,this.uint16[_s+9]=qr,this.uint16[_s+10]=pa,this.uint16[_s+11]=ja,this.uint16[_s+12]=Ei,this.uint16[_s+13]=li,this.uint16[_s+14]=en,this.uint16[_s+15]=Ni,this.uint16[_s+16]=Qi,this.uint16[_s+17]=ln,this.uint16[_s+18]=xn,this.uint16[_s+19]=qn,this.uint16[_s+20]=Nn,this.uint16[_s+21]=Mo,this.uint16[_s+22]=no,this.uint32[Wl+12]=yo,this.float32[Wl+13]=Ms,this.float32[Wl+14]=Eo,this.float32[Wl+15]=Ro,this.float32[Wl+16]=Zs,ne},k}(Oi);In.prototype.bytesPerElement=68,de("StructArrayLayout8i15ui1ul4f68",In);var Di=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},k.prototype.emplace=function(ne,xe){var Ie=ne*1;return this.float32[Ie+0]=xe,ne},k}(Oi);Di.prototype.bytesPerElement=4,de("StructArrayLayout1f4",Di);var nn=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie){var Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,ne,xe,Ie)},k.prototype.emplace=function(ne,xe,Ie,Ve){var ht=ne*3;return this.int16[ht+0]=xe,this.int16[ht+1]=Ie,this.int16[ht+2]=Ve,ne},k}(Oi);nn.prototype.bytesPerElement=6,de("StructArrayLayout3i6",nn);var En=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie){var Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,ne,xe,Ie)},k.prototype.emplace=function(ne,xe,Ie,Ve){var ht=ne*2,Rt=ne*4;return this.uint32[ht+0]=xe,this.uint16[Rt+2]=Ie,this.uint16[Rt+3]=Ve,ne},k}(Oi);En.prototype.bytesPerElement=8,de("StructArrayLayout1ul2ui8",En);var Rn=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,ne,xe)},k.prototype.emplace=function(ne,xe,Ie){var Ve=ne*2;return this.uint16[Ve+0]=xe,this.uint16[Ve+1]=Ie,ne},k}(Oi);Rn.prototype.bytesPerElement=4,de("StructArrayLayout2ui4",Rn);var Gn=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ne)},k.prototype.emplace=function(ne,xe){var Ie=ne*1;return this.uint16[Ie+0]=xe,ne},k}(Oi);Gn.prototype.bytesPerElement=2,de("StructArrayLayout1ui2",Gn);var Ps=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},k.prototype.emplaceBack=function(ne,xe,Ie,Ve){var ht=this.length;return this.resize(ht+1),this.emplace(ht,ne,xe,Ie,Ve)},k.prototype.emplace=function(ne,xe,Ie,Ve,ht){var Rt=ne*4;return this.float32[Rt+0]=xe,this.float32[Rt+1]=Ie,this.float32[Rt+2]=Ve,this.float32[Rt+3]=ht,ne},k}(Oi);Ps.prototype.bytesPerElement=16,de("StructArrayLayout4f16",Ps);var xl=function(C){function k(){C.apply(this,arguments)}C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k;var V={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 V.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},V.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},V.x1.get=function(){return this._structArray.int16[this._pos2+2]},V.y1.get=function(){return this._structArray.int16[this._pos2+3]},V.x2.get=function(){return this._structArray.int16[this._pos2+4]},V.y2.get=function(){return this._structArray.int16[this._pos2+5]},V.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},V.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},V.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},V.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(k.prototype,V),k}(bi);xl.prototype.size=20;var ho=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.get=function(ne){return new xl(this,ne)},k}($i);de("CollisionBoxArray",ho);var Hl=function(C){function k(){C.apply(this,arguments)}C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k;var V={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 V.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},V.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},V.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},V.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},V.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},V.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},V.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},V.segment.get=function(){return this._structArray.uint16[this._pos2+10]},V.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},V.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},V.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},V.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},V.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},V.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},V.placedOrientation.set=function(ne){this._structArray.uint8[this._pos1+37]=ne},V.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},V.hidden.set=function(ne){this._structArray.uint8[this._pos1+38]=ne},V.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},V.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+10]=ne},V.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(k.prototype,V),k}(bi);Hl.prototype.size=48;var fs=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.get=function(ne){return new Hl(this,ne)},k}(mn);de("PlacedSymbolArray",fs);var Al=function(C){function k(){C.apply(this,arguments)}C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k;var V={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 V.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},V.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},V.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},V.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},V.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},V.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},V.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},V.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},V.key.get=function(){return this._structArray.uint16[this._pos2+8]},V.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},V.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},V.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},V.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},V.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},V.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},V.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},V.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},V.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},V.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},V.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},V.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},V.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},V.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},V.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},V.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+12]=ne},V.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},V.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},V.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},V.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(k.prototype,V),k}(bi);Al.prototype.size=68;var El=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.get=function(ne){return new Al(this,ne)},k}(In);de("SymbolInstanceArray",El);var Ql=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.getoffsetX=function(ne){return this.float32[ne*1+0]},k}(Di);de("GlyphOffsetArray",Ql);var Fs=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.getx=function(ne){return this.int16[ne*3+0]},k.prototype.gety=function(ne){return this.int16[ne*3+1]},k.prototype.gettileUnitDistanceFromAnchor=function(ne){return this.int16[ne*3+2]},k}(nn);de("SymbolLineVertexArray",Fs);var pl=function(C){function k(){C.apply(this,arguments)}C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k;var V={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return V.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},V.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},V.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(k.prototype,V),k}(bi);pl.prototype.size=8;var bl=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.get=function(ne){return new pl(this,ne)},k}(En);de("FeatureIndexArray",bl);var Hn=ki([{name:"a_pos",components:2,type:"Int16"}],4),Cl=Hn.members,Lo=function(k){k===void 0&&(k=[]),this.segments=k};Lo.prototype.prepareSegment=function(k,V,ne,xe){var Ie=this.segments[this.segments.length-1];return k>Lo.MAX_VERTEX_ARRAY_LENGTH&&U("Max vertices per segment is "+Lo.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+k),(!Ie||Ie.vertexLength+k>Lo.MAX_VERTEX_ARRAY_LENGTH||Ie.sortKey!==xe)&&(Ie={vertexOffset:V.length,primitiveOffset:ne.length,vertexLength:0,primitiveLength:0},xe!==void 0&&(Ie.sortKey=xe),this.segments.push(Ie)),Ie},Lo.prototype.get=function(){return this.segments},Lo.prototype.destroy=function(){for(var k=0,V=this.segments;k<V.length;k+=1){var ne=V[k];for(var xe in ne.vaos)ne.vaos[xe].destroy()}},Lo.simpleSegment=function(k,V,ne,xe){return new Lo([{vertexOffset:k,primitiveOffset:V,vertexLength:ne,primitiveLength:xe,vaos:{},sortKey:0}])},Lo.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,de("SegmentVector",Lo);function ve(C,k){return C=l(Math.floor(C),0,255),k=l(Math.floor(k),0,255),256*C+k}var Y=ki([{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"}]),ye=t(function(C){function k(V,ne){var xe,Ie,Ve,ht,Rt,Ht,tr,Cr;for(xe=V.length&3,Ie=V.length-xe,Ve=ne,Rt=3432918353,Ht=461845907,Cr=0;Cr<Ie;)tr=V.charCodeAt(Cr)&255|(V.charCodeAt(++Cr)&255)<<8|(V.charCodeAt(++Cr)&255)<<16|(V.charCodeAt(++Cr)&255)<<24,++Cr,tr=(tr&65535)*Rt+(((tr>>>16)*Rt&65535)<<16)&4294967295,tr=tr<<15|tr>>>17,tr=(tr&65535)*Ht+(((tr>>>16)*Ht&65535)<<16)&4294967295,Ve^=tr,Ve=Ve<<13|Ve>>>19,ht=(Ve&65535)*5+(((Ve>>>16)*5&65535)<<16)&4294967295,Ve=(ht&65535)+27492+(((ht>>>16)+58964&65535)<<16);switch(tr=0,xe){case 3:tr^=(V.charCodeAt(Cr+2)&255)<<16;case 2:tr^=(V.charCodeAt(Cr+1)&255)<<8;case 1:tr^=V.charCodeAt(Cr)&255,tr=(tr&65535)*Rt+(((tr>>>16)*Rt&65535)<<16)&4294967295,tr=tr<<15|tr>>>17,tr=(tr&65535)*Ht+(((tr>>>16)*Ht&65535)<<16)&4294967295,Ve^=tr}return Ve^=V.length,Ve^=Ve>>>16,Ve=(Ve&65535)*2246822507+(((Ve>>>16)*2246822507&65535)<<16)&4294967295,Ve^=Ve>>>13,Ve=(Ve&65535)*3266489909+(((Ve>>>16)*3266489909&65535)<<16)&4294967295,Ve^=Ve>>>16,Ve>>>0}C.exports=k}),te=t(function(C){function k(V,ne){for(var xe=V.length,Ie=ne^xe,Ve=0,ht;xe>=4;)ht=V.charCodeAt(Ve)&255|(V.charCodeAt(++Ve)&255)<<8|(V.charCodeAt(++Ve)&255)<<16|(V.charCodeAt(++Ve)&255)<<24,ht=(ht&65535)*1540483477+(((ht>>>16)*1540483477&65535)<<16),ht^=ht>>>24,ht=(ht&65535)*1540483477+(((ht>>>16)*1540483477&65535)<<16),Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)^ht,xe-=4,++Ve;switch(xe){case 3:Ie^=(V.charCodeAt(Ve+2)&255)<<16;case 2:Ie^=(V.charCodeAt(Ve+1)&255)<<8;case 1:Ie^=V.charCodeAt(Ve)&255,Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16)}return Ie^=Ie>>>13,Ie=(Ie&65535)*1540483477+(((Ie>>>16)*1540483477&65535)<<16),Ie^=Ie>>>15,Ie>>>0}C.exports=k}),me=ye,Ge=ye,Le=te;me.murmur3=Ge,me.murmur2=Le;var $e=function(){this.ids=[],this.positions=[],this.indexed=!1};$e.prototype.add=function(k,V,ne,xe){this.ids.push(jt(k)),this.positions.push(V,ne,xe)},$e.prototype.getPositions=function(k){for(var V=jt(k),ne=0,xe=this.ids.length-1;ne<xe;){var Ie=ne+xe>>1;this.ids[Ie]>=V?xe=Ie:ne=Ie+1}for(var Ve=[];this.ids[ne]===V;){var ht=this.positions[3*ne],Rt=this.positions[3*ne+1],Ht=this.positions[3*ne+2];Ve.push({index:ht,start:Rt,end:Ht}),ne++}return Ve},$e.serialize=function(k,V){var ne=new Float64Array(k.ids),xe=new Uint32Array(k.positions);return _r(ne,xe,0,ne.length-1),V&&V.push(ne.buffer,xe.buffer),{ids:ne,positions:xe}},$e.deserialize=function(k){var V=new $e;return V.ids=k.ids,V.positions=k.positions,V.indexed=!0,V};var mt=Math.pow(2,53)-1;function jt(C){var k=+C;return!isNaN(k)&&k<=mt?k:me(String(C))}function _r(C,k,V,ne){for(;V<ne;){for(var xe=C[V+ne>>1],Ie=V-1,Ve=ne+1;;){do Ie++;while(C[Ie]<xe);do Ve--;while(C[Ve]>xe);if(Ie>=Ve)break;Fr(C,Ie,Ve),Fr(k,3*Ie,3*Ve),Fr(k,3*Ie+1,3*Ve+1),Fr(k,3*Ie+2,3*Ve+2)}Ve-V<ne-Ve?(_r(C,k,V,Ve),V=Ve+1):(_r(C,k,Ve+1,ne),ne=Ve)}}function Fr(C,k,V){var ne=C[k];C[k]=C[V],C[V]=ne}de("FeaturePositionMap",$e);var hr=function(k,V){this.gl=k.gl,this.location=V},gt=function(C){function k(V,ne){C.call(this,V,ne),this.current=0}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){this.current!==ne&&(this.current=ne,this.gl.uniform1i(this.location,ne))},k}(hr),Et=function(C){function k(V,ne){C.call(this,V,ne),this.current=0}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){this.current!==ne&&(this.current=ne,this.gl.uniform1f(this.location,ne))},k}(hr),Ft=function(C){function k(V,ne){C.call(this,V,ne),this.current=[0,0]}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1])&&(this.current=ne,this.gl.uniform2f(this.location,ne[0],ne[1]))},k}(hr),ir=function(C){function k(V,ne){C.call(this,V,ne),this.current=[0,0,0]}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1]||ne[2]!==this.current[2])&&(this.current=ne,this.gl.uniform3f(this.location,ne[0],ne[1],ne[2]))},k}(hr),fr=function(C){function k(V,ne){C.call(this,V,ne),this.current=[0,0,0,0]}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){(ne[0]!==this.current[0]||ne[1]!==this.current[1]||ne[2]!==this.current[2]||ne[3]!==this.current[3])&&(this.current=ne,this.gl.uniform4f(this.location,ne[0],ne[1],ne[2],ne[3]))},k}(hr),sr=function(C){function k(V,ne){C.call(this,V,ne),this.current=Us.transparent}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){(ne.r!==this.current.r||ne.g!==this.current.g||ne.b!==this.current.b||ne.a!==this.current.a)&&(this.current=ne,this.gl.uniform4f(this.location,ne.r,ne.g,ne.b,ne.a))},k}(hr),pr=new Float32Array(16),lr=function(C){function k(V,ne){C.call(this,V,ne),this.current=pr}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.set=function(ne){if(ne[12]!==this.current[12]||ne[0]!==this.current[0]){this.current=ne,this.gl.uniformMatrix4fv(this.location,!1,ne);return}for(var xe=1;xe<16;xe++)if(ne[xe]!==this.current[xe]){this.current=ne,this.gl.uniformMatrix4fv(this.location,!1,ne);break}},k}(hr);function Xt(C){return[ve(255*C.r,255*C.g),ve(255*C.b,255*C.a)]}var or=function(k,V,ne){this.value=k,this.uniformNames=V.map(function(xe){return"u_"+xe}),this.type=ne};or.prototype.setUniform=function(k,V,ne){k.set(ne.constantOr(this.value))},or.prototype.getBinding=function(k,V,ne){return this.type==="color"?new sr(k,V):new Et(k,V)};var qt=function(k,V){this.uniformNames=V.map(function(ne){return"u_"+ne}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};qt.prototype.setConstantPatternPositions=function(k,V){this.pixelRatioFrom=V.pixelRatio,this.pixelRatioTo=k.pixelRatio,this.patternFrom=V.tlbr,this.patternTo=k.tlbr},qt.prototype.setUniform=function(k,V,ne,xe){var Ie=xe==="u_pattern_to"?this.patternTo:xe==="u_pattern_from"?this.patternFrom:xe==="u_pixel_ratio_to"?this.pixelRatioTo:xe==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Ie&&k.set(Ie)},qt.prototype.getBinding=function(k,V,ne){return ne.substr(0,9)==="u_pattern"?new fr(k,V):new Et(k,V)};var Dr=function(k,V,ne,xe){this.expression=k,this.type=ne,this.maxValue=0,this.paintVertexAttributes=V.map(function(Ie){return{name:"a_"+Ie,type:"Float32",components:ne==="color"?2:1,offset:0}}),this.paintVertexArray=new xe};Dr.prototype.populatePaintArray=function(k,V,ne,xe,Ie){var Ve=this.paintVertexArray.length,ht=this.expression.evaluate(new gn(0),V,{},xe,[],Ie);this.paintVertexArray.resize(k),this._setPaintValue(Ve,k,ht)},Dr.prototype.updatePaintArray=function(k,V,ne,xe){var Ie=this.expression.evaluate({zoom:0},ne,xe);this._setPaintValue(k,V,Ie)},Dr.prototype._setPaintValue=function(k,V,ne){if(this.type==="color")for(var xe=Xt(ne),Ie=k;Ie<V;Ie++)this.paintVertexArray.emplace(Ie,xe[0],xe[1]);else{for(var Ve=k;Ve<V;Ve++)this.paintVertexArray.emplace(Ve,ne);this.maxValue=Math.max(this.maxValue,Math.abs(ne))}},Dr.prototype.upload=function(k){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=k.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Dr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Jr=function(k,V,ne,xe,Ie,Ve){this.expression=k,this.uniformNames=V.map(function(ht){return"u_"+ht+"_t"}),this.type=ne,this.useIntegerZoom=xe,this.zoom=Ie,this.maxValue=0,this.paintVertexAttributes=V.map(function(ht){return{name:"a_"+ht,type:"Float32",components:ne==="color"?4:2,offset:0}}),this.paintVertexArray=new Ve};Jr.prototype.populatePaintArray=function(k,V,ne,xe,Ie){var Ve=this.expression.evaluate(new gn(this.zoom),V,{},xe,[],Ie),ht=this.expression.evaluate(new gn(this.zoom+1),V,{},xe,[],Ie),Rt=this.paintVertexArray.length;this.paintVertexArray.resize(k),this._setPaintValue(Rt,k,Ve,ht)},Jr.prototype.updatePaintArray=function(k,V,ne,xe){var Ie=this.expression.evaluate({zoom:this.zoom},ne,xe),Ve=this.expression.evaluate({zoom:this.zoom+1},ne,xe);this._setPaintValue(k,V,Ie,Ve)},Jr.prototype._setPaintValue=function(k,V,ne,xe){if(this.type==="color")for(var Ie=Xt(ne),Ve=Xt(xe),ht=k;ht<V;ht++)this.paintVertexArray.emplace(ht,Ie[0],Ie[1],Ve[0],Ve[1]);else{for(var Rt=k;Rt<V;Rt++)this.paintVertexArray.emplace(Rt,ne,xe);this.maxValue=Math.max(this.maxValue,Math.abs(ne),Math.abs(xe))}},Jr.prototype.upload=function(k){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=k.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Jr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Jr.prototype.setUniform=function(k,V){var ne=this.useIntegerZoom?Math.floor(V.zoom):V.zoom,xe=l(this.expression.interpolationFactor(ne,this.zoom,this.zoom+1),0,1);k.set(xe)},Jr.prototype.getBinding=function(k,V,ne){return new Et(k,V)};var ba=function(k,V,ne,xe,Ie,Ve){this.expression=k,this.type=V,this.useIntegerZoom=ne,this.zoom=xe,this.layerId=Ve,this.zoomInPaintVertexArray=new Ie,this.zoomOutPaintVertexArray=new Ie};ba.prototype.populatePaintArray=function(k,V,ne){var xe=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(k),this.zoomOutPaintVertexArray.resize(k),this._setPaintValues(xe,k,V.patterns&&V.patterns[this.layerId],ne)},ba.prototype.updatePaintArray=function(k,V,ne,xe,Ie){this._setPaintValues(k,V,ne.patterns&&ne.patterns[this.layerId],Ie)},ba.prototype._setPaintValues=function(k,V,ne,xe){if(!(!xe||!ne)){var Ie=ne.min,Ve=ne.mid,ht=ne.max,Rt=xe[Ie],Ht=xe[Ve],tr=xe[ht];if(!(!Rt||!Ht||!tr))for(var Cr=k;Cr<V;Cr++)this.zoomInPaintVertexArray.emplace(Cr,Ht.tl[0],Ht.tl[1],Ht.br[0],Ht.br[1],Rt.tl[0],Rt.tl[1],Rt.br[0],Rt.br[1],Ht.pixelRatio,Rt.pixelRatio),this.zoomOutPaintVertexArray.emplace(Cr,Ht.tl[0],Ht.tl[1],Ht.br[0],Ht.br[1],tr.tl[0],tr.tl[1],tr.br[0],tr.br[1],Ht.pixelRatio,tr.pixelRatio)}},ba.prototype.upload=function(k){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=k.createVertexBuffer(this.zoomInPaintVertexArray,Y.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=k.createVertexBuffer(this.zoomOutPaintVertexArray,Y.members,this.expression.isStateDependent))},ba.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var yi=function(k,V,ne){this.binders={},this._buffers=[];var xe=[];for(var Ie in k.paint._values)if(ne(Ie)){var Ve=k.paint.get(Ie);if(!(!(Ve instanceof Il)||!yl(Ve.property.specification))){var ht=si(Ie,k.type),Rt=Ve.value,Ht=Ve.property.specification.type,tr=Ve.property.useIntegerZoom,Cr=Ve.property.specification["property-type"],Xr=Cr==="cross-faded"||Cr==="cross-faded-data-driven";if(Rt.kind==="constant")this.binders[Ie]=Xr?new qt(Rt.value,ht):new or(Rt.value,ht,Ht),xe.push("/u_"+Ie);else if(Rt.kind==="source"||Xr){var qr=Bi(Ie,Ht,"source");this.binders[Ie]=Xr?new ba(Rt,Ht,tr,V,qr,k.id):new Dr(Rt,ht,Ht,qr),xe.push("/a_"+Ie)}else{var pa=Bi(Ie,Ht,"composite");this.binders[Ie]=new Jr(Rt,ht,Ht,tr,V,pa),xe.push("/z_"+Ie)}}}this.cacheKey=xe.sort().join("")};yi.prototype.getMaxValue=function(k){var V=this.binders[k];return V instanceof Dr||V instanceof Jr?V.maxValue:0},yi.prototype.populatePaintArrays=function(k,V,ne,xe,Ie){for(var Ve in this.binders){var ht=this.binders[Ve];(ht instanceof Dr||ht instanceof Jr||ht instanceof ba)&&ht.populatePaintArray(k,V,ne,xe,Ie)}},yi.prototype.setConstantPatternPositions=function(k,V){for(var ne in this.binders){var xe=this.binders[ne];xe instanceof qt&&xe.setConstantPatternPositions(k,V)}},yi.prototype.updatePaintArrays=function(k,V,ne,xe,Ie){var Ve=!1;for(var ht in k)for(var Rt=V.getPositions(ht),Ht=0,tr=Rt;Ht<tr.length;Ht+=1){var Cr=tr[Ht],Xr=ne.feature(Cr.index);for(var qr in this.binders){var pa=this.binders[qr];if((pa instanceof Dr||pa instanceof Jr||pa instanceof ba)&&pa.expression.isStateDependent===!0){var ja=xe.paint.get(qr);pa.expression=ja.value,pa.updatePaintArray(Cr.start,Cr.end,Xr,k[ht],Ie),Ve=!0}}}return Ve},yi.prototype.defines=function(){var k=[];for(var V in this.binders){var ne=this.binders[V];(ne instanceof or||ne instanceof qt)&&k.push.apply(k,ne.uniformNames.map(function(xe){return"#define HAS_UNIFORM_"+xe}))}return k},yi.prototype.getBinderAttributes=function(){var k=[];for(var V in this.binders){var ne=this.binders[V];if(ne instanceof Dr||ne instanceof Jr)for(var xe=0;xe<ne.paintVertexAttributes.length;xe++)k.push(ne.paintVertexAttributes[xe].name);else if(ne instanceof ba)for(var Ie=0;Ie<Y.members.length;Ie++)k.push(Y.members[Ie].name)}return k},yi.prototype.getBinderUniforms=function(){var k=[];for(var V in this.binders){var ne=this.binders[V];if(ne instanceof or||ne instanceof qt||ne instanceof Jr)for(var xe=0,Ie=ne.uniformNames;xe<Ie.length;xe+=1){var Ve=Ie[xe];k.push(Ve)}}return k},yi.prototype.getPaintVertexBuffers=function(){return this._buffers},yi.prototype.getUniforms=function(k,V){var ne=[];for(var xe in this.binders){var Ie=this.binders[xe];if(Ie instanceof or||Ie instanceof qt||Ie instanceof Jr)for(var Ve=0,ht=Ie.uniformNames;Ve<ht.length;Ve+=1){var Rt=ht[Ve];if(V[Rt]){var Ht=Ie.getBinding(k,V[Rt],Rt);ne.push({name:Rt,property:xe,binding:Ht})}}}return ne},yi.prototype.setUniforms=function(k,V,ne,xe){for(var Ie=0,Ve=V;Ie<Ve.length;Ie+=1){var ht=Ve[Ie],Rt=ht.name,Ht=ht.property,tr=ht.binding;this.binders[Ht].setUniform(tr,xe,ne.get(Ht),Rt)}},yi.prototype.updatePaintBuffers=function(k){this._buffers=[];for(var V in this.binders){var ne=this.binders[V];if(k&&ne instanceof ba){var xe=k.fromScale===2?ne.zoomInPaintVertexBuffer:ne.zoomOutPaintVertexBuffer;xe&&this._buffers.push(xe)}else(ne instanceof Dr||ne instanceof Jr)&&ne.paintVertexBuffer&&this._buffers.push(ne.paintVertexBuffer)}},yi.prototype.upload=function(k){for(var V in this.binders){var ne=this.binders[V];(ne instanceof Dr||ne instanceof Jr||ne instanceof ba)&&ne.upload(k)}this.updatePaintBuffers()},yi.prototype.destroy=function(){for(var k in this.binders){var V=this.binders[k];(V instanceof Dr||V instanceof Jr||V instanceof ba)&&V.destroy()}};var Xa=function(k,V,ne){ne===void 0&&(ne=function(){return!0}),this.programConfigurations={};for(var xe=0,Ie=k;xe<Ie.length;xe+=1){var Ve=Ie[xe];this.programConfigurations[Ve.id]=new yi(Ve,V,ne)}this.needsUpload=!1,this._featureMap=new $e,this._bufferOffset=0};Xa.prototype.populatePaintArrays=function(k,V,ne,xe,Ie,Ve){for(var ht in this.programConfigurations)this.programConfigurations[ht].populatePaintArrays(k,V,xe,Ie,Ve);V.id!==void 0&&this._featureMap.add(V.id,ne,this._bufferOffset,k),this._bufferOffset=k,this.needsUpload=!0},Xa.prototype.updatePaintArrays=function(k,V,ne,xe){for(var Ie=0,Ve=ne;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];this.needsUpload=this.programConfigurations[ht.id].updatePaintArrays(k,this._featureMap,V,ht,xe)||this.needsUpload}},Xa.prototype.get=function(k){return this.programConfigurations[k]},Xa.prototype.upload=function(k){if(this.needsUpload){for(var V in this.programConfigurations)this.programConfigurations[V].upload(k);this.needsUpload=!1}},Xa.prototype.destroy=function(){for(var k in this.programConfigurations)this.programConfigurations[k].destroy()};function si(C,k){var V={"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 V[C]||[C.replace(k+"-","").replace(/-/g,"_")]}function Ji(C){var k={"line-pattern":{source:Ii,composite:Ii},"fill-pattern":{source:Ii,composite:Ii},"fill-extrusion-pattern":{source:Ii,composite:Ii}};return k[C]}function Bi(C,k,V){var ne={color:{source:ji,composite:Ps},number:{source:Di,composite:ji}},xe=Ji(C);return xe&&xe[V]||ne[k][V]}de("ConstantBinder",or),de("CrossFadedConstantBinder",qt),de("SourceExpressionBinder",Dr),de("CrossFadedCompositeBinder",ba),de("CompositeExpressionBinder",Jr),de("ProgramConfiguration",yi,{omit:["_buffers"]}),de("ProgramConfigurationSet",Xa);var pi=8192,wi=15,Mi=Math.pow(2,wi-1)-1,Vi=-Mi-1;function cn(C){for(var k=pi/C.extent,V=C.loadGeometry(),ne=0;ne<V.length;ne++)for(var xe=V[ne],Ie=0;Ie<xe.length;Ie++){var Ve=xe[Ie],ht=Math.round(Ve.x*k),Rt=Math.round(Ve.y*k);Ve.x=l(ht,Vi,Mi),Ve.y=l(Rt,Vi,Mi),(ht<Ve.x||ht>Ve.x+1||Rt<Ve.y||Rt>Ve.y+1)&&U("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return V}function xo(C,k){return{type:C.type,id:C.id,properties:C.properties,geometry:k?cn(C):[]}}function jo(C,k,V,ne,xe){C.emplaceBack(k*2+(ne+1)/2,V*2+(xe+1)/2)}var ks=function(k){this.zoom=k.zoom,this.overscaling=k.overscaling,this.layers=k.layers,this.layerIds=this.layers.map(function(V){return V.id}),this.index=k.index,this.hasPattern=!1,this.layoutVertexArray=new Ea,this.indexArray=new Ki,this.segments=new Lo,this.programConfigurations=new Xa(k.layers,k.zoom),this.stateDependentLayerIds=this.layers.filter(function(V){return V.isStateDependent()}).map(function(V){return V.id})};ks.prototype.populate=function(k,V,ne){var xe=this.layers[0],Ie=[],Ve=null;xe.type==="circle"&&(Ve=xe.layout.get("circle-sort-key"));for(var ht=0,Rt=k;ht<Rt.length;ht+=1){var Ht=Rt[ht],tr=Ht.feature,Cr=Ht.id,Xr=Ht.index,qr=Ht.sourceLayerIndex,pa=this.layers[0]._featureFilter.needGeometry,ja=xo(tr,pa);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),ja,ne)){var Ei=Ve?Ve.evaluate(ja,{},ne):void 0,li={id:Cr,properties:tr.properties,type:tr.type,sourceLayerIndex:qr,index:Xr,geometry:pa?ja.geometry:cn(tr),patterns:{},sortKey:Ei};Ie.push(li)}}Ve&&Ie.sort(function(no,yo){return no.sortKey-yo.sortKey});for(var en=0,Ni=Ie;en<Ni.length;en+=1){var Qi=Ni[en],ln=Qi,xn=ln.geometry,qn=ln.index,Nn=ln.sourceLayerIndex,Mo=k[qn].feature;this.addFeature(Qi,xn,qn,ne),V.featureIndex.insert(Mo,xn,qn,Nn,this.index)}},ks.prototype.update=function(k,V,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(k,V,this.stateDependentLayers,ne)},ks.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},ks.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ks.prototype.upload=function(k){this.uploaded||(this.layoutVertexBuffer=k.createVertexBuffer(this.layoutVertexArray,Cl),this.indexBuffer=k.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(k),this.uploaded=!0},ks.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ks.prototype.addFeature=function(k,V,ne,xe){for(var Ie=0,Ve=V;Ie<Ve.length;Ie+=1)for(var ht=Ve[Ie],Rt=0,Ht=ht;Rt<Ht.length;Rt+=1){var tr=Ht[Rt],Cr=tr.x,Xr=tr.y;if(!(Cr<0||Cr>=pi||Xr<0||Xr>=pi)){var qr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,k.sortKey),pa=qr.vertexLength;jo(this.layoutVertexArray,Cr,Xr,-1,-1),jo(this.layoutVertexArray,Cr,Xr,1,-1),jo(this.layoutVertexArray,Cr,Xr,1,1),jo(this.layoutVertexArray,Cr,Xr,-1,1),this.indexArray.emplaceBack(pa,pa+1,pa+2),this.indexArray.emplaceBack(pa,pa+3,pa+2),qr.vertexLength+=4,qr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,k,ne,{},xe)},de("CircleBucket",ks,{omit:["layers"]});function Fo(C,k){for(var V=0;V<C.length;V++)if(Ih(k,C[V]))return!0;for(var ne=0;ne<k.length;ne++)if(Ih(C,k[ne]))return!0;return!!Ep(C,k)}function bs(C,k,V){return!!(Ih(C,k)||qp(k,C,V))}function Hs(C,k){if(C.length===1)return td(k,C[0]);for(var V=0;V<k.length;V++)for(var ne=k[V],xe=0;xe<ne.length;xe++)if(Ih(C,ne[xe]))return!0;for(var Ie=0;Ie<C.length;Ie++)if(td(k,C[Ie]))return!0;for(var Ve=0;Ve<k.length;Ve++)if(Ep(C,k[Ve]))return!0;return!1}function pu(C,k,V){for(var ne=0;ne<k.length;ne++){var xe=k[ne];if(C.length>=3){for(var Ie=0;Ie<xe.length;Ie++)if(Ih(C,xe[Ie]))return!0}if(Mp(C,xe,V))return!0}return!1}function Mp(C,k,V){if(C.length>1){if(Ep(C,k))return!0;for(var ne=0;ne<k.length;ne++)if(qp(k[ne],C,V))return!0}for(var xe=0;xe<C.length;xe++)if(qp(C[xe],k,V))return!0;return!1}function Ep(C,k){if(C.length===0||k.length===0)return!1;for(var V=0;V<C.length-1;V++)for(var ne=C[V],xe=C[V+1],Ie=0;Ie<k.length-1;Ie++){var Ve=k[Ie],ht=k[Ie+1];if(Ph(ne,xe,Ve,ht))return!0}return!1}function Ph(C,k,V,ne){return W(C,V,ne)!==W(k,V,ne)&&W(C,k,V)!==W(C,k,ne)}function qp(C,k,V){var ne=V*V;if(k.length===1)return C.distSqr(k[0])<ne;for(var xe=1;xe<k.length;xe++){var Ie=k[xe-1],Ve=k[xe];if(qd(C,Ie,Ve)<ne)return!0}return!1}function qd(C,k,V){var ne=k.distSqr(V);if(ne===0)return C.distSqr(k);var xe=((C.x-k.x)*(V.x-k.x)+(C.y-k.y)*(V.y-k.y))/ne;return xe<0?C.distSqr(k):xe>1?C.distSqr(V):C.distSqr(V.sub(k)._mult(xe)._add(k))}function td(C,k){for(var V=!1,ne,xe,Ie,Ve=0;Ve<C.length;Ve++){ne=C[Ve];for(var ht=0,Rt=ne.length-1;ht<ne.length;Rt=ht++)xe=ne[ht],Ie=ne[Rt],xe.y>k.y!=Ie.y>k.y&&k.x<(Ie.x-xe.x)*(k.y-xe.y)/(Ie.y-xe.y)+xe.x&&(V=!V)}return V}function Ih(C,k){for(var V=!1,ne=0,xe=C.length-1;ne<C.length;xe=ne++){var Ie=C[ne],Ve=C[xe];Ie.y>k.y!=Ve.y>k.y&&k.x<(Ve.x-Ie.x)*(k.y-Ie.y)/(Ve.y-Ie.y)+Ie.x&&(V=!V)}return V}function rd(C,k,V,ne,xe){for(var Ie=0,Ve=C;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];if(k<=ht.x&&V<=ht.y&&ne>=ht.x&&xe>=ht.y)return!0}var Rt=[new i(k,V),new i(k,xe),new i(ne,xe),new i(ne,V)];if(C.length>2)for(var Ht=0,tr=Rt;Ht<tr.length;Ht+=1){var Cr=tr[Ht];if(Ih(C,Cr))return!0}for(var Xr=0;Xr<C.length-1;Xr++){var qr=C[Xr],pa=C[Xr+1];if(Kh(qr,pa,Rt))return!0}return!1}function Kh(C,k,V){var ne=V[0],xe=V[2];if(C.x<ne.x&&k.x<ne.x||C.x>xe.x&&k.x>xe.x||C.y<ne.y&&k.y<ne.y||C.y>xe.y&&k.y>xe.y)return!1;var Ie=W(C,k,V[0]);return Ie!==W(C,k,V[1])||Ie!==W(C,k,V[2])||Ie!==W(C,k,V[3])}function Rh(C,k,V){var ne=k.paint.get(C).value;return ne.kind==="constant"?ne.value:V.programConfigurations.get(k.id).getMaxValue(C)}function Cp(C){return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function Vp(C,k,V,ne,xe){if(!k[0]&&!k[1])return C;var Ie=i.convert(k)._mult(xe);V==="viewport"&&Ie._rotate(-ne);for(var Ve=[],ht=0;ht<C.length;ht++){var Rt=C[ht];Ve.push(Rt.sub(Ie))}return Ve}var kp=new xa({"circle-sort-key":new Yt(Ui.layout_circle["circle-sort-key"])}),kv=new xa({"circle-radius":new Yt(Ui.paint_circle["circle-radius"]),"circle-color":new Yt(Ui.paint_circle["circle-color"]),"circle-blur":new Yt(Ui.paint_circle["circle-blur"]),"circle-opacity":new Yt(Ui.paint_circle["circle-opacity"]),"circle-translate":new nt(Ui.paint_circle["circle-translate"]),"circle-translate-anchor":new nt(Ui.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new nt(Ui.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new nt(Ui.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Yt(Ui.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Yt(Ui.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Yt(Ui.paint_circle["circle-stroke-opacity"])}),Vd={paint:kv,layout:kp},qf=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var C=arguments,k=0,V=arguments.length;V--;)k+=C[V]*C[V];return Math.sqrt(k)});function Gd(){var C=new qf(4);return qf!=Float32Array&&(C[1]=0,C[2]=0),C[0]=1,C[3]=1,C}function Lv(C,k,V){var ne=k[0],xe=k[1],Ie=k[2],Ve=k[3],ht=Math.sin(V),Rt=Math.cos(V);return C[0]=ne*Rt+Ie*ht,C[1]=xe*Rt+Ve*ht,C[2]=ne*-ht+Ie*Rt,C[3]=xe*-ht+Ve*Rt,C}function ch(){var C=new qf(9);return qf!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[5]=0,C[6]=0,C[7]=0),C[0]=1,C[4]=1,C[8]=1,C}function iv(C,k){var V=Math.sin(k),ne=Math.cos(k);return C[0]=ne,C[1]=V,C[2]=0,C[3]=-V,C[4]=ne,C[5]=0,C[6]=0,C[7]=0,C[8]=1,C}function im(){var C=new qf(16);return qf!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[11]=0,C[12]=0,C[13]=0,C[14]=0),C[0]=1,C[5]=1,C[10]=1,C[15]=1,C}function nm(C){var k=new qf(16);return k[0]=C[0],k[1]=C[1],k[2]=C[2],k[3]=C[3],k[4]=C[4],k[5]=C[5],k[6]=C[6],k[7]=C[7],k[8]=C[8],k[9]=C[9],k[10]=C[10],k[11]=C[11],k[12]=C[12],k[13]=C[13],k[14]=C[14],k[15]=C[15],k}function Pv(C){return C[0]=1,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=1,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=1,C[11]=0,C[12]=0,C[13]=0,C[14]=0,C[15]=1,C}function nv(C,k){var V=k[0],ne=k[1],xe=k[2],Ie=k[3],Ve=k[4],ht=k[5],Rt=k[6],Ht=k[7],tr=k[8],Cr=k[9],Xr=k[10],qr=k[11],pa=k[12],ja=k[13],Ei=k[14],li=k[15],en=V*ht-ne*Ve,Ni=V*Rt-xe*Ve,Qi=V*Ht-Ie*Ve,ln=ne*Rt-xe*ht,xn=ne*Ht-Ie*ht,qn=xe*Ht-Ie*Rt,Nn=tr*ja-Cr*pa,Mo=tr*Ei-Xr*pa,no=tr*li-qr*pa,yo=Cr*Ei-Xr*ja,Ms=Cr*li-qr*ja,Eo=Xr*li-qr*Ei,Ro=en*Eo-Ni*Ms+Qi*yo+ln*no-xn*Mo+qn*Nn;return Ro?(Ro=1/Ro,C[0]=(ht*Eo-Rt*Ms+Ht*yo)*Ro,C[1]=(xe*Ms-ne*Eo-Ie*yo)*Ro,C[2]=(ja*qn-Ei*xn+li*ln)*Ro,C[3]=(Xr*xn-Cr*qn-qr*ln)*Ro,C[4]=(Rt*no-Ve*Eo-Ht*Mo)*Ro,C[5]=(V*Eo-xe*no+Ie*Mo)*Ro,C[6]=(Ei*Qi-pa*qn-li*Ni)*Ro,C[7]=(tr*qn-Xr*Qi+qr*Ni)*Ro,C[8]=(Ve*Ms-ht*no+Ht*Nn)*Ro,C[9]=(ne*no-V*Ms-Ie*Nn)*Ro,C[10]=(pa*xn-ja*Qi+li*en)*Ro,C[11]=(Cr*Qi-tr*xn-qr*en)*Ro,C[12]=(ht*Mo-Ve*yo-Rt*Nn)*Ro,C[13]=(V*yo-ne*Mo+xe*Nn)*Ro,C[14]=(ja*Ni-pa*ln-Ei*en)*Ro,C[15]=(tr*ln-Cr*Ni+Xr*en)*Ro,C):null}function ov(C,k,V){var ne=k[0],xe=k[1],Ie=k[2],Ve=k[3],ht=k[4],Rt=k[5],Ht=k[6],tr=k[7],Cr=k[8],Xr=k[9],qr=k[10],pa=k[11],ja=k[12],Ei=k[13],li=k[14],en=k[15],Ni=V[0],Qi=V[1],ln=V[2],xn=V[3];return C[0]=Ni*ne+Qi*ht+ln*Cr+xn*ja,C[1]=Ni*xe+Qi*Rt+ln*Xr+xn*Ei,C[2]=Ni*Ie+Qi*Ht+ln*qr+xn*li,C[3]=Ni*Ve+Qi*tr+ln*pa+xn*en,Ni=V[4],Qi=V[5],ln=V[6],xn=V[7],C[4]=Ni*ne+Qi*ht+ln*Cr+xn*ja,C[5]=Ni*xe+Qi*Rt+ln*Xr+xn*Ei,C[6]=Ni*Ie+Qi*Ht+ln*qr+xn*li,C[7]=Ni*Ve+Qi*tr+ln*pa+xn*en,Ni=V[8],Qi=V[9],ln=V[10],xn=V[11],C[8]=Ni*ne+Qi*ht+ln*Cr+xn*ja,C[9]=Ni*xe+Qi*Rt+ln*Xr+xn*Ei,C[10]=Ni*Ie+Qi*Ht+ln*qr+xn*li,C[11]=Ni*Ve+Qi*tr+ln*pa+xn*en,Ni=V[12],Qi=V[13],ln=V[14],xn=V[15],C[12]=Ni*ne+Qi*ht+ln*Cr+xn*ja,C[13]=Ni*xe+Qi*Rt+ln*Xr+xn*Ei,C[14]=Ni*Ie+Qi*Ht+ln*qr+xn*li,C[15]=Ni*Ve+Qi*tr+ln*pa+xn*en,C}function cc(C,k,V){var ne=V[0],xe=V[1],Ie=V[2],Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li;return k===C?(C[12]=k[0]*ne+k[4]*xe+k[8]*Ie+k[12],C[13]=k[1]*ne+k[5]*xe+k[9]*Ie+k[13],C[14]=k[2]*ne+k[6]*xe+k[10]*Ie+k[14],C[15]=k[3]*ne+k[7]*xe+k[11]*Ie+k[15]):(Ve=k[0],ht=k[1],Rt=k[2],Ht=k[3],tr=k[4],Cr=k[5],Xr=k[6],qr=k[7],pa=k[8],ja=k[9],Ei=k[10],li=k[11],C[0]=Ve,C[1]=ht,C[2]=Rt,C[3]=Ht,C[4]=tr,C[5]=Cr,C[6]=Xr,C[7]=qr,C[8]=pa,C[9]=ja,C[10]=Ei,C[11]=li,C[12]=Ve*ne+tr*xe+pa*Ie+k[12],C[13]=ht*ne+Cr*xe+ja*Ie+k[13],C[14]=Rt*ne+Xr*xe+Ei*Ie+k[14],C[15]=Ht*ne+qr*xe+li*Ie+k[15]),C}function lu(C,k,V){var ne=V[0],xe=V[1],Ie=V[2];return C[0]=k[0]*ne,C[1]=k[1]*ne,C[2]=k[2]*ne,C[3]=k[3]*ne,C[4]=k[4]*xe,C[5]=k[5]*xe,C[6]=k[6]*xe,C[7]=k[7]*xe,C[8]=k[8]*Ie,C[9]=k[9]*Ie,C[10]=k[10]*Ie,C[11]=k[11]*Ie,C[12]=k[12],C[13]=k[13],C[14]=k[14],C[15]=k[15],C}function Dh(C,k,V){var ne=Math.sin(V),xe=Math.cos(V),Ie=k[4],Ve=k[5],ht=k[6],Rt=k[7],Ht=k[8],tr=k[9],Cr=k[10],Xr=k[11];return k!==C&&(C[0]=k[0],C[1]=k[1],C[2]=k[2],C[3]=k[3],C[12]=k[12],C[13]=k[13],C[14]=k[14],C[15]=k[15]),C[4]=Ie*xe+Ht*ne,C[5]=Ve*xe+tr*ne,C[6]=ht*xe+Cr*ne,C[7]=Rt*xe+Xr*ne,C[8]=Ht*xe-Ie*ne,C[9]=tr*xe-Ve*ne,C[10]=Cr*xe-ht*ne,C[11]=Xr*xe-Rt*ne,C}function Iv(C,k,V){var ne=Math.sin(V),xe=Math.cos(V),Ie=k[0],Ve=k[1],ht=k[2],Rt=k[3],Ht=k[4],tr=k[5],Cr=k[6],Xr=k[7];return k!==C&&(C[8]=k[8],C[9]=k[9],C[10]=k[10],C[11]=k[11],C[12]=k[12],C[13]=k[13],C[14]=k[14],C[15]=k[15]),C[0]=Ie*xe+Ht*ne,C[1]=Ve*xe+tr*ne,C[2]=ht*xe+Cr*ne,C[3]=Rt*xe+Xr*ne,C[4]=Ht*xe-Ie*ne,C[5]=tr*xe-Ve*ne,C[6]=Cr*xe-ht*ne,C[7]=Xr*xe-Rt*ne,C}function om(C,k,V,ne,xe){var Ie=1/Math.tan(k/2),Ve;return C[0]=Ie/V,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=Ie,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[11]=-1,C[12]=0,C[13]=0,C[15]=0,xe!=null&&xe!==1/0?(Ve=1/(ne-xe),C[10]=(xe+ne)*Ve,C[14]=2*xe*ne*Ve):(C[10]=-1,C[14]=-2*ne),C}function Au(C,k,V,ne,xe,Ie,Ve){var ht=1/(k-V),Rt=1/(ne-xe),Ht=1/(Ie-Ve);return C[0]=-2*ht,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=-2*Rt,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=2*Ht,C[11]=0,C[12]=(k+V)*ht,C[13]=(xe+ne)*Rt,C[14]=(Ve+Ie)*Ht,C[15]=1,C}var x0=ov;function sv(){var C=new qf(3);return qf!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0),C}function _g(C){var k=new qf(3);return k[0]=C[0],k[1]=C[1],k[2]=C[2],k}function Lp(C,k,V){return C[0]=k[0]+V[0],C[1]=k[1]+V[1],C[2]=k[2]+V[2],C}function lv(C,k,V){return C[0]=k[0]-V[0],C[1]=k[1]-V[1],C[2]=k[2]-V[2],C}function xg(C,k,V){return C[0]=k[0]*V,C[1]=k[1]*V,C[2]=k[2]*V,C}function b0(C,k){var V=k[0],ne=k[1],xe=k[2],Ie=V*V+ne*ne+xe*xe;return Ie>0&&(Ie=1/Math.sqrt(Ie)),C[0]=k[0]*Ie,C[1]=k[1]*Ie,C[2]=k[2]*Ie,C}function UT(C,k){return C[0]*k[0]+C[1]*k[1]+C[2]*k[2]}function jT(C,k,V){var ne=k[0],xe=k[1],Ie=k[2],Ve=V[0],ht=V[1],Rt=V[2];return C[0]=xe*Rt-Ie*ht,C[1]=Ie*Ve-ne*Rt,C[2]=ne*ht-xe*Ve,C}function qT(C,k,V){var ne=k[0],xe=k[1],Ie=k[2];return C[0]=ne*V[0]+xe*V[3]+Ie*V[6],C[1]=ne*V[1]+xe*V[4]+Ie*V[7],C[2]=ne*V[2]+xe*V[5]+Ie*V[8],C}var VT=lv,dC=function(){var C=sv();return function(k,V,ne,xe,Ie,Ve){var ht,Rt;for(V||(V=3),ne||(ne=0),xe?Rt=Math.min(xe*V+ne,k.length):Rt=k.length,ht=ne;ht<Rt;ht+=V)C[0]=k[ht],C[1]=k[ht+1],C[2]=k[ht+2],Ie(C,C,Ve),k[ht]=C[0],k[ht+1]=C[1],k[ht+2]=C[2];return k}}();function GT(){var C=new qf(4);return qf!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0,C[3]=0),C}function HT(C,k,V){return C[0]=k[0]*V,C[1]=k[1]*V,C[2]=k[2]*V,C[3]=k[3]*V,C}function WT(C,k){return C[0]*k[0]+C[1]*k[1]+C[2]*k[2]+C[3]*k[3]}function Rv(C,k,V){var ne=k[0],xe=k[1],Ie=k[2],Ve=k[3];return C[0]=V[0]*ne+V[4]*xe+V[8]*Ie+V[12]*Ve,C[1]=V[1]*ne+V[5]*xe+V[9]*Ie+V[13]*Ve,C[2]=V[2]*ne+V[6]*xe+V[10]*Ie+V[14]*Ve,C[3]=V[3]*ne+V[7]*xe+V[11]*Ie+V[15]*Ve,C}var w0=function(){var C=GT();return function(k,V,ne,xe,Ie,Ve){var ht,Rt;for(V||(V=4),ne||(ne=0),xe?Rt=Math.min(xe*V+ne,k.length):Rt=k.length,ht=ne;ht<Rt;ht+=V)C[0]=k[ht],C[1]=k[ht+1],C[2]=k[ht+2],C[3]=k[ht+3],Ie(C,C,Ve),k[ht]=C[0],k[ht+1]=C[1],k[ht+2]=C[2],k[ht+3]=C[3];return k}}();function kx(){var C=new qf(2);return qf!=Float32Array&&(C[0]=0,C[1]=0),C}function P1(C){var k=C[0],V=C[1];return k*k+V*V}var I1=P1,vC=function(){var C=kx();return function(k,V,ne,xe,Ie,Ve){var ht,Rt;for(V||(V=2),ne||(ne=0),xe?Rt=Math.min(xe*V+ne,k.length):Rt=k.length,ht=ne;ht<Rt;ht+=V)C[0]=k[ht],C[1]=k[ht+1],Ie(C,C,Ve),k[ht]=C[0],k[ht+1]=C[1];return k}}(),XT=function(C){function k(V){C.call(this,V,Vd)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.createBucket=function(ne){return new ks(ne)},k.prototype.queryRadius=function(ne){var xe=ne;return Rh("circle-radius",this,xe)+Rh("circle-stroke-width",this,xe)+Cp(this.paint.get("circle-translate"))},k.prototype.queryIntersectsFeature=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr){for(var Cr=Vp(ne,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Rt.angle,Ht),Xr=this.paint.get("circle-radius").evaluate(xe,Ie),qr=this.paint.get("circle-stroke-width").evaluate(xe,Ie),pa=Xr+qr,ja=this.paint.get("circle-pitch-alignment")==="map",Ei=ja?Cr:Px(Cr,tr),li=ja?pa*Ht:pa,en=0,Ni=Ve;en<Ni.length;en+=1)for(var Qi=Ni[en],ln=0,xn=Qi;ln<xn.length;ln+=1){var qn=xn[ln],Nn=ja?qn:Lx(qn,tr),Mo=li,no=Rv([],[qn.x,qn.y,0,1],tr);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Mo*=no[3]/Rt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Mo*=Rt.cameraToCenterDistance/no[3]),bs(Ei,Nn,Mo))return!0}return!1},k}(Ja);function Lx(C,k){var V=Rv([],[C.x,C.y,0,1],k);return new i(V[0]/V[3],V[1]/V[3])}function Px(C,k){return C.map(function(V){return Lx(V,k)})}var R1=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k}(ks);de("HeatmapBucket",R1,{omit:["layers"]});function zh(C,k,V,ne){var xe=k.width,Ie=k.height;if(!ne)ne=new Uint8Array(xe*Ie*V);else if(ne instanceof Uint8ClampedArray)ne=new Uint8Array(ne.buffer);else if(ne.length!==xe*Ie*V)throw new RangeError("mismatched image size");return C.width=xe,C.height=Ie,C.data=ne,C}function bg(C,k,V){var ne=k.width,xe=k.height;if(!(ne===C.width&&xe===C.height)){var Ie=zh({},{width:ne,height:xe},V);wg(C,Ie,{x:0,y:0},{x:0,y:0},{width:Math.min(C.width,ne),height:Math.min(C.height,xe)},V),C.width=ne,C.height=xe,C.data=Ie.data}}function wg(C,k,V,ne,xe,Ie){if(xe.width===0||xe.height===0)return k;if(xe.width>C.width||xe.height>C.height||V.x>C.width-xe.width||V.y>C.height-xe.height)throw new RangeError("out of range source coordinates for image copy");if(xe.width>k.width||xe.height>k.height||ne.x>k.width-xe.width||ne.y>k.height-xe.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ve=C.data,ht=k.data,Rt=0;Rt<xe.height;Rt++)for(var Ht=((V.y+Rt)*C.width+V.x)*Ie,tr=((ne.y+Rt)*k.width+ne.x)*Ie,Cr=0;Cr<xe.width*Ie;Cr++)ht[tr+Cr]=Ve[Ht+Cr];return k}var Pp=function(k,V){zh(this,k,1,V)};Pp.prototype.resize=function(k){bg(this,k,1)},Pp.prototype.clone=function(){return new Pp({width:this.width,height:this.height},new Uint8Array(this.data))},Pp.copy=function(k,V,ne,xe,Ie){wg(k,V,ne,xe,Ie,1)};var $f=function(k,V){zh(this,k,4,V)};$f.prototype.resize=function(k){bg(this,k,4)},$f.prototype.replace=function(k,V){V?this.data.set(k):k instanceof Uint8ClampedArray?this.data=new Uint8Array(k.buffer):this.data=k},$f.prototype.clone=function(){return new $f({width:this.width,height:this.height},new Uint8Array(this.data))},$f.copy=function(k,V,ne,xe,Ie){wg(k,V,ne,xe,Ie,4)},de("AlphaImage",Pp),de("RGBAImage",$f);var T0=new xa({"heatmap-radius":new Yt(Ui.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Yt(Ui.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new nt(Ui.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Aa(Ui.paint_heatmap["heatmap-color"]),"heatmap-opacity":new nt(Ui.paint_heatmap["heatmap-opacity"])}),sm={paint:T0};function A0(C){var k={},V=C.resolution||256,ne=C.clips?C.clips.length:1,xe=C.image||new $f({width:V,height:ne}),Ie=function(en,Ni,Qi){k[C.evaluationKey]=Qi;var ln=C.expression.evaluate(k);xe.data[en+Ni+0]=Math.floor(ln.r*255/ln.a),xe.data[en+Ni+1]=Math.floor(ln.g*255/ln.a),xe.data[en+Ni+2]=Math.floor(ln.b*255/ln.a),xe.data[en+Ni+3]=Math.floor(ln.a*255)};if(C.clips)for(var Ht=0,tr=0;Ht<ne;++Ht,tr+=V*4)for(var Cr=0,Xr=0;Cr<V;Cr++,Xr+=4){var qr=Cr/(V-1),pa=C.clips[Ht],ja=pa.start,Ei=pa.end,li=ja*(1-qr)+Ei*qr;Ie(tr,Xr,li)}else for(var Ve=0,ht=0;Ve<V;Ve++,ht+=4){var Rt=Ve/(V-1);Ie(0,ht,Rt)}return xe}var Tg=function(C){function k(V){C.call(this,V,sm),this._updateColorRamp()}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.createBucket=function(ne){return new R1(ne)},k.prototype._handleSpecialPaintPropertyUpdate=function(ne){ne==="heatmap-color"&&this._updateColorRamp()},k.prototype._updateColorRamp=function(){var ne=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=A0({expression:ne,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},k.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},k.prototype.queryRadius=function(){return 0},k.prototype.queryIntersectsFeature=function(){return!1},k.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},k}(Ja),ZT=new xa({"hillshade-illumination-direction":new nt(Ui.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new nt(Ui.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new nt(Ui.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new nt(Ui.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new nt(Ui.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new nt(Ui.paint_hillshade["hillshade-accent-color"])}),YT={paint:ZT},Ix=function(C){function k(V){C.call(this,V,YT)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},k}(Ja),Rx=ki([{name:"a_pos",components:2,type:"Int16"}],4),KT=Rx.members,Ag=lm,Dx=lm;function lm(C,k,V){V=V||2;var ne=k&&k.length,xe=ne?k[0]*V:C.length,Ie=Sg(C,0,xe,V,!0),Ve=[];if(!Ie||Ie.next===Ie.prev)return Ve;var ht,Rt,Ht,tr,Cr,Xr,qr;if(ne&&(Ie=cv(C,k,Ie,V)),C.length>80*V){ht=Ht=C[0],Rt=tr=C[1];for(var pa=V;pa<xe;pa+=V)Cr=C[pa],Xr=C[pa+1],Cr<ht&&(ht=Cr),Xr<Rt&&(Rt=Xr),Cr>Ht&&(Ht=Cr),Xr>tr&&(tr=Xr);qr=Math.max(Ht-ht,tr-Rt),qr=qr!==0?1/qr:0}return S0(Ie,Ve,V,ht,Rt,qr),Ve}function Sg(C,k,V,ne,xe){var Ie,Ve;if(xe===U1(C,k,V,ne)>0)for(Ie=k;Ie<V;Ie+=ne)Ve=Nx(Ie,C[Ie],C[Ie+1],Ve);else for(Ie=V-ne;Ie>=k;Ie-=ne)Ve=Nx(Ie,C[Ie],C[Ie+1],Ve);return Ve&&E0(Ve,Ve.next)&&(L0(Ve),Ve=Ve.next),Ve}function uv(C,k){if(!C)return C;k||(k=C);var V=C,ne;do if(ne=!1,!V.steiner&&(E0(V,V.next)||lf(V.prev,V,V.next)===0)){if(L0(V),V=k=V.prev,V===V.next)break;ne=!0}else V=V.next;while(ne||V!==k);return k}function S0(C,k,V,ne,xe,Ie,Ve){if(C){!Ve&&Ie&&Mg(C,ne,xe,Ie);for(var ht=C,Rt,Ht;C.prev!==C.next;){if(Rt=C.prev,Ht=C.next,Ie?Fx(C,ne,xe,Ie):zx(C)){k.push(Rt.i/V),k.push(C.i/V),k.push(Ht.i/V),L0(C),C=Ht.next,ht=Ht.next;continue}if(C=Ht,C===ht){Ve?Ve===1?(C=M0(uv(C),k,V),S0(C,k,V,ne,xe,Ie,2)):Ve===2&&yd(C,k,V,ne,xe,Ie):S0(uv(C),k,V,ne,xe,Ie,1);break}}}}function zx(C){var k=C.prev,V=C,ne=C.next;if(lf(k,V,ne)>=0)return!1;for(var xe=C.next.next;xe!==C.prev;){if(fv(k.x,k.y,V.x,V.y,ne.x,ne.y,xe.x,xe.y)&&lf(xe.prev,xe,xe.next)>=0)return!1;xe=xe.next}return!0}function Fx(C,k,V,ne){var xe=C.prev,Ie=C,Ve=C.next;if(lf(xe,Ie,Ve)>=0)return!1;for(var ht=xe.x<Ie.x?xe.x<Ve.x?xe.x:Ve.x:Ie.x<Ve.x?Ie.x:Ve.x,Rt=xe.y<Ie.y?xe.y<Ve.y?xe.y:Ve.y:Ie.y<Ve.y?Ie.y:Ve.y,Ht=xe.x>Ie.x?xe.x>Ve.x?xe.x:Ve.x:Ie.x>Ve.x?Ie.x:Ve.x,tr=xe.y>Ie.y?xe.y>Ve.y?xe.y:Ve.y:Ie.y>Ve.y?Ie.y:Ve.y,Cr=F1(ht,Rt,k,V,ne),Xr=F1(Ht,tr,k,V,ne),qr=C.prevZ,pa=C.nextZ;qr&&qr.z>=Cr&&pa&&pa.z<=Xr;){if(qr!==C.prev&&qr!==C.next&&fv(xe.x,xe.y,Ie.x,Ie.y,Ve.x,Ve.y,qr.x,qr.y)&&lf(qr.prev,qr,qr.next)>=0||(qr=qr.prevZ,pa!==C.prev&&pa!==C.next&&fv(xe.x,xe.y,Ie.x,Ie.y,Ve.x,Ve.y,pa.x,pa.y)&&lf(pa.prev,pa,pa.next)>=0))return!1;pa=pa.nextZ}for(;qr&&qr.z>=Cr;){if(qr!==C.prev&&qr!==C.next&&fv(xe.x,xe.y,Ie.x,Ie.y,Ve.x,Ve.y,qr.x,qr.y)&&lf(qr.prev,qr,qr.next)>=0)return!1;qr=qr.prevZ}for(;pa&&pa.z<=Xr;){if(pa!==C.prev&&pa!==C.next&&fv(xe.x,xe.y,Ie.x,Ie.y,Ve.x,Ve.y,pa.x,pa.y)&&lf(pa.prev,pa,pa.next)>=0)return!1;pa=pa.nextZ}return!0}function M0(C,k,V){var ne=C;do{var xe=ne.prev,Ie=ne.next.next;!E0(xe,Ie)&&Eg(xe,ne,ne.next,Ie)&&k0(xe,Ie)&&k0(Ie,xe)&&(k.push(xe.i/V),k.push(ne.i/V),k.push(Ie.i/V),L0(ne),L0(ne.next),ne=C=Ie),ne=ne.next}while(ne!==C);return uv(ne)}function yd(C,k,V,ne,xe,Ie){var Ve=C;do{for(var ht=Ve.next.next;ht!==Ve.prev;){if(Ve.i!==ht.i&&um(Ve,ht)){var Rt=B1(Ve,ht);Ve=uv(Ve,Ve.next),Rt=uv(Rt,Rt.next),S0(Ve,k,V,ne,xe,Ie),S0(Rt,k,V,ne,xe,Ie);return}ht=ht.next}Ve=Ve.next}while(Ve!==C)}function cv(C,k,V,ne){var xe=[],Ie,Ve,ht,Rt,Ht;for(Ie=0,Ve=k.length;Ie<Ve;Ie++)ht=k[Ie]*ne,Rt=Ie<Ve-1?k[Ie+1]*ne:C.length,Ht=Sg(C,ht,Rt,ne,!1),Ht===Ht.next&&(Ht.steiner=!0),xe.push(O1(Ht));for(xe.sort(Ox),Ie=0;Ie<xe.length;Ie++)D1(xe[Ie],V),V=uv(V,V.next);return V}function Ox(C,k){return C.x-k.x}function D1(C,k){if(k=JT(C,k),k){var V=B1(k,C);uv(k,k.next),uv(V,V.next)}}function JT(C,k){var V=k,ne=C.x,xe=C.y,Ie=-1/0,Ve;do{if(xe<=V.y&&xe>=V.next.y&&V.next.y!==V.y){var ht=V.x+(xe-V.y)*(V.next.x-V.x)/(V.next.y-V.y);if(ht<=ne&&ht>Ie){if(Ie=ht,ht===ne){if(xe===V.y)return V;if(xe===V.next.y)return V.next}Ve=V.x<V.next.x?V:V.next}}V=V.next}while(V!==k);if(!Ve)return null;if(ne===Ie)return Ve;var Rt=Ve,Ht=Ve.x,tr=Ve.y,Cr=1/0,Xr;V=Ve;do ne>=V.x&&V.x>=Ht&&ne!==V.x&&fv(xe<tr?ne:Ie,xe,Ht,tr,xe<tr?Ie:ne,xe,V.x,V.y)&&(Xr=Math.abs(xe-V.y)/(ne-V.x),k0(V,C)&&(Xr<Cr||Xr===Cr&&(V.x>Ve.x||V.x===Ve.x&&$T(Ve,V)))&&(Ve=V,Cr=Xr)),V=V.next;while(V!==Rt);return Ve}function $T(C,k){return lf(C.prev,C,k.prev)<0&&lf(k.next,C,C.next)<0}function Mg(C,k,V,ne){var xe=C;do xe.z===null&&(xe.z=F1(xe.x,xe.y,k,V,ne)),xe.prevZ=xe.prev,xe.nextZ=xe.next,xe=xe.next;while(xe!==C);xe.prevZ.nextZ=null,xe.prevZ=null,z1(xe)}function z1(C){var k,V,ne,xe,Ie,Ve,ht,Rt,Ht=1;do{for(V=C,C=null,Ie=null,Ve=0;V;){for(Ve++,ne=V,ht=0,k=0;k<Ht&&(ht++,ne=ne.nextZ,!!ne);k++);for(Rt=Ht;ht>0||Rt>0&&ne;)ht!==0&&(Rt===0||!ne||V.z<=ne.z)?(xe=V,V=V.nextZ,ht--):(xe=ne,ne=ne.nextZ,Rt--),Ie?Ie.nextZ=xe:C=xe,xe.prevZ=Ie,Ie=xe;V=ne}Ie.nextZ=null,Ht*=2}while(Ve>1);return C}function F1(C,k,V,ne,xe){return C=32767*(C-V)*xe,k=32767*(k-ne)*xe,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,C|k<<1}function O1(C){var k=C,V=C;do(k.x<V.x||k.x===V.x&&k.y<V.y)&&(V=k),k=k.next;while(k!==C);return V}function fv(C,k,V,ne,xe,Ie,Ve,ht){return(xe-Ve)*(k-ht)-(C-Ve)*(Ie-ht)>=0&&(C-Ve)*(ne-ht)-(V-Ve)*(k-ht)>=0&&(V-Ve)*(Ie-ht)-(xe-Ve)*(ne-ht)>=0}function um(C,k){return C.next.i!==k.i&&C.prev.i!==k.i&&!Bx(C,k)&&(k0(C,k)&&k0(k,C)&&QT(C,k)&&(lf(C.prev,C,k.prev)||lf(C,k.prev,k))||E0(C,k)&&lf(C.prev,C,C.next)>0&&lf(k.prev,k,k.next)>0)}function lf(C,k,V){return(k.y-C.y)*(V.x-k.x)-(k.x-C.x)*(V.y-k.y)}function E0(C,k){return C.x===k.x&&C.y===k.y}function Eg(C,k,V,ne){var xe=Dv(lf(C,k,V)),Ie=Dv(lf(C,k,ne)),Ve=Dv(lf(V,ne,C)),ht=Dv(lf(V,ne,k));return!!(xe!==Ie&&Ve!==ht||xe===0&&C0(C,V,k)||Ie===0&&C0(C,ne,k)||Ve===0&&C0(V,C,ne)||ht===0&&C0(V,k,ne))}function C0(C,k,V){return k.x<=Math.max(C.x,V.x)&&k.x>=Math.min(C.x,V.x)&&k.y<=Math.max(C.y,V.y)&&k.y>=Math.min(C.y,V.y)}function Dv(C){return C>0?1:C<0?-1:0}function Bx(C,k){var V=C;do{if(V.i!==C.i&&V.next.i!==C.i&&V.i!==k.i&&V.next.i!==k.i&&Eg(V,V.next,C,k))return!0;V=V.next}while(V!==C);return!1}function k0(C,k){return lf(C.prev,C,C.next)<0?lf(C,k,C.next)>=0&&lf(C,C.prev,k)>=0:lf(C,k,C.prev)<0||lf(C,C.next,k)<0}function QT(C,k){var V=C,ne=!1,xe=(C.x+k.x)/2,Ie=(C.y+k.y)/2;do V.y>Ie!=V.next.y>Ie&&V.next.y!==V.y&&xe<(V.next.x-V.x)*(Ie-V.y)/(V.next.y-V.y)+V.x&&(ne=!ne),V=V.next;while(V!==C);return ne}function B1(C,k){var V=new N1(C.i,C.x,C.y),ne=new N1(k.i,k.x,k.y),xe=C.next,Ie=k.prev;return C.next=k,k.prev=C,V.next=xe,xe.prev=V,ne.next=V,V.prev=ne,Ie.next=ne,ne.prev=Ie,ne}function Nx(C,k,V,ne){var xe=new N1(C,k,V);return ne?(xe.next=ne.next,xe.prev=ne,ne.next.prev=xe,ne.next=xe):(xe.prev=xe,xe.next=xe),xe}function L0(C){C.next.prev=C.prev,C.prev.next=C.next,C.prevZ&&(C.prevZ.nextZ=C.nextZ),C.nextZ&&(C.nextZ.prevZ=C.prevZ)}function N1(C,k,V){this.i=C,this.x=k,this.y=V,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}lm.deviation=function(C,k,V,ne){var xe=k&&k.length,Ie=xe?k[0]*V:C.length,Ve=Math.abs(U1(C,0,Ie,V));if(xe)for(var ht=0,Rt=k.length;ht<Rt;ht++){var Ht=k[ht]*V,tr=ht<Rt-1?k[ht+1]*V:C.length;Ve-=Math.abs(U1(C,Ht,tr,V))}var Cr=0;for(ht=0;ht<ne.length;ht+=3){var Xr=ne[ht]*V,qr=ne[ht+1]*V,pa=ne[ht+2]*V;Cr+=Math.abs((C[Xr]-C[pa])*(C[qr+1]-C[Xr+1])-(C[Xr]-C[qr])*(C[pa+1]-C[Xr+1]))}return Ve===0&&Cr===0?0:Math.abs((Cr-Ve)/Ve)};function U1(C,k,V,ne){for(var xe=0,Ie=k,Ve=V-ne;Ie<V;Ie+=ne)xe+=(C[Ve]-C[Ie])*(C[Ie+1]+C[Ve+1]),Ve=Ie;return xe}lm.flatten=function(C){for(var k=C[0][0].length,V={vertices:[],holes:[],dimensions:k},ne=0,xe=0;xe<C.length;xe++){for(var Ie=0;Ie<C[xe].length;Ie++)for(var Ve=0;Ve<k;Ve++)V.vertices.push(C[xe][Ie][Ve]);xe>0&&(ne+=C[xe-1].length,V.holes.push(ne))}return V},Ag.default=Dx;function j1(C,k,V,ne,xe){Hd(C,k,V||0,ne||C.length-1,xe||Ux)}function Hd(C,k,V,ne,xe){for(;ne>V;){if(ne-V>600){var Ie=ne-V+1,Ve=k-V+1,ht=Math.log(Ie),Rt=.5*Math.exp(2*ht/3),Ht=.5*Math.sqrt(ht*Rt*(Ie-Rt)/Ie)*(Ve-Ie/2<0?-1:1),tr=Math.max(V,Math.floor(k-Ve*Rt/Ie+Ht)),Cr=Math.min(ne,Math.floor(k+(Ie-Ve)*Rt/Ie+Ht));Hd(C,k,tr,Cr,xe)}var Xr=C[k],qr=V,pa=ne;for(cm(C,V,k),xe(C[ne],Xr)>0&&cm(C,V,ne);qr<pa;){for(cm(C,qr,pa),qr++,pa--;xe(C[qr],Xr)<0;)qr++;for(;xe(C[pa],Xr)>0;)pa--}xe(C[V],Xr)===0?cm(C,V,pa):(pa++,cm(C,pa,ne)),pa<=k&&(V=pa+1),k<=pa&&(ne=pa-1)}}function cm(C,k,V){var ne=C[k];C[k]=C[V],C[V]=ne}function Ux(C,k){return C<k?-1:C>k?1:0}function Cg(C,k){var V=C.length;if(V<=1)return[C];for(var ne=[],xe,Ie,Ve=0;Ve<V;Ve++){var ht=Q(C[Ve]);ht!==0&&(C[Ve].area=Math.abs(ht),Ie===void 0&&(Ie=ht<0),Ie===ht<0?(xe&&ne.push(xe),xe=[C[Ve]]):xe.push(C[Ve]))}if(xe&&ne.push(xe),k>1)for(var Rt=0;Rt<ne.length;Rt++)ne[Rt].length<=k||(j1(ne[Rt],k,1,ne[Rt].length-1,jx),ne[Rt]=ne[Rt].slice(0,k));return ne}function jx(C,k){return k.area-C.area}function kg(C,k,V){for(var ne=V.patternDependencies,xe=!1,Ie=0,Ve=k;Ie<Ve.length;Ie+=1){var ht=Ve[Ie],Rt=ht.paint.get(C+"-pattern");Rt.isConstant()||(xe=!0);var Ht=Rt.constantOr(null);Ht&&(xe=!0,ne[Ht.to]=!0,ne[Ht.from]=!0)}return xe}function P0(C,k,V,ne,xe){for(var Ie=xe.patternDependencies,Ve=0,ht=k;Ve<ht.length;Ve+=1){var Rt=ht[Ve],Ht=Rt.paint.get(C+"-pattern"),tr=Ht.value;if(tr.kind!=="constant"){var Cr=tr.evaluate({zoom:ne-1},V,{},xe.availableImages),Xr=tr.evaluate({zoom:ne},V,{},xe.availableImages),qr=tr.evaluate({zoom:ne+1},V,{},xe.availableImages);Cr=Cr&&Cr.name?Cr.name:Cr,Xr=Xr&&Xr.name?Xr.name:Xr,qr=qr&&qr.name?qr.name:qr,Ie[Cr]=!0,Ie[Xr]=!0,Ie[qr]=!0,V.patterns[Rt.id]={min:Cr,mid:Xr,max:qr}}}return V}var I0=500,ad=function(k){this.zoom=k.zoom,this.overscaling=k.overscaling,this.layers=k.layers,this.layerIds=this.layers.map(function(V){return V.id}),this.index=k.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ea,this.indexArray=new Ki,this.indexArray2=new Rn,this.programConfigurations=new Xa(k.layers,k.zoom),this.segments=new Lo,this.segments2=new Lo,this.stateDependentLayerIds=this.layers.filter(function(V){return V.isStateDependent()}).map(function(V){return V.id})};ad.prototype.populate=function(k,V,ne){this.hasPattern=kg("fill",this.layers,V);for(var xe=this.layers[0].layout.get("fill-sort-key"),Ie=[],Ve=0,ht=k;Ve<ht.length;Ve+=1){var Rt=ht[Ve],Ht=Rt.feature,tr=Rt.id,Cr=Rt.index,Xr=Rt.sourceLayerIndex,qr=this.layers[0]._featureFilter.needGeometry,pa=xo(Ht,qr);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),pa,ne)){var ja=xe?xe.evaluate(pa,{},ne,V.availableImages):void 0,Ei={id:tr,properties:Ht.properties,type:Ht.type,sourceLayerIndex:Xr,index:Cr,geometry:qr?pa.geometry:cn(Ht),patterns:{},sortKey:ja};Ie.push(Ei)}}xe&&Ie.sort(function(no,yo){return no.sortKey-yo.sortKey});for(var li=0,en=Ie;li<en.length;li+=1){var Ni=en[li],Qi=Ni,ln=Qi.geometry,xn=Qi.index,qn=Qi.sourceLayerIndex;if(this.hasPattern){var Nn=P0("fill",this.layers,Ni,this.zoom,V);this.patternFeatures.push(Nn)}else this.addFeature(Ni,ln,xn,ne,{});var Mo=k[xn].feature;V.featureIndex.insert(Mo,ln,xn,qn,this.index)}},ad.prototype.update=function(k,V,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(k,V,this.stateDependentLayers,ne)},ad.prototype.addFeatures=function(k,V,ne){for(var xe=0,Ie=this.patternFeatures;xe<Ie.length;xe+=1){var Ve=Ie[xe];this.addFeature(Ve,Ve.geometry,Ve.index,V,ne)}},ad.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},ad.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ad.prototype.upload=function(k){this.uploaded||(this.layoutVertexBuffer=k.createVertexBuffer(this.layoutVertexArray,KT),this.indexBuffer=k.createIndexBuffer(this.indexArray),this.indexBuffer2=k.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(k),this.uploaded=!0},ad.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},ad.prototype.addFeature=function(k,V,ne,xe,Ie){for(var Ve=0,ht=Cg(V,I0);Ve<ht.length;Ve+=1){for(var Rt=ht[Ve],Ht=0,tr=0,Cr=Rt;tr<Cr.length;tr+=1){var Xr=Cr[tr];Ht+=Xr.length}for(var qr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray),pa=qr.vertexLength,ja=[],Ei=[],li=0,en=Rt;li<en.length;li+=1){var Ni=en[li];if(Ni.length!==0){Ni!==Rt[0]&&Ei.push(ja.length/2);var Qi=this.segments2.prepareSegment(Ni.length,this.layoutVertexArray,this.indexArray2),ln=Qi.vertexLength;this.layoutVertexArray.emplaceBack(Ni[0].x,Ni[0].y),this.indexArray2.emplaceBack(ln+Ni.length-1,ln),ja.push(Ni[0].x),ja.push(Ni[0].y);for(var xn=1;xn<Ni.length;xn++)this.layoutVertexArray.emplaceBack(Ni[xn].x,Ni[xn].y),this.indexArray2.emplaceBack(ln+xn-1,ln+xn),ja.push(Ni[xn].x),ja.push(Ni[xn].y);Qi.vertexLength+=Ni.length,Qi.primitiveLength+=Ni.length}}for(var qn=Ag(ja,Ei),Nn=0;Nn<qn.length;Nn+=3)this.indexArray.emplaceBack(pa+qn[Nn],pa+qn[Nn+1],pa+qn[Nn+2]);qr.vertexLength+=Ht,qr.primitiveLength+=qn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,k,ne,Ie,xe)},de("FillBucket",ad,{omit:["layers","patternFeatures"]});var q1=new xa({"fill-sort-key":new Yt(Ui.layout_fill["fill-sort-key"])}),qx=new xa({"fill-antialias":new nt(Ui.paint_fill["fill-antialias"]),"fill-opacity":new Yt(Ui.paint_fill["fill-opacity"]),"fill-color":new Yt(Ui.paint_fill["fill-color"]),"fill-outline-color":new Yt(Ui.paint_fill["fill-outline-color"]),"fill-translate":new nt(Ui.paint_fill["fill-translate"]),"fill-translate-anchor":new nt(Ui.paint_fill["fill-translate-anchor"]),"fill-pattern":new cr(Ui.paint_fill["fill-pattern"])}),Gp={paint:qx,layout:q1},R0=function(C){function k(V){C.call(this,V,Gp)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.recalculate=function(ne,xe){C.prototype.recalculate.call(this,ne,xe);var Ie=this.paint._values["fill-outline-color"];Ie.value.kind==="constant"&&Ie.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},k.prototype.createBucket=function(ne){return new ad(ne)},k.prototype.queryRadius=function(){return Cp(this.paint.get("fill-translate"))},k.prototype.queryIntersectsFeature=function(ne,xe,Ie,Ve,ht,Rt,Ht){var tr=Vp(ne,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Rt.angle,Ht);return Hs(tr,Ve)},k.prototype.isTileClipped=function(){return!0},k}(Ja),Vx=ki([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Gx=Vx.members,V1=zv;function zv(C,k,V,ne,xe){this.properties={},this.extent=V,this.type=0,this._pbf=C,this._geometry=-1,this._keys=ne,this._values=xe,C.readFields(Hx,this,k)}function Hx(C,k,V){C==1?k.id=V.readVarint():C==2?Wx(V,k):C==3?k.type=V.readVarint():C==4&&(k._geometry=V.pos)}function Wx(C,k){for(var V=C.readVarint()+C.pos;C.pos<V;){var ne=k._keys[C.readVarint()],xe=k._values[C.readVarint()];k.properties[ne]=xe}}zv.types=["Unknown","Point","LineString","Polygon"],zv.prototype.loadGeometry=function(){var C=this._pbf;C.pos=this._geometry;for(var k=C.readVarint()+C.pos,V=1,ne=0,xe=0,Ie=0,Ve=[],ht;C.pos<k;){if(ne<=0){var Rt=C.readVarint();V=Rt&7,ne=Rt>>3}if(ne--,V===1||V===2)xe+=C.readSVarint(),Ie+=C.readSVarint(),V===1&&(ht&&Ve.push(ht),ht=[]),ht.push(new i(xe,Ie));else if(V===7)ht&&ht.push(ht[0].clone());else throw new Error("unknown command "+V)}return ht&&Ve.push(ht),Ve},zv.prototype.bbox=function(){var C=this._pbf;C.pos=this._geometry;for(var k=C.readVarint()+C.pos,V=1,ne=0,xe=0,Ie=0,Ve=1/0,ht=-1/0,Rt=1/0,Ht=-1/0;C.pos<k;){if(ne<=0){var tr=C.readVarint();V=tr&7,ne=tr>>3}if(ne--,V===1||V===2)xe+=C.readSVarint(),Ie+=C.readSVarint(),xe<Ve&&(Ve=xe),xe>ht&&(ht=xe),Ie<Rt&&(Rt=Ie),Ie>Ht&&(Ht=Ie);else if(V!==7)throw new Error("unknown command "+V)}return[Ve,Rt,ht,Ht]},zv.prototype.toGeoJSON=function(C,k,V){var ne=this.extent*Math.pow(2,V),xe=this.extent*C,Ie=this.extent*k,Ve=this.loadGeometry(),ht=zv.types[this.type],Rt,Ht;function tr(qr){for(var pa=0;pa<qr.length;pa++){var ja=qr[pa],Ei=180-(ja.y+Ie)*360/ne;qr[pa]=[(ja.x+xe)*360/ne-180,360/Math.PI*Math.atan(Math.exp(Ei*Math.PI/180))-90]}}switch(this.type){case 1:var Cr=[];for(Rt=0;Rt<Ve.length;Rt++)Cr[Rt]=Ve[Rt][0];Ve=Cr,tr(Ve);break;case 2:for(Rt=0;Rt<Ve.length;Rt++)tr(Ve[Rt]);break;case 3:for(Ve=eA(Ve),Rt=0;Rt<Ve.length;Rt++)for(Ht=0;Ht<Ve[Rt].length;Ht++)tr(Ve[Rt][Ht]);break}Ve.length===1?Ve=Ve[0]:ht="Multi"+ht;var Xr={type:"Feature",geometry:{type:ht,coordinates:Ve},properties:this.properties};return"id"in this&&(Xr.id=this.id),Xr};function eA(C){var k=C.length;if(k<=1)return[C];for(var V=[],ne,xe,Ie=0;Ie<k;Ie++){var Ve=Xx(C[Ie]);Ve!==0&&(xe===void 0&&(xe=Ve<0),xe===Ve<0?(ne&&V.push(ne),ne=[C[Ie]]):ne.push(C[Ie]))}return ne&&V.push(ne),V}function Xx(C){for(var k=0,V=0,ne=C.length,xe=ne-1,Ie,Ve;V<ne;xe=V++)Ie=C[V],Ve=C[xe],k+=(Ve.x-Ie.x)*(Ie.y+Ve.y);return k}var Wd=G1;function G1(C,k){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=C,this._keys=[],this._values=[],this._features=[],C.readFields(Zx,this,k),this.length=this._features.length}function Zx(C,k,V){C===15?k.version=V.readVarint():C===1?k.name=V.readString():C===5?k.extent=V.readVarint():C===2?k._features.push(V.pos):C===3?k._keys.push(V.readString()):C===4&&k._values.push(Yx(V))}function Yx(C){for(var k=null,V=C.readVarint()+C.pos;C.pos<V;){var ne=C.readVarint()>>3;k=ne===1?C.readString():ne===2?C.readFloat():ne===3?C.readDouble():ne===4?C.readVarint64():ne===5?C.readVarint():ne===6?C.readSVarint():ne===7?C.readBoolean():null}return k}G1.prototype.feature=function(C){if(C<0||C>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[C];var k=this._pbf.readVarint()+this._pbf.pos;return new V1(this._pbf,k,this.extent,this._keys,this._values)};var Kx=tA;function tA(C,k){this.layers=C.readFields(rA,{},k)}function rA(C,k,V){if(C===3){var ne=new Wd(V,V.readVarint()+V.pos);ne.length&&(k[ne.name]=ne)}}var Jx=Kx,fm=V1,$x=Wd,Xd={VectorTile:Jx,VectorTileFeature:fm,VectorTileLayer:$x},Qx=Xd.VectorTileFeature.types,Lg=500,hm=Math.pow(2,13);function hv(C,k,V,ne,xe,Ie,Ve,ht){C.emplaceBack(k,V,Math.floor(ne*hm)*2+Ve,xe*hm*2,Ie*hm*2,Math.round(ht))}var fd=function(k){this.zoom=k.zoom,this.overscaling=k.overscaling,this.layers=k.layers,this.layerIds=this.layers.map(function(V){return V.id}),this.index=k.index,this.hasPattern=!1,this.layoutVertexArray=new gi,this.indexArray=new Ki,this.programConfigurations=new Xa(k.layers,k.zoom),this.segments=new Lo,this.stateDependentLayerIds=this.layers.filter(function(V){return V.isStateDependent()}).map(function(V){return V.id})};fd.prototype.populate=function(k,V,ne){this.features=[],this.hasPattern=kg("fill-extrusion",this.layers,V);for(var xe=0,Ie=k;xe<Ie.length;xe+=1){var Ve=Ie[xe],ht=Ve.feature,Rt=Ve.id,Ht=Ve.index,tr=Ve.sourceLayerIndex,Cr=this.layers[0]._featureFilter.needGeometry,Xr=xo(ht,Cr);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),Xr,ne)){var qr={id:Rt,sourceLayerIndex:tr,index:Ht,geometry:Cr?Xr.geometry:cn(ht),properties:ht.properties,type:ht.type,patterns:{}};this.hasPattern?this.features.push(P0("fill-extrusion",this.layers,qr,this.zoom,V)):this.addFeature(qr,qr.geometry,Ht,ne,{}),V.featureIndex.insert(ht,qr.geometry,Ht,tr,this.index,!0)}}},fd.prototype.addFeatures=function(k,V,ne){for(var xe=0,Ie=this.features;xe<Ie.length;xe+=1){var Ve=Ie[xe],ht=Ve.geometry;this.addFeature(Ve,ht,Ve.index,V,ne)}},fd.prototype.update=function(k,V,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(k,V,this.stateDependentLayers,ne)},fd.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},fd.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},fd.prototype.upload=function(k){this.uploaded||(this.layoutVertexBuffer=k.createVertexBuffer(this.layoutVertexArray,Gx),this.indexBuffer=k.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(k),this.uploaded=!0},fd.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},fd.prototype.addFeature=function(k,V,ne,xe,Ie){for(var Ve=0,ht=Cg(V,Lg);Ve<ht.length;Ve+=1){for(var Rt=ht[Ve],Ht=0,tr=0,Cr=Rt;tr<Cr.length;tr+=1){var Xr=Cr[tr];Ht+=Xr.length}for(var qr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),pa=0,ja=Rt;pa<ja.length;pa+=1){var Ei=ja[pa];if(Ei.length!==0&&!iA(Ei))for(var li=0,en=0;en<Ei.length;en++){var Ni=Ei[en];if(en>=1){var Qi=Ei[en-1];if(!aA(Ni,Qi)){qr.vertexLength+4>Lo.MAX_VERTEX_ARRAY_LENGTH&&(qr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var ln=Ni.sub(Qi)._perp()._unit(),xn=Qi.dist(Ni);li+xn>32768&&(li=0),hv(this.layoutVertexArray,Ni.x,Ni.y,ln.x,ln.y,0,0,li),hv(this.layoutVertexArray,Ni.x,Ni.y,ln.x,ln.y,0,1,li),li+=xn,hv(this.layoutVertexArray,Qi.x,Qi.y,ln.x,ln.y,0,0,li),hv(this.layoutVertexArray,Qi.x,Qi.y,ln.x,ln.y,0,1,li);var qn=qr.vertexLength;this.indexArray.emplaceBack(qn,qn+2,qn+1),this.indexArray.emplaceBack(qn+1,qn+2,qn+3),qr.vertexLength+=4,qr.primitiveLength+=2}}}}if(qr.vertexLength+Ht>Lo.MAX_VERTEX_ARRAY_LENGTH&&(qr=this.segments.prepareSegment(Ht,this.layoutVertexArray,this.indexArray)),Qx[k.type]==="Polygon"){for(var Nn=[],Mo=[],no=qr.vertexLength,yo=0,Ms=Rt;yo<Ms.length;yo+=1){var Eo=Ms[yo];if(Eo.length!==0){Eo!==Rt[0]&&Mo.push(Nn.length/2);for(var Ro=0;Ro<Eo.length;Ro++){var Zs=Eo[Ro];hv(this.layoutVertexArray,Zs.x,Zs.y,0,0,1,1,0),Nn.push(Zs.x),Nn.push(Zs.y)}}}for(var _s=Ag(Nn,Mo),Wl=0;Wl<_s.length;Wl+=3)this.indexArray.emplaceBack(no+_s[Wl],no+_s[Wl+2],no+_s[Wl+1]);qr.primitiveLength+=_s.length/3,qr.vertexLength+=Ht}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,k,ne,Ie,xe)},de("FillExtrusionBucket",fd,{omit:["layers","features"]});function aA(C,k){return C.x===k.x&&(C.x<0||C.x>pi)||C.y===k.y&&(C.y<0||C.y>pi)}function iA(C){return C.every(function(k){return k.x<0})||C.every(function(k){return k.x>pi})||C.every(function(k){return k.y<0})||C.every(function(k){return k.y>pi})}var pm=new xa({"fill-extrusion-opacity":new nt(Ui["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Yt(Ui["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new nt(Ui["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new nt(Ui["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new cr(Ui["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Yt(Ui["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Yt(Ui["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new nt(Ui["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),xh={paint:pm},pv=function(C){function k(V){C.call(this,V,xh)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.createBucket=function(ne){return new fd(ne)},k.prototype.queryRadius=function(){return Cp(this.paint.get("fill-extrusion-translate"))},k.prototype.is3D=function(){return!0},k.prototype.queryIntersectsFeature=function(ne,xe,Ie,Ve,ht,Rt,Ht,tr){var Cr=Vp(ne,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Rt.angle,Ht),Xr=this.paint.get("fill-extrusion-height").evaluate(xe,Ie),qr=this.paint.get("fill-extrusion-base").evaluate(xe,Ie),pa=nA(Cr,tr,Rt,0),ja=W1(Ve,qr,Xr,tr),Ei=ja[0],li=ja[1];return eb(Ei,li,pa)},k}(Ja);function Fv(C,k){return C.x*k.x+C.y*k.y}function H1(C,k){if(C.length===1){for(var V=0,ne=k[V++],xe;!xe||ne.equals(xe);)if(xe=k[V++],!xe)return 1/0;for(;V<k.length;V++){var Ie=k[V],Ve=C[0],ht=xe.sub(ne),Rt=Ie.sub(ne),Ht=Ve.sub(ne),tr=Fv(ht,ht),Cr=Fv(ht,Rt),Xr=Fv(Rt,Rt),qr=Fv(Ht,ht),pa=Fv(Ht,Rt),ja=tr*Xr-Cr*Cr,Ei=(Xr*qr-Cr*pa)/ja,li=(tr*pa-Cr*qr)/ja,en=1-Ei-li,Ni=ne.z*en+xe.z*Ei+Ie.z*li;if(isFinite(Ni))return Ni}return 1/0}else{for(var Qi=1/0,ln=0,xn=k;ln<xn.length;ln+=1){var qn=xn[ln];Qi=Math.min(Qi,qn.z)}return Qi}}function eb(C,k,V){var ne=1/0;Hs(V,k)&&(ne=H1(V,k[0]));for(var xe=0;xe<k.length;xe++)for(var Ie=k[xe],Ve=C[xe],ht=0;ht<Ie.length-1;ht++){var Rt=Ie[ht],Ht=Ie[ht+1],tr=Ve[ht],Cr=Ve[ht+1],Xr=[Rt,Ht,Cr,tr,Rt];Fo(V,Xr)&&(ne=Math.min(ne,H1(V,Xr)))}return ne===1/0?!1:ne}function W1(C,k,V,ne){for(var xe=[],Ie=[],Ve=ne[8]*k,ht=ne[9]*k,Rt=ne[10]*k,Ht=ne[11]*k,tr=ne[8]*V,Cr=ne[9]*V,Xr=ne[10]*V,qr=ne[11]*V,pa=0,ja=C;pa<ja.length;pa+=1){for(var Ei=ja[pa],li=[],en=[],Ni=0,Qi=Ei;Ni<Qi.length;Ni+=1){var ln=Qi[Ni],xn=ln.x,qn=ln.y,Nn=ne[0]*xn+ne[4]*qn+ne[12],Mo=ne[1]*xn+ne[5]*qn+ne[13],no=ne[2]*xn+ne[6]*qn+ne[14],yo=ne[3]*xn+ne[7]*qn+ne[15],Ms=Nn+Ve,Eo=Mo+ht,Ro=no+Rt,Zs=yo+Ht,_s=Nn+tr,Wl=Mo+Cr,zu=no+Xr,Xl=yo+qr,Zl=new i(Ms/Zs,Eo/Zs);Zl.z=Ro/Zs,li.push(Zl);var Ol=new i(_s/Xl,Wl/Xl);Ol.z=zu/Xl,en.push(Ol)}xe.push(li),Ie.push(en)}return[xe,Ie]}function nA(C,k,V,ne){for(var xe=[],Ie=0,Ve=C;Ie<Ve.length;Ie+=1){var ht=Ve[Ie],Rt=[ht.x,ht.y,ne,1];Rv(Rt,Rt,k),xe.push(new i(Rt[0]/Rt[3],Rt[1]/Rt[3]))}return xe}var tb=ki([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),rb=tb.members,oA=ki([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),ab=oA.members,X1=Xd.VectorTileFeature.types,Pg=63,ib=Math.cos(75/2*(Math.PI/180)),D0=15,Z1=20,nb=15,Ig=1/2,z0=Math.pow(2,nb-1)/Ig,Vf=function(k){var V=this;this.zoom=k.zoom,this.overscaling=k.overscaling,this.layers=k.layers,this.layerIds=this.layers.map(function(ne){return ne.id}),this.index=k.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(ne){V.gradients[ne.id]={}}),this.layoutVertexArray=new Wa,this.layoutVertexArray2=new ji,this.indexArray=new Ki,this.programConfigurations=new Xa(k.layers,k.zoom),this.segments=new Lo,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(ne){return ne.isStateDependent()}).map(function(ne){return ne.id})};Vf.prototype.populate=function(k,V,ne){this.hasPattern=kg("line",this.layers,V);for(var xe=this.layers[0].layout.get("line-sort-key"),Ie=[],Ve=0,ht=k;Ve<ht.length;Ve+=1){var Rt=ht[Ve],Ht=Rt.feature,tr=Rt.id,Cr=Rt.index,Xr=Rt.sourceLayerIndex,qr=this.layers[0]._featureFilter.needGeometry,pa=xo(Ht,qr);if(this.layers[0]._featureFilter.filter(new gn(this.zoom),pa,ne)){var ja=xe?xe.evaluate(pa,{},ne):void 0,Ei={id:tr,properties:Ht.properties,type:Ht.type,sourceLayerIndex:Xr,index:Cr,geometry:qr?pa.geometry:cn(Ht),patterns:{},sortKey:ja};Ie.push(Ei)}}xe&&Ie.sort(function(no,yo){return no.sortKey-yo.sortKey});for(var li=0,en=Ie;li<en.length;li+=1){var Ni=en[li],Qi=Ni,ln=Qi.geometry,xn=Qi.index,qn=Qi.sourceLayerIndex;if(this.hasPattern){var Nn=P0("line",this.layers,Ni,this.zoom,V);this.patternFeatures.push(Nn)}else this.addFeature(Ni,ln,xn,ne,{});var Mo=k[xn].feature;V.featureIndex.insert(Mo,ln,xn,qn,this.index)}},Vf.prototype.update=function(k,V,ne){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(k,V,this.stateDependentLayers,ne)},Vf.prototype.addFeatures=function(k,V,ne){for(var xe=0,Ie=this.patternFeatures;xe<Ie.length;xe+=1){var Ve=Ie[xe];this.addFeature(Ve,Ve.geometry,Ve.index,V,ne)}},Vf.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Vf.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Vf.prototype.upload=function(k){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=k.createVertexBuffer(this.layoutVertexArray2,ab)),this.layoutVertexBuffer=k.createVertexBuffer(this.layoutVertexArray,rb),this.indexBuffer=k.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(k),this.uploaded=!0},Vf.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Vf.prototype.lineFeatureClips=function(k){if(k.properties&&k.properties.hasOwnProperty("mapbox_clip_start")&&k.properties.hasOwnProperty("mapbox_clip_end")){var V=+k.properties.mapbox_clip_start,ne=+k.properties.mapbox_clip_end;return{start:V,end:ne}}},Vf.prototype.addFeature=function(k,V,ne,xe,Ie){var Ve=this.layers[0].layout,ht=Ve.get("line-join").evaluate(k,{}),Rt=Ve.get("line-cap"),Ht=Ve.get("line-miter-limit"),tr=Ve.get("line-round-limit");this.lineClips=this.lineFeatureClips(k);for(var Cr=0,Xr=V;Cr<Xr.length;Cr+=1){var qr=Xr[Cr];this.addLine(qr,k,ht,Rt,Ht,tr)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,k,ne,Ie,xe)},Vf.prototype.addLine=function(k,V,ne,xe,Ie,Ve){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var ht=0;ht<k.length-1;ht++)this.totalDistance+=k[ht].dist(k[ht+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var Rt=X1[V.type]==="Polygon",Ht=k.length;Ht>=2&&k[Ht-1].equals(k[Ht-2]);)Ht--;for(var tr=0;tr<Ht-1&&k[tr].equals(k[tr+1]);)tr++;if(!(Ht<(Rt?3:2))){ne==="bevel"&&(Ie=1.05);var Cr=this.overscaling<=16?D0*pi/(512*this.overscaling):0,Xr=this.segments.prepareSegment(Ht*10,this.layoutVertexArray,this.indexArray),qr,pa=void 0,ja=void 0,Ei=void 0,li=void 0;this.e1=this.e2=-1,Rt&&(qr=k[Ht-2],li=k[tr].sub(qr)._unit()._perp());for(var en=tr;en<Ht;en++)if(ja=en===Ht-1?Rt?k[tr+1]:void 0:k[en+1],!(ja&&k[en].equals(ja))){li&&(Ei=li),qr&&(pa=qr),qr=k[en],li=ja?ja.sub(qr)._unit()._perp():Ei,Ei=Ei||li;var Ni=Ei.add(li);(Ni.x!==0||Ni.y!==0)&&Ni._unit();var Qi=Ei.x*li.x+Ei.y*li.y,ln=Ni.x*li.x+Ni.y*li.y,xn=ln!==0?1/ln:1/0,qn=2*Math.sqrt(2-2*ln),Nn=ln<ib&&pa&&ja,Mo=Ei.x*li.y-Ei.y*li.x>0;if(Nn&&en>tr){var no=qr.dist(pa);if(no>2*Cr){var yo=qr.sub(qr.sub(pa)._mult(Cr/no)._round());this.updateDistance(pa,yo),this.addCurrentVertex(yo,Ei,0,0,Xr),pa=yo}}var Ms=pa&&ja,Eo=Ms?ne:Rt?"butt":xe;if(Ms&&Eo==="round"&&(xn<Ve?Eo="miter":xn<=2&&(Eo="fakeround")),Eo==="miter"&&xn>Ie&&(Eo="bevel"),Eo==="bevel"&&(xn>2&&(Eo="flipbevel"),xn<Ie&&(Eo="miter")),pa&&this.updateDistance(pa,qr),Eo==="miter")Ni._mult(xn),this.addCurrentVertex(qr,Ni,0,0,Xr);else if(Eo==="flipbevel"){if(xn>100)Ni=li.mult(-1);else{var Ro=xn*Ei.add(li).mag()/Ei.sub(li).mag();Ni._perp()._mult(Ro*(Mo?-1:1))}this.addCurrentVertex(qr,Ni,0,0,Xr),this.addCurrentVertex(qr,Ni.mult(-1),0,0,Xr)}else if(Eo==="bevel"||Eo==="fakeround"){var Zs=-Math.sqrt(xn*xn-1),_s=Mo?Zs:0,Wl=Mo?0:Zs;if(pa&&this.addCurrentVertex(qr,Ei,_s,Wl,Xr),Eo==="fakeround")for(var zu=Math.round(qn*180/Math.PI/Z1),Xl=1;Xl<zu;Xl++){var Zl=Xl/zu;if(Zl!==.5){var Ol=Zl-.5,$u=1.0904+Qi*(-3.2452+Qi*(3.55645-Qi*1.43519)),hc=.848013+Qi*(-1.06021+Qi*.215638);Zl=Zl+Zl*Ol*(Zl-1)*($u*Ol*Ol+hc)}var cf=li.sub(Ei)._mult(Zl)._add(Ei)._unit()._mult(Mo?-1:1);this.addHalfVertex(qr,cf.x,cf.y,!1,Mo,0,Xr)}ja&&this.addCurrentVertex(qr,li,-_s,-Wl,Xr)}else if(Eo==="butt")this.addCurrentVertex(qr,Ni,0,0,Xr);else if(Eo==="square"){var yf=pa?1:-1;this.addCurrentVertex(qr,Ni,yf,yf,Xr)}else Eo==="round"&&(pa&&(this.addCurrentVertex(qr,Ei,0,0,Xr),this.addCurrentVertex(qr,Ei,1,1,Xr,!0)),ja&&(this.addCurrentVertex(qr,li,-1,-1,Xr,!0),this.addCurrentVertex(qr,li,0,0,Xr)));if(Nn&&en<Ht-1){var dh=qr.dist(ja);if(dh>2*Cr){var Wf=qr.add(ja.sub(qr)._mult(Cr/dh)._round());this.updateDistance(qr,Wf),this.addCurrentVertex(Wf,li,0,0,Xr),qr=Wf}}}}},Vf.prototype.addCurrentVertex=function(k,V,ne,xe,Ie,Ve){Ve===void 0&&(Ve=!1);var ht=V.x+V.y*ne,Rt=V.y-V.x*ne,Ht=-V.x+V.y*xe,tr=-V.y-V.x*xe;this.addHalfVertex(k,ht,Rt,Ve,!1,ne,Ie),this.addHalfVertex(k,Ht,tr,Ve,!0,-xe,Ie),this.distance>z0/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(k,V,ne,xe,Ie,Ve))},Vf.prototype.addHalfVertex=function(k,V,ne,xe,Ie,Ve,ht){var Rt=k.x,Ht=k.y,tr=this.lineClips?this.scaledDistance*(z0-1):this.scaledDistance,Cr=tr*Ig;if(this.layoutVertexArray.emplaceBack((Rt<<1)+(xe?1:0),(Ht<<1)+(Ie?1:0),Math.round(Pg*V)+128,Math.round(Pg*ne)+128,(Ve===0?0:Ve<0?-1:1)+1|(Cr&63)<<2,Cr>>6),this.lineClips){var Xr=this.scaledDistance-this.lineClips.start,qr=this.lineClips.end-this.lineClips.start,pa=Xr/qr;this.layoutVertexArray2.emplaceBack(pa,this.lineClipsArray.length)}var ja=ht.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ja),ht.primitiveLength++),Ie?this.e2=ja:this.e1=ja},Vf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Vf.prototype.updateDistance=function(k,V){this.distance+=k.dist(V),this.updateScaledDistance()},de("LineBucket",Vf,{omit:["layers","patternFeatures"]});var Y1=new xa({"line-cap":new nt(Ui.layout_line["line-cap"]),"line-join":new Yt(Ui.layout_line["line-join"]),"line-miter-limit":new nt(Ui.layout_line["line-miter-limit"]),"line-round-limit":new nt(Ui.layout_line["line-round-limit"]),"line-sort-key":new Yt(Ui.layout_line["line-sort-key"])}),K1=new xa({"line-opacity":new Yt(Ui.paint_line["line-opacity"]),"line-color":new Yt(Ui.paint_line["line-color"]),"line-translate":new nt(Ui.paint_line["line-translate"]),"line-translate-anchor":new nt(Ui.paint_line["line-translate-anchor"]),"line-width":new Yt(Ui.paint_line["line-width"]),"line-gap-width":new Yt(Ui.paint_line["line-gap-width"]),"line-offset":new Yt(Ui.paint_line["line-offset"]),"line-blur":new Yt(Ui.paint_line["line-blur"]),"line-dasharray":new ua(Ui.paint_line["line-dasharray"]),"line-pattern":new cr(Ui.paint_line["line-pattern"]),"line-gradient":new Aa(Ui.paint_line["line-gradient"])}),Rg={paint:K1,layout:Y1},sA=function(C){function k(){C.apply(this,arguments)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.possiblyEvaluate=function(ne,xe){return xe=new gn(Math.floor(xe.zoom),{now:xe.now,fadeDuration:xe.fadeDuration,zoomHistory:xe.zoomHistory,transition:xe.transition}),C.prototype.possiblyEvaluate.call(this,ne,xe)},k.prototype.evaluate=function(ne,xe,Ie,Ve){return xe=y({},xe,{zoom:Math.floor(xe.zoom)}),C.prototype.evaluate.call(this,ne,xe,Ie,Ve)},k}(Yt),H=new sA(Rg.paint.properties["line-width"].specification);H.useIntegerZoom=!0;var D=function(C){function k(V){C.call(this,V,Rg),this.gradientVersion=0}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype._handleSpecialPaintPropertyUpdate=function(ne){if(ne==="line-gradient"){var xe=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=xe._styleExpression.expression instanceof bu,this.gradientVersion=(this.gradientVersion+1)%f}},k.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},k.prototype.recalculate=function(ne,xe){C.prototype.recalculate.call(this,ne,xe),this.paint._values["line-floorwidth"]=H.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ne)},k.prototype.createBucket=function(ne){return new Vf(ne)},k.prototype.queryRadius=function(ne){var xe=ne,Ie=K(Rh("line-width",this,xe),Rh("line-gap-width",this,xe)),Ve=Rh("line-offset",this,xe);return Ie/2+Math.abs(Ve)+Cp(this.paint.get("line-translate"))},k.prototype.queryIntersectsFeature=function(ne,xe,Ie,Ve,ht,Rt,Ht){var tr=Vp(ne,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Rt.angle,Ht),Cr=Ht/2*K(this.paint.get("line-width").evaluate(xe,Ie),this.paint.get("line-gap-width").evaluate(xe,Ie)),Xr=this.paint.get("line-offset").evaluate(xe,Ie);return Xr&&(Ve=pe(Ve,Xr*Ht)),pu(tr,Ve,Cr)},k.prototype.isTileClipped=function(){return!0},k}(Ja);function K(C,k){return k>0?k+2*C:C}function pe(C,k){for(var V=[],ne=new i(0,0),xe=0;xe<C.length;xe++){for(var Ie=C[xe],Ve=[],ht=0;ht<Ie.length;ht++){var Rt=Ie[ht-1],Ht=Ie[ht],tr=Ie[ht+1],Cr=ht===0?ne:Ht.sub(Rt)._unit()._perp(),Xr=ht===Ie.length-1?ne:tr.sub(Ht)._unit()._perp(),qr=Cr._add(Xr)._unit(),pa=qr.x*Xr.x+qr.y*Xr.y;qr._mult(1/pa),Ve.push(qr._mult(k)._add(Ht))}V.push(Ve)}return V}var ke=ki([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),je=ki([{name:"a_projected_pos",components:3,type:"Float32"}],4),We=ki([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ft=ki([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),Mt=ki([{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"}]),Ut=ki([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nr=ki([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),Mr=ki([{name:"triangle",components:3,type:"Uint16"}]),zr=ki([{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"}]),Hr=ki([{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"}]),oa=ki([{type:"Float32",name:"offsetX"}]),va=ki([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function Ga(C,k,V){var ne=k.layout.get("text-transform").evaluate(V,{});return ne==="uppercase"?C=C.toLocaleUpperCase():ne==="lowercase"&&(C=C.toLocaleLowerCase()),el.applyArabicShaping&&(C=el.applyArabicShaping(C)),C}function Qa(C,k,V){return C.sections.forEach(function(ne){ne.text=Ga(ne.text,k,V)}),C}function Yi(C){var k={},V={},ne=[],xe=0;function Ie(li){ne.push(C[li]),xe++}function Ve(li,en,Ni){var Qi=V[li];return delete V[li],V[en]=Qi,ne[Qi].geometry[0].pop(),ne[Qi].geometry[0]=ne[Qi].geometry[0].concat(Ni[0]),Qi}function ht(li,en,Ni){var Qi=k[en];return delete k[en],k[li]=Qi,ne[Qi].geometry[0].shift(),ne[Qi].geometry[0]=Ni[0].concat(ne[Qi].geometry[0]),Qi}function Rt(li,en,Ni){var Qi=Ni?en[0][en[0].length-1]:en[0][0];return li+":"+Qi.x+":"+Qi.y}for(var Ht=0;Ht<C.length;Ht++){var tr=C[Ht],Cr=tr.geometry,Xr=tr.text?tr.text.toString():null;if(!Xr){Ie(Ht);continue}var qr=Rt(Xr,Cr),pa=Rt(Xr,Cr,!0);if(qr in V&&pa in k&&V[qr]!==k[pa]){var ja=ht(qr,pa,Cr),Ei=Ve(qr,pa,ne[ja].geometry);delete k[qr],delete V[pa],V[Rt(Xr,ne[Ei].geometry,!0)]=Ei,ne[ja].geometry=null}else qr in V?Ve(qr,pa,Cr):pa in k?ht(qr,pa,Cr):(Ie(Ht),k[qr]=xe-1,V[pa]=xe-1)}return ne.filter(function(li){return li.geometry})}var xi={"!":"\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 Hi(C){for(var k="",V=0;V<C.length;V++){var ne=C.charCodeAt(V+1)||null,xe=C.charCodeAt(V-1)||null,Ie=(!ne||!ni(ne)||xi[C[V+1]])&&(!xe||!ni(xe)||xi[C[V-1]]);Ie&&xi[C[V]]?k+=xi[C[V]]:k+=C[V]}return k}var rn=24,jn=function(C,k,V,ne,xe){var Ie,Ve,ht=xe*8-ne-1,Rt=(1<<ht)-1,Ht=Rt>>1,tr=-7,Cr=V?xe-1:0,Xr=V?-1:1,qr=C[k+Cr];for(Cr+=Xr,Ie=qr&(1<<-tr)-1,qr>>=-tr,tr+=ht;tr>0;Ie=Ie*256+C[k+Cr],Cr+=Xr,tr-=8);for(Ve=Ie&(1<<-tr)-1,Ie>>=-tr,tr+=ne;tr>0;Ve=Ve*256+C[k+Cr],Cr+=Xr,tr-=8);if(Ie===0)Ie=1-Ht;else{if(Ie===Rt)return Ve?NaN:(qr?-1:1)*(1/0);Ve=Ve+Math.pow(2,ne),Ie=Ie-Ht}return(qr?-1:1)*Ve*Math.pow(2,Ie-ne)},ko=function(C,k,V,ne,xe,Ie){var Ve,ht,Rt,Ht=Ie*8-xe-1,tr=(1<<Ht)-1,Cr=tr>>1,Xr=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,qr=ne?0:Ie-1,pa=ne?1:-1,ja=k<0||k===0&&1/k<0?1:0;for(k=Math.abs(k),isNaN(k)||k===1/0?(ht=isNaN(k)?1:0,Ve=tr):(Ve=Math.floor(Math.log(k)/Math.LN2),k*(Rt=Math.pow(2,-Ve))<1&&(Ve--,Rt*=2),Ve+Cr>=1?k+=Xr/Rt:k+=Xr*Math.pow(2,1-Cr),k*Rt>=2&&(Ve++,Rt/=2),Ve+Cr>=tr?(ht=0,Ve=tr):Ve+Cr>=1?(ht=(k*Rt-1)*Math.pow(2,xe),Ve=Ve+Cr):(ht=k*Math.pow(2,Cr-1)*Math.pow(2,xe),Ve=0));xe>=8;C[V+qr]=ht&255,qr+=pa,ht/=256,xe-=8);for(Ve=Ve<<xe|ht,Ht+=xe;Ht>0;C[V+qr]=Ve&255,qr+=pa,Ve/=256,Ht-=8);C[V+qr-pa]|=ja*128},vs={read:jn,write:ko},go=Dn;function Dn(C){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(C)?C:new Uint8Array(C||0),this.pos=0,this.type=0,this.length=this.buf.length}Dn.Varint=0,Dn.Fixed64=1,Dn.Bytes=2,Dn.Fixed32=5;var is=65536*65536,Vo=1/is,Bo=12,_n=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Dn.prototype={destroy:function(){this.buf=null},readFields:function(C,k,V){for(V=V||this.length;this.pos<V;){var ne=this.readVarint(),xe=ne>>3,Ie=this.pos;this.type=ne&7,C(xe,k,this),this.pos===Ie&&this.skip(ne)}return k},readMessage:function(C,k){return this.readFields(C,k,this.readVarint()+this.pos)},readFixed32:function(){var C=fh(this.buf,this.pos);return this.pos+=4,C},readSFixed32:function(){var C=Ip(this.buf,this.pos);return this.pos+=4,C},readFixed64:function(){var C=fh(this.buf,this.pos)+fh(this.buf,this.pos+4)*is;return this.pos+=8,C},readSFixed64:function(){var C=fh(this.buf,this.pos)+Ip(this.buf,this.pos+4)*is;return this.pos+=8,C},readFloat:function(){var C=vs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,C},readDouble:function(){var C=vs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,C},readVarint:function(C){var k=this.buf,V,ne;return ne=k[this.pos++],V=ne&127,ne<128||(ne=k[this.pos++],V|=(ne&127)<<7,ne<128)||(ne=k[this.pos++],V|=(ne&127)<<14,ne<128)||(ne=k[this.pos++],V|=(ne&127)<<21,ne<128)?V:(ne=k[this.pos],V|=(ne&15)<<28,us(V,C,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var C=this.readVarint();return C%2===1?(C+1)/-2:C/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var C=this.readVarint()+this.pos,k=this.pos;return this.pos=C,C-k>=Bo&&_n?uu(this.buf,k,C):pp(this.buf,k,C)},readBytes:function(){var C=this.readVarint()+this.pos,k=this.buf.subarray(this.pos,C);return this.pos=C,k},readPackedVarint:function(C,k){if(this.type!==Dn.Bytes)return C.push(this.readVarint(k));var V=No(this);for(C=C||[];this.pos<V;)C.push(this.readVarint(k));return C},readPackedSVarint:function(C){if(this.type!==Dn.Bytes)return C.push(this.readSVarint());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readSVarint());return C},readPackedBoolean:function(C){if(this.type!==Dn.Bytes)return C.push(this.readBoolean());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readBoolean());return C},readPackedFloat:function(C){if(this.type!==Dn.Bytes)return C.push(this.readFloat());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readFloat());return C},readPackedDouble:function(C){if(this.type!==Dn.Bytes)return C.push(this.readDouble());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readDouble());return C},readPackedFixed32:function(C){if(this.type!==Dn.Bytes)return C.push(this.readFixed32());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readFixed32());return C},readPackedSFixed32:function(C){if(this.type!==Dn.Bytes)return C.push(this.readSFixed32());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readSFixed32());return C},readPackedFixed64:function(C){if(this.type!==Dn.Bytes)return C.push(this.readFixed64());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readFixed64());return C},readPackedSFixed64:function(C){if(this.type!==Dn.Bytes)return C.push(this.readSFixed64());var k=No(this);for(C=C||[];this.pos<k;)C.push(this.readSFixed64());return C},skip:function(C){var k=C&7;if(k===Dn.Varint)for(;this.buf[this.pos++]>127;);else if(k===Dn.Bytes)this.pos=this.readVarint()+this.pos;else if(k===Dn.Fixed32)this.pos+=4;else if(k===Dn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+k)},writeTag:function(C,k){this.writeVarint(C<<3|k)},realloc:function(C){for(var k=this.length||16;k<this.pos+C;)k*=2;if(k!==this.length){var V=new Uint8Array(k);V.set(this.buf),this.buf=V,this.length=k}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(C){this.realloc(4),gf(this.buf,C,this.pos),this.pos+=4},writeSFixed32:function(C){this.realloc(4),gf(this.buf,C,this.pos),this.pos+=4},writeFixed64:function(C){this.realloc(8),gf(this.buf,C&-1,this.pos),gf(this.buf,Math.floor(C*Vo),this.pos+4),this.pos+=8},writeSFixed64:function(C){this.realloc(8),gf(this.buf,C&-1,this.pos),gf(this.buf,Math.floor(C*Vo),this.pos+4),this.pos+=8},writeVarint:function(C){if(C=+C||0,C>268435455||C<0){Ku(C,this);return}this.realloc(4),this.buf[this.pos++]=C&127|(C>127?128:0),!(C<=127)&&(this.buf[this.pos++]=(C>>>=7)&127|(C>127?128:0),!(C<=127)&&(this.buf[this.pos++]=(C>>>=7)&127|(C>127?128:0),!(C<=127)&&(this.buf[this.pos++]=C>>>7&127)))},writeSVarint:function(C){this.writeVarint(C<0?-C*2-1:C*2)},writeBoolean:function(C){this.writeVarint(!!C)},writeString:function(C){C=String(C),this.realloc(C.length*4),this.pos++;var k=this.pos;this.pos=fc(this.buf,C,this.pos);var V=this.pos-k;V>=128&&Hp(k,V,this),this.pos=k-1,this.writeVarint(V),this.pos+=V},writeFloat:function(C){this.realloc(4),vs.write(this.buf,C,this.pos,!0,23,4),this.pos+=4},writeDouble:function(C){this.realloc(8),vs.write(this.buf,C,this.pos,!0,52,8),this.pos+=8},writeBytes:function(C){var k=C.length;this.writeVarint(k),this.realloc(k);for(var V=0;V<k;V++)this.buf[this.pos++]=C[V]},writeRawMessage:function(C,k){this.pos++;var V=this.pos;C(k,this);var ne=this.pos-V;ne>=128&&Hp(V,ne,this),this.pos=V-1,this.writeVarint(ne),this.pos+=ne},writeMessage:function(C,k,V){this.writeTag(C,Dn.Bytes),this.writeRawMessage(k,V)},writePackedVarint:function(C,k){k.length&&this.writeMessage(C,bh,k)},writePackedSVarint:function(C,k){k.length&&this.writeMessage(C,eh,k)},writePackedBoolean:function(C,k){k.length&&this.writeMessage(C,Qh,k)},writePackedFloat:function(C,k){k.length&&this.writeMessage(C,Jh,k)},writePackedDouble:function(C,k){k.length&&this.writeMessage(C,$h,k)},writePackedFixed32:function(C,k){k.length&&this.writeMessage(C,uf,k)},writePackedSFixed32:function(C,k){k.length&&this.writeMessage(C,th,k)},writePackedFixed64:function(C,k){k.length&&this.writeMessage(C,Fh,k)},writePackedSFixed64:function(C,k){k.length&&this.writeMessage(C,wh,k)},writeBytesField:function(C,k){this.writeTag(C,Dn.Bytes),this.writeBytes(k)},writeFixed32Field:function(C,k){this.writeTag(C,Dn.Fixed32),this.writeFixed32(k)},writeSFixed32Field:function(C,k){this.writeTag(C,Dn.Fixed32),this.writeSFixed32(k)},writeFixed64Field:function(C,k){this.writeTag(C,Dn.Fixed64),this.writeFixed64(k)},writeSFixed64Field:function(C,k){this.writeTag(C,Dn.Fixed64),this.writeSFixed64(k)},writeVarintField:function(C,k){this.writeTag(C,Dn.Varint),this.writeVarint(k)},writeSVarintField:function(C,k){this.writeTag(C,Dn.Varint),this.writeSVarint(k)},writeStringField:function(C,k){this.writeTag(C,Dn.Bytes),this.writeString(k)},writeFloatField:function(C,k){this.writeTag(C,Dn.Fixed32),this.writeFloat(k)},writeDoubleField:function(C,k){this.writeTag(C,Dn.Fixed64),this.writeDouble(k)},writeBooleanField:function(C,k){this.writeVarintField(C,!!k)}};function us(C,k,V){var ne=V.buf,xe,Ie;if(Ie=ne[V.pos++],xe=(Ie&112)>>4,Ie<128||(Ie=ne[V.pos++],xe|=(Ie&127)<<3,Ie<128)||(Ie=ne[V.pos++],xe|=(Ie&127)<<10,Ie<128)||(Ie=ne[V.pos++],xe|=(Ie&127)<<17,Ie<128)||(Ie=ne[V.pos++],xe|=(Ie&127)<<24,Ie<128)||(Ie=ne[V.pos++],xe|=(Ie&1)<<31,Ie<128))return Es(C,xe,k);throw new Error("Expected varint not more than 10 bytes")}function No(C){return C.type===Dn.Bytes?C.readVarint()+C.pos:C.pos+1}function Es(C,k,V){return V?k*4294967296+(C>>>0):(k>>>0)*4294967296+(C>>>0)}function Ku(C,k){var V,ne;if(C>=0?(V=C%4294967296|0,ne=C/4294967296|0):(V=~(-C%4294967296),ne=~(-C/4294967296),V^4294967295?V=V+1|0:(V=0,ne=ne+1|0)),C>=18446744073709552e3||C<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");k.realloc(10),Uu(V,ne,k),Qf(ne,k)}function Uu(C,k,V){V.buf[V.pos++]=C&127|128,C>>>=7,V.buf[V.pos++]=C&127|128,C>>>=7,V.buf[V.pos++]=C&127|128,C>>>=7,V.buf[V.pos++]=C&127|128,C>>>=7,V.buf[V.pos]=C&127}function Qf(C,k){var V=(C&7)<<4;k.buf[k.pos++]|=V|((C>>>=3)?128:0),C&&(k.buf[k.pos++]=C&127|((C>>>=7)?128:0),C&&(k.buf[k.pos++]=C&127|((C>>>=7)?128:0),C&&(k.buf[k.pos++]=C&127|((C>>>=7)?128:0),C&&(k.buf[k.pos++]=C&127|((C>>>=7)?128:0),C&&(k.buf[k.pos++]=C&127)))))}function Hp(C,k,V){var ne=k<=16383?1:k<=2097151?2:k<=268435455?3:Math.floor(Math.log(k)/(Math.LN2*7));V.realloc(ne);for(var xe=V.pos-1;xe>=C;xe--)V.buf[xe+ne]=V.buf[xe]}function bh(C,k){for(var V=0;V<C.length;V++)k.writeVarint(C[V])}function eh(C,k){for(var V=0;V<C.length;V++)k.writeSVarint(C[V])}function Jh(C,k){for(var V=0;V<C.length;V++)k.writeFloat(C[V])}function $h(C,k){for(var V=0;V<C.length;V++)k.writeDouble(C[V])}function Qh(C,k){for(var V=0;V<C.length;V++)k.writeBoolean(C[V])}function uf(C,k){for(var V=0;V<C.length;V++)k.writeFixed32(C[V])}function th(C,k){for(var V=0;V<C.length;V++)k.writeSFixed32(C[V])}function Fh(C,k){for(var V=0;V<C.length;V++)k.writeFixed64(C[V])}function wh(C,k){for(var V=0;V<C.length;V++)k.writeSFixed64(C[V])}function fh(C,k){return(C[k]|C[k+1]<<8|C[k+2]<<16)+C[k+3]*16777216}function gf(C,k,V){C[V]=k,C[V+1]=k>>>8,C[V+2]=k>>>16,C[V+3]=k>>>24}function Ip(C,k){return(C[k]|C[k+1]<<8|C[k+2]<<16)+(C[k+3]<<24)}function pp(C,k,V){for(var ne="",xe=k;xe<V;){var Ie=C[xe],Ve=null,ht=Ie>239?4:Ie>223?3:Ie>191?2:1;if(xe+ht>V)break;var Rt,Ht,tr;ht===1?Ie<128&&(Ve=Ie):ht===2?(Rt=C[xe+1],(Rt&192)===128&&(Ve=(Ie&31)<<6|Rt&63,Ve<=127&&(Ve=null))):ht===3?(Rt=C[xe+1],Ht=C[xe+2],(Rt&192)===128&&(Ht&192)===128&&(Ve=(Ie&15)<<12|(Rt&63)<<6|Ht&63,(Ve<=2047||Ve>=55296&&Ve<=57343)&&(Ve=null))):ht===4&&(Rt=C[xe+1],Ht=C[xe+2],tr=C[xe+3],(Rt&192)===128&&(Ht&192)===128&&(tr&192)===128&&(Ve=(Ie&15)<<18|(Rt&63)<<12|(Ht&63)<<6|tr&63,(Ve<=65535||Ve>=1114112)&&(Ve=null))),Ve===null?(Ve=65533,ht=1):Ve>65535&&(Ve-=65536,ne+=String.fromCharCode(Ve>>>10&1023|55296),Ve=56320|Ve&1023),ne+=String.fromCharCode(Ve),xe+=ht}return ne}function uu(C,k,V){return _n.decode(C.subarray(k,V))}function fc(C,k,V){for(var ne=0,xe,Ie;ne<k.length;ne++){if(xe=k.charCodeAt(ne),xe>55295&&xe<57344)if(Ie)if(xe<56320){C[V++]=239,C[V++]=191,C[V++]=189,Ie=xe;continue}else xe=Ie-55296<<10|xe-56320|65536,Ie=null;else{xe>56319||ne+1===k.length?(C[V++]=239,C[V++]=191,C[V++]=189):Ie=xe;continue}else Ie&&(C[V++]=239,C[V++]=191,C[V++]=189,Ie=null);xe<128?C[V++]=xe:(xe<2048?C[V++]=xe>>6|192:(xe<65536?C[V++]=xe>>12|224:(C[V++]=xe>>18|240,C[V++]=xe>>12&63|128),C[V++]=xe>>6&63|128),C[V++]=xe&63|128)}return V}var Ju=3;function Rp(C,k,V){C===1&&V.readMessage(Kc,k)}function Kc(C,k,V){if(C===3){var ne=V.readMessage(dm,{}),xe=ne.id,Ie=ne.bitmap,Ve=ne.width,ht=ne.height,Rt=ne.left,Ht=ne.top,tr=ne.advance;k.push({id:xe,bitmap:new Pp({width:Ve+2*Ju,height:ht+2*Ju},Ie),metrics:{width:Ve,height:ht,left:Rt,top:Ht,advance:tr}})}}function dm(C,k,V){C===1?k.id=V.readVarint():C===2?k.bitmap=V.readBytes():C===3?k.width=V.readVarint():C===4?k.height=V.readVarint():C===5?k.left=V.readSVarint():C===6?k.top=V.readSVarint():C===7&&(k.advance=V.readVarint())}function _d(C){return new go(C).readFields(Rp,[])}var hd=Ju;function Wp(C){for(var k=0,V=0,ne=0,xe=C;ne<xe.length;ne+=1){var Ie=xe[ne];k+=Ie.w*Ie.h,V=Math.max(V,Ie.w)}C.sort(function(Ei,li){return li.h-Ei.h});for(var Ve=Math.max(Math.ceil(Math.sqrt(k/.95)),V),ht=[{x:0,y:0,w:Ve,h:1/0}],Rt=0,Ht=0,tr=0,Cr=C;tr<Cr.length;tr+=1)for(var Xr=Cr[tr],qr=ht.length-1;qr>=0;qr--){var pa=ht[qr];if(!(Xr.w>pa.w||Xr.h>pa.h)){if(Xr.x=pa.x,Xr.y=pa.y,Ht=Math.max(Ht,Xr.y+Xr.h),Rt=Math.max(Rt,Xr.x+Xr.w),Xr.w===pa.w&&Xr.h===pa.h){var ja=ht.pop();qr<ht.length&&(ht[qr]=ja)}else Xr.h===pa.h?(pa.x+=Xr.w,pa.w-=Xr.w):Xr.w===pa.w?(pa.y+=Xr.h,pa.h-=Xr.h):(ht.push({x:pa.x+Xr.w,y:pa.y,w:pa.w-Xr.w,h:Xr.h}),pa.y+=Xr.h,pa.h-=Xr.h);break}}return{w:Rt,h:Ht,fill:k/(Rt*Ht)||0}}var Rc=1,Pf=function(k,V){var ne=V.pixelRatio,xe=V.version,Ie=V.stretchX,Ve=V.stretchY,ht=V.content;this.paddedRect=k,this.pixelRatio=ne,this.stretchX=Ie,this.stretchY=Ve,this.content=ht,this.version=xe},Xp={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Xp.tl.get=function(){return[this.paddedRect.x+Rc,this.paddedRect.y+Rc]},Xp.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Rc,this.paddedRect.y+this.paddedRect.h-Rc]},Xp.tlbr.get=function(){return this.tl.concat(this.br)},Xp.displaySize.get=function(){return[(this.paddedRect.w-Rc*2)/this.pixelRatio,(this.paddedRect.h-Rc*2)/this.pixelRatio]},Object.defineProperties(Pf.prototype,Xp);var Zd=function(k,V){var ne={},xe={};this.haveRenderCallbacks=[];var Ie=[];this.addImages(k,ne,Ie),this.addImages(V,xe,Ie);var Ve=Wp(Ie),ht=Ve.w,Rt=Ve.h,Ht=new $f({width:ht||1,height:Rt||1});for(var tr in k){var Cr=k[tr],Xr=ne[tr].paddedRect;$f.copy(Cr.data,Ht,{x:0,y:0},{x:Xr.x+Rc,y:Xr.y+Rc},Cr.data)}for(var qr in V){var pa=V[qr],ja=xe[qr].paddedRect,Ei=ja.x+Rc,li=ja.y+Rc,en=pa.data.width,Ni=pa.data.height;$f.copy(pa.data,Ht,{x:0,y:0},{x:Ei,y:li},pa.data),$f.copy(pa.data,Ht,{x:0,y:Ni-1},{x:Ei,y:li-1},{width:en,height:1}),$f.copy(pa.data,Ht,{x:0,y:0},{x:Ei,y:li+Ni},{width:en,height:1}),$f.copy(pa.data,Ht,{x:en-1,y:0},{x:Ei-1,y:li},{width:1,height:Ni}),$f.copy(pa.data,Ht,{x:0,y:0},{x:Ei+en,y:li},{width:1,height:Ni})}this.image=Ht,this.iconPositions=ne,this.patternPositions=xe};Zd.prototype.addImages=function(k,V,ne){for(var xe in k){var Ie=k[xe],Ve={x:0,y:0,w:Ie.data.width+2*Rc,h:Ie.data.height+2*Rc};ne.push(Ve),V[xe]=new Pf(Ve,Ie),Ie.hasRenderCallback&&this.haveRenderCallbacks.push(xe)}},Zd.prototype.patchUpdatedImages=function(k,V){k.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var ne in k.updatedImages)this.patchUpdatedImage(this.iconPositions[ne],k.getImage(ne),V),this.patchUpdatedImage(this.patternPositions[ne],k.getImage(ne),V)},Zd.prototype.patchUpdatedImage=function(k,V,ne){if(!(!k||!V)&&k.version!==V.version){k.version=V.version;var xe=k.tl,Ie=xe[0],Ve=xe[1];ne.update(V.data,void 0,{x:Ie,y:Ve})}},de("ImagePosition",Pf),de("ImageAtlas",Zd);var dp={horizontal:1,vertical:2,horizontalOnly:3},vm=-17;function J1(C){for(var k=0,V=C;k<V.length;k+=1){var ne=V[k];if(ne.positionedGlyphs.length!==0)return!1}return!0}var Dg=57344,xd=63743,Ov=function(){this.scale=1,this.fontStack="",this.imageName=null};Ov.forText=function(k,V){var ne=new Ov;return ne.scale=k||1,ne.fontStack=V,ne},Ov.forImage=function(k){var V=new Ov;return V.imageName=k,V};var hh=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};hh.fromFeature=function(k,V){for(var ne=new hh,xe=0;xe<k.sections.length;xe++){var Ie=k.sections[xe];Ie.image?ne.addImageSection(Ie):ne.addTextSection(Ie,V)}return ne},hh.prototype.length=function(){return this.text.length},hh.prototype.getSection=function(k){return this.sections[this.sectionIndex[k]]},hh.prototype.getSectionIndex=function(k){return this.sectionIndex[k]},hh.prototype.getCharCode=function(k){return this.text.charCodeAt(k)},hh.prototype.verticalizePunctuation=function(){this.text=Hi(this.text)},hh.prototype.trim=function(){for(var k=0,V=0;V<this.text.length&&bd[this.text.charCodeAt(V)];V++)k++;for(var ne=this.text.length,xe=this.text.length-1;xe>=0&&xe>=k&&bd[this.text.charCodeAt(xe)];xe--)ne--;this.text=this.text.substring(k,ne),this.sectionIndex=this.sectionIndex.slice(k,ne)},hh.prototype.substring=function(k,V){var ne=new hh;return ne.text=this.text.substring(k,V),ne.sectionIndex=this.sectionIndex.slice(k,V),ne.sections=this.sections,ne},hh.prototype.toString=function(){return this.text},hh.prototype.getMaxScale=function(){var k=this;return this.sectionIndex.reduce(function(V,ne){return Math.max(V,k.sections[ne].scale)},0)},hh.prototype.addTextSection=function(k,V){this.text+=k.text,this.sections.push(Ov.forText(k.scale,k.fontStack||V));for(var ne=this.sections.length-1,xe=0;xe<k.text.length;++xe)this.sectionIndex.push(ne)},hh.prototype.addImageSection=function(k){var V=k.image?k.image.name:"";if(V.length===0){U("Can't add FormattedSection with an empty image.");return}var ne=this.getNextImageSectionCharCode();if(!ne){U("Reached maximum number of images "+(xd-Dg+2));return}this.text+=String.fromCharCode(ne),this.sections.push(Ov.forImage(V)),this.sectionIndex.push(this.sections.length-1)},hh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=xd?null:++this.imageSectionID:(this.imageSectionID=Dg,this.imageSectionID)};function lA(C,k){for(var V=[],ne=C.text,xe=0,Ie=0,Ve=k;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];V.push(C.substring(xe,ht)),xe=ht}return xe<ne.length&&V.push(C.substring(xe,ne.length)),V}function zg(C,k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja){var Ei=hh.fromFeature(C,xe);Cr===dp.vertical&&Ei.verticalizePunctuation();var li,en=el.processBidirectionalText,Ni=el.processStyledBidirectionalText;if(en&&Ei.sections.length===1){li=[];for(var Qi=en(Ei.toString(),Fg(Ei,Ht,Ie,k,ne,qr,pa)),ln=0,xn=Qi;ln<xn.length;ln+=1){var qn=xn[ln],Nn=new hh;Nn.text=qn,Nn.sections=Ei.sections;for(var Mo=0;Mo<qn.length;Mo++)Nn.sectionIndex.push(0);li.push(Nn)}}else if(Ni){li=[];for(var no=Ni(Ei.text,Ei.sectionIndex,Fg(Ei,Ht,Ie,k,ne,qr,pa)),yo=0,Ms=no;yo<Ms.length;yo+=1){var Eo=Ms[yo],Ro=new hh;Ro.text=Eo[0],Ro.sectionIndex=Eo[1],Ro.sections=Ei.sections,li.push(Ro)}}else li=lA(Ei,Fg(Ei,Ht,Ie,k,ne,qr,pa));var Zs=[],_s={positionedLines:Zs,text:Ei.toString(),top:tr[1],bottom:tr[1],left:tr[0],right:tr[0],writingMode:Cr,iconsInText:!1,verticalizable:!1};return fA(_s,k,V,ne,li,Ve,ht,Rt,Cr,Ht,Xr,ja),J1(Zs)?!1:_s}var bd={};bd[9]=!0,bd[10]=!0,bd[11]=!0,bd[12]=!0,bd[13]=!0,bd[32]=!0;var vp={};vp[10]=!0,vp[32]=!0,vp[38]=!0,vp[40]=!0,vp[41]=!0,vp[43]=!0,vp[45]=!0,vp[47]=!0,vp[173]=!0,vp[183]=!0,vp[8203]=!0,vp[8208]=!0,vp[8211]=!0,vp[8231]=!0;function ob(C,k,V,ne,xe,Ie){if(k.imageName){var Rt=ne[k.imageName];return Rt?Rt.displaySize[0]*k.scale*rn/Ie+xe:0}else{var Ve=V[k.fontStack],ht=Ve&&Ve[C];return ht?ht.metrics.advance*k.scale+xe:0}}function uA(C,k,V,ne,xe,Ie){for(var Ve=0,ht=0;ht<C.length();ht++){var Rt=C.getSection(ht);Ve+=ob(C.getCharCode(ht),Rt,ne,xe,k,Ie)}var Ht=Math.max(1,Math.ceil(Ve/V));return Ve/Ht}function sb(C,k,V,ne){var xe=Math.pow(C-k,2);return ne?C<k?xe/2:xe*2:xe+Math.abs(V)*V}function cA(C,k,V){var ne=0;return C===10&&(ne-=1e4),V&&(ne+=150),(C===40||C===65288)&&(ne+=50),(k===41||k===65289)&&(ne+=50),ne}function id(C,k,V,ne,xe,Ie){for(var Ve=null,ht=sb(k,V,xe,Ie),Rt=0,Ht=ne;Rt<Ht.length;Rt+=1){var tr=Ht[Rt],Cr=k-tr.x,Xr=sb(Cr,V,xe,Ie)+tr.badness;Xr<=ht&&(Ve=tr,ht=Xr)}return{index:C,x:k,priorBreak:Ve,badness:ht}}function F0(C){return C?F0(C.priorBreak).concat(C.index):[]}function Fg(C,k,V,ne,xe,Ie,Ve){if(Ie!=="point")return[];if(!C)return[];for(var ht=[],Rt=uA(C,k,V,ne,xe,Ve),Ht=C.text.indexOf("\u200B")>=0,tr=0,Cr=0;Cr<C.length();Cr++){var Xr=C.getSection(Cr),qr=C.getCharCode(Cr);if(bd[qr]||(tr+=ob(qr,Xr,ne,xe,k,Ve)),Cr<C.length()-1){var pa=Ta(qr);(vp[qr]||pa||Xr.imageName)&&ht.push(id(Cr+1,tr,Rt,ht,cA(qr,C.getCharCode(Cr+1),pa&&Ht),!1))}}return F0(id(C.length(),tr,Rt,ht,0,!0))}function $1(C){var k=.5,V=.5;switch(C){case"right":case"top-right":case"bottom-right":k=1;break;case"left":case"top-left":case"bottom-left":k=0;break}switch(C){case"bottom":case"bottom-right":case"bottom-left":V=1;break;case"top":case"top-right":case"top-left":V=0;break}return{horizontalAlign:k,verticalAlign:V}}function fA(C,k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr){for(var Xr=0,qr=vm,pa=0,ja=0,Ei=ht==="right"?1:ht==="left"?0:.5,li=0,en=0,Ni=xe;en<Ni.length;en+=1){var Qi=Ni[en];Qi.trim();var ln=Qi.getMaxScale(),xn=(ln-1)*rn,qn={positionedGlyphs:[],lineOffset:0};C.positionedLines[li]=qn;var Nn=qn.positionedGlyphs,Mo=0;if(!Qi.length()){qr+=Ie,++li;continue}for(var no=0;no<Qi.length();no++){var yo=Qi.getSection(no),Ms=Qi.getSectionIndex(no),Eo=Qi.getCharCode(no),Ro=0,Zs=null,_s=null,Wl=null,zu=rn,Xl=!(Rt===dp.horizontal||!tr&&!ya(Eo)||tr&&(bd[Eo]||Ma(Eo)));if(yo.imageName){var cf=ne[yo.imageName];if(!cf)continue;Wl=yo.imageName,C.iconsInText=C.iconsInText||!0,_s=cf.paddedRect;var yf=cf.displaySize;yo.scale=yo.scale*rn/Cr,Zs={width:yf[0],height:yf[1],left:Rc,top:-hd,advance:Xl?yf[1]:yf[0]};var dh=rn-yf[1]*yo.scale;Ro=xn+dh,zu=Zs.advance;var Wf=Xl?yf[0]*yo.scale-rn*ln:yf[1]*yo.scale-rn*ln;Wf>0&&Wf>Mo&&(Mo=Wf)}else{var Zl=V[yo.fontStack],Ol=Zl&&Zl[Eo];if(Ol&&Ol.rect)_s=Ol.rect,Zs=Ol.metrics;else{var $u=k[yo.fontStack],hc=$u&&$u[Eo];if(!hc)continue;Zs=hc.metrics}Ro=(ln-yo.scale)*rn}Xl?(C.verticalizable=!0,Nn.push({glyph:Eo,imageName:Wl,x:Xr,y:qr+Ro,vertical:Xl,scale:yo.scale,fontStack:yo.fontStack,sectionIndex:Ms,metrics:Zs,rect:_s}),Xr+=zu*yo.scale+Ht):(Nn.push({glyph:Eo,imageName:Wl,x:Xr,y:qr+Ro,vertical:Xl,scale:yo.scale,fontStack:yo.fontStack,sectionIndex:Ms,metrics:Zs,rect:_s}),Xr+=Zs.advance*yo.scale+Ht)}if(Nn.length!==0){var tp=Xr-Ht;pa=Math.max(tp,pa),hA(Nn,0,Nn.length-1,Ei,Mo)}Xr=0;var rp=Ie*ln+Mo;qn.lineOffset=Math.max(Mo,xn),qr+=rp,ja=Math.max(rp,ja),++li}var vh=qr-vm,mp=$1(Ve),gp=mp.horizontalAlign,rh=mp.verticalAlign;Oh(C.positionedLines,Ei,gp,rh,pa,ja,Ie,vh,xe.length),C.top+=-rh*vh,C.bottom=C.top+vh,C.left+=-gp*pa,C.right=C.left+pa}function hA(C,k,V,ne,xe){if(!(!ne&&!xe))for(var Ie=C[V],Ve=Ie.metrics.advance*Ie.scale,ht=(C[V].x+Ve)*ne,Rt=k;Rt<=V;Rt++)C[Rt].x-=ht,C[Rt].y+=xe}function Oh(C,k,V,ne,xe,Ie,Ve,ht,Rt){var Ht=(k-V)*xe,tr=0;Ie!==Ve?tr=-ht*ne-vm:tr=(-ne*Rt+.5)*Ve;for(var Cr=0,Xr=C;Cr<Xr.length;Cr+=1)for(var qr=Xr[Cr],pa=0,ja=qr.positionedGlyphs;pa<ja.length;pa+=1){var Ei=ja[pa];Ei.x+=Ht,Ei.y+=tr}}function Zp(C,k,V){var ne=$1(V),xe=ne.horizontalAlign,Ie=ne.verticalAlign,Ve=k[0],ht=k[1],Rt=Ve-C.displaySize[0]*xe,Ht=Rt+C.displaySize[0],tr=ht-C.displaySize[1]*Ie,Cr=tr+C.displaySize[1];return{image:C,top:tr,bottom:Cr,left:Rt,right:Ht}}function dv(C,k,V,ne,xe,Ie){var Ve=C.image,ht;if(Ve.content){var Rt=Ve.content,Ht=Ve.pixelRatio||1;ht=[Rt[0]/Ht,Rt[1]/Ht,Ve.displaySize[0]-Rt[2]/Ht,Ve.displaySize[1]-Rt[3]/Ht]}var tr=k.left*Ie,Cr=k.right*Ie,Xr,qr,pa,ja;V==="width"||V==="both"?(ja=xe[0]+tr-ne[3],qr=xe[0]+Cr+ne[1]):(ja=xe[0]+(tr+Cr-Ve.displaySize[0])/2,qr=ja+Ve.displaySize[0]);var Ei=k.top*Ie,li=k.bottom*Ie;return V==="height"||V==="both"?(Xr=xe[1]+Ei-ne[0],pa=xe[1]+li+ne[2]):(Xr=xe[1]+(Ei+li-Ve.displaySize[1])/2,pa=Xr+Ve.displaySize[1]),{image:Ve,top:Xr,right:qr,bottom:pa,left:ja,collisionPadding:ht}}var ep=function(C){function k(V,ne,xe,Ie){C.call(this,V,ne),this.angle=xe,Ie!==void 0&&(this.segment=Ie)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.clone=function(){return new k(this.x,this.y,this.angle,this.segment)},k}(i);de("Anchor",ep);var Bh=128;function nd(C,k){var V=k.expression;if(V.kind==="constant"){var ne=V.evaluate(new gn(C+1));return{kind:"constant",layoutSize:ne}}else{if(V.kind==="source")return{kind:"source"};for(var xe=V.zoomStops,Ie=V.interpolationType,Ve=0;Ve<xe.length&&xe[Ve]<=C;)Ve++;Ve=Math.max(0,Ve-1);for(var ht=Ve;ht<xe.length&&xe[ht]<C+1;)ht++;ht=Math.min(xe.length-1,ht);var Rt=xe[Ve],Ht=xe[ht];if(V.kind==="composite")return{kind:"composite",minZoom:Rt,maxZoom:Ht,interpolationType:Ie};var tr=V.evaluate(new gn(Rt)),Cr=V.evaluate(new gn(Ht));return{kind:"camera",minZoom:Rt,maxZoom:Ht,minSize:tr,maxSize:Cr,interpolationType:Ie}}}function mC(C,k,V){var ne=k.uSize,xe=k.uSizeT,Ie=V.lowerSize,Ve=V.upperSize;return C.kind==="source"?Ie/Bh:C.kind==="composite"?Ml(Ie/Bh,Ve/Bh,xe):ne}function gC(C,k){var V=0,ne=0;if(C.kind==="constant")ne=C.layoutSize;else if(C.kind!=="source"){var xe=C.interpolationType,Ie=C.minZoom,Ve=C.maxZoom,ht=xe?l(ru.interpolationFactor(xe,k,Ie,Ve),0,1):0;C.kind==="camera"?ne=Ml(C.minSize,C.maxSize,ht):V=ht}return{uSizeT:V,uSize:ne}}var mW=Object.freeze({__proto__:null,getSizeData:nd,evaluateSizeForFeature:mC,evaluateSizeForZoom:gC,SIZE_PACK_FACTOR:Bh});function yC(C,k,V,ne,xe){if(k.segment===void 0)return!0;for(var Ie=k,Ve=k.segment+1,ht=0;ht>-V/2;){if(Ve--,Ve<0)return!1;ht-=C[Ve].dist(Ie),Ie=C[Ve]}ht+=C[Ve].dist(C[Ve+1]),Ve++;for(var Rt=[],Ht=0;ht<V/2;){var tr=C[Ve-1],Cr=C[Ve],Xr=C[Ve+1];if(!Xr)return!1;var qr=tr.angleTo(Cr)-Cr.angleTo(Xr);for(qr=Math.abs((qr+3*Math.PI)%(Math.PI*2)-Math.PI),Rt.push({distance:ht,angleDelta:qr}),Ht+=qr;ht-Rt[0].distance>ne;)Ht-=Rt.shift().angleDelta;if(Ht>xe)return!1;Ve++,ht+=Cr.dist(Xr)}return!0}function _C(C){for(var k=0,V=0;V<C.length-1;V++)k+=C[V].dist(C[V+1]);return k}function xC(C,k,V){return C?3/5*k*V:0}function bC(C,k){return Math.max(C?C.right-C.left:0,k?k.right-k.left:0)}function gW(C,k,V,ne,xe,Ie){for(var Ve=xC(V,xe,Ie),ht=bC(V,ne)*Ie,Rt=0,Ht=_C(C)/2,tr=0;tr<C.length-1;tr++){var Cr=C[tr],Xr=C[tr+1],qr=Cr.dist(Xr);if(Rt+qr>Ht){var pa=(Ht-Rt)/qr,ja=Ml(Cr.x,Xr.x,pa),Ei=Ml(Cr.y,Xr.y,pa),li=new ep(ja,Ei,Xr.angleTo(Cr),tr);return li._round(),!Ve||yC(C,li,ht,Ve,k)?li:void 0}Rt+=qr}}function yW(C,k,V,ne,xe,Ie,Ve,ht,Rt){var Ht=xC(ne,Ie,Ve),tr=bC(ne,xe),Cr=tr*Ve,Xr=C[0].x===0||C[0].x===Rt||C[0].y===0||C[0].y===Rt;k-Cr<k/4&&(k=Cr+k/4);var qr=Ie*2,pa=Xr?k/2*ht%k:(tr/2+qr)*Ve*ht%k;return wC(C,pa,k,Ht,V,Cr,Xr,!1,Rt)}function wC(C,k,V,ne,xe,Ie,Ve,ht,Rt){for(var Ht=Ie/2,tr=_C(C),Cr=0,Xr=k-V,qr=[],pa=0;pa<C.length-1;pa++){for(var ja=C[pa],Ei=C[pa+1],li=ja.dist(Ei),en=Ei.angleTo(ja);Xr+V<Cr+li;){Xr+=V;var Ni=(Xr-Cr)/li,Qi=Ml(ja.x,Ei.x,Ni),ln=Ml(ja.y,Ei.y,Ni);if(Qi>=0&&Qi<Rt&&ln>=0&&ln<Rt&&Xr-Ht>=0&&Xr+Ht<=tr){var xn=new ep(Qi,ln,en,pa);xn._round(),(!ne||yC(C,xn,Ie,ne,xe))&&qr.push(xn)}}Cr+=li}return!ht&&!qr.length&&!Ve&&(qr=wC(C,Cr/2,V,ne,xe,Ie,Ve,!0,Rt)),qr}function TC(C,k,V,ne,xe){for(var Ie=[],Ve=0;Ve<C.length;Ve++)for(var ht=C[Ve],Rt=void 0,Ht=0;Ht<ht.length-1;Ht++){var tr=ht[Ht],Cr=ht[Ht+1];tr.x<k&&Cr.x<k||(tr.x<k?tr=new i(k,tr.y+(Cr.y-tr.y)*((k-tr.x)/(Cr.x-tr.x)))._round():Cr.x<k&&(Cr=new i(k,tr.y+(Cr.y-tr.y)*((k-tr.x)/(Cr.x-tr.x)))._round()),!(tr.y<V&&Cr.y<V)&&(tr.y<V?tr=new i(tr.x+(Cr.x-tr.x)*((V-tr.y)/(Cr.y-tr.y)),V)._round():Cr.y<V&&(Cr=new i(tr.x+(Cr.x-tr.x)*((V-tr.y)/(Cr.y-tr.y)),V)._round()),!(tr.x>=ne&&Cr.x>=ne)&&(tr.x>=ne?tr=new i(ne,tr.y+(Cr.y-tr.y)*((ne-tr.x)/(Cr.x-tr.x)))._round():Cr.x>=ne&&(Cr=new i(ne,tr.y+(Cr.y-tr.y)*((ne-tr.x)/(Cr.x-tr.x)))._round()),!(tr.y>=xe&&Cr.y>=xe)&&(tr.y>=xe?tr=new i(tr.x+(Cr.x-tr.x)*((xe-tr.y)/(Cr.y-tr.y)),xe)._round():Cr.y>=xe&&(Cr=new i(tr.x+(Cr.x-tr.x)*((xe-tr.y)/(Cr.y-tr.y)),xe)._round()),(!Rt||!tr.equals(Rt[Rt.length-1]))&&(Rt=[tr],Ie.push(Rt)),Rt.push(Cr)))))}return Ie}var Og=Rc;function AC(C,k,V,ne){var xe=[],Ie=C.image,Ve=Ie.pixelRatio,ht=Ie.paddedRect.w-2*Og,Rt=Ie.paddedRect.h-2*Og,Ht=C.right-C.left,tr=C.bottom-C.top,Cr=Ie.stretchX||[[0,ht]],Xr=Ie.stretchY||[[0,Rt]],qr=function(Zl,Ol){return Zl+Ol[1]-Ol[0]},pa=Cr.reduce(qr,0),ja=Xr.reduce(qr,0),Ei=ht-pa,li=Rt-ja,en=0,Ni=pa,Qi=0,ln=ja,xn=0,qn=Ei,Nn=0,Mo=li;if(Ie.content&&ne){var no=Ie.content;en=lb(Cr,0,no[0]),Qi=lb(Xr,0,no[1]),Ni=lb(Cr,no[0],no[2]),ln=lb(Xr,no[1],no[3]),xn=no[0]-en,Nn=no[1]-Qi,qn=no[2]-no[0]-Ni,Mo=no[3]-no[1]-ln}var yo=function(Zl,Ol,$u,hc){var cf=ub(Zl.stretch-en,Ni,Ht,C.left),yf=cb(Zl.fixed-xn,qn,Zl.stretch,pa),dh=ub(Ol.stretch-Qi,ln,tr,C.top),Wf=cb(Ol.fixed-Nn,Mo,Ol.stretch,ja),tp=ub($u.stretch-en,Ni,Ht,C.left),rp=cb($u.fixed-xn,qn,$u.stretch,pa),vh=ub(hc.stretch-Qi,ln,tr,C.top),mp=cb(hc.fixed-Nn,Mo,hc.stretch,ja),gp=new i(cf,dh),rh=new i(tp,dh),yp=new i(tp,vh),od=new i(cf,vh),Uv=new i(yf/Ve,Wf/Ve),ym=new i(rp/Ve,mp/Ve),_m=k*Math.PI/180;if(_m){var xm=Math.sin(_m),Hg=Math.cos(_m),wd=[Hg,-xm,xm,Hg];gp._matMult(wd),rh._matMult(wd),od._matMult(wd),yp._matMult(wd)}var mb=Zl.stretch+Zl.fixed,xA=$u.stretch+$u.fixed,gb=Ol.stretch+Ol.fixed,bA=hc.stretch+hc.fixed,pd={x:Ie.paddedRect.x+Og+mb,y:Ie.paddedRect.y+Og+gb,w:xA-mb,h:bA-gb},Wg=qn/Ve/Ht,yb=Mo/Ve/tr;return{tl:gp,tr:rh,bl:od,br:yp,tex:pd,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Uv,pixelOffsetBR:ym,minFontScaleX:Wg,minFontScaleY:yb,isSDF:V}};if(!ne||!Ie.stretchX&&!Ie.stretchY)xe.push(yo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ht+1},{fixed:0,stretch:Rt+1}));else for(var Ms=SC(Cr,Ei,pa),Eo=SC(Xr,li,ja),Ro=0;Ro<Ms.length-1;Ro++)for(var Zs=Ms[Ro],_s=Ms[Ro+1],Wl=0;Wl<Eo.length-1;Wl++){var zu=Eo[Wl],Xl=Eo[Wl+1];xe.push(yo(Zs,zu,_s,Xl))}return xe}function lb(C,k,V){for(var ne=0,xe=0,Ie=C;xe<Ie.length;xe+=1){var Ve=Ie[xe];ne+=Math.max(k,Math.min(V,Ve[1]))-Math.max(k,Math.min(V,Ve[0]))}return ne}function SC(C,k,V){for(var ne=[{fixed:-Og,stretch:0}],xe=0,Ie=C;xe<Ie.length;xe+=1){var Ve=Ie[xe],ht=Ve[0],Rt=Ve[1],Ht=ne[ne.length-1];ne.push({fixed:ht-Ht.stretch,stretch:Ht.stretch}),ne.push({fixed:ht-Ht.stretch,stretch:Ht.stretch+(Rt-ht)})}return ne.push({fixed:k+Og,stretch:V}),ne}function ub(C,k,V,ne){return C/k*V+ne}function cb(C,k,V,ne){return C-k*V/ne}function _W(C,k,V,ne,xe,Ie,Ve,ht){for(var Rt=ne.layout.get("text-rotate").evaluate(Ie,{})*Math.PI/180,Ht=[],tr=0,Cr=k.positionedLines;tr<Cr.length;tr+=1)for(var Xr=Cr[tr],qr=0,pa=Xr.positionedGlyphs;qr<pa.length;qr+=1){var ja=pa[qr];if(ja.rect){var Ei=ja.rect||{},li=1,en=hd+li,Ni=!0,Qi=1,ln=0,xn=(xe||ht)&&ja.vertical,qn=ja.metrics.advance*ja.scale/2;if(ht&&k.verticalizable){var Nn=(ja.scale-1)*rn,Mo=(rn-ja.metrics.width*ja.scale)/2;ln=Xr.lineOffset/2-(ja.imageName?-Mo:Nn)}if(ja.imageName){var no=Ve[ja.imageName];Ni=no.sdf,Qi=no.pixelRatio,en=Rc/Qi}var yo=xe?[ja.x+qn,ja.y]:[0,0],Ms=xe?[0,0]:[ja.x+qn+V[0],ja.y+V[1]-ln],Eo=[0,0];xn&&(Eo=Ms,Ms=[0,0]);var Ro=(ja.metrics.left-en)*ja.scale-qn+Ms[0],Zs=(-ja.metrics.top-en)*ja.scale+Ms[1],_s=Ro+Ei.w*ja.scale/Qi,Wl=Zs+Ei.h*ja.scale/Qi,zu=new i(Ro,Zs),Xl=new i(_s,Zs),Zl=new i(Ro,Wl),Ol=new i(_s,Wl);if(xn){var $u=new i(-qn,qn-vm),hc=-Math.PI/2,cf=rn/2-qn,yf=ja.imageName?cf:0,dh=new i(5-vm-cf,-yf),Wf=new(Function.prototype.bind.apply(i,[null].concat(Eo)));zu._rotateAround(hc,$u)._add(dh)._add(Wf),Xl._rotateAround(hc,$u)._add(dh)._add(Wf),Zl._rotateAround(hc,$u)._add(dh)._add(Wf),Ol._rotateAround(hc,$u)._add(dh)._add(Wf)}if(Rt){var tp=Math.sin(Rt),rp=Math.cos(Rt),vh=[rp,-tp,tp,rp];zu._matMult(vh),Xl._matMult(vh),Zl._matMult(vh),Ol._matMult(vh)}var mp=new i(0,0),gp=new i(0,0),rh=0,yp=0;Ht.push({tl:zu,tr:Xl,bl:Zl,br:Ol,tex:Ei,writingMode:k.writingMode,glyphOffset:yo,sectionIndex:ja.sectionIndex,isSDF:Ni,pixelOffsetTL:mp,pixelOffsetBR:gp,minFontScaleX:rh,minFontScaleY:yp})}}return Ht}var fb=function(k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr){if(this.boxStartIndex=k.length,Ht){var Cr=Ve.top,Xr=Ve.bottom,qr=Ve.collisionPadding;qr&&(Cr-=qr[1],Xr+=qr[3]);var pa=Xr-Cr;pa>0&&(pa=Math.max(10,pa),this.circleDiameter=pa)}else{var ja=Ve.top*ht-Rt,Ei=Ve.bottom*ht+Rt,li=Ve.left*ht-Rt,en=Ve.right*ht+Rt,Ni=Ve.collisionPadding;if(Ni&&(li-=Ni[0]*ht,ja-=Ni[1]*ht,en+=Ni[2]*ht,Ei+=Ni[3]*ht),tr){var Qi=new i(li,ja),ln=new i(en,ja),xn=new i(li,Ei),qn=new i(en,Ei),Nn=tr*Math.PI/180;Qi._rotate(Nn),ln._rotate(Nn),xn._rotate(Nn),qn._rotate(Nn),li=Math.min(Qi.x,ln.x,xn.x,qn.x),en=Math.max(Qi.x,ln.x,xn.x,qn.x),ja=Math.min(Qi.y,ln.y,xn.y,qn.y),Ei=Math.max(Qi.y,ln.y,xn.y,qn.y)}k.emplaceBack(V.x,V.y,li,ja,en,Ei,ne,xe,Ie)}this.boxEndIndex=k.length},Bg=function(k,V){if(k===void 0&&(k=[]),V===void 0&&(V=xW),this.data=k,this.length=this.data.length,this.compare=V,this.length>0)for(var ne=(this.length>>1)-1;ne>=0;ne--)this._down(ne)};Bg.prototype.push=function(k){this.data.push(k),this.length++,this._up(this.length-1)},Bg.prototype.pop=function(){if(this.length!==0){var k=this.data[0],V=this.data.pop();return this.length--,this.length>0&&(this.data[0]=V,this._down(0)),k}},Bg.prototype.peek=function(){return this.data[0]},Bg.prototype._up=function(k){for(var V=this,ne=V.data,xe=V.compare,Ie=ne[k];k>0;){var Ve=k-1>>1,ht=ne[Ve];if(xe(Ie,ht)>=0)break;ne[k]=ht,k=Ve}ne[k]=Ie},Bg.prototype._down=function(k){for(var V=this,ne=V.data,xe=V.compare,Ie=this.length>>1,Ve=ne[k];k<Ie;){var ht=(k<<1)+1,Rt=ne[ht],Ht=ht+1;if(Ht<this.length&&xe(ne[Ht],Rt)<0&&(ht=Ht,Rt=ne[Ht]),xe(Rt,Ve)>=0)break;ne[k]=Rt,k=ht}ne[k]=Ve};function xW(C,k){return C<k?-1:C>k?1:0}function bW(C,k,V){k===void 0&&(k=1),V===void 0&&(V=!1);for(var ne=1/0,xe=1/0,Ie=-1/0,Ve=-1/0,ht=C[0],Rt=0;Rt<ht.length;Rt++){var Ht=ht[Rt];(!Rt||Ht.x<ne)&&(ne=Ht.x),(!Rt||Ht.y<xe)&&(xe=Ht.y),(!Rt||Ht.x>Ie)&&(Ie=Ht.x),(!Rt||Ht.y>Ve)&&(Ve=Ht.y)}var tr=Ie-ne,Cr=Ve-xe,Xr=Math.min(tr,Cr),qr=Xr/2,pa=new Bg([],wW);if(Xr===0)return new i(ne,xe);for(var ja=ne;ja<Ie;ja+=Xr)for(var Ei=xe;Ei<Ve;Ei+=Xr)pa.push(new Ng(ja+qr,Ei+qr,qr,C));for(var li=AW(C),en=pa.length;pa.length;){var Ni=pa.pop();(Ni.d>li.d||!li.d)&&(li=Ni,V&&console.log("found best %d after %d probes",Math.round(1e4*Ni.d)/1e4,en)),!(Ni.max-li.d<=k)&&(qr=Ni.h/2,pa.push(new Ng(Ni.p.x-qr,Ni.p.y-qr,qr,C)),pa.push(new Ng(Ni.p.x+qr,Ni.p.y-qr,qr,C)),pa.push(new Ng(Ni.p.x-qr,Ni.p.y+qr,qr,C)),pa.push(new Ng(Ni.p.x+qr,Ni.p.y+qr,qr,C)),en+=4)}return V&&(console.log("num probes: "+en),console.log("best distance: "+li.d)),li.p}function wW(C,k){return k.max-C.max}function Ng(C,k,V,ne){this.p=new i(C,k),this.h=V,this.d=TW(this.p,ne),this.max=this.d+this.h*Math.SQRT2}function TW(C,k){for(var V=!1,ne=1/0,xe=0;xe<k.length;xe++)for(var Ie=k[xe],Ve=0,ht=Ie.length,Rt=ht-1;Ve<ht;Rt=Ve++){var Ht=Ie[Ve],tr=Ie[Rt];Ht.y>C.y!=tr.y>C.y&&C.x<(tr.x-Ht.x)*(C.y-Ht.y)/(tr.y-Ht.y)+Ht.x&&(V=!V),ne=Math.min(ne,qd(C,Ht,tr))}return(V?1:-1)*Math.sqrt(ne)}function AW(C){for(var k=0,V=0,ne=0,xe=C[0],Ie=0,Ve=xe.length,ht=Ve-1;Ie<Ve;ht=Ie++){var Rt=xe[Ie],Ht=xe[ht],tr=Rt.x*Ht.y-Ht.x*Rt.y;V+=(Rt.x+Ht.x)*tr,ne+=(Rt.y+Ht.y)*tr,k+=tr*3}return new Ng(V/k,ne/k,0,C)}var Ug=7,pA=Number.POSITIVE_INFINITY;function MC(C,k){function V(xe,Ie){var Ve=0,ht=0;Ie<0&&(Ie=0);var Rt=Ie/Math.sqrt(2);switch(xe){case"top-right":case"top-left":ht=Rt-Ug;break;case"bottom-right":case"bottom-left":ht=-Rt+Ug;break;case"bottom":ht=-Ie+Ug;break;case"top":ht=Ie-Ug;break}switch(xe){case"top-right":case"bottom-right":Ve=-Rt;break;case"top-left":case"bottom-left":Ve=Rt;break;case"left":Ve=Ie;break;case"right":Ve=-Ie;break}return[Ve,ht]}function ne(xe,Ie,Ve){var ht=0,Rt=0;switch(Ie=Math.abs(Ie),Ve=Math.abs(Ve),xe){case"top-right":case"top-left":case"top":Rt=Ve-Ug;break;case"bottom-right":case"bottom-left":case"bottom":Rt=-Ve+Ug;break}switch(xe){case"top-right":case"bottom-right":case"right":ht=-Ie;break;case"top-left":case"bottom-left":case"left":ht=Ie;break}return[ht,Rt]}return k[1]!==pA?ne(C,k[0],k[1]):V(C,k[0])}function SW(C,k,V,ne,xe,Ie,Ve){C.createArrays();var ht=512*C.overscaling;C.tilePixelRatio=pi/ht,C.compareText={},C.iconsNeedLinear=!1;var Rt=C.layers[0].layout,Ht=C.layers[0]._unevaluatedLayout._values,tr={};if(C.textSizeData.kind==="composite"){var Cr=C.textSizeData,Xr=Cr.minZoom,qr=Cr.maxZoom;tr.compositeTextSizes=[Ht["text-size"].possiblyEvaluate(new gn(Xr),Ve),Ht["text-size"].possiblyEvaluate(new gn(qr),Ve)]}if(C.iconSizeData.kind==="composite"){var pa=C.iconSizeData,ja=pa.minZoom,Ei=pa.maxZoom;tr.compositeIconSizes=[Ht["icon-size"].possiblyEvaluate(new gn(ja),Ve),Ht["icon-size"].possiblyEvaluate(new gn(Ei),Ve)]}tr.layoutTextSize=Ht["text-size"].possiblyEvaluate(new gn(C.zoom+1),Ve),tr.layoutIconSize=Ht["icon-size"].possiblyEvaluate(new gn(C.zoom+1),Ve),tr.textMaxSize=Ht["text-size"].possiblyEvaluate(new gn(18));for(var li=Rt.get("text-line-height")*rn,en=Rt.get("text-rotation-alignment")==="map"&&Rt.get("symbol-placement")!=="point",Ni=Rt.get("text-keep-upright"),Qi=Rt.get("text-size"),ln=function(){var Nn=qn[xn],Mo=Rt.get("text-font").evaluate(Nn,{},Ve).join(","),no=Qi.evaluate(Nn,{},Ve),yo=tr.layoutTextSize.evaluate(Nn,{},Ve),Ms=tr.layoutIconSize.evaluate(Nn,{},Ve),Eo={horizontal:{},vertical:void 0},Ro=Nn.text,Zs=[0,0];if(Ro){var _s=Ro.toString(),Wl=Rt.get("text-letter-spacing").evaluate(Nn,{},Ve)*rn,zu=Vr(_s)?Wl:0,Xl=Rt.get("text-anchor").evaluate(Nn,{},Ve),Zl=Rt.get("text-variable-anchor");if(!Zl){var Ol=Rt.get("text-radial-offset").evaluate(Nn,{},Ve);Ol?Zs=MC(Xl,[Ol*rn,pA]):Zs=Rt.get("text-offset").evaluate(Nn,{},Ve).map(function(Uv){return Uv*rn})}var $u=en?"center":Rt.get("text-justify").evaluate(Nn,{},Ve),hc=Rt.get("symbol-placement"),cf=hc==="point"?Rt.get("text-max-width").evaluate(Nn,{},Ve)*rn:0,yf=function(){C.allowVerticalPlacement&&gr(_s)&&(Eo.vertical=zg(Ro,k,V,xe,Mo,cf,li,Xl,"left",zu,Zs,dp.vertical,!0,hc,yo,no))};if(!en&&Zl){for(var dh=$u==="auto"?Zl.map(function(Uv){return dA(Uv)}):[$u],Wf=!1,tp=0;tp<dh.length;tp++){var rp=dh[tp];if(!Eo.horizontal[rp])if(Wf)Eo.horizontal[rp]=Eo.horizontal[0];else{var vh=zg(Ro,k,V,xe,Mo,cf,li,"center",rp,zu,Zs,dp.horizontal,!1,hc,yo,no);vh&&(Eo.horizontal[rp]=vh,Wf=vh.positionedLines.length===1)}}yf()}else{$u==="auto"&&($u=dA(Xl));var mp=zg(Ro,k,V,xe,Mo,cf,li,Xl,$u,zu,Zs,dp.horizontal,!1,hc,yo,no);mp&&(Eo.horizontal[$u]=mp),yf(),gr(_s)&&en&&Ni&&(Eo.vertical=zg(Ro,k,V,xe,Mo,cf,li,Xl,$u,zu,Zs,dp.vertical,!1,hc,yo,no))}}var gp=void 0,rh=!1;if(Nn.icon&&Nn.icon.name){var yp=ne[Nn.icon.name];yp&&(gp=Zp(xe[Nn.icon.name],Rt.get("icon-offset").evaluate(Nn,{},Ve),Rt.get("icon-anchor").evaluate(Nn,{},Ve)),rh=yp.sdf,C.sdfIcons===void 0?C.sdfIcons=yp.sdf:C.sdfIcons!==yp.sdf&&U("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(yp.pixelRatio!==C.pixelRatio||Rt.get("icon-rotate").constantOr(1)!==0)&&(C.iconsNeedLinear=!0))}var od=CC(Eo.horizontal)||Eo.vertical;C.iconsInText=od?od.iconsInText:!1,(od||gp)&&MW(C,Nn,Eo,gp,ne,tr,yo,Ms,Zs,rh,Ve)},xn=0,qn=C.features;xn<qn.length;xn+=1)ln();Ie&&C.generateCollisionDebugBuffers()}function dA(C){switch(C){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function MW(C,k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr){var Cr=Ie.textMaxSize.evaluate(k,{});Cr===void 0&&(Cr=Ve);var Xr=C.layers[0].layout,qr=Xr.get("icon-offset").evaluate(k,{},tr),pa=CC(V.horizontal),ja=24,Ei=Ve/ja,li=C.tilePixelRatio*Ei,en=C.tilePixelRatio*Cr/ja,Ni=C.tilePixelRatio*ht,Qi=C.tilePixelRatio*Xr.get("symbol-spacing"),ln=Xr.get("text-padding")*C.tilePixelRatio,xn=Xr.get("icon-padding")*C.tilePixelRatio,qn=Xr.get("text-max-angle")/180*Math.PI,Nn=Xr.get("text-rotation-alignment")==="map"&&Xr.get("symbol-placement")!=="point",Mo=Xr.get("icon-rotation-alignment")==="map"&&Xr.get("symbol-placement")!=="point",no=Xr.get("symbol-placement"),yo=Qi/2,Ms=Xr.get("icon-text-fit"),Eo;ne&&Ms!=="none"&&(C.allowVerticalPlacement&&V.vertical&&(Eo=dv(ne,V.vertical,Ms,Xr.get("icon-text-fit-padding"),qr,Ei)),pa&&(ne=dv(ne,pa,Ms,Xr.get("icon-text-fit-padding"),qr,Ei)));var Ro=function(Hg,wd){wd.x<0||wd.x>=pi||wd.y<0||wd.y>=pi||EW(C,wd,Hg,V,ne,xe,Eo,C.layers[0],C.collisionBoxArray,k.index,k.sourceLayerIndex,C.index,li,ln,Nn,Rt,Ni,xn,Mo,qr,k,Ie,Ht,tr,Ve)};if(no==="line")for(var Zs=0,_s=TC(k.geometry,0,0,pi,pi);Zs<_s.length;Zs+=1)for(var Wl=_s[Zs],zu=yW(Wl,Qi,qn,V.vertical||pa,ne,ja,en,C.overscaling,pi),Xl=0,Zl=zu;Xl<Zl.length;Xl+=1){var Ol=Zl[Xl],$u=pa;(!$u||!CW(C,$u.text,yo,Ol))&&Ro(Wl,Ol)}else if(no==="line-center")for(var hc=0,cf=k.geometry;hc<cf.length;hc+=1){var yf=cf[hc];if(yf.length>1){var dh=gW(yf,qn,V.vertical||pa,ne,ja,en);dh&&Ro(yf,dh)}}else if(k.type==="Polygon")for(var Wf=0,tp=Cg(k.geometry,0);Wf<tp.length;Wf+=1){var rp=tp[Wf],vh=bW(rp,16);Ro(rp[0],new ep(vh.x,vh.y,0))}else if(k.type==="LineString")for(var mp=0,gp=k.geometry;mp<gp.length;mp+=1){var rh=gp[mp];Ro(rh,new ep(rh[0].x,rh[0].y,0))}else if(k.type==="Point")for(var yp=0,od=k.geometry;yp<od.length;yp+=1)for(var Uv=od[yp],ym=0,_m=Uv;ym<_m.length;ym+=1){var xm=_m[ym];Ro([xm],new ep(xm.x,xm.y,0))}}var Q1=255,mm=Q1*Bh;function EC(C,k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa){var ja=_W(k,V,ht,xe,Ie,Ve,ne,C.allowVerticalPlacement),Ei=C.textSizeData,li=null;Ei.kind==="source"?(li=[Bh*xe.layout.get("text-size").evaluate(Ve,{})],li[0]>mm&&U(C.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')):Ei.kind==="composite"&&(li=[Bh*qr.compositeTextSizes[0].evaluate(Ve,{},pa),Bh*qr.compositeTextSizes[1].evaluate(Ve,{},pa)],(li[0]>mm||li[1]>mm)&&U(C.layerIds[0]+': Value for "text-size" is >= '+Q1+'. Reduce your "text-size".')),C.addSymbols(C.text,ja,li,ht,Ie,Ve,Ht,k,Rt.lineStartIndex,Rt.lineLength,Xr,pa);for(var en=0,Ni=tr;en<Ni.length;en+=1){var Qi=Ni[en];Cr[Qi]=C.text.placedSymbolArray.length-1}return ja.length*4}function CC(C){for(var k in C)return C[k];return null}function EW(C,k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr,qr,pa,ja,Ei,li,en,Ni,Qi,ln,xn,qn,Nn){var Mo,no=C.addToLineVertexArray(k,V),yo,Ms,Eo,Ro,Zs=0,_s=0,Wl=0,zu=0,Xl=-1,Zl=-1,Ol={},$u=me(""),hc=0,cf=0;if(ht._unevaluatedLayout.getValue("text-radial-offset")===void 0?(Mo=ht.layout.get("text-offset").evaluate(Qi,{},qn).map(function(r_){return r_*rn}),hc=Mo[0],cf=Mo[1]):(hc=ht.layout.get("text-radial-offset").evaluate(Qi,{},qn)*rn,cf=pA),C.allowVerticalPlacement&&ne.vertical){var yf=ht.layout.get("text-rotate").evaluate(Qi,{},qn),dh=yf+90,Wf=ne.vertical;Eo=new fb(Rt,k,Ht,tr,Cr,Wf,Xr,qr,pa,dh),Ve&&(Ro=new fb(Rt,k,Ht,tr,Cr,Ve,Ei,li,pa,dh))}if(xe){var tp=ht.layout.get("icon-rotate").evaluate(Qi,{}),rp=ht.layout.get("icon-text-fit")!=="none",vh=AC(xe,tp,xn,rp),mp=Ve?AC(Ve,tp,xn,rp):void 0;Ms=new fb(Rt,k,Ht,tr,Cr,xe,Ei,li,!1,tp),Zs=vh.length*4;var gp=C.iconSizeData,rh=null;gp.kind==="source"?(rh=[Bh*ht.layout.get("icon-size").evaluate(Qi,{})],rh[0]>mm&&U(C.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')):gp.kind==="composite"&&(rh=[Bh*ln.compositeIconSizes[0].evaluate(Qi,{},qn),Bh*ln.compositeIconSizes[1].evaluate(Qi,{},qn)],(rh[0]>mm||rh[1]>mm)&&U(C.layerIds[0]+': Value for "icon-size" is >= '+Q1+'. Reduce your "icon-size".')),C.addSymbols(C.icon,vh,rh,Ni,en,Qi,!1,k,no.lineStartIndex,no.lineLength,-1,qn),Xl=C.icon.placedSymbolArray.length-1,mp&&(_s=mp.length*4,C.addSymbols(C.icon,mp,rh,Ni,en,Qi,dp.vertical,k,no.lineStartIndex,no.lineLength,-1,qn),Zl=C.icon.placedSymbolArray.length-1)}for(var yp in ne.horizontal){var od=ne.horizontal[yp];if(!yo){$u=me(od.text);var Uv=ht.layout.get("text-rotate").evaluate(Qi,{},qn);yo=new fb(Rt,k,Ht,tr,Cr,od,Xr,qr,pa,Uv)}var ym=od.positionedLines.length===1;if(Wl+=EC(C,k,od,Ie,ht,pa,Qi,ja,no,ne.vertical?dp.horizontal:dp.horizontalOnly,ym?Object.keys(ne.horizontal):[yp],Ol,Xl,ln,qn),ym)break}ne.vertical&&(zu+=EC(C,k,ne.vertical,Ie,ht,pa,Qi,ja,no,dp.vertical,["vertical"],Ol,Zl,ln,qn));var _m=yo?yo.boxStartIndex:C.collisionBoxArray.length,xm=yo?yo.boxEndIndex:C.collisionBoxArray.length,Hg=Eo?Eo.boxStartIndex:C.collisionBoxArray.length,wd=Eo?Eo.boxEndIndex:C.collisionBoxArray.length,mb=Ms?Ms.boxStartIndex:C.collisionBoxArray.length,xA=Ms?Ms.boxEndIndex:C.collisionBoxArray.length,gb=Ro?Ro.boxStartIndex:C.collisionBoxArray.length,bA=Ro?Ro.boxEndIndex:C.collisionBoxArray.length,pd=-1,Wg=function(r_,GC){return r_&&r_.circleDiameter?Math.max(r_.circleDiameter,GC):GC};pd=Wg(yo,pd),pd=Wg(Eo,pd),pd=Wg(Ms,pd),pd=Wg(Ro,pd);var yb=pd>-1?1:0;yb&&(pd*=Nn/rn),C.glyphOffsetArray.length>=Du.MAX_GLYPHS&&U("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Qi.sortKey!==void 0&&C.addToSortKeyRanges(C.symbolInstances.length,Qi.sortKey),C.symbolInstances.emplaceBack(k.x,k.y,Ol.right>=0?Ol.right:-1,Ol.center>=0?Ol.center:-1,Ol.left>=0?Ol.left:-1,Ol.vertical||-1,Xl,Zl,$u,_m,xm,Hg,wd,mb,xA,gb,bA,Ht,Wl,zu,Zs,_s,yb,0,Xr,hc,cf,pd)}function CW(C,k,V,ne){var xe=C.compareText;if(!(k in xe))xe[k]=[];else for(var Ie=xe[k],Ve=Ie.length-1;Ve>=0;Ve--)if(ne.dist(Ie[Ve])<V)return!0;return xe[k].push(ne),!1}var kW=Xd.VectorTileFeature.types,LW=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function hb(C,k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr){var qr=ht?Math.min(mm,Math.round(ht[0])):0,pa=ht?Math.min(mm,Math.round(ht[1])):0;C.emplaceBack(k,V,Math.round(ne*32),Math.round(xe*32),Ie,Ve,(qr<<1)+(Rt?1:0),pa,Ht*16,tr*16,Cr*256,Xr*256)}function vA(C,k,V){C.emplaceBack(k.x,k.y,V),C.emplaceBack(k.x,k.y,V),C.emplaceBack(k.x,k.y,V),C.emplaceBack(k.x,k.y,V)}function PW(C){for(var k=0,V=C.sections;k<V.length;k+=1){var ne=V[k];if(vi(ne.text))return!0}return!1}var jg=function(k){this.layoutVertexArray=new hn,this.indexArray=new Ki,this.programConfigurations=k,this.segments=new Lo,this.dynamicLayoutVertexArray=new Za,this.opacityVertexArray=new Va,this.placedSymbolArray=new fs};jg.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},jg.prototype.upload=function(k,V,ne,xe){this.isEmpty()||(ne&&(this.layoutVertexBuffer=k.createVertexBuffer(this.layoutVertexArray,ke.members),this.indexBuffer=k.createIndexBuffer(this.indexArray,V),this.dynamicLayoutVertexBuffer=k.createVertexBuffer(this.dynamicLayoutVertexArray,je.members,!0),this.opacityVertexBuffer=k.createVertexBuffer(this.opacityVertexArray,LW,!0),this.opacityVertexBuffer.itemSize=1),(ne||xe)&&this.programConfigurations.upload(k))},jg.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},de("SymbolBuffers",jg);var e_=function(k,V,ne){this.layoutVertexArray=new k,this.layoutAttributes=V,this.indexArray=new ne,this.segments=new Lo,this.collisionVertexArray=new Ti};e_.prototype.upload=function(k){this.layoutVertexBuffer=k.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=k.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=k.createVertexBuffer(this.collisionVertexArray,ft.members,!0)},e_.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},de("CollisionBuffers",e_);var Du=function(k){this.collisionBoxArray=k.collisionBoxArray,this.zoom=k.zoom,this.overscaling=k.overscaling,this.layers=k.layers,this.layerIds=this.layers.map(function(Rt){return Rt.id}),this.index=k.index,this.pixelRatio=k.pixelRatio,this.sourceLayerIndex=k.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Pv([]),this.placementViewportMatrix=Pv([]);var V=this.layers[0],ne=V._unevaluatedLayout._values;this.textSizeData=nd(this.zoom,ne["text-size"]),this.iconSizeData=nd(this.zoom,ne["icon-size"]);var xe=this.layers[0].layout,Ie=xe.get("symbol-sort-key"),Ve=xe.get("symbol-z-order");this.canOverlap=xe.get("text-allow-overlap")||xe.get("icon-allow-overlap")||xe.get("text-ignore-placement")||xe.get("icon-ignore-placement"),this.sortFeaturesByKey=Ve!=="viewport-y"&&Ie.constantOr(1)!==void 0;var ht=Ve==="viewport-y"||Ve==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=ht&&this.canOverlap,xe.get("symbol-placement")==="point"&&(this.writingModes=xe.get("text-writing-mode").map(function(Rt){return dp[Rt]})),this.stateDependentLayerIds=this.layers.filter(function(Rt){return Rt.isStateDependent()}).map(function(Rt){return Rt.id}),this.sourceID=k.sourceID};Du.prototype.createArrays=function(){this.text=new jg(new Xa(this.layers,this.zoom,function(k){return/^text/.test(k)})),this.icon=new jg(new Xa(this.layers,this.zoom,function(k){return/^icon/.test(k)})),this.glyphOffsetArray=new Ql,this.lineVertexArray=new Fs,this.symbolInstances=new El},Du.prototype.calculateGlyphDependencies=function(k,V,ne,xe,Ie){for(var Ve=0;Ve<k.length;Ve++)if(V[k.charCodeAt(Ve)]=!0,(ne||xe)&&Ie){var ht=xi[k.charAt(Ve)];ht&&(V[ht.charCodeAt(0)]=!0)}},Du.prototype.populate=function(k,V,ne){var xe=this.layers[0],Ie=xe.layout,Ve=Ie.get("text-font"),ht=Ie.get("text-field"),Rt=Ie.get("icon-image"),Ht=(ht.value.kind!=="constant"||ht.value.value instanceof nu&&!ht.value.value.isEmpty()||ht.value.value.toString().length>0)&&(Ve.value.kind!=="constant"||Ve.value.value.length>0),tr=Rt.value.kind!=="constant"||!!Rt.value.value||Object.keys(Rt.parameters).length>0,Cr=Ie.get("symbol-sort-key");if(this.features=[],!(!Ht&&!tr)){for(var Xr=V.iconDependencies,qr=V.glyphDependencies,pa=V.availableImages,ja=new gn(this.zoom),Ei=0,li=k;Ei<li.length;Ei+=1){var en=li[Ei],Ni=en.feature,Qi=en.id,ln=en.index,xn=en.sourceLayerIndex,qn=xe._featureFilter.needGeometry,Nn=xo(Ni,qn);if(xe._featureFilter.filter(ja,Nn,ne)){qn||(Nn.geometry=cn(Ni));var Mo=void 0;if(Ht){var no=xe.getValueAndResolveTokens("text-field",Nn,ne,pa),yo=nu.factory(no);PW(yo)&&(this.hasRTLText=!0),(!this.hasRTLText||$o()==="unavailable"||this.hasRTLText&&el.isParsed())&&(Mo=Qa(yo,xe,Nn))}var Ms=void 0;if(tr){var Eo=xe.getValueAndResolveTokens("icon-image",Nn,ne,pa);Eo instanceof Ll?Ms=Eo:Ms=Ll.fromString(Eo)}if(!(!Mo&&!Ms)){var Ro=this.sortFeaturesByKey?Cr.evaluate(Nn,{},ne):void 0,Zs={id:Qi,text:Mo,icon:Ms,index:ln,sourceLayerIndex:xn,geometry:Nn.geometry,properties:Ni.properties,type:kW[Ni.type],sortKey:Ro};if(this.features.push(Zs),Ms&&(Xr[Ms.name]=!0),Mo){var _s=Ve.evaluate(Nn,{},ne).join(","),Wl=Ie.get("text-rotation-alignment")==="map"&&Ie.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(dp.vertical)>=0;for(var zu=0,Xl=Mo.sections;zu<Xl.length;zu+=1){var Zl=Xl[zu];if(Zl.image)Xr[Zl.image.name]=!0;else{var Ol=gr(Mo.toString()),$u=Zl.fontStack||_s,hc=qr[$u]=qr[$u]||{};this.calculateGlyphDependencies(Zl.text,hc,Wl,this.allowVerticalPlacement,Ol)}}}}}}Ie.get("symbol-placement")==="line"&&(this.features=Yi(this.features)),this.sortFeaturesByKey&&this.features.sort(function(cf,yf){return cf.sortKey-yf.sortKey})}},Du.prototype.update=function(k,V,ne){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(k,V,this.layers,ne),this.icon.programConfigurations.updatePaintArrays(k,V,this.layers,ne))},Du.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Du.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Du.prototype.upload=function(k){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(k),this.iconCollisionBox.upload(k)),this.text.upload(k,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(k,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Du.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Du.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Du.prototype.addToLineVertexArray=function(k,V){var ne=this.lineVertexArray.length;if(k.segment!==void 0){for(var xe=k.dist(V[k.segment+1]),Ie=k.dist(V[k.segment]),Ve={},ht=k.segment+1;ht<V.length;ht++)Ve[ht]={x:V[ht].x,y:V[ht].y,tileUnitDistanceFromAnchor:xe},ht<V.length-1&&(xe+=V[ht+1].dist(V[ht]));for(var Rt=k.segment||0;Rt>=0;Rt--)Ve[Rt]={x:V[Rt].x,y:V[Rt].y,tileUnitDistanceFromAnchor:Ie},Rt>0&&(Ie+=V[Rt-1].dist(V[Rt]));for(var Ht=0;Ht<V.length;Ht++){var tr=Ve[Ht];this.lineVertexArray.emplaceBack(tr.x,tr.y,tr.tileUnitDistanceFromAnchor)}}return{lineStartIndex:ne,lineLength:this.lineVertexArray.length-ne}},Du.prototype.addSymbols=function(k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr,Xr){for(var qr=k.indexArray,pa=k.layoutVertexArray,ja=k.segments.prepareSegment(4*V.length,pa,qr,this.canOverlap?Ve.sortKey:void 0),Ei=this.glyphOffsetArray.length,li=ja.vertexLength,en=this.allowVerticalPlacement&&ht===dp.vertical?Math.PI/2:0,Ni=Ve.text&&Ve.text.sections,Qi=0;Qi<V.length;Qi++){var ln=V[Qi],xn=ln.tl,qn=ln.tr,Nn=ln.bl,Mo=ln.br,no=ln.tex,yo=ln.pixelOffsetTL,Ms=ln.pixelOffsetBR,Eo=ln.minFontScaleX,Ro=ln.minFontScaleY,Zs=ln.glyphOffset,_s=ln.isSDF,Wl=ln.sectionIndex,zu=ja.vertexLength,Xl=Zs[1];hb(pa,Rt.x,Rt.y,xn.x,Xl+xn.y,no.x,no.y,ne,_s,yo.x,yo.y,Eo,Ro),hb(pa,Rt.x,Rt.y,qn.x,Xl+qn.y,no.x+no.w,no.y,ne,_s,Ms.x,yo.y,Eo,Ro),hb(pa,Rt.x,Rt.y,Nn.x,Xl+Nn.y,no.x,no.y+no.h,ne,_s,yo.x,Ms.y,Eo,Ro),hb(pa,Rt.x,Rt.y,Mo.x,Xl+Mo.y,no.x+no.w,no.y+no.h,ne,_s,Ms.x,Ms.y,Eo,Ro),vA(k.dynamicLayoutVertexArray,Rt,en),qr.emplaceBack(zu,zu+1,zu+2),qr.emplaceBack(zu+1,zu+2,zu+3),ja.vertexLength+=4,ja.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Zs[0]),(Qi===V.length-1||Wl!==V[Qi+1].sectionIndex)&&k.programConfigurations.populatePaintArrays(pa.length,Ve,Ve.index,{},Xr,Ni&&Ni[Wl])}k.placedSymbolArray.emplaceBack(Rt.x,Rt.y,Ei,this.glyphOffsetArray.length-Ei,li,Ht,tr,Rt.segment,ne?ne[0]:0,ne?ne[1]:0,xe[0],xe[1],ht,0,!1,0,Cr)},Du.prototype._addCollisionDebugVertex=function(k,V,ne,xe,Ie,Ve){return V.emplaceBack(0,0),k.emplaceBack(ne.x,ne.y,xe,Ie,Math.round(Ve.x),Math.round(Ve.y))},Du.prototype.addCollisionDebugVertices=function(k,V,ne,xe,Ie,Ve,ht){var Rt=Ie.segments.prepareSegment(4,Ie.layoutVertexArray,Ie.indexArray),Ht=Rt.vertexLength,tr=Ie.layoutVertexArray,Cr=Ie.collisionVertexArray,Xr=ht.anchorX,qr=ht.anchorY;this._addCollisionDebugVertex(tr,Cr,Ve,Xr,qr,new i(k,V)),this._addCollisionDebugVertex(tr,Cr,Ve,Xr,qr,new i(ne,V)),this._addCollisionDebugVertex(tr,Cr,Ve,Xr,qr,new i(ne,xe)),this._addCollisionDebugVertex(tr,Cr,Ve,Xr,qr,new i(k,xe)),Rt.vertexLength+=4;var pa=Ie.indexArray;pa.emplaceBack(Ht,Ht+1),pa.emplaceBack(Ht+1,Ht+2),pa.emplaceBack(Ht+2,Ht+3),pa.emplaceBack(Ht+3,Ht),Rt.primitiveLength+=4},Du.prototype.addDebugCollisionBoxes=function(k,V,ne,xe){for(var Ie=k;Ie<V;Ie++){var Ve=this.collisionBoxArray.get(Ie),ht=Ve.x1,Rt=Ve.y1,Ht=Ve.x2,tr=Ve.y2;this.addCollisionDebugVertices(ht,Rt,Ht,tr,xe?this.textCollisionBox:this.iconCollisionBox,Ve.anchorPoint,ne)}},Du.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new e_(zi,Ut.members,Rn),this.iconCollisionBox=new e_(zi,Ut.members,Rn);for(var k=0;k<this.symbolInstances.length;k++){var V=this.symbolInstances.get(k);this.addDebugCollisionBoxes(V.textBoxStartIndex,V.textBoxEndIndex,V,!0),this.addDebugCollisionBoxes(V.verticalTextBoxStartIndex,V.verticalTextBoxEndIndex,V,!0),this.addDebugCollisionBoxes(V.iconBoxStartIndex,V.iconBoxEndIndex,V,!1),this.addDebugCollisionBoxes(V.verticalIconBoxStartIndex,V.verticalIconBoxEndIndex,V,!1)}},Du.prototype._deserializeCollisionBoxesForSymbol=function(k,V,ne,xe,Ie,Ve,ht,Rt,Ht){for(var tr={},Cr=V;Cr<ne;Cr++){var Xr=k.get(Cr);tr.textBox={x1:Xr.x1,y1:Xr.y1,x2:Xr.x2,y2:Xr.y2,anchorPointX:Xr.anchorPointX,anchorPointY:Xr.anchorPointY},tr.textFeatureIndex=Xr.featureIndex;break}for(var qr=xe;qr<Ie;qr++){var pa=k.get(qr);tr.verticalTextBox={x1:pa.x1,y1:pa.y1,x2:pa.x2,y2:pa.y2,anchorPointX:pa.anchorPointX,anchorPointY:pa.anchorPointY},tr.verticalTextFeatureIndex=pa.featureIndex;break}for(var ja=Ve;ja<ht;ja++){var Ei=k.get(ja);tr.iconBox={x1:Ei.x1,y1:Ei.y1,x2:Ei.x2,y2:Ei.y2,anchorPointX:Ei.anchorPointX,anchorPointY:Ei.anchorPointY},tr.iconFeatureIndex=Ei.featureIndex;break}for(var li=Rt;li<Ht;li++){var en=k.get(li);tr.verticalIconBox={x1:en.x1,y1:en.y1,x2:en.x2,y2:en.y2,anchorPointX:en.anchorPointX,anchorPointY:en.anchorPointY},tr.verticalIconFeatureIndex=en.featureIndex;break}return tr},Du.prototype.deserializeCollisionBoxes=function(k){this.collisionArrays=[];for(var V=0;V<this.symbolInstances.length;V++){var ne=this.symbolInstances.get(V);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(k,ne.textBoxStartIndex,ne.textBoxEndIndex,ne.verticalTextBoxStartIndex,ne.verticalTextBoxEndIndex,ne.iconBoxStartIndex,ne.iconBoxEndIndex,ne.verticalIconBoxStartIndex,ne.verticalIconBoxEndIndex))}},Du.prototype.hasTextData=function(){return this.text.segments.get().length>0},Du.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Du.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Du.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Du.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Du.prototype.addIndicesForPlacedSymbol=function(k,V){for(var ne=k.placedSymbolArray.get(V),xe=ne.vertexStartIndex+ne.numGlyphs*4,Ie=ne.vertexStartIndex;Ie<xe;Ie+=4)k.indexArray.emplaceBack(Ie,Ie+1,Ie+2),k.indexArray.emplaceBack(Ie+1,Ie+2,Ie+3)},Du.prototype.getSortedSymbolIndexes=function(k){if(this.sortedAngle===k&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var V=Math.sin(k),ne=Math.cos(k),xe=[],Ie=[],Ve=[],ht=0;ht<this.symbolInstances.length;++ht){Ve.push(ht);var Rt=this.symbolInstances.get(ht);xe.push(Math.round(V*Rt.anchorX+ne*Rt.anchorY)|0),Ie.push(Rt.featureIndex)}return Ve.sort(function(Ht,tr){return xe[Ht]-xe[tr]||Ie[tr]-Ie[Ht]}),Ve},Du.prototype.addToSortKeyRanges=function(k,V){var ne=this.sortKeyRanges[this.sortKeyRanges.length-1];ne&&ne.sortKey===V?ne.symbolInstanceEnd=k+1:this.sortKeyRanges.push({sortKey:V,symbolInstanceStart:k,symbolInstanceEnd:k+1})},Du.prototype.sortFeatures=function(k){var V=this;if(this.sortFeaturesByY&&this.sortedAngle!==k&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(k),this.sortedAngle=k,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var ne=0,xe=this.symbolInstanceIndexes;ne<xe.length;ne+=1){var Ie=xe[ne],Ve=this.symbolInstances.get(Ie);this.featureSortOrder.push(Ve.featureIndex),[Ve.rightJustifiedTextSymbolIndex,Ve.centerJustifiedTextSymbolIndex,Ve.leftJustifiedTextSymbolIndex].forEach(function(ht,Rt,Ht){ht>=0&&Ht.indexOf(ht)===Rt&&V.addIndicesForPlacedSymbol(V.text,ht)}),Ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ve.verticalPlacedTextSymbolIndex),Ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ve.placedIconSymbolIndex),Ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},de("SymbolBucket",Du,{omit:["layers","collisionBoxArray","features","compareText"]}),Du.MAX_GLYPHS=65535,Du.addDynamicAttributes=vA;function IW(C,k){return k.replace(/{([^{}]+)}/g,function(V,ne){return ne in C?String(C[ne]):""})}var RW=new xa({"symbol-placement":new nt(Ui.layout_symbol["symbol-placement"]),"symbol-spacing":new nt(Ui.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new nt(Ui.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Yt(Ui.layout_symbol["symbol-sort-key"]),"symbol-z-order":new nt(Ui.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new nt(Ui.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new nt(Ui.layout_symbol["icon-ignore-placement"]),"icon-optional":new nt(Ui.layout_symbol["icon-optional"]),"icon-rotation-alignment":new nt(Ui.layout_symbol["icon-rotation-alignment"]),"icon-size":new Yt(Ui.layout_symbol["icon-size"]),"icon-text-fit":new nt(Ui.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new nt(Ui.layout_symbol["icon-text-fit-padding"]),"icon-image":new Yt(Ui.layout_symbol["icon-image"]),"icon-rotate":new Yt(Ui.layout_symbol["icon-rotate"]),"icon-padding":new nt(Ui.layout_symbol["icon-padding"]),"icon-keep-upright":new nt(Ui.layout_symbol["icon-keep-upright"]),"icon-offset":new Yt(Ui.layout_symbol["icon-offset"]),"icon-anchor":new Yt(Ui.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new nt(Ui.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new nt(Ui.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new nt(Ui.layout_symbol["text-rotation-alignment"]),"text-field":new Yt(Ui.layout_symbol["text-field"]),"text-font":new Yt(Ui.layout_symbol["text-font"]),"text-size":new Yt(Ui.layout_symbol["text-size"]),"text-max-width":new Yt(Ui.layout_symbol["text-max-width"]),"text-line-height":new nt(Ui.layout_symbol["text-line-height"]),"text-letter-spacing":new Yt(Ui.layout_symbol["text-letter-spacing"]),"text-justify":new Yt(Ui.layout_symbol["text-justify"]),"text-radial-offset":new Yt(Ui.layout_symbol["text-radial-offset"]),"text-variable-anchor":new nt(Ui.layout_symbol["text-variable-anchor"]),"text-anchor":new Yt(Ui.layout_symbol["text-anchor"]),"text-max-angle":new nt(Ui.layout_symbol["text-max-angle"]),"text-writing-mode":new nt(Ui.layout_symbol["text-writing-mode"]),"text-rotate":new Yt(Ui.layout_symbol["text-rotate"]),"text-padding":new nt(Ui.layout_symbol["text-padding"]),"text-keep-upright":new nt(Ui.layout_symbol["text-keep-upright"]),"text-transform":new Yt(Ui.layout_symbol["text-transform"]),"text-offset":new Yt(Ui.layout_symbol["text-offset"]),"text-allow-overlap":new nt(Ui.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new nt(Ui.layout_symbol["text-ignore-placement"]),"text-optional":new nt(Ui.layout_symbol["text-optional"])}),DW=new xa({"icon-opacity":new Yt(Ui.paint_symbol["icon-opacity"]),"icon-color":new Yt(Ui.paint_symbol["icon-color"]),"icon-halo-color":new Yt(Ui.paint_symbol["icon-halo-color"]),"icon-halo-width":new Yt(Ui.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Yt(Ui.paint_symbol["icon-halo-blur"]),"icon-translate":new nt(Ui.paint_symbol["icon-translate"]),"icon-translate-anchor":new nt(Ui.paint_symbol["icon-translate-anchor"]),"text-opacity":new Yt(Ui.paint_symbol["text-opacity"]),"text-color":new Yt(Ui.paint_symbol["text-color"],{runtimeType:As,getOverride:function(C){return C.textColor},hasOverride:function(C){return!!C.textColor}}),"text-halo-color":new Yt(Ui.paint_symbol["text-halo-color"]),"text-halo-width":new Yt(Ui.paint_symbol["text-halo-width"]),"text-halo-blur":new Yt(Ui.paint_symbol["text-halo-blur"]),"text-translate":new nt(Ui.paint_symbol["text-translate"]),"text-translate-anchor":new nt(Ui.paint_symbol["text-translate-anchor"])}),mA={paint:DW,layout:RW},qg=function(k){this.type=k.property.overrides?k.property.overrides.runtimeType:rl,this.defaultValue=k};qg.prototype.evaluate=function(k){if(k.formattedSection){var V=this.defaultValue.property.overrides;if(V&&V.hasOverride(k.formattedSection))return V.getOverride(k.formattedSection)}return k.feature&&k.featureState?this.defaultValue.evaluate(k.feature,k.featureState):this.defaultValue.property.specification.default},qg.prototype.eachChild=function(k){if(!this.defaultValue.isConstant()){var V=this.defaultValue.value;k(V._styleExpression.expression)}},qg.prototype.outputDefined=function(){return!1},qg.prototype.serialize=function(){return null},de("FormatSectionOverride",qg,{omit:["defaultValue"]});var zW=function(C){function k(V){C.call(this,V,mA)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.recalculate=function(ne,xe){if(C.prototype.recalculate.call(this,ne,xe),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 Ie=this.layout.get("text-writing-mode");if(Ie){for(var Ve=[],ht=0,Rt=Ie;ht<Rt.length;ht+=1){var Ht=Rt[ht];Ve.indexOf(Ht)<0&&Ve.push(Ht)}this.layout._values["text-writing-mode"]=Ve}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},k.prototype.getValueAndResolveTokens=function(ne,xe,Ie,Ve){var ht=this.layout.get(ne).evaluate(xe,{},Ie,Ve),Rt=this._unevaluatedLayout._values[ne];return!Rt.isDataDriven()&&!fo(Rt.value)&&ht?IW(xe.properties,ht):ht},k.prototype.createBucket=function(ne){return new Du(ne)},k.prototype.queryRadius=function(){return 0},k.prototype.queryIntersectsFeature=function(){return!1},k.prototype._setPaintOverrides=function(){for(var ne=0,xe=mA.paint.overridableProperties;ne<xe.length;ne+=1){var Ie=xe[ne];if(k.hasPaintOverride(this.layout,Ie)){var Ve=this.paint.get(Ie),ht=new qg(Ve),Rt=new gc(ht,Ve.property.specification),Ht=null;Ve.value.kind==="constant"||Ve.value.kind==="source"?Ht=new Ic("source",Rt):Ht=new lc("composite",Rt,Ve.value.zoomStops,Ve.value._interpolationType),this.paint._values[Ie]=new Il(Ve.property,Ht,Ve.parameters)}}},k.prototype._handleOverridablePaintPropertyUpdate=function(ne,xe,Ie){return!this.layout||xe.isDataDriven()||Ie.isDataDriven()?!1:k.hasPaintOverride(this.layout,ne)},k.hasPaintOverride=function(ne,xe){var Ie=ne.get("text-field"),Ve=mA.paint.properties[xe],ht=!1,Rt=function(Cr){for(var Xr=0,qr=Cr;Xr<qr.length;Xr+=1){var pa=qr[Xr];if(Ve.overrides&&Ve.overrides.hasOverride(pa)){ht=!0;return}}};if(Ie.value.kind==="constant"&&Ie.value.value instanceof nu)Rt(Ie.value.value.sections);else if(Ie.value.kind==="source"){var Ht=function(Cr){if(!ht)if(Cr instanceof gs&&il(Cr.value)===fl){var Xr=Cr.value;Rt(Xr.sections)}else Cr instanceof qu?Rt(Cr.sections):Cr.eachChild(Ht)},tr=Ie.value;tr._styleExpression&&Ht(tr._styleExpression.expression)}return ht},k}(Ja),FW=new xa({"background-color":new nt(Ui.paint_background["background-color"]),"background-pattern":new ua(Ui.paint_background["background-pattern"]),"background-opacity":new nt(Ui.paint_background["background-opacity"])}),OW={paint:FW},BW=function(C){function k(V){C.call(this,V,OW)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k}(Ja),NW=new xa({"raster-opacity":new nt(Ui.paint_raster["raster-opacity"]),"raster-hue-rotate":new nt(Ui.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new nt(Ui.paint_raster["raster-brightness-min"]),"raster-brightness-max":new nt(Ui.paint_raster["raster-brightness-max"]),"raster-saturation":new nt(Ui.paint_raster["raster-saturation"]),"raster-contrast":new nt(Ui.paint_raster["raster-contrast"]),"raster-resampling":new nt(Ui.paint_raster["raster-resampling"]),"raster-fade-duration":new nt(Ui.paint_raster["raster-fade-duration"])}),UW={paint:NW},jW=function(C){function k(V){C.call(this,V,UW)}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k}(Ja);function qW(C){var k=[],V=C.id;return V===void 0&&k.push({message:"layers."+V+': missing required property "id"'}),C.render===void 0&&k.push({message:"layers."+V+': missing required method "render"'}),C.renderingMode&&C.renderingMode!=="2d"&&C.renderingMode!=="3d"&&k.push({message:"layers."+V+': property "renderingMode" must be either "2d" or "3d"'}),k}var VW=function(C){function k(V){C.call(this,V,{}),this.implementation=V}return C&&(k.__proto__=C),k.prototype=Object.create(C&&C.prototype),k.prototype.constructor=k,k.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},k.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},k.prototype.recalculate=function(){},k.prototype.updateTransitions=function(){},k.prototype.hasTransition=function(){},k.prototype.serialize=function(){},k.prototype.onAdd=function(ne){this.implementation.onAdd&&this.implementation.onAdd(ne,ne.painter.context.gl)},k.prototype.onRemove=function(ne){this.implementation.onRemove&&this.implementation.onRemove(ne,ne.painter.context.gl)},k}(Ja),GW={circle:XT,heatmap:Tg,hillshade:Ix,fill:R0,"fill-extrusion":pv,line:D,symbol:zW,background:BW,raster:jW};function HW(C){return C.type==="custom"?new VW(C):new GW[C.type](C)}var kC=s.HTMLImageElement,LC=s.HTMLCanvasElement,PC=s.HTMLVideoElement,IC=s.ImageData,pb=s.ImageBitmap,O0=function(k,V,ne,xe){this.context=k,this.format=ne,this.texture=k.gl.createTexture(),this.update(V,xe)};O0.prototype.update=function(k,V,ne){var xe=k.width,Ie=k.height,Ve=(!this.size||this.size[0]!==xe||this.size[1]!==Ie)&&!ne,ht=this,Rt=ht.context,Ht=Rt.gl;if(this.useMipmap=!!(V&&V.useMipmap),Ht.bindTexture(Ht.TEXTURE_2D,this.texture),Rt.pixelStoreUnpackFlipY.set(!1),Rt.pixelStoreUnpack.set(1),Rt.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ht.RGBA&&(!V||V.premultiply!==!1)),Ve)this.size=[xe,Ie],k instanceof kC||k instanceof LC||k instanceof PC||k instanceof IC||pb&&k instanceof pb?Ht.texImage2D(Ht.TEXTURE_2D,0,this.format,this.format,Ht.UNSIGNED_BYTE,k):Ht.texImage2D(Ht.TEXTURE_2D,0,this.format,xe,Ie,0,this.format,Ht.UNSIGNED_BYTE,k.data);else{var tr=ne||{x:0,y:0},Cr=tr.x,Xr=tr.y;k instanceof kC||k instanceof LC||k instanceof PC||k instanceof IC||pb&&k instanceof pb?Ht.texSubImage2D(Ht.TEXTURE_2D,0,Cr,Xr,Ht.RGBA,Ht.UNSIGNED_BYTE,k):Ht.texSubImage2D(Ht.TEXTURE_2D,0,Cr,Xr,xe,Ie,Ht.RGBA,Ht.UNSIGNED_BYTE,k.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ht.generateMipmap(Ht.TEXTURE_2D)},O0.prototype.bind=function(k,V,ne){var xe=this,Ie=xe.context,Ve=Ie.gl;Ve.bindTexture(Ve.TEXTURE_2D,this.texture),ne===Ve.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(ne=Ve.LINEAR),k!==this.filter&&(Ve.texParameteri(Ve.TEXTURE_2D,Ve.TEXTURE_MAG_FILTER,k),Ve.texParameteri(Ve.TEXTURE_2D,Ve.TEXTURE_MIN_FILTER,ne||k),this.filter=k),V!==this.wrap&&(Ve.texParameteri(Ve.TEXTURE_2D,Ve.TEXTURE_WRAP_S,V),Ve.texParameteri(Ve.TEXTURE_2D,Ve.TEXTURE_WRAP_T,V),this.wrap=V)},O0.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},O0.prototype.destroy=function(){var k=this.context,V=k.gl;V.deleteTexture(this.texture),this.texture=null};var gA=function(k){var V=this;this._callback=k,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){V._triggered=!1,V._callback()})};gA.prototype.trigger=function(){var k=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){k._triggered=!1,k._callback()},0))},gA.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Vg=function(k,V,ne){this.target=k,this.parent=V,this.mapId=ne,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},L(["receive","process"],this),this.invoker=new gA(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=le()?k:s};Vg.prototype.send=function(k,V,ne,xe,Ie){var Ve=this;Ie===void 0&&(Ie=!1);var ht=Math.round(Math.random()*1e18).toString(36).substring(0,10);ne&&(this.callbacks[ht]=ne);var Rt=$(this.globalScope)?void 0:[];return this.target.postMessage({id:ht,type:k,hasCallback:!!ne,targetMapId:xe,mustQueue:Ie,sourceMapId:this.mapId,data:_t(V,Rt)},Rt),{cancel:function(){ne&&delete Ve.callbacks[ht],Ve.target.postMessage({id:ht,type:"<cancel>",targetMapId:xe,sourceMapId:Ve.mapId})}}},Vg.prototype.receive=function(k){var V=k.data,ne=V.id;if(ne&&!(V.targetMapId&&this.mapId!==V.targetMapId))if(V.type==="<cancel>"){delete this.tasks[ne];var xe=this.cancelCallbacks[ne];delete this.cancelCallbacks[ne],xe&&xe()}else le()||V.mustQueue?(this.tasks[ne]=V,this.taskQueue.push(ne),this.invoker.trigger()):this.processTask(ne,V)},Vg.prototype.process=function(){if(this.taskQueue.length){var k=this.taskQueue.shift(),V=this.tasks[k];delete this.tasks[k],this.taskQueue.length&&this.invoker.trigger(),V&&this.processTask(k,V)}},Vg.prototype.processTask=function(k,V){var ne=this;if(V.type==="<response>"){var xe=this.callbacks[k];delete this.callbacks[k],xe&&(V.error?xe(St(V.error)):xe(null,St(V.data)))}else{var Ie=!1,Ve=$(this.globalScope)?void 0:[],ht=V.hasCallback?function(Xr,qr){Ie=!0,delete ne.cancelCallbacks[k],ne.target.postMessage({id:k,type:"<response>",sourceMapId:ne.mapId,error:Xr?_t(Xr):null,data:_t(qr,Ve)},Ve)}:function(Xr){Ie=!0},Rt=null,Ht=St(V.data);if(this.parent[V.type])Rt=this.parent[V.type](V.sourceMapId,Ht,ht);else if(this.parent.getWorkerSource){var tr=V.type.split("."),Cr=this.parent.getWorkerSource(V.sourceMapId,tr[0],Ht.source);Rt=Cr[tr[1]](Ht,ht)}else ht(new Error("Could not find function "+V.type));!Ie&&Rt&&Rt.cancel&&(this.cancelCallbacks[k]=Rt.cancel)}},Vg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function WW(C,k,V){k=Math.pow(2,V)-k-1;var ne=RC(C*256,k*256,V),xe=RC((C+1)*256,(k+1)*256,V);return ne[0]+","+ne[1]+","+xe[0]+","+xe[1]}function RC(C,k,V){var ne=2*Math.PI*6378137/256/Math.pow(2,V),xe=C*ne-2*Math.PI*6378137/2,Ie=k*ne-2*Math.PI*6378137/2;return[xe,Ie]}var Gf=function(k,V){k&&(V?this.setSouthWest(k).setNorthEast(V):k.length===4?this.setSouthWest([k[0],k[1]]).setNorthEast([k[2],k[3]]):this.setSouthWest(k[0]).setNorthEast(k[1]))};Gf.prototype.setNorthEast=function(k){return this._ne=k instanceof Dc?new Dc(k.lng,k.lat):Dc.convert(k),this},Gf.prototype.setSouthWest=function(k){return this._sw=k instanceof Dc?new Dc(k.lng,k.lat):Dc.convert(k),this},Gf.prototype.extend=function(k){var V=this._sw,ne=this._ne,xe,Ie;if(k instanceof Dc)xe=k,Ie=k;else if(k instanceof Gf){if(xe=k._sw,Ie=k._ne,!xe||!Ie)return this}else{if(Array.isArray(k))if(k.length===4||k.every(Array.isArray)){var Ve=k;return this.extend(Gf.convert(Ve))}else{var ht=k;return this.extend(Dc.convert(ht))}return this}return!V&&!ne?(this._sw=new Dc(xe.lng,xe.lat),this._ne=new Dc(Ie.lng,Ie.lat)):(V.lng=Math.min(xe.lng,V.lng),V.lat=Math.min(xe.lat,V.lat),ne.lng=Math.max(Ie.lng,ne.lng),ne.lat=Math.max(Ie.lat,ne.lat)),this},Gf.prototype.getCenter=function(){return new Dc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Gf.prototype.getSouthWest=function(){return this._sw},Gf.prototype.getNorthEast=function(){return this._ne},Gf.prototype.getNorthWest=function(){return new Dc(this.getWest(),this.getNorth())},Gf.prototype.getSouthEast=function(){return new Dc(this.getEast(),this.getSouth())},Gf.prototype.getWest=function(){return this._sw.lng},Gf.prototype.getSouth=function(){return this._sw.lat},Gf.prototype.getEast=function(){return this._ne.lng},Gf.prototype.getNorth=function(){return this._ne.lat},Gf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Gf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Gf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Gf.prototype.contains=function(k){var V=Dc.convert(k),ne=V.lng,xe=V.lat,Ie=this._sw.lat<=xe&&xe<=this._ne.lat,Ve=this._sw.lng<=ne&&ne<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ve=this._sw.lng>=ne&&ne>=this._ne.lng),Ie&&Ve},Gf.convert=function(k){return!k||k instanceof Gf?k:new Gf(k)};var DC=63710088e-1,Dc=function(k,V){if(isNaN(k)||isNaN(V))throw new Error("Invalid LngLat object: ("+k+", "+V+")");if(this.lng=+k,this.lat=+V,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Dc.prototype.wrap=function(){return new Dc(_(this.lng,-180,180),this.lat)},Dc.prototype.toArray=function(){return[this.lng,this.lat]},Dc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Dc.prototype.distanceTo=function(k){var V=Math.PI/180,ne=this.lat*V,xe=k.lat*V,Ie=Math.sin(ne)*Math.sin(xe)+Math.cos(ne)*Math.cos(xe)*Math.cos((k.lng-this.lng)*V),Ve=DC*Math.acos(Math.min(Ie,1));return Ve},Dc.prototype.toBounds=function(k){k===void 0&&(k=0);var V=40075017,ne=360*k/V,xe=ne/Math.cos(Math.PI/180*this.lat);return new Gf(new Dc(this.lng-xe,this.lat-ne),new Dc(this.lng+xe,this.lat+ne))},Dc.convert=function(k){if(k instanceof Dc)return k;if(Array.isArray(k)&&(k.length===2||k.length===3))return new Dc(Number(k[0]),Number(k[1]));if(!Array.isArray(k)&&typeof k=="object"&&k!==null)return new Dc(Number("lng"in k?k.lng:k.lon),Number(k.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 zC=2*Math.PI*DC;function FC(C){return zC*Math.cos(C*Math.PI/180)}function OC(C){return(180+C)/360}function BC(C){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+C*Math.PI/360)))/360}function NC(C,k){return C/FC(k)}function XW(C){return C*360-180}function yA(C){var k=180-C*360;return 360/Math.PI*Math.atan(Math.exp(k*Math.PI/180))-90}function ZW(C,k){return C*FC(yA(k))}function YW(C){return 1/Math.cos(C*Math.PI/180)}var B0=function(k,V,ne){ne===void 0&&(ne=0),this.x=+k,this.y=+V,this.z=+ne};B0.fromLngLat=function(k,V){V===void 0&&(V=0);var ne=Dc.convert(k);return new B0(OC(ne.lng),BC(ne.lat),NC(V,ne.lat))},B0.prototype.toLngLat=function(){return new Dc(XW(this.x),yA(this.y))},B0.prototype.toAltitude=function(){return ZW(this.z,this.y)},B0.prototype.meterInMercatorCoordinateUnits=function(){return 1/zC*YW(yA(this.y))};var N0=function(k,V,ne){this.z=k,this.x=V,this.y=ne,this.key=t_(0,k,k,V,ne)};N0.prototype.equals=function(k){return this.z===k.z&&this.x===k.x&&this.y===k.y},N0.prototype.url=function(k,V){var ne=WW(this.x,this.y,this.z),xe=KW(this.z,this.x,this.y);return k[(this.x+this.y)%k.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(V==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",xe).replace("{bbox-epsg-3857}",ne)},N0.prototype.getTilePoint=function(k){var V=Math.pow(2,this.z);return new i((k.x*V-this.x)*pi,(k.y*V-this.y)*pi)},N0.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var UC=function(k,V){this.wrap=k,this.canonical=V,this.key=t_(k,V.z,V.z,V.x,V.y)},Hf=function(k,V,ne,xe,Ie){this.overscaledZ=k,this.wrap=V,this.canonical=new N0(ne,+xe,+Ie),this.key=t_(V,k,ne,xe,Ie)};Hf.prototype.equals=function(k){return this.overscaledZ===k.overscaledZ&&this.wrap===k.wrap&&this.canonical.equals(k.canonical)},Hf.prototype.scaledTo=function(k){var V=this.canonical.z-k;return k>this.canonical.z?new Hf(k,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Hf(k,this.wrap,k,this.canonical.x>>V,this.canonical.y>>V)},Hf.prototype.calculateScaledKey=function(k,V){var ne=this.canonical.z-k;return k>this.canonical.z?t_(this.wrap*+V,k,this.canonical.z,this.canonical.x,this.canonical.y):t_(this.wrap*+V,k,k,this.canonical.x>>ne,this.canonical.y>>ne)},Hf.prototype.isChildOf=function(k){if(k.wrap!==this.wrap)return!1;var V=this.canonical.z-k.canonical.z;return k.overscaledZ===0||k.overscaledZ<this.overscaledZ&&k.canonical.x===this.canonical.x>>V&&k.canonical.y===this.canonical.y>>V},Hf.prototype.children=function(k){if(this.overscaledZ>=k)return[new Hf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var V=this.canonical.z+1,ne=this.canonical.x*2,xe=this.canonical.y*2;return[new Hf(V,this.wrap,V,ne,xe),new Hf(V,this.wrap,V,ne+1,xe),new Hf(V,this.wrap,V,ne,xe+1),new Hf(V,this.wrap,V,ne+1,xe+1)]},Hf.prototype.isLessThan=function(k){return this.wrap<k.wrap?!0:this.wrap>k.wrap?!1:this.overscaledZ<k.overscaledZ?!0:this.overscaledZ>k.overscaledZ?!1:this.canonical.x<k.canonical.x?!0:this.canonical.x>k.canonical.x?!1:this.canonical.y<k.canonical.y},Hf.prototype.wrapped=function(){return new Hf(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Hf.prototype.unwrapTo=function(k){return new Hf(this.overscaledZ,k,this.canonical.z,this.canonical.x,this.canonical.y)},Hf.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Hf.prototype.toUnwrapped=function(){return new UC(this.wrap,this.canonical)},Hf.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Hf.prototype.getTilePoint=function(k){return this.canonical.getTilePoint(new B0(k.x-this.wrap,k.y))};function t_(C,k,V,ne,xe){C*=2,C<0&&(C=C*-1-1);var Ie=1<<V;return(Ie*Ie*C+Ie*xe+ne).toString(36)+V.toString(36)+k.toString(36)}function KW(C,k,V){for(var ne="",xe,Ie=C;Ie>0;Ie--)xe=1<<Ie-1,ne+=(k&xe?1:0)+(V&xe?2:0);return ne}de("CanonicalTileID",N0),de("OverscaledTileID",Hf,{omit:["posMatrix"]});var Bv=function(k,V,ne){if(this.uid=k,V.height!==V.width)throw new RangeError("DEM tiles must be square");if(ne&&ne!=="mapbox"&&ne!=="terrarium")return U('"'+ne+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=V.height;var xe=this.dim=V.height-2;this.data=new Uint32Array(V.data.buffer),this.encoding=ne||"mapbox";for(var Ie=0;Ie<xe;Ie++)this.data[this._idx(-1,Ie)]=this.data[this._idx(0,Ie)],this.data[this._idx(xe,Ie)]=this.data[this._idx(xe-1,Ie)],this.data[this._idx(Ie,-1)]=this.data[this._idx(Ie,0)],this.data[this._idx(Ie,xe)]=this.data[this._idx(Ie,xe-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(xe,-1)]=this.data[this._idx(xe-1,0)],this.data[this._idx(-1,xe)]=this.data[this._idx(0,xe-1)],this.data[this._idx(xe,xe)]=this.data[this._idx(xe-1,xe-1)]};Bv.prototype.get=function(k,V){var ne=new Uint8Array(this.data.buffer),xe=this._idx(k,V)*4,Ie=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return Ie(ne[xe],ne[xe+1],ne[xe+2])},Bv.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Bv.prototype._idx=function(k,V){if(k<-1||k>=this.dim+1||V<-1||V>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(V+1)*this.stride+(k+1)},Bv.prototype._unpackMapbox=function(k,V,ne){return(k*256*256+V*256+ne)/10-1e4},Bv.prototype._unpackTerrarium=function(k,V,ne){return k*256+V+ne/256-32768},Bv.prototype.getPixels=function(){return new $f({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Bv.prototype.backfillBorder=function(k,V,ne){if(this.dim!==k.dim)throw new Error("dem dimension mismatch");var xe=V*this.dim,Ie=V*this.dim+this.dim,Ve=ne*this.dim,ht=ne*this.dim+this.dim;switch(V){case-1:xe=Ie-1;break;case 1:Ie=xe+1;break}switch(ne){case-1:Ve=ht-1;break;case 1:ht=Ve+1;break}for(var Rt=-V*this.dim,Ht=-ne*this.dim,tr=Ve;tr<ht;tr++)for(var Cr=xe;Cr<Ie;Cr++)this.data[this._idx(Cr,tr)]=k.data[this._idx(Cr+Rt,tr+Ht)]},de("DEMData",Bv);function JW(C,k){var V={};if(!k)return V;for(var ne=function(){var Ve=Ie[xe],ht=Ve.layerIds.map(function(Cr){return k.getLayer(Cr)}).filter(Boolean);if(ht.length!==0){Ve.layers=ht,Ve.stateDependentLayerIds&&(Ve.stateDependentLayers=Ve.stateDependentLayerIds.map(function(Cr){return ht.filter(function(Xr){return Xr.id===Cr})[0]}));for(var Rt=0,Ht=ht;Rt<Ht.length;Rt+=1){var tr=Ht[Rt];V[tr.id]=Ve}}},xe=0,Ie=C;xe<Ie.length;xe+=1)ne();return V}var db=function(k){this._stringToNumber={},this._numberToString=[];for(var V=0;V<k.length;V++){var ne=k[V];this._stringToNumber[ne]=V,this._numberToString[V]=ne}};db.prototype.encode=function(k){return this._stringToNumber[k]},db.prototype.decode=function(k){return this._numberToString[k]};var vb=function(k,V,ne,xe,Ie){this.type="Feature",this._vectorTileFeature=k,k._z=V,k._x=ne,k._y=xe,this.properties=k.properties,this.id=Ie},_A={geometry:{configurable:!0}};_A.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},_A.geometry.set=function(C){this._geometry=C},vb.prototype.toJSON=function(){var k={geometry:this.geometry};for(var V in this)V==="_geometry"||V==="_vectorTileFeature"||(k[V]=this[V]);return k},Object.defineProperties(vb.prototype,_A);var Gg=function(){this.state={},this.stateChanges={},this.deletedStates={}};Gg.prototype.updateState=function(k,V,ne){var xe=String(V);if(this.stateChanges[k]=this.stateChanges[k]||{},this.stateChanges[k][xe]=this.stateChanges[k][xe]||{},y(this.stateChanges[k][xe],ne),this.deletedStates[k]===null){this.deletedStates[k]={};for(var Ie in this.state[k])Ie!==xe&&(this.deletedStates[k][Ie]=null)}else{var Ve=this.deletedStates[k]&&this.deletedStates[k][xe]===null;if(Ve){this.deletedStates[k][xe]={};for(var ht in this.state[k][xe])ne[ht]||(this.deletedStates[k][xe][ht]=null)}else for(var Rt in ne){var Ht=this.deletedStates[k]&&this.deletedStates[k][xe]&&this.deletedStates[k][xe][Rt]===null;Ht&&delete this.deletedStates[k][xe][Rt]}}},Gg.prototype.removeFeatureState=function(k,V,ne){var xe=this.deletedStates[k]===null;if(!xe){var Ie=String(V);if(this.deletedStates[k]=this.deletedStates[k]||{},ne&&V!==void 0)this.deletedStates[k][Ie]!==null&&(this.deletedStates[k][Ie]=this.deletedStates[k][Ie]||{},this.deletedStates[k][Ie][ne]=null);else if(V!==void 0){var Ve=this.stateChanges[k]&&this.stateChanges[k][Ie];if(Ve){this.deletedStates[k][Ie]={};for(ne in this.stateChanges[k][Ie])this.deletedStates[k][Ie][ne]=null}else this.deletedStates[k][Ie]=null}else this.deletedStates[k]=null}},Gg.prototype.getState=function(k,V){var ne=String(V),xe=this.state[k]||{},Ie=this.stateChanges[k]||{},Ve=y({},xe[ne],Ie[ne]);if(this.deletedStates[k]===null)return{};if(this.deletedStates[k]){var ht=this.deletedStates[k][V];if(ht===null)return{};for(var Rt in ht)delete Ve[Rt]}return Ve},Gg.prototype.initializeTileState=function(k,V){k.setFeatureState(this.state,V)},Gg.prototype.coalesceChanges=function(k,V){var ne={};for(var xe in this.stateChanges){this.state[xe]=this.state[xe]||{};var Ie={};for(var Ve in this.stateChanges[xe])this.state[xe][Ve]||(this.state[xe][Ve]={}),y(this.state[xe][Ve],this.stateChanges[xe][Ve]),Ie[Ve]=this.state[xe][Ve];ne[xe]=Ie}for(var ht in this.deletedStates){this.state[ht]=this.state[ht]||{};var Rt={};if(this.deletedStates[ht]===null)for(var Ht in this.state[ht])Rt[Ht]={},this.state[ht][Ht]={};else for(var tr in this.deletedStates[ht]){var Cr=this.deletedStates[ht][tr]===null;if(Cr)this.state[ht][tr]={};else for(var Xr=0,qr=Object.keys(this.deletedStates[ht][tr]);Xr<qr.length;Xr+=1){var pa=qr[Xr];delete this.state[ht][tr][pa]}Rt[tr]=this.state[ht][tr]}ne[ht]=ne[ht]||{},y(ne[ht],Rt)}if(this.stateChanges={},this.deletedStates={},Object.keys(ne).length!==0)for(var ja in k){var Ei=k[ja];Ei.setFeatureState(ne,V)}};var Nv=function(k,V){this.tileID=k,this.x=k.canonical.x,this.y=k.canonical.y,this.z=k.canonical.z,this.grid=new hu(pi,16,0),this.grid3D=new hu(pi,16,0),this.featureIndexArray=new bl,this.promoteId=V};Nv.prototype.insert=function(k,V,ne,xe,Ie,Ve){var ht=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(ne,xe,Ie);for(var Rt=Ve?this.grid3D:this.grid,Ht=0;Ht<V.length;Ht++){for(var tr=V[Ht],Cr=[1/0,1/0,-1/0,-1/0],Xr=0;Xr<tr.length;Xr++){var qr=tr[Xr];Cr[0]=Math.min(Cr[0],qr.x),Cr[1]=Math.min(Cr[1],qr.y),Cr[2]=Math.max(Cr[2],qr.x),Cr[3]=Math.max(Cr[3],qr.y)}Cr[0]<pi&&Cr[1]<pi&&Cr[2]>=0&&Cr[3]>=0&&Rt.insert(ht,Cr[0],Cr[1],Cr[2],Cr[3])}},Nv.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xd.VectorTile(new go(this.rawTileData)).layers,this.sourceLayerCoder=new db(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Nv.prototype.query=function(k,V,ne,xe){var Ie=this;this.loadVTLayers();for(var Ve=k.params||{},ht=pi/k.tileSize/k.scale,Rt=Je(Ve.filter),Ht=k.queryGeometry,tr=k.queryPadding*ht,Cr=qC(Ht),Xr=this.grid.query(Cr.minX-tr,Cr.minY-tr,Cr.maxX+tr,Cr.maxY+tr),qr=qC(k.cameraQueryGeometry),pa=this.grid3D.query(qr.minX-tr,qr.minY-tr,qr.maxX+tr,qr.maxY+tr,function(xn,qn,Nn,Mo){return rd(k.cameraQueryGeometry,xn-tr,qn-tr,Nn+tr,Mo+tr)}),ja=0,Ei=pa;ja<Ei.length;ja+=1){var li=Ei[ja];Xr.push(li)}Xr.sort($W);for(var en={},Ni,Qi=function(xn){var qn=Xr[xn];if(qn!==Ni){Ni=qn;var Nn=Ie.featureIndexArray.get(qn),Mo=null;Ie.loadMatchingFeature(en,Nn.bucketIndex,Nn.sourceLayerIndex,Nn.featureIndex,Rt,Ve.layers,Ve.availableImages,V,ne,xe,function(no,yo,Ms){return Mo||(Mo=cn(no)),yo.queryIntersectsFeature(Ht,no,Ms,Mo,Ie.z,k.transform,ht,k.pixelPosMatrix)})}},ln=0;ln<Xr.length;ln++)Qi(ln);return en},Nv.prototype.loadMatchingFeature=function(k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr,Cr){var Xr=this.bucketLayerIDs[V];if(!(Ve&&!I(Ve,Xr))){var qr=this.sourceLayerCoder.decode(ne),pa=this.vtLayers[qr],ja=pa.feature(xe);if(Ie.needGeometry){var Ei=xo(ja,!0);if(!Ie.filter(new gn(this.tileID.overscaledZ),Ei,this.tileID.canonical))return}else if(!Ie.filter(new gn(this.tileID.overscaledZ),ja))return;for(var li=this.getId(ja,qr),en=0;en<Xr.length;en++){var Ni=Xr[en];if(!(Ve&&Ve.indexOf(Ni)<0)){var Qi=Rt[Ni];if(Qi){var ln={};li!==void 0&&tr&&(ln=tr.getState(Qi.sourceLayer||"_geojsonTileLayer",li));var xn=y({},Ht[Ni]);xn.paint=jC(xn.paint,Qi.paint,ja,ln,ht),xn.layout=jC(xn.layout,Qi.layout,ja,ln,ht);var qn=!Cr||Cr(ja,Qi,ln);if(qn){var Nn=new vb(ja,this.z,this.x,this.y,li);Nn.layer=xn;var Mo=k[Ni];Mo===void 0&&(Mo=k[Ni]=[]),Mo.push({featureIndex:xe,feature:Nn,intersectionZ:qn})}}}}}},Nv.prototype.lookupSymbolFeatures=function(k,V,ne,xe,Ie,Ve,ht,Rt){var Ht={};this.loadVTLayers();for(var tr=Je(Ie),Cr=0,Xr=k;Cr<Xr.length;Cr+=1){var qr=Xr[Cr];this.loadMatchingFeature(Ht,ne,xe,qr,tr,Ve,ht,Rt,V)}return Ht},Nv.prototype.hasLayer=function(k){for(var V=0,ne=this.bucketLayerIDs;V<ne.length;V+=1)for(var xe=ne[V],Ie=0,Ve=xe;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];if(k===ht)return!0}return!1},Nv.prototype.getId=function(k,V){var ne=k.id;if(this.promoteId){var xe=typeof this.promoteId=="string"?this.promoteId:this.promoteId[V];ne=k.properties[xe],typeof ne=="boolean"&&(ne=Number(ne))}return ne},de("FeatureIndex",Nv,{omit:["rawTileData","sourceLayerCoder"]});function jC(C,k,V,ne,xe){return F(C,function(Ie,Ve){var ht=k instanceof yc?k.get(Ve):null;return ht&&ht.evaluate?ht.evaluate(V,ne,xe):ht})}function qC(C){for(var k=1/0,V=1/0,ne=-1/0,xe=-1/0,Ie=0,Ve=C;Ie<Ve.length;Ie+=1){var ht=Ve[Ie];k=Math.min(k,ht.x),V=Math.min(V,ht.y),ne=Math.max(ne,ht.x),xe=Math.max(xe,ht.y)}return{minX:k,minY:V,maxX:ne,maxY:xe}}function $W(C,k){return k-C}var QW=3e4,ph=function(k,V){this.tileID=k,this.uid=u(),this.uses=0,this.tileSize=V,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};ph.prototype.registerFadeDuration=function(k){var V=k+this.timeAdded;V<be.now()||this.fadeEndTime&&V<this.fadeEndTime||(this.fadeEndTime=V)},ph.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},ph.prototype.loadVectorData=function(k,V,ne){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!k){this.collisionBoxArray=new ho;return}k.featureIndex&&(this.latestFeatureIndex=k.featureIndex,k.rawTileData?(this.latestRawTileData=k.rawTileData,this.latestFeatureIndex.rawTileData=k.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=k.collisionBoxArray,this.buckets=JW(k.buckets,V.style),this.hasSymbolBuckets=!1;for(var xe in this.buckets){var Ie=this.buckets[xe];if(Ie instanceof Du)if(this.hasSymbolBuckets=!0,ne)Ie.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Ve in this.buckets){var ht=this.buckets[Ve];if(ht instanceof Du&&ht.hasRTLText){this.hasRTLText=!0,_l();break}}this.queryPadding=0;for(var Rt in this.buckets){var Ht=this.buckets[Rt];this.queryPadding=Math.max(this.queryPadding,V.style.getLayer(Rt).queryRadius(Ht))}k.imageAtlas&&(this.imageAtlas=k.imageAtlas),k.glyphAtlasImage&&(this.glyphAtlasImage=k.glyphAtlasImage)},ph.prototype.unloadVectorData=function(){for(var k in this.buckets)this.buckets[k].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},ph.prototype.getBucket=function(k){return this.buckets[k.id]},ph.prototype.upload=function(k){for(var V in this.buckets){var ne=this.buckets[V];ne.uploadPending()&&ne.upload(k)}var xe=k.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new O0(k,this.imageAtlas.image,xe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new O0(k,this.glyphAtlasImage,xe.ALPHA),this.glyphAtlasImage=null)},ph.prototype.prepare=function(k){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(k,this.imageAtlasTexture)},ph.prototype.queryRenderedFeatures=function(k,V,ne,xe,Ie,Ve,ht,Rt,Ht,tr){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:xe,cameraQueryGeometry:Ie,scale:Ve,tileSize:this.tileSize,pixelPosMatrix:tr,transform:Rt,params:ht,queryPadding:this.queryPadding*Ht},k,V,ne)},ph.prototype.querySourceFeatures=function(k,V){var ne=this.latestFeatureIndex;if(!(!ne||!ne.rawTileData)){var xe=ne.loadVTLayers(),Ie=V?V.sourceLayer:"",Ve=xe._geojsonTileLayer||xe[Ie];if(Ve)for(var ht=Je(V&&V.filter),Rt=this.tileID.canonical,Ht=Rt.z,tr=Rt.x,Cr=Rt.y,Xr={z:Ht,x:tr,y:Cr},qr=0;qr<Ve.length;qr++){var pa=Ve.feature(qr);if(ht.needGeometry){var ja=xo(pa,!0);if(!ht.filter(new gn(this.tileID.overscaledZ),ja,this.tileID.canonical))continue}else if(!ht.filter(new gn(this.tileID.overscaledZ),pa))continue;var Ei=ne.getId(pa,Ie),li=new vb(pa,Ht,tr,Cr,Ei);li.tile=Xr,k.push(li)}}},ph.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},ph.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},ph.prototype.setExpiryData=function(k){var V=this.expirationTime;if(k.cacheControl){var ne=he(k.cacheControl);ne["max-age"]&&(this.expirationTime=Date.now()+ne["max-age"]*1e3)}else k.expires&&(this.expirationTime=new Date(k.expires).getTime());if(this.expirationTime){var xe=Date.now(),Ie=!1;if(this.expirationTime>xe)Ie=!1;else if(!V)Ie=!0;else if(this.expirationTime<V)Ie=!0;else{var Ve=this.expirationTime-V;Ve?this.expirationTime=xe+Math.max(Ve,QW):Ie=!0}Ie?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},ph.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)},ph.prototype.setFeatureState=function(k,V){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(k).length===0)){var ne=this.latestFeatureIndex.loadVTLayers();for(var xe in this.buckets)if(V.style.hasLayer(xe)){var Ie=this.buckets[xe],Ve=Ie.layers[0].sourceLayer||"_geojsonTileLayer",ht=ne[Ve],Rt=k[Ve];if(!(!ht||!Rt||Object.keys(Rt).length===0)){Ie.update(Rt,ht,this.imageAtlas&&this.imageAtlas.patternPositions||{});var Ht=V&&V.style&&V.style.getLayer(xe);Ht&&(this.queryPadding=Math.max(this.queryPadding,Ht.queryRadius(Ie)))}}}},ph.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},ph.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<be.now()},ph.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},ph.prototype.setHoldDuration=function(k){this.symbolFadeHoldUntil=be.now()+k},ph.prototype.setDependencies=function(k,V){for(var ne={},xe=0,Ie=V;xe<Ie.length;xe+=1){var Ve=Ie[xe];ne[Ve]=!0}this.dependencies[k]=ne},ph.prototype.hasDependency=function(k,V){for(var ne=0,xe=k;ne<xe.length;ne+=1){var Ie=xe[ne],Ve=this.dependencies[Ie];if(Ve)for(var ht=0,Rt=V;ht<Rt.length;ht+=1){var Ht=Rt[ht];if(Ve[Ht])return!0}}return!1};var eX=["type","source","source-layer","minzoom","maxzoom","filter","layout"],gm=s.performance,VC=function(k){this._marks={start:[k.url,"start"].join("#"),end:[k.url,"end"].join("#"),measure:k.url.toString()},gm.mark(this._marks.start)};VC.prototype.finish=function(){gm.mark(this._marks.end);var k=gm.getEntriesByName(this._marks.measure);return k.length===0&&(gm.measure(this._marks.measure,this._marks.start,this._marks.end),k=gm.getEntriesByName(this._marks.measure),gm.clearMarks(this._marks.start),gm.clearMarks(this._marks.end),gm.clearMeasures(this._marks.measure)),k},e.Actor=Vg,e.AlphaImage=Pp,e.CanonicalTileID=N0,e.CollisionBoxArray=ho,e.Color=Us,e.DEMData=Bv,e.DataConstantProperty=nt,e.DictionaryCoder=db,e.EXTENT=pi,e.ErrorEvent=Kr,e.EvaluationParameters=gn,e.Event=Gr,e.Evented=Ur,e.FeatureIndex=Nv,e.FillBucket=ad,e.FillExtrusionBucket=fd,e.ImageAtlas=Zd,e.ImagePosition=Pf,e.LineBucket=Vf,e.LngLat=Dc,e.LngLatBounds=Gf,e.MercatorCoordinate=B0,e.ONE_EM=rn,e.OverscaledTileID=Hf,e.Point=i,e.Point$1=i,e.Properties=xa,e.Protobuf=go,e.RGBAImage=$f,e.RequestManager=fe,e.RequestPerformance=VC,e.ResourceType=ti,e.SegmentVector=Lo,e.SourceFeatureState=Gg,e.StructArrayLayout1ui2=Gn,e.StructArrayLayout2f1f2i16=Si,e.StructArrayLayout2i4=Ea,e.StructArrayLayout3ui6=Ki,e.StructArrayLayout4i8=ii,e.SymbolBucket=Du,e.Texture=O0,e.Tile=ph,e.Transitionable=ps,e.Uniform1f=Et,e.Uniform1i=gt,e.Uniform2f=Ft,e.Uniform3f=ir,e.Uniform4f=fr,e.UniformColor=sr,e.UniformMatrix4f=lr,e.UnwrappedTileID=UC,e.ValidationError=Cn,e.WritingMode=dp,e.ZoomHistory=ar,e.add=Lp,e.addDynamicAttributes=vA,e.asyncAll=w,e.bezier=v,e.bindAll=L,e.browser=be,e.cacheEntryPossiblyAdded=la,e.clamp=l,e.clearTileCache=Ba,e.clipLine=TC,e.clone=nm,e.clone$1=O,e.clone$2=_g,e.collisionCircleLayout=nr,e.config=Ae,e.create=im,e.create$1=ch,e.create$2=Gd,e.createCommonjsModule=t,e.createExpression=zo,e.createLayout=ki,e.createStyleLayer=HW,e.cross=jT,e.deepEqual=c,e.dot=UT,e.dot$1=WT,e.ease=T,e.emitValidationErrors=Ru,e.endsWith=z,e.enforceCacheSizeLimit=Ua,e.evaluateSizeForFeature=mC,e.evaluateSizeForZoom=gC,e.evaluateVariableOffset=MC,e.evented=eo,e.extend=y,e.featureFilter=Je,e.filterObject=B,e.fromRotation=iv,e.getAnchorAlignment=$1,e.getAnchorJustification=dA,e.getArrayBuffer=ma,e.getImage=Nr,e.getJSON=ta,e.getRTLTextPluginStatus=$o,e.getReferrer=Jt,e.getVideo=Or,e.identity=Pv,e.invert=nv,e.isChar=zt,e.isMapboxURL=Fe,e.keysDifference=E,e.makeRequest=Pr,e.mapObject=F,e.mercatorXfromLng=OC,e.mercatorYfromLat=BC,e.mercatorZfromAltitude=NC,e.mul=x0,e.multiply=ov,e.mvt=Xd,e.nextPowerOfTwo=h,e.normalize=b0,e.number=Ml,e.offscreenCanvasSupported=za,e.ortho=Au,e.parseGlyphPBF=_d,e.pbf=go,e.performSymbolLayout=SW,e.perspective=om,e.pick=b,e.plugin=el,e.polygonIntersectsPolygon=Fo,e.postMapLoadEvent=Ue,e.postTurnstileEvent=Be,e.potpack=Wp,e.refProperties=eX,e.register=de,e.registerForPluginStateChange=io,e.renderColorRamp=A0,e.rotate=Lv,e.rotateX=Dh,e.rotateZ=Iv,e.scale=lu,e.scale$1=HT,e.scale$2=xg,e.setCacheLimits=Ra,e.setRTLTextPlugin=Zo,e.sphericalToCartesian=ue,e.sqrLen=I1,e.styleSpec=Ui,e.sub=VT,e.symbolSize=mW,e.transformMat3=qT,e.transformMat4=Rv,e.translate=cc,e.triggerPluginCompletionEvent=Pn,e.uniqueId=u,e.validateCustomStyleLayer=qW,e.validateLight=ts,e.validateStyle=es,e.values=S,e.vectorTile=Xd,e.version=r,e.warnOnce=U,e.webpSupported=ze,e.window=s,e.wrap=_}),M(["./shared"],function(e){"use strict";function t(Jt){var Nt=typeof Jt;if(Nt==="number"||Nt==="boolean"||Nt==="string"||Jt===void 0||Jt===null)return JSON.stringify(Jt);if(Array.isArray(Jt)){for(var Kt="[",Wt=0,Pr=Jt;Wt<Pr.length;Wt+=1){var ta=Pr[Wt];Kt+=t(ta)+","}return Kt+"]"}for(var ma=Object.keys(Jt).sort(),ra="{",Ia=0;Ia<ma.length;Ia++)ra+=JSON.stringify(ma[Ia])+":"+t(Jt[ma[Ia]])+",";return ra+"}"}function r(Jt){for(var Nt="",Kt=0,Wt=e.refProperties;Kt<Wt.length;Kt+=1){var Pr=Wt[Kt];Nt+="/"+t(Jt[Pr])}return Nt}function o(Jt,Nt){for(var Kt={},Wt=0;Wt<Jt.length;Wt++){var Pr=Nt&&Nt[Jt[Wt].id]||r(Jt[Wt]);Nt&&(Nt[Jt[Wt].id]=Pr);var ta=Kt[Pr];ta||(ta=Kt[Pr]=[]),ta.push(Jt[Wt])}var ma=[];for(var ra in Kt)ma.push(Kt[ra]);return ma}var a=function(Nt){this.keyCache={},Nt&&this.replace(Nt)};a.prototype.replace=function(Nt){this._layerConfigs={},this._layers={},this.update(Nt,[])},a.prototype.update=function(Nt,Kt){for(var Wt=this,Pr=0,ta=Nt;Pr<ta.length;Pr+=1){var ma=ta[Pr];this._layerConfigs[ma.id]=ma;var ra=this._layers[ma.id]=e.createStyleLayer(ma);ra._featureFilter=e.featureFilter(ra.filter),this.keyCache[ma.id]&&delete this.keyCache[ma.id]}for(var Ia=0,Ha=Kt;Ia<Ha.length;Ia+=1){var $a=Ha[Ia];delete this.keyCache[$a],delete this._layerConfigs[$a],delete this._layers[$a]}this.familiesBySource={};for(var ai=o(e.values(this._layerConfigs),this.keyCache),mi=0,xt=ai;mi<xt.length;mi+=1){var ct=xt[mi],Nr=ct.map(function(Ur){return Wt._layers[Ur.id]}),Or=Nr[0];if(Or.visibility!=="none"){var Rr=Or.source||"",Lr=this.familiesBySource[Rr];Lr||(Lr=this.familiesBySource[Rr]={});var Gr=Or.sourceLayer||"_geojsonTileLayer",Kr=Lr[Gr];Kr||(Kr=Lr[Gr]=[]),Kr.push(Nr)}}};var i=1,n=function(Nt){var Kt={},Wt=[];for(var Pr in Nt){var ta=Nt[Pr],ma=Kt[Pr]={};for(var ra in ta){var Ia=ta[+ra];if(!(!Ia||Ia.bitmap.width===0||Ia.bitmap.height===0)){var Ha={x:0,y:0,w:Ia.bitmap.width+2*i,h:Ia.bitmap.height+2*i};Wt.push(Ha),ma[ra]={rect:Ha,metrics:Ia.metrics}}}}var $a=e.potpack(Wt),ai=$a.w,mi=$a.h,xt=new e.AlphaImage({width:ai||1,height:mi||1});for(var ct in Nt){var Nr=Nt[ct];for(var Or in Nr){var Rr=Nr[+Or];if(!(!Rr||Rr.bitmap.width===0||Rr.bitmap.height===0)){var Lr=Kt[ct][Or].rect;e.AlphaImage.copy(Rr.bitmap,xt,{x:0,y:0},{x:Lr.x+i,y:Lr.y+i},Rr.bitmap)}}}this.image=xt,this.positions=Kt};e.register("GlyphAtlas",n);var s=function(Nt){this.tileID=new e.OverscaledTileID(Nt.tileID.overscaledZ,Nt.tileID.wrap,Nt.tileID.canonical.z,Nt.tileID.canonical.x,Nt.tileID.canonical.y),this.uid=Nt.uid,this.zoom=Nt.zoom,this.pixelRatio=Nt.pixelRatio,this.tileSize=Nt.tileSize,this.source=Nt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Nt.showCollisionBoxes,this.collectResourceTiming=!!Nt.collectResourceTiming,this.returnDependencies=!!Nt.returnDependencies,this.promoteId=Nt.promoteId};s.prototype.parse=function(Nt,Kt,Wt,Pr,ta){var ma=this;this.status="parsing",this.data=Nt,this.collisionBoxArray=new e.CollisionBoxArray;var ra=new e.DictionaryCoder(Object.keys(Nt.layers).sort()),Ia=new e.FeatureIndex(this.tileID,this.promoteId);Ia.bucketLayerIDs=[];var Ha={},$a={featureIndex:Ia,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Wt},ai=Kt.familiesBySource[this.source];for(var mi in ai){var xt=Nt.layers[mi];if(xt){xt.version===1&&e.warnOnce('Vector tile source "'+this.source+'" layer "'+mi+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var ct=ra.encode(mi),Nr=[],Or=0;Or<xt.length;Or++){var Rr=xt.feature(Or),Lr=Ia.getId(Rr,mi);Nr.push({feature:Rr,id:Lr,index:Or,sourceLayerIndex:ct})}for(var Gr=0,Kr=ai[mi];Gr<Kr.length;Gr+=1){var Ur=Kr[Gr],aa=Ur[0];if(!(aa.minzoom&&this.zoom<Math.floor(aa.minzoom))&&!(aa.maxzoom&&this.zoom>=aa.maxzoom)&&aa.visibility!=="none"){c(Ur,this.zoom,Wt);var da=Ha[aa.id]=aa.createBucket({index:Ia.bucketLayerIDs.length,layers:Ur,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ct,sourceID:this.source});da.populate(Nr,$a,this.tileID.canonical),Ia.bucketLayerIDs.push(Ur.map(function(ha){return ha.id}))}}}}var fa,It,dr,kr,ia=e.mapObject($a.glyphDependencies,function(ha){return Object.keys(ha).map(Number)});Object.keys(ia).length?Pr.send("getGlyphs",{uid:this.uid,stacks:ia},function(ha,Da){fa||(fa=ha,It=Da,Ya.call(ma))}):It={};var Ca=Object.keys($a.iconDependencies);Ca.length?Pr.send("getImages",{icons:Ca,source:this.source,tileID:this.tileID,type:"icons"},function(ha,Da){fa||(fa=ha,dr=Da,Ya.call(ma))}):dr={};var Fa=Object.keys($a.patternDependencies);Fa.length?Pr.send("getImages",{icons:Fa,source:this.source,tileID:this.tileID,type:"patterns"},function(ha,Da){fa||(fa=ha,kr=Da,Ya.call(ma))}):kr={},Ya.call(this);function Ya(){if(fa)return ta(fa);if(It&&dr&&kr){var ha=new n(It),Da=new e.ImageAtlas(dr,kr);for(var Xi in Ha){var Li=Ha[Xi];Li instanceof e.SymbolBucket?(c(Li.layers,this.zoom,Wt),e.performSymbolLayout(Li,It,ha.positions,dr,Da.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Li.hasPattern&&(Li instanceof e.LineBucket||Li instanceof e.FillBucket||Li instanceof e.FillExtrusionBucket)&&(c(Li.layers,this.zoom,Wt),Li.addFeatures($a,this.tileID.canonical,Da.patternPositions))}this.status="done",ta(null,{buckets:e.values(Ha).filter(function(fn){return!fn.isEmpty()}),featureIndex:Ia,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ha.image,imageAtlas:Da,glyphMap:this.returnDependencies?It:null,iconMap:this.returnDependencies?dr:null,glyphPositions:this.returnDependencies?ha.positions:null})}}};function c(Jt,Nt,Kt){for(var Wt=new e.EvaluationParameters(Nt),Pr=0,ta=Jt;Pr<ta.length;Pr+=1){var ma=ta[Pr];ma.recalculate(Wt,Kt)}}function f(Jt,Nt){var Kt=e.getArrayBuffer(Jt.request,function(Wt,Pr,ta,ma){Wt?Nt(Wt):Pr&&Nt(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(Pr)),rawData:Pr,cacheControl:ta,expires:ma})});return function(){Kt.cancel(),Nt()}}var g=function(Nt,Kt,Wt,Pr){this.actor=Nt,this.layerIndex=Kt,this.availableImages=Wt,this.loadVectorData=Pr||f,this.loading={},this.loaded={}};g.prototype.loadTile=function(Nt,Kt){var Wt=this,Pr=Nt.uid;this.loading||(this.loading={});var ta=Nt&&Nt.request&&Nt.request.collectResourceTiming?new e.RequestPerformance(Nt.request):!1,ma=this.loading[Pr]=new s(Nt);ma.abort=this.loadVectorData(Nt,function(ra,Ia){if(delete Wt.loading[Pr],ra||!Ia)return ma.status="done",Wt.loaded[Pr]=ma,Kt(ra);var Ha=Ia.rawData,$a={};Ia.expires&&($a.expires=Ia.expires),Ia.cacheControl&&($a.cacheControl=Ia.cacheControl);var ai={};if(ta){var mi=ta.finish();mi&&(ai.resourceTiming=JSON.parse(JSON.stringify(mi)))}ma.vectorTile=Ia.vectorTile,ma.parse(Ia.vectorTile,Wt.layerIndex,Wt.availableImages,Wt.actor,function(xt,ct){if(xt||!ct)return Kt(xt);Kt(null,e.extend({rawTileData:Ha.slice(0)},ct,$a,ai))}),Wt.loaded=Wt.loaded||{},Wt.loaded[Pr]=ma})},g.prototype.reloadTile=function(Nt,Kt){var Wt=this,Pr=this.loaded,ta=Nt.uid,ma=this;if(Pr&&Pr[ta]){var ra=Pr[ta];ra.showCollisionBoxes=Nt.showCollisionBoxes;var Ia=function(Ha,$a){var ai=ra.reloadCallback;ai&&(delete ra.reloadCallback,ra.parse(ra.vectorTile,ma.layerIndex,Wt.availableImages,ma.actor,ai)),Kt(Ha,$a)};ra.status==="parsing"?ra.reloadCallback=Ia:ra.status==="done"&&(ra.vectorTile?ra.parse(ra.vectorTile,this.layerIndex,this.availableImages,this.actor,Ia):Ia())}},g.prototype.abortTile=function(Nt,Kt){var Wt=this.loading,Pr=Nt.uid;Wt&&Wt[Pr]&&Wt[Pr].abort&&(Wt[Pr].abort(),delete Wt[Pr]),Kt()},g.prototype.removeTile=function(Nt,Kt){var Wt=this.loaded,Pr=Nt.uid;Wt&&Wt[Pr]&&delete Wt[Pr],Kt()};var v=e.window.ImageBitmap,T=function(){this.loaded={}};T.prototype.loadTile=function(Nt,Kt){var Wt=Nt.uid,Pr=Nt.encoding,ta=Nt.rawImageData,ma=v&&ta instanceof v?this.getImageData(ta):ta,ra=new e.DEMData(Wt,ma,Pr);this.loaded=this.loaded||{},this.loaded[Wt]=ra,Kt(null,ra)},T.prototype.getImageData=function(Nt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(Nt.width,Nt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Nt.width,this.offscreenCanvas.height=Nt.height,this.offscreenCanvasContext.drawImage(Nt,0,0,Nt.width,Nt.height);var Kt=this.offscreenCanvasContext.getImageData(-1,-1,Nt.width+2,Nt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:Kt.width,height:Kt.height},Kt.data)},T.prototype.removeTile=function(Nt){var Kt=this.loaded,Wt=Nt.uid;Kt&&Kt[Wt]&&delete Kt[Wt]};var l=_;function _(Jt,Nt){var Kt=Jt&&Jt.type,Wt;if(Kt==="FeatureCollection")for(Wt=0;Wt<Jt.features.length;Wt++)_(Jt.features[Wt],Nt);else if(Kt==="GeometryCollection")for(Wt=0;Wt<Jt.geometries.length;Wt++)_(Jt.geometries[Wt],Nt);else if(Kt==="Feature")_(Jt.geometry,Nt);else if(Kt==="Polygon")w(Jt.coordinates,Nt);else if(Kt==="MultiPolygon")for(Wt=0;Wt<Jt.coordinates.length;Wt++)w(Jt.coordinates[Wt],Nt);return Jt}function w(Jt,Nt){if(Jt.length!==0){S(Jt[0],Nt);for(var Kt=1;Kt<Jt.length;Kt++)S(Jt[Kt],!Nt)}}function S(Jt,Nt){for(var Kt=0,Wt=0,Pr=Jt.length,ta=Pr-1;Wt<Pr;ta=Wt++)Kt+=(Jt[Wt][0]-Jt[ta][0])*(Jt[ta][1]+Jt[Wt][1]);Kt>=0!=!!Nt&&Jt.reverse()}var E=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,y=function(Nt){this._feature=Nt,this.extent=e.EXTENT,this.type=Nt.type,this.properties=Nt.tags,"id"in Nt&&!isNaN(Nt.id)&&(this.id=parseInt(Nt.id,10))};y.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Nt=[],Kt=0,Wt=this._feature.geometry;Kt<Wt.length;Kt+=1){var Pr=Wt[Kt];Nt.push([new e.Point$1(Pr[0],Pr[1])])}return Nt}else{for(var ta=[],ma=0,ra=this._feature.geometry;ma<ra.length;ma+=1){for(var Ia=ra[ma],Ha=[],$a=0,ai=Ia;$a<ai.length;$a+=1){var mi=ai[$a];Ha.push(new e.Point$1(mi[0],mi[1]))}ta.push(Ha)}return ta}},y.prototype.toGeoJSON=function(Nt,Kt,Wt){return E.call(this,Nt,Kt,Wt)};var b=function(Nt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=Nt.length,this._features=Nt};b.prototype.feature=function(Nt){return new y(this._features[Nt])};var p=e.vectorTile.VectorTileFeature,u=m;function m(Jt,Nt){this.options=Nt||{},this.features=Jt,this.length=Jt.length}m.prototype.feature=function(Jt){return new h(this.features[Jt],this.options.extent)};function h(Jt,Nt){this.id=typeof Jt.id=="number"?Jt.id:void 0,this.type=Jt.type,this.rawGeometry=Jt.type===1?[Jt.geometry]:Jt.geometry,this.properties=Jt.tags,this.extent=Nt||4096}h.prototype.loadGeometry=function(){var Jt=this.rawGeometry;this.geometry=[];for(var Nt=0;Nt<Jt.length;Nt++){for(var Kt=Jt[Nt],Wt=[],Pr=0;Pr<Kt.length;Pr++)Wt.push(new e.Point$1(Kt[Pr][0],Kt[Pr][1]));this.geometry.push(Wt)}return this.geometry},h.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Jt=this.geometry,Nt=1/0,Kt=-1/0,Wt=1/0,Pr=-1/0,ta=0;ta<Jt.length;ta++)for(var ma=Jt[ta],ra=0;ra<ma.length;ra++){var Ia=ma[ra];Nt=Math.min(Nt,Ia.x),Kt=Math.max(Kt,Ia.x),Wt=Math.min(Wt,Ia.y),Pr=Math.max(Pr,Ia.y)}return[Nt,Wt,Kt,Pr]},h.prototype.toGeoJSON=p.prototype.toGeoJSON;var P=B,L=B,z=O,F=u;function B(Jt){var Nt=new e.pbf;return I(Jt,Nt),Nt.finish()}function O(Jt,Nt){Nt=Nt||{};var Kt={};for(var Wt in Jt)Kt[Wt]=new u(Jt[Wt].features,Nt),Kt[Wt].name=Wt,Kt[Wt].version=Nt.version,Kt[Wt].extent=Nt.extent;return B({layers:Kt})}function I(Jt,Nt){for(var Kt in Jt.layers)Nt.writeMessage(3,N,Jt.layers[Kt])}function N(Jt,Nt){Nt.writeVarintField(15,Jt.version||1),Nt.writeStringField(1,Jt.name||""),Nt.writeVarintField(5,Jt.extent||4096);var Kt,Wt={keys:[],values:[],keycache:{},valuecache:{}};for(Kt=0;Kt<Jt.length;Kt++)Wt.feature=Jt.feature(Kt),Nt.writeMessage(2,U,Wt);var Pr=Wt.keys;for(Kt=0;Kt<Pr.length;Kt++)Nt.writeStringField(3,Pr[Kt]);var ta=Wt.values;for(Kt=0;Kt<ta.length;Kt++)Nt.writeMessage(4,he,ta[Kt])}function U(Jt,Nt){var Kt=Jt.feature;Kt.id!==void 0&&Nt.writeVarintField(1,Kt.id),Nt.writeMessage(2,W,Jt),Nt.writeVarintField(3,Kt.type),Nt.writeMessage(4,le,Kt)}function W(Jt,Nt){var Kt=Jt.feature,Wt=Jt.keys,Pr=Jt.values,ta=Jt.keycache,ma=Jt.valuecache;for(var ra in Kt.properties){var Ia=ta[ra];typeof Ia>"u"&&(Wt.push(ra),Ia=Wt.length-1,ta[ra]=Ia),Nt.writeVarint(Ia);var Ha=Kt.properties[ra],$a=typeof Ha;$a!=="string"&&$a!=="boolean"&&$a!=="number"&&(Ha=JSON.stringify(Ha));var ai=$a+":"+Ha,mi=ma[ai];typeof mi>"u"&&(Pr.push(Ha),mi=Pr.length-1,ma[ai]=mi),Nt.writeVarint(mi)}}function Q(Jt,Nt){return(Nt<<3)+(Jt&7)}function ue(Jt){return Jt<<1^Jt>>31}function le(Jt,Nt){for(var Kt=Jt.loadGeometry(),Wt=Jt.type,Pr=0,ta=0,ma=Kt.length,ra=0;ra<ma;ra++){var Ia=Kt[ra],Ha=1;Wt===1&&(Ha=Ia.length),Nt.writeVarint(Q(1,Ha));for(var $a=Wt===3?Ia.length-1:Ia.length,ai=0;ai<$a;ai++){ai===1&&Wt!==1&&Nt.writeVarint(Q(2,$a-1));var mi=Ia[ai].x-Pr,xt=Ia[ai].y-ta;Nt.writeVarint(ue(mi)),Nt.writeVarint(ue(xt)),Pr+=mi,ta+=xt}Wt===3&&Nt.writeVarint(Q(7,1))}}function he(Jt,Nt){var Kt=typeof Jt;Kt==="string"?Nt.writeStringField(1,Jt):Kt==="boolean"?Nt.writeBooleanField(7,Jt):Kt==="number"&&(Jt%1!==0?Nt.writeDoubleField(3,Jt):Jt<0?Nt.writeSVarintField(6,Jt):Nt.writeVarintField(5,Jt))}P.fromVectorTileJs=L,P.fromGeojsonVt=z,P.GeoJSONWrapper=F;function G(Jt,Nt,Kt,Wt,Pr,ta){if(!(Pr-Wt<=Kt)){var ma=Wt+Pr>>1;$(Jt,Nt,ma,Wt,Pr,ta%2),G(Jt,Nt,Kt,Wt,ma-1,ta+1),G(Jt,Nt,Kt,ma+1,Pr,ta+1)}}function $(Jt,Nt,Kt,Wt,Pr,ta){for(;Pr>Wt;){if(Pr-Wt>600){var ma=Pr-Wt+1,ra=Kt-Wt+1,Ia=Math.log(ma),Ha=.5*Math.exp(2*Ia/3),$a=.5*Math.sqrt(Ia*Ha*(ma-Ha)/ma)*(ra-ma/2<0?-1:1),ai=Math.max(Wt,Math.floor(Kt-ra*Ha/ma+$a)),mi=Math.min(Pr,Math.floor(Kt+(ma-ra)*Ha/ma+$a));$(Jt,Nt,Kt,ai,mi,ta)}var xt=Nt[2*Kt+ta],ct=Wt,Nr=Pr;for(J(Jt,Nt,Wt,Kt),Nt[2*Pr+ta]>xt&&J(Jt,Nt,Wt,Pr);ct<Nr;){for(J(Jt,Nt,ct,Nr),ct++,Nr--;Nt[2*ct+ta]<xt;)ct++;for(;Nt[2*Nr+ta]>xt;)Nr--}Nt[2*Wt+ta]===xt?J(Jt,Nt,Wt,Nr):(Nr++,J(Jt,Nt,Nr,Pr)),Nr<=Kt&&(Wt=Nr+1),Kt<=Nr&&(Pr=Nr-1)}}function J(Jt,Nt,Kt,Wt){X(Jt,Kt,Wt),X(Nt,2*Kt,2*Wt),X(Nt,2*Kt+1,2*Wt+1)}function X(Jt,Nt,Kt){var Wt=Jt[Nt];Jt[Nt]=Jt[Kt],Jt[Kt]=Wt}function oe(Jt,Nt,Kt,Wt,Pr,ta,ma){for(var ra=[0,Jt.length-1,0],Ia=[],Ha,$a;ra.length;){var ai=ra.pop(),mi=ra.pop(),xt=ra.pop();if(mi-xt<=ma){for(var ct=xt;ct<=mi;ct++)Ha=Nt[2*ct],$a=Nt[2*ct+1],Ha>=Kt&&Ha<=Pr&&$a>=Wt&&$a<=ta&&Ia.push(Jt[ct]);continue}var Nr=Math.floor((xt+mi)/2);Ha=Nt[2*Nr],$a=Nt[2*Nr+1],Ha>=Kt&&Ha<=Pr&&$a>=Wt&&$a<=ta&&Ia.push(Jt[Nr]);var Or=(ai+1)%2;(ai===0?Kt<=Ha:Wt<=$a)&&(ra.push(xt),ra.push(Nr-1),ra.push(Or)),(ai===0?Pr>=Ha:ta>=$a)&&(ra.push(Nr+1),ra.push(mi),ra.push(Or))}return Ia}function ie(Jt,Nt,Kt,Wt,Pr,ta){for(var ma=[0,Jt.length-1,0],ra=[],Ia=Pr*Pr;ma.length;){var Ha=ma.pop(),$a=ma.pop(),ai=ma.pop();if($a-ai<=ta){for(var mi=ai;mi<=$a;mi++)j(Nt[2*mi],Nt[2*mi+1],Kt,Wt)<=Ia&&ra.push(Jt[mi]);continue}var xt=Math.floor((ai+$a)/2),ct=Nt[2*xt],Nr=Nt[2*xt+1];j(ct,Nr,Kt,Wt)<=Ia&&ra.push(Jt[xt]);var Or=(Ha+1)%2;(Ha===0?Kt-Pr<=ct:Wt-Pr<=Nr)&&(ma.push(ai),ma.push(xt-1),ma.push(Or)),(Ha===0?Kt+Pr>=ct:Wt+Pr>=Nr)&&(ma.push(xt+1),ma.push($a),ma.push(Or))}return ra}function j(Jt,Nt,Kt,Wt){var Pr=Jt-Kt,ta=Nt-Wt;return Pr*Pr+ta*ta}var ee=function(Jt){return Jt[0]},re=function(Jt){return Jt[1]},ce=function(Nt,Kt,Wt,Pr,ta){Kt===void 0&&(Kt=ee),Wt===void 0&&(Wt=re),Pr===void 0&&(Pr=64),ta===void 0&&(ta=Float64Array),this.nodeSize=Pr,this.points=Nt;for(var ma=Nt.length<65536?Uint16Array:Uint32Array,ra=this.ids=new ma(Nt.length),Ia=this.coords=new ta(Nt.length*2),Ha=0;Ha<Nt.length;Ha++)ra[Ha]=Ha,Ia[2*Ha]=Kt(Nt[Ha]),Ia[2*Ha+1]=Wt(Nt[Ha]);G(ra,Ia,Pr,0,ra.length-1,0)};ce.prototype.range=function(Nt,Kt,Wt,Pr){return oe(this.ids,this.coords,Nt,Kt,Wt,Pr,this.nodeSize)},ce.prototype.within=function(Nt,Kt,Wt){return ie(this.ids,this.coords,Nt,Kt,Wt,this.nodeSize)};var be={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Jt){return Jt}},Ae=function(Nt){this.options=_e(Object.create(be),Nt),this.trees=new Array(this.options.maxZoom+1)};Ae.prototype.load=function(Nt){var Kt=this.options,Wt=Kt.log,Pr=Kt.minZoom,ta=Kt.maxZoom,ma=Kt.nodeSize;Wt&&console.time("total time");var ra="prepare "+Nt.length+" points";Wt&&console.time(ra),this.points=Nt;for(var Ia=[],Ha=0;Ha<Nt.length;Ha++)Nt[Ha].geometry&&Ia.push(Re(Nt[Ha],Ha));this.trees[ta+1]=new ce(Ia,fe,Fe,ma,Float32Array),Wt&&console.timeEnd(ra);for(var $a=ta;$a>=Pr;$a--){var ai=+Date.now();Ia=this._cluster(Ia,$a),this.trees[$a]=new ce(Ia,fe,Fe,ma,Float32Array),Wt&&console.log("z%d: %d clusters in %dms",$a,Ia.length,+Date.now()-ai)}return Wt&&console.timeEnd("total time"),this},Ae.prototype.getClusters=function(Nt,Kt){var Wt=((Nt[0]+180)%360+360)%360-180,Pr=Math.max(-90,Math.min(90,Nt[1])),ta=Nt[2]===180?180:((Nt[2]+180)%360+360)%360-180,ma=Math.max(-90,Math.min(90,Nt[3]));if(Nt[2]-Nt[0]>=360)Wt=-180,ta=180;else if(Wt>ta){var ra=this.getClusters([Wt,Pr,180,ma],Kt),Ia=this.getClusters([-180,Pr,ta,ma],Kt);return ra.concat(Ia)}for(var Ha=this.trees[this._limitZoom(Kt)],$a=Ha.range(ot(Wt),tt(ma),ot(ta),tt(Pr)),ai=[],mi=0,xt=$a;mi<xt.length;mi+=1){var ct=xt[mi],Nr=Ha.points[ct];ai.push(Nr.numPoints?Xe(Nr):this.points[Nr.index])}return ai},Ae.prototype.getChildren=function(Nt){var Kt=this._getOriginId(Nt),Wt=this._getOriginZoom(Nt),Pr="No cluster with the specified id.",ta=this.trees[Wt];if(!ta)throw new Error(Pr);var ma=ta.points[Kt];if(!ma)throw new Error(Pr);for(var ra=this.options.radius/(this.options.extent*Math.pow(2,Wt-1)),Ia=ta.within(ma.x,ma.y,ra),Ha=[],$a=0,ai=Ia;$a<ai.length;$a+=1){var mi=ai[$a],xt=ta.points[mi];xt.parentId===Nt&&Ha.push(xt.numPoints?Xe(xt):this.points[xt.index])}if(Ha.length===0)throw new Error(Pr);return Ha},Ae.prototype.getLeaves=function(Nt,Kt,Wt){Kt=Kt||10,Wt=Wt||0;var Pr=[];return this._appendLeaves(Pr,Nt,Kt,Wt,0),Pr},Ae.prototype.getTile=function(Nt,Kt,Wt){var Pr=this.trees[this._limitZoom(Nt)],ta=Math.pow(2,Nt),ma=this.options,ra=ma.extent,Ia=ma.radius,Ha=Ia/ra,$a=(Wt-Ha)/ta,ai=(Wt+1+Ha)/ta,mi={features:[]};return this._addTileFeatures(Pr.range((Kt-Ha)/ta,$a,(Kt+1+Ha)/ta,ai),Pr.points,Kt,Wt,ta,mi),Kt===0&&this._addTileFeatures(Pr.range(1-Ha/ta,$a,1,ai),Pr.points,ta,Wt,ta,mi),Kt===ta-1&&this._addTileFeatures(Pr.range(0,$a,Ha/ta,ai),Pr.points,-1,Wt,ta,mi),mi.features.length?mi:null},Ae.prototype.getClusterExpansionZoom=function(Nt){for(var Kt=this._getOriginZoom(Nt)-1;Kt<=this.options.maxZoom;){var Wt=this.getChildren(Nt);if(Kt++,Wt.length!==1)break;Nt=Wt[0].properties.cluster_id}return Kt},Ae.prototype._appendLeaves=function(Nt,Kt,Wt,Pr,ta){for(var ma=this.getChildren(Kt),ra=0,Ia=ma;ra<Ia.length;ra+=1){var Ha=Ia[ra],$a=Ha.properties;if($a&&$a.cluster?ta+$a.point_count<=Pr?ta+=$a.point_count:ta=this._appendLeaves(Nt,$a.cluster_id,Wt,Pr,ta):ta<Pr?ta++:Nt.push(Ha),Nt.length===Wt)break}return ta},Ae.prototype._addTileFeatures=function(Nt,Kt,Wt,Pr,ta,ma){for(var ra=0,Ia=Nt;ra<Ia.length;ra+=1){var Ha=Ia[ra],$a=Kt[Ha],ai=$a.numPoints,mi={type:1,geometry:[[Math.round(this.options.extent*($a.x*ta-Wt)),Math.round(this.options.extent*($a.y*ta-Pr))]],tags:ai?it($a):this.points[$a.index].properties},xt=void 0;ai?xt=$a.id:this.options.generateId?xt=$a.index:this.points[$a.index].id&&(xt=this.points[$a.index].id),xt!==void 0&&(mi.id=xt),ma.features.push(mi)}},Ae.prototype._limitZoom=function(Nt){return Math.max(this.options.minZoom,Math.min(+Nt,this.options.maxZoom+1))},Ae.prototype._cluster=function(Nt,Kt){for(var Wt=[],Pr=this.options,ta=Pr.radius,ma=Pr.extent,ra=Pr.reduce,Ia=Pr.minPoints,Ha=ta/(ma*Math.pow(2,Kt)),$a=0;$a<Nt.length;$a++){var ai=Nt[$a];if(!(ai.zoom<=Kt)){ai.zoom=Kt;for(var mi=this.trees[Kt+1],xt=mi.within(ai.x,ai.y,Ha),ct=ai.numPoints||1,Nr=ct,Or=0,Rr=xt;Or<Rr.length;Or+=1){var Lr=Rr[Or],Gr=mi.points[Lr];Gr.zoom>Kt&&(Nr+=Gr.numPoints||1)}if(Nr>=Ia){for(var Kr=ai.x*ct,Ur=ai.y*ct,aa=ra&&ct>1?this._map(ai,!0):null,da=($a<<5)+(Kt+1)+this.points.length,fa=0,It=xt;fa<It.length;fa+=1){var dr=It[fa],kr=mi.points[dr];if(!(kr.zoom<=Kt)){kr.zoom=Kt;var ia=kr.numPoints||1;Kr+=kr.x*ia,Ur+=kr.y*ia,kr.parentId=da,ra&&(aa||(aa=this._map(ai,!0)),ra(aa,this._map(kr)))}}ai.parentId=da,Wt.push(ze(Kr/Nr,Ur/Nr,da,Nr,aa))}else if(Wt.push(ai),Nr>1)for(var Ca=0,Fa=xt;Ca<Fa.length;Ca+=1){var Ya=Fa[Ca],ha=mi.points[Ya];ha.zoom<=Kt||(ha.zoom=Kt,Wt.push(ha))}}}return Wt},Ae.prototype._getOriginId=function(Nt){return Nt-this.points.length>>5},Ae.prototype._getOriginZoom=function(Nt){return(Nt-this.points.length)%32},Ae.prototype._map=function(Nt,Kt){if(Nt.numPoints)return Kt?_e({},Nt.properties):Nt.properties;var Wt=this.points[Nt.index].properties,Pr=this.options.map(Wt);return Kt&&Pr===Wt?_e({},Pr):Pr};function ze(Jt,Nt,Kt,Wt,Pr){return{x:Jt,y:Nt,zoom:1/0,id:Kt,parentId:-1,numPoints:Wt,properties:Pr}}function Re(Jt,Nt){var Kt=Jt.geometry.coordinates,Wt=Kt[0],Pr=Kt[1];return{x:ot(Wt),y:tt(Pr),zoom:1/0,index:Nt,parentId:-1}}function Xe(Jt){return{type:"Feature",id:Jt.id,properties:it(Jt),geometry:{type:"Point",coordinates:[lt(Jt.x),Ee(Jt.y)]}}}function it(Jt){var Nt=Jt.numPoints,Kt=Nt>=1e4?Math.round(Nt/1e3)+"k":Nt>=1e3?Math.round(Nt/100)/10+"k":Nt;return _e(_e({},Jt.properties),{cluster:!0,cluster_id:Jt.id,point_count:Nt,point_count_abbreviated:Kt})}function ot(Jt){return Jt/360+.5}function tt(Jt){var Nt=Math.sin(Jt*Math.PI/180),Kt=.5-.25*Math.log((1+Nt)/(1-Nt))/Math.PI;return Kt<0?0:Kt>1?1:Kt}function lt(Jt){return(Jt-.5)*360}function Ee(Jt){var Nt=(180-Jt*360)*Math.PI/180;return 360*Math.atan(Math.exp(Nt))/Math.PI-90}function _e(Jt,Nt){for(var Kt in Nt)Jt[Kt]=Nt[Kt];return Jt}function fe(Jt){return Jt.x}function Fe(Jt){return Jt.y}function rt(Jt,Nt,Kt,Wt){for(var Pr=Wt,ta=Kt-Nt>>1,ma=Kt-Nt,ra,Ia=Jt[Nt],Ha=Jt[Nt+1],$a=Jt[Kt],ai=Jt[Kt+1],mi=Nt+3;mi<Kt;mi+=3){var xt=st(Jt[mi],Jt[mi+1],Ia,Ha,$a,ai);if(xt>Pr)ra=mi,Pr=xt;else if(xt===Pr){var ct=Math.abs(mi-ta);ct<ma&&(ra=mi,ma=ct)}}Pr>Wt&&(ra-Nt>3&&rt(Jt,Nt,ra,Wt),Jt[ra+2]=Pr,Kt-ra>3&&rt(Jt,ra,Kt,Wt))}function st(Jt,Nt,Kt,Wt,Pr,ta){var ma=Pr-Kt,ra=ta-Wt;if(ma!==0||ra!==0){var Ia=((Jt-Kt)*ma+(Nt-Wt)*ra)/(ma*ma+ra*ra);Ia>1?(Kt=Pr,Wt=ta):Ia>0&&(Kt+=ma*Ia,Wt+=ra*Ia)}return ma=Jt-Kt,ra=Nt-Wt,ma*ma+ra*ra}function Qe(Jt,Nt,Kt,Wt){var Pr={id:typeof Jt>"u"?null:Jt,type:Nt,geometry:Kt,tags:Wt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Lt(Pr),Pr}function Lt(Jt){var Nt=Jt.geometry,Kt=Jt.type;if(Kt==="Point"||Kt==="MultiPoint"||Kt==="LineString")kt(Jt,Nt);else if(Kt==="Polygon"||Kt==="MultiLineString")for(var Wt=0;Wt<Nt.length;Wt++)kt(Jt,Nt[Wt]);else if(Kt==="MultiPolygon")for(Wt=0;Wt<Nt.length;Wt++)for(var Pr=0;Pr<Nt[Wt].length;Pr++)kt(Jt,Nt[Wt][Pr])}function kt(Jt,Nt){for(var Kt=0;Kt<Nt.length;Kt+=3)Jt.minX=Math.min(Jt.minX,Nt[Kt]),Jt.minY=Math.min(Jt.minY,Nt[Kt+1]),Jt.maxX=Math.max(Jt.maxX,Nt[Kt]),Jt.maxY=Math.max(Jt.maxY,Nt[Kt+1])}function Vt(Jt,Nt){var Kt=[];if(Jt.type==="FeatureCollection")for(var Wt=0;Wt<Jt.features.length;Wt++)Zt(Kt,Jt.features[Wt],Nt,Wt);else Jt.type==="Feature"?Zt(Kt,Jt,Nt):Zt(Kt,{geometry:Jt},Nt);return Kt}function Zt(Jt,Nt,Kt,Wt){if(Nt.geometry){var Pr=Nt.geometry.coordinates,ta=Nt.geometry.type,ma=Math.pow(Kt.tolerance/((1<<Kt.maxZoom)*Kt.extent),2),ra=[],Ia=Nt.id;if(Kt.promoteId?Ia=Nt.properties[Kt.promoteId]:Kt.generateId&&(Ia=Wt||0),ta==="Point")Sr(Pr,ra);else if(ta==="MultiPoint")for(var Ha=0;Ha<Pr.length;Ha++)Sr(Pr[Ha],ra);else if(ta==="LineString")xr(Pr,ra,ma,!1);else if(ta==="MultiLineString")if(Kt.lineMetrics){for(Ha=0;Ha<Pr.length;Ha++)ra=[],xr(Pr[Ha],ra,ma,!1),Jt.push(Qe(Ia,"LineString",ra,Nt.properties));return}else jr(Pr,ra,ma,!1);else if(ta==="Polygon")jr(Pr,ra,ma,!0);else if(ta==="MultiPolygon")for(Ha=0;Ha<Pr.length;Ha++){var $a=[];jr(Pr[Ha],$a,ma,!0),ra.push($a)}else if(ta==="GeometryCollection"){for(Ha=0;Ha<Nt.geometry.geometries.length;Ha++)Zt(Jt,{id:Ia,geometry:Nt.geometry.geometries[Ha],properties:Nt.properties},Kt,Wt);return}else throw new Error("Input data is not a valid GeoJSON object.");Jt.push(Qe(Ia,ta,ra,Nt.properties))}}function Sr(Jt,Nt){Nt.push(wr(Jt[0])),Nt.push(Ir(Jt[1])),Nt.push(0)}function xr(Jt,Nt,Kt,Wt){for(var Pr,ta,ma=0,ra=0;ra<Jt.length;ra++){var Ia=wr(Jt[ra][0]),Ha=Ir(Jt[ra][1]);Nt.push(Ia),Nt.push(Ha),Nt.push(0),ra>0&&(Wt?ma+=(Pr*Ha-Ia*ta)/2:ma+=Math.sqrt(Math.pow(Ia-Pr,2)+Math.pow(Ha-ta,2))),Pr=Ia,ta=Ha}var $a=Nt.length-3;Nt[2]=1,rt(Nt,0,$a,Kt),Nt[$a+2]=1,Nt.size=Math.abs(ma),Nt.start=0,Nt.end=Nt.size}function jr(Jt,Nt,Kt,Wt){for(var Pr=0;Pr<Jt.length;Pr++){var ta=[];xr(Jt[Pr],ta,Kt,Wt),Nt.push(ta)}}function wr(Jt){return Jt/360+.5}function Ir(Jt){var Nt=Math.sin(Jt*Math.PI/180),Kt=.5-.25*Math.log((1+Nt)/(1-Nt))/Math.PI;return Kt<0?0:Kt>1?1:Kt}function bt(Jt,Nt,Kt,Wt,Pr,ta,ma,ra){if(Kt/=Nt,Wt/=Nt,ta>=Kt&&ma<Wt)return Jt;if(ma<Kt||ta>=Wt)return null;for(var Ia=[],Ha=0;Ha<Jt.length;Ha++){var $a=Jt[Ha],ai=$a.geometry,mi=$a.type,xt=Pr===0?$a.minX:$a.minY,ct=Pr===0?$a.maxX:$a.maxY;if(xt>=Kt&&ct<Wt){Ia.push($a);continue}else if(ct<Kt||xt>=Wt)continue;var Nr=[];if(mi==="Point"||mi==="MultiPoint")Be(ai,Nr,Kt,Wt,Pr);else if(mi==="LineString")Ke(ai,Nr,Kt,Wt,Pr,!1,ra.lineMetrics);else if(mi==="MultiLineString")Me(ai,Nr,Kt,Wt,Pr,!1);else if(mi==="Polygon")Me(ai,Nr,Kt,Wt,Pr,!0);else if(mi==="MultiPolygon")for(var Or=0;Or<ai.length;Or++){var Rr=[];Me(ai[Or],Rr,Kt,Wt,Pr,!0),Rr.length&&Nr.push(Rr)}if(Nr.length){if(ra.lineMetrics&&mi==="LineString"){for(Or=0;Or<Nr.length;Or++)Ia.push(Qe($a.id,mi,Nr[Or],$a.tags));continue}(mi==="LineString"||mi==="MultiLineString")&&(Nr.length===1?(mi="LineString",Nr=Nr[0]):mi="MultiLineString"),(mi==="Point"||mi==="MultiPoint")&&(mi=Nr.length===3?"Point":"MultiPoint"),Ia.push(Qe($a.id,mi,Nr,$a.tags))}}return Ia.length?Ia:null}function Be(Jt,Nt,Kt,Wt,Pr){for(var ta=0;ta<Jt.length;ta+=3){var ma=Jt[ta+Pr];ma>=Kt&&ma<=Wt&&(Nt.push(Jt[ta]),Nt.push(Jt[ta+1]),Nt.push(Jt[ta+2]))}}function Ke(Jt,Nt,Kt,Wt,Pr,ta,ma){for(var ra=Ue(Jt),Ia=Pr===0?Ce:Te,Ha=Jt.start,$a,ai,mi=0;mi<Jt.length-3;mi+=3){var xt=Jt[mi],ct=Jt[mi+1],Nr=Jt[mi+2],Or=Jt[mi+3],Rr=Jt[mi+4],Lr=Pr===0?xt:ct,Gr=Pr===0?Or:Rr,Kr=!1;ma&&($a=Math.sqrt(Math.pow(xt-Or,2)+Math.pow(ct-Rr,2))),Lr<Kt?Gr>Kt&&(ai=Ia(ra,xt,ct,Or,Rr,Kt),ma&&(ra.start=Ha+$a*ai)):Lr>Wt?Gr<Wt&&(ai=Ia(ra,xt,ct,Or,Rr,Wt),ma&&(ra.start=Ha+$a*ai)):qe(ra,xt,ct,Nr),Gr<Kt&&Lr>=Kt&&(ai=Ia(ra,xt,ct,Or,Rr,Kt),Kr=!0),Gr>Wt&&Lr<=Wt&&(ai=Ia(ra,xt,ct,Or,Rr,Wt),Kr=!0),!ta&&Kr&&(ma&&(ra.end=Ha+$a*ai),Nt.push(ra),ra=Ue(Jt)),ma&&(Ha+=$a)}var Ur=Jt.length-3;xt=Jt[Ur],ct=Jt[Ur+1],Nr=Jt[Ur+2],Lr=Pr===0?xt:ct,Lr>=Kt&&Lr<=Wt&&qe(ra,xt,ct,Nr),Ur=ra.length-3,ta&&Ur>=3&&(ra[Ur]!==ra[0]||ra[Ur+1]!==ra[1])&&qe(ra,ra[0],ra[1],ra[2]),ra.length&&Nt.push(ra)}function Ue(Jt){var Nt=[];return Nt.size=Jt.size,Nt.start=Jt.start,Nt.end=Jt.end,Nt}function Me(Jt,Nt,Kt,Wt,Pr,ta){for(var ma=0;ma<Jt.length;ma++)Ke(Jt[ma],Nt,Kt,Wt,Pr,ta,!1)}function qe(Jt,Nt,Kt,Wt){Jt.push(Nt),Jt.push(Kt),Jt.push(Wt)}function Ce(Jt,Nt,Kt,Wt,Pr,ta){var ma=(ta-Nt)/(Wt-Nt);return Jt.push(ta),Jt.push(Kt+(Pr-Kt)*ma),Jt.push(1),ma}function Te(Jt,Nt,Kt,Wt,Pr,ta){var ma=(ta-Kt)/(Pr-Kt);return Jt.push(Nt+(Wt-Nt)*ma),Jt.push(ta),Jt.push(1),ma}function Pe(Jt,Nt){var Kt=Nt.buffer/Nt.extent,Wt=Jt,Pr=bt(Jt,1,-1-Kt,Kt,0,-1,2,Nt),ta=bt(Jt,1,1-Kt,2+Kt,0,-1,2,Nt);return(Pr||ta)&&(Wt=bt(Jt,1,-Kt,1+Kt,0,-1,2,Nt)||[],Pr&&(Wt=at(Pr,1).concat(Wt)),ta&&(Wt=Wt.concat(at(ta,-1)))),Wt}function at(Jt,Nt){for(var Kt=[],Wt=0;Wt<Jt.length;Wt++){var Pr=Jt[Wt],ta=Pr.type,ma;if(ta==="Point"||ta==="MultiPoint"||ta==="LineString")ma=yt(Pr.geometry,Nt);else if(ta==="MultiLineString"||ta==="Polygon"){ma=[];for(var ra=0;ra<Pr.geometry.length;ra++)ma.push(yt(Pr.geometry[ra],Nt))}else if(ta==="MultiPolygon")for(ma=[],ra=0;ra<Pr.geometry.length;ra++){for(var Ia=[],Ha=0;Ha<Pr.geometry[ra].length;Ha++)Ia.push(yt(Pr.geometry[ra][Ha],Nt));ma.push(Ia)}Kt.push(Qe(Pr.id,ta,ma,Pr.tags))}return Kt}function yt(Jt,Nt){var Kt=[];Kt.size=Jt.size,Jt.start!==void 0&&(Kt.start=Jt.start,Kt.end=Jt.end);for(var Wt=0;Wt<Jt.length;Wt+=3)Kt.push(Jt[Wt]+Nt,Jt[Wt+1],Jt[Wt+2]);return Kt}function Tt(Jt,Nt){if(Jt.transformed)return Jt;var Kt=1<<Jt.z,Wt=Jt.x,Pr=Jt.y,ta,ma,ra;for(ta=0;ta<Jt.features.length;ta++){var Ia=Jt.features[ta],Ha=Ia.geometry,$a=Ia.type;if(Ia.geometry=[],$a===1)for(ma=0;ma<Ha.length;ma+=2)Ia.geometry.push(Ot(Ha[ma],Ha[ma+1],Nt,Kt,Wt,Pr));else for(ma=0;ma<Ha.length;ma++){var ai=[];for(ra=0;ra<Ha[ma].length;ra+=2)ai.push(Ot(Ha[ma][ra],Ha[ma][ra+1],Nt,Kt,Wt,Pr));Ia.geometry.push(ai)}}return Jt.transformed=!0,Jt}function Ot(Jt,Nt,Kt,Wt,Pr,ta){return[Math.round(Kt*(Jt*Wt-Pr)),Math.round(Kt*(Nt*Wt-ta))]}function Gt(Jt,Nt,Kt,Wt,Pr){for(var ta=Nt===Pr.maxZoom?0:Pr.tolerance/((1<<Nt)*Pr.extent),ma={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Kt,y:Wt,z:Nt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},ra=0;ra<Jt.length;ra++){ma.numFeatures++,rr(ma,Jt[ra],ta,Pr);var Ia=Jt[ra].minX,Ha=Jt[ra].minY,$a=Jt[ra].maxX,ai=Jt[ra].maxY;Ia<ma.minX&&(ma.minX=Ia),Ha<ma.minY&&(ma.minY=Ha),$a>ma.maxX&&(ma.maxX=$a),ai>ma.maxY&&(ma.maxY=ai)}return ma}function rr(Jt,Nt,Kt,Wt){var Pr=Nt.geometry,ta=Nt.type,ma=[];if(ta==="Point"||ta==="MultiPoint")for(var ra=0;ra<Pr.length;ra+=3)ma.push(Pr[ra]),ma.push(Pr[ra+1]),Jt.numPoints++,Jt.numSimplified++;else if(ta==="LineString")Qt(ma,Pr,Jt,Kt,!1,!1);else if(ta==="MultiLineString"||ta==="Polygon")for(ra=0;ra<Pr.length;ra++)Qt(ma,Pr[ra],Jt,Kt,ta==="Polygon",ra===0);else if(ta==="MultiPolygon")for(var Ia=0;Ia<Pr.length;Ia++){var Ha=Pr[Ia];for(ra=0;ra<Ha.length;ra++)Qt(ma,Ha[ra],Jt,Kt,!0,ra===0)}if(ma.length){var $a=Nt.tags||null;if(ta==="LineString"&&Wt.lineMetrics){$a={};for(var ai in Nt.tags)$a[ai]=Nt.tags[ai];$a.mapbox_clip_start=Pr.start/Pr.size,$a.mapbox_clip_end=Pr.end/Pr.size}var mi={geometry:ma,type:ta==="Polygon"||ta==="MultiPolygon"?3:ta==="LineString"||ta==="MultiLineString"?2:1,tags:$a};Nt.id!==null&&(mi.id=Nt.id),Jt.features.push(mi)}}function Qt(Jt,Nt,Kt,Wt,Pr,ta){var ma=Wt*Wt;if(Wt>0&&Nt.size<(Pr?ma:Wt)){Kt.numPoints+=Nt.length/3;return}for(var ra=[],Ia=0;Ia<Nt.length;Ia+=3)(Wt===0||Nt[Ia+2]>ma)&&(Kt.numSimplified++,ra.push(Nt[Ia]),ra.push(Nt[Ia+1])),Kt.numPoints++;Pr&&Tr(ra,ta),Jt.push(ra)}function Tr(Jt,Nt){for(var Kt=0,Wt=0,Pr=Jt.length,ta=Pr-2;Wt<Pr;ta=Wt,Wt+=2)Kt+=(Jt[Wt]-Jt[ta])*(Jt[Wt+1]+Jt[ta+1]);if(Kt>0===Nt)for(Wt=0,Pr=Jt.length;Wt<Pr/2;Wt+=2){var ma=Jt[Wt],ra=Jt[Wt+1];Jt[Wt]=Jt[Pr-2-Wt],Jt[Wt+1]=Jt[Pr-1-Wt],Jt[Pr-2-Wt]=ma,Jt[Pr-1-Wt]=ra}}function la(Jt,Nt){return new Ua(Jt,Nt)}function Ua(Jt,Nt){Nt=this.options=Ra(Object.create(this.options),Nt);var Kt=Nt.debug;if(Kt&&console.time("preprocess data"),Nt.maxZoom<0||Nt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Nt.promoteId&&Nt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Wt=Vt(Jt,Nt);this.tiles={},this.tileCoords=[],Kt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Nt.indexMaxZoom,Nt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Wt=Pe(Wt,Nt),Wt.length&&this.splitTile(Wt,0,0,0),Kt&&(Wt.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)))}Ua.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ua.prototype.splitTile=function(Jt,Nt,Kt,Wt,Pr,ta,ma){for(var ra=[Jt,Nt,Kt,Wt],Ia=this.options,Ha=Ia.debug;ra.length;){Wt=ra.pop(),Kt=ra.pop(),Nt=ra.pop(),Jt=ra.pop();var $a=1<<Nt,ai=Ba(Nt,Kt,Wt),mi=this.tiles[ai];if(!mi&&(Ha>1&&console.time("creation"),mi=this.tiles[ai]=Gt(Jt,Nt,Kt,Wt,Ia),this.tileCoords.push({z:Nt,x:Kt,y:Wt}),Ha)){Ha>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Nt,Kt,Wt,mi.numFeatures,mi.numPoints,mi.numSimplified),console.timeEnd("creation"));var xt="z"+Nt;this.stats[xt]=(this.stats[xt]||0)+1,this.total++}if(mi.source=Jt,Pr){if(Nt===Ia.maxZoom||Nt===Pr)continue;var ct=1<<Pr-Nt;if(Kt!==Math.floor(ta/ct)||Wt!==Math.floor(ma/ct))continue}else if(Nt===Ia.indexMaxZoom||mi.numPoints<=Ia.indexMaxPoints)continue;if(mi.source=null,Jt.length!==0){Ha>1&&console.time("clipping");var Nr=.5*Ia.buffer/Ia.extent,Or=.5-Nr,Rr=.5+Nr,Lr=1+Nr,Gr,Kr,Ur,aa,da,fa;Gr=Kr=Ur=aa=null,da=bt(Jt,$a,Kt-Nr,Kt+Rr,0,mi.minX,mi.maxX,Ia),fa=bt(Jt,$a,Kt+Or,Kt+Lr,0,mi.minX,mi.maxX,Ia),Jt=null,da&&(Gr=bt(da,$a,Wt-Nr,Wt+Rr,1,mi.minY,mi.maxY,Ia),Kr=bt(da,$a,Wt+Or,Wt+Lr,1,mi.minY,mi.maxY,Ia),da=null),fa&&(Ur=bt(fa,$a,Wt-Nr,Wt+Rr,1,mi.minY,mi.maxY,Ia),aa=bt(fa,$a,Wt+Or,Wt+Lr,1,mi.minY,mi.maxY,Ia),fa=null),Ha>1&&console.timeEnd("clipping"),ra.push(Gr||[],Nt+1,Kt*2,Wt*2),ra.push(Kr||[],Nt+1,Kt*2,Wt*2+1),ra.push(Ur||[],Nt+1,Kt*2+1,Wt*2),ra.push(aa||[],Nt+1,Kt*2+1,Wt*2+1)}}},Ua.prototype.getTile=function(Jt,Nt,Kt){var Wt=this.options,Pr=Wt.extent,ta=Wt.debug;if(Jt<0||Jt>24)return null;var ma=1<<Jt;Nt=(Nt%ma+ma)%ma;var ra=Ba(Jt,Nt,Kt);if(this.tiles[ra])return Tt(this.tiles[ra],Pr);ta>1&&console.log("drilling down to z%d-%d-%d",Jt,Nt,Kt);for(var Ia=Jt,Ha=Nt,$a=Kt,ai;!ai&&Ia>0;)Ia--,Ha=Math.floor(Ha/2),$a=Math.floor($a/2),ai=this.tiles[Ba(Ia,Ha,$a)];return!ai||!ai.source?null:(ta>1&&console.log("found parent tile z%d-%d-%d",Ia,Ha,$a),ta>1&&console.time("drilling down"),this.splitTile(ai.source,Ia,Ha,$a,Jt,Nt,Kt),ta>1&&console.timeEnd("drilling down"),this.tiles[ra]?Tt(this.tiles[ra],Pr):null)};function Ba(Jt,Nt,Kt){return((1<<Jt)*Kt+Nt)*32+Jt}function Ra(Jt,Nt){for(var Kt in Nt)Jt[Kt]=Nt[Kt];return Jt}function ei(Jt,Nt){var Kt=Jt.tileID.canonical;if(!this._geoJSONIndex)return Nt(null,null);var Wt=this._geoJSONIndex.getTile(Kt.z,Kt.x,Kt.y);if(!Wt)return Nt(null,null);var Pr=new b(Wt.features),ta=P(Pr);(ta.byteOffset!==0||ta.byteLength!==ta.buffer.byteLength)&&(ta=new Uint8Array(ta)),Nt(null,{vectorTile:Pr,rawData:ta.buffer})}var za=function(Jt){function Nt(Kt,Wt,Pr,ta){Jt.call(this,Kt,Wt,Pr,ei),ta&&(this.loadGeoJSON=ta)}return Jt&&(Nt.__proto__=Jt),Nt.prototype=Object.create(Jt&&Jt.prototype),Nt.prototype.constructor=Nt,Nt.prototype.loadData=function(Wt,Pr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Pr,this._pendingLoadDataParams=Wt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Nt.prototype._loadData=function(){var Wt=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var Pr=this._pendingCallback,ta=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var ma=ta&&ta.request&&ta.request.collectResourceTiming?new e.RequestPerformance(ta.request):!1;this.loadGeoJSON(ta,function(ra,Ia){if(ra||!Ia)return Pr(ra);if(typeof Ia!="object")return Pr(new Error("Input data given to '"+ta.source+"' is not a valid GeoJSON object."));l(Ia,!0);try{if(ta.filter){var Ha=e.createExpression(ta.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ha.result==="error")throw new Error(Ha.value.map(function(xt){return xt.key+": "+xt.message}).join(", "));var $a=Ia.features.filter(function(xt){return Ha.value.evaluate({zoom:0},xt)});Ia={type:"FeatureCollection",features:$a}}Wt._geoJSONIndex=ta.cluster?new Ae(ti(ta)).load(Ia.features):la(Ia,ta.geojsonVtOptions)}catch(xt){return Pr(xt)}Wt.loaded={};var ai={};if(ma){var mi=ma.finish();mi&&(ai.resourceTiming={},ai.resourceTiming[ta.source]=JSON.parse(JSON.stringify(mi)))}Pr(null,ai)})}},Nt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Nt.prototype.reloadTile=function(Wt,Pr){var ta=this.loaded,ma=Wt.uid;return ta&&ta[ma]?Jt.prototype.reloadTile.call(this,Wt,Pr):this.loadTile(Wt,Pr)},Nt.prototype.loadGeoJSON=function(Wt,Pr){if(Wt.request)e.getJSON(Wt.request,Pr);else if(typeof Wt.data=="string")try{return Pr(null,JSON.parse(Wt.data))}catch{return Pr(new Error("Input data given to '"+Wt.source+"' is not a valid GeoJSON object."))}else return Pr(new Error("Input data given to '"+Wt.source+"' is not a valid GeoJSON object."))},Nt.prototype.removeSource=function(Wt,Pr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Pr()},Nt.prototype.getClusterExpansionZoom=function(Wt,Pr){try{Pr(null,this._geoJSONIndex.getClusterExpansionZoom(Wt.clusterId))}catch(ta){Pr(ta)}},Nt.prototype.getClusterChildren=function(Wt,Pr){try{Pr(null,this._geoJSONIndex.getChildren(Wt.clusterId))}catch(ta){Pr(ta)}},Nt.prototype.getClusterLeaves=function(Wt,Pr){try{Pr(null,this._geoJSONIndex.getLeaves(Wt.clusterId,Wt.limit,Wt.offset))}catch(ta){Pr(ta)}},Nt}(g);function ti(Jt){var Nt=Jt.superclusterOptions,Kt=Jt.clusterProperties;if(!Kt||!Nt)return Nt;for(var Wt={},Pr={},ta={accumulated:null,zoom:0},ma={properties:null},ra=Object.keys(Kt),Ia=0,Ha=ra;Ia<Ha.length;Ia+=1){var $a=Ha[Ia],ai=Kt[$a],mi=ai[0],xt=ai[1],ct=e.createExpression(xt),Nr=e.createExpression(typeof mi=="string"?[mi,["accumulated"],["get",$a]]:mi);Wt[$a]=ct.value,Pr[$a]=Nr.value}return Nt.map=function(Or){ma.properties=Or;for(var Rr={},Lr=0,Gr=ra;Lr<Gr.length;Lr+=1){var Kr=Gr[Lr];Rr[Kr]=Wt[Kr].evaluate(ta,ma)}return Rr},Nt.reduce=function(Or,Rr){ma.properties=Rr;for(var Lr=0,Gr=ra;Lr<Gr.length;Lr+=1){var Kr=Gr[Lr];ta.accumulated=Or[Kr],Or[Kr]=Pr[Kr].evaluate(ta,ma)}},Nt}var Ci=function(Nt){var Kt=this;this.self=Nt,this.actor=new e.Actor(Nt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:g,geojson:za},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Wt,Pr){if(Kt.workerSourceTypes[Wt])throw new Error('Worker source with name "'+Wt+'" already registered.');Kt.workerSourceTypes[Wt]=Pr},this.self.registerRTLTextPlugin=function(Wt){if(e.plugin.isParsed())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=Wt.applyArabicShaping,e.plugin.processBidirectionalText=Wt.processBidirectionalText,e.plugin.processStyledBidirectionalText=Wt.processStyledBidirectionalText}};return Ci.prototype.setReferrer=function(Nt,Kt){this.referrer=Kt},Ci.prototype.setImages=function(Nt,Kt,Wt){this.availableImages[Nt]=Kt;for(var Pr in this.workerSources[Nt]){var ta=this.workerSources[Nt][Pr];for(var ma in ta)ta[ma].availableImages=Kt}Wt()},Ci.prototype.setLayers=function(Nt,Kt,Wt){this.getLayerIndex(Nt).replace(Kt),Wt()},Ci.prototype.updateLayers=function(Nt,Kt,Wt){this.getLayerIndex(Nt).update(Kt.layers,Kt.removedIds),Wt()},Ci.prototype.loadTile=function(Nt,Kt,Wt){this.getWorkerSource(Nt,Kt.type,Kt.source).loadTile(Kt,Wt)},Ci.prototype.loadDEMTile=function(Nt,Kt,Wt){this.getDEMWorkerSource(Nt,Kt.source).loadTile(Kt,Wt)},Ci.prototype.reloadTile=function(Nt,Kt,Wt){this.getWorkerSource(Nt,Kt.type,Kt.source).reloadTile(Kt,Wt)},Ci.prototype.abortTile=function(Nt,Kt,Wt){this.getWorkerSource(Nt,Kt.type,Kt.source).abortTile(Kt,Wt)},Ci.prototype.removeTile=function(Nt,Kt,Wt){this.getWorkerSource(Nt,Kt.type,Kt.source).removeTile(Kt,Wt)},Ci.prototype.removeDEMTile=function(Nt,Kt){this.getDEMWorkerSource(Nt,Kt.source).removeTile(Kt)},Ci.prototype.removeSource=function(Nt,Kt,Wt){if(!(!this.workerSources[Nt]||!this.workerSources[Nt][Kt.type]||!this.workerSources[Nt][Kt.type][Kt.source])){var Pr=this.workerSources[Nt][Kt.type][Kt.source];delete this.workerSources[Nt][Kt.type][Kt.source],Pr.removeSource!==void 0?Pr.removeSource(Kt,Wt):Wt()}},Ci.prototype.loadWorkerSource=function(Nt,Kt,Wt){try{this.self.importScripts(Kt.url),Wt()}catch(Pr){Wt(Pr.toString())}},Ci.prototype.syncRTLPluginState=function(Nt,Kt,Wt){try{e.plugin.setState(Kt);var Pr=e.plugin.getPluginURL();if(e.plugin.isLoaded()&&!e.plugin.isParsed()&&Pr!=null){this.self.importScripts(Pr);var ta=e.plugin.isParsed(),ma=ta?void 0:new Error("RTL Text Plugin failed to import scripts from "+Pr);Wt(ma,ta)}}catch(ra){Wt(ra.toString())}},Ci.prototype.getAvailableImages=function(Nt){var Kt=this.availableImages[Nt];return Kt||(Kt=[]),Kt},Ci.prototype.getLayerIndex=function(Nt){var Kt=this.layerIndexes[Nt];return Kt||(Kt=this.layerIndexes[Nt]=new a),Kt},Ci.prototype.getWorkerSource=function(Nt,Kt,Wt){var Pr=this;if(this.workerSources[Nt]||(this.workerSources[Nt]={}),this.workerSources[Nt][Kt]||(this.workerSources[Nt][Kt]={}),!this.workerSources[Nt][Kt][Wt]){var ta={send:function(ma,ra,Ia){Pr.actor.send(ma,ra,Ia,Nt)}};this.workerSources[Nt][Kt][Wt]=new this.workerSourceTypes[Kt](ta,this.getLayerIndex(Nt),this.getAvailableImages(Nt))}return this.workerSources[Nt][Kt][Wt]},Ci.prototype.getDEMWorkerSource=function(Nt,Kt){return this.demWorkerSources[Nt]||(this.demWorkerSources[Nt]={}),this.demWorkerSources[Nt][Kt]||(this.demWorkerSources[Nt][Kt]=new T),this.demWorkerSources[Nt][Kt]},Ci.prototype.enforceCacheSizeLimit=function(Nt,Kt){e.enforceCacheSizeLimit(Kt)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new Ci(self)),Ci}),M(["./shared"],function(e){"use strict";var t=e.createCommonjsModule(function(ve){ve.exports?ve.exports=Y:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=Y,window.mapboxgl.notSupportedReason=ye);function Y(ir){return!ye(ir)}function ye(ir){if(!te())return"not a browser";if(!me())return"insufficent Array support";if(!Ge())return"insufficient Function support";if(!Le())return"insufficient Object support";if(!$e())return"insufficient JSON support";if(!mt())return"insufficient worker support";if(!jt())return"insufficient Uint8ClampedArray support";if(!_r())return"insufficient ArrayBuffer support";if(!Fr())return"insufficient Canvas/getImageData support";if(!gt(ir&&ir.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function te(){return typeof window<"u"&&typeof document<"u"}function me(){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 Ge(){return Function.prototype&&Function.prototype.bind}function Le(){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 $e(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function mt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var ir=new Blob([""],{type:"text/javascript"}),fr=URL.createObjectURL(ir),sr,pr;try{pr=new Worker(fr),sr=!0}catch{sr=!1}return pr&&pr.terminate(),URL.revokeObjectURL(fr),sr}function jt(){return"Uint8ClampedArray"in window}function _r(){return ArrayBuffer.isView}function Fr(){var ir=document.createElement("canvas");ir.width=ir.height=1;var fr=ir.getContext("2d");if(!fr)return!1;var sr=fr.getImageData(0,0,1,1);return sr&&sr.width===ir.width}var hr={};function gt(ir){return hr[ir]===void 0&&(hr[ir]=Ft(ir)),hr[ir]}Y.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Et(ir){var fr=document.createElement("canvas"),sr=Object.create(Y.webGLContextAttributes);return sr.failIfMajorPerformanceCaveat=ir,fr.probablySupportsContext?fr.probablySupportsContext("webgl",sr)||fr.probablySupportsContext("experimental-webgl",sr):fr.supportsContext?fr.supportsContext("webgl",sr)||fr.supportsContext("experimental-webgl",sr):fr.getContext("webgl",sr)||fr.getContext("experimental-webgl",sr)}function Ft(ir){var fr=Et(ir);if(!fr)return!1;var sr=fr.createShader(fr.VERTEX_SHADER);return!sr||fr.isContextLost()?!1:(fr.shaderSource(sr,"void main() {}"),fr.compileShader(sr),fr.getShaderParameter(sr,fr.COMPILE_STATUS)===!0)}}),r={};r.create=function(ve,Y,ye){var te=e.window.document.createElement(ve);return Y!==void 0&&(te.className=Y),ye&&ye.appendChild(te),te},r.createNS=function(ve,Y){var ye=e.window.document.createElementNS(ve,Y);return ye};var o=e.window.document&&e.window.document.documentElement.style;function a(ve){if(!o)return ve[0];for(var Y=0;Y<ve.length;Y++)if(ve[Y]in o)return ve[Y];return ve[0]}var i=a(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),n;r.disableDrag=function(){o&&i&&(n=o[i],o[i]="none")},r.enableDrag=function(){o&&i&&(o[i]=n)};var s=a(["transform","WebkitTransform"]);r.setTransform=function(ve,Y){ve.style[s]=Y};var c=!1;try{var f=Object.defineProperty({},"passive",{get:function(){c=!0}});e.window.addEventListener("test",f,f),e.window.removeEventListener("test",f,f)}catch{c=!1}r.addEventListener=function(ve,Y,ye,te){te===void 0&&(te={}),"passive"in te&&c?ve.addEventListener(Y,ye,te):ve.addEventListener(Y,ye,te.capture)},r.removeEventListener=function(ve,Y,ye,te){te===void 0&&(te={}),"passive"in te&&c?ve.removeEventListener(Y,ye,te):ve.removeEventListener(Y,ye,te.capture)};var g=function(ve){ve.preventDefault(),ve.stopPropagation(),e.window.removeEventListener("click",g,!0)};r.suppressClick=function(){e.window.addEventListener("click",g,!0),e.window.setTimeout(function(){e.window.removeEventListener("click",g,!0)},0)},r.mousePos=function(ve,Y){var ye=ve.getBoundingClientRect();return new e.Point(Y.clientX-ye.left-ve.clientLeft,Y.clientY-ye.top-ve.clientTop)},r.touchPos=function(ve,Y){for(var ye=ve.getBoundingClientRect(),te=[],me=0;me<Y.length;me++)te.push(new e.Point(Y[me].clientX-ye.left-ve.clientLeft,Y[me].clientY-ye.top-ve.clientTop));return te},r.mouseButton=function(ve){return typeof e.window.InstallTrigger<"u"&&ve.button===2&&ve.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:ve.button},r.remove=function(ve){ve.parentNode&&ve.parentNode.removeChild(ve)};function v(ve,Y,ye){var te,me,Ge,Le=e.browser.devicePixelRatio>1?"@2x":"",$e=e.getJSON(Y.transformRequest(Y.normalizeSpriteURL(ve,Le,".json"),e.ResourceType.SpriteJSON),function(_r,Fr){$e=null,Ge||(Ge=_r,te=Fr,jt())}),mt=e.getImage(Y.transformRequest(Y.normalizeSpriteURL(ve,Le,".png"),e.ResourceType.SpriteImage),function(_r,Fr){mt=null,Ge||(Ge=_r,me=Fr,jt())});function jt(){if(Ge)ye(Ge);else if(te&&me){var _r=e.browser.getImageData(me),Fr={};for(var hr in te){var gt=te[hr],Et=gt.width,Ft=gt.height,ir=gt.x,fr=gt.y,sr=gt.sdf,pr=gt.pixelRatio,lr=gt.stretchX,Xt=gt.stretchY,or=gt.content,qt=new e.RGBAImage({width:Et,height:Ft});e.RGBAImage.copy(_r,qt,{x:ir,y:fr},{x:0,y:0},{width:Et,height:Ft}),Fr[hr]={data:qt,pixelRatio:pr,sdf:sr,stretchX:lr,stretchY:Xt,content:or}}ye(null,Fr)}}return{cancel:function(){$e&&($e.cancel(),$e=null),mt&&(mt.cancel(),mt=null)}}}function T(ve){var Y=ve.userImage;if(Y&&Y.render){var ye=Y.render();if(ye)return ve.data.replace(new Uint8Array(Y.data.buffer)),!0}return!1}var l=1,_=function(ve){function Y(){ve.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.isLoaded=function(){return this.loaded},Y.prototype.setLoaded=function(te){if(this.loaded!==te&&(this.loaded=te,te)){for(var me=0,Ge=this.requestors;me<Ge.length;me+=1){var Le=Ge[me],$e=Le.ids,mt=Le.callback;this._notify($e,mt)}this.requestors=[]}},Y.prototype.getImage=function(te){return this.images[te]},Y.prototype.addImage=function(te,me){this._validate(te,me)&&(this.images[te]=me)},Y.prototype._validate=function(te,me){var Ge=!0;return this._validateStretch(me.stretchX,me.data&&me.data.width)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "stretchX" value'))),Ge=!1),this._validateStretch(me.stretchY,me.data&&me.data.height)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "stretchY" value'))),Ge=!1),this._validateContent(me.content,me)||(this.fire(new e.ErrorEvent(new Error('Image "'+te+'" has invalid "content" value'))),Ge=!1),Ge},Y.prototype._validateStretch=function(te,me){if(!te)return!0;for(var Ge=0,Le=0,$e=te;Le<$e.length;Le+=1){var mt=$e[Le];if(mt[0]<Ge||mt[1]<mt[0]||me<mt[1])return!1;Ge=mt[1]}return!0},Y.prototype._validateContent=function(te,me){return te?!(te.length!==4||te[0]<0||me.data.width<te[0]||te[1]<0||me.data.height<te[1]||te[2]<0||me.data.width<te[2]||te[3]<0||me.data.height<te[3]||te[2]<te[0]||te[3]<te[1]):!0},Y.prototype.updateImage=function(te,me){var Ge=this.images[te];me.version=Ge.version+1,this.images[te]=me,this.updatedImages[te]=!0},Y.prototype.removeImage=function(te){var me=this.images[te];delete this.images[te],delete this.patterns[te],me.userImage&&me.userImage.onRemove&&me.userImage.onRemove()},Y.prototype.listImages=function(){return Object.keys(this.images)},Y.prototype.getImages=function(te,me){var Ge=!0;if(!this.isLoaded())for(var Le=0,$e=te;Le<$e.length;Le+=1){var mt=$e[Le];this.images[mt]||(Ge=!1)}this.isLoaded()||Ge?this._notify(te,me):this.requestors.push({ids:te,callback:me})},Y.prototype._notify=function(te,me){for(var Ge={},Le=0,$e=te;Le<$e.length;Le+=1){var mt=$e[Le];this.images[mt]||this.fire(new e.Event("styleimagemissing",{id:mt}));var jt=this.images[mt];jt?Ge[mt]={data:jt.data.clone(),pixelRatio:jt.pixelRatio,sdf:jt.sdf,version:jt.version,stretchX:jt.stretchX,stretchY:jt.stretchY,content:jt.content,hasRenderCallback:!!(jt.userImage&&jt.userImage.render)}:e.warnOnce('Image "'+mt+'" 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.')}me(null,Ge)},Y.prototype.getPixelSize=function(){var te=this.atlasImage,me=te.width,Ge=te.height;return{width:me,height:Ge}},Y.prototype.getPattern=function(te){var me=this.patterns[te],Ge=this.getImage(te);if(!Ge)return null;if(me&&me.position.version===Ge.version)return me.position;if(me)me.position.version=Ge.version;else{var Le=Ge.data.width+l*2,$e=Ge.data.height+l*2,mt={w:Le,h:$e,x:0,y:0},jt=new e.ImagePosition(mt,Ge);this.patterns[te]={bin:mt,position:jt}}return this._updatePatternAtlas(),this.patterns[te].position},Y.prototype.bind=function(te){var me=te.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(te,this.atlasImage,me.RGBA),this.atlasTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE)},Y.prototype._updatePatternAtlas=function(){var te=[];for(var me in this.patterns)te.push(this.patterns[me].bin);var Ge=e.potpack(te),Le=Ge.w,$e=Ge.h,mt=this.atlasImage;mt.resize({width:Le||1,height:$e||1});for(var jt in this.patterns){var _r=this.patterns[jt],Fr=_r.bin,hr=Fr.x+l,gt=Fr.y+l,Et=this.images[jt].data,Ft=Et.width,ir=Et.height;e.RGBAImage.copy(Et,mt,{x:0,y:0},{x:hr,y:gt},{width:Ft,height:ir}),e.RGBAImage.copy(Et,mt,{x:0,y:ir-1},{x:hr,y:gt-1},{width:Ft,height:1}),e.RGBAImage.copy(Et,mt,{x:0,y:0},{x:hr,y:gt+ir},{width:Ft,height:1}),e.RGBAImage.copy(Et,mt,{x:Ft-1,y:0},{x:hr-1,y:gt},{width:1,height:ir}),e.RGBAImage.copy(Et,mt,{x:0,y:0},{x:hr+Ft,y:gt},{width:1,height:ir})}this.dirty=!0},Y.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},Y.prototype.dispatchRenderCallbacks=function(te){for(var me=0,Ge=te;me<Ge.length;me+=1){var Le=Ge[me];if(!this.callbackDispatchedThisFrame[Le]){this.callbackDispatchedThisFrame[Le]=!0;var $e=this.images[Le],mt=T($e);mt&&this.updateImage(Le,$e)}}},Y}(e.Evented);function w(ve,Y,ye,te,me){var Ge=Y*256,Le=Ge+255,$e=te.transformRequest(te.normalizeGlyphsURL(ye).replace("{fontstack}",ve).replace("{range}",Ge+"-"+Le),e.ResourceType.Glyphs);e.getArrayBuffer($e,function(mt,jt){if(mt)me(mt);else if(jt){for(var _r={},Fr=0,hr=e.parseGlyphPBF(jt);Fr<hr.length;Fr+=1){var gt=hr[Fr];_r[gt.id]=gt}me(null,_r)}})}var S=b,E=b,y=1e20;function b(ve,Y,ye,te,me,Ge){this.fontSize=ve||24,this.buffer=Y===void 0?3:Y,this.cutoff=te||.25,this.fontFamily=me||"sans-serif",this.fontWeight=Ge||"normal",this.radius=ye||8;var Le=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Le,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(Le*Le),this.gridInner=new Float64Array(Le*Le),this.f=new Float64Array(Le),this.d=new Float64Array(Le),this.z=new Float64Array(Le+1),this.v=new Int16Array(Le),this.middle=Math.round(Le/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}b.prototype.draw=function(ve){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ve,this.buffer,this.middle);for(var Y=this.ctx.getImageData(0,0,this.size,this.size),ye=new Uint8ClampedArray(this.size*this.size),te=0;te<this.size*this.size;te++){var me=Y.data[te*4+3]/255;this.gridOuter[te]=me===1?0:me===0?y:Math.pow(Math.max(0,.5-me),2),this.gridInner[te]=me===1?y:me===0?0:Math.pow(Math.max(0,me-.5),2)}for(p(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),p(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),te=0;te<this.size*this.size;te++){var Ge=this.gridOuter[te]-this.gridInner[te];ye[te]=Math.max(0,Math.min(255,Math.round(255-255*(Ge/this.radius+this.cutoff))))}return ye};function p(ve,Y,ye,te,me,Ge,Le){for(var $e=0;$e<Y;$e++){for(var mt=0;mt<ye;mt++)te[mt]=ve[mt*Y+$e];for(u(te,me,Ge,Le,ye),mt=0;mt<ye;mt++)ve[mt*Y+$e]=me[mt]}for(mt=0;mt<ye;mt++){for($e=0;$e<Y;$e++)te[$e]=ve[mt*Y+$e];for(u(te,me,Ge,Le,Y),$e=0;$e<Y;$e++)ve[mt*Y+$e]=Math.sqrt(me[$e])}}function u(ve,Y,ye,te,me){ye[0]=0,te[0]=-y,te[1]=+y;for(var Ge=1,Le=0;Ge<me;Ge++){for(var $e=(ve[Ge]+Ge*Ge-(ve[ye[Le]]+ye[Le]*ye[Le]))/(2*Ge-2*ye[Le]);$e<=te[Le];)Le--,$e=(ve[Ge]+Ge*Ge-(ve[ye[Le]]+ye[Le]*ye[Le]))/(2*Ge-2*ye[Le]);Le++,ye[Le]=Ge,te[Le]=$e,te[Le+1]=+y}for(Ge=0,Le=0;Ge<me;Ge++){for(;te[Le+1]<Ge;)Le++;Y[Ge]=(Ge-ye[Le])*(Ge-ye[Le])+ve[ye[Le]]}}S.default=E;var m=function(Y,ye){this.requestManager=Y,this.localIdeographFontFamily=ye,this.entries={}};m.prototype.setURL=function(Y){this.url=Y},m.prototype.getGlyphs=function(Y,ye){var te=this,me=[];for(var Ge in Y)for(var Le=0,$e=Y[Ge];Le<$e.length;Le+=1){var mt=$e[Le];me.push({stack:Ge,id:mt})}e.asyncAll(me,function(jt,_r){var Fr=jt.stack,hr=jt.id,gt=te.entries[Fr];gt||(gt=te.entries[Fr]={glyphs:{},requests:{},ranges:{}});var Et=gt.glyphs[hr];if(Et!==void 0){_r(null,{stack:Fr,id:hr,glyph:Et});return}if(Et=te._tinySDF(gt,Fr,hr),Et){gt.glyphs[hr]=Et,_r(null,{stack:Fr,id:hr,glyph:Et});return}var Ft=Math.floor(hr/256);if(Ft*256>65535){_r(new Error("glyphs > 65535 not supported"));return}if(gt.ranges[Ft]){_r(null,{stack:Fr,id:hr,glyph:Et});return}var ir=gt.requests[Ft];ir||(ir=gt.requests[Ft]=[],m.loadGlyphRange(Fr,Ft,te.url,te.requestManager,function(fr,sr){if(sr){for(var pr in sr)te._doesCharSupportLocalGlyph(+pr)||(gt.glyphs[+pr]=sr[+pr]);gt.ranges[Ft]=!0}for(var lr=0,Xt=ir;lr<Xt.length;lr+=1){var or=Xt[lr];or(fr,sr)}delete gt.requests[Ft]})),ir.push(function(fr,sr){fr?_r(fr):sr&&_r(null,{stack:Fr,id:hr,glyph:sr[hr]||null})})},function(jt,_r){if(jt)ye(jt);else if(_r){for(var Fr={},hr=0,gt=_r;hr<gt.length;hr+=1){var Et=gt[hr],Ft=Et.stack,ir=Et.id,fr=Et.glyph;(Fr[Ft]||(Fr[Ft]={}))[ir]=fr&&{id:fr.id,bitmap:fr.bitmap.clone(),metrics:fr.metrics}}ye(null,Fr)}})},m.prototype._doesCharSupportLocalGlyph=function(Y){return!!this.localIdeographFontFamily&&(e.isChar["CJK Unified Ideographs"](Y)||e.isChar["Hangul Syllables"](Y)||e.isChar.Hiragana(Y)||e.isChar.Katakana(Y))},m.prototype._tinySDF=function(Y,ye,te){var me=this.localIdeographFontFamily;if(me&&this._doesCharSupportLocalGlyph(te)){var Ge=Y.tinySDF;if(!Ge){var Le="400";/bold/i.test(ye)?Le="900":/medium/i.test(ye)?Le="500":/light/i.test(ye)&&(Le="200"),Ge=Y.tinySDF=new m.TinySDF(24,3,8,.25,me,Le)}return{id:te,bitmap:new e.AlphaImage({width:30,height:30},Ge.draw(String.fromCharCode(te))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},m.loadGlyphRange=w,m.TinySDF=S;var h=function(){this.specification=e.styleSpec.light.position};h.prototype.possiblyEvaluate=function(Y,ye){return e.sphericalToCartesian(Y.expression.evaluate(ye))},h.prototype.interpolate=function(Y,ye,te){return{x:e.number(Y.x,ye.x,te),y:e.number(Y.y,ye.y,te),z:e.number(Y.z,ye.z,te)}};var P=new e.Properties({anchor:new e.DataConstantProperty(e.styleSpec.light.anchor),position:new h,color:new e.DataConstantProperty(e.styleSpec.light.color),intensity:new e.DataConstantProperty(e.styleSpec.light.intensity)}),L="-transition",z=function(ve){function Y(ye){ve.call(this),this._transitionable=new e.Transitionable(P),this.setLight(ye),this._transitioning=this._transitionable.untransitioned()}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getLight=function(){return this._transitionable.serialize()},Y.prototype.setLight=function(te,me){if(me===void 0&&(me={}),!this._validate(e.validateLight,te,me))for(var Ge in te){var Le=te[Ge];e.endsWith(Ge,L)?this._transitionable.setTransition(Ge.slice(0,-L.length),Le):this._transitionable.setValue(Ge,Le)}},Y.prototype.updateTransitions=function(te){this._transitioning=this._transitionable.transitioned(te,this._transitioning)},Y.prototype.hasTransition=function(){return this._transitioning.hasTransition()},Y.prototype.recalculate=function(te){this.properties=this._transitioning.possiblyEvaluate(te)},Y.prototype._validate=function(te,me,Ge){return Ge&&Ge.validate===!1?!1:e.emitValidationErrors(this,te.call(e.validateStyle,e.extend({value:me,style:{glyphs:!0,sprite:!0},styleSpec:e.styleSpec})))},Y}(e.Evented),F=function(Y,ye){this.width=Y,this.height=ye,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};F.prototype.getDash=function(Y,ye){var te=Y.join(",")+String(ye);return this.dashEntry[te]||(this.dashEntry[te]=this.addDash(Y,ye)),this.dashEntry[te]},F.prototype.getDashRanges=function(Y,ye,te){var me=Y.length%2===1,Ge=[],Le=me?-Y[Y.length-1]*te:0,$e=Y[0]*te,mt=!0;Ge.push({left:Le,right:$e,isDash:mt,zeroLength:Y[0]===0});for(var jt=Y[0],_r=1;_r<Y.length;_r++){mt=!mt;var Fr=Y[_r];Le=jt*te,jt+=Fr,$e=jt*te,Ge.push({left:Le,right:$e,isDash:mt,zeroLength:Fr===0})}return Ge},F.prototype.addRoundDash=function(Y,ye,te){for(var me=ye/2,Ge=-te;Ge<=te;Ge++)for(var Le=this.nextRow+te+Ge,$e=this.width*Le,mt=0,jt=Y[mt],_r=0;_r<this.width;_r++){_r/jt.right>1&&(jt=Y[++mt]);var Fr=Math.abs(_r-jt.left),hr=Math.abs(_r-jt.right),gt=Math.min(Fr,hr),Et=void 0,Ft=Ge/te*(me+1);if(jt.isDash){var ir=me-Math.abs(Ft);Et=Math.sqrt(gt*gt+ir*ir)}else Et=me-Math.sqrt(gt*gt+Ft*Ft);this.data[$e+_r]=Math.max(0,Math.min(255,Et+128))}},F.prototype.addRegularDash=function(Y){for(var ye=Y.length-1;ye>=0;--ye){var te=Y[ye],me=Y[ye+1];te.zeroLength?Y.splice(ye,1):me&&me.isDash===te.isDash&&(me.left=te.left,Y.splice(ye,1))}var Ge=Y[0],Le=Y[Y.length-1];Ge.isDash===Le.isDash&&(Ge.left=Le.left-this.width,Le.right=Ge.right+this.width);for(var $e=this.width*this.nextRow,mt=0,jt=Y[mt],_r=0;_r<this.width;_r++){_r/jt.right>1&&(jt=Y[++mt]);var Fr=Math.abs(_r-jt.left),hr=Math.abs(_r-jt.right),gt=Math.min(Fr,hr),Et=jt.isDash?gt:-gt;this.data[$e+_r]=Math.max(0,Math.min(255,Et+128))}},F.prototype.addDash=function(Y,ye){var te=ye?7:0,me=2*te+1;if(this.nextRow+me>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var Ge=0,Le=0;Le<Y.length;Le++)Ge+=Y[Le];if(Ge!==0){var $e=this.width/Ge,mt=this.getDashRanges(Y,this.width,$e);ye?this.addRoundDash(mt,$e,te):this.addRegularDash(mt)}var jt={y:(this.nextRow+te+.5)/this.height,height:2*te/this.height,width:Ge};return this.nextRow+=me,this.dirty=!0,jt},F.prototype.bind=function(Y){var ye=Y.gl;this.texture?(ye.bindTexture(ye.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ye.texSubImage2D(ye.TEXTURE_2D,0,0,0,this.width,this.height,ye.ALPHA,ye.UNSIGNED_BYTE,this.data))):(this.texture=ye.createTexture(),ye.bindTexture(ye.TEXTURE_2D,this.texture),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_WRAP_S,ye.REPEAT),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_WRAP_T,ye.REPEAT),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_MIN_FILTER,ye.LINEAR),ye.texParameteri(ye.TEXTURE_2D,ye.TEXTURE_MAG_FILTER,ye.LINEAR),ye.texImage2D(ye.TEXTURE_2D,0,ye.ALPHA,this.width,this.height,0,ye.ALPHA,ye.UNSIGNED_BYTE,this.data))};var B=function ve(Y,ye){this.workerPool=Y,this.actors=[],this.currentActor=0,this.id=e.uniqueId();for(var te=this.workerPool.acquire(this.id),me=0;me<te.length;me++){var Ge=te[me],Le=new ve.Actor(Ge,ye,this.id);Le.name="Worker "+me,this.actors.push(Le)}};B.prototype.broadcast=function(Y,ye,te){te=te||function(){},e.asyncAll(this.actors,function(me,Ge){me.send(Y,ye,Ge)},te)},B.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},B.prototype.remove=function(){this.actors.forEach(function(Y){Y.remove()}),this.actors=[],this.workerPool.release(this.id)},B.Actor=e.Actor;function O(ve,Y,ye){var te=function(me,Ge){if(me)return ye(me);if(Ge){var Le=e.pick(e.extend(Ge,ve),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);Ge.vector_layers&&(Le.vectorLayers=Ge.vector_layers,Le.vectorLayerIds=Le.vectorLayers.map(function($e){return $e.id})),Le.tiles=Y.canonicalizeTileset(Le,ve.url),ye(null,Le)}};return ve.url?e.getJSON(Y.transformRequest(Y.normalizeSourceURL(ve.url),e.ResourceType.Source),te):e.browser.frame(function(){return te(null,ve)})}var I=function(Y,ye,te){this.bounds=e.LngLatBounds.convert(this.validateBounds(Y)),this.minzoom=ye||0,this.maxzoom=te||24};I.prototype.validateBounds=function(Y){return!Array.isArray(Y)||Y.length!==4?[-180,-90,180,90]:[Math.max(-180,Y[0]),Math.max(-90,Y[1]),Math.min(180,Y[2]),Math.min(90,Y[3])]},I.prototype.contains=function(Y){var ye=Math.pow(2,Y.z),te={minX:Math.floor(e.mercatorXfromLng(this.bounds.getWest())*ye),minY:Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*ye),maxX:Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*ye),maxY:Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*ye)},me=Y.x>=te.minX&&Y.x<te.maxX&&Y.y>=te.minY&&Y.y<te.maxY;return me};var N=function(ve){function Y(ye,te,me,Ge){if(ve.call(this),this.id=ye,this.dispatcher=me,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(te,["url","scheme","tileSize","promoteId"])),this._options=e.extend({type:"vector"},te),this._collectResourceTiming=te.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Ge)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.load=function(){var te=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=O(this._options,this.map._requestManager,function(me,Ge){te._tileJSONRequest=null,te._loaded=!0,me?te.fire(new e.ErrorEvent(me)):Ge&&(e.extend(te,Ge),Ge.bounds&&(te.tileBounds=new I(Ge.bounds,te.minzoom,te.maxzoom)),e.postTurnstileEvent(Ge.tiles,te.map._requestManager._customAccessToken),e.postMapLoadEvent(Ge.tiles,te.map._getMapId(),te.map._requestManager._skuToken,te.map._requestManager._customAccessToken),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.hasTile=function(te){return!this.tileBounds||this.tileBounds.contains(te.canonical)},Y.prototype.onAdd=function(te){this.map=te,this.load()},Y.prototype.setSourceProperty=function(te){this._tileJSONRequest&&this._tileJSONRequest.cancel(),te();var me=this.map.style.sourceCaches[this.id];me.clearTiles(),this.load()},Y.prototype.setTiles=function(te){var me=this;return this.setSourceProperty(function(){me._options.tiles=te}),this},Y.prototype.setUrl=function(te){var me=this;return this.setSourceProperty(function(){me.url=te,me._options.url=te}),this},Y.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Y.prototype.serialize=function(){return e.extend({},this._options)},Y.prototype.loadTile=function(te,me){var Ge=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme)),Le={request:this.map._requestManager.transformRequest(Ge,e.ResourceType.Tile),uid:te.uid,tileID:te.tileID,zoom:te.tileID.overscaledZ,tileSize:this.tileSize*te.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Le.request.collectResourceTiming=this._collectResourceTiming,!te.actor||te.state==="expired"?(te.actor=this.dispatcher.getActor(),te.request=te.actor.send("loadTile",Le,$e.bind(this))):te.state==="loading"?te.reloadCallback=me:te.request=te.actor.send("reloadTile",Le,$e.bind(this));function $e(mt,jt){if(delete te.request,te.aborted)return me(null);if(mt&&mt.status!==404)return me(mt);jt&&jt.resourceTiming&&(te.resourceTiming=jt.resourceTiming),this.map._refreshExpiredTiles&&jt&&te.setExpiryData(jt),te.loadVectorData(jt,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),me(null),te.reloadCallback&&(this.loadTile(te,te.reloadCallback),te.reloadCallback=null)}},Y.prototype.abortTile=function(te){te.request&&(te.request.cancel(),delete te.request),te.actor&&te.actor.send("abortTile",{uid:te.uid,type:this.type,source:this.id},void 0)},Y.prototype.unloadTile=function(te){te.unloadVectorData(),te.actor&&te.actor.send("removeTile",{uid:te.uid,type:this.type,source:this.id},void 0)},Y.prototype.hasTransition=function(){return!1},Y}(e.Evented),U=function(ve){function Y(ye,te,me,Ge){ve.call(this),this.id=ye,this.dispatcher=me,this.setEventedParent(Ge),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},te),e.extend(this,e.pick(te,["url","scheme","tileSize"]))}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.load=function(){var te=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=O(this._options,this.map._requestManager,function(me,Ge){te._tileJSONRequest=null,te._loaded=!0,me?te.fire(new e.ErrorEvent(me)):Ge&&(e.extend(te,Ge),Ge.bounds&&(te.tileBounds=new I(Ge.bounds,te.minzoom,te.maxzoom)),e.postTurnstileEvent(Ge.tiles),e.postMapLoadEvent(Ge.tiles,te.map._getMapId(),te.map._requestManager._skuToken),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),te.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.onAdd=function(te){this.map=te,this.load()},Y.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Y.prototype.serialize=function(){return e.extend({},this._options)},Y.prototype.hasTile=function(te){return!this.tileBounds||this.tileBounds.contains(te.canonical)},Y.prototype.loadTile=function(te,me){var Ge=this,Le=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);te.request=e.getImage(this.map._requestManager.transformRequest(Le,e.ResourceType.Tile),function($e,mt){if(delete te.request,te.aborted)te.state="unloaded",me(null);else if($e)te.state="errored",me($e);else if(mt){Ge.map._refreshExpiredTiles&&te.setExpiryData(mt),delete mt.cacheControl,delete mt.expires;var jt=Ge.map.painter.context,_r=jt.gl;te.texture=Ge.map.painter.getTileTexture(mt.width),te.texture?te.texture.update(mt,{useMipmap:!0}):(te.texture=new e.Texture(jt,mt,_r.RGBA,{useMipmap:!0}),te.texture.bind(_r.LINEAR,_r.CLAMP_TO_EDGE,_r.LINEAR_MIPMAP_NEAREST),jt.extTextureFilterAnisotropic&&_r.texParameterf(_r.TEXTURE_2D,jt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,jt.extTextureFilterAnisotropicMax)),te.state="loaded",e.cacheEntryPossiblyAdded(Ge.dispatcher),me(null)}})},Y.prototype.abortTile=function(te,me){te.request&&(te.request.cancel(),delete te.request),me()},Y.prototype.unloadTile=function(te,me){te.texture&&this.map.painter.saveTileTexture(te.texture),me()},Y.prototype.hasTransition=function(){return!1},Y}(e.Evented),W=function(ve){function Y(ye,te,me,Ge){ve.call(this,ye,te,me,Ge),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},te),this.encoding=te.encoding||"mapbox"}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},Y.prototype.loadTile=function(te,me){var Ge=this.map._requestManager.normalizeTileURL(te.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);te.request=e.getImage(this.map._requestManager.transformRequest(Ge,e.ResourceType.Tile),Le.bind(this)),te.neighboringTiles=this._getNeighboringTiles(te.tileID);function Le(mt,jt){if(delete te.request,te.aborted)te.state="unloaded",me(null);else if(mt)te.state="errored",me(mt);else if(jt){this.map._refreshExpiredTiles&&te.setExpiryData(jt),delete jt.cacheControl,delete jt.expires;var _r=e.window.ImageBitmap&&jt instanceof e.window.ImageBitmap&&e.offscreenCanvasSupported(),Fr=_r?jt:e.browser.getImageData(jt,1),hr={uid:te.uid,coord:te.tileID,source:this.id,rawImageData:Fr,encoding:this.encoding};(!te.actor||te.state==="expired")&&(te.actor=this.dispatcher.getActor(),te.actor.send("loadDEMTile",hr,$e.bind(this)))}}function $e(mt,jt){mt&&(te.state="errored",me(mt)),jt&&(te.dem=jt,te.needsHillshadePrepare=!0,te.state="loaded",me(null))}},Y.prototype._getNeighboringTiles=function(te){var me=te.canonical,Ge=Math.pow(2,me.z),Le=(me.x-1+Ge)%Ge,$e=me.x===0?te.wrap-1:te.wrap,mt=(me.x+1+Ge)%Ge,jt=me.x+1===Ge?te.wrap+1:te.wrap,_r={};return _r[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y).key]={backfilled:!1},_r[new e.OverscaledTileID(te.overscaledZ,jt,me.z,mt,me.y).key]={backfilled:!1},me.y>0&&(_r[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y-1).key]={backfilled:!1},_r[new e.OverscaledTileID(te.overscaledZ,te.wrap,me.z,me.x,me.y-1).key]={backfilled:!1},_r[new e.OverscaledTileID(te.overscaledZ,jt,me.z,mt,me.y-1).key]={backfilled:!1}),me.y+1<Ge&&(_r[new e.OverscaledTileID(te.overscaledZ,$e,me.z,Le,me.y+1).key]={backfilled:!1},_r[new e.OverscaledTileID(te.overscaledZ,te.wrap,me.z,me.x,me.y+1).key]={backfilled:!1},_r[new e.OverscaledTileID(te.overscaledZ,jt,me.z,mt,me.y+1).key]={backfilled:!1}),_r},Y.prototype.unloadTile=function(te){te.demTexture&&this.map.painter.saveTileTexture(te.demTexture),te.fbo&&(te.fbo.destroy(),delete te.fbo),te.dem&&delete te.dem,delete te.neighboringTiles,te.state="unloaded",te.actor&&te.actor.send("removeDEMTile",{uid:te.uid,source:this.id})},Y}(U),Q=function(ve){function Y(ye,te,me,Ge){ve.call(this),this.id=ye,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=me.getActor(),this.setEventedParent(Ge),this._data=te.data,this._options=e.extend({},te),this._collectResourceTiming=te.collectResourceTiming,this._resourceTiming=[],te.maxzoom!==void 0&&(this.maxzoom=te.maxzoom),te.type&&(this.type=te.type),te.attribution&&(this.attribution=te.attribution),this.promoteId=te.promoteId;var Le=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:te.cluster||!1,geojsonVtOptions:{buffer:(te.buffer!==void 0?te.buffer:128)*Le,tolerance:(te.tolerance!==void 0?te.tolerance:.375)*Le,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:te.lineMetrics||!1,generateId:te.generateId||!1},superclusterOptions:{maxZoom:te.clusterMaxZoom!==void 0?Math.min(te.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,te.clusterMinPoints||2),extent:e.EXTENT,radius:(te.clusterRadius||50)*Le,log:!1,generateId:te.generateId||!1},clusterProperties:te.clusterProperties,filter:te.filter},te.workerOptions)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.load=function(){var te=this;this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(me){if(me){te.fire(new e.ErrorEvent(me));return}var Ge={dataType:"source",sourceDataType:"metadata"};te._collectResourceTiming&&te._resourceTiming&&te._resourceTiming.length>0&&(Ge.resourceTiming=te._resourceTiming,te._resourceTiming=[]),te.fire(new e.Event("data",Ge))})},Y.prototype.onAdd=function(te){this.map=te,this.load()},Y.prototype.setData=function(te){var me=this;return this._data=te,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ge){if(Ge){me.fire(new e.ErrorEvent(Ge));return}var Le={dataType:"source",sourceDataType:"content"};me._collectResourceTiming&&me._resourceTiming&&me._resourceTiming.length>0&&(Le.resourceTiming=me._resourceTiming,me._resourceTiming=[]),me.fire(new e.Event("data",Le))}),this},Y.prototype.getClusterExpansionZoom=function(te,me){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:te,source:this.id},me),this},Y.prototype.getClusterChildren=function(te,me){return this.actor.send("geojson.getClusterChildren",{clusterId:te,source:this.id},me),this},Y.prototype.getClusterLeaves=function(te,me,Ge,Le){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:te,limit:me,offset:Ge},Le),this},Y.prototype._updateWorkerData=function(te){var me=this;this._loaded=!1;var Ge=e.extend({},this.workerOptions),Le=this._data;typeof Le=="string"?(Ge.request=this.map._requestManager.transformRequest(e.browser.resolveURL(Le),e.ResourceType.Source),Ge.request.collectResourceTiming=this._collectResourceTiming):Ge.data=JSON.stringify(Le),this.actor.send(this.type+".loadData",Ge,function($e,mt){me._removed||mt&&mt.abandoned||(me._loaded=!0,mt&&mt.resourceTiming&&mt.resourceTiming[me.id]&&(me._resourceTiming=mt.resourceTiming[me.id].slice(0)),me.actor.send(me.type+".coalesce",{source:Ge.source},null),te($e))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.loadTile=function(te,me){var Ge=this,Le=te.actor?"reloadTile":"loadTile";te.actor=this.actor;var $e={type:this.type,uid:te.uid,tileID:te.tileID,zoom:te.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};te.request=this.actor.send(Le,$e,function(mt,jt){return delete te.request,te.unloadVectorData(),te.aborted?me(null):mt?me(mt):(te.loadVectorData(jt,Ge.map.painter,Le==="reloadTile"),me(null))})},Y.prototype.abortTile=function(te){te.request&&(te.request.cancel(),delete te.request),te.aborted=!0},Y.prototype.unloadTile=function(te){te.unloadVectorData(),this.actor.send("removeTile",{uid:te.uid,type:this.type,source:this.id})},Y.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},Y.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},Y.prototype.hasTransition=function(){return!1},Y}(e.Evented),ue=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),le=function(ve){function Y(ye,te,me,Ge){ve.call(this),this.id=ye,this.dispatcher=me,this.coordinates=te.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ge),this.options=te}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.load=function(te,me){var Ge=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),function(Le,$e){Ge._loaded=!0,Le?Ge.fire(new e.ErrorEvent(Le)):$e&&(Ge.image=$e,te&&(Ge.coordinates=te),me&&me(),Ge._finishLoading())})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.updateImage=function(te){var me=this;return!this.image||!te.url?this:(this.options.url=te.url,this.load(te.coordinates,function(){me.texture=null}),this)},Y.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},Y.prototype.onAdd=function(te){this.map=te,this.load()},Y.prototype.setCoordinates=function(te){var me=this;this.coordinates=te;var Ge=te.map(e.MercatorCoordinate.fromLngLat);this.tileID=he(Ge),this.minzoom=this.maxzoom=this.tileID.z;var Le=Ge.map(function($e){return me.tileID.getTilePoint($e)._round()});return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(Le[0].x,Le[0].y,0,0),this._boundsArray.emplaceBack(Le[1].x,Le[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(Le[3].x,Le[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(Le[2].x,Le[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},Y.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var te=this.map.painter.context,me=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(te,this.image,me.RGBA),this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE));for(var Ge in this.tiles){var Le=this.tiles[Ge];Le.state!=="loaded"&&(Le.state="loaded",Le.texture=this.texture)}}},Y.prototype.loadTile=function(te,me){this.tileID&&this.tileID.equals(te.tileID.canonical)?(this.tiles[String(te.tileID.wrap)]=te,te.buckets={},me(null)):(te.state="errored",me(null))},Y.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return!1},Y}(e.Evented);function he(ve){for(var Y=1/0,ye=1/0,te=-1/0,me=-1/0,Ge=0,Le=ve;Ge<Le.length;Ge+=1){var $e=Le[Ge];Y=Math.min(Y,$e.x),ye=Math.min(ye,$e.y),te=Math.max(te,$e.x),me=Math.max(me,$e.y)}var mt=te-Y,jt=me-ye,_r=Math.max(mt,jt),Fr=Math.max(0,Math.floor(-Math.log(_r)/Math.LN2)),hr=Math.pow(2,Fr);return new e.CanonicalTileID(Fr,Math.floor((Y+te)/2*hr),Math.floor((ye+me)/2*hr))}var G=function(ve){function Y(ye,te,me,Ge){ve.call(this,ye,te,me,Ge),this.roundZoom=!0,this.type="video",this.options=te}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.load=function(){var te=this;this._loaded=!1;var me=this.options;this.urls=[];for(var Ge=0,Le=me.urls;Ge<Le.length;Ge+=1){var $e=Le[Ge];this.urls.push(this.map._requestManager.transformRequest($e,e.ResourceType.Source).url)}e.getVideo(this.urls,function(mt,jt){te._loaded=!0,mt?te.fire(new e.ErrorEvent(mt)):jt&&(te.video=jt,te.video.loop=!0,te.video.addEventListener("playing",function(){te.map.triggerRepaint()}),te.map&&te.video.play(),te._finishLoading())})},Y.prototype.pause=function(){this.video&&this.video.pause()},Y.prototype.play=function(){this.video&&this.video.play()},Y.prototype.seek=function(te){if(this.video){var me=this.video.seekable;te<me.start(0)||te>me.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+me.start(0)+" and "+me.end(0)+"-second mark."))):this.video.currentTime=te}},Y.prototype.getVideo=function(){return this.video},Y.prototype.onAdd=function(te){this.map||(this.map=te,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},Y.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var te=this.map.painter.context,me=te.gl;this.boundsBuffer||(this.boundsBuffer=te.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE),me.texSubImage2D(me.TEXTURE_2D,0,0,0,me.RGBA,me.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(te,this.video,me.RGBA),this.texture.bind(me.LINEAR,me.CLAMP_TO_EDGE));for(var Ge in this.tiles){var Le=this.tiles[Ge];Le.state!=="loaded"&&(Le.state="loaded",Le.texture=this.texture)}}},Y.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return this.video&&!this.video.paused},Y}(le),$=function(ve){function Y(ye,te,me,Ge){ve.call(this,ye,te,me,Ge),te.coordinates?(!Array.isArray(te.coordinates)||te.coordinates.length!==4||te.coordinates.some(function(Le){return!Array.isArray(Le)||Le.length!==2||Le.some(function($e){return typeof $e!="number"})}))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+ye,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+ye,null,'missing required property "coordinates"'))),te.animate&&typeof te.animate!="boolean"&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+ye,null,'optional "animate" property must be a boolean value'))),te.canvas?typeof te.canvas!="string"&&!(te.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+ye,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 e.ErrorEvent(new e.ValidationError("sources."+ye,null,'missing required property "canvas"'))),this.options=te,this.animate=te.animate!==void 0?te.animate:!0}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new e.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()},Y.prototype.getCanvas=function(){return this.canvas},Y.prototype.onAdd=function(te){this.map=te,this.load(),this.canvas&&this.animate&&this.play()},Y.prototype.onRemove=function(){this.pause()},Y.prototype.prepare=function(){var te=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,te=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,te=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var me=this.map.painter.context,Ge=me.gl;this.boundsBuffer||(this.boundsBuffer=me.createVertexBuffer(this._boundsArray,ue.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(te||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(me,this.canvas,Ge.RGBA,{premultiply:!0});for(var Le in this.tiles){var $e=this.tiles[Le];$e.state!=="loaded"&&($e.state="loaded",$e.texture=this.texture)}}},Y.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return this._playing},Y.prototype._hasInvalidDimensions=function(){for(var te=0,me=[this.canvas.width,this.canvas.height];te<me.length;te+=1){var Ge=me[te];if(isNaN(Ge)||Ge<=0)return!0}return!1},Y}(le),J={vector:N,raster:U,"raster-dem":W,geojson:Q,video:G,image:le,canvas:$},X=function(ve,Y,ye,te){var me=new J[Y.type](ve,Y,ye,te);if(me.id!==ve)throw new Error("Expected Source id to be "+ve+" instead of "+me.id);return e.bindAll(["load","abort","unload","serialize","prepare"],me),me},oe=function(ve){return J[ve]},ie=function(ve,Y){J[ve]=Y};function j(ve,Y){var ye=e.identity([]);return e.translate(ye,ye,[1,1,0]),e.scale(ye,ye,[ve.width*.5,ve.height*.5,1]),e.multiply(ye,ye,ve.calculatePosMatrix(Y.toUnwrapped()))}function ee(ve,Y,ye){if(ve)for(var te=0,me=ve;te<me.length;te+=1){var Ge=me[te],Le=Y[Ge];if(Le&&Le.source===ye&&Le.type==="fill-extrusion")return!0}else for(var $e in Y){var mt=Y[$e];if(mt.source===ye&&mt.type==="fill-extrusion")return!0}return!1}function re(ve,Y,ye,te,me,Ge){var Le=ee(me&&me.layers,Y,ve.id),$e=Ge.maxPitchScaleFactor(),mt=ve.tilesIn(te,$e,Le);mt.sort(Ae);for(var jt=[],_r=0,Fr=mt;_r<Fr.length;_r+=1){var hr=Fr[_r];jt.push({wrappedTileID:hr.tileID.wrapped().key,queryResults:hr.tile.queryRenderedFeatures(Y,ye,ve._state,hr.queryGeometry,hr.cameraQueryGeometry,hr.scale,me,Ge,$e,j(ve.transform,hr.tileID))})}var gt=ze(jt);for(var Et in gt)gt[Et].forEach(function(Ft){var ir=Ft.feature,fr=ve.getFeatureState(ir.layer["source-layer"],ir.id);ir.source=ir.layer.source,ir.layer["source-layer"]&&(ir.sourceLayer=ir.layer["source-layer"]),ir.state=fr});return gt}function ce(ve,Y,ye,te,me,Ge,Le){for(var $e={},mt=Ge.queryRenderedSymbols(te),jt=[],_r=0,Fr=Object.keys(mt).map(Number);_r<Fr.length;_r+=1){var hr=Fr[_r];jt.push(Le[hr])}jt.sort(Ae);for(var gt=function(){var sr=Ft[Et],pr=sr.featureIndex.lookupSymbolFeatures(mt[sr.bucketInstanceId],Y,sr.bucketIndex,sr.sourceLayerIndex,me.filter,me.layers,me.availableImages,ve);for(var lr in pr){var Xt=$e[lr]=$e[lr]||[],or=pr[lr];or.sort(function(ba,yi){var Xa=sr.featureSortOrder;if(Xa){var si=Xa.indexOf(ba.featureIndex),Ji=Xa.indexOf(yi.featureIndex);return Ji-si}else return yi.featureIndex-ba.featureIndex});for(var qt=0,Dr=or;qt<Dr.length;qt+=1){var Jr=Dr[qt];Xt.push(Jr)}}},Et=0,Ft=jt;Et<Ft.length;Et+=1)gt();var ir=function(sr){$e[sr].forEach(function(pr){var lr=pr.feature,Xt=ve[sr],or=ye[Xt.source],qt=or.getFeatureState(lr.layer["source-layer"],lr.id);lr.source=lr.layer.source,lr.layer["source-layer"]&&(lr.sourceLayer=lr.layer["source-layer"]),lr.state=qt})};for(var fr in $e)ir(fr);return $e}function be(ve,Y){for(var ye=ve.getRenderableIds().map(function(mt){return ve.getTileByID(mt)}),te=[],me={},Ge=0;Ge<ye.length;Ge++){var Le=ye[Ge],$e=Le.tileID.canonical.key;me[$e]||(me[$e]=!0,Le.querySourceFeatures(te,Y))}return te}function Ae(ve,Y){var ye=ve.tileID,te=Y.tileID;return ye.overscaledZ-te.overscaledZ||ye.canonical.y-te.canonical.y||ye.wrap-te.wrap||ye.canonical.x-te.canonical.x}function ze(ve){for(var Y={},ye={},te=0,me=ve;te<me.length;te+=1){var Ge=me[te],Le=Ge.queryResults,$e=Ge.wrappedTileID,mt=ye[$e]=ye[$e]||{};for(var jt in Le)for(var _r=Le[jt],Fr=mt[jt]=mt[jt]||{},hr=Y[jt]=Y[jt]||[],gt=0,Et=_r;gt<Et.length;gt+=1){var Ft=Et[gt];Fr[Ft.featureIndex]||(Fr[Ft.featureIndex]=!0,hr.push(Ft))}}return Y}var Re=function(Y,ye){this.max=Y,this.onRemove=ye,this.reset()};Re.prototype.reset=function(){for(var Y in this.data)for(var ye=0,te=this.data[Y];ye<te.length;ye+=1){var me=te[ye];me.timeout&&clearTimeout(me.timeout),this.onRemove(me.value)}return this.data={},this.order=[],this},Re.prototype.add=function(Y,ye,te){var me=this,Ge=Y.wrapped().key;this.data[Ge]===void 0&&(this.data[Ge]=[]);var Le={value:ye,timeout:void 0};if(te!==void 0&&(Le.timeout=setTimeout(function(){me.remove(Y,Le)},te)),this.data[Ge].push(Le),this.order.push(Ge),this.order.length>this.max){var $e=this._getAndRemoveByKey(this.order[0]);$e&&this.onRemove($e)}return this},Re.prototype.has=function(Y){return Y.wrapped().key in this.data},Re.prototype.getAndRemove=function(Y){return this.has(Y)?this._getAndRemoveByKey(Y.wrapped().key):null},Re.prototype._getAndRemoveByKey=function(Y){var ye=this.data[Y].shift();return ye.timeout&&clearTimeout(ye.timeout),this.data[Y].length===0&&delete this.data[Y],this.order.splice(this.order.indexOf(Y),1),ye.value},Re.prototype.getByKey=function(Y){var ye=this.data[Y];return ye?ye[0].value:null},Re.prototype.get=function(Y){if(!this.has(Y))return null;var ye=this.data[Y.wrapped().key][0];return ye.value},Re.prototype.remove=function(Y,ye){if(!this.has(Y))return this;var te=Y.wrapped().key,me=ye===void 0?0:this.data[te].indexOf(ye),Ge=this.data[te][me];return this.data[te].splice(me,1),Ge.timeout&&clearTimeout(Ge.timeout),this.data[te].length===0&&delete this.data[te],this.onRemove(Ge.value),this.order.splice(this.order.indexOf(te),1),this},Re.prototype.setMaxSize=function(Y){for(this.max=Y;this.order.length>this.max;){var ye=this._getAndRemoveByKey(this.order[0]);ye&&this.onRemove(ye)}return this},Re.prototype.filter=function(Y){var ye=[];for(var te in this.data)for(var me=0,Ge=this.data[te];me<Ge.length;me+=1){var Le=Ge[me];Y(Le.value)||ye.push(Le)}for(var $e=0,mt=ye;$e<mt.length;$e+=1){var jt=mt[$e];this.remove(jt.value.tileID,jt)}};var Xe=function(Y,ye,te){this.context=Y;var me=Y.gl;this.buffer=me.createBuffer(),this.dynamicDraw=!!te,this.context.unbindVAO(),Y.bindElementBuffer.set(this.buffer),me.bufferData(me.ELEMENT_ARRAY_BUFFER,ye.arrayBuffer,this.dynamicDraw?me.DYNAMIC_DRAW:me.STATIC_DRAW),this.dynamicDraw||delete ye.arrayBuffer};Xe.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Xe.prototype.updateData=function(Y){var ye=this.context.gl;this.context.unbindVAO(),this.bind(),ye.bufferSubData(ye.ELEMENT_ARRAY_BUFFER,0,Y.arrayBuffer)},Xe.prototype.destroy=function(){var Y=this.context.gl;this.buffer&&(Y.deleteBuffer(this.buffer),delete this.buffer)};var it={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},ot=function(Y,ye,te,me){this.length=ye.length,this.attributes=te,this.itemSize=ye.bytesPerElement,this.dynamicDraw=me,this.context=Y;var Ge=Y.gl;this.buffer=Ge.createBuffer(),Y.bindVertexBuffer.set(this.buffer),Ge.bufferData(Ge.ARRAY_BUFFER,ye.arrayBuffer,this.dynamicDraw?Ge.DYNAMIC_DRAW:Ge.STATIC_DRAW),this.dynamicDraw||delete ye.arrayBuffer};ot.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ot.prototype.updateData=function(Y){var ye=this.context.gl;this.bind(),ye.bufferSubData(ye.ARRAY_BUFFER,0,Y.arrayBuffer)},ot.prototype.enableAttributes=function(Y,ye){for(var te=0;te<this.attributes.length;te++){var me=this.attributes[te],Ge=ye.attributes[me.name];Ge!==void 0&&Y.enableVertexAttribArray(Ge)}},ot.prototype.setVertexAttribPointers=function(Y,ye,te){for(var me=0;me<this.attributes.length;me++){var Ge=this.attributes[me],Le=ye.attributes[Ge.name];Le!==void 0&&Y.vertexAttribPointer(Le,Ge.components,Y[it[Ge.type]],!1,this.itemSize,Ge.offset+this.itemSize*(te||0))}},ot.prototype.destroy=function(){var Y=this.context.gl;this.buffer&&(Y.deleteBuffer(this.buffer),delete this.buffer)};var tt=function(Y){this.gl=Y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};tt.prototype.get=function(){return this.current},tt.prototype.set=function(Y){},tt.prototype.getDefault=function(){return this.default},tt.prototype.setDefault=function(){this.set(this.default)};var lt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return e.Color.transparent},Y.prototype.set=function(te){var me=this.current;te.r===me.r&&te.g===me.g&&te.b===me.b&&te.a===me.a&&!this.dirty||(this.gl.clearColor(te.r,te.g,te.b,te.a),this.current=te,this.dirty=!1)},Y}(tt),Ee=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return 1},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.clearDepth(te),this.current=te,this.dirty=!1)},Y}(tt),_e=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return 0},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.clearStencil(te),this.current=te,this.dirty=!1)},Y}(tt),fe=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return[!0,!0,!0,!0]},Y.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&te[2]===me[2]&&te[3]===me[3]&&!this.dirty||(this.gl.colorMask(te[0],te[1],te[2],te[3]),this.current=te,this.dirty=!1)},Y}(tt),Fe=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!0},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.depthMask(te),this.current=te,this.dirty=!1)},Y}(tt),rt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return 255},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.stencilMask(te),this.current=te,this.dirty=!1)},Y}(tt),st=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},Y.prototype.set=function(te){var me=this.current;te.func===me.func&&te.ref===me.ref&&te.mask===me.mask&&!this.dirty||(this.gl.stencilFunc(te.func,te.ref,te.mask),this.current=te,this.dirty=!1)},Y}(tt),Qe=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){var te=this.gl;return[te.KEEP,te.KEEP,te.KEEP]},Y.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&te[2]===me[2]&&!this.dirty||(this.gl.stencilOp(te[0],te[1],te[2]),this.current=te,this.dirty=!1)},Y}(tt),Lt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.STENCIL_TEST):me.disable(me.STENCIL_TEST),this.current=te,this.dirty=!1}},Y}(tt),kt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return[0,1]},Y.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&!this.dirty||(this.gl.depthRange(te[0],te[1]),this.current=te,this.dirty=!1)},Y}(tt),Vt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.DEPTH_TEST):me.disable(me.DEPTH_TEST),this.current=te,this.dirty=!1}},Y}(tt),Zt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return this.gl.LESS},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.depthFunc(te),this.current=te,this.dirty=!1)},Y}(tt),Sr=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.BLEND):me.disable(me.BLEND),this.current=te,this.dirty=!1}},Y}(tt),xr=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){var te=this.gl;return[te.ONE,te.ZERO]},Y.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&!this.dirty||(this.gl.blendFunc(te[0],te[1]),this.current=te,this.dirty=!1)},Y}(tt),jr=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return e.Color.transparent},Y.prototype.set=function(te){var me=this.current;te.r===me.r&&te.g===me.g&&te.b===me.b&&te.a===me.a&&!this.dirty||(this.gl.blendColor(te.r,te.g,te.b,te.a),this.current=te,this.dirty=!1)},Y}(tt),wr=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return this.gl.FUNC_ADD},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.blendEquation(te),this.current=te,this.dirty=!1)},Y}(tt),Ir=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;te?me.enable(me.CULL_FACE):me.disable(me.CULL_FACE),this.current=te,this.dirty=!1}},Y}(tt),bt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return this.gl.BACK},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.cullFace(te),this.current=te,this.dirty=!1)},Y}(tt),Be=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return this.gl.CCW},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.frontFace(te),this.current=te,this.dirty=!1)},Y}(tt),Ke=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.useProgram(te),this.current=te,this.dirty=!1)},Y}(tt),Ue=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return this.gl.TEXTURE0},Y.prototype.set=function(te){te===this.current&&!this.dirty||(this.gl.activeTexture(te),this.current=te,this.dirty=!1)},Y}(tt),Me=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){var te=this.gl;return[0,0,te.drawingBufferWidth,te.drawingBufferHeight]},Y.prototype.set=function(te){var me=this.current;te[0]===me[0]&&te[1]===me[1]&&te[2]===me[2]&&te[3]===me[3]&&!this.dirty||(this.gl.viewport(te[0],te[1],te[2],te[3]),this.current=te,this.dirty=!1)},Y}(tt),qe=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindFramebuffer(me.FRAMEBUFFER,te),this.current=te,this.dirty=!1}},Y}(tt),Ce=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindRenderbuffer(me.RENDERBUFFER,te),this.current=te,this.dirty=!1}},Y}(tt),Te=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindTexture(me.TEXTURE_2D,te),this.current=te,this.dirty=!1}},Y}(tt),Pe=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.bindBuffer(me.ARRAY_BUFFER,te),this.current=te,this.dirty=!1}},Y}(tt),at=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){var me=this.gl;me.bindBuffer(me.ELEMENT_ARRAY_BUFFER,te),this.current=te,this.dirty=!1},Y}(tt),yt=function(ve){function Y(ye){ve.call(this,ye),this.vao=ye.extVertexArrayObject}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(te){!this.vao||te===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(te),this.current=te,this.dirty=!1)},Y}(tt),Tt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return 4},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.pixelStorei(me.UNPACK_ALIGNMENT,te),this.current=te,this.dirty=!1}},Y}(tt),Ot=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.pixelStorei(me.UNPACK_PREMULTIPLY_ALPHA_WEBGL,te),this.current=te,this.dirty=!1}},Y}(tt),Gt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){var me=this.gl;me.pixelStorei(me.UNPACK_FLIP_Y_WEBGL,te),this.current=te,this.dirty=!1}},Y}(tt),rr=function(ve){function Y(ye,te){ve.call(this,ye),this.context=ye,this.parent=te}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getDefault=function(){return null},Y}(tt),Qt=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.setDirty=function(){this.dirty=!0},Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var me=this.gl;me.framebufferTexture2D(me.FRAMEBUFFER,me.COLOR_ATTACHMENT0,me.TEXTURE_2D,te,0),this.current=te,this.dirty=!1}},Y}(rr),Tr=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.set=function(te){if(!(te===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var me=this.gl;me.framebufferRenderbuffer(me.FRAMEBUFFER,me.DEPTH_ATTACHMENT,me.RENDERBUFFER,te),this.current=te,this.dirty=!1}},Y}(rr),la=function(Y,ye,te,me){this.context=Y,this.width=ye,this.height=te;var Ge=Y.gl,Le=this.framebuffer=Ge.createFramebuffer();this.colorAttachment=new Qt(Y,Le),me&&(this.depthAttachment=new Tr(Y,Le))};la.prototype.destroy=function(){var Y=this.context.gl,ye=this.colorAttachment.get();if(ye&&Y.deleteTexture(ye),this.depthAttachment){var te=this.depthAttachment.get();te&&Y.deleteRenderbuffer(te)}Y.deleteFramebuffer(this.framebuffer)};var Ua=519,Ba=function(Y,ye,te){this.func=Y,this.mask=ye,this.range=te};Ba.ReadOnly=!1,Ba.ReadWrite=!0,Ba.disabled=new Ba(Ua,Ba.ReadOnly,[0,1]);var Ra=519,ei=7680,za=function(Y,ye,te,me,Ge,Le){this.test=Y,this.ref=ye,this.mask=te,this.fail=me,this.depthFail=Ge,this.pass=Le};za.disabled=new za({func:Ra,mask:0},0,0,ei,ei,ei);var ti=0,Ci=1,Jt=771,Nt=function(Y,ye,te){this.blendFunction=Y,this.blendColor=ye,this.mask=te};Nt.Replace=[Ci,ti],Nt.disabled=new Nt(Nt.Replace,e.Color.transparent,[!1,!1,!1,!1]),Nt.unblended=new Nt(Nt.Replace,e.Color.transparent,[!0,!0,!0,!0]),Nt.alphaBlended=new Nt([Ci,Jt],e.Color.transparent,[!0,!0,!0,!0]);var Kt=1029,Wt=2305,Pr=function(Y,ye,te){this.enable=Y,this.mode=ye,this.frontFace=te};Pr.disabled=new Pr(!1,Kt,Wt),Pr.backCCW=new Pr(!0,Kt,Wt);var ta=function(Y){this.gl=Y,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new lt(this),this.clearDepth=new Ee(this),this.clearStencil=new _e(this),this.colorMask=new fe(this),this.depthMask=new Fe(this),this.stencilMask=new rt(this),this.stencilFunc=new st(this),this.stencilOp=new Qe(this),this.stencilTest=new Lt(this),this.depthRange=new kt(this),this.depthTest=new Vt(this),this.depthFunc=new Zt(this),this.blend=new Sr(this),this.blendFunc=new xr(this),this.blendColor=new jr(this),this.blendEquation=new wr(this),this.cullFace=new Ir(this),this.cullFaceSide=new bt(this),this.frontFace=new Be(this),this.program=new Ke(this),this.activeTexture=new Ue(this),this.viewport=new Me(this),this.bindFramebuffer=new qe(this),this.bindRenderbuffer=new Ce(this),this.bindTexture=new Te(this),this.bindVertexBuffer=new Pe(this),this.bindElementBuffer=new at(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new yt(this),this.pixelStoreUnpack=new Tt(this),this.pixelStoreUnpackPremultiplyAlpha=new Ot(this),this.pixelStoreUnpackFlipY=new Gt(this),this.extTextureFilterAnisotropic=Y.getExtension("EXT_texture_filter_anisotropic")||Y.getExtension("MOZ_EXT_texture_filter_anisotropic")||Y.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=Y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=Y.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(Y.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=Y.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=Y.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=Y.getParameter(Y.MAX_TEXTURE_SIZE)};ta.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()},ta.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},ta.prototype.createIndexBuffer=function(Y,ye){return new Xe(this,Y,ye)},ta.prototype.createVertexBuffer=function(Y,ye,te){return new ot(this,Y,ye,te)},ta.prototype.createRenderbuffer=function(Y,ye,te){var me=this.gl,Ge=me.createRenderbuffer();return this.bindRenderbuffer.set(Ge),me.renderbufferStorage(me.RENDERBUFFER,Y,ye,te),this.bindRenderbuffer.set(null),Ge},ta.prototype.createFramebuffer=function(Y,ye,te){return new la(this,Y,ye,te)},ta.prototype.clear=function(Y){var ye=Y.color,te=Y.depth,me=this.gl,Ge=0;ye&&(Ge|=me.COLOR_BUFFER_BIT,this.clearColor.set(ye),this.colorMask.set([!0,!0,!0,!0])),typeof te<"u"&&(Ge|=me.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(te),this.depthMask.set(!0)),me.clear(Ge)},ta.prototype.setCullFace=function(Y){Y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(Y.mode),this.frontFace.set(Y.frontFace))},ta.prototype.setDepthMode=function(Y){Y.func===this.gl.ALWAYS&&!Y.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(Y.func),this.depthMask.set(Y.mask),this.depthRange.set(Y.range))},ta.prototype.setStencilMode=function(Y){Y.test.func===this.gl.ALWAYS&&!Y.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(Y.mask),this.stencilOp.set([Y.fail,Y.depthFail,Y.pass]),this.stencilFunc.set({func:Y.test.func,ref:Y.ref,mask:Y.test.mask}))},ta.prototype.setColorMode=function(Y){e.deepEqual(Y.blendFunction,Nt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(Y.blendFunction),this.blendColor.set(Y.blendColor)),this.colorMask.set(Y.mask)},ta.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ma=function(ve){function Y(ye,te,me){var Ge=this;ve.call(this),this.id=ye,this.dispatcher=me,this.on("data",function(Le){Le.dataType==="source"&&Le.sourceDataType==="metadata"&&(Ge._sourceLoaded=!0),Ge._sourceLoaded&&!Ge._paused&&Le.dataType==="source"&&Le.sourceDataType==="content"&&(Ge.reload(),Ge.transform&&Ge.update(Ge.transform))}),this.on("error",function(){Ge._sourceErrored=!0}),this._source=X(ye,te,me,this),this._tiles={},this._cache=new Re(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new e.SourceFeatureState}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.onAdd=function(te){this.map=te,this._maxTileCacheSize=te?te._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(te)},Y.prototype.onRemove=function(te){this._source&&this._source.onRemove&&this._source.onRemove(te)},Y.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var te in this._tiles){var me=this._tiles[te];if(me.state!=="loaded"&&me.state!=="errored")return!1}return!0},Y.prototype.getSource=function(){return this._source},Y.prototype.pause=function(){this._paused=!0},Y.prototype.resume=function(){if(this._paused){var te=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,te&&this.reload(),this.transform&&this.update(this.transform)}},Y.prototype._loadTile=function(te,me){return this._source.loadTile(te,me)},Y.prototype._unloadTile=function(te){if(this._source.unloadTile)return this._source.unloadTile(te,function(){})},Y.prototype._abortTile=function(te){if(this._source.abortTile)return this._source.abortTile(te,function(){})},Y.prototype.serialize=function(){return this._source.serialize()},Y.prototype.prepare=function(te){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var me in this._tiles){var Ge=this._tiles[me];Ge.upload(te),Ge.prepare(this.map.style.imageManager)}},Y.prototype.getIds=function(){return e.values(this._tiles).map(function(te){return te.tileID}).sort(ra).map(function(te){return te.key})},Y.prototype.getRenderableIds=function(te){var me=this,Ge=[];for(var Le in this._tiles)this._isIdRenderable(Le,te)&&Ge.push(this._tiles[Le]);return te?Ge.sort(function($e,mt){var jt=$e.tileID,_r=mt.tileID,Fr=new e.Point(jt.canonical.x,jt.canonical.y)._rotate(me.transform.angle),hr=new e.Point(_r.canonical.x,_r.canonical.y)._rotate(me.transform.angle);return jt.overscaledZ-_r.overscaledZ||hr.y-Fr.y||hr.x-Fr.x}).map(function($e){return $e.tileID.key}):Ge.map(function($e){return $e.tileID}).sort(ra).map(function($e){return $e.key})},Y.prototype.hasRenderableParent=function(te){var me=this.findLoadedParent(te,0);return me?this._isIdRenderable(me.tileID.key):!1},Y.prototype._isIdRenderable=function(te,me){return this._tiles[te]&&this._tiles[te].hasData()&&!this._coveredTiles[te]&&(me||!this._tiles[te].holdingForFade())},Y.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var te in this._tiles)this._tiles[te].state!=="errored"&&this._reloadTile(te,"reloading")},Y.prototype._reloadTile=function(te,me){var Ge=this._tiles[te];Ge&&(Ge.state!=="loading"&&(Ge.state=me),this._loadTile(Ge,this._tileLoaded.bind(this,Ge,te,me)))},Y.prototype._tileLoaded=function(te,me,Ge,Le){if(Le){te.state="errored",Le.status!==404?this._source.fire(new e.ErrorEvent(Le,{tile:te})):this.update(this.transform);return}te.timeAdded=e.browser.now(),Ge==="expired"&&(te.refreshedUponExpiration=!0),this._setTileReloadTimer(me,te),this.getSource().type==="raster-dem"&&te.dem&&this._backfillDEM(te),this._state.initializeTileState(te,this.map?this.map.painter:null),this._source.fire(new e.Event("data",{dataType:"source",tile:te,coord:te.tileID}))},Y.prototype._backfillDEM=function(te){for(var me=this.getRenderableIds(),Ge=0;Ge<me.length;Ge++){var Le=me[Ge];if(te.neighboringTiles&&te.neighboringTiles[Le]){var $e=this.getTileByID(Le);mt(te,$e),mt($e,te)}}function mt(jt,_r){jt.needsHillshadePrepare=!0;var Fr=_r.tileID.canonical.x-jt.tileID.canonical.x,hr=_r.tileID.canonical.y-jt.tileID.canonical.y,gt=Math.pow(2,jt.tileID.canonical.z),Et=_r.tileID.key;Fr===0&&hr===0||Math.abs(hr)>1||(Math.abs(Fr)>1&&(Math.abs(Fr+gt)===1?Fr+=gt:Math.abs(Fr-gt)===1&&(Fr-=gt)),!(!_r.dem||!jt.dem)&&(jt.dem.backfillBorder(_r.dem,Fr,hr),jt.neighboringTiles&&jt.neighboringTiles[Et]&&(jt.neighboringTiles[Et].backfilled=!0)))}},Y.prototype.getTile=function(te){return this.getTileByID(te.key)},Y.prototype.getTileByID=function(te){return this._tiles[te]},Y.prototype._retainLoadedChildren=function(te,me,Ge,Le){for(var $e in this._tiles){var mt=this._tiles[$e];if(!(Le[$e]||!mt.hasData()||mt.tileID.overscaledZ<=me||mt.tileID.overscaledZ>Ge)){for(var jt=mt.tileID;mt&&mt.tileID.overscaledZ>me+1;){var _r=mt.tileID.scaledTo(mt.tileID.overscaledZ-1);mt=this._tiles[_r.key],mt&&mt.hasData()&&(jt=_r)}for(var Fr=jt;Fr.overscaledZ>me;)if(Fr=Fr.scaledTo(Fr.overscaledZ-1),te[Fr.key]){Le[jt.key]=jt;break}}}},Y.prototype.findLoadedParent=function(te,me){if(te.key in this._loadedParentTiles){var Ge=this._loadedParentTiles[te.key];return Ge&&Ge.tileID.overscaledZ>=me?Ge:null}for(var Le=te.overscaledZ-1;Le>=me;Le--){var $e=te.scaledTo(Le),mt=this._getLoadedTile($e);if(mt)return mt}},Y.prototype._getLoadedTile=function(te){var me=this._tiles[te.key];if(me&&me.hasData())return me;var Ge=this._cache.getByKey(te.wrapped().key);return Ge},Y.prototype.updateCacheSize=function(te){var me=Math.ceil(te.width/this._source.tileSize)+1,Ge=Math.ceil(te.height/this._source.tileSize)+1,Le=me*Ge,$e=5,mt=Math.floor(Le*$e),jt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,mt):mt;this._cache.setMaxSize(jt)},Y.prototype.handleWrapJump=function(te){var me=this._prevLng===void 0?te:this._prevLng,Ge=te-me,Le=Ge/360,$e=Math.round(Le);if(this._prevLng=te,$e){var mt={};for(var jt in this._tiles){var _r=this._tiles[jt];_r.tileID=_r.tileID.unwrapTo(_r.tileID.wrap+$e),mt[_r.tileID.key]=_r}this._tiles=mt;for(var Fr in this._timers)clearTimeout(this._timers[Fr]),delete this._timers[Fr];for(var hr in this._tiles){var gt=this._tiles[hr];this._setTileReloadTimer(hr,gt)}}},Y.prototype.update=function(te){var me=this;if(this.transform=te,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(te),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ge;this.used?this._source.tileID?Ge=te.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ba){return new e.OverscaledTileID(ba.canonical.z,ba.wrap,ba.canonical.z,ba.canonical.x,ba.canonical.y)}):(Ge=te.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ge=Ge.filter(function(ba){return me._source.hasTile(ba)}))):Ge=[];var Le=te.coveringZoomLevel(this._source),$e=Math.max(Le-Y.maxOverzooming,this._source.minzoom),mt=Math.max(Le+Y.maxUnderzooming,this._source.minzoom),jt=this._updateRetainedTiles(Ge,Le);if(Ia(this._source.type)){for(var _r={},Fr={},hr=Object.keys(jt),gt=0,Et=hr;gt<Et.length;gt+=1){var Ft=Et[gt],ir=jt[Ft],fr=this._tiles[Ft];if(!(!fr||fr.fadeEndTime&&fr.fadeEndTime<=e.browser.now())){var sr=this.findLoadedParent(ir,$e);sr&&(this._addTile(sr.tileID),_r[sr.tileID.key]=sr.tileID),Fr[Ft]=ir}}this._retainLoadedChildren(Fr,Le,mt,jt);for(var pr in _r)jt[pr]||(this._coveredTiles[pr]=!0,jt[pr]=_r[pr])}for(var lr in jt)this._tiles[lr].clearFadeHold();for(var Xt=e.keysDifference(this._tiles,jt),or=0,qt=Xt;or<qt.length;or+=1){var Dr=qt[or],Jr=this._tiles[Dr];Jr.hasSymbolBuckets&&!Jr.holdingForFade()?Jr.setHoldDuration(this.map._fadeDuration):(!Jr.hasSymbolBuckets||Jr.symbolFadeFinished())&&this._removeTile(Dr)}this._updateLoadedParentTileCache()}},Y.prototype.releaseSymbolFadeTiles=function(){for(var te in this._tiles)this._tiles[te].holdingForFade()&&this._removeTile(te)},Y.prototype._updateRetainedTiles=function(te,me){for(var Ge={},Le={},$e=Math.max(me-Y.maxOverzooming,this._source.minzoom),mt=Math.max(me+Y.maxUnderzooming,this._source.minzoom),jt={},_r=0,Fr=te;_r<Fr.length;_r+=1){var hr=Fr[_r],gt=this._addTile(hr);Ge[hr.key]=hr,!gt.hasData()&&me<this._source.maxzoom&&(jt[hr.key]=hr)}this._retainLoadedChildren(jt,me,mt,Ge);for(var Et=0,Ft=te;Et<Ft.length;Et+=1){var ir=Ft[Et],fr=this._tiles[ir.key];if(!fr.hasData()){if(me+1>this._source.maxzoom){var sr=ir.children(this._source.maxzoom)[0],pr=this.getTile(sr);if(pr&&pr.hasData()){Ge[sr.key]=sr;continue}}else{var lr=ir.children(this._source.maxzoom);if(Ge[lr[0].key]&&Ge[lr[1].key]&&Ge[lr[2].key]&&Ge[lr[3].key])continue}for(var Xt=fr.wasRequested(),or=ir.overscaledZ-1;or>=$e;--or){var qt=ir.scaledTo(or);if(Le[qt.key]||(Le[qt.key]=!0,fr=this.getTile(qt),!fr&&Xt&&(fr=this._addTile(qt)),fr&&(Ge[qt.key]=qt,Xt=fr.wasRequested(),fr.hasData())))break}}}return Ge},Y.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var te in this._tiles){for(var me=[],Ge=void 0,Le=this._tiles[te].tileID;Le.overscaledZ>0;){if(Le.key in this._loadedParentTiles){Ge=this._loadedParentTiles[Le.key];break}me.push(Le.key);var $e=Le.scaledTo(Le.overscaledZ-1);if(Ge=this._getLoadedTile($e),Ge)break;Le=$e}for(var mt=0,jt=me;mt<jt.length;mt+=1){var _r=jt[mt];this._loadedParentTiles[_r]=Ge}}},Y.prototype._addTile=function(te){var me=this._tiles[te.key];if(me)return me;me=this._cache.getAndRemove(te),me&&(this._setTileReloadTimer(te.key,me),me.tileID=te,this._state.initializeTileState(me,this.map?this.map.painter:null),this._cacheTimers[te.key]&&(clearTimeout(this._cacheTimers[te.key]),delete this._cacheTimers[te.key],this._setTileReloadTimer(te.key,me)));var Ge=!!me;return Ge||(me=new e.Tile(te,this._source.tileSize*te.overscaleFactor()),this._loadTile(me,this._tileLoaded.bind(this,me,te.key,me.state))),me?(me.uses++,this._tiles[te.key]=me,Ge||this._source.fire(new e.Event("dataloading",{tile:me,coord:me.tileID,dataType:"source"})),me):null},Y.prototype._setTileReloadTimer=function(te,me){var Ge=this;te in this._timers&&(clearTimeout(this._timers[te]),delete this._timers[te]);var Le=me.getExpiryTimeout();Le&&(this._timers[te]=setTimeout(function(){Ge._reloadTile(te,"expired"),delete Ge._timers[te]},Le))},Y.prototype._removeTile=function(te){var me=this._tiles[te];me&&(me.uses--,delete this._tiles[te],this._timers[te]&&(clearTimeout(this._timers[te]),delete this._timers[te]),!(me.uses>0)&&(me.hasData()&&me.state!=="reloading"?this._cache.add(me.tileID,me,me.getExpiryTimeout()):(me.aborted=!0,this._abortTile(me),this._unloadTile(me))))},Y.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var te in this._tiles)this._removeTile(te);this._cache.reset()},Y.prototype.tilesIn=function(te,me,Ge){var Le=this,$e=[],mt=this.transform;if(!mt)return $e;for(var jt=Ge?mt.getCameraQueryGeometry(te):te,_r=te.map(function(or){return mt.pointCoordinate(or)}),Fr=jt.map(function(or){return mt.pointCoordinate(or)}),hr=this.getIds(),gt=1/0,Et=1/0,Ft=-1/0,ir=-1/0,fr=0,sr=Fr;fr<sr.length;fr+=1){var pr=sr[fr];gt=Math.min(gt,pr.x),Et=Math.min(Et,pr.y),Ft=Math.max(Ft,pr.x),ir=Math.max(ir,pr.y)}for(var lr=function(or){var qt=Le._tiles[hr[or]];if(!qt.holdingForFade()){var Dr=qt.tileID,Jr=Math.pow(2,mt.zoom-qt.tileID.overscaledZ),ba=me*qt.queryPadding*e.EXTENT/qt.tileSize/Jr,yi=[Dr.getTilePoint(new e.MercatorCoordinate(gt,Et)),Dr.getTilePoint(new e.MercatorCoordinate(Ft,ir))];if(yi[0].x-ba<e.EXTENT&&yi[0].y-ba<e.EXTENT&&yi[1].x+ba>=0&&yi[1].y+ba>=0){var Xa=_r.map(function(Ji){return Dr.getTilePoint(Ji)}),si=Fr.map(function(Ji){return Dr.getTilePoint(Ji)});$e.push({tile:qt,tileID:Dr,queryGeometry:Xa,cameraQueryGeometry:si,scale:Jr})}}},Xt=0;Xt<hr.length;Xt++)lr(Xt);return $e},Y.prototype.getVisibleCoordinates=function(te){for(var me=this,Ge=this.getRenderableIds(te).map(function(jt){return me._tiles[jt].tileID}),Le=0,$e=Ge;Le<$e.length;Le+=1){var mt=$e[Le];mt.posMatrix=this.transform.calculatePosMatrix(mt.toUnwrapped())}return Ge},Y.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ia(this._source.type))for(var te in this._tiles){var me=this._tiles[te];if(me.fadeEndTime!==void 0&&me.fadeEndTime>=e.browser.now())return!0}return!1},Y.prototype.setFeatureState=function(te,me,Ge){te=te||"_geojsonTileLayer",this._state.updateState(te,me,Ge)},Y.prototype.removeFeatureState=function(te,me,Ge){te=te||"_geojsonTileLayer",this._state.removeFeatureState(te,me,Ge)},Y.prototype.getFeatureState=function(te,me){return te=te||"_geojsonTileLayer",this._state.getState(te,me)},Y.prototype.setDependencies=function(te,me,Ge){var Le=this._tiles[te];Le&&Le.setDependencies(me,Ge)},Y.prototype.reloadTilesForDependencies=function(te,me){for(var Ge in this._tiles){var Le=this._tiles[Ge];Le.hasDependency(te,me)&&this._reloadTile(Ge,"reloading")}this._cache.filter(function($e){return!$e.hasDependency(te,me)})},Y}(e.Evented);ma.maxOverzooming=10,ma.maxUnderzooming=3;function ra(ve,Y){var ye=Math.abs(ve.wrap*2)-+(ve.wrap<0),te=Math.abs(Y.wrap*2)-+(Y.wrap<0);return ve.overscaledZ-Y.overscaledZ||te-ye||Y.canonical.y-ve.canonical.y||Y.canonical.x-ve.canonical.x}function Ia(ve){return ve==="raster"||ve==="image"||ve==="video"}function Ha(){return new e.window.Worker(Lo.workerUrl)}var $a="mapboxgl_preloaded_worker_pool",ai=function(){this.active={}};ai.prototype.acquire=function(Y){if(!this.workers)for(this.workers=[];this.workers.length<ai.workerCount;)this.workers.push(new Ha);return this.active[Y]=!0,this.workers.slice()},ai.prototype.release=function(Y){delete this.active[Y],this.numActive()===0&&(this.workers.forEach(function(ye){ye.terminate()}),this.workers=null)},ai.prototype.isPreloaded=function(){return!!this.active[$a]},ai.prototype.numActive=function(){return Object.keys(this.active).length};var mi=Math.floor(e.browser.hardwareConcurrency/2);ai.workerCount=Math.max(Math.min(mi,6),1);var xt;function ct(){return xt||(xt=new ai),xt}function Nr(){var ve=ct();ve.acquire($a)}function Or(){var ve=xt;ve&&(ve.isPreloaded()&&ve.numActive()===1?(ve.release($a),xt=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 Rr(ve,Y){var ye={};for(var te in ve)te!=="ref"&&(ye[te]=ve[te]);return e.refProperties.forEach(function(me){me in Y&&(ye[me]=Y[me])}),ye}function Lr(ve){ve=ve.slice();for(var Y=Object.create(null),ye=0;ye<ve.length;ye++)Y[ve[ye].id]=ve[ye];for(var te=0;te<ve.length;te++)"ref"in ve[te]&&(ve[te]=Rr(ve[te],Y[ve[te].ref]));return ve}function Gr(){var ve={},Y=e.styleSpec.$version;for(var ye in e.styleSpec.$root){var te=e.styleSpec.$root[ye];if(te.required){var me=null;ye==="version"?me=Y:te.type==="array"?me=[]:me={},me!=null&&(ve[ye]=me)}}return ve}var Kr={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 Ur(ve,Y,ye){ye.push({command:Kr.addSource,args:[ve,Y[ve]]})}function aa(ve,Y,ye){Y.push({command:Kr.removeSource,args:[ve]}),ye[ve]=!0}function da(ve,Y,ye,te){aa(ve,ye,te),Ur(ve,Y,ye)}function fa(ve,Y,ye){var te;for(te in ve[ye])if(ve[ye].hasOwnProperty(te)&&te!=="data"&&!e.deepEqual(ve[ye][te],Y[ye][te]))return!1;for(te in Y[ye])if(Y[ye].hasOwnProperty(te)&&te!=="data"&&!e.deepEqual(ve[ye][te],Y[ye][te]))return!1;return!0}function It(ve,Y,ye,te){ve=ve||{},Y=Y||{};var me;for(me in ve)ve.hasOwnProperty(me)&&(Y.hasOwnProperty(me)||aa(me,ye,te));for(me in Y)Y.hasOwnProperty(me)&&(ve.hasOwnProperty(me)?e.deepEqual(ve[me],Y[me])||(ve[me].type==="geojson"&&Y[me].type==="geojson"&&fa(ve,Y,me)?ye.push({command:Kr.setGeoJSONSourceData,args:[me,Y[me].data]}):da(me,Y,ye,te)):Ur(me,Y,ye))}function dr(ve,Y,ye,te,me,Ge){ve=ve||{},Y=Y||{};var Le;for(Le in ve)ve.hasOwnProperty(Le)&&(e.deepEqual(ve[Le],Y[Le])||ye.push({command:Ge,args:[te,Le,Y[Le],me]}));for(Le in Y)!Y.hasOwnProperty(Le)||ve.hasOwnProperty(Le)||e.deepEqual(ve[Le],Y[Le])||ye.push({command:Ge,args:[te,Le,Y[Le],me]})}function kr(ve){return ve.id}function ia(ve,Y){return ve[Y.id]=Y,ve}function Ca(ve,Y,ye){ve=ve||[],Y=Y||[];var te=ve.map(kr),me=Y.map(kr),Ge=ve.reduce(ia,{}),Le=Y.reduce(ia,{}),$e=te.slice(),mt=Object.create(null),jt,_r,Fr,hr,gt,Et,Ft;for(jt=0,_r=0;jt<te.length;jt++)Fr=te[jt],Le.hasOwnProperty(Fr)?_r++:(ye.push({command:Kr.removeLayer,args:[Fr]}),$e.splice($e.indexOf(Fr,_r),1));for(jt=0,_r=0;jt<me.length;jt++)Fr=me[me.length-1-jt],$e[$e.length-1-jt]!==Fr&&(Ge.hasOwnProperty(Fr)?(ye.push({command:Kr.removeLayer,args:[Fr]}),$e.splice($e.lastIndexOf(Fr,$e.length-_r),1)):_r++,Et=$e[$e.length-jt],ye.push({command:Kr.addLayer,args:[Le[Fr],Et]}),$e.splice($e.length-jt,0,Fr),mt[Fr]=!0);for(jt=0;jt<me.length;jt++)if(Fr=me[jt],hr=Ge[Fr],gt=Le[Fr],!(mt[Fr]||e.deepEqual(hr,gt))){if(!e.deepEqual(hr.source,gt.source)||!e.deepEqual(hr["source-layer"],gt["source-layer"])||!e.deepEqual(hr.type,gt.type)){ye.push({command:Kr.removeLayer,args:[Fr]}),Et=$e[$e.lastIndexOf(Fr)+1],ye.push({command:Kr.addLayer,args:[gt,Et]});continue}dr(hr.layout,gt.layout,ye,Fr,null,Kr.setLayoutProperty),dr(hr.paint,gt.paint,ye,Fr,null,Kr.setPaintProperty),e.deepEqual(hr.filter,gt.filter)||ye.push({command:Kr.setFilter,args:[Fr,gt.filter]}),(!e.deepEqual(hr.minzoom,gt.minzoom)||!e.deepEqual(hr.maxzoom,gt.maxzoom))&&ye.push({command:Kr.setLayerZoomRange,args:[Fr,gt.minzoom,gt.maxzoom]});for(Ft in hr)hr.hasOwnProperty(Ft)&&(Ft==="layout"||Ft==="paint"||Ft==="filter"||Ft==="metadata"||Ft==="minzoom"||Ft==="maxzoom"||(Ft.indexOf("paint.")===0?dr(hr[Ft],gt[Ft],ye,Fr,Ft.slice(6),Kr.setPaintProperty):e.deepEqual(hr[Ft],gt[Ft])||ye.push({command:Kr.setLayerProperty,args:[Fr,Ft,gt[Ft]]})));for(Ft in gt)!gt.hasOwnProperty(Ft)||hr.hasOwnProperty(Ft)||Ft==="layout"||Ft==="paint"||Ft==="filter"||Ft==="metadata"||Ft==="minzoom"||Ft==="maxzoom"||(Ft.indexOf("paint.")===0?dr(hr[Ft],gt[Ft],ye,Fr,Ft.slice(6),Kr.setPaintProperty):e.deepEqual(hr[Ft],gt[Ft])||ye.push({command:Kr.setLayerProperty,args:[Fr,Ft,gt[Ft]]}))}}function Fa(ve,Y){if(!ve)return[{command:Kr.setStyle,args:[Y]}];var ye=[];try{if(!e.deepEqual(ve.version,Y.version))return[{command:Kr.setStyle,args:[Y]}];e.deepEqual(ve.center,Y.center)||ye.push({command:Kr.setCenter,args:[Y.center]}),e.deepEqual(ve.zoom,Y.zoom)||ye.push({command:Kr.setZoom,args:[Y.zoom]}),e.deepEqual(ve.bearing,Y.bearing)||ye.push({command:Kr.setBearing,args:[Y.bearing]}),e.deepEqual(ve.pitch,Y.pitch)||ye.push({command:Kr.setPitch,args:[Y.pitch]}),e.deepEqual(ve.sprite,Y.sprite)||ye.push({command:Kr.setSprite,args:[Y.sprite]}),e.deepEqual(ve.glyphs,Y.glyphs)||ye.push({command:Kr.setGlyphs,args:[Y.glyphs]}),e.deepEqual(ve.transition,Y.transition)||ye.push({command:Kr.setTransition,args:[Y.transition]}),e.deepEqual(ve.light,Y.light)||ye.push({command:Kr.setLight,args:[Y.light]});var te={},me=[];It(ve.sources,Y.sources,me,te);var Ge=[];ve.layers&&ve.layers.forEach(function(Le){te[Le.source]?ye.push({command:Kr.removeLayer,args:[Le.id]}):Ge.push(Le)}),ye=ye.concat(me),Ca(Ge,Y.layers,ye)}catch(Le){console.warn("Unable to compute style diff:",Le),ye=[{command:Kr.setStyle,args:[Y]}]}return ye}var Ya=function(Y,ye){this.reset(Y,ye)};Ya.prototype.reset=function(Y,ye){this.points=Y||[],this._distances=[0];for(var te=1;te<this.points.length;te++)this._distances[te]=this._distances[te-1]+this.points[te].dist(this.points[te-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(ye||0,this.length*.5),this.paddedLength=this.length-this.padding*2},Ya.prototype.lerp=function(Y){if(this.points.length===1)return this.points[0];Y=e.clamp(Y,0,1);for(var ye=1,te=this._distances[ye],me=Y*this.paddedLength+this.padding;te<me&&ye<this._distances.length;)te=this._distances[++ye];var Ge=ye-1,Le=this._distances[Ge],$e=te-Le,mt=$e>0?(me-Le)/$e:0;return this.points[Ge].mult(1-mt).add(this.points[ye].mult(mt))};var ha=function(Y,ye,te){var me=this.boxCells=[],Ge=this.circleCells=[];this.xCellCount=Math.ceil(Y/te),this.yCellCount=Math.ceil(ye/te);for(var Le=0;Le<this.xCellCount*this.yCellCount;Le++)me.push([]),Ge.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=Y,this.height=ye,this.xScale=this.xCellCount/Y,this.yScale=this.yCellCount/ye,this.boxUid=0,this.circleUid=0};ha.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ha.prototype.insert=function(Y,ye,te,me,Ge){this._forEachCell(ye,te,me,Ge,this._insertBoxCell,this.boxUid++),this.boxKeys.push(Y),this.bboxes.push(ye),this.bboxes.push(te),this.bboxes.push(me),this.bboxes.push(Ge)},ha.prototype.insertCircle=function(Y,ye,te,me){this._forEachCell(ye-me,te-me,ye+me,te+me,this._insertCircleCell,this.circleUid++),this.circleKeys.push(Y),this.circles.push(ye),this.circles.push(te),this.circles.push(me)},ha.prototype._insertBoxCell=function(Y,ye,te,me,Ge,Le){this.boxCells[Ge].push(Le)},ha.prototype._insertCircleCell=function(Y,ye,te,me,Ge,Le){this.circleCells[Ge].push(Le)},ha.prototype._query=function(Y,ye,te,me,Ge,Le){if(te<0||Y>this.width||me<0||ye>this.height)return Ge?!1:[];var $e=[];if(Y<=0&&ye<=0&&this.width<=te&&this.height<=me){if(Ge)return!0;for(var mt=0;mt<this.boxKeys.length;mt++)$e.push({key:this.boxKeys[mt],x1:this.bboxes[mt*4],y1:this.bboxes[mt*4+1],x2:this.bboxes[mt*4+2],y2:this.bboxes[mt*4+3]});for(var jt=0;jt<this.circleKeys.length;jt++){var _r=this.circles[jt*3],Fr=this.circles[jt*3+1],hr=this.circles[jt*3+2];$e.push({key:this.circleKeys[jt],x1:_r-hr,y1:Fr-hr,x2:_r+hr,y2:Fr+hr})}return Le?$e.filter(Le):$e}else{var gt={hitTest:Ge,seenUids:{box:{},circle:{}}};return this._forEachCell(Y,ye,te,me,this._queryCell,$e,gt,Le),Ge?$e.length>0:$e}},ha.prototype._queryCircle=function(Y,ye,te,me,Ge){var Le=Y-te,$e=Y+te,mt=ye-te,jt=ye+te;if($e<0||Le>this.width||jt<0||mt>this.height)return me?!1:[];var _r=[],Fr={hitTest:me,circle:{x:Y,y:ye,radius:te},seenUids:{box:{},circle:{}}};return this._forEachCell(Le,mt,$e,jt,this._queryCellCircle,_r,Fr,Ge),me?_r.length>0:_r},ha.prototype.query=function(Y,ye,te,me,Ge){return this._query(Y,ye,te,me,!1,Ge)},ha.prototype.hitTest=function(Y,ye,te,me,Ge){return this._query(Y,ye,te,me,!0,Ge)},ha.prototype.hitTestCircle=function(Y,ye,te,me){return this._queryCircle(Y,ye,te,!0,me)},ha.prototype._queryCell=function(Y,ye,te,me,Ge,Le,$e,mt){var jt=$e.seenUids,_r=this.boxCells[Ge];if(_r!==null)for(var Fr=this.bboxes,hr=0,gt=_r;hr<gt.length;hr+=1){var Et=gt[hr];if(!jt.box[Et]){jt.box[Et]=!0;var Ft=Et*4;if(Y<=Fr[Ft+2]&&ye<=Fr[Ft+3]&&te>=Fr[Ft+0]&&me>=Fr[Ft+1]&&(!mt||mt(this.boxKeys[Et]))){if($e.hitTest)return Le.push(!0),!0;Le.push({key:this.boxKeys[Et],x1:Fr[Ft],y1:Fr[Ft+1],x2:Fr[Ft+2],y2:Fr[Ft+3]})}}}var ir=this.circleCells[Ge];if(ir!==null)for(var fr=this.circles,sr=0,pr=ir;sr<pr.length;sr+=1){var lr=pr[sr];if(!jt.circle[lr]){jt.circle[lr]=!0;var Xt=lr*3;if(this._circleAndRectCollide(fr[Xt],fr[Xt+1],fr[Xt+2],Y,ye,te,me)&&(!mt||mt(this.circleKeys[lr]))){if($e.hitTest)return Le.push(!0),!0;var or=fr[Xt],qt=fr[Xt+1],Dr=fr[Xt+2];Le.push({key:this.circleKeys[lr],x1:or-Dr,y1:qt-Dr,x2:or+Dr,y2:qt+Dr})}}}},ha.prototype._queryCellCircle=function(Y,ye,te,me,Ge,Le,$e,mt){var jt=$e.circle,_r=$e.seenUids,Fr=this.boxCells[Ge];if(Fr!==null)for(var hr=this.bboxes,gt=0,Et=Fr;gt<Et.length;gt+=1){var Ft=Et[gt];if(!_r.box[Ft]){_r.box[Ft]=!0;var ir=Ft*4;if(this._circleAndRectCollide(jt.x,jt.y,jt.radius,hr[ir+0],hr[ir+1],hr[ir+2],hr[ir+3])&&(!mt||mt(this.boxKeys[Ft])))return Le.push(!0),!0}}var fr=this.circleCells[Ge];if(fr!==null)for(var sr=this.circles,pr=0,lr=fr;pr<lr.length;pr+=1){var Xt=lr[pr];if(!_r.circle[Xt]){_r.circle[Xt]=!0;var or=Xt*3;if(this._circlesCollide(sr[or],sr[or+1],sr[or+2],jt.x,jt.y,jt.radius)&&(!mt||mt(this.circleKeys[Xt])))return Le.push(!0),!0}}},ha.prototype._forEachCell=function(Y,ye,te,me,Ge,Le,$e,mt){for(var jt=this._convertToXCellCoord(Y),_r=this._convertToYCellCoord(ye),Fr=this._convertToXCellCoord(te),hr=this._convertToYCellCoord(me),gt=jt;gt<=Fr;gt++)for(var Et=_r;Et<=hr;Et++){var Ft=this.xCellCount*Et+gt;if(Ge.call(this,Y,ye,te,me,Ft,Le,$e,mt))return}},ha.prototype._convertToXCellCoord=function(Y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(Y*this.xScale)))},ha.prototype._convertToYCellCoord=function(Y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(Y*this.yScale)))},ha.prototype._circlesCollide=function(Y,ye,te,me,Ge,Le){var $e=me-Y,mt=Ge-ye,jt=te+Le;return jt*jt>$e*$e+mt*mt},ha.prototype._circleAndRectCollide=function(Y,ye,te,me,Ge,Le,$e){var mt=(Le-me)/2,jt=Math.abs(Y-(me+mt));if(jt>mt+te)return!1;var _r=($e-Ge)/2,Fr=Math.abs(ye-(Ge+_r));if(Fr>_r+te)return!1;if(jt<=mt||Fr<=_r)return!0;var hr=jt-mt,gt=Fr-_r;return hr*hr+gt*gt<=te*te};function Da(ve,Y,ye,te,me){var Ge=e.create();return Y?(e.scale(Ge,Ge,[1/me,1/me,1]),ye||e.rotateZ(Ge,Ge,te.angle)):e.multiply(Ge,te.labelPlaneMatrix,ve),Ge}function Xi(ve,Y,ye,te,me){if(Y){var Ge=e.clone(ve);return e.scale(Ge,Ge,[me,me,1]),ye||e.rotateZ(Ge,Ge,-te.angle),Ge}else return te.glCoordMatrix}function Li(ve,Y){var ye=[ve.x,ve.y,0,1];Ts(ye,ye,Y);var te=ye[3];return{point:new e.Point(ye[0]/te,ye[1]/te),signedDistanceFromCamera:te}}function fn(ve,Y){return .5+.5*(ve/Y)}function An(ve,Y){var ye=ve[0]/ve[3],te=ve[1]/ve[3],me=ye>=-Y[0]&&ye<=Y[0]&&te>=-Y[1]&&te<=Y[1];return me}function kn(ve,Y,ye,te,me,Ge,Le,$e){var mt=te?ve.textSizeData:ve.iconSizeData,jt=e.evaluateSizeForZoom(mt,ye.transform.zoom),_r=[256/ye.width*2+1,256/ye.height*2+1],Fr=te?ve.text.dynamicLayoutVertexArray:ve.icon.dynamicLayoutVertexArray;Fr.clear();for(var hr=ve.lineVertexArray,gt=te?ve.text.placedSymbolArray:ve.icon.placedSymbolArray,Et=ye.transform.width/ye.transform.height,Ft=!1,ir=0;ir<gt.length;ir++){var fr=gt.get(ir);if(fr.hidden||fr.writingMode===e.WritingMode.vertical&&!Ft){Xo(fr.numGlyphs,Fr);continue}Ft=!1;var sr=[fr.anchorX,fr.anchorY,0,1];if(e.transformMat4(sr,sr,Y),!An(sr,_r)){Xo(fr.numGlyphs,Fr);continue}var pr=sr[3],lr=fn(ye.transform.cameraToCenterDistance,pr),Xt=e.evaluateSizeForFeature(mt,jt,fr),or=Le?Xt/lr:Xt*lr,qt=new e.Point(fr.anchorX,fr.anchorY),Dr=Li(qt,me).point,Jr={},ba=to(fr,or,!1,$e,Y,me,Ge,ve.glyphOffsetArray,hr,Fr,Dr,qt,Jr,Et);Ft=ba.useVertical,(ba.notEnoughRoom||Ft||ba.needsFlipping&&to(fr,or,!0,$e,Y,me,Ge,ve.glyphOffsetArray,hr,Fr,Dr,qt,Jr,Et).notEnoughRoom)&&Xo(fr.numGlyphs,Fr)}te?ve.text.dynamicLayoutVertexBuffer.updateData(Fr):ve.icon.dynamicLayoutVertexBuffer.updateData(Fr)}function zn(ve,Y,ye,te,me,Ge,Le,$e,mt,jt,_r){var Fr=$e.glyphStartIndex+$e.numGlyphs,hr=$e.lineStartIndex,gt=$e.lineStartIndex+$e.lineLength,Et=Y.getoffsetX($e.glyphStartIndex),Ft=Y.getoffsetX(Fr-1),ir=pn(ve*Et,ye,te,me,Ge,Le,$e.segment,hr,gt,mt,jt,_r);if(!ir)return null;var fr=pn(ve*Ft,ye,te,me,Ge,Le,$e.segment,hr,gt,mt,jt,_r);return fr?{first:ir,last:fr}:null}function Xn(ve,Y,ye,te){if(ve===e.WritingMode.horizontal){var me=Math.abs(ye.y-Y.y),Ge=Math.abs(ye.x-Y.x)*te;if(me>Ge)return{useVertical:!0}}return(ve===e.WritingMode.vertical?Y.y<ye.y:Y.x>ye.x)?{needsFlipping:!0}:null}function to(ve,Y,ye,te,me,Ge,Le,$e,mt,jt,_r,Fr,hr,gt){var Et=Y/24,Ft=ve.lineOffsetX*Et,ir=ve.lineOffsetY*Et,fr;if(ve.numGlyphs>1){var sr=ve.glyphStartIndex+ve.numGlyphs,pr=ve.lineStartIndex,lr=ve.lineStartIndex+ve.lineLength,Xt=zn(Et,$e,Ft,ir,ye,_r,Fr,ve,mt,Ge,hr);if(!Xt)return{notEnoughRoom:!0};var or=Li(Xt.first.point,Le).point,qt=Li(Xt.last.point,Le).point;if(te&&!ye){var Dr=Xn(ve.writingMode,or,qt,gt);if(Dr)return Dr}fr=[Xt.first];for(var Jr=ve.glyphStartIndex+1;Jr<sr-1;Jr++)fr.push(pn(Et*$e.getoffsetX(Jr),Ft,ir,ye,_r,Fr,ve.segment,pr,lr,mt,Ge,hr));fr.push(Xt.last)}else{if(te&&!ye){var ba=Li(Fr,me).point,yi=ve.lineStartIndex+ve.segment+1,Xa=new e.Point(mt.getx(yi),mt.gety(yi)),si=Li(Xa,me),Ji=si.signedDistanceFromCamera>0?si.point:mo(Fr,Xa,ba,1,me),Bi=Xn(ve.writingMode,ba,Ji,gt);if(Bi)return Bi}var pi=pn(Et*$e.getoffsetX(ve.glyphStartIndex),Ft,ir,ye,_r,Fr,ve.segment,ve.lineStartIndex,ve.lineStartIndex+ve.lineLength,mt,Ge,hr);if(!pi)return{notEnoughRoom:!0};fr=[pi]}for(var wi=0,Mi=fr;wi<Mi.length;wi+=1){var Vi=Mi[wi];e.addDynamicAttributes(jt,Vi.point,Vi.angle)}return{}}function mo(ve,Y,ye,te,me){var Ge=Li(ve.add(ve.sub(Y)._unit()),me).point,Le=ye.sub(Ge);return ye.add(Le._mult(te/Le.mag()))}function pn(ve,Y,ye,te,me,Ge,Le,$e,mt,jt,_r,Fr){var hr=te?ve-Y:ve+Y,gt=hr>0?1:-1,Et=0;te&&(gt*=-1,Et=Math.PI),gt<0&&(Et+=Math.PI);for(var Ft=gt>0?$e+Le:$e+Le+1,ir=me,fr=me,sr=0,pr=0,lr=Math.abs(hr),Xt=[];sr+pr<=lr;){if(Ft+=gt,Ft<$e||Ft>=mt)return null;if(fr=ir,Xt.push(ir),ir=Fr[Ft],ir===void 0){var or=new e.Point(jt.getx(Ft),jt.gety(Ft)),qt=Li(or,_r);if(qt.signedDistanceFromCamera>0)ir=Fr[Ft]=qt.point;else{var Dr=Ft-gt,Jr=sr===0?Ge:new e.Point(jt.getx(Dr),jt.gety(Dr));ir=mo(Jr,or,fr,lr-sr+1,_r)}}sr+=pr,pr=fr.dist(ir)}var ba=(lr-sr)/pr,yi=ir.sub(fr),Xa=yi.mult(ba)._add(fr);Xa._add(yi._unit()._perp()._mult(ye*gt));var si=Et+Math.atan2(ir.y-fr.y,ir.x-fr.x);return Xt.push(Xa),{point:Xa,angle:si,path:Xt}}var Jo=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Xo(ve,Y){for(var ye=0;ye<ve;ye++){var te=Y.length;Y.resize(te+4),Y.float32.set(Jo,te*3)}}function Ts(ve,Y,ye){var te=Y[0],me=Y[1];return ve[0]=ye[0]*te+ye[4]*me+ye[12],ve[1]=ye[1]*te+ye[5]*me+ye[13],ve[3]=ye[3]*te+ye[7]*me+ye[15],ve}var Po=100,so=function(Y,ye,te){ye===void 0&&(ye=new ha(Y.width+2*Po,Y.height+2*Po,25)),te===void 0&&(te=new ha(Y.width+2*Po,Y.height+2*Po,25)),this.transform=Y,this.grid=ye,this.ignoredGrid=te,this.pitchfactor=Math.cos(Y._pitch)*Y.cameraToCenterDistance,this.screenRightBoundary=Y.width+Po,this.screenBottomBoundary=Y.height+Po,this.gridRightBoundary=Y.width+2*Po,this.gridBottomBoundary=Y.height+2*Po};so.prototype.placeCollisionBox=function(Y,ye,te,me,Ge){var Le=this.projectAndGetPerspectiveRatio(me,Y.anchorPointX,Y.anchorPointY),$e=te*Le.perspectiveRatio,mt=Y.x1*$e+Le.point.x,jt=Y.y1*$e+Le.point.y,_r=Y.x2*$e+Le.point.x,Fr=Y.y2*$e+Le.point.y;return!this.isInsideGrid(mt,jt,_r,Fr)||!ye&&this.grid.hitTest(mt,jt,_r,Fr,Ge)?{box:[],offscreen:!1}:{box:[mt,jt,_r,Fr],offscreen:this.isOffscreen(mt,jt,_r,Fr)}},so.prototype.placeCollisionCircles=function(Y,ye,te,me,Ge,Le,$e,mt,jt,_r,Fr,hr,gt){var Et=[],Ft=new e.Point(ye.anchorX,ye.anchorY),ir=Li(Ft,Le),fr=fn(this.transform.cameraToCenterDistance,ir.signedDistanceFromCamera),sr=_r?Ge/fr:Ge*fr,pr=sr/e.ONE_EM,lr=Li(Ft,$e).point,Xt={},or=ye.lineOffsetX*pr,qt=ye.lineOffsetY*pr,Dr=zn(pr,me,or,qt,!1,lr,Ft,ye,te,$e,Xt),Jr=!1,ba=!1,yi=!0;if(Dr){for(var Xa=hr*.5*fr+gt,si=new e.Point(-Po,-Po),Ji=new e.Point(this.screenRightBoundary,this.screenBottomBoundary),Bi=new Ya,pi=Dr.first,wi=Dr.last,Mi=[],Vi=pi.path.length-1;Vi>=1;Vi--)Mi.push(pi.path[Vi]);for(var cn=1;cn<wi.path.length;cn++)Mi.push(wi.path[cn]);var xo=Xa*2.5;if(mt){var jo=Mi.map(function(kp){return Li(kp,mt)});jo.some(function(kp){return kp.signedDistanceFromCamera<=0})?Mi=[]:Mi=jo.map(function(kp){return kp.point})}var ks=[];if(Mi.length>0){for(var Fo=Mi[0].clone(),bs=Mi[0].clone(),Hs=1;Hs<Mi.length;Hs++)Fo.x=Math.min(Fo.x,Mi[Hs].x),Fo.y=Math.min(Fo.y,Mi[Hs].y),bs.x=Math.max(bs.x,Mi[Hs].x),bs.y=Math.max(bs.y,Mi[Hs].y);Fo.x>=si.x&&bs.x<=Ji.x&&Fo.y>=si.y&&bs.y<=Ji.y?ks=[Mi]:bs.x<si.x||Fo.x>Ji.x||bs.y<si.y||Fo.y>Ji.y?ks=[]:ks=e.clipLine([Mi],si.x,si.y,Ji.x,Ji.y)}for(var pu=0,Mp=ks;pu<Mp.length;pu+=1){var Ep=Mp[pu];Bi.reset(Ep,Xa*.25);var Ph=0;Bi.length<=.5*Xa?Ph=1:Ph=Math.ceil(Bi.paddedLength/xo)+1;for(var qp=0;qp<Ph;qp++){var qd=qp/Math.max(Ph-1,1),td=Bi.lerp(qd),Ih=td.x+Po,rd=td.y+Po;Et.push(Ih,rd,Xa,0);var Kh=Ih-Xa,Rh=rd-Xa,Cp=Ih+Xa,Vp=rd+Xa;if(yi=yi&&this.isOffscreen(Kh,Rh,Cp,Vp),ba=ba||this.isInsideGrid(Kh,Rh,Cp,Vp),!Y&&this.grid.hitTestCircle(Ih,rd,Xa,Fr)&&(Jr=!0,!jt))return{circles:[],offscreen:!1,collisionDetected:Jr}}}}return{circles:!jt&&Jr||!ba?[]:Et,offscreen:yi,collisionDetected:Jr}},so.prototype.queryRenderedSymbols=function(Y){if(Y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var ye=[],te=1/0,me=1/0,Ge=-1/0,Le=-1/0,$e=0,mt=Y;$e<mt.length;$e+=1){var jt=mt[$e],_r=new e.Point(jt.x+Po,jt.y+Po);te=Math.min(te,_r.x),me=Math.min(me,_r.y),Ge=Math.max(Ge,_r.x),Le=Math.max(Le,_r.y),ye.push(_r)}for(var Fr=this.grid.query(te,me,Ge,Le).concat(this.ignoredGrid.query(te,me,Ge,Le)),hr={},gt={},Et=0,Ft=Fr;Et<Ft.length;Et+=1){var ir=Ft[Et],fr=ir.key;if(hr[fr.bucketInstanceId]===void 0&&(hr[fr.bucketInstanceId]={}),!hr[fr.bucketInstanceId][fr.featureIndex]){var sr=[new e.Point(ir.x1,ir.y1),new e.Point(ir.x2,ir.y1),new e.Point(ir.x2,ir.y2),new e.Point(ir.x1,ir.y2)];e.polygonIntersectsPolygon(ye,sr)&&(hr[fr.bucketInstanceId][fr.featureIndex]=!0,gt[fr.bucketInstanceId]===void 0&&(gt[fr.bucketInstanceId]=[]),gt[fr.bucketInstanceId].push(fr.featureIndex))}}return gt},so.prototype.insertCollisionBox=function(Y,ye,te,me,Ge){var Le=ye?this.ignoredGrid:this.grid,$e={bucketInstanceId:te,featureIndex:me,collisionGroupID:Ge};Le.insert($e,Y[0],Y[1],Y[2],Y[3])},so.prototype.insertCollisionCircles=function(Y,ye,te,me,Ge){for(var Le=ye?this.ignoredGrid:this.grid,$e={bucketInstanceId:te,featureIndex:me,collisionGroupID:Ge},mt=0;mt<Y.length;mt+=4)Le.insertCircle($e,Y[mt],Y[mt+1],Y[mt+2])},so.prototype.projectAndGetPerspectiveRatio=function(Y,ye,te){var me=[ye,te,0,1];Ts(me,me,Y);var Ge=new e.Point((me[0]/me[3]+1)/2*this.transform.width+Po,(-me[1]/me[3]+1)/2*this.transform.height+Po);return{point:Ge,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/me[3])}},so.prototype.isOffscreen=function(Y,ye,te,me){return te<Po||Y>=this.screenRightBoundary||me<Po||ye>this.screenBottomBoundary},so.prototype.isInsideGrid=function(Y,ye,te,me){return te>=0&&Y<this.gridRightBoundary&&me>=0&&ye<this.gridBottomBoundary},so.prototype.getViewportMatrix=function(){var Y=e.identity([]);return e.translate(Y,Y,[-Po,-Po,0]),Y};function Vn(ve,Y,ye){return Y*(e.EXTENT/(ve.tileSize*Math.pow(2,ye-ve.tileID.overscaledZ)))}var To=function(Y,ye,te,me){Y?this.opacity=Math.max(0,Math.min(1,Y.opacity+(Y.placed?ye:-ye))):this.opacity=me&&te?1:0,this.placed=te};To.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var qo=function(Y,ye,te,me,Ge){this.text=new To(Y?Y.text:null,ye,te,Ge),this.icon=new To(Y?Y.icon:null,ye,me,Ge)};qo.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Oo=function(Y,ye,te){this.text=Y,this.icon=ye,this.skipFade=te},lo=function(){this.invProjMatrix=e.create(),this.viewportMatrix=e.create(),this.circles=[]},Co=function(Y,ye,te,me,Ge){this.bucketInstanceId=Y,this.featureIndex=ye,this.sourceLayerIndex=te,this.bucketIndex=me,this.tileID=Ge},os=function(Y){this.crossSourceCollisions=Y,this.maxGroupID=0,this.collisionGroups={}};os.prototype.get=function(Y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[Y]){var ye=++this.maxGroupID;this.collisionGroups[Y]={ID:ye,predicate:function(te){return te.collisionGroupID===ye}}}return this.collisionGroups[Y]};function Ys(ve,Y,ye,te,me){var Ge=e.getAnchorAlignment(ve),Le=Ge.horizontalAlign,$e=Ge.verticalAlign,mt=-(Le-.5)*Y,jt=-($e-.5)*ye,_r=e.evaluateVariableOffset(ve,te);return new e.Point(mt+_r[0]*me,jt+_r[1]*me)}function Os(ve,Y,ye,te,me,Ge){var Le=ve.x1,$e=ve.x2,mt=ve.y1,jt=ve.y2,_r=ve.anchorPointX,Fr=ve.anchorPointY,hr=new e.Point(Y,ye);return te&&hr._rotate(me?Ge:-Ge),{x1:Le+hr.x,y1:mt+hr.y,x2:$e+hr.x,y2:jt+hr.y,anchorPointX:_r,anchorPointY:Fr}}var Yo=function(Y,ye,te,me){this.transform=Y.clone(),this.collisionIndex=new so(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ye,this.retainedQueryData={},this.collisionGroups=new os(te),this.collisionCircleArrays={},this.prevPlacement=me,me&&(me.prevPlacement=void 0),this.placedOrientations={}};Yo.prototype.getBucketParts=function(Y,ye,te,me){var Ge=te.getBucket(ye),Le=te.latestFeatureIndex;if(!(!Ge||!Le||ye.id!==Ge.layerIds[0])){var $e=te.collisionBoxArray,mt=Ge.layers[0].layout,jt=Math.pow(2,this.transform.zoom-te.tileID.overscaledZ),_r=te.tileSize/e.EXTENT,Fr=this.transform.calculatePosMatrix(te.tileID.toUnwrapped()),hr=mt.get("text-pitch-alignment")==="map",gt=mt.get("text-rotation-alignment")==="map",Et=Vn(te,1,this.transform.zoom),Ft=Da(Fr,hr,gt,this.transform,Et),ir=null;if(hr){var fr=Xi(Fr,hr,gt,this.transform,Et);ir=e.multiply([],this.transform.labelPlaneMatrix,fr)}this.retainedQueryData[Ge.bucketInstanceId]=new Co(Ge.bucketInstanceId,Le,Ge.sourceLayerIndex,Ge.index,te.tileID);var sr={bucket:Ge,layout:mt,posMatrix:Fr,textLabelPlaneMatrix:Ft,labelToScreenMatrix:ir,scale:jt,textPixelRatio:_r,holdingForFade:te.holdingForFade(),collisionBoxArray:$e,partiallyEvaluatedTextSize:e.evaluateSizeForZoom(Ge.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Ge.sourceID)};if(me)for(var pr=0,lr=Ge.sortKeyRanges;pr<lr.length;pr+=1){var Xt=lr[pr],or=Xt.sortKey,qt=Xt.symbolInstanceStart,Dr=Xt.symbolInstanceEnd;Y.push({sortKey:or,symbolInstanceStart:qt,symbolInstanceEnd:Dr,parameters:sr})}else Y.push({symbolInstanceStart:0,symbolInstanceEnd:Ge.symbolInstances.length,parameters:sr})}},Yo.prototype.attemptAnchorPlacement=function(Y,ye,te,me,Ge,Le,$e,mt,jt,_r,Fr,hr,gt,Et,Ft){var ir=[hr.textOffset0,hr.textOffset1],fr=Ys(Y,te,me,ir,Ge),sr=this.collisionIndex.placeCollisionBox(Os(ye,fr.x,fr.y,Le,$e,this.transform.angle),Fr,mt,jt,_r.predicate);if(Ft){var pr=this.collisionIndex.placeCollisionBox(Os(Ft,fr.x,fr.y,Le,$e,this.transform.angle),Fr,mt,jt,_r.predicate);if(pr.box.length===0)return}if(sr.box.length>0){var lr;return this.prevPlacement&&this.prevPlacement.variableOffsets[hr.crossTileID]&&this.prevPlacement.placements[hr.crossTileID]&&this.prevPlacement.placements[hr.crossTileID].text&&(lr=this.prevPlacement.variableOffsets[hr.crossTileID].anchor),this.variableOffsets[hr.crossTileID]={textOffset:ir,width:te,height:me,anchor:Y,textBoxScale:Ge,prevAnchor:lr},this.markUsedJustification(gt,Y,hr,Et),gt.allowVerticalPlacement&&(this.markUsedOrientation(gt,Et,hr),this.placedOrientations[hr.crossTileID]=Et),{shift:fr,placedGlyphBoxes:sr}}},Yo.prototype.placeLayerBucketPart=function(Y,ye,te){var me=this,Ge=Y.parameters,Le=Ge.bucket,$e=Ge.layout,mt=Ge.posMatrix,jt=Ge.textLabelPlaneMatrix,_r=Ge.labelToScreenMatrix,Fr=Ge.textPixelRatio,hr=Ge.holdingForFade,gt=Ge.collisionBoxArray,Et=Ge.partiallyEvaluatedTextSize,Ft=Ge.collisionGroup,ir=$e.get("text-optional"),fr=$e.get("icon-optional"),sr=$e.get("text-allow-overlap"),pr=$e.get("icon-allow-overlap"),lr=$e.get("text-rotation-alignment")==="map",Xt=$e.get("text-pitch-alignment")==="map",or=$e.get("icon-text-fit")!=="none",qt=$e.get("symbol-z-order")==="viewport-y",Dr=sr&&(pr||!Le.hasIconData()||fr),Jr=pr&&(sr||!Le.hasTextData()||ir);!Le.collisionArrays&&gt&&Le.deserializeCollisionBoxes(gt);var ba=function(pi,wi){if(!ye[pi.crossTileID]){if(hr){me.placements[pi.crossTileID]=new Oo(!1,!1,!1);return}var Mi=!1,Vi=!1,cn=!0,xo=null,jo={box:null,offscreen:null},ks={box:null,offscreen:null},Fo=null,bs=null,Hs=null,pu=0,Mp=0,Ep=0;wi.textFeatureIndex?pu=wi.textFeatureIndex:pi.useRuntimeCollisionCircles&&(pu=pi.featureIndex),wi.verticalTextFeatureIndex&&(Mp=wi.verticalTextFeatureIndex);var Ph=wi.textBox;if(Ph){var qp=function(cc){var lu=e.WritingMode.horizontal;if(Le.allowVerticalPlacement&&!cc&&me.prevPlacement){var Dh=me.prevPlacement.placedOrientations[pi.crossTileID];Dh&&(me.placedOrientations[pi.crossTileID]=Dh,lu=Dh,me.markUsedOrientation(Le,lu,pi))}return lu},qd=function(cc,lu){if(Le.allowVerticalPlacement&&pi.numVerticalGlyphVertices>0&&wi.verticalTextBox)for(var Dh=0,Iv=Le.writingModes;Dh<Iv.length;Dh+=1){var om=Iv[Dh];if(om===e.WritingMode.vertical?(jo=lu(),ks=jo):jo=cc(),jo&&jo.box&&jo.box.length)break}else jo=cc()};if($e.get("text-variable-anchor")){var Kh=$e.get("text-variable-anchor");if(me.prevPlacement&&me.prevPlacement.variableOffsets[pi.crossTileID]){var Rh=me.prevPlacement.variableOffsets[pi.crossTileID];Kh.indexOf(Rh.anchor)>0&&(Kh=Kh.filter(function(cc){return cc!==Rh.anchor}),Kh.unshift(Rh.anchor))}var Cp=function(cc,lu,Dh){for(var Iv=cc.x2-cc.x1,om=cc.y2-cc.y1,Au=pi.textBoxScale,x0=or&&!pr?lu:null,sv={box:[],offscreen:!1},_g=sr?Kh.length*2:Kh.length,Lp=0;Lp<_g;++Lp){var lv=Kh[Lp%Kh.length],xg=Lp>=Kh.length,b0=me.attemptAnchorPlacement(lv,cc,Iv,om,Au,lr,Xt,Fr,mt,Ft,xg,pi,Le,Dh,x0);if(b0&&(sv=b0.placedGlyphBoxes,sv&&sv.box&&sv.box.length)){Mi=!0,xo=b0.shift;break}}return sv},Vp=function(){return Cp(Ph,wi.iconBox,e.WritingMode.horizontal)},kp=function(){var cc=wi.verticalTextBox,lu=jo&&jo.box&&jo.box.length;return Le.allowVerticalPlacement&&!lu&&pi.numVerticalGlyphVertices>0&&cc?Cp(cc,wi.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Vp,kp),jo&&(Mi=jo.box,cn=jo.offscreen);var kv=qp(jo&&jo.box);if(!Mi&&me.prevPlacement){var Vd=me.prevPlacement.variableOffsets[pi.crossTileID];Vd&&(me.variableOffsets[pi.crossTileID]=Vd,me.markUsedJustification(Le,Vd.anchor,pi,kv))}}else{var td=function(cc,lu){var Dh=me.collisionIndex.placeCollisionBox(cc,sr,Fr,mt,Ft.predicate);return Dh&&Dh.box&&Dh.box.length&&(me.markUsedOrientation(Le,lu,pi),me.placedOrientations[pi.crossTileID]=lu),Dh},Ih=function(){return td(Ph,e.WritingMode.horizontal)},rd=function(){var cc=wi.verticalTextBox;return Le.allowVerticalPlacement&&pi.numVerticalGlyphVertices>0&&cc?td(cc,e.WritingMode.vertical):{box:null,offscreen:null}};qd(Ih,rd),qp(jo&&jo.box&&jo.box.length)}}if(Fo=jo,Mi=Fo&&Fo.box&&Fo.box.length>0,cn=Fo&&Fo.offscreen,pi.useRuntimeCollisionCircles){var qf=Le.text.placedSymbolArray.get(pi.centerJustifiedTextSymbolIndex),Gd=e.evaluateSizeForFeature(Le.textSizeData,Et,qf),Lv=$e.get("text-padding"),ch=pi.collisionCircleDiameter;bs=me.collisionIndex.placeCollisionCircles(sr,qf,Le.lineVertexArray,Le.glyphOffsetArray,Gd,mt,jt,_r,te,Xt,Ft.predicate,ch,Lv),Mi=sr||bs.circles.length>0&&!bs.collisionDetected,cn=cn&&bs.offscreen}if(wi.iconFeatureIndex&&(Ep=wi.iconFeatureIndex),wi.iconBox){var iv=function(cc){var lu=or&&xo?Os(cc,xo.x,xo.y,lr,Xt,me.transform.angle):cc;return me.collisionIndex.placeCollisionBox(lu,pr,Fr,mt,Ft.predicate)};ks&&ks.box&&ks.box.length&&wi.verticalIconBox?(Hs=iv(wi.verticalIconBox),Vi=Hs.box.length>0):(Hs=iv(wi.iconBox),Vi=Hs.box.length>0),cn=cn&&Hs.offscreen}var im=ir||pi.numHorizontalGlyphVertices===0&&pi.numVerticalGlyphVertices===0,nm=fr||pi.numIconVertices===0;if(!im&&!nm?Vi=Mi=Vi&&Mi:nm?im||(Vi=Vi&&Mi):Mi=Vi&&Mi,Mi&&Fo&&Fo.box&&(ks&&ks.box&&Mp?me.collisionIndex.insertCollisionBox(Fo.box,$e.get("text-ignore-placement"),Le.bucketInstanceId,Mp,Ft.ID):me.collisionIndex.insertCollisionBox(Fo.box,$e.get("text-ignore-placement"),Le.bucketInstanceId,pu,Ft.ID)),Vi&&Hs&&me.collisionIndex.insertCollisionBox(Hs.box,$e.get("icon-ignore-placement"),Le.bucketInstanceId,Ep,Ft.ID),bs&&(Mi&&me.collisionIndex.insertCollisionCircles(bs.circles,$e.get("text-ignore-placement"),Le.bucketInstanceId,pu,Ft.ID),te)){var Pv=Le.bucketInstanceId,nv=me.collisionCircleArrays[Pv];nv===void 0&&(nv=me.collisionCircleArrays[Pv]=new lo);for(var ov=0;ov<bs.circles.length;ov+=4)nv.circles.push(bs.circles[ov+0]),nv.circles.push(bs.circles[ov+1]),nv.circles.push(bs.circles[ov+2]),nv.circles.push(bs.collisionDetected?1:0)}me.placements[pi.crossTileID]=new Oo(Mi||Dr,Vi||Jr,cn||Le.justReloaded),ye[pi.crossTileID]=!0}};if(qt)for(var yi=Le.getSortedSymbolIndexes(this.transform.angle),Xa=yi.length-1;Xa>=0;--Xa){var si=yi[Xa];ba(Le.symbolInstances.get(si),Le.collisionArrays[si])}else for(var Ji=Y.symbolInstanceStart;Ji<Y.symbolInstanceEnd;Ji++)ba(Le.symbolInstances.get(Ji),Le.collisionArrays[Ji]);if(te&&Le.bucketInstanceId in this.collisionCircleArrays){var Bi=this.collisionCircleArrays[Le.bucketInstanceId];e.invert(Bi.invProjMatrix,mt),Bi.viewportMatrix=this.collisionIndex.getViewportMatrix()}Le.justReloaded=!1},Yo.prototype.markUsedJustification=function(Y,ye,te,me){var Ge={left:te.leftJustifiedTextSymbolIndex,center:te.centerJustifiedTextSymbolIndex,right:te.rightJustifiedTextSymbolIndex},Le;me===e.WritingMode.vertical?Le=te.verticalPlacedTextSymbolIndex:Le=Ge[e.getAnchorJustification(ye)];for(var $e=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex,te.verticalPlacedTextSymbolIndex],mt=0,jt=$e;mt<jt.length;mt+=1){var _r=jt[mt];_r>=0&&(Le>=0&&_r!==Le?Y.text.placedSymbolArray.get(_r).crossTileID=0:Y.text.placedSymbolArray.get(_r).crossTileID=te.crossTileID)}},Yo.prototype.markUsedOrientation=function(Y,ye,te){for(var me=ye===e.WritingMode.horizontal||ye===e.WritingMode.horizontalOnly?ye:0,Ge=ye===e.WritingMode.vertical?ye:0,Le=[te.leftJustifiedTextSymbolIndex,te.centerJustifiedTextSymbolIndex,te.rightJustifiedTextSymbolIndex],$e=0,mt=Le;$e<mt.length;$e+=1){var jt=mt[$e];Y.text.placedSymbolArray.get(jt).placedOrientation=me}te.verticalPlacedTextSymbolIndex&&(Y.text.placedSymbolArray.get(te.verticalPlacedTextSymbolIndex).placedOrientation=Ge)},Yo.prototype.commit=function(Y){this.commitTime=Y,this.zoomAtLastRecencyCheck=this.transform.zoom;var ye=this.prevPlacement,te=!1;this.prevZoomAdjustment=ye?ye.zoomAdjustment(this.transform.zoom):0;var me=ye?ye.symbolFadeChange(Y):1,Ge=ye?ye.opacities:{},Le=ye?ye.variableOffsets:{},$e=ye?ye.placedOrientations:{};for(var mt in this.placements){var jt=this.placements[mt],_r=Ge[mt];_r?(this.opacities[mt]=new qo(_r,me,jt.text,jt.icon),te=te||jt.text!==_r.text.placed||jt.icon!==_r.icon.placed):(this.opacities[mt]=new qo(null,me,jt.text,jt.icon,jt.skipFade),te=te||jt.text||jt.icon)}for(var Fr in Ge){var hr=Ge[Fr];if(!this.opacities[Fr]){var gt=new qo(hr,me,!1,!1);gt.isHidden()||(this.opacities[Fr]=gt,te=te||hr.text.placed||hr.icon.placed)}}for(var Et in Le)!this.variableOffsets[Et]&&this.opacities[Et]&&!this.opacities[Et].isHidden()&&(this.variableOffsets[Et]=Le[Et]);for(var Ft in $e)!this.placedOrientations[Ft]&&this.opacities[Ft]&&!this.opacities[Ft].isHidden()&&(this.placedOrientations[Ft]=$e[Ft]);te?this.lastPlacementChangeTime=Y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ye?ye.lastPlacementChangeTime:Y)},Yo.prototype.updateLayerOpacities=function(Y,ye){for(var te={},me=0,Ge=ye;me<Ge.length;me+=1){var Le=Ge[me],$e=Le.getBucket(Y);$e&&Le.latestFeatureIndex&&Y.id===$e.layerIds[0]&&this.updateBucketOpacities($e,te,Le.collisionBoxArray)}},Yo.prototype.updateBucketOpacities=function(Y,ye,te){var me=this;Y.hasTextData()&&Y.text.opacityVertexArray.clear(),Y.hasIconData()&&Y.icon.opacityVertexArray.clear(),Y.hasIconCollisionBoxData()&&Y.iconCollisionBox.collisionVertexArray.clear(),Y.hasTextCollisionBoxData()&&Y.textCollisionBox.collisionVertexArray.clear();var Ge=Y.layers[0].layout,Le=new qo(null,0,!1,!1,!0),$e=Ge.get("text-allow-overlap"),mt=Ge.get("icon-allow-overlap"),jt=Ge.get("text-variable-anchor"),_r=Ge.get("text-rotation-alignment")==="map",Fr=Ge.get("text-pitch-alignment")==="map",hr=Ge.get("icon-text-fit")!=="none",gt=new qo(null,0,$e&&(mt||!Y.hasIconData()||Ge.get("icon-optional")),mt&&($e||!Y.hasTextData()||Ge.get("text-optional")),!0);!Y.collisionArrays&&te&&(Y.hasIconCollisionBoxData()||Y.hasTextCollisionBoxData())&&Y.deserializeCollisionBoxes(te);for(var Et=function(sr,pr,lr){for(var Xt=0;Xt<pr/4;Xt++)sr.opacityVertexArray.emplaceBack(lr)},Ft=function(sr){var pr=Y.symbolInstances.get(sr),lr=pr.numHorizontalGlyphVertices,Xt=pr.numVerticalGlyphVertices,or=pr.crossTileID,qt=ye[or],Dr=me.opacities[or];qt?Dr=Le:Dr||(Dr=gt,me.opacities[or]=Dr),ye[or]=!0;var Jr=lr>0||Xt>0,ba=pr.numIconVertices>0,yi=me.placedOrientations[pr.crossTileID],Xa=yi===e.WritingMode.vertical,si=yi===e.WritingMode.horizontal||yi===e.WritingMode.horizontalOnly;if(Jr){var Ji=rl(Dr.text),Bi=Xa?Sn:Ji;Et(Y.text,lr,Bi);var pi=si?Sn:Ji;Et(Y.text,Xt,pi);var wi=Dr.text.isHidden();[pr.rightJustifiedTextSymbolIndex,pr.centerJustifiedTextSymbolIndex,pr.leftJustifiedTextSymbolIndex].forEach(function(Ep){Ep>=0&&(Y.text.placedSymbolArray.get(Ep).hidden=wi||Xa?1:0)}),pr.verticalPlacedTextSymbolIndex>=0&&(Y.text.placedSymbolArray.get(pr.verticalPlacedTextSymbolIndex).hidden=wi||si?1:0);var Mi=me.variableOffsets[pr.crossTileID];Mi&&me.markUsedJustification(Y,Mi.anchor,pr,yi);var Vi=me.placedOrientations[pr.crossTileID];Vi&&(me.markUsedJustification(Y,"left",pr,Vi),me.markUsedOrientation(Y,Vi,pr))}if(ba){var cn=rl(Dr.icon),xo=!(hr&&pr.verticalPlacedIconSymbolIndex&&Xa);if(pr.placedIconSymbolIndex>=0){var jo=xo?cn:Sn;Et(Y.icon,pr.numIconVertices,jo),Y.icon.placedSymbolArray.get(pr.placedIconSymbolIndex).hidden=Dr.icon.isHidden()}if(pr.verticalPlacedIconSymbolIndex>=0){var ks=xo?Sn:cn;Et(Y.icon,pr.numVerticalIconVertices,ks),Y.icon.placedSymbolArray.get(pr.verticalPlacedIconSymbolIndex).hidden=Dr.icon.isHidden()}}if(Y.hasIconCollisionBoxData()||Y.hasTextCollisionBoxData()){var Fo=Y.collisionArrays[sr];if(Fo){var bs=new e.Point(0,0);if(Fo.textBox||Fo.verticalTextBox){var Hs=!0;if(jt){var pu=me.variableOffsets[or];pu?(bs=Ys(pu.anchor,pu.width,pu.height,pu.textOffset,pu.textBoxScale),_r&&bs._rotate(Fr?me.transform.angle:-me.transform.angle)):Hs=!1}Fo.textBox&&Ui(Y.textCollisionBox.collisionVertexArray,Dr.text.placed,!Hs||Xa,bs.x,bs.y),Fo.verticalTextBox&&Ui(Y.textCollisionBox.collisionVertexArray,Dr.text.placed,!Hs||si,bs.x,bs.y)}var Mp=!!(!si&&Fo.verticalIconBox);Fo.iconBox&&Ui(Y.iconCollisionBox.collisionVertexArray,Dr.icon.placed,Mp,hr?bs.x:0,hr?bs.y:0),Fo.verticalIconBox&&Ui(Y.iconCollisionBox.collisionVertexArray,Dr.icon.placed,!Mp,hr?bs.x:0,hr?bs.y:0)}}},ir=0;ir<Y.symbolInstances.length;ir++)Ft(ir);if(Y.sortFeatures(this.transform.angle),this.retainedQueryData[Y.bucketInstanceId]&&(this.retainedQueryData[Y.bucketInstanceId].featureSortOrder=Y.featureSortOrder),Y.hasTextData()&&Y.text.opacityVertexBuffer&&Y.text.opacityVertexBuffer.updateData(Y.text.opacityVertexArray),Y.hasIconData()&&Y.icon.opacityVertexBuffer&&Y.icon.opacityVertexBuffer.updateData(Y.icon.opacityVertexArray),Y.hasIconCollisionBoxData()&&Y.iconCollisionBox.collisionVertexBuffer&&Y.iconCollisionBox.collisionVertexBuffer.updateData(Y.iconCollisionBox.collisionVertexArray),Y.hasTextCollisionBoxData()&&Y.textCollisionBox.collisionVertexBuffer&&Y.textCollisionBox.collisionVertexBuffer.updateData(Y.textCollisionBox.collisionVertexArray),Y.bucketInstanceId in this.collisionCircleArrays){var fr=this.collisionCircleArrays[Y.bucketInstanceId];Y.placementInvProjMatrix=fr.invProjMatrix,Y.placementViewportMatrix=fr.viewportMatrix,Y.collisionCircleArray=fr.circles,delete this.collisionCircleArrays[Y.bucketInstanceId]}},Yo.prototype.symbolFadeChange=function(Y){return this.fadeDuration===0?1:(Y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Yo.prototype.zoomAdjustment=function(Y){return Math.max(0,(this.transform.zoom-Y)/1.5)},Yo.prototype.hasTransitions=function(Y){return this.stale||Y-this.lastPlacementChangeTime<this.fadeDuration},Yo.prototype.stillRecent=function(Y,ye){var te=this.zoomAtLastRecencyCheck===ye?1-this.zoomAdjustment(ye):1;return this.zoomAtLastRecencyCheck=ye,this.commitTime+this.fadeDuration*te>Y},Yo.prototype.setStale=function(){this.stale=!0};function Ui(ve,Y,ye,te,me){ve.emplaceBack(Y?1:0,ye?1:0,te||0,me||0),ve.emplaceBack(Y?1:0,ye?1:0,te||0,me||0),ve.emplaceBack(Y?1:0,ye?1:0,te||0,me||0),ve.emplaceBack(Y?1:0,ye?1:0,te||0,me||0)}var Cn=Math.pow(2,25),tl=Math.pow(2,24),Bs=Math.pow(2,17),uo=Math.pow(2,16),$s=Math.pow(2,9),ms=Math.pow(2,8),Is=Math.pow(2,1);function rl(ve){if(ve.opacity===0&&!ve.placed)return 0;if(ve.opacity===1&&ve.placed)return 4294967295;var Y=ve.placed?1:0,ye=Math.floor(ve.opacity*127);return ye*Cn+Y*tl+ye*Bs+Y*uo+ye*$s+Y*ms+ye*Is+Y}var Sn=0,po=function(Y){this._sortAcrossTiles=Y.layout.get("symbol-z-order")!=="viewport-y"&&Y.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};po.prototype.continuePlacement=function(Y,ye,te,me,Ge){for(var Le=this._bucketParts;this._currentTileIndex<Y.length;){var $e=Y[this._currentTileIndex];if(ye.getBucketParts(Le,me,$e,this._sortAcrossTiles),this._currentTileIndex++,Ge())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Le.sort(function(jt,_r){return jt.sortKey-_r.sortKey}));this._currentPartIndex<Le.length;){var mt=Le[this._currentPartIndex];if(ye.placeLayerBucketPart(mt,this._seenCrossTileIDs,te),this._currentPartIndex++,Ge())return!0}return!1};var ro=function(Y,ye,te,me,Ge,Le,$e){this.placement=new Yo(Y,Ge,Le,$e),this._currentPlacementIndex=ye.length-1,this._forceFullPlacement=te,this._showCollisionBoxes=me,this._done=!1};ro.prototype.isDone=function(){return this._done},ro.prototype.continuePlacement=function(Y,ye,te){for(var me=this,Ge=e.browser.now(),Le=function(){var Fr=e.browser.now()-Ge;return me._forceFullPlacement?!1:Fr>2};this._currentPlacementIndex>=0;){var $e=Y[this._currentPlacementIndex],mt=ye[$e],jt=this.placement.collisionIndex.transform.zoom;if(mt.type==="symbol"&&(!mt.minzoom||mt.minzoom<=jt)&&(!mt.maxzoom||mt.maxzoom>jt)){this._inProgressLayer||(this._inProgressLayer=new po(mt));var _r=this._inProgressLayer.continuePlacement(te[mt.source],this.placement,this._showCollisionBoxes,mt,Le);if(_r)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ro.prototype.commit=function(Y){return this.placement.commit(Y),this.placement};var As=512/e.EXTENT/2,al=function(Y,ye,te){this.tileID=Y,this.indexedSymbolInstances={},this.bucketInstanceId=te;for(var me=0;me<ye.length;me++){var Ge=ye.get(me),Le=Ge.key;this.indexedSymbolInstances[Le]||(this.indexedSymbolInstances[Le]=[]),this.indexedSymbolInstances[Le].push({crossTileID:Ge.crossTileID,coord:this.getScaledCoordinates(Ge,Y)})}};al.prototype.getScaledCoordinates=function(Y,ye){var te=ye.canonical.z-this.tileID.canonical.z,me=As/Math.pow(2,te);return{x:Math.floor((ye.canonical.x*e.EXTENT+Y.anchorX)*me),y:Math.floor((ye.canonical.y*e.EXTENT+Y.anchorY)*me)}},al.prototype.findMatches=function(Y,ye,te){for(var me=this.tileID.canonical.z<ye.canonical.z?1:Math.pow(2,this.tileID.canonical.z-ye.canonical.z),Ge=0;Ge<Y.length;Ge++){var Le=Y.get(Ge);if(!Le.crossTileID){var $e=this.indexedSymbolInstances[Le.key];if($e)for(var mt=this.getScaledCoordinates(Le,ye),jt=0,_r=$e;jt<_r.length;jt+=1){var Fr=_r[jt];if(Math.abs(Fr.coord.x-mt.x)<=me&&Math.abs(Fr.coord.y-mt.y)<=me&&!te[Fr.crossTileID]){te[Fr.crossTileID]=!0,Le.crossTileID=Fr.crossTileID;break}}}}};var $n=function(){this.maxCrossTileID=0};$n.prototype.generate=function(){return++this.maxCrossTileID};var zs=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};zs.prototype.handleWrapJump=function(Y){var ye=Math.round((Y-this.lng)/360);if(ye!==0)for(var te in this.indexes){var me=this.indexes[te],Ge={};for(var Le in me){var $e=me[Le];$e.tileID=$e.tileID.unwrapTo($e.tileID.wrap+ye),Ge[$e.tileID.key]=$e}this.indexes[te]=Ge}this.lng=Y},zs.prototype.addBucket=function(Y,ye,te){if(this.indexes[Y.overscaledZ]&&this.indexes[Y.overscaledZ][Y.key]){if(this.indexes[Y.overscaledZ][Y.key].bucketInstanceId===ye.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(Y.overscaledZ,this.indexes[Y.overscaledZ][Y.key])}for(var me=0;me<ye.symbolInstances.length;me++){var Ge=ye.symbolInstances.get(me);Ge.crossTileID=0}this.usedCrossTileIDs[Y.overscaledZ]||(this.usedCrossTileIDs[Y.overscaledZ]={});var Le=this.usedCrossTileIDs[Y.overscaledZ];for(var $e in this.indexes){var mt=this.indexes[$e];if(Number($e)>Y.overscaledZ)for(var jt in mt){var _r=mt[jt];_r.tileID.isChildOf(Y)&&_r.findMatches(ye.symbolInstances,Y,Le)}else{var Fr=Y.scaledTo(Number($e)),hr=mt[Fr.key];hr&&hr.findMatches(ye.symbolInstances,Y,Le)}}for(var gt=0;gt<ye.symbolInstances.length;gt++){var Et=ye.symbolInstances.get(gt);Et.crossTileID||(Et.crossTileID=te.generate(),Le[Et.crossTileID]=!0)}return this.indexes[Y.overscaledZ]===void 0&&(this.indexes[Y.overscaledZ]={}),this.indexes[Y.overscaledZ][Y.key]=new al(Y,ye.symbolInstances,ye.bucketInstanceId),!0},zs.prototype.removeBucketCrossTileIDs=function(Y,ye){for(var te in ye.indexedSymbolInstances)for(var me=0,Ge=ye.indexedSymbolInstances[te];me<Ge.length;me+=1){var Le=Ge[me];delete this.usedCrossTileIDs[Y][Le.crossTileID]}},zs.prototype.removeStaleBuckets=function(Y){var ye=!1;for(var te in this.indexes){var me=this.indexes[te];for(var Ge in me)Y[me[Ge].bucketInstanceId]||(this.removeBucketCrossTileIDs(te,me[Ge]),delete me[Ge],ye=!0)}return ye};var au=function(){this.layerIndexes={},this.crossTileIDs=new $n,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};au.prototype.addLayer=function(Y,ye,te){var me=this.layerIndexes[Y.id];me===void 0&&(me=this.layerIndexes[Y.id]=new zs);var Ge=!1,Le={};me.handleWrapJump(te);for(var $e=0,mt=ye;$e<mt.length;$e+=1){var jt=mt[$e],_r=jt.getBucket(Y);!_r||Y.id!==_r.layerIds[0]||(_r.bucketInstanceId||(_r.bucketInstanceId=++this.maxBucketInstanceId),me.addBucket(jt.tileID,_r,this.crossTileIDs)&&(Ge=!0),Le[_r.bucketInstanceId]=!0)}return me.removeStaleBuckets(Le)&&(Ge=!0),Ge},au.prototype.pruneUnusedLayers=function(Y){var ye={};Y.forEach(function(me){ye[me]=!0});for(var te in this.layerIndexes)ye[te]||delete this.layerIndexes[te]};var fl=function(ve,Y){return e.emitValidationErrors(ve,Y&&Y.filter(function(ye){return ye.identifier!=="source.canvas"}))},xu=e.pick(Kr,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),zl=e.pick(Kr,["setCenter","setZoom","setBearing","setPitch"]),Ns=Gr(),iu=function(ve){function Y(ye,te){var me=this;te===void 0&&(te={}),ve.call(this),this.map=ye,this.dispatcher=new B(ct(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new m(ye._requestManager,te.localIdeographFontFamily),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new au,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());var Ge=this;this._rtlTextPluginCallback=Y.registerForPluginStateChange(function(Le){var $e={pluginStatus:Le.pluginStatus,pluginURL:Le.pluginURL};Ge.dispatcher.broadcast("syncRTLPluginState",$e,function(mt,jt){if(e.triggerPluginCompletionEvent(mt),jt){var _r=jt.every(function(hr){return hr});if(_r)for(var Fr in Ge.sourceCaches)Ge.sourceCaches[Fr].reload()}})}),this.on("data",function(Le){if(!(Le.dataType!=="source"||Le.sourceDataType!=="metadata")){var $e=me.sourceCaches[Le.sourceId];if($e){var mt=$e.getSource();if(!(!mt||!mt.vectorLayerIds))for(var jt in me._layers){var _r=me._layers[jt];_r.source===mt.id&&me._validateLayer(_r)}}}})}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.loadURL=function(te,me){var Ge=this;me===void 0&&(me={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var Le=typeof me.validate=="boolean"?me.validate:!e.isMapboxURL(te);te=this.map._requestManager.normalizeStyleURL(te,me.accessToken);var $e=this.map._requestManager.transformRequest(te,e.ResourceType.Style);this._request=e.getJSON($e,function(mt,jt){Ge._request=null,mt?Ge.fire(new e.ErrorEvent(mt)):jt&&Ge._load(jt,Le)})},Y.prototype.loadJSON=function(te,me){var Ge=this;me===void 0&&(me={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame(function(){Ge._request=null,Ge._load(te,me.validate!==!1)})},Y.prototype.loadEmpty=function(){this.fire(new e.Event("dataloading",{dataType:"style"})),this._load(Ns,!1)},Y.prototype._load=function(te,me){if(!(me&&fl(this,e.validateStyle(te)))){this._loaded=!0,this.stylesheet=te;for(var Ge in te.sources)this.addSource(Ge,te.sources[Ge],{validate:!1});te.sprite?this._loadSprite(te.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(te.glyphs);var Le=Lr(this.stylesheet.layers);this._order=Le.map(function(_r){return _r.id}),this._layers={},this._serializedLayers={};for(var $e=0,mt=Le;$e<mt.length;$e+=1){var jt=mt[$e];jt=e.createStyleLayer(jt),jt.setEventedParent(this,{layer:{id:jt.id}}),this._layers[jt.id]=jt,this._serializedLayers[jt.id]=jt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new z(this.stylesheet.light),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}},Y.prototype._loadSprite=function(te){var me=this;this._spriteRequest=v(te,this.map._requestManager,function(Ge,Le){if(me._spriteRequest=null,Ge)me.fire(new e.ErrorEvent(Ge));else if(Le)for(var $e in Le)me.imageManager.addImage($e,Le[$e]);me.imageManager.setLoaded(!0),me._availableImages=me.imageManager.listImages(),me.dispatcher.broadcast("setImages",me._availableImages),me.fire(new e.Event("data",{dataType:"style"}))})},Y.prototype._validateLayer=function(te){var me=this.sourceCaches[te.source];if(me){var Ge=te.sourceLayer;if(Ge){var Le=me.getSource();(Le.type==="geojson"||Le.vectorLayerIds&&Le.vectorLayerIds.indexOf(Ge)===-1)&&this.fire(new e.ErrorEvent(new Error('Source layer "'+Ge+'" does not exist on source "'+Le.id+'" as specified by style layer "'+te.id+'"')))}}},Y.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var te in this.sourceCaches)if(!this.sourceCaches[te].loaded())return!1;return!!this.imageManager.isLoaded()},Y.prototype._serializeLayers=function(te){for(var me=[],Ge=0,Le=te;Ge<Le.length;Ge+=1){var $e=Le[Ge],mt=this._layers[$e];mt.type!=="custom"&&me.push(mt.serialize())}return me},Y.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var te in this.sourceCaches)if(this.sourceCaches[te].hasTransition())return!0;for(var me in this._layers)if(this._layers[me].hasTransition())return!0;return!1},Y.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},Y.prototype.update=function(te){if(this._loaded){var me=this._changed;if(this._changed){var Ge=Object.keys(this._updatedLayers),Le=Object.keys(this._removedLayers);(Ge.length||Le.length)&&this._updateWorkerLayers(Ge,Le);for(var $e in this._updatedSources){var mt=this._updatedSources[$e];mt==="reload"?this._reloadSource($e):mt==="clear"&&this._clearSource($e)}this._updateTilesForChangedImages();for(var jt in this._updatedPaintProps)this._layers[jt].updateTransitions(te);this.light.updateTransitions(te),this._resetUpdates()}var _r={};for(var Fr in this.sourceCaches){var hr=this.sourceCaches[Fr];_r[Fr]=hr.used,hr.used=!1}for(var gt=0,Et=this._order;gt<Et.length;gt+=1){var Ft=Et[gt],ir=this._layers[Ft];ir.recalculate(te,this._availableImages),!ir.isHidden(te.zoom)&&ir.source&&(this.sourceCaches[ir.source].used=!0)}for(var fr in _r){var sr=this.sourceCaches[fr];_r[fr]!==sr.used&&sr.fire(new e.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:fr}))}this.light.recalculate(te),this.z=te.zoom,me&&this.fire(new e.Event("data",{dataType:"style"}))}},Y.prototype._updateTilesForChangedImages=function(){var te=Object.keys(this._changedImages);if(te.length){for(var me in this.sourceCaches)this.sourceCaches[me].reloadTilesForDependencies(["icons","patterns"],te);this._changedImages={}}},Y.prototype._updateWorkerLayers=function(te,me){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(te),removedIds:me})},Y.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},Y.prototype.setState=function(te){var me=this;if(this._checkLoaded(),fl(this,e.validateStyle(te)))return!1;te=e.clone$1(te),te.layers=Lr(te.layers);var Ge=Fa(this.serialize(),te).filter(function($e){return!($e.command in zl)});if(Ge.length===0)return!1;var Le=Ge.filter(function($e){return!($e.command in xu)});if(Le.length>0)throw new Error("Unimplemented: "+Le.map(function($e){return $e.command}).join(", ")+".");return Ge.forEach(function($e){$e.command!=="setTransition"&&me[$e.command].apply(me,$e.args)}),this.stylesheet=te,!0},Y.prototype.addImage=function(te,me){if(this.getImage(te))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(te,me),this._afterImageUpdated(te)},Y.prototype.updateImage=function(te,me){this.imageManager.updateImage(te,me)},Y.prototype.getImage=function(te){return this.imageManager.getImage(te)},Y.prototype.removeImage=function(te){if(!this.getImage(te))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(te),this._afterImageUpdated(te)},Y.prototype._afterImageUpdated=function(te){this._availableImages=this.imageManager.listImages(),this._changedImages[te]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},Y.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},Y.prototype.addSource=function(te,me,Ge){var Le=this;if(Ge===void 0&&(Ge={}),this._checkLoaded(),this.sourceCaches[te]!==void 0)throw new Error("There is already a source with this ID");if(!me.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(me).join(", ")+".");var $e=["vector","raster","geojson","video","image"],mt=$e.indexOf(me.type)>=0;if(!(mt&&this._validate(e.validateStyle.source,"sources."+te,me,null,Ge))){this.map&&this.map._collectResourceTiming&&(me.collectResourceTiming=!0);var jt=this.sourceCaches[te]=new ma(te,me,this.dispatcher);jt.style=this,jt.setEventedParent(this,function(){return{isSourceLoaded:Le.loaded(),source:jt.serialize(),sourceId:te}}),jt.onAdd(this.map),this._changed=!0}},Y.prototype.removeSource=function(te){if(this._checkLoaded(),this.sourceCaches[te]===void 0)throw new Error("There is no source with this ID");for(var me in this._layers)if(this._layers[me].source===te)return this.fire(new e.ErrorEvent(new Error('Source "'+te+'" cannot be removed while layer "'+me+'" is using it.')));var Ge=this.sourceCaches[te];delete this.sourceCaches[te],delete this._updatedSources[te],Ge.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:te})),Ge.setEventedParent(null),Ge.clearTiles(),Ge.onRemove&&Ge.onRemove(this.map),this._changed=!0},Y.prototype.setGeoJSONSourceData=function(te,me){this._checkLoaded();var Ge=this.sourceCaches[te].getSource();Ge.setData(me),this._changed=!0},Y.prototype.getSource=function(te){return this.sourceCaches[te]&&this.sourceCaches[te].getSource()},Y.prototype.addLayer=function(te,me,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var Le=te.id;if(this.getLayer(Le)){this.fire(new e.ErrorEvent(new Error('Layer with id "'+Le+'" already exists on this map')));return}var $e;if(te.type==="custom"){if(fl(this,e.validateCustomStyleLayer(te)))return;$e=e.createStyleLayer(te)}else{if(typeof te.source=="object"&&(this.addSource(Le,te.source),te=e.clone$1(te),te=e.extend(te,{source:Le})),this._validate(e.validateStyle.layer,"layers."+Le,te,{arrayIndex:-1},Ge))return;$e=e.createStyleLayer(te),this._validateLayer($e),$e.setEventedParent(this,{layer:{id:Le}}),this._serializedLayers[$e.id]=$e.serialize()}var mt=me?this._order.indexOf(me):this._order.length;if(me&&mt===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+me+'" does not exist on this map.')));return}if(this._order.splice(mt,0,Le),this._layerOrderChanged=!0,this._layers[Le]=$e,this._removedLayers[Le]&&$e.source&&$e.type!=="custom"){var jt=this._removedLayers[Le];delete this._removedLayers[Le],jt.type!==$e.type?this._updatedSources[$e.source]="clear":(this._updatedSources[$e.source]="reload",this.sourceCaches[$e.source].pause())}this._updateLayer($e),$e.onAdd&&$e.onAdd(this.map)},Y.prototype.moveLayer=function(te,me){this._checkLoaded(),this._changed=!0;var Ge=this._layers[te];if(!Ge){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be moved.")));return}if(te!==me){var Le=this._order.indexOf(te);this._order.splice(Le,1);var $e=me?this._order.indexOf(me):this._order.length;if(me&&$e===-1){this.fire(new e.ErrorEvent(new Error('Layer with id "'+me+'" does not exist on this map.')));return}this._order.splice($e,0,te),this._layerOrderChanged=!0}},Y.prototype.removeLayer=function(te){this._checkLoaded();var me=this._layers[te];if(!me){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be removed.")));return}me.setEventedParent(null);var Ge=this._order.indexOf(te);this._order.splice(Ge,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[te]=me,delete this._layers[te],delete this._serializedLayers[te],delete this._updatedLayers[te],delete this._updatedPaintProps[te],me.onRemove&&me.onRemove(this.map)},Y.prototype.getLayer=function(te){return this._layers[te]},Y.prototype.hasLayer=function(te){return te in this._layers},Y.prototype.setLayerZoomRange=function(te,me,Ge){this._checkLoaded();var Le=this.getLayer(te);if(!Le){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot have zoom extent.")));return}Le.minzoom===me&&Le.maxzoom===Ge||(me!=null&&(Le.minzoom=me),Ge!=null&&(Le.maxzoom=Ge),this._updateLayer(Le))},Y.prototype.setFilter=function(te,me,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var Le=this.getLayer(te);if(!Le){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be filtered.")));return}if(!e.deepEqual(Le.filter,me)){if(me==null){Le.filter=void 0,this._updateLayer(Le);return}this._validate(e.validateStyle.filter,"layers."+Le.id+".filter",me,null,Ge)||(Le.filter=e.clone$1(me),this._updateLayer(Le))}},Y.prototype.getFilter=function(te){return e.clone$1(this.getLayer(te).filter)},Y.prototype.setLayoutProperty=function(te,me,Ge,Le){Le===void 0&&(Le={}),this._checkLoaded();var $e=this.getLayer(te);if(!$e){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}e.deepEqual($e.getLayoutProperty(me),Ge)||($e.setLayoutProperty(me,Ge,Le),this._updateLayer($e))},Y.prototype.getLayoutProperty=function(te,me){var Ge=this.getLayer(te);if(!Ge){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style.")));return}return Ge.getLayoutProperty(me)},Y.prototype.setPaintProperty=function(te,me,Ge,Le){Le===void 0&&(Le={}),this._checkLoaded();var $e=this.getLayer(te);if(!$e){this.fire(new e.ErrorEvent(new Error("The layer '"+te+"' does not exist in the map's style and cannot be styled.")));return}if(!e.deepEqual($e.getPaintProperty(me),Ge)){var mt=$e.setPaintProperty(me,Ge,Le);mt&&this._updateLayer($e),this._changed=!0,this._updatedPaintProps[te]=!0}},Y.prototype.getPaintProperty=function(te,me){return this.getLayer(te).getPaintProperty(me)},Y.prototype.setFeatureState=function(te,me){this._checkLoaded();var Ge=te.source,Le=te.sourceLayer,$e=this.sourceCaches[Ge];if($e===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ge+"' does not exist in the map's style.")));return}var mt=$e.getSource().type;if(mt==="geojson"&&Le){this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(mt==="vector"&&!Le){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),$e.setFeatureState(Le,te.id,me)},Y.prototype.removeFeatureState=function(te,me){this._checkLoaded();var Ge=te.source,Le=this.sourceCaches[Ge];if(Le===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+Ge+"' does not exist in the map's style.")));return}var $e=Le.getSource().type,mt=$e==="vector"?te.sourceLayer:void 0;if($e==="vector"&&!mt){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(me&&typeof te.id!="string"&&typeof te.id!="number"){this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Le.removeFeatureState(mt,te.id,me)},Y.prototype.getFeatureState=function(te){this._checkLoaded();var me=te.source,Ge=te.sourceLayer,Le=this.sourceCaches[me];if(Le===void 0){this.fire(new e.ErrorEvent(new Error("The source '"+me+"' does not exist in the map's style.")));return}var $e=Le.getSource().type;if($e==="vector"&&!Ge){this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return te.id===void 0&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),Le.getFeatureState(Ge,te.id)},Y.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},Y.prototype.serialize=function(){return e.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:e.mapObject(this.sourceCaches,function(te){return te.serialize()}),layers:this._serializeLayers(this._order)},function(te){return te!==void 0})},Y.prototype._updateLayer=function(te){this._updatedLayers[te.id]=!0,te.source&&!this._updatedSources[te.source]&&this.sourceCaches[te.source].getSource().type!=="raster"&&(this._updatedSources[te.source]="reload",this.sourceCaches[te.source].pause()),this._changed=!0},Y.prototype._flattenAndSortRenderedFeatures=function(te){for(var me=this,Ge=function(si){return me._layers[si].type==="fill-extrusion"},Le={},$e=[],mt=this._order.length-1;mt>=0;mt--){var jt=this._order[mt];if(Ge(jt)){Le[jt]=mt;for(var _r=0,Fr=te;_r<Fr.length;_r+=1){var hr=Fr[_r],gt=hr[jt];if(gt)for(var Et=0,Ft=gt;Et<Ft.length;Et+=1){var ir=Ft[Et];$e.push(ir)}}}}$e.sort(function(si,Ji){return Ji.intersectionZ-si.intersectionZ});for(var fr=[],sr=this._order.length-1;sr>=0;sr--){var pr=this._order[sr];if(Ge(pr))for(var lr=$e.length-1;lr>=0;lr--){var Xt=$e[lr].feature;if(Le[Xt.layer.id]<sr)break;fr.push(Xt),$e.pop()}else for(var or=0,qt=te;or<qt.length;or+=1){var Dr=qt[or],Jr=Dr[pr];if(Jr)for(var ba=0,yi=Jr;ba<yi.length;ba+=1){var Xa=yi[ba];fr.push(Xa.feature)}}}return fr},Y.prototype.queryRenderedFeatures=function(te,me,Ge){me&&me.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",me.filter,null,me);var Le={};if(me&&me.layers){if(!Array.isArray(me.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var $e=0,mt=me.layers;$e<mt.length;$e+=1){var jt=mt[$e],_r=this._layers[jt];if(!_r)return this.fire(new e.ErrorEvent(new Error("The layer '"+jt+"' does not exist in the map's style and cannot be queried for features."))),[];Le[_r.source]=!0}}var Fr=[];me.availableImages=this._availableImages;for(var hr in this.sourceCaches)me.layers&&!Le[hr]||Fr.push(re(this.sourceCaches[hr],this._layers,this._serializedLayers,te,me,Ge));return this.placement&&Fr.push(ce(this._layers,this._serializedLayers,this.sourceCaches,te,me,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Fr)},Y.prototype.querySourceFeatures=function(te,me){me&&me.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",me.filter,null,me);var Ge=this.sourceCaches[te];return Ge?be(Ge,me):[]},Y.prototype.addSourceType=function(te,me,Ge){if(Y.getSourceType(te))return Ge(new Error('A source type called "'+te+'" already exists.'));if(Y.setSourceType(te,me),!me.workerSourceURL)return Ge(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:te,url:me.workerSourceURL},Ge)},Y.prototype.getLight=function(){return this.light.getLight()},Y.prototype.setLight=function(te,me){me===void 0&&(me={}),this._checkLoaded();var Ge=this.light.getLight(),Le=!1;for(var $e in te)if(!e.deepEqual(te[$e],Ge[$e])){Le=!0;break}if(Le){var mt={now:e.browser.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(te,me),this.light.updateTransitions(mt)}},Y.prototype._validate=function(te,me,Ge,Le,$e){return $e===void 0&&($e={}),$e&&$e.validate===!1?!1:fl(this,te.call(e.validateStyle,e.extend({key:me,style:this.serialize(),value:Ge,styleSpec:e.styleSpec},Le)))},Y.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var te in this._layers){var me=this._layers[te];me.setEventedParent(null)}for(var Ge in this.sourceCaches)this.sourceCaches[Ge].clearTiles(),this.sourceCaches[Ge].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},Y.prototype._clearSource=function(te){this.sourceCaches[te].clearTiles()},Y.prototype._reloadSource=function(te){this.sourceCaches[te].resume(),this.sourceCaches[te].reload()},Y.prototype._updateSources=function(te){for(var me in this.sourceCaches)this.sourceCaches[me].update(te)},Y.prototype._generateCollisionBoxes=function(){for(var te in this.sourceCaches)this._reloadSource(te)},Y.prototype._updatePlacement=function(te,me,Ge,Le,$e){$e===void 0&&($e=!1);for(var mt=!1,jt=!1,_r={},Fr=0,hr=this._order;Fr<hr.length;Fr+=1){var gt=hr[Fr],Et=this._layers[gt];if(Et.type==="symbol"){if(!_r[Et.source]){var Ft=this.sourceCaches[Et.source];_r[Et.source]=Ft.getRenderableIds(!0).map(function(or){return Ft.getTileByID(or)}).sort(function(or,qt){return qt.tileID.overscaledZ-or.tileID.overscaledZ||(or.tileID.isLessThan(qt.tileID)?-1:1)})}var ir=this.crossTileSymbolIndex.addLayer(Et,_r[Et.source],te.center.lng);mt=mt||ir}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),$e=$e||this._layerOrderChanged||Ge===0,($e||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now(),te.zoom))&&(this.pauseablePlacement=new ro(te,this._order,$e,me,Ge,Le,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,_r),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.browser.now()),jt=!0),mt&&this.pauseablePlacement.placement.setStale()),jt||mt)for(var fr=0,sr=this._order;fr<sr.length;fr+=1){var pr=sr[fr],lr=this._layers[pr];lr.type==="symbol"&&this.placement.updateLayerOpacities(lr,_r[lr.source])}var Xt=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.browser.now());return Xt},Y.prototype._releaseSymbolFadeTiles=function(){for(var te in this.sourceCaches)this.sourceCaches[te].releaseSymbolFadeTiles()},Y.prototype.getImages=function(te,me,Ge){this.imageManager.getImages(me.icons,Ge),this._updateTilesForChangedImages();var Le=this.sourceCaches[me.source];Le&&Le.setDependencies(me.tileID.key,me.type,me.icons)},Y.prototype.getGlyphs=function(te,me,Ge){this.glyphManager.getGlyphs(me.stacks,Ge)},Y.prototype.getResource=function(te,me,Ge){return e.makeRequest(me,Ge)},Y}(e.Evented);iu.getSourceType=oe,iu.setSourceType=ie,iu.registerForPluginStateChange=e.registerForPluginStateChange;var Eu=e.createLayout([{name:"a_pos",type:"Int16",components:2}]),Bc=`#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`,Cu=`#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;}`,Af=`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
}`,pf="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Us=`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
}`,Vc="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);}",Sf=`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
}`,nu=`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);}`,Ll="void main() {gl_FragColor=vec4(1.0);}",ic="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Ou=`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
}`,il=`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;}`,vl=`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
}`,gs="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;}",Vs="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;}}",nc="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;}",Nl="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;}",qu="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);}",cl="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);}",yh="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);}",ls=`#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
}`,_h=`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);}`,Ss=`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
}`,Qn=`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;}`,Gc=`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
}`,Vu=`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;}`,Ul=`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
}`,Mf=`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);}`,wc=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,rf=`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;}`,Kl=`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
}`,Yf=`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;}`,zf=`#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
}`,af="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;}",Nc=`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
}`,Ff="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;}",Of=`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
}`,Gu=`
#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);}`,Ef=`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
}`,oc=`
#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);}`,Hc=`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
}`,Jl=`
#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;}`,Uc=`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
}`,Tc=`
#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
}`,Cf="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;}",lh=`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
}`,Bf=`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));}`,Wc=`#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
}`,Kf=`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);}`,ku=`#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
}`,Nf=`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);}`,ml=hl(Bc,Cu),Lu=hl(Af,pf),Ac=hl(Us,Vc),nl=hl(Sf,nu),dc=hl(Ll,ic),vu=hl(Ou,il),bu=hl(vl,gs),Ml=hl(Vs,nc),Uf=hl(Nl,qu),Jf=hl(cl,yh),Bu=hl(ls,_h),Sc=hl(Ss,Qn),vc=hl(Gc,Vu),Lh=hl(Ul,Mf),nf=hl(wc,rf),df=hl(Kl,Yf),Nu=hl(zf,af),of=hl(Nc,Ff),tu=hl(Of,Gu),Xc=hl(Ef,oc),uh=hl(Hc,Jl),vf=hl(Uc,Tc),ol=hl(Gs,Cf),mu=hl(lh,Bf),Pu=hl(Wc,Kf),kf=hl(ku,Nf);function hl(ve,Y){var ye=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,te=Y.match(/attribute ([\w]+) ([\w]+)/g),me=ve.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ge=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Le=Ge?Ge.concat(me):me,$e={};return ve=ve.replace(ye,function(mt,jt,_r,Fr,hr){return $e[hr]=!0,jt==="define"?`
#ifndef HAS_UNIFORM_u_`+hr+`
varying `+_r+" "+Fr+" "+hr+`;
#else
uniform `+_r+" "+Fr+" u_"+hr+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+hr+`
`+_r+" "+Fr+" "+hr+" = u_"+hr+`;
#endif
`}),Y=Y.replace(ye,function(mt,jt,_r,Fr,hr){var gt=Fr==="float"?"vec2":"vec4",Et=hr.match(/color/)?"color":gt;return $e[hr]?jt==="define"?`
#ifndef HAS_UNIFORM_u_`+hr+`
uniform lowp float u_`+hr+`_t;
attribute `+_r+" "+gt+" a_"+hr+`;
varying `+_r+" "+Fr+" "+hr+`;
#else
uniform `+_r+" "+Fr+" u_"+hr+`;
#endif
`:Et==="vec4"?`
#ifndef HAS_UNIFORM_u_`+hr+`
`+hr+" = a_"+hr+`;
#else
`+_r+" "+Fr+" "+hr+" = u_"+hr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+hr+`
`+hr+" = unpack_mix_"+Et+"(a_"+hr+", u_"+hr+`_t);
#else
`+_r+" "+Fr+" "+hr+" = u_"+hr+`;
#endif
`:jt==="define"?`
#ifndef HAS_UNIFORM_u_`+hr+`
uniform lowp float u_`+hr+`_t;
attribute `+_r+" "+gt+" a_"+hr+`;
#else
uniform `+_r+" "+Fr+" u_"+hr+`;
#endif
`:Et==="vec4"?`
#ifndef HAS_UNIFORM_u_`+hr+`
`+_r+" "+Fr+" "+hr+" = a_"+hr+`;
#else
`+_r+" "+Fr+" "+hr+" = u_"+hr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+hr+`
`+_r+" "+Fr+" "+hr+" = unpack_mix_"+Et+"(a_"+hr+", u_"+hr+`_t);
#else
`+_r+" "+Fr+" "+hr+" = u_"+hr+`;
#endif
`}),{fragmentSource:ve,vertexSource:Y,staticAttributes:te,staticUniforms:Le}}var sf=Object.freeze({__proto__:null,prelude:ml,background:Lu,backgroundPattern:Ac,circle:nl,clippingMask:dc,heatmap:vu,heatmapTexture:bu,collisionBox:Ml,collisionCircle:Uf,debug:Jf,fill:Bu,fillOutline:Sc,fillOutlinePattern:vc,fillPattern:Lh,fillExtrusion:nf,fillExtrusionPattern:df,hillshadePrepare:Nu,hillshade:of,line:tu,lineGradient:Xc,linePattern:uh,lineSDF:vf,raster:ol,symbolIcon:mu,symbolSDF:Pu,symbolTextAndIcon:kf}),Mc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Mc.prototype.bind=function(Y,ye,te,me,Ge,Le,$e,mt){this.context=Y;for(var jt=this.boundPaintVertexBuffers.length!==me.length,_r=0;!jt&&_r<me.length;_r++)this.boundPaintVertexBuffers[_r]!==me[_r]&&(jt=!0);var Fr=!this.vao||this.boundProgram!==ye||this.boundLayoutVertexBuffer!==te||jt||this.boundIndexBuffer!==Ge||this.boundVertexOffset!==Le||this.boundDynamicVertexBuffer!==$e||this.boundDynamicVertexBuffer2!==mt;!Y.extVertexArrayObject||Fr?this.freshBind(ye,te,me,Ge,Le,$e,mt):(Y.bindVertexArrayOES.set(this.vao),$e&&$e.bind(),Ge&&Ge.dynamicDraw&&Ge.bind(),mt&&mt.bind())},Mc.prototype.freshBind=function(Y,ye,te,me,Ge,Le,$e){var mt,jt=Y.numAttributes,_r=this.context,Fr=_r.gl;if(_r.extVertexArrayObject)this.vao&&this.destroy(),this.vao=_r.extVertexArrayObject.createVertexArrayOES(),_r.bindVertexArrayOES.set(this.vao),mt=0,this.boundProgram=Y,this.boundLayoutVertexBuffer=ye,this.boundPaintVertexBuffers=te,this.boundIndexBuffer=me,this.boundVertexOffset=Ge,this.boundDynamicVertexBuffer=Le,this.boundDynamicVertexBuffer2=$e;else{mt=_r.currentNumAttributes||0;for(var hr=jt;hr<mt;hr++)Fr.disableVertexAttribArray(hr)}ye.enableAttributes(Fr,Y);for(var gt=0,Et=te;gt<Et.length;gt+=1){var Ft=Et[gt];Ft.enableAttributes(Fr,Y)}Le&&Le.enableAttributes(Fr,Y),$e&&$e.enableAttributes(Fr,Y),ye.bind(),ye.setVertexAttribPointers(Fr,Y,Ge);for(var ir=0,fr=te;ir<fr.length;ir+=1){var sr=fr[ir];sr.bind(),sr.setVertexAttribPointers(Fr,Y,Ge)}Le&&(Le.bind(),Le.setVertexAttribPointers(Fr,Y,Ge)),me&&me.bind(),$e&&($e.bind(),$e.setVertexAttribPointers(Fr,Y,Ge)),_r.currentNumAttributes=jt},Mc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Hu(ve){for(var Y=[],ye=0;ye<ve.length;ye++)if(ve[ye]!==null){var te=ve[ye].split(" ");Y.push(te.pop())}return Y}var mf=function(Y,ye,te,me,Ge,Le){var $e=Y.gl;this.program=$e.createProgram();for(var mt=Hu(te.staticAttributes),jt=me?me.getBinderAttributes():[],_r=mt.concat(jt),Fr=te.staticUniforms?Hu(te.staticUniforms):[],hr=me?me.getBinderUniforms():[],gt=Fr.concat(hr),Et=[],Ft=0,ir=gt;Ft<ir.length;Ft+=1){var fr=ir[Ft];Et.indexOf(fr)<0&&Et.push(fr)}var sr=me?me.defines():[];Le&&sr.push("#define OVERDRAW_INSPECTOR;");var pr=sr.concat(ml.fragmentSource,te.fragmentSource).join(`
`),lr=sr.concat(ml.vertexSource,te.vertexSource).join(`
`),Xt=$e.createShader($e.FRAGMENT_SHADER);if($e.isContextLost()){this.failedToCreate=!0;return}$e.shaderSource(Xt,pr),$e.compileShader(Xt),$e.attachShader(this.program,Xt);var or=$e.createShader($e.VERTEX_SHADER);if($e.isContextLost()){this.failedToCreate=!0;return}$e.shaderSource(or,lr),$e.compileShader(or),$e.attachShader(this.program,or),this.attributes={};var qt={};this.numAttributes=_r.length;for(var Dr=0;Dr<this.numAttributes;Dr++)_r[Dr]&&($e.bindAttribLocation(this.program,Dr,_r[Dr]),this.attributes[_r[Dr]]=Dr);$e.linkProgram(this.program),$e.deleteShader(or),$e.deleteShader(Xt);for(var Jr=0;Jr<Et.length;Jr++){var ba=Et[Jr];if(ba&&!qt[ba]){var yi=$e.getUniformLocation(this.program,ba);yi&&(qt[ba]=yi)}}this.fixedUniforms=Ge(Y,qt),this.binderUniforms=me?me.getUniforms(Y,qt):[]};mf.prototype.draw=function(Y,ye,te,me,Ge,Le,$e,mt,jt,_r,Fr,hr,gt,Et,Ft,ir){var fr,sr=Y.gl;if(!this.failedToCreate){Y.program.set(this.program),Y.setDepthMode(te),Y.setStencilMode(me),Y.setColorMode(Ge),Y.setCullFace(Le);for(var pr in this.fixedUniforms)this.fixedUniforms[pr].set($e[pr]);Et&&Et.setUniforms(Y,this.binderUniforms,hr,{zoom:gt});for(var lr=(fr={},fr[sr.LINES]=2,fr[sr.TRIANGLES]=3,fr[sr.LINE_STRIP]=1,fr)[ye],Xt=0,or=Fr.get();Xt<or.length;Xt+=1){var qt=or[Xt],Dr=qt.vaos||(qt.vaos={}),Jr=Dr[mt]||(Dr[mt]=new Mc);Jr.bind(Y,this,jt,Et?Et.getPaintVertexBuffers():[],_r,qt.vertexOffset,Ft,ir),sr.drawElements(ye,qt.primitiveLength*lr,sr.UNSIGNED_SHORT,qt.primitiveOffset*lr*2)}}};function Wu(ve,Y,ye){var te=1/Vn(ye,1,Y.transform.tileZoom),me=Math.pow(2,ye.tileID.overscaledZ),Ge=ye.tileSize*Math.pow(2,Y.transform.tileZoom)/me,Le=Ge*(ye.tileID.canonical.x+ye.tileID.wrap*me),$e=Ge*ye.tileID.canonical.y;return{u_image:0,u_texsize:ye.imageAtlasTexture.size,u_scale:[te,ve.fromScale,ve.toScale],u_fade:ve.t,u_pixel_coord_upper:[Le>>16,$e>>16],u_pixel_coord_lower:[Le&65535,$e&65535]}}function Zc(ve,Y,ye,te){var me=ye.imageManager.getPattern(ve.from.toString()),Ge=ye.imageManager.getPattern(ve.to.toString()),Le=ye.imageManager.getPixelSize(),$e=Le.width,mt=Le.height,jt=Math.pow(2,te.tileID.overscaledZ),_r=te.tileSize*Math.pow(2,ye.transform.tileZoom)/jt,Fr=_r*(te.tileID.canonical.x+te.tileID.wrap*jt),hr=_r*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:me.tl,u_pattern_br_a:me.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[$e,mt],u_mix:Y.t,u_pattern_size_a:me.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:Y.fromScale,u_scale_b:Y.toScale,u_tile_units_to_pixels:1/Vn(te,1,ye.transform.tileZoom),u_pixel_coord_upper:[Fr>>16,hr>>16],u_pixel_coord_lower:[Fr&65535,hr&65535]}}var Lf=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_lightpos:new e.Uniform3f(ve,Y.u_lightpos),u_lightintensity:new e.Uniform1f(ve,Y.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,Y.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,Y.u_vertical_gradient),u_opacity:new e.Uniform1f(ve,Y.u_opacity)}},ru=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_lightpos:new e.Uniform3f(ve,Y.u_lightpos),u_lightintensity:new e.Uniform1f(ve,Y.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,Y.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,Y.u_vertical_gradient),u_height_factor:new e.Uniform1f(ve,Y.u_height_factor),u_image:new e.Uniform1i(ve,Y.u_image),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,Y.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,Y.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,Y.u_scale),u_fade:new e.Uniform1f(ve,Y.u_fade),u_opacity:new e.Uniform1f(ve,Y.u_opacity)}},jf=function(ve,Y,ye,te){var me=Y.style.light,Ge=me.properties.get("position"),Le=[Ge.x,Ge.y,Ge.z],$e=e.create$1();me.properties.get("anchor")==="viewport"&&e.fromRotation($e,-Y.transform.angle),e.transformMat3(Le,Le,$e);var mt=me.properties.get("color");return{u_matrix:ve,u_lightpos:Le,u_lightintensity:me.properties.get("intensity"),u_lightcolor:[mt.r,mt.g,mt.b],u_vertical_gradient:+ye,u_opacity:te}},Xu=function(ve,Y,ye,te,me,Ge,Le){return e.extend(jf(ve,Y,ye,te),Wu(Ge,Y,Le),{u_height_factor:-Math.pow(2,me.overscaledZ)/Le.tileSize/8})},Ec=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix)}},mc=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_image:new e.Uniform1i(ve,Y.u_image),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,Y.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,Y.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,Y.u_scale),u_fade:new e.Uniform1f(ve,Y.u_fade)}},jl=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_world:new e.Uniform2f(ve,Y.u_world)}},gu=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_world:new e.Uniform2f(ve,Y.u_world),u_image:new e.Uniform1i(ve,Y.u_image),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,Y.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,Y.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,Y.u_scale),u_fade:new e.Uniform1f(ve,Y.u_fade)}},Cc=function(ve){return{u_matrix:ve}},Yc=function(ve,Y,ye,te){return e.extend(Cc(ve),Wu(ye,Y,te))},sc=function(ve,Y){return{u_matrix:ve,u_world:Y}},kc=function(ve,Y,ye,te,me){return e.extend(Yc(ve,Y,ye,te),{u_world:me})},er=function(ve,Y){return{u_camera_to_center_distance:new e.Uniform1f(ve,Y.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ve,Y.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ve,Y.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ve,Y.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix)}},yr=function(ve,Y,ye,te){var me=ve.transform,Ge,Le;if(te.paint.get("circle-pitch-alignment")==="map"){var $e=Vn(ye,1,me.zoom);Ge=!0,Le=[$e,$e]}else Ge=!1,Le=me.pixelsToGLUnits;return{u_camera_to_center_distance:me.cameraToCenterDistance,u_scale_with_map:+(te.paint.get("circle-pitch-scale")==="map"),u_matrix:ve.translatePosMatrix(Y.posMatrix,ye,te.paint.get("circle-translate"),te.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ge,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:Le}},na=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,Y.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ve,Y.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ve,Y.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ve,Y.u_overscale_factor)}},$r=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ve,Y.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,Y.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ve,Y.u_viewport_size)}},La=function(ve,Y,ye){var te=Vn(ye,1,Y.zoom),me=Math.pow(2,Y.zoom-ye.tileID.overscaledZ),Ge=ye.tileID.overscaleFactor();return{u_matrix:ve,u_camera_to_center_distance:Y.cameraToCenterDistance,u_pixels_to_tile_units:te,u_extrude_scale:[Y.pixelsToGLUnits[0]/(te*me),Y.pixelsToGLUnits[1]/(te*me)],u_overscale_factor:Ge}},hi=function(ve,Y,ye){return{u_matrix:ve,u_inv_matrix:Y,u_camera_to_center_distance:ye.cameraToCenterDistance,u_viewport_size:[ye.width,ye.height]}},Pi=function(ve,Y){return{u_color:new e.UniformColor(ve,Y.u_color),u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_overlay:new e.Uniform1i(ve,Y.u_overlay),u_overlay_scale:new e.Uniform1f(ve,Y.u_overlay_scale)}},Zi=function(ve,Y,ye){return ye===void 0&&(ye=1),{u_matrix:ve,u_color:Y,u_overlay:0,u_overlay_scale:ye}},tn=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix)}},dn=function(ve){return{u_matrix:ve}},Ri=function(ve,Y){return{u_extrude_scale:new e.Uniform1f(ve,Y.u_extrude_scale),u_intensity:new e.Uniform1f(ve,Y.u_intensity),u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix)}},Fi=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_world:new e.Uniform2f(ve,Y.u_world),u_image:new e.Uniform1i(ve,Y.u_image),u_color_ramp:new e.Uniform1i(ve,Y.u_color_ramp),u_opacity:new e.Uniform1f(ve,Y.u_opacity)}},qi=function(ve,Y,ye,te){return{u_matrix:ve,u_extrude_scale:Vn(Y,1,ye),u_intensity:te}},_i=function(ve,Y,ye,te){var me=e.create();e.ortho(me,0,ve.width,ve.height,0,0,1);var Ge=ve.context.gl;return{u_matrix:me,u_world:[Ge.drawingBufferWidth,Ge.drawingBufferHeight],u_image:ye,u_color_ramp:te,u_opacity:Y.paint.get("heatmap-opacity")}},Mn=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_image:new e.Uniform1i(ve,Y.u_image),u_latrange:new e.Uniform2f(ve,Y.u_latrange),u_light:new e.Uniform2f(ve,Y.u_light),u_shadow:new e.UniformColor(ve,Y.u_shadow),u_highlight:new e.UniformColor(ve,Y.u_highlight),u_accent:new e.UniformColor(ve,Y.u_accent)}},Kn=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_image:new e.Uniform1i(ve,Y.u_image),u_dimension:new e.Uniform2f(ve,Y.u_dimension),u_zoom:new e.Uniform1f(ve,Y.u_zoom),u_unpack:new e.Uniform4f(ve,Y.u_unpack)}},ao=function(ve,Y,ye){var te=ye.paint.get("hillshade-shadow-color"),me=ye.paint.get("hillshade-highlight-color"),Ge=ye.paint.get("hillshade-accent-color"),Le=ye.paint.get("hillshade-illumination-direction")*(Math.PI/180);ye.paint.get("hillshade-illumination-anchor")==="viewport"&&(Le-=ve.transform.angle);var $e=!ve.options.moving;return{u_matrix:ve.transform.calculatePosMatrix(Y.tileID.toUnwrapped(),$e),u_image:0,u_latrange:co(ve,Y.tileID),u_light:[ye.paint.get("hillshade-exaggeration"),Le],u_shadow:te,u_highlight:me,u_accent:Ge}},Jn=function(ve,Y){var ye=Y.stride,te=e.create();return e.ortho(te,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(te,te,[0,-e.EXTENT,0]),{u_matrix:te,u_image:1,u_dimension:[ye,ye],u_zoom:ve.overscaledZ,u_unpack:Y.getUnpackVector()}};function co(ve,Y){var ye=Math.pow(2,Y.canonical.z),te=Y.canonical.y;return[new e.MercatorCoordinate(0,te/ye).toLngLat().lat,new e.MercatorCoordinate(0,(te+1)/ye).toLngLat().lat]}var wn=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_ratio:new e.Uniform1f(ve,Y.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,Y.u_units_to_pixels)}},un=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_ratio:new e.Uniform1f(ve,Y.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,Y.u_units_to_pixels),u_image:new e.Uniform1i(ve,Y.u_image),u_image_height:new e.Uniform1f(ve,Y.u_image_height)}},_o=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_ratio:new e.Uniform1f(ve,Y.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_image:new e.Uniform1i(ve,Y.u_image),u_units_to_pixels:new e.Uniform2f(ve,Y.u_units_to_pixels),u_scale:new e.Uniform3f(ve,Y.u_scale),u_fade:new e.Uniform1f(ve,Y.u_fade)}},Qo=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_ratio:new e.Uniform1f(ve,Y.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,Y.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ve,Y.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ve,Y.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ve,Y.u_sdfgamma),u_image:new e.Uniform1i(ve,Y.u_image),u_tex_y_a:new e.Uniform1f(ve,Y.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ve,Y.u_tex_y_b),u_mix:new e.Uniform1f(ve,Y.u_mix)}},xs=function(ve,Y,ye){var te=ve.transform;return{u_matrix:Fl(ve,Y,ye),u_ratio:1/Vn(Y,1,te.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},Qs=function(ve,Y,ye,te){return e.extend(xs(ve,Y,ye),{u_image:0,u_image_height:te})},Rs=function(ve,Y,ye,te){var me=ve.transform,Ge=ys(Y,me);return{u_matrix:Fl(ve,Y,ye),u_texsize:Y.imageAtlasTexture.size,u_ratio:1/Vn(Y,1,me.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[Ge,te.fromScale,te.toScale],u_fade:te.t,u_units_to_pixels:[1/me.pixelsToGLUnits[0],1/me.pixelsToGLUnits[1]]}},Ks=function(ve,Y,ye,te,me){var Ge=ve.transform,Le=ve.lineAtlas,$e=ys(Y,Ge),mt=ye.layout.get("line-cap")==="round",jt=Le.getDash(te.from,mt),_r=Le.getDash(te.to,mt),Fr=jt.width*me.fromScale,hr=_r.width*me.toScale;return e.extend(xs(ve,Y,ye),{u_patternscale_a:[$e/Fr,-jt.height/2],u_patternscale_b:[$e/hr,-_r.height/2],u_sdfgamma:Le.width/(Math.min(Fr,hr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:jt.y,u_tex_y_b:_r.y,u_mix:me.t})};function ys(ve,Y){return 1/Vn(ve,1,Y.tileZoom)}function Fl(ve,Y,ye){return ve.translatePosMatrix(Y.tileID.posMatrix,Y,ye.paint.get("line-translate"),ye.paint.get("line-translate-anchor"))}var yl=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_tl_parent:new e.Uniform2f(ve,Y.u_tl_parent),u_scale_parent:new e.Uniform1f(ve,Y.u_scale_parent),u_buffer_scale:new e.Uniform1f(ve,Y.u_buffer_scale),u_fade_t:new e.Uniform1f(ve,Y.u_fade_t),u_opacity:new e.Uniform1f(ve,Y.u_opacity),u_image0:new e.Uniform1i(ve,Y.u_image0),u_image1:new e.Uniform1i(ve,Y.u_image1),u_brightness_low:new e.Uniform1f(ve,Y.u_brightness_low),u_brightness_high:new e.Uniform1f(ve,Y.u_brightness_high),u_saturation_factor:new e.Uniform1f(ve,Y.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ve,Y.u_contrast_factor),u_spin_weights:new e.Uniform3f(ve,Y.u_spin_weights)}},sl=function(ve,Y,ye,te,me){return{u_matrix:ve,u_tl_parent:Y,u_scale_parent:ye,u_buffer_scale:1,u_fade_t:te.mix,u_opacity:te.opacity*me.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:me.paint.get("raster-brightness-min"),u_brightness_high:me.paint.get("raster-brightness-max"),u_saturation_factor:Xs(me.paint.get("raster-saturation")),u_contrast_factor:Io(me.paint.get("raster-contrast")),u_spin_weights:Un(me.paint.get("raster-hue-rotate"))}};function Un(ve){ve*=Math.PI/180;var Y=Math.sin(ve),ye=Math.cos(ve);return[(2*ye+1)/3,(-Math.sqrt(3)*Y-ye+1)/3,(Math.sqrt(3)*Y-ye+1)/3]}function Io(ve){return ve>0?1/(1-ve):1+ve}function Xs(ve){return ve>0?1-1/(1.001-ve):-ve}var Ls=function(ve,Y){return{u_is_size_zoom_constant:new e.Uniform1i(ve,Y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,Y.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,Y.u_size_t),u_size:new e.Uniform1f(ve,Y.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,Y.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,Y.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,Y.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,Y.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,Y.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,Y.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,Y.u_coord_matrix),u_is_text:new e.Uniform1i(ve,Y.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,Y.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_texture:new e.Uniform1i(ve,Y.u_texture)}},ou=function(ve,Y){return{u_is_size_zoom_constant:new e.Uniform1i(ve,Y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,Y.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,Y.u_size_t),u_size:new e.Uniform1f(ve,Y.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,Y.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,Y.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,Y.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,Y.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,Y.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,Y.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,Y.u_coord_matrix),u_is_text:new e.Uniform1i(ve,Y.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,Y.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_texture:new e.Uniform1i(ve,Y.u_texture),u_gamma_scale:new e.Uniform1f(ve,Y.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,Y.u_is_halo)}},Iu=function(ve,Y){return{u_is_size_zoom_constant:new e.Uniform1i(ve,Y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,Y.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,Y.u_size_t),u_size:new e.Uniform1f(ve,Y.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,Y.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,Y.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,Y.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,Y.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,Y.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,Y.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,Y.u_coord_matrix),u_is_text:new e.Uniform1i(ve,Y.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,Y.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_texsize_icon:new e.Uniform2f(ve,Y.u_texsize_icon),u_texture:new e.Uniform1i(ve,Y.u_texture),u_texture_icon:new e.Uniform1i(ve,Y.u_texture_icon),u_gamma_scale:new e.Uniform1f(ve,Y.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,Y.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,Y.u_is_halo)}},Zu=function(ve,Y,ye,te,me,Ge,Le,$e,mt,jt){var _r=me.transform;return{u_is_size_zoom_constant:+(ve==="constant"||ve==="source"),u_is_size_feature_constant:+(ve==="constant"||ve==="camera"),u_size_t:Y?Y.uSizeT:0,u_size:Y?Y.uSize:0,u_camera_to_center_distance:_r.cameraToCenterDistance,u_pitch:_r.pitch/360*2*Math.PI,u_rotate_symbol:+ye,u_aspect_ratio:_r.width/_r.height,u_fade_change:me.options.fadeDuration?me.symbolFadeChange:1,u_matrix:Ge,u_label_plane_matrix:Le,u_coord_matrix:$e,u_is_text:+mt,u_pitch_with_map:+te,u_texsize:jt,u_texture:0}},Lc=function(ve,Y,ye,te,me,Ge,Le,$e,mt,jt,_r){var Fr=me.transform;return e.extend(Zu(ve,Y,ye,te,me,Ge,Le,$e,mt,jt),{u_gamma_scale:te?Math.cos(Fr._pitch)*Fr.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+_r})},yu=function(ve,Y,ye,te,me,Ge,Le,$e,mt,jt){return e.extend(Lc(ve,Y,ye,te,me,Ge,Le,$e,!0,mt,!0),{u_texsize_icon:jt,u_texture_icon:1})},Pc=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_opacity:new e.Uniform1f(ve,Y.u_opacity),u_color:new e.UniformColor(ve,Y.u_color)}},wu=function(ve,Y){return{u_matrix:new e.UniformMatrix4f(ve,Y.u_matrix),u_opacity:new e.Uniform1f(ve,Y.u_opacity),u_image:new e.Uniform1i(ve,Y.u_image),u_pattern_tl_a:new e.Uniform2f(ve,Y.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ve,Y.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ve,Y.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ve,Y.u_pattern_br_b),u_texsize:new e.Uniform2f(ve,Y.u_texsize),u_mix:new e.Uniform1f(ve,Y.u_mix),u_pattern_size_a:new e.Uniform2f(ve,Y.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ve,Y.u_pattern_size_b),u_scale_a:new e.Uniform1f(ve,Y.u_scale_a),u_scale_b:new e.Uniform1f(ve,Y.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ve,Y.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,Y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ve,Y.u_tile_units_to_pixels)}},gc=function(ve,Y,ye){return{u_matrix:ve,u_opacity:Y,u_color:ye}},fo=function(ve,Y,ye,te,me,Ge){return e.extend(Zc(te,Ge,ye,me),{u_matrix:ve,u_opacity:Y})},zo={fillExtrusion:Lf,fillExtrusionPattern:ru,fill:Ec,fillPattern:mc,fillOutline:jl,fillOutlinePattern:gu,circle:er,collisionBox:na,collisionCircle:$r,debug:Pi,clippingMask:tn,heatmap:Ri,heatmapTexture:Fi,hillshade:Mn,hillshadePrepare:Kn,line:wn,lineGradient:un,linePattern:_o,lineSDF:Qo,raster:yl,symbolIcon:Ls,symbolSDF:ou,symbolTextAndIcon:Iu,background:Pc,backgroundPattern:wu},Ic;function lc(ve,Y,ye,te,me,Ge,Le){for(var $e=ve.context,mt=$e.gl,jt=ve.useProgram("collisionBox"),_r=[],Fr=0,hr=0,gt=0;gt<te.length;gt++){var Et=te[gt],Ft=Y.getTile(Et),ir=Ft.getBucket(ye);if(ir){var fr=Et.posMatrix;(me[0]!==0||me[1]!==0)&&(fr=ve.translatePosMatrix(Et.posMatrix,Ft,me,Ge));var sr=Le?ir.textCollisionBox:ir.iconCollisionBox,pr=ir.collisionCircleArray;if(pr.length>0){var lr=e.create(),Xt=fr;e.mul(lr,ir.placementInvProjMatrix,ve.transform.glCoordMatrix),e.mul(lr,lr,ir.placementViewportMatrix),_r.push({circleArray:pr,circleOffset:hr,transform:Xt,invTransform:lr}),Fr+=pr.length/4,hr=Fr}sr&&jt.draw($e,mt.LINES,Ba.disabled,za.disabled,ve.colorModeForRenderPass(),Pr.disabled,La(fr,ve.transform,Ft),ye.id,sr.layoutVertexBuffer,sr.indexBuffer,sr.segments,null,ve.transform.zoom,null,null,sr.collisionVertexBuffer)}}if(!(!Le||!_r.length)){var or=ve.useProgram("collisionCircle"),qt=new e.StructArrayLayout2f1f2i16;qt.resize(Fr*4),qt._trim();for(var Dr=0,Jr=0,ba=_r;Jr<ba.length;Jr+=1)for(var yi=ba[Jr],Xa=0;Xa<yi.circleArray.length/4;Xa++){var si=Xa*4,Ji=yi.circleArray[si+0],Bi=yi.circleArray[si+1],pi=yi.circleArray[si+2],wi=yi.circleArray[si+3];qt.emplace(Dr++,Ji,Bi,pi,wi,0),qt.emplace(Dr++,Ji,Bi,pi,wi,1),qt.emplace(Dr++,Ji,Bi,pi,wi,2),qt.emplace(Dr++,Ji,Bi,pi,wi,3)}(!Ic||Ic.length<Fr*2)&&(Ic=Yu(Fr));for(var Mi=$e.createIndexBuffer(Ic,!0),Vi=$e.createVertexBuffer(qt,e.collisionCircleLayout.members,!0),cn=0,xo=_r;cn<xo.length;cn+=1){var jo=xo[cn],ks=hi(jo.transform,jo.invTransform,ve.transform);or.draw($e,mt.TRIANGLES,Ba.disabled,za.disabled,ve.colorModeForRenderPass(),Pr.disabled,ks,ye.id,Vi,Mi,e.SegmentVector.simpleSegment(0,jo.circleOffset*2,jo.circleArray.length,jo.circleArray.length/2),null,ve.transform.zoom,null,null,null)}Vi.destroy(),Mi.destroy()}}function Yu(ve){var Y=ve*2,ye=new e.StructArrayLayout3ui6;ye.resize(Y),ye._trim();for(var te=0;te<Y;te++){var me=te*6;ye.uint16[me+0]=te*4+0,ye.uint16[me+1]=te*4+1,ye.uint16[me+2]=te*4+2,ye.uint16[me+3]=te*4+2,ye.uint16[me+4]=te*4+3,ye.uint16[me+5]=te*4+0}return ye}var Ne=e.identity(new Float32Array(16));function R(ve,Y,ye,te,me){if(ve.renderPass==="translucent"){var Ge=za.disabled,Le=ve.colorModeForRenderPass(),$e=ye.layout.get("text-variable-anchor");$e&&we(te,ve,ye,Y,ye.layout.get("text-rotation-alignment"),ye.layout.get("text-pitch-alignment"),me),ye.paint.get("icon-opacity").constantOr(1)!==0&&pt(ve,Y,ye,te,!1,ye.paint.get("icon-translate"),ye.paint.get("icon-translate-anchor"),ye.layout.get("icon-rotation-alignment"),ye.layout.get("icon-pitch-alignment"),ye.layout.get("icon-keep-upright"),Ge,Le),ye.paint.get("text-opacity").constantOr(1)!==0&&pt(ve,Y,ye,te,!0,ye.paint.get("text-translate"),ye.paint.get("text-translate-anchor"),ye.layout.get("text-rotation-alignment"),ye.layout.get("text-pitch-alignment"),ye.layout.get("text-keep-upright"),Ge,Le),Y.map.showCollisionBoxes&&(lc(ve,Y,ye,te,ye.paint.get("text-translate"),ye.paint.get("text-translate-anchor"),!0),lc(ve,Y,ye,te,ye.paint.get("icon-translate"),ye.paint.get("icon-translate-anchor"),!1))}}function ae(ve,Y,ye,te,me,Ge){var Le=e.getAnchorAlignment(ve),$e=Le.horizontalAlign,mt=Le.verticalAlign,jt=-($e-.5)*Y,_r=-(mt-.5)*ye,Fr=e.evaluateVariableOffset(ve,te);return new e.Point((jt/me+Fr[0])*Ge,(_r/me+Fr[1])*Ge)}function we(ve,Y,ye,te,me,Ge,Le){for(var $e=Y.transform,mt=me==="map",jt=Ge==="map",_r=0,Fr=ve;_r<Fr.length;_r+=1){var hr=Fr[_r],gt=te.getTile(hr),Et=gt.getBucket(ye);if(!(!Et||!Et.text||!Et.text.segments.get().length)){var Ft=Et.textSizeData,ir=e.evaluateSizeForZoom(Ft,$e.zoom),fr=Vn(gt,1,Y.transform.zoom),sr=Da(hr.posMatrix,jt,mt,Y.transform,fr),pr=ye.layout.get("icon-text-fit")!=="none"&&Et.hasIconData();if(ir){var lr=Math.pow(2,$e.zoom-gt.tileID.overscaledZ);Se(Et,mt,jt,Le,e.symbolSize,$e,sr,hr.posMatrix,lr,ir,pr)}}}}function Se(ve,Y,ye,te,me,Ge,Le,$e,mt,jt,_r){var Fr=ve.text.placedSymbolArray,hr=ve.text.dynamicLayoutVertexArray,gt=ve.icon.dynamicLayoutVertexArray,Et={};hr.clear();for(var Ft=0;Ft<Fr.length;Ft++){var ir=Fr.get(Ft),fr=ve.allowVerticalPlacement&&!ir.placedOrientation,sr=!ir.hidden&&ir.crossTileID&&!fr?te[ir.crossTileID]:null;if(!sr)Xo(ir.numGlyphs,hr);else{var pr=new e.Point(ir.anchorX,ir.anchorY),lr=Li(pr,ye?$e:Le),Xt=fn(Ge.cameraToCenterDistance,lr.signedDistanceFromCamera),or=me.evaluateSizeForFeature(ve.textSizeData,jt,ir)*Xt/e.ONE_EM;ye&&(or*=ve.tilePixelRatio/mt);for(var qt=sr.width,Dr=sr.height,Jr=sr.anchor,ba=sr.textOffset,yi=sr.textBoxScale,Xa=ae(Jr,qt,Dr,ba,yi,or),si=ye?Li(pr.add(Xa),Le).point:lr.point.add(Y?Xa.rotate(-Ge.angle):Xa),Ji=ve.allowVerticalPlacement&&ir.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,Bi=0;Bi<ir.numGlyphs;Bi++)e.addDynamicAttributes(hr,si,Ji);_r&&ir.associatedIconIndex>=0&&(Et[ir.associatedIconIndex]={shiftedAnchor:si,angle:Ji})}}if(_r){gt.clear();for(var pi=ve.icon.placedSymbolArray,wi=0;wi<pi.length;wi++){var Mi=pi.get(wi);if(Mi.hidden)Xo(Mi.numGlyphs,gt);else{var Vi=Et[wi];if(!Vi)Xo(Mi.numGlyphs,gt);else for(var cn=0;cn<Mi.numGlyphs;cn++)e.addDynamicAttributes(gt,Vi.shiftedAnchor,Vi.angle)}}ve.icon.dynamicLayoutVertexBuffer.updateData(gt)}ve.text.dynamicLayoutVertexBuffer.updateData(hr)}function Oe(ve,Y,ye){return ye.iconsInText&&Y?"symbolTextAndIcon":ve?"symbolSDF":"symbolIcon"}function pt(ve,Y,ye,te,me,Ge,Le,$e,mt,jt,_r,Fr){for(var hr=ve.context,gt=hr.gl,Et=ve.transform,Ft=$e==="map",ir=mt==="map",fr=Ft&&ye.layout.get("symbol-placement")!=="point",sr=Ft&&!ir&&!fr,pr=ye.layout.get("symbol-sort-key").constantOr(1)!==void 0,lr=!1,Xt=ve.depthModeForSublayer(0,Ba.ReadOnly),or=ye.layout.get("text-variable-anchor"),qt=[],Dr=0,Jr=te;Dr<Jr.length;Dr+=1){var ba=Jr[Dr],yi=Y.getTile(ba),Xa=yi.getBucket(ye);if(Xa){var si=me?Xa.text:Xa.icon;if(!(!si||!si.segments.get().length)){var Ji=si.programConfigurations.get(ye.id),Bi=me||Xa.sdfIcons,pi=me?Xa.textSizeData:Xa.iconSizeData,wi=ir||Et.pitch!==0,Mi=ve.useProgram(Oe(Bi,me,Xa),Ji),Vi=e.evaluateSizeForZoom(pi,Et.zoom),cn=void 0,xo=[0,0],jo=void 0,ks=void 0,Fo=null,bs=void 0;if(me){if(jo=yi.glyphAtlasTexture,ks=gt.LINEAR,cn=yi.glyphAtlasTexture.size,Xa.iconsInText){xo=yi.imageAtlasTexture.size,Fo=yi.imageAtlasTexture;var Hs=pi.kind==="composite"||pi.kind==="camera";bs=wi||ve.options.rotating||ve.options.zooming||Hs?gt.LINEAR:gt.NEAREST}}else{var pu=ye.layout.get("icon-size").constantOr(0)!==1||Xa.iconsNeedLinear;jo=yi.imageAtlasTexture,ks=Bi||ve.options.rotating||ve.options.zooming||pu||wi?gt.LINEAR:gt.NEAREST,cn=yi.imageAtlasTexture.size}var Mp=Vn(yi,1,ve.transform.zoom),Ep=Da(ba.posMatrix,ir,Ft,ve.transform,Mp),Ph=Xi(ba.posMatrix,ir,Ft,ve.transform,Mp),qp=or&&Xa.hasTextData(),qd=ye.layout.get("icon-text-fit")!=="none"&&qp&&Xa.hasIconData();fr&&kn(Xa,ba.posMatrix,ve,me,Ep,Ph,ir,jt);var td=ve.translatePosMatrix(ba.posMatrix,yi,Ge,Le),Ih=fr||me&&or||qd?Ne:Ep,rd=ve.translatePosMatrix(Ph,yi,Ge,Le,!0),Kh=Bi&&ye.paint.get(me?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Rh=void 0;Bi?Xa.iconsInText?Rh=yu(pi.kind,Vi,sr,ir,ve,td,Ih,rd,cn,xo):Rh=Lc(pi.kind,Vi,sr,ir,ve,td,Ih,rd,me,cn,!0):Rh=Zu(pi.kind,Vi,sr,ir,ve,td,Ih,rd,me,cn);var Cp={program:Mi,buffers:si,uniformValues:Rh,atlasTexture:jo,atlasTextureIcon:Fo,atlasInterpolation:ks,atlasInterpolationIcon:bs,isSDF:Bi,hasHalo:Kh};if(pr&&Xa.canOverlap){lr=!0;for(var Vp=si.segments.get(),kp=0,kv=Vp;kp<kv.length;kp+=1){var Vd=kv[kp];qt.push({segments:new e.SegmentVector([Vd]),sortKey:Vd.sortKey,state:Cp})}}else qt.push({segments:si.segments,sortKey:0,state:Cp})}}}lr&&qt.sort(function(im,nm){return im.sortKey-nm.sortKey});for(var qf=0,Gd=qt;qf<Gd.length;qf+=1){var Lv=Gd[qf],ch=Lv.state;if(hr.activeTexture.set(gt.TEXTURE0),ch.atlasTexture.bind(ch.atlasInterpolation,gt.CLAMP_TO_EDGE),ch.atlasTextureIcon&&(hr.activeTexture.set(gt.TEXTURE1),ch.atlasTextureIcon&&ch.atlasTextureIcon.bind(ch.atlasInterpolationIcon,gt.CLAMP_TO_EDGE)),ch.isSDF){var iv=ch.uniformValues;ch.hasHalo&&(iv.u_is_halo=1,At(ch.buffers,Lv.segments,ye,ve,ch.program,Xt,_r,Fr,iv)),iv.u_is_halo=0}At(ch.buffers,Lv.segments,ye,ve,ch.program,Xt,_r,Fr,ch.uniformValues)}}function At(ve,Y,ye,te,me,Ge,Le,$e,mt){var jt=te.context,_r=jt.gl;me.draw(jt,_r.TRIANGLES,Ge,Le,$e,Pr.disabled,mt,ye.id,ve.layoutVertexBuffer,ve.indexBuffer,Y,ye.paint,te.transform.zoom,ve.programConfigurations.get(ye.id),ve.dynamicLayoutVertexBuffer,ve.opacityVertexBuffer)}function Bt(ve,Y,ye,te){if(ve.renderPass==="translucent"){var me=ye.paint.get("circle-opacity"),Ge=ye.paint.get("circle-stroke-width"),Le=ye.paint.get("circle-stroke-opacity"),$e=ye.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(me.constantOr(1)===0&&(Ge.constantOr(1)===0||Le.constantOr(1)===0))){for(var mt=ve.context,jt=mt.gl,_r=ve.depthModeForSublayer(0,Ba.ReadOnly),Fr=za.disabled,hr=ve.colorModeForRenderPass(),gt=[],Et=0;Et<te.length;Et++){var Ft=te[Et],ir=Y.getTile(Ft),fr=ir.getBucket(ye);if(fr){var sr=fr.programConfigurations.get(ye.id),pr=ve.useProgram("circle",sr),lr=fr.layoutVertexBuffer,Xt=fr.indexBuffer,or=yr(ve,Ft,ir,ye),qt={programConfiguration:sr,program:pr,layoutVertexBuffer:lr,indexBuffer:Xt,uniformValues:or};if($e)for(var Dr=fr.segments.get(),Jr=0,ba=Dr;Jr<ba.length;Jr+=1){var yi=ba[Jr];gt.push({segments:new e.SegmentVector([yi]),sortKey:yi.sortKey,state:qt})}else gt.push({segments:fr.segments,sortKey:0,state:qt})}}$e&&gt.sort(function(jo,ks){return jo.sortKey-ks.sortKey});for(var Xa=0,si=gt;Xa<si.length;Xa+=1){var Ji=si[Xa],Bi=Ji.state,pi=Bi.programConfiguration,wi=Bi.program,Mi=Bi.layoutVertexBuffer,Vi=Bi.indexBuffer,cn=Bi.uniformValues,xo=Ji.segments;wi.draw(mt,jt.TRIANGLES,_r,Fr,hr,Pr.disabled,cn,ye.id,Mi,Vi,xo,ye.paint,ve.transform.zoom,pi)}}}}function $t(ve,Y,ye,te){if(ye.paint.get("heatmap-opacity")!==0)if(ve.renderPass==="offscreen"){var me=ve.context,Ge=me.gl,Le=za.disabled,$e=new Nt([Ge.ONE,Ge.ONE],e.Color.transparent,[!0,!0,!0,!0]);br(me,ve,ye),me.clear({color:e.Color.transparent});for(var mt=0;mt<te.length;mt++){var jt=te[mt];if(!Y.hasRenderableParent(jt)){var _r=Y.getTile(jt),Fr=_r.getBucket(ye);if(Fr){var hr=Fr.programConfigurations.get(ye.id),gt=ve.useProgram("heatmap",hr),Et=ve.transform,Ft=Et.zoom;gt.draw(me,Ge.TRIANGLES,Ba.disabled,Le,$e,Pr.disabled,qi(jt.posMatrix,_r,Ft,ye.paint.get("heatmap-intensity")),ye.id,Fr.layoutVertexBuffer,Fr.indexBuffer,Fr.segments,ye.paint,ve.transform.zoom,hr)}}}me.viewport.set([0,0,ve.width,ve.height])}else ve.renderPass==="translucent"&&(ve.context.setColorMode(ve.colorModeForRenderPass()),Yr(ve,ye))}function br(ve,Y,ye){var te=ve.gl;ve.activeTexture.set(te.TEXTURE1),ve.viewport.set([0,0,Y.width/4,Y.height/4]);var me=ye.heatmapFbo;if(me)te.bindTexture(te.TEXTURE_2D,me.colorAttachment.get()),ve.bindFramebuffer.set(me.framebuffer);else{var Ge=te.createTexture();te.bindTexture(te.TEXTURE_2D,Ge),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_WRAP_S,te.CLAMP_TO_EDGE),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_WRAP_T,te.CLAMP_TO_EDGE),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MIN_FILTER,te.LINEAR),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MAG_FILTER,te.LINEAR),me=ye.heatmapFbo=ve.createFramebuffer(Y.width/4,Y.height/4,!1),Ar(ve,Y,Ge,me)}}function Ar(ve,Y,ye,te){var me=ve.gl,Ge=ve.extRenderToTextureHalfFloat?ve.extTextureHalfFloat.HALF_FLOAT_OES:me.UNSIGNED_BYTE;me.texImage2D(me.TEXTURE_2D,0,me.RGBA,Y.width/4,Y.height/4,0,me.RGBA,Ge,null),te.colorAttachment.set(ye)}function Yr(ve,Y){var ye=ve.context,te=ye.gl,me=Y.heatmapFbo;if(me){ye.activeTexture.set(te.TEXTURE0),te.bindTexture(te.TEXTURE_2D,me.colorAttachment.get()),ye.activeTexture.set(te.TEXTURE1);var Ge=Y.colorRampTexture;Ge||(Ge=Y.colorRampTexture=new e.Texture(ye,Y.colorRamp,te.RGBA)),Ge.bind(te.LINEAR,te.CLAMP_TO_EDGE),ve.useProgram("heatmapTexture").draw(ye,te.TRIANGLES,Ba.disabled,za.disabled,ve.colorModeForRenderPass(),Pr.disabled,_i(ve,Y,0,1),Y.id,ve.viewportBuffer,ve.quadTriangleIndexBuffer,ve.viewportSegments,Y.paint,ve.transform.zoom)}}function sa(ve,Y,ye,te){if(ve.renderPass==="translucent"){var me=ye.paint.get("line-opacity"),Ge=ye.paint.get("line-width");if(!(me.constantOr(1)===0||Ge.constantOr(1)===0))for(var Le=ve.depthModeForSublayer(0,Ba.ReadOnly),$e=ve.colorModeForRenderPass(),mt=ye.paint.get("line-dasharray"),jt=ye.paint.get("line-pattern"),_r=jt.constantOr(1),Fr=ye.paint.get("line-gradient"),hr=ye.getCrossfadeParameters(),gt=_r?"linePattern":mt?"lineSDF":Fr?"lineGradient":"line",Et=ve.context,Ft=Et.gl,ir=!0,fr=0,sr=te;fr<sr.length;fr+=1){var pr=sr[fr],lr=Y.getTile(pr);if(!(_r&&!lr.patternsLoaded())){var Xt=lr.getBucket(ye);if(Xt){var or=Xt.programConfigurations.get(ye.id),qt=ve.context.program.get(),Dr=ve.useProgram(gt,or),Jr=ir||Dr.program!==qt,ba=jt.constantOr(null);if(ba&&lr.imageAtlas){var yi=lr.imageAtlas,Xa=yi.patternPositions[ba.to.toString()],si=yi.patternPositions[ba.from.toString()];Xa&&si&&or.setConstantPatternPositions(Xa,si)}var Ji=_r?Rs(ve,lr,ye,hr):mt?Ks(ve,lr,ye,mt,hr):Fr?Qs(ve,lr,ye,Xt.lineClipsArray.length):xs(ve,lr,ye);if(_r)Et.activeTexture.set(Ft.TEXTURE0),lr.imageAtlasTexture.bind(Ft.LINEAR,Ft.CLAMP_TO_EDGE),or.updatePaintBuffers(hr);else if(mt&&(Jr||ve.lineAtlas.dirty))Et.activeTexture.set(Ft.TEXTURE0),ve.lineAtlas.bind(Et);else if(Fr){var Bi=Xt.gradients[ye.id],pi=Bi.texture;if(ye.gradientVersion!==Bi.version){var wi=256;if(ye.stepInterpolant){var Mi=Y.getSource().maxzoom,Vi=pr.canonical.z===Mi?Math.ceil(1<<ve.transform.maxZoom-pr.canonical.z):1,cn=Xt.maxLineLength/e.EXTENT,xo=1024,jo=cn*xo*Vi;wi=e.clamp(e.nextPowerOfTwo(jo),256,Et.maxTextureSize)}Bi.gradient=e.renderColorRamp({expression:ye.gradientExpression(),evaluationKey:"lineProgress",resolution:wi,image:Bi.gradient||void 0,clips:Xt.lineClipsArray}),Bi.texture?Bi.texture.update(Bi.gradient):Bi.texture=new e.Texture(Et,Bi.gradient,Ft.RGBA),Bi.version=ye.gradientVersion,pi=Bi.texture}Et.activeTexture.set(Ft.TEXTURE0),pi.bind(ye.stepInterpolant?Ft.NEAREST:Ft.LINEAR,Ft.CLAMP_TO_EDGE)}Dr.draw(Et,Ft.TRIANGLES,Le,ve.stencilModeForClipping(pr),$e,Pr.disabled,Ji,ye.id,Xt.layoutVertexBuffer,Xt.indexBuffer,Xt.segments,ye.paint,ve.transform.zoom,or,Xt.layoutVertexBuffer2),ir=!1}}}}}function He(ve,Y,ye,te){var me=ye.paint.get("fill-color"),Ge=ye.paint.get("fill-opacity");if(Ge.constantOr(1)!==0){var Le=ve.colorModeForRenderPass(),$e=ye.paint.get("fill-pattern"),mt=ve.opaquePassEnabledForLayer()&&!$e.constantOr(1)&&me.constantOr(e.Color.transparent).a===1&&Ge.constantOr(0)===1?"opaque":"translucent";if(ve.renderPass===mt){var jt=ve.depthModeForSublayer(1,ve.renderPass==="opaque"?Ba.ReadWrite:Ba.ReadOnly);Je(ve,Y,ye,te,jt,Le,!1)}if(ve.renderPass==="translucent"&&ye.paint.get("fill-antialias")){var _r=ve.depthModeForSublayer(ye.getPaintProperty("fill-outline-color")?2:0,Ba.ReadOnly);Je(ve,Y,ye,te,_r,Le,!0)}}}function Je(ve,Y,ye,te,me,Ge,Le){var $e=ve.context.gl,mt=ye.paint.get("fill-pattern"),jt=mt&&mt.constantOr(1),_r=ye.getCrossfadeParameters(),Fr,hr,gt,Et,Ft;Le?(hr=jt&&!ye.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Fr=$e.LINES):(hr=jt?"fillPattern":"fill",Fr=$e.TRIANGLES);for(var ir=0,fr=te;ir<fr.length;ir+=1){var sr=fr[ir],pr=Y.getTile(sr);if(!(jt&&!pr.patternsLoaded())){var lr=pr.getBucket(ye);if(lr){var Xt=lr.programConfigurations.get(ye.id),or=ve.useProgram(hr,Xt);jt&&(ve.context.activeTexture.set($e.TEXTURE0),pr.imageAtlasTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE),Xt.updatePaintBuffers(_r));var qt=mt.constantOr(null);if(qt&&pr.imageAtlas){var Dr=pr.imageAtlas,Jr=Dr.patternPositions[qt.to.toString()],ba=Dr.patternPositions[qt.from.toString()];Jr&&ba&&Xt.setConstantPatternPositions(Jr,ba)}var yi=ve.translatePosMatrix(sr.posMatrix,pr,ye.paint.get("fill-translate"),ye.paint.get("fill-translate-anchor"));if(!Le)Et=lr.indexBuffer,Ft=lr.segments,gt=jt?Yc(yi,ve,_r,pr):Cc(yi);else{Et=lr.indexBuffer2,Ft=lr.segments2;var Xa=[$e.drawingBufferWidth,$e.drawingBufferHeight];gt=hr==="fillOutlinePattern"&&jt?kc(yi,ve,_r,pr,Xa):sc(yi,Xa)}or.draw(ve.context,Fr,me,ve.stencilModeForClipping(sr),Ge,Pr.disabled,gt,ye.id,lr.layoutVertexBuffer,Et,Ft,ye.paint,ve.transform.zoom,Xt)}}}}function ut(ve,Y,ye,te){var me=ye.paint.get("fill-extrusion-opacity");if(me!==0&&ve.renderPass==="translucent"){var Ge=new Ba(ve.context.gl.LEQUAL,Ba.ReadWrite,ve.depthRangeFor3D);if(me===1&&!ye.paint.get("fill-extrusion-pattern").constantOr(1)){var Le=ve.colorModeForRenderPass();dt(ve,Y,ye,te,Ge,za.disabled,Le)}else dt(ve,Y,ye,te,Ge,za.disabled,Nt.disabled),dt(ve,Y,ye,te,Ge,ve.stencilModeFor3D(),ve.colorModeForRenderPass())}}function dt(ve,Y,ye,te,me,Ge,Le){for(var $e=ve.context,mt=$e.gl,jt=ye.paint.get("fill-extrusion-pattern"),_r=jt.constantOr(1),Fr=ye.getCrossfadeParameters(),hr=ye.paint.get("fill-extrusion-opacity"),gt=0,Et=te;gt<Et.length;gt+=1){var Ft=Et[gt],ir=Y.getTile(Ft),fr=ir.getBucket(ye);if(fr){var sr=fr.programConfigurations.get(ye.id),pr=ve.useProgram(_r?"fillExtrusionPattern":"fillExtrusion",sr);_r&&(ve.context.activeTexture.set(mt.TEXTURE0),ir.imageAtlasTexture.bind(mt.LINEAR,mt.CLAMP_TO_EDGE),sr.updatePaintBuffers(Fr));var lr=jt.constantOr(null);if(lr&&ir.imageAtlas){var Xt=ir.imageAtlas,or=Xt.patternPositions[lr.to.toString()],qt=Xt.patternPositions[lr.from.toString()];or&&qt&&sr.setConstantPatternPositions(or,qt)}var Dr=ve.translatePosMatrix(Ft.posMatrix,ir,ye.paint.get("fill-extrusion-translate"),ye.paint.get("fill-extrusion-translate-anchor")),Jr=ye.paint.get("fill-extrusion-vertical-gradient"),ba=_r?Xu(Dr,ve,Jr,hr,Ft,Fr,ir):jf(Dr,ve,Jr,hr);pr.draw($e,$e.gl.TRIANGLES,me,Ge,Le,Pr.backCCW,ba,ye.id,fr.layoutVertexBuffer,fr.indexBuffer,fr.segments,ye.paint,ve.transform.zoom,sr)}}}function Ct(ve,Y,ye,te){if(!(ve.renderPass!=="offscreen"&&ve.renderPass!=="translucent")){for(var me=ve.context,Ge=ve.depthModeForSublayer(0,Ba.ReadOnly),Le=ve.colorModeForRenderPass(),$e=ve.renderPass==="translucent"?ve.stencilConfigForOverlap(te):[{},te],mt=$e[0],jt=$e[1],_r=0,Fr=jt;_r<Fr.length;_r+=1){var hr=Fr[_r],gt=Y.getTile(hr);gt.needsHillshadePrepare&&ve.renderPass==="offscreen"?Dt(ve,gt,ye,Ge,za.disabled,Le):ve.renderPass==="translucent"&&wt(ve,gt,ye,Ge,mt[hr.overscaledZ],Le)}me.viewport.set([0,0,ve.width,ve.height])}}function wt(ve,Y,ye,te,me,Ge){var Le=ve.context,$e=Le.gl,mt=Y.fbo;if(mt){var jt=ve.useProgram("hillshade");Le.activeTexture.set($e.TEXTURE0),$e.bindTexture($e.TEXTURE_2D,mt.colorAttachment.get());var _r=ao(ve,Y,ye);jt.draw(Le,$e.TRIANGLES,te,me,Ge,Pr.disabled,_r,ye.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function Dt(ve,Y,ye,te,me,Ge){var Le=ve.context,$e=Le.gl,mt=Y.dem;if(mt&&mt.data){var jt=mt.dim,_r=mt.stride,Fr=mt.getPixels();if(Le.activeTexture.set($e.TEXTURE1),Le.pixelStoreUnpackPremultiplyAlpha.set(!1),Y.demTexture=Y.demTexture||ve.getTileTexture(_r),Y.demTexture){var hr=Y.demTexture;hr.update(Fr,{premultiply:!1}),hr.bind($e.NEAREST,$e.CLAMP_TO_EDGE)}else Y.demTexture=new e.Texture(Le,Fr,$e.RGBA,{premultiply:!1}),Y.demTexture.bind($e.NEAREST,$e.CLAMP_TO_EDGE);Le.activeTexture.set($e.TEXTURE0);var gt=Y.fbo;if(!gt){var Et=new e.Texture(Le,{width:jt,height:jt,data:null},$e.RGBA);Et.bind($e.LINEAR,$e.CLAMP_TO_EDGE),gt=Y.fbo=Le.createFramebuffer(jt,jt,!0),gt.colorAttachment.set(Et.texture)}Le.bindFramebuffer.set(gt.framebuffer),Le.viewport.set([0,0,jt,jt]),ve.useProgram("hillshadePrepare").draw(Le,$e.TRIANGLES,te,me,Ge,Pr.disabled,Jn(Y.tileID,mt),ye.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments),Y.needsHillshadePrepare=!1}}function ur(ve,Y,ye,te){if(ve.renderPass==="translucent"&&ye.paint.get("raster-opacity")!==0&&te.length)for(var me=ve.context,Ge=me.gl,Le=Y.getSource(),$e=ve.useProgram("raster"),mt=ve.colorModeForRenderPass(),jt=Le instanceof le?[{},te]:ve.stencilConfigForOverlap(te),_r=jt[0],Fr=jt[1],hr=Fr[Fr.length-1].overscaledZ,gt=!ve.options.moving,Et=0,Ft=Fr;Et<Ft.length;Et+=1){var ir=Ft[Et],fr=ve.depthModeForSublayer(ir.overscaledZ-hr,ye.paint.get("raster-opacity")===1?Ba.ReadWrite:Ba.ReadOnly,Ge.LESS),sr=Y.getTile(ir),pr=ve.transform.calculatePosMatrix(ir.toUnwrapped(),gt);sr.registerFadeDuration(ye.paint.get("raster-fade-duration"));var lr=Y.findLoadedParent(ir,0),Xt=mr(sr,lr,Y,ye,ve.transform),or=void 0,qt=void 0,Dr=ye.paint.get("raster-resampling")==="nearest"?Ge.NEAREST:Ge.LINEAR;me.activeTexture.set(Ge.TEXTURE0),sr.texture.bind(Dr,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),me.activeTexture.set(Ge.TEXTURE1),lr?(lr.texture.bind(Dr,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),or=Math.pow(2,lr.tileID.overscaledZ-sr.tileID.overscaledZ),qt=[sr.tileID.canonical.x*or%1,sr.tileID.canonical.y*or%1]):sr.texture.bind(Dr,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST);var Jr=sl(pr,qt||[0,0],or||1,Xt,ye);Le instanceof le?$e.draw(me,Ge.TRIANGLES,fr,za.disabled,mt,Pr.disabled,Jr,ye.id,Le.boundsBuffer,ve.quadTriangleIndexBuffer,Le.boundsSegments):$e.draw(me,Ge.TRIANGLES,fr,_r[ir.overscaledZ],mt,Pr.disabled,Jr,ye.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function mr(ve,Y,ye,te,me){var Ge=te.paint.get("raster-fade-duration");if(Ge>0){var Le=e.browser.now(),$e=(Le-ve.timeAdded)/Ge,mt=Y?(Le-Y.timeAdded)/Ge:-1,jt=ye.getSource(),_r=me.coveringZoomLevel({tileSize:jt.tileSize,roundZoom:jt.roundZoom}),Fr=!Y||Math.abs(Y.tileID.overscaledZ-_r)>Math.abs(ve.tileID.overscaledZ-_r),hr=Fr&&ve.refreshedUponExpiration?1:e.clamp(Fr?$e:1-mt,0,1);return ve.refreshedUponExpiration&&$e>=1&&(ve.refreshedUponExpiration=!1),Y?{opacity:1,mix:1-hr}:{opacity:hr,mix:0}}else return{opacity:1,mix:0}}function Er(ve,Y,ye){var te=ye.paint.get("background-color"),me=ye.paint.get("background-opacity");if(me!==0){var Ge=ve.context,Le=Ge.gl,$e=ve.transform,mt=$e.tileSize,jt=ye.paint.get("background-pattern");if(!ve.isPatternMissing(jt)){var _r=!jt&&te.a===1&&me===1&&ve.opaquePassEnabledForLayer()?"opaque":"translucent";if(ve.renderPass===_r){var Fr=za.disabled,hr=ve.depthModeForSublayer(0,_r==="opaque"?Ba.ReadWrite:Ba.ReadOnly),gt=ve.colorModeForRenderPass(),Et=ve.useProgram(jt?"backgroundPattern":"background"),Ft=$e.coveringTiles({tileSize:mt});jt&&(Ge.activeTexture.set(Le.TEXTURE0),ve.imageManager.bind(ve.context));for(var ir=ye.getCrossfadeParameters(),fr=0,sr=Ft;fr<sr.length;fr+=1){var pr=sr[fr],lr=ve.transform.calculatePosMatrix(pr.toUnwrapped()),Xt=jt?fo(lr,me,ve,jt,{tileID:pr,tileSize:mt},ir):gc(lr,me,te);Et.draw(Ge,Le.TRIANGLES,hr,Fr,gt,Pr.disabled,Xt,ye.id,ve.tileExtentBuffer,ve.quadTriangleIndexBuffer,ve.tileExtentSegments)}}}}}var Br=new e.Color(1,0,0,1),Qr=new e.Color(0,1,0,1),ga=new e.Color(0,0,1,1),Sa=new e.Color(1,0,1,1),Oa=new e.Color(0,1,1,1);function di(ve){var Y=ve.transform.padding,ye=3;Gi(ve,ve.transform.height-(Y.top||0),ye,Br),Gi(ve,Y.bottom||0,ye,Qr),on(ve,Y.left||0,ye,ga),on(ve,ve.transform.width-(Y.right||0),ye,Sa);var te=ve.transform.centerPoint;Wi(ve,te.x,ve.transform.height-te.y,Oa)}function Wi(ve,Y,ye,te){var me=20,Ge=2;Tn(ve,Y-Ge/2,ye-me/2,Ge,me,te),Tn(ve,Y-me/2,ye-Ge/2,me,Ge,te)}function Gi(ve,Y,ye,te){Tn(ve,0,Y+ye/2,ve.transform.width,ye,te)}function on(ve,Y,ye,te){Tn(ve,Y-ye/2,0,ye,ve.transform.height,te)}function Tn(ve,Y,ye,te,me,Ge){var Le=ve.context,$e=Le.gl;$e.enable($e.SCISSOR_TEST),$e.scissor(Y*e.browser.devicePixelRatio,ye*e.browser.devicePixelRatio,te*e.browser.devicePixelRatio,me*e.browser.devicePixelRatio),Le.clear({color:Ge}),$e.disable($e.SCISSOR_TEST)}function Wn(ve,Y,ye){for(var te=0;te<ye.length;te++)Bn(ve,Y,ye[te])}function Bn(ve,Y,ye){var te=ve.context,me=te.gl,Ge=ye.posMatrix,Le=ve.useProgram("debug"),$e=Ba.disabled,mt=za.disabled,jt=ve.colorModeForRenderPass(),_r="$debug";te.activeTexture.set(me.TEXTURE0),ve.emptyTexture.bind(me.LINEAR,me.CLAMP_TO_EDGE),Le.draw(te,me.LINE_STRIP,$e,mt,jt,Pr.disabled,Zi(Ge,e.Color.red),_r,ve.debugBuffer,ve.tileBorderIndexBuffer,ve.debugSegments);var Fr=Y.getTileByID(ye.key).latestRawTileData,hr=Fr&&Fr.byteLength||0,gt=Math.floor(hr/1024),Et=Y.getTile(ye).tileSize,Ft=512/Math.min(Et,512)*(ye.overscaledZ/ve.transform.zoom)*.5,ir=ye.canonical.toString();ye.overscaledZ!==ye.canonical.z&&(ir+=" => "+ye.overscaledZ);var fr=ir+" "+gt+"kb";Ao(ve,fr),Le.draw(te,me.TRIANGLES,$e,mt,Nt.alphaBlended,Pr.disabled,Zi(Ge,e.Color.transparent,Ft),_r,ve.debugBuffer,ve.quadTriangleIndexBuffer,ve.debugSegments)}function Ao(ve,Y){ve.initDebugOverlayCanvas();var ye=ve.debugOverlayCanvas,te=ve.context.gl,me=ve.debugOverlayCanvas.getContext("2d");me.clearRect(0,0,ye.width,ye.height),me.shadowColor="white",me.shadowBlur=2,me.lineWidth=1.5,me.strokeStyle="white",me.textBaseline="top",me.font="bold 36px Open Sans, sans-serif",me.fillText(Y,5,5),me.strokeText(Y,5,5),ve.debugOverlayTexture.update(ye),ve.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)}function ss(ve,Y,ye){var te=ve.context,me=ye.implementation;if(ve.renderPass==="offscreen"){var Ge=me.prerender;Ge&&(ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),Ge.call(me,te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState())}else if(ve.renderPass==="translucent"){ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),te.setStencilMode(za.disabled);var Le=me.renderingMode==="3d"?new Ba(ve.context.gl.LEQUAL,Ba.ReadWrite,ve.depthRangeFor3D):ve.depthModeForSublayer(0,Ba.ReadOnly);te.setDepthMode(Le),me.render(te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState(),te.bindFramebuffer.set(null)}}var So={symbol:R,circle:Bt,heatmap:$t,line:sa,fill:He,"fill-extrusion":ut,hillshade:Ct,raster:ur,background:Er,debug:Wn,custom:ss},Ko=function(Y,ye){this.context=new ta(Y),this.transform=ye,this._tileTextures={},this.setup(),this.numSublayers=ma.maxUnderzooming+ma.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new au,this.gpuTimers={}};Ko.prototype.resize=function(Y,ye){if(this.width=Y*e.browser.devicePixelRatio,this.height=ye*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var te=0,me=this.style._order;te<me.length;te+=1){var Ge=me[te];this.style._layers[Ge].resize()}},Ko.prototype.setup=function(){var Y=this.context,ye=new e.StructArrayLayout2i4;ye.emplaceBack(0,0),ye.emplaceBack(e.EXTENT,0),ye.emplaceBack(0,e.EXTENT),ye.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=Y.createVertexBuffer(ye,Eu.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);var te=new e.StructArrayLayout2i4;te.emplaceBack(0,0),te.emplaceBack(e.EXTENT,0),te.emplaceBack(0,e.EXTENT),te.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=Y.createVertexBuffer(te,Eu.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var me=new e.StructArrayLayout4i8;me.emplaceBack(0,0,0,0),me.emplaceBack(e.EXTENT,0,e.EXTENT,0),me.emplaceBack(0,e.EXTENT,0,e.EXTENT),me.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=Y.createVertexBuffer(me,ue.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var Ge=new e.StructArrayLayout2i4;Ge.emplaceBack(0,0),Ge.emplaceBack(1,0),Ge.emplaceBack(0,1),Ge.emplaceBack(1,1),this.viewportBuffer=Y.createVertexBuffer(Ge,Eu.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var Le=new e.StructArrayLayout1ui2;Le.emplaceBack(0),Le.emplaceBack(1),Le.emplaceBack(3),Le.emplaceBack(2),Le.emplaceBack(0),this.tileBorderIndexBuffer=Y.createIndexBuffer(Le);var $e=new e.StructArrayLayout3ui6;$e.emplaceBack(0,1,2),$e.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=Y.createIndexBuffer($e),this.emptyTexture=new e.Texture(Y,{width:1,height:1,data:new Uint8Array([0,0,0,0])},Y.gl.RGBA);var mt=this.context.gl;this.stencilClearMode=new za({func:mt.ALWAYS,mask:0},0,255,mt.ZERO,mt.ZERO,mt.ZERO)},Ko.prototype.clearStencil=function(){var Y=this.context,ye=Y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var te=e.create();e.ortho(te,0,this.width,this.height,0,0,1),e.scale(te,te,[ye.drawingBufferWidth,ye.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(Y,ye.TRIANGLES,Ba.disabled,this.stencilClearMode,Nt.disabled,Pr.disabled,dn(te),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Ko.prototype._renderTileClippingMasks=function(Y,ye){if(!(this.currentStencilSource===Y.source||!Y.isTileClipped()||!ye||!ye.length)){this.currentStencilSource=Y.source;var te=this.context,me=te.gl;this.nextStencilID+ye.length>256&&this.clearStencil(),te.setColorMode(Nt.disabled),te.setDepthMode(Ba.disabled);var Ge=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Le=0,$e=ye;Le<$e.length;Le+=1){var mt=$e[Le],jt=this._tileClippingMaskIDs[mt.key]=this.nextStencilID++;Ge.draw(te,me.TRIANGLES,Ba.disabled,new za({func:me.ALWAYS,mask:0},jt,255,me.KEEP,me.KEEP,me.REPLACE),Nt.disabled,Pr.disabled,dn(mt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Ko.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var Y=this.nextStencilID++,ye=this.context.gl;return new za({func:ye.NOTEQUAL,mask:255},Y,255,ye.KEEP,ye.KEEP,ye.REPLACE)},Ko.prototype.stencilModeForClipping=function(Y){var ye=this.context.gl;return new za({func:ye.EQUAL,mask:255},this._tileClippingMaskIDs[Y.key],0,ye.KEEP,ye.KEEP,ye.REPLACE)},Ko.prototype.stencilConfigForOverlap=function(Y){var ye,te=this.context.gl,me=Y.sort(function(jt,_r){return _r.overscaledZ-jt.overscaledZ}),Ge=me[me.length-1].overscaledZ,Le=me[0].overscaledZ-Ge+1;if(Le>1){this.currentStencilSource=void 0,this.nextStencilID+Le>256&&this.clearStencil();for(var $e={},mt=0;mt<Le;mt++)$e[mt+Ge]=new za({func:te.GEQUAL,mask:255},mt+this.nextStencilID,255,te.KEEP,te.KEEP,te.REPLACE);return this.nextStencilID+=Le,[$e,me]}return[(ye={},ye[Ge]=za.disabled,ye),me]},Ko.prototype.colorModeForRenderPass=function(){var Y=this.context.gl;if(this._showOverdrawInspector){var ye=8,te=1/ye;return new Nt([Y.CONSTANT_COLOR,Y.ONE],new e.Color(te,te,te,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?Nt.unblended:Nt.alphaBlended},Ko.prototype.depthModeForSublayer=function(Y,ye,te){if(!this.opaquePassEnabledForLayer())return Ba.disabled;var me=1-((1+this.currentLayer)*this.numSublayers+Y)*this.depthEpsilon;return new Ba(te||this.context.gl.LEQUAL,ye,[me,me])},Ko.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Ko.prototype.render=function(Y,ye){var te=this;this.style=Y,this.options=ye,this.lineAtlas=Y.lineAtlas,this.imageManager=Y.imageManager,this.glyphManager=Y.glyphManager,this.symbolFadeChange=Y.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var me=this.style._order,Ge=this.style.sourceCaches;for(var Le in Ge){var $e=Ge[Le];$e.used&&$e.prepare(this.context)}var mt={},jt={},_r={};for(var Fr in Ge){var hr=Ge[Fr];mt[Fr]=hr.getVisibleCoordinates(),jt[Fr]=mt[Fr].slice().reverse(),_r[Fr]=hr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var gt=0;gt<me.length;gt++){var Et=me[gt];if(this.style._layers[Et].is3D()){this.opaquePassCutoff=gt;break}}this.renderPass="offscreen";for(var Ft=0,ir=me;Ft<ir.length;Ft+=1){var fr=ir[Ft],sr=this.style._layers[fr];if(!(!sr.hasOffscreenPass()||sr.isHidden(this.transform.zoom))){var pr=jt[sr.source];sr.type!=="custom"&&!pr.length||this.renderLayer(this,Ge[sr.source],sr,pr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:ye.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=ye.showOverdrawInspector,this.depthRangeFor3D=[0,1-(Y._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=me.length-1;this.currentLayer>=0;this.currentLayer--){var lr=this.style._layers[me[this.currentLayer]],Xt=Ge[lr.source],or=mt[lr.source];this._renderTileClippingMasks(lr,or),this.renderLayer(this,Xt,lr,or)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<me.length;this.currentLayer++){var qt=this.style._layers[me[this.currentLayer]],Dr=Ge[qt.source],Jr=(qt.type==="symbol"?_r:jt)[qt.source];this._renderTileClippingMasks(qt,mt[qt.source]),this.renderLayer(this,Dr,qt,Jr)}if(this.options.showTileBoundaries){var ba,yi,Xa=e.values(this.style._layers);Xa.forEach(function(si){si.source&&!si.isHidden(te.transform.zoom)&&(si.source!==(yi&&yi.id)&&(yi=te.style.sourceCaches[si.source]),(!ba||ba.getSource().maxzoom<yi.getSource().maxzoom)&&(ba=yi))}),ba&&So.debug(this,ba,ba.getVisibleCoordinates())}this.options.showPadding&&di(this),this.context.setDefault()},Ko.prototype.renderLayer=function(Y,ye,te,me){te.isHidden(this.transform.zoom)||te.type!=="background"&&te.type!=="custom"&&!me.length||(this.id=te.id,this.gpuTimingStart(te),So[te.type](Y,ye,te,me,this.style.placement.variableOffsets),this.gpuTimingEnd())},Ko.prototype.gpuTimingStart=function(Y){if(this.options.gpuTiming){var ye=this.context.extTimerQuery,te=this.gpuTimers[Y.id];te||(te=this.gpuTimers[Y.id]={calls:0,cpuTime:0,query:ye.createQueryEXT()}),te.calls++,ye.beginQueryEXT(ye.TIME_ELAPSED_EXT,te.query)}},Ko.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var Y=this.context.extTimerQuery;Y.endQueryEXT(Y.TIME_ELAPSED_EXT)}},Ko.prototype.collectGpuTimers=function(){var Y=this.gpuTimers;return this.gpuTimers={},Y},Ko.prototype.queryGpuTimers=function(Y){var ye={};for(var te in Y){var me=Y[te],Ge=this.context.extTimerQuery,Le=Ge.getQueryObjectEXT(me.query,Ge.QUERY_RESULT_EXT)/(1e3*1e3);Ge.deleteQueryEXT(me.query),ye[te]=Le}return ye},Ko.prototype.translatePosMatrix=function(Y,ye,te,me,Ge){if(!te[0]&&!te[1])return Y;var Le=Ge?me==="map"?this.transform.angle:0:me==="viewport"?-this.transform.angle:0;if(Le){var $e=Math.sin(Le),mt=Math.cos(Le);te=[te[0]*mt-te[1]*$e,te[0]*$e+te[1]*mt]}var jt=[Ge?te[0]:Vn(ye,te[0],this.transform.zoom),Ge?te[1]:Vn(ye,te[1],this.transform.zoom),0],_r=new Float32Array(16);return e.translate(_r,Y,jt),_r},Ko.prototype.saveTileTexture=function(Y){var ye=this._tileTextures[Y.size[0]];ye?ye.push(Y):this._tileTextures[Y.size[0]]=[Y]},Ko.prototype.getTileTexture=function(Y){var ye=this._tileTextures[Y];return ye&&ye.length>0?ye.pop():null},Ko.prototype.isPatternMissing=function(Y){if(!Y)return!1;if(!Y.from||!Y.to)return!0;var ye=this.imageManager.getPattern(Y.from.toString()),te=this.imageManager.getPattern(Y.to.toString());return!ye||!te},Ko.prototype.useProgram=function(Y,ye){this.cache=this.cache||{};var te=""+Y+(ye?ye.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[te]||(this.cache[te]=new mf(this.context,Y,sf[Y],ye,zo[Y],this._showOverdrawInspector)),this.cache[te]},Ko.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()},Ko.prototype.setBaseState=function(){var Y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(Y.FUNC_ADD)},Ko.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var Y=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,Y.RGBA)}},Ko.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var hs=function(Y,ye){this.points=Y,this.planes=ye};hs.fromInvProjectionMatrix=function(Y,ye,te){var me=[[-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]],Ge=Math.pow(2,te),Le=me.map(function(jt){return e.transformMat4([],jt,Y)}).map(function(jt){return e.scale$1([],jt,1/jt[3]/ye*Ge)}),$e=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],mt=$e.map(function(jt){var _r=e.sub([],Le[jt[0]],Le[jt[1]]),Fr=e.sub([],Le[jt[2]],Le[jt[1]]),hr=e.normalize([],e.cross([],_r,Fr)),gt=-e.dot(hr,Le[jt[1]]);return hr.concat(gt)});return new hs(Le,mt)};var ll=function(Y,ye){this.min=Y,this.max=ye,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};ll.prototype.quadrant=function(Y){for(var ye=[Y%2===0,Y<2],te=e.clone$2(this.min),me=e.clone$2(this.max),Ge=0;Ge<ye.length;Ge++)te[Ge]=ye[Ge]?this.min[Ge]:this.center[Ge],me[Ge]=ye[Ge]?this.center[Ge]:this.max[Ge];return me[2]=this.max[2],new ll(te,me)},ll.prototype.distanceX=function(Y){var ye=Math.max(Math.min(this.max[0],Y[0]),this.min[0]);return ye-Y[0]},ll.prototype.distanceY=function(Y){var ye=Math.max(Math.min(this.max[1],Y[1]),this.min[1]);return ye-Y[1]},ll.prototype.intersects=function(Y){for(var ye=[[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]],te=!0,me=0;me<Y.planes.length;me++){for(var Ge=Y.planes[me],Le=0,$e=0;$e<ye.length;$e++)Le+=e.dot$1(Ge,ye[$e])>=0;if(Le===0)return 0;Le!==ye.length&&(te=!1)}if(te)return 2;for(var mt=0;mt<3;mt++){for(var jt=Number.MAX_VALUE,_r=-Number.MAX_VALUE,Fr=0;Fr<Y.points.length;Fr++){var hr=Y.points[Fr][mt]-this.min[mt];jt=Math.min(jt,hr),_r=Math.max(_r,hr)}if(_r<0||jt>this.max[mt]-this.min[mt])return 0}return 1};var Js=function(Y,ye,te,me){if(Y===void 0&&(Y=0),ye===void 0&&(ye=0),te===void 0&&(te=0),me===void 0&&(me=0),isNaN(Y)||Y<0||isNaN(ye)||ye<0||isNaN(te)||te<0||isNaN(me)||me<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=Y,this.bottom=ye,this.left=te,this.right=me};Js.prototype.interpolate=function(Y,ye,te){return ye.top!=null&&Y.top!=null&&(this.top=e.number(Y.top,ye.top,te)),ye.bottom!=null&&Y.bottom!=null&&(this.bottom=e.number(Y.bottom,ye.bottom,te)),ye.left!=null&&Y.left!=null&&(this.left=e.number(Y.left,ye.left,te)),ye.right!=null&&Y.right!=null&&(this.right=e.number(Y.right,ye.right,te)),this},Js.prototype.getCenter=function(Y,ye){var te=e.clamp((this.left+Y-this.right)/2,0,Y),me=e.clamp((this.top+ye-this.bottom)/2,0,ye);return new e.Point(te,me)},Js.prototype.equals=function(Y){return this.top===Y.top&&this.bottom===Y.bottom&&this.left===Y.left&&this.right===Y.right},Js.prototype.clone=function(){return new Js(this.top,this.bottom,this.left,this.right)},Js.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var es=function(Y,ye,te,me,Ge){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ge===void 0?!0:Ge,this._minZoom=Y||0,this._maxZoom=ye||22,this._minPitch=te??0,this._maxPitch=me??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Js,this._posMatrixCache={},this._alignedPosMatrixCache={}},ts={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}};es.prototype.clone=function(){var Y=new es(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return Y.tileSize=this.tileSize,Y.latRange=this.latRange,Y.width=this.width,Y.height=this.height,Y._center=this._center,Y.zoom=this.zoom,Y.angle=this.angle,Y._fov=this._fov,Y._pitch=this._pitch,Y._unmodified=this._unmodified,Y._edgeInsets=this._edgeInsets.clone(),Y._calcMatrices(),Y},ts.minZoom.get=function(){return this._minZoom},ts.minZoom.set=function(ve){this._minZoom!==ve&&(this._minZoom=ve,this.zoom=Math.max(this.zoom,ve))},ts.maxZoom.get=function(){return this._maxZoom},ts.maxZoom.set=function(ve){this._maxZoom!==ve&&(this._maxZoom=ve,this.zoom=Math.min(this.zoom,ve))},ts.minPitch.get=function(){return this._minPitch},ts.minPitch.set=function(ve){this._minPitch!==ve&&(this._minPitch=ve,this.pitch=Math.max(this.pitch,ve))},ts.maxPitch.get=function(){return this._maxPitch},ts.maxPitch.set=function(ve){this._maxPitch!==ve&&(this._maxPitch=ve,this.pitch=Math.min(this.pitch,ve))},ts.renderWorldCopies.get=function(){return this._renderWorldCopies},ts.renderWorldCopies.set=function(ve){ve===void 0?ve=!0:ve===null&&(ve=!1),this._renderWorldCopies=ve},ts.worldSize.get=function(){return this.tileSize*this.scale},ts.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ts.size.get=function(){return new e.Point(this.width,this.height)},ts.bearing.get=function(){return-this.angle/Math.PI*180},ts.bearing.set=function(ve){var Y=-e.wrap(ve,-180,180)*Math.PI/180;this.angle!==Y&&(this._unmodified=!1,this.angle=Y,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ts.pitch.get=function(){return this._pitch/Math.PI*180},ts.pitch.set=function(ve){var Y=e.clamp(ve,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==Y&&(this._unmodified=!1,this._pitch=Y,this._calcMatrices())},ts.fov.get=function(){return this._fov/Math.PI*180},ts.fov.set=function(ve){ve=Math.max(.01,Math.min(60,ve)),this._fov!==ve&&(this._unmodified=!1,this._fov=ve/180*Math.PI,this._calcMatrices())},ts.zoom.get=function(){return this._zoom},ts.zoom.set=function(ve){var Y=Math.min(Math.max(ve,this.minZoom),this.maxZoom);this._zoom!==Y&&(this._unmodified=!1,this._zoom=Y,this.scale=this.zoomScale(Y),this.tileZoom=Math.floor(Y),this.zoomFraction=Y-this.tileZoom,this._constrain(),this._calcMatrices())},ts.center.get=function(){return this._center},ts.center.set=function(ve){ve.lat===this._center.lat&&ve.lng===this._center.lng||(this._unmodified=!1,this._center=ve,this._constrain(),this._calcMatrices())},ts.padding.get=function(){return this._edgeInsets.toJSON()},ts.padding.set=function(ve){this._edgeInsets.equals(ve)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ve,1),this._calcMatrices())},ts.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},es.prototype.isPaddingEqual=function(Y){return this._edgeInsets.equals(Y)},es.prototype.interpolatePadding=function(Y,ye,te){this._unmodified=!1,this._edgeInsets.interpolate(Y,ye,te),this._constrain(),this._calcMatrices()},es.prototype.coveringZoomLevel=function(Y){var ye=(Y.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/Y.tileSize));return Math.max(0,ye)},es.prototype.getVisibleUnwrappedCoordinates=function(Y){var ye=[new e.UnwrappedTileID(0,Y)];if(this._renderWorldCopies)for(var te=this.pointCoordinate(new e.Point(0,0)),me=this.pointCoordinate(new e.Point(this.width,0)),Ge=this.pointCoordinate(new e.Point(this.width,this.height)),Le=this.pointCoordinate(new e.Point(0,this.height)),$e=Math.floor(Math.min(te.x,me.x,Ge.x,Le.x)),mt=Math.floor(Math.max(te.x,me.x,Ge.x,Le.x)),jt=1,_r=$e-jt;_r<=mt+jt;_r++)_r!==0&&ye.push(new e.UnwrappedTileID(_r,Y));return ye},es.prototype.coveringTiles=function(Y){var ye=this.coveringZoomLevel(Y),te=ye;if(Y.minzoom!==void 0&&ye<Y.minzoom)return[];Y.maxzoom!==void 0&&ye>Y.maxzoom&&(ye=Y.maxzoom);var me=e.MercatorCoordinate.fromLngLat(this.center),Ge=Math.pow(2,ye),Le=[Ge*me.x,Ge*me.y,0],$e=hs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ye),mt=Y.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(mt=ye);var jt=3,_r=function(Xa){return{aabb:new ll([Xa*Ge,0,0],[(Xa+1)*Ge,Ge,0]),zoom:0,x:0,y:0,wrap:Xa,fullyVisible:!1}},Fr=[],hr=[],gt=ye,Et=Y.reparseOverscaled?te:ye;if(this._renderWorldCopies)for(var Ft=1;Ft<=3;Ft++)Fr.push(_r(-Ft)),Fr.push(_r(Ft));for(Fr.push(_r(0));Fr.length>0;){var ir=Fr.pop(),fr=ir.x,sr=ir.y,pr=ir.fullyVisible;if(!pr){var lr=ir.aabb.intersects($e);if(lr===0)continue;pr=lr===2}var Xt=ir.aabb.distanceX(Le),or=ir.aabb.distanceY(Le),qt=Math.max(Math.abs(Xt),Math.abs(or)),Dr=jt+(1<<gt-ir.zoom)-2;if(ir.zoom===gt||qt>Dr&&ir.zoom>=mt){hr.push({tileID:new e.OverscaledTileID(ir.zoom===gt?Et:ir.zoom,ir.wrap,ir.zoom,fr,sr),distanceSq:e.sqrLen([Le[0]-.5-fr,Le[1]-.5-sr])});continue}for(var Jr=0;Jr<4;Jr++){var ba=(fr<<1)+Jr%2,yi=(sr<<1)+(Jr>>1);Fr.push({aabb:ir.aabb.quadrant(Jr),zoom:ir.zoom+1,x:ba,y:yi,wrap:ir.wrap,fullyVisible:pr})}}return hr.sort(function(Xa,si){return Xa.distanceSq-si.distanceSq}).map(function(Xa){return Xa.tileID})},es.prototype.resize=function(Y,ye){this.width=Y,this.height=ye,this.pixelsToGLUnits=[2/Y,-2/ye],this._constrain(),this._calcMatrices()},ts.unmodified.get=function(){return this._unmodified},es.prototype.zoomScale=function(Y){return Math.pow(2,Y)},es.prototype.scaleZoom=function(Y){return Math.log(Y)/Math.LN2},es.prototype.project=function(Y){var ye=e.clamp(Y.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(Y.lng)*this.worldSize,e.mercatorYfromLat(ye)*this.worldSize)},es.prototype.unproject=function(Y){return new e.MercatorCoordinate(Y.x/this.worldSize,Y.y/this.worldSize).toLngLat()},ts.point.get=function(){return this.project(this.center)},es.prototype.setLocationAtPoint=function(Y,ye){var te=this.pointCoordinate(ye),me=this.pointCoordinate(this.centerPoint),Ge=this.locationCoordinate(Y),Le=new e.MercatorCoordinate(Ge.x-(te.x-me.x),Ge.y-(te.y-me.y));this.center=this.coordinateLocation(Le),this._renderWorldCopies&&(this.center=this.center.wrap())},es.prototype.locationPoint=function(Y){return this.coordinatePoint(this.locationCoordinate(Y))},es.prototype.pointLocation=function(Y){return this.coordinateLocation(this.pointCoordinate(Y))},es.prototype.locationCoordinate=function(Y){return e.MercatorCoordinate.fromLngLat(Y)},es.prototype.coordinateLocation=function(Y){return Y.toLngLat()},es.prototype.pointCoordinate=function(Y){var ye=0,te=[Y.x,Y.y,0,1],me=[Y.x,Y.y,1,1];e.transformMat4(te,te,this.pixelMatrixInverse),e.transformMat4(me,me,this.pixelMatrixInverse);var Ge=te[3],Le=me[3],$e=te[0]/Ge,mt=me[0]/Le,jt=te[1]/Ge,_r=me[1]/Le,Fr=te[2]/Ge,hr=me[2]/Le,gt=Fr===hr?0:(ye-Fr)/(hr-Fr);return new e.MercatorCoordinate(e.number($e,mt,gt)/this.worldSize,e.number(jt,_r,gt)/this.worldSize)},es.prototype.coordinatePoint=function(Y){var ye=[Y.x*this.worldSize,Y.y*this.worldSize,0,1];return e.transformMat4(ye,ye,this.pixelMatrix),new e.Point(ye[0]/ye[3],ye[1]/ye[3])},es.prototype.getBounds=function(){return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},es.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},es.prototype.setMaxBounds=function(Y){Y?(this.lngRange=[Y.getWest(),Y.getEast()],this.latRange=[Y.getSouth(),Y.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},es.prototype.calculatePosMatrix=function(Y,ye){ye===void 0&&(ye=!1);var te=Y.key,me=ye?this._alignedPosMatrixCache:this._posMatrixCache;if(me[te])return me[te];var Ge=Y.canonical,Le=this.worldSize/this.zoomScale(Ge.z),$e=Ge.x+Math.pow(2,Ge.z)*Y.wrap,mt=e.identity(new Float64Array(16));return e.translate(mt,mt,[$e*Le,Ge.y*Le,0]),e.scale(mt,mt,[Le/e.EXTENT,Le/e.EXTENT,1]),e.multiply(mt,ye?this.alignedProjMatrix:this.projMatrix,mt),me[te]=new Float32Array(mt),me[te]},es.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},es.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var Y=-90,ye=90,te=-180,me=180,Ge,Le,$e,mt,jt=this.size,_r=this._unmodified;if(this.latRange){var Fr=this.latRange;Y=e.mercatorYfromLat(Fr[1])*this.worldSize,ye=e.mercatorYfromLat(Fr[0])*this.worldSize,Ge=ye-Y<jt.y?jt.y/(ye-Y):0}if(this.lngRange){var hr=this.lngRange;te=e.mercatorXfromLng(hr[0])*this.worldSize,me=e.mercatorXfromLng(hr[1])*this.worldSize,Le=me-te<jt.x?jt.x/(me-te):0}var gt=this.point,Et=Math.max(Le||0,Ge||0);if(Et){this.center=this.unproject(new e.Point(Le?(me+te)/2:gt.x,Ge?(ye+Y)/2:gt.y)),this.zoom+=this.scaleZoom(Et),this._unmodified=_r,this._constraining=!1;return}if(this.latRange){var Ft=gt.y,ir=jt.y/2;Ft-ir<Y&&(mt=Y+ir),Ft+ir>ye&&(mt=ye-ir)}if(this.lngRange){var fr=gt.x,sr=jt.x/2;fr-sr<te&&($e=te+sr),fr+sr>me&&($e=me-sr)}($e!==void 0||mt!==void 0)&&(this.center=this.unproject(new e.Point($e!==void 0?$e:gt.x,mt!==void 0?mt:gt.y))),this._unmodified=_r,this._constraining=!1}},es.prototype._calcMatrices=function(){if(this.height){var Y=this._fov/2,ye=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(Y)*this.height;var te=Math.PI/2+this._pitch,me=this._fov*(.5+ye.y/this.height),Ge=Math.sin(me)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-te-me,.01,Math.PI-.01)),Le=this.point,$e=Le.x,mt=Le.y,jt=Math.cos(Math.PI/2-this._pitch)*Ge+this.cameraToCenterDistance,_r=jt*1.01,Fr=this.height/50,hr=new Float64Array(16);e.perspective(hr,this._fov,this.width/this.height,Fr,_r),hr[8]=-ye.x*2/this.width,hr[9]=ye.y*2/this.height,e.scale(hr,hr,[1,-1,1]),e.translate(hr,hr,[0,0,-this.cameraToCenterDistance]),e.rotateX(hr,hr,this._pitch),e.rotateZ(hr,hr,this.angle),e.translate(hr,hr,[-$e,-mt,0]),this.mercatorMatrix=e.scale([],hr,[this.worldSize,this.worldSize,this.worldSize]),e.scale(hr,hr,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=hr,this.invProjMatrix=e.invert([],this.projMatrix);var gt=this.width%2/2,Et=this.height%2/2,Ft=Math.cos(this.angle),ir=Math.sin(this.angle),fr=$e-Math.round($e)+Ft*gt+ir*Et,sr=mt-Math.round(mt)+Ft*Et+ir*gt,pr=new Float64Array(hr);if(e.translate(pr,pr,[fr>.5?fr-1:fr,sr>.5?sr-1:sr,0]),this.alignedProjMatrix=pr,hr=e.create(),e.scale(hr,hr,[this.width/2,-this.height/2,1]),e.translate(hr,hr,[1,-1,0]),this.labelPlaneMatrix=hr,hr=e.create(),e.scale(hr,hr,[1,-1,1]),e.translate(hr,hr,[-1,-1,0]),e.scale(hr,hr,[2/this.width,2/this.height,1]),this.glCoordMatrix=hr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),hr=e.invert(new Float64Array(16),this.pixelMatrix),!hr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=hr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},es.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var Y=this.pointCoordinate(new e.Point(0,0)),ye=[Y.x*this.worldSize,Y.y*this.worldSize,0,1],te=e.transformMat4(ye,ye,this.pixelMatrix);return te[3]/this.cameraToCenterDistance},es.prototype.getCameraPoint=function(){var Y=this._pitch,ye=Math.tan(Y)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,ye))},es.prototype.getCameraQueryGeometry=function(Y){var ye=this.getCameraPoint();if(Y.length===1)return[Y[0],ye];for(var te=ye.x,me=ye.y,Ge=ye.x,Le=ye.y,$e=0,mt=Y;$e<mt.length;$e+=1){var jt=mt[$e];te=Math.min(te,jt.x),me=Math.min(me,jt.y),Ge=Math.max(Ge,jt.x),Le=Math.max(Le,jt.y)}return[new e.Point(te,me),new e.Point(Ge,me),new e.Point(Ge,Le),new e.Point(te,Le),new e.Point(te,me)]},Object.defineProperties(es.prototype,ts);function Pl(ve,Y){var ye=!1,te=null,me=function(){te=null,ye&&(ve(),te=setTimeout(me,Y),ye=!1)};return function(){return ye=!0,te||me(),te}}var $l=function(Y){this._hashName=Y&&encodeURIComponent(Y),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Pl(this._updateHashUnthrottled.bind(this),30*1e3/100)};$l.prototype.addTo=function(Y){return this._map=Y,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},$l.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},$l.prototype.getHashString=function(Y){var ye=this._map.getCenter(),te=Math.round(this._map.getZoom()*100)/100,me=Math.ceil((te*Math.LN2+Math.log(512/360/.5))/Math.LN10),Ge=Math.pow(10,me),Le=Math.round(ye.lng*Ge)/Ge,$e=Math.round(ye.lat*Ge)/Ge,mt=this._map.getBearing(),jt=this._map.getPitch(),_r="";if(Y?_r+="/"+Le+"/"+$e+"/"+te:_r+=te+"/"+$e+"/"+Le,(mt||jt)&&(_r+="/"+Math.round(mt*10)/10),jt&&(_r+="/"+Math.round(jt)),this._hashName){var Fr=this._hashName,hr=!1,gt=e.window.location.hash.slice(1).split("&").map(function(Et){var Ft=Et.split("=")[0];return Ft===Fr?(hr=!0,Ft+"="+_r):Et}).filter(function(Et){return Et});return hr||gt.push(Fr+"="+_r),"#"+gt.join("&")}return"#"+_r},$l.prototype._getCurrentHash=function(){var Y=this,ye=e.window.location.hash.replace("#","");if(this._hashName){var te;return ye.split("&").map(function(me){return me.split("=")}).forEach(function(me){me[0]===Y._hashName&&(te=me)}),(te&&te[1]||"").split("/")}return ye.split("/")},$l.prototype._onHashChange=function(){var Y=this._getCurrentHash();if(Y.length>=3&&!Y.some(function(te){return isNaN(te)})){var ye=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(Y[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+Y[2],+Y[1]],zoom:+Y[0],bearing:ye,pitch:+(Y[4]||0)}),!0}return!1},$l.prototype._updateHashUnthrottled=function(){var Y=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,Y)}catch{}};var Ru={linearity:.3,easing:e.bezier(0,0,.3,1)},hu=e.extend({deceleration:2500,maxSpeed:1400},Ru),wl=e.extend({deceleration:20,maxSpeed:1400},Ru),su=e.extend({deceleration:1e3,maxSpeed:360},Ru),uc=e.extend({deceleration:1e3,maxSpeed:90},Ru),ql=function(Y){this._map=Y,this.clear()};ql.prototype.clear=function(){this._inertiaBuffer=[]},ql.prototype.record=function(Y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:Y})},ql.prototype._drainInertiaBuffer=function(){for(var Y=this._inertiaBuffer,ye=e.browser.now(),te=160;Y.length>0&&ye-Y[0].time>te;)Y.shift()},ql.prototype._onMoveEnd=function(Y){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ye={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},te=0,me=this._inertiaBuffer;te<me.length;te+=1){var Ge=me[te],Le=Ge.settings;ye.zoom+=Le.zoomDelta||0,ye.bearing+=Le.bearingDelta||0,ye.pitch+=Le.pitchDelta||0,Le.panDelta&&ye.pan._add(Le.panDelta),Le.around&&(ye.around=Le.around),Le.pinchAround&&(ye.pinchAround=Le.pinchAround)}var $e=this._inertiaBuffer[this._inertiaBuffer.length-1],mt=$e.time-this._inertiaBuffer[0].time,jt={};if(ye.pan.mag()){var _r=de(ye.pan.mag(),mt,e.extend({},hu,Y||{}));jt.offset=ye.pan.mult(_r.amount/ye.pan.mag()),jt.center=this._map.transform.center,Vl(jt,_r)}if(ye.zoom){var Fr=de(ye.zoom,mt,wl);jt.zoom=this._map.transform.zoom+Fr.amount,Vl(jt,Fr)}if(ye.bearing){var hr=de(ye.bearing,mt,su);jt.bearing=this._map.transform.bearing+e.clamp(hr.amount,-179,179),Vl(jt,hr)}if(ye.pitch){var gt=de(ye.pitch,mt,uc);jt.pitch=this._map.transform.pitch+gt.amount,Vl(jt,gt)}if(jt.zoom||jt.bearing){var Et=ye.pinchAround===void 0?ye.around:ye.pinchAround;jt.around=Et?this._map.unproject(Et):this._map.getCenter()}return this.clear(),e.extend(jt,{noMoveStart:!0})}};function Vl(ve,Y){(!ve.duration||ve.duration<Y.duration)&&(ve.duration=Y.duration,ve.easing=Y.easing)}function de(ve,Y,ye){var te=ye.maxSpeed,me=ye.linearity,Ge=ye.deceleration,Le=e.clamp(ve*me/(Y/1e3),-te,te),$e=Math.abs(Le)/(Ge*me);return{easing:ye.easing,duration:$e*1e3,amount:Le*($e/2)}}var De=function(ve){function Y(te,me,Ge,Le){Le===void 0&&(Le={});var $e=r.mousePos(me.getCanvasContainer(),Ge),mt=me.unproject($e);ve.call(this,te,e.extend({point:$e,lngLat:mt,originalEvent:Ge},Le)),this._defaultPrevented=!1,this.target=me}ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y;var ye={defaultPrevented:{configurable:!0}};return Y.prototype.preventDefault=function(){this._defaultPrevented=!0},ye.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(Y.prototype,ye),Y}(e.Event),et=function(ve){function Y(te,me,Ge){var Le=te==="touchend"?Ge.changedTouches:Ge.touches,$e=r.touchPos(me.getCanvasContainer(),Le),mt=$e.map(function(Fr){return me.unproject(Fr)}),jt=$e.reduce(function(Fr,hr,gt,Et){return Fr.add(hr.div(Et.length))},new e.Point(0,0)),_r=me.unproject(jt);ve.call(this,te,{points:$e,point:jt,lngLats:mt,lngLat:_r,originalEvent:Ge}),this._defaultPrevented=!1}ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y;var ye={defaultPrevented:{configurable:!0}};return Y.prototype.preventDefault=function(){this._defaultPrevented=!0},ye.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(Y.prototype,ye),Y}(e.Event),vt=function(ve){function Y(te,me,Ge){ve.call(this,te,{originalEvent:Ge}),this._defaultPrevented=!1}ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y;var ye={defaultPrevented:{configurable:!0}};return Y.prototype.preventDefault=function(){this._defaultPrevented=!0},ye.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(Y.prototype,ye),Y}(e.Event),_t=function(Y,ye){this._map=Y,this._clickTolerance=ye.clickTolerance};_t.prototype.reset=function(){delete this._mousedownPos},_t.prototype.wheel=function(Y){return this._firePreventable(new vt(Y.type,this._map,Y))},_t.prototype.mousedown=function(Y,ye){return this._mousedownPos=ye,this._firePreventable(new De(Y.type,this._map,Y))},_t.prototype.mouseup=function(Y){this._map.fire(new De(Y.type,this._map,Y))},_t.prototype.click=function(Y,ye){this._mousedownPos&&this._mousedownPos.dist(ye)>=this._clickTolerance||this._map.fire(new De(Y.type,this._map,Y))},_t.prototype.dblclick=function(Y){return this._firePreventable(new De(Y.type,this._map,Y))},_t.prototype.mouseover=function(Y){this._map.fire(new De(Y.type,this._map,Y))},_t.prototype.mouseout=function(Y){this._map.fire(new De(Y.type,this._map,Y))},_t.prototype.touchstart=function(Y){return this._firePreventable(new et(Y.type,this._map,Y))},_t.prototype.touchmove=function(Y){this._map.fire(new et(Y.type,this._map,Y))},_t.prototype.touchend=function(Y){this._map.fire(new et(Y.type,this._map,Y))},_t.prototype.touchcancel=function(Y){this._map.fire(new et(Y.type,this._map,Y))},_t.prototype._firePreventable=function(Y){if(this._map.fire(Y),Y.defaultPrevented)return{}},_t.prototype.isEnabled=function(){return!0},_t.prototype.isActive=function(){return!1},_t.prototype.enable=function(){},_t.prototype.disable=function(){};var St=function(Y){this._map=Y};St.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},St.prototype.mousemove=function(Y){this._map.fire(new De(Y.type,this._map,Y))},St.prototype.mousedown=function(){this._delayContextMenu=!0},St.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new De("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},St.prototype.contextmenu=function(Y){this._delayContextMenu?this._contextMenuEvent=Y:this._map.fire(new De(Y.type,this._map,Y)),this._map.listens("contextmenu")&&Y.preventDefault()},St.prototype.isEnabled=function(){return!0},St.prototype.isActive=function(){return!1},St.prototype.enable=function(){},St.prototype.disable=function(){};var ar=function(Y,ye){this._map=Y,this._el=Y.getCanvasContainer(),this._container=Y.getContainer(),this._clickTolerance=ye.clickTolerance||1};ar.prototype.isEnabled=function(){return!!this._enabled},ar.prototype.isActive=function(){return!!this._active},ar.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},ar.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ar.prototype.mousedown=function(Y,ye){this.isEnabled()&&Y.shiftKey&&Y.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ye,this._active=!0)},ar.prototype.mousemoveWindow=function(Y,ye){if(this._active){var te=ye;if(!(this._lastPos.equals(te)||!this._box&&te.dist(this._startPos)<this._clickTolerance)){var me=this._startPos;this._lastPos=te,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",Y));var Ge=Math.min(me.x,te.x),Le=Math.max(me.x,te.x),$e=Math.min(me.y,te.y),mt=Math.max(me.y,te.y);r.setTransform(this._box,"translate("+Ge+"px,"+$e+"px)"),this._box.style.width=Le-Ge+"px",this._box.style.height=mt-$e+"px"}}},ar.prototype.mouseupWindow=function(Y,ye){var te=this;if(this._active&&Y.button===0){var me=this._startPos,Ge=ye;if(this.reset(),r.suppressClick(),me.x===Ge.x&&me.y===Ge.y)this._fireEvent("boxzoomcancel",Y);else return this._map.fire(new e.Event("boxzoomend",{originalEvent:Y})),{cameraAnimation:function(Le){return Le.fitScreenCoordinates(me,Ge,te._map.getBearing(),{linear:!0})}}}},ar.prototype.keydown=function(Y){this._active&&Y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",Y))},ar.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},ar.prototype._fireEvent=function(Y,ye){return this._map.fire(new e.Event(Y,{originalEvent:ye}))};function zt(ve,Y){for(var ye={},te=0;te<ve.length;te++)ye[ve[te].identifier]=Y[te];return ye}function gr(ve){for(var Y=new e.Point(0,0),ye=0,te=ve;ye<te.length;ye+=1){var me=te[ye];Y._add(me)}return Y.div(ve.length)}var Vr=500,Wr=500,Ta=30,ya=function(Y){this.reset(),this.numTouches=Y.numTouches};ya.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},ya.prototype.touchstart=function(Y,ye,te){(this.centroid||te.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=Y.timeStamp),te.length===this.numTouches&&(this.centroid=gr(ye),this.touches=zt(te,ye)))},ya.prototype.touchmove=function(Y,ye,te){if(!(this.aborted||!this.centroid)){var me=zt(te,ye);for(var Ge in this.touches){var Le=this.touches[Ge],$e=me[Ge];(!$e||$e.dist(Le)>Ta)&&(this.aborted=!0)}}},ya.prototype.touchend=function(Y,ye,te){if((!this.centroid||Y.timeStamp-this.startTime>Wr)&&(this.aborted=!0),te.length===0){var me=!this.aborted&&this.centroid;if(this.reset(),me)return me}};var ri=function(Y){this.singleTap=new ya(Y),this.numTaps=Y.numTaps,this.reset()};ri.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ri.prototype.touchstart=function(Y,ye,te){this.singleTap.touchstart(Y,ye,te)},ri.prototype.touchmove=function(Y,ye,te){this.singleTap.touchmove(Y,ye,te)},ri.prototype.touchend=function(Y,ye,te){var me=this.singleTap.touchend(Y,ye,te);if(me){var Ge=Y.timeStamp-this.lastTime<Vr,Le=!this.lastTap||this.lastTap.dist(me)<Ta;if((!Ge||!Le)&&this.reset(),this.count++,this.lastTime=Y.timeStamp,this.lastTap=me,this.count===this.numTaps)return this.reset(),me}};var ni=function(){this._zoomIn=new ri({numTouches:1,numTaps:2}),this._zoomOut=new ri({numTouches:2,numTaps:1}),this.reset()};ni.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ni.prototype.touchstart=function(Y,ye,te){this._zoomIn.touchstart(Y,ye,te),this._zoomOut.touchstart(Y,ye,te)},ni.prototype.touchmove=function(Y,ye,te){this._zoomIn.touchmove(Y,ye,te),this._zoomOut.touchmove(Y,ye,te)},ni.prototype.touchend=function(Y,ye,te){var me=this,Ge=this._zoomIn.touchend(Y,ye,te),Le=this._zoomOut.touchend(Y,ye,te);if(Ge)return this._active=!0,Y.preventDefault(),setTimeout(function(){return me.reset()},0),{cameraAnimation:function($e){return $e.easeTo({duration:300,zoom:$e.getZoom()+1,around:$e.unproject(Ge)},{originalEvent:Y})}};if(Le)return this._active=!0,Y.preventDefault(),setTimeout(function(){return me.reset()},0),{cameraAnimation:function($e){return $e.easeTo({duration:300,zoom:$e.getZoom()-1,around:$e.unproject(Le)},{originalEvent:Y})}}},ni.prototype.touchcancel=function(){this.reset()},ni.prototype.enable=function(){this._enabled=!0},ni.prototype.disable=function(){this._enabled=!1,this.reset()},ni.prototype.isEnabled=function(){return this._enabled},ni.prototype.isActive=function(){return this._active};var Ma=0,Na=2,Ka={};Ka[Ma]=1,Ka[Na]=2;function vi(ve,Y){var ye=Ka[Y];return ve.buttons===void 0||(ve.buttons&ye)!==ye}var ui=function(Y){this.reset(),this._clickTolerance=Y.clickTolerance||1};ui.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ui.prototype._correctButton=function(Y,ye){return!1},ui.prototype._move=function(Y,ye){return{}},ui.prototype.mousedown=function(Y,ye){if(!this._lastPoint){var te=r.mouseButton(Y);this._correctButton(Y,te)&&(this._lastPoint=ye,this._eventButton=te)}},ui.prototype.mousemoveWindow=function(Y,ye){var te=this._lastPoint;if(te){if(Y.preventDefault(),vi(Y,this._eventButton)){this.reset();return}if(!(!this._moved&&ye.dist(te)<this._clickTolerance))return this._moved=!0,this._lastPoint=ye,this._move(te,ye)}},ui.prototype.mouseupWindow=function(Y){if(this._lastPoint){var ye=r.mouseButton(Y);ye===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var Pa=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.mousedown=function(te,me){ve.prototype.mousedown.call(this,te,me),this._lastPoint&&(this._active=!0)},Y.prototype._correctButton=function(te,me){return me===Ma&&!te.ctrlKey},Y.prototype._move=function(te,me){return{around:me,panDelta:me.sub(te)}},Y}(ui),sn=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype._correctButton=function(te,me){return me===Ma&&te.ctrlKey||me===Na},Y.prototype._move=function(te,me){var Ge=.8,Le=(me.x-te.x)*Ge;if(Le)return this._active=!0,{bearingDelta:Le}},Y.prototype.contextmenu=function(te){te.preventDefault()},Y}(ui),an=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype._correctButton=function(te,me){return me===Ma&&te.ctrlKey||me===Na},Y.prototype._move=function(te,me){var Ge=-.5,Le=(me.y-te.y)*Ge;if(Le)return this._active=!0,{pitchDelta:Le}},Y.prototype.contextmenu=function(te){te.preventDefault()},Y}(ui),vn=function(Y){this._minTouches=1,this._clickTolerance=Y.clickTolerance||1,this.reset()};vn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},vn.prototype.touchstart=function(Y,ye,te){return this._calculateTransform(Y,ye,te)},vn.prototype.touchmove=function(Y,ye,te){if(!(!this._active||te.length<this._minTouches))return Y.preventDefault(),this._calculateTransform(Y,ye,te)},vn.prototype.touchend=function(Y,ye,te){this._calculateTransform(Y,ye,te),this._active&&te.length<this._minTouches&&this.reset()},vn.prototype.touchcancel=function(){this.reset()},vn.prototype._calculateTransform=function(Y,ye,te){te.length>0&&(this._active=!0);var me=zt(te,ye),Ge=new e.Point(0,0),Le=new e.Point(0,0),$e=0;for(var mt in me){var jt=me[mt],_r=this._touches[mt];_r&&(Ge._add(jt),Le._add(jt.sub(_r)),$e++,me[mt]=jt)}if(this._touches=me,!($e<this._minTouches||!Le.mag())){var Fr=Le.div($e);if(this._sum._add(Fr),!(this._sum.mag()<this._clickTolerance)){var hr=Ge.div($e);return{around:hr,panDelta:Fr}}}},vn.prototype.enable=function(){this._enabled=!0},vn.prototype.disable=function(){this._enabled=!1,this.reset()},vn.prototype.isEnabled=function(){return this._enabled},vn.prototype.isActive=function(){return this._active};var Pn=function(){this.reset()};Pn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Pn.prototype._start=function(Y){},Pn.prototype._move=function(Y,ye,te){return{}},Pn.prototype.touchstart=function(Y,ye,te){this._firstTwoTouches||te.length<2||(this._firstTwoTouches=[te[0].identifier,te[1].identifier],this._start([ye[0],ye[1]]))},Pn.prototype.touchmove=function(Y,ye,te){if(this._firstTwoTouches){Y.preventDefault();var me=this._firstTwoTouches,Ge=me[0],Le=me[1],$e=Zn(te,ye,Ge),mt=Zn(te,ye,Le);if(!(!$e||!mt)){var jt=this._aroundCenter?null:$e.add(mt).div(2);return this._move([$e,mt],jt,Y)}}},Pn.prototype.touchend=function(Y,ye,te){if(this._firstTwoTouches){var me=this._firstTwoTouches,Ge=me[0],Le=me[1],$e=Zn(te,ye,Ge),mt=Zn(te,ye,Le);$e&&mt||(this._active&&r.suppressClick(),this.reset())}},Pn.prototype.touchcancel=function(){this.reset()},Pn.prototype.enable=function(Y){this._enabled=!0,this._aroundCenter=!!Y&&Y.around==="center"},Pn.prototype.disable=function(){this._enabled=!1,this.reset()},Pn.prototype.isEnabled=function(){return this._enabled},Pn.prototype.isActive=function(){return this._active};function Zn(ve,Y,ye){for(var te=0;te<ve.length;te++)if(ve[te].identifier===ye)return Y[te]}var eo=.1;function $o(ve,Y){return Math.log(ve/Y)/Math.LN2}var io=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.reset=function(){ve.prototype.reset.call(this),delete this._distance,delete this._startDistance},Y.prototype._start=function(te){this._startDistance=this._distance=te[0].dist(te[1])},Y.prototype._move=function(te,me){var Ge=this._distance;if(this._distance=te[0].dist(te[1]),!(!this._active&&Math.abs($o(this._distance,this._startDistance))<eo))return this._active=!0,{zoomDelta:$o(this._distance,Ge),pinchAround:me}},Y}(Pn),Zo=25;function ul(ve,Y){return ve.angleWith(Y)*180/Math.PI}var el=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.reset=function(){ve.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},Y.prototype._start=function(te){this._startVector=this._vector=te[0].sub(te[1]),this._minDiameter=te[0].dist(te[1])},Y.prototype._move=function(te,me){var Ge=this._vector;if(this._vector=te[0].sub(te[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:ul(this._vector,Ge),pinchAround:me}},Y.prototype._isBelowThreshold=function(te){this._minDiameter=Math.min(this._minDiameter,te.mag());var me=Math.PI*this._minDiameter,Ge=Zo/me*360,Le=ul(te,this._startVector);return Math.abs(Le)<Ge},Y}(Pn);function _l(ve){return Math.abs(ve.y)>Math.abs(ve.x)}var gn=100,vo=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.reset=function(){ve.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},Y.prototype._start=function(te){this._lastPoints=te,_l(te[0].sub(te[1]))&&(this._valid=!1)},Y.prototype._move=function(te,me,Ge){var Le=te[0].sub(this._lastPoints[0]),$e=te[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Le,$e,Ge.timeStamp),!!this._valid){this._lastPoints=te,this._active=!0;var mt=(Le.y+$e.y)/2,jt=-.5;return{pitchDelta:mt*jt}}},Y.prototype.gestureBeginsVertically=function(te,me,Ge){if(this._valid!==void 0)return this._valid;var Le=2,$e=te.mag()>=Le,mt=me.mag()>=Le;if(!(!$e&&!mt)){if(!$e||!mt)return this._firstMove===void 0&&(this._firstMove=Ge),Ge-this._firstMove<gn?void 0:!1;var jt=te.y>0==me.y>0;return _l(te)&&_l(me)&&jt}},Y}(Pn),cs={panStep:100,bearingStep:15,pitchStep:10},ps=function(){var Y=cs;this._panStep=Y.panStep,this._bearingStep=Y.bearingStep,this._pitchStep=Y.pitchStep,this._rotationDisabled=!1};ps.prototype.reset=function(){this._active=!1},ps.prototype.keydown=function(Y){var ye=this;if(!(Y.altKey||Y.ctrlKey||Y.metaKey)){var te=0,me=0,Ge=0,Le=0,$e=0;switch(Y.keyCode){case 61:case 107:case 171:case 187:te=1;break;case 189:case 109:case 173:te=-1;break;case 37:Y.shiftKey?me=-1:(Y.preventDefault(),Le=-1);break;case 39:Y.shiftKey?me=1:(Y.preventDefault(),Le=1);break;case 38:Y.shiftKey?Ge=1:(Y.preventDefault(),$e=-1);break;case 40:Y.shiftKey?Ge=-1:(Y.preventDefault(),$e=1);break;default:return}return this._rotationDisabled&&(me=0,Ge=0),{cameraAnimation:function(mt){var jt=mt.getZoom();mt.easeTo({duration:300,easeId:"keyboardHandler",easing:Tl,zoom:te?Math.round(jt)+te*(Y.shiftKey?2:1):jt,bearing:mt.getBearing()+me*ye._bearingStep,pitch:mt.getPitch()+Ge*ye._pitchStep,offset:[-Le*ye._panStep,-$e*ye._panStep],center:mt.getCenter()},{originalEvent:Y})}}}},ps.prototype.enable=function(){this._enabled=!0},ps.prototype.disable=function(){this._enabled=!1,this.reset()},ps.prototype.isEnabled=function(){return this._enabled},ps.prototype.isActive=function(){return this._active},ps.prototype.disableRotation=function(){this._rotationDisabled=!0},ps.prototype.enableRotation=function(){this._rotationDisabled=!1};function Tl(ve){return ve*(2-ve)}var Gl=4.000244140625,Tu=1/100,Il=1/450,yc=2,nt=function(Y,ye){this._map=Y,this._el=Y.getCanvasContainer(),this._handler=ye,this._delta=0,this._defaultZoomRate=Tu,this._wheelZoomRate=Il,e.bindAll(["_onTimeout"],this)};nt.prototype.setZoomRate=function(Y){this._defaultZoomRate=Y},nt.prototype.setWheelZoomRate=function(Y){this._wheelZoomRate=Y},nt.prototype.isEnabled=function(){return!!this._enabled},nt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},nt.prototype.isZooming=function(){return!!this._zooming},nt.prototype.enable=function(Y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=Y&&Y.around==="center")},nt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},nt.prototype.wheel=function(Y){if(this.isEnabled()){var ye=Y.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?Y.deltaY*40:Y.deltaY,te=e.browser.now(),me=te-(this._lastWheelEventTime||0);this._lastWheelEventTime=te,ye!==0&&ye%Gl===0?this._type="wheel":ye!==0&&Math.abs(ye)<4?this._type="trackpad":me>400?(this._type=null,this._lastValue=ye,this._timeout=setTimeout(this._onTimeout,40,Y)):this._type||(this._type=Math.abs(me*ye)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ye+=this._lastValue)),Y.shiftKey&&ye&&(ye=ye/4),this._type&&(this._lastWheelEvent=Y,this._delta-=ye,this._active||this._start(Y)),Y.preventDefault()}},nt.prototype._onTimeout=function(Y){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Y)},nt.prototype._start=function(Y){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 ye=r.mousePos(this._el,Y);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ye)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},nt.prototype.renderFrame=function(){var Y=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ye=this._map.transform;if(this._delta!==0){var te=this._type==="wheel"&&Math.abs(this._delta)>Gl?this._wheelZoomRate:this._defaultZoomRate,me=yc/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&me!==0&&(me=1/me);var Ge=typeof this._targetZoom=="number"?ye.zoomScale(this._targetZoom):ye.scale;this._targetZoom=Math.min(ye.maxZoom,Math.max(ye.minZoom,ye.scaleZoom(Ge*me))),this._type==="wheel"&&(this._startZoom=ye.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Le=typeof this._targetZoom=="number"?this._targetZoom:ye.zoom,$e=this._startZoom,mt=this._easing,jt=!1,_r;if(this._type==="wheel"&&$e&&mt){var Fr=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),hr=mt(Fr);_r=e.number($e,Le,hr),Fr<1?this._frameId||(this._frameId=!0):jt=!0}else _r=Le,jt=!0;return this._active=!0,jt&&(this._active=!1,this._finishTimeout=setTimeout(function(){Y._zooming=!1,Y._handler._triggerRenderFrame(),delete Y._targetZoom,delete Y._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!jt,zoomDelta:_r-ye.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},nt.prototype._smoothOutEasing=function(Y){var ye=e.ease;if(this._prevEase){var te=this._prevEase,me=(e.browser.now()-te.start)/te.duration,Ge=te.easing(me+.01)-te.easing(me),Le=.27/Math.sqrt(Ge*Ge+1e-4)*.01,$e=Math.sqrt(.27*.27-Le*Le);ye=e.bezier(Le,$e,.25,1)}return this._prevEase={start:e.browser.now(),duration:Y,easing:ye},ye},nt.prototype.reset=function(){this._active=!1};var Yt=function(Y,ye){this._clickZoom=Y,this._tapZoom=ye};Yt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Yt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Yt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Yt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var cr=function(){this.reset()};cr.prototype.reset=function(){this._active=!1},cr.prototype.dblclick=function(Y,ye){return Y.preventDefault(),{cameraAnimation:function(te){te.easeTo({duration:300,zoom:te.getZoom()+(Y.shiftKey?-1:1),around:te.unproject(ye)},{originalEvent:Y})}}},cr.prototype.enable=function(){this._enabled=!0},cr.prototype.disable=function(){this._enabled=!1,this.reset()},cr.prototype.isEnabled=function(){return this._enabled},cr.prototype.isActive=function(){return this._active};var ua=function(){this._tap=new ri({numTouches:1,numTaps:1}),this.reset()};ua.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ua.prototype.touchstart=function(Y,ye,te){this._swipePoint||(this._tapTime&&Y.timeStamp-this._tapTime>Vr&&this.reset(),this._tapTime?te.length>0&&(this._swipePoint=ye[0],this._swipeTouch=te[0].identifier):this._tap.touchstart(Y,ye,te))},ua.prototype.touchmove=function(Y,ye,te){if(!this._tapTime)this._tap.touchmove(Y,ye,te);else if(this._swipePoint){if(te[0].identifier!==this._swipeTouch)return;var me=ye[0],Ge=me.y-this._swipePoint.y;return this._swipePoint=me,Y.preventDefault(),this._active=!0,{zoomDelta:Ge/128}}},ua.prototype.touchend=function(Y,ye,te){if(this._tapTime)this._swipePoint&&te.length===0&&this.reset();else{var me=this._tap.touchend(Y,ye,te);me&&(this._tapTime=Y.timeStamp)}},ua.prototype.touchcancel=function(){this.reset()},ua.prototype.enable=function(){this._enabled=!0},ua.prototype.disable=function(){this._enabled=!1,this.reset()},ua.prototype.isEnabled=function(){return this._enabled},ua.prototype.isActive=function(){return this._active};var Aa=function(Y,ye,te){this._el=Y,this._mousePan=ye,this._touchPan=te};Aa.prototype.enable=function(Y){this._inertiaOptions=Y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Aa.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Aa.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Aa.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var xa=function(Y,ye,te){this._pitchWithRotate=Y.pitchWithRotate,this._mouseRotate=ye,this._mousePitch=te};xa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},xa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},xa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},xa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var wa=function(Y,ye,te,me){this._el=Y,this._touchZoom=ye,this._touchRotate=te,this._tapDragZoom=me,this._rotationDisabled=!1,this._enabled=!0};wa.prototype.enable=function(Y){this._touchZoom.enable(Y),this._rotationDisabled||this._touchRotate.enable(Y),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},wa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},wa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},wa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},wa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},wa.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ja=function(ve){return ve.zoom||ve.drag||ve.pitch||ve.rotate},Ai=function(ve){function Y(){ve.apply(this,arguments)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y}(e.Event);function bi(ve){return ve.panDelta&&ve.panDelta.mag()||ve.zoomDelta||ve.bearingDelta||ve.pitchDelta}var fi=function(Y,ye){this._map=Y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ql(Y),this._bearingSnap=ye.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ye),e.bindAll(["handleEvent","handleWindowEvent"],this);var te=this._el;this._listeners=[[te,"touchstart",{passive:!0}],[te,"touchmove",{passive:!1}],[te,"touchend",void 0],[te,"touchcancel",void 0],[te,"mousedown",void 0],[te,"mousemove",void 0],[te,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[te,"mouseover",void 0],[te,"mouseout",void 0],[te,"dblclick",void 0],[te,"click",void 0],[te,"keydown",{capture:!1}],[te,"keyup",void 0],[te,"wheel",{passive:!1}],[te,"contextmenu",void 0],[e.window,"blur",void 0]];for(var me=0,Ge=this._listeners;me<Ge.length;me+=1){var Le=Ge[me],$e=Le[0],mt=Le[1],jt=Le[2];r.addEventListener($e,mt,$e===e.window.document?this.handleWindowEvent:this.handleEvent,jt)}};fi.prototype.destroy=function(){for(var Y=0,ye=this._listeners;Y<ye.length;Y+=1){var te=ye[Y],me=te[0],Ge=te[1],Le=te[2];r.removeEventListener(me,Ge,me===e.window.document?this.handleWindowEvent:this.handleEvent,Le)}},fi.prototype._addDefaultHandlers=function(Y){var ye=this._map,te=ye.getCanvasContainer();this._add("mapEvent",new _t(ye,Y));var me=ye.boxZoom=new ar(ye,Y);this._add("boxZoom",me);var Ge=new ni,Le=new cr;ye.doubleClickZoom=new Yt(Le,Ge),this._add("tapZoom",Ge),this._add("clickZoom",Le);var $e=new ua;this._add("tapDragZoom",$e);var mt=ye.touchPitch=new vo;this._add("touchPitch",mt);var jt=new sn(Y),_r=new an(Y);ye.dragRotate=new xa(Y,jt,_r),this._add("mouseRotate",jt,["mousePitch"]),this._add("mousePitch",_r,["mouseRotate"]);var Fr=new Pa(Y),hr=new vn(Y);ye.dragPan=new Aa(te,Fr,hr),this._add("mousePan",Fr),this._add("touchPan",hr,["touchZoom","touchRotate"]);var gt=new el,Et=new io;ye.touchZoomRotate=new wa(te,Et,gt,$e),this._add("touchRotate",gt,["touchPan","touchZoom"]),this._add("touchZoom",Et,["touchPan","touchRotate"]);var Ft=ye.scrollZoom=new nt(ye,this);this._add("scrollZoom",Ft,["mousePan"]);var ir=ye.keyboard=new ps;this._add("keyboard",ir),this._add("blockableMapEvent",new St(ye));for(var fr=0,sr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];fr<sr.length;fr+=1){var pr=sr[fr];Y.interactive&&Y[pr]&&ye[pr].enable(Y[pr])}},fi.prototype._add=function(Y,ye,te){this._handlers.push({handlerName:Y,handler:ye,allowed:te}),this._handlersById[Y]=ye},fi.prototype.stop=function(Y){if(!this._updatingCamera){for(var ye=0,te=this._handlers;ye<te.length;ye+=1){var me=te[ye],Ge=me.handler;Ge.reset()}this._inertia.clear(),this._fireEvents({},{},Y),this._changes=[]}},fi.prototype.isActive=function(){for(var Y=0,ye=this._handlers;Y<ye.length;Y+=1){var te=ye[Y],me=te.handler;if(me.isActive())return!0}return!1},fi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},fi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},fi.prototype.isMoving=function(){return!!Ja(this._eventsInProgress)||this.isZooming()},fi.prototype._blockedByActive=function(Y,ye,te){for(var me in Y)if(me!==te&&(!ye||ye.indexOf(me)<0))return!0;return!1},fi.prototype.handleWindowEvent=function(Y){this.handleEvent(Y,Y.type+"Window")},fi.prototype._getMapTouches=function(Y){for(var ye=[],te=0,me=Y;te<me.length;te+=1){var Ge=me[te],Le=Ge.target;this._el.contains(Le)&&ye.push(Ge)}return ye},fi.prototype.handleEvent=function(Y,ye){if(Y.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var te=Y.type==="renderFrame"?void 0:Y,me={needsRenderFrame:!1},Ge={},Le={},$e=Y.touches?this._getMapTouches(Y.touches):void 0,mt=$e?r.touchPos(this._el,$e):r.mousePos(this._el,Y),jt=0,_r=this._handlers;jt<_r.length;jt+=1){var Fr=_r[jt],hr=Fr.handlerName,gt=Fr.handler,Et=Fr.allowed;if(gt.isEnabled()){var Ft=void 0;this._blockedByActive(Le,Et,hr)?gt.reset():gt[ye||Y.type]&&(Ft=gt[ye||Y.type](Y,mt,$e),this.mergeHandlerResult(me,Ge,Ft,hr,te),Ft&&Ft.needsRenderFrame&&this._triggerRenderFrame()),(Ft||gt.isActive())&&(Le[hr]=gt)}}var ir={};for(var fr in this._previousActiveHandlers)Le[fr]||(ir[fr]=te);this._previousActiveHandlers=Le,(Object.keys(ir).length||bi(me))&&(this._changes.push([me,Ge,ir]),this._triggerRenderFrame()),(Object.keys(Le).length||bi(me))&&this._map._stop(!0),this._updatingCamera=!1;var sr=me.cameraAnimation;sr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],sr(this._map))},fi.prototype.mergeHandlerResult=function(Y,ye,te,me,Ge){if(te){e.extend(Y,te);var Le={handlerName:me,originalEvent:te.originalEvent||Ge};te.zoomDelta!==void 0&&(ye.zoom=Le),te.panDelta!==void 0&&(ye.drag=Le),te.pitchDelta!==void 0&&(ye.pitch=Le),te.bearingDelta!==void 0&&(ye.rotate=Le)}},fi.prototype._applyChanges=function(){for(var Y={},ye={},te={},me=0,Ge=this._changes;me<Ge.length;me+=1){var Le=Ge[me],$e=Le[0],mt=Le[1],jt=Le[2];$e.panDelta&&(Y.panDelta=(Y.panDelta||new e.Point(0,0))._add($e.panDelta)),$e.zoomDelta&&(Y.zoomDelta=(Y.zoomDelta||0)+$e.zoomDelta),$e.bearingDelta&&(Y.bearingDelta=(Y.bearingDelta||0)+$e.bearingDelta),$e.pitchDelta&&(Y.pitchDelta=(Y.pitchDelta||0)+$e.pitchDelta),$e.around!==void 0&&(Y.around=$e.around),$e.pinchAround!==void 0&&(Y.pinchAround=$e.pinchAround),$e.noInertia&&(Y.noInertia=$e.noInertia),e.extend(ye,mt),e.extend(te,jt)}this._updateMapTransform(Y,ye,te),this._changes=[]},fi.prototype._updateMapTransform=function(Y,ye,te){var me=this._map,Ge=me.transform;if(!bi(Y))return this._fireEvents(ye,te,!0);var Le=Y.panDelta,$e=Y.zoomDelta,mt=Y.bearingDelta,jt=Y.pitchDelta,_r=Y.around,Fr=Y.pinchAround;Fr!==void 0&&(_r=Fr),me._stop(!0),_r=_r||me.transform.centerPoint;var hr=Ge.pointLocation(Le?_r.sub(Le):_r);mt&&(Ge.bearing+=mt),jt&&(Ge.pitch+=jt),$e&&(Ge.zoom+=$e),Ge.setLocationAtPoint(hr,_r),this._map._update(),Y.noInertia||this._inertia.record(Y),this._fireEvents(ye,te,!0)},fi.prototype._fireEvents=function(Y,ye,te){var me=this,Ge=Ja(this._eventsInProgress),Le=Ja(Y),$e={};for(var mt in Y){var jt=Y[mt],_r=jt.originalEvent;this._eventsInProgress[mt]||($e[mt+"start"]=_r),this._eventsInProgress[mt]=Y[mt]}!Ge&&Le&&this._fireEvent("movestart",Le.originalEvent);for(var Fr in $e)this._fireEvent(Fr,$e[Fr]);Le&&this._fireEvent("move",Le.originalEvent);for(var hr in Y){var gt=Y[hr],Et=gt.originalEvent;this._fireEvent(hr,Et)}var Ft={},ir;for(var fr in this._eventsInProgress){var sr=this._eventsInProgress[fr],pr=sr.handlerName,lr=sr.originalEvent;this._handlersById[pr].isActive()||(delete this._eventsInProgress[fr],ir=ye[pr]||lr,Ft[fr+"end"]=ir)}for(var Xt in Ft)this._fireEvent(Xt,Ft[Xt]);var or=Ja(this._eventsInProgress);if(te&&(Ge||Le)&&!or){this._updatingCamera=!0;var qt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Dr=function(Jr){return Jr!==0&&-me._bearingSnap<Jr&&Jr<me._bearingSnap};qt?(Dr(qt.bearing||this._map.getBearing())&&(qt.bearing=0),this._map.easeTo(qt,{originalEvent:ir})):(this._map.fire(new e.Event("moveend",{originalEvent:ir})),Dr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},fi.prototype._fireEvent=function(Y,ye){this._map.fire(new e.Event(Y,ye?{originalEvent:ye}:{}))},fi.prototype._requestFrame=function(){var Y=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(ye){delete Y._frameId,Y.handleEvent(new Ai("renderFrame",{timeStamp:ye})),Y._applyChanges()})},fi.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var yn=function(ve){function Y(ye,te){ve.call(this),this._moving=!1,this._zooming=!1,this.transform=ye,this._bearingSnap=te.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},Y.prototype.setCenter=function(te,me){return this.jumpTo({center:te},me)},Y.prototype.panBy=function(te,me,Ge){return te=e.Point.convert(te).mult(-1),this.panTo(this.transform.center,e.extend({offset:te},me),Ge)},Y.prototype.panTo=function(te,me,Ge){return this.easeTo(e.extend({center:te},me),Ge)},Y.prototype.getZoom=function(){return this.transform.zoom},Y.prototype.setZoom=function(te,me){return this.jumpTo({zoom:te},me),this},Y.prototype.zoomTo=function(te,me,Ge){return this.easeTo(e.extend({zoom:te},me),Ge)},Y.prototype.zoomIn=function(te,me){return this.zoomTo(this.getZoom()+1,te,me),this},Y.prototype.zoomOut=function(te,me){return this.zoomTo(this.getZoom()-1,te,me),this},Y.prototype.getBearing=function(){return this.transform.bearing},Y.prototype.setBearing=function(te,me){return this.jumpTo({bearing:te},me),this},Y.prototype.getPadding=function(){return this.transform.padding},Y.prototype.setPadding=function(te,me){return this.jumpTo({padding:te},me),this},Y.prototype.rotateTo=function(te,me,Ge){return this.easeTo(e.extend({bearing:te},me),Ge)},Y.prototype.resetNorth=function(te,me){return this.rotateTo(0,e.extend({duration:1e3},te),me),this},Y.prototype.resetNorthPitch=function(te,me){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},te),me),this},Y.prototype.snapToNorth=function(te,me){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(te,me):this},Y.prototype.getPitch=function(){return this.transform.pitch},Y.prototype.setPitch=function(te,me){return this.jumpTo({pitch:te},me),this},Y.prototype.cameraForBounds=function(te,me){te=e.LngLatBounds.convert(te);var Ge=me&&me.bearing||0;return this._cameraForBoxAndBearing(te.getNorthWest(),te.getSouthEast(),Ge,me)},Y.prototype._cameraForBoxAndBearing=function(te,me,Ge,Le){var $e={top:0,bottom:0,right:0,left:0};if(Le=e.extend({padding:$e,offset:[0,0],maxZoom:this.transform.maxZoom},Le),typeof Le.padding=="number"){var mt=Le.padding;Le.padding={top:mt,bottom:mt,right:mt,left:mt}}Le.padding=e.extend($e,Le.padding);var jt=this.transform,_r=jt.padding,Fr=jt.project(e.LngLat.convert(te)),hr=jt.project(e.LngLat.convert(me)),gt=Fr.rotate(-Ge*Math.PI/180),Et=hr.rotate(-Ge*Math.PI/180),Ft=new e.Point(Math.max(gt.x,Et.x),Math.max(gt.y,Et.y)),ir=new e.Point(Math.min(gt.x,Et.x),Math.min(gt.y,Et.y)),fr=Ft.sub(ir),sr=(jt.width-(_r.left+_r.right+Le.padding.left+Le.padding.right))/fr.x,pr=(jt.height-(_r.top+_r.bottom+Le.padding.top+Le.padding.bottom))/fr.y;if(pr<0||sr<0){e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var lr=Math.min(jt.scaleZoom(jt.scale*Math.min(sr,pr)),Le.maxZoom),Xt=typeof Le.offset.x=="number"?new e.Point(Le.offset.x,Le.offset.y):e.Point.convert(Le.offset),or=(Le.padding.left-Le.padding.right)/2,qt=(Le.padding.top-Le.padding.bottom)/2,Dr=new e.Point(or,qt),Jr=Dr.rotate(Ge*Math.PI/180),ba=Xt.add(Jr),yi=ba.mult(jt.scale/jt.zoomScale(lr)),Xa=jt.unproject(Fr.add(hr).div(2).sub(yi));return{center:Xa,zoom:lr,bearing:Ge}},Y.prototype.fitBounds=function(te,me,Ge){return this._fitInternal(this.cameraForBounds(te,me),me,Ge)},Y.prototype.fitScreenCoordinates=function(te,me,Ge,Le,$e){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(te)),this.transform.pointLocation(e.Point.convert(me)),Ge,Le),Le,$e)},Y.prototype._fitInternal=function(te,me,Ge){return te?(me=e.extend(te,me),delete me.padding,me.linear?this.easeTo(me,Ge):this.flyTo(me,Ge)):this},Y.prototype.jumpTo=function(te,me){this.stop();var Ge=this.transform,Le=!1,$e=!1,mt=!1;return"zoom"in te&&Ge.zoom!==+te.zoom&&(Le=!0,Ge.zoom=+te.zoom),te.center!==void 0&&(Ge.center=e.LngLat.convert(te.center)),"bearing"in te&&Ge.bearing!==+te.bearing&&($e=!0,Ge.bearing=+te.bearing),"pitch"in te&&Ge.pitch!==+te.pitch&&(mt=!0,Ge.pitch=+te.pitch),te.padding!=null&&!Ge.isPaddingEqual(te.padding)&&(Ge.padding=te.padding),this.fire(new e.Event("movestart",me)).fire(new e.Event("move",me)),Le&&this.fire(new e.Event("zoomstart",me)).fire(new e.Event("zoom",me)).fire(new e.Event("zoomend",me)),$e&&this.fire(new e.Event("rotatestart",me)).fire(new e.Event("rotate",me)).fire(new e.Event("rotateend",me)),mt&&this.fire(new e.Event("pitchstart",me)).fire(new e.Event("pitch",me)).fire(new e.Event("pitchend",me)),this.fire(new e.Event("moveend",me))},Y.prototype.easeTo=function(te,me){var Ge=this;this._stop(!1,te.easeId),te=e.extend({offset:[0,0],duration:500,easing:e.ease},te),(te.animate===!1||!te.essential&&e.browser.prefersReducedMotion)&&(te.duration=0);var Le=this.transform,$e=this.getZoom(),mt=this.getBearing(),jt=this.getPitch(),_r=this.getPadding(),Fr="zoom"in te?+te.zoom:$e,hr="bearing"in te?this._normalizeBearing(te.bearing,mt):mt,gt="pitch"in te?+te.pitch:jt,Et="padding"in te?te.padding:Le.padding,Ft=e.Point.convert(te.offset),ir=Le.centerPoint.add(Ft),fr=Le.pointLocation(ir),sr=e.LngLat.convert(te.center||fr);this._normalizeCenter(sr);var pr=Le.project(fr),lr=Le.project(sr).sub(pr),Xt=Le.zoomScale(Fr-$e),or,qt;te.around&&(or=e.LngLat.convert(te.around),qt=Le.locationPoint(or));var Dr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Fr!==$e,this._rotating=this._rotating||mt!==hr,this._pitching=this._pitching||gt!==jt,this._padding=!Le.isPaddingEqual(Et),this._easeId=te.easeId,this._prepareEase(me,te.noMoveStart,Dr),this._ease(function(Jr){if(Ge._zooming&&(Le.zoom=e.number($e,Fr,Jr)),Ge._rotating&&(Le.bearing=e.number(mt,hr,Jr)),Ge._pitching&&(Le.pitch=e.number(jt,gt,Jr)),Ge._padding&&(Le.interpolatePadding(_r,Et,Jr),ir=Le.centerPoint.add(Ft)),or)Le.setLocationAtPoint(or,qt);else{var ba=Le.zoomScale(Le.zoom-$e),yi=Fr>$e?Math.min(2,Xt):Math.max(.5,Xt),Xa=Math.pow(yi,1-Jr),si=Le.unproject(pr.add(lr.mult(Jr*Xa)).mult(ba));Le.setLocationAtPoint(Le.renderWorldCopies?si.wrap():si,ir)}Ge._fireMoveEvents(me)},function(Jr){Ge._afterEase(me,Jr)},te),this},Y.prototype._prepareEase=function(te,me,Ge){Ge===void 0&&(Ge={}),this._moving=!0,!me&&!Ge.moving&&this.fire(new e.Event("movestart",te)),this._zooming&&!Ge.zooming&&this.fire(new e.Event("zoomstart",te)),this._rotating&&!Ge.rotating&&this.fire(new e.Event("rotatestart",te)),this._pitching&&!Ge.pitching&&this.fire(new e.Event("pitchstart",te))},Y.prototype._fireMoveEvents=function(te){this.fire(new e.Event("move",te)),this._zooming&&this.fire(new e.Event("zoom",te)),this._rotating&&this.fire(new e.Event("rotate",te)),this._pitching&&this.fire(new e.Event("pitch",te))},Y.prototype._afterEase=function(te,me){if(!(this._easeId&&me&&this._easeId===me)){delete this._easeId;var Ge=this._zooming,Le=this._rotating,$e=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ge&&this.fire(new e.Event("zoomend",te)),Le&&this.fire(new e.Event("rotateend",te)),$e&&this.fire(new e.Event("pitchend",te)),this.fire(new e.Event("moveend",te))}},Y.prototype.flyTo=function(te,me){var Ge=this;if(!te.essential&&e.browser.prefersReducedMotion){var Le=e.pick(te,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Le,me)}this.stop(),te=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},te);var $e=this.transform,mt=this.getZoom(),jt=this.getBearing(),_r=this.getPitch(),Fr=this.getPadding(),hr="zoom"in te?e.clamp(+te.zoom,$e.minZoom,$e.maxZoom):mt,gt="bearing"in te?this._normalizeBearing(te.bearing,jt):jt,Et="pitch"in te?+te.pitch:_r,Ft="padding"in te?te.padding:$e.padding,ir=$e.zoomScale(hr-mt),fr=e.Point.convert(te.offset),sr=$e.centerPoint.add(fr),pr=$e.pointLocation(sr),lr=e.LngLat.convert(te.center||pr);this._normalizeCenter(lr);var Xt=$e.project(pr),or=$e.project(lr).sub(Xt),qt=te.curve,Dr=Math.max($e.width,$e.height),Jr=Dr/ir,ba=or.mag();if("minZoom"in te){var yi=e.clamp(Math.min(te.minZoom,mt,hr),$e.minZoom,$e.maxZoom),Xa=Dr/$e.zoomScale(yi-mt);qt=Math.sqrt(Xa/ba*2)}var si=qt*qt;function Ji(Fo){var bs=(Jr*Jr-Dr*Dr+(Fo?-1:1)*si*si*ba*ba)/(2*(Fo?Jr:Dr)*si*ba);return Math.log(Math.sqrt(bs*bs+1)-bs)}function Bi(Fo){return(Math.exp(Fo)-Math.exp(-Fo))/2}function pi(Fo){return(Math.exp(Fo)+Math.exp(-Fo))/2}function wi(Fo){return Bi(Fo)/pi(Fo)}var Mi=Ji(0),Vi=function(Fo){return pi(Mi)/pi(Mi+qt*Fo)},cn=function(Fo){return Dr*((pi(Mi)*wi(Mi+qt*Fo)-Bi(Mi))/si)/ba},xo=(Ji(1)-Mi)/qt;if(Math.abs(ba)<1e-6||!isFinite(xo)){if(Math.abs(Dr-Jr)<1e-6)return this.easeTo(te,me);var jo=Jr<Dr?-1:1;xo=Math.abs(Math.log(Jr/Dr))/qt,cn=function(){return 0},Vi=function(Fo){return Math.exp(jo*qt*Fo)}}if("duration"in te)te.duration=+te.duration;else{var ks="screenSpeed"in te?+te.screenSpeed/qt:+te.speed;te.duration=1e3*xo/ks}return te.maxDuration&&te.duration>te.maxDuration&&(te.duration=0),this._zooming=!0,this._rotating=jt!==gt,this._pitching=Et!==_r,this._padding=!$e.isPaddingEqual(Ft),this._prepareEase(me,!1),this._ease(function(Fo){var bs=Fo*xo,Hs=1/Vi(bs);$e.zoom=Fo===1?hr:mt+$e.scaleZoom(Hs),Ge._rotating&&($e.bearing=e.number(jt,gt,Fo)),Ge._pitching&&($e.pitch=e.number(_r,Et,Fo)),Ge._padding&&($e.interpolatePadding(Fr,Ft,Fo),sr=$e.centerPoint.add(fr));var pu=Fo===1?lr:$e.unproject(Xt.add(or.mult(cn(bs))).mult(Hs));$e.setLocationAtPoint($e.renderWorldCopies?pu.wrap():pu,sr),Ge._fireMoveEvents(me)},function(){return Ge._afterEase(me)},te),this},Y.prototype.isEasing=function(){return!!this._easeFrameId},Y.prototype.stop=function(){return this._stop()},Y.prototype._stop=function(te,me){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ge=this._onEaseEnd;delete this._onEaseEnd,Ge.call(this,me)}if(!te){var Le=this.handlers;Le&&Le.stop(!1)}return this},Y.prototype._ease=function(te,me,Ge){Ge.animate===!1||Ge.duration===0?(te(1),me()):(this._easeStart=e.browser.now(),this._easeOptions=Ge,this._onEaseFrame=te,this._onEaseEnd=me,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},Y.prototype._renderFrameCallback=function(){var te=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(te)),te<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},Y.prototype._normalizeBearing=function(te,me){te=e.wrap(te,-180,180);var Ge=Math.abs(te-me);return Math.abs(te-360-me)<Ge&&(te-=360),Math.abs(te+360-me)<Ge&&(te+=360),te},Y.prototype._normalizeCenter=function(te){var me=this.transform;if(!(!me.renderWorldCopies||me.lngRange)){var Ge=te.lng-me.center.lng;te.lng+=Ge>180?-360:Ge<-180?360:0}},Y}(e.Evented),Oi=function(Y){Y===void 0&&(Y={}),this.options=Y,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Oi.prototype.getDefaultPosition=function(){return"bottom-right"},Oi.prototype.onAdd=function(Y){var ye=this.options&&this.options.compact;return this._map=Y,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ye&&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),ye===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Oi.prototype.onRemove=function(){r.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},Oi.prototype._setElementTitle=function(Y,ye){var te=this._map._getUIString("AttributionControl."+ye);Y.title=te,Y.setAttribute("aria-label",te)},Oi.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"))},Oi.prototype._updateEditLink=function(){var Y=this._editLink;Y||(Y=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ye=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(Y){var te=ye.reduce(function(me,Ge,Le){return Ge.value&&(me+=Ge.key+"="+Ge.value+(Le<ye.length-1?"&":"")),me},"?");Y.href=e.config.FEEDBACK_URL+"/"+te+(this._map._hash?this._map._hash.getHashString(!0):""),Y.rel="noopener nofollow",this._setElementTitle(Y,"MapFeedback")}},Oi.prototype._updateData=function(Y){Y&&(Y.sourceDataType==="metadata"||Y.sourceDataType==="visibility"||Y.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Oi.prototype._updateAttributions=function(){if(this._map.style){var Y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?Y=Y.concat(this.options.customAttribution.map(function(mt){return typeof mt!="string"?"":mt})):typeof this.options.customAttribution=="string"&&Y.push(this.options.customAttribution)),this._map.style.stylesheet){var ye=this._map.style.stylesheet;this.styleOwner=ye.owner,this.styleId=ye.id}var te=this._map.style.sourceCaches;for(var me in te){var Ge=te[me];if(Ge.used){var Le=Ge.getSource();Le.attribution&&Y.indexOf(Le.attribution)<0&&Y.push(Le.attribution)}}Y.sort(function(mt,jt){return mt.length-jt.length}),Y=Y.filter(function(mt,jt){for(var _r=jt+1;_r<Y.length;_r++)if(Y[_r].indexOf(mt)>=0)return!1;return!0});var $e=Y.join(" | ");$e!==this._attribHTML&&(this._attribHTML=$e,Y.length?(this._innerContainer.innerHTML=$e,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Oi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ki=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};ki.prototype.onAdd=function(Y){this._map=Y,this._container=r.create("div","mapboxgl-ctrl");var ye=r.create("a","mapboxgl-ctrl-logo");return ye.target="_blank",ye.rel="noopener nofollow",ye.href="https://www.mapbox.com/",ye.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ye.setAttribute("rel","noopener nofollow"),this._container.appendChild(ye),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ki.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ki.prototype.getDefaultPosition=function(){return"bottom-left"},ki.prototype._updateLogo=function(Y){(!Y||Y.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ki.prototype._logoRequired=function(){if(this._map.style){var Y=this._map.style.sourceCaches;for(var ye in Y){var te=Y[ye].getSource();if(te.mapbox_logo)return!0}return!1}},ki.prototype._updateCompact=function(){var Y=this._container.children;if(Y.length){var ye=Y[0];this._map.getCanvasContainer().offsetWidth<250?ye.classList.add("mapboxgl-compact"):ye.classList.remove("mapboxgl-compact")}};var qa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};qa.prototype.add=function(Y){var ye=++this._id,te=this._queue;return te.push({callback:Y,id:ye,cancelled:!1}),ye},qa.prototype.remove=function(Y){for(var ye=this._currentlyRunning,te=ye?this._queue.concat(ye):this._queue,me=0,Ge=te;me<Ge.length;me+=1){var Le=Ge[me];if(Le.id===Y){Le.cancelled=!0;return}}},qa.prototype.run=function(Y){Y===void 0&&(Y=0);var ye=this._currentlyRunning=this._queue;this._queue=[];for(var te=0,me=ye;te<me.length;te+=1){var Ge=me[te];if(!Ge.cancelled&&(Ge.callback(Y),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},qa.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ea={"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"},Ea=e.window.HTMLImageElement,ii=e.window.HTMLElement,gi=e.window.ImageBitmap,Wa=-2,ji=22,Ii=0,hn=60,Za={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:Wa,maxZoom:ji,minPitch:Ii,maxPitch:hn,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},Va=function(ve){function Y(te){var me=this;if(te=e.extend({},Za,te),te.minZoom!=null&&te.maxZoom!=null&&te.minZoom>te.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(te.minPitch!=null&&te.maxPitch!=null&&te.minPitch>te.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(te.minPitch!=null&&te.minPitch<Ii)throw new Error("minPitch must be greater than or equal to "+Ii);if(te.maxPitch!=null&&te.maxPitch>hn)throw new Error("maxPitch must be less than or equal to "+hn);var Ge=new es(te.minZoom,te.maxZoom,te.minPitch,te.maxPitch,te.renderWorldCopies);if(ve.call(this,Ge,te),this._interactive=te.interactive,this._maxTileCacheSize=te.maxTileCacheSize,this._failIfMajorPerformanceCaveat=te.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=te.preserveDrawingBuffer,this._antialias=te.antialias,this._trackResize=te.trackResize,this._bearingSnap=te.bearingSnap,this._refreshExpiredTiles=te.refreshExpiredTiles,this._fadeDuration=te.fadeDuration,this._crossSourceCollisions=te.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=te.collectResourceTiming,this._renderTaskQueue=new qa,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ea,te.locale),this._clickTolerance=te.clickTolerance,this._requestManager=new e.RequestManager(te.transformRequest,te.accessToken),typeof te.container=="string"){if(this._container=e.window.document.getElementById(te.container),!this._container)throw new Error("Container '"+te.container+"' not found.")}else if(te.container instanceof ii)this._container=te.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(te.maxBounds&&this.setMaxBounds(te.maxBounds),e.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 me._update(!1)}),this.on("moveend",function(){return me._update(!1)}),this.on("zoom",function(){return me._update(!0)}),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new fi(this,te);var Le=typeof te.hash=="string"&&te.hash||void 0;this._hash=te.hash&&new $l(Le).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:te.center,zoom:te.zoom,bearing:te.bearing,pitch:te.pitch}),te.bounds&&(this.resize(),this.fitBounds(te.bounds,e.extend({},te.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=te.localIdeographFontFamily,te.style&&this.setStyle(te.style,{localIdeographFontFamily:te.localIdeographFontFamily}),te.attributionControl&&this.addControl(new Oi({customAttribution:te.customAttribution})),this.addControl(new ki,te.logoPosition),this.on("style.load",function(){me.transform.unmodified&&me.jumpTo(me.style.stylesheet)}),this.on("data",function($e){me._update($e.dataType==="style"),me.fire(new e.Event($e.dataType+"data",$e))}),this.on("dataloading",function($e){me.fire(new e.Event($e.dataType+"dataloading",$e))})}ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y;var ye={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return Y.prototype._getMapId=function(){return this._mapId},Y.prototype.addControl=function(me,Ge){if(Ge===void 0&&(me.getDefaultPosition?Ge=me.getDefaultPosition():Ge="top-right"),!me||!me.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Le=me.onAdd(this);this._controls.push(me);var $e=this._controlPositions[Ge];return Ge.indexOf("bottom")!==-1?$e.insertBefore(Le,$e.firstChild):$e.appendChild(Le),this},Y.prototype.removeControl=function(me){if(!me||!me.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Ge=this._controls.indexOf(me);return Ge>-1&&this._controls.splice(Ge,1),me.onRemove(this),this},Y.prototype.hasControl=function(me){return this._controls.indexOf(me)>-1},Y.prototype.resize=function(me){var Ge=this._containerDimensions(),Le=Ge[0],$e=Ge[1];this._resizeCanvas(Le,$e),this.transform.resize(Le,$e),this.painter.resize(Le,$e);var mt=!this._moving;return mt&&(this.stop(),this.fire(new e.Event("movestart",me)).fire(new e.Event("move",me))),this.fire(new e.Event("resize",me)),mt&&this.fire(new e.Event("moveend",me)),this},Y.prototype.getBounds=function(){return this.transform.getBounds()},Y.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},Y.prototype.setMaxBounds=function(me){return this.transform.setMaxBounds(e.LngLatBounds.convert(me)),this._update()},Y.prototype.setMinZoom=function(me){if(me=me??Wa,me>=Wa&&me<=this.transform.maxZoom)return this.transform.minZoom=me,this._update(),this.getZoom()<me&&this.setZoom(me),this;throw new Error("minZoom must be between "+Wa+" and the current maxZoom, inclusive")},Y.prototype.getMinZoom=function(){return this.transform.minZoom},Y.prototype.setMaxZoom=function(me){if(me=me??ji,me>=this.transform.minZoom)return this.transform.maxZoom=me,this._update(),this.getZoom()>me&&this.setZoom(me),this;throw new Error("maxZoom must be greater than the current minZoom")},Y.prototype.getMaxZoom=function(){return this.transform.maxZoom},Y.prototype.setMinPitch=function(me){if(me=me??Ii,me<Ii)throw new Error("minPitch must be greater than or equal to "+Ii);if(me>=Ii&&me<=this.transform.maxPitch)return this.transform.minPitch=me,this._update(),this.getPitch()<me&&this.setPitch(me),this;throw new Error("minPitch must be between "+Ii+" and the current maxPitch, inclusive")},Y.prototype.getMinPitch=function(){return this.transform.minPitch},Y.prototype.setMaxPitch=function(me){if(me=me??hn,me>hn)throw new Error("maxPitch must be less than or equal to "+hn);if(me>=this.transform.minPitch)return this.transform.maxPitch=me,this._update(),this.getPitch()>me&&this.setPitch(me),this;throw new Error("maxPitch must be greater than the current minPitch")},Y.prototype.getMaxPitch=function(){return this.transform.maxPitch},Y.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},Y.prototype.setRenderWorldCopies=function(me){return this.transform.renderWorldCopies=me,this._update()},Y.prototype.project=function(me){return this.transform.locationPoint(e.LngLat.convert(me))},Y.prototype.unproject=function(me){return this.transform.pointLocation(e.Point.convert(me))},Y.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},Y.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},Y.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},Y.prototype._createDelegatedListener=function(me,Ge,Le){var $e=this,mt;if(me==="mouseenter"||me==="mouseover"){var jt=!1,_r=function(ir){var fr=$e.getLayer(Ge)?$e.queryRenderedFeatures(ir.point,{layers:[Ge]}):[];fr.length?jt||(jt=!0,Le.call($e,new De(me,$e,ir.originalEvent,{features:fr}))):jt=!1},Fr=function(){jt=!1};return{layer:Ge,listener:Le,delegates:{mousemove:_r,mouseout:Fr}}}else if(me==="mouseleave"||me==="mouseout"){var hr=!1,gt=function(ir){var fr=$e.getLayer(Ge)?$e.queryRenderedFeatures(ir.point,{layers:[Ge]}):[];fr.length?hr=!0:hr&&(hr=!1,Le.call($e,new De(me,$e,ir.originalEvent)))},Et=function(ir){hr&&(hr=!1,Le.call($e,new De(me,$e,ir.originalEvent)))};return{layer:Ge,listener:Le,delegates:{mousemove:gt,mouseout:Et}}}else{var Ft=function(ir){var fr=$e.getLayer(Ge)?$e.queryRenderedFeatures(ir.point,{layers:[Ge]}):[];fr.length&&(ir.features=fr,Le.call($e,ir),delete ir.features)};return{layer:Ge,listener:Le,delegates:(mt={},mt[me]=Ft,mt)}}},Y.prototype.on=function(me,Ge,Le){if(Le===void 0)return ve.prototype.on.call(this,me,Ge);var $e=this._createDelegatedListener(me,Ge,Le);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[me]=this._delegatedListeners[me]||[],this._delegatedListeners[me].push($e);for(var mt in $e.delegates)this.on(mt,$e.delegates[mt]);return this},Y.prototype.once=function(me,Ge,Le){if(Le===void 0)return ve.prototype.once.call(this,me,Ge);var $e=this._createDelegatedListener(me,Ge,Le);for(var mt in $e.delegates)this.once(mt,$e.delegates[mt]);return this},Y.prototype.off=function(me,Ge,Le){var $e=this;if(Le===void 0)return ve.prototype.off.call(this,me,Ge);var mt=function(jt){for(var _r=jt[me],Fr=0;Fr<_r.length;Fr++){var hr=_r[Fr];if(hr.layer===Ge&&hr.listener===Le){for(var gt in hr.delegates)$e.off(gt,hr.delegates[gt]);return _r.splice(Fr,1),$e}}};return this._delegatedListeners&&this._delegatedListeners[me]&&mt(this._delegatedListeners),this},Y.prototype.queryRenderedFeatures=function(me,Ge){if(!this.style)return[];Ge===void 0&&me!==void 0&&!(me instanceof e.Point)&&!Array.isArray(me)&&(Ge=me,me=void 0),Ge=Ge||{},me=me||[[0,0],[this.transform.width,this.transform.height]];var Le;if(me instanceof e.Point||typeof me[0]=="number")Le=[e.Point.convert(me)];else{var $e=e.Point.convert(me[0]),mt=e.Point.convert(me[1]);Le=[$e,new e.Point(mt.x,$e.y),mt,new e.Point($e.x,mt.y),$e]}return this.style.queryRenderedFeatures(Le,Ge,this.transform)},Y.prototype.querySourceFeatures=function(me,Ge){return this.style.querySourceFeatures(me,Ge)},Y.prototype.setStyle=function(me,Ge){return Ge=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},Ge),Ge.diff!==!1&&Ge.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&me?(this._diffStyle(me,Ge),this):(this._localIdeographFontFamily=Ge.localIdeographFontFamily,this._updateStyle(me,Ge))},Y.prototype._getUIString=function(me){var Ge=this._locale[me];if(Ge==null)throw new Error("Missing UI string '"+me+"'");return Ge},Y.prototype._updateStyle=function(me,Ge){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),me)this.style=new iu(this,Ge||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof me=="string"?this.style.loadURL(me):this.style.loadJSON(me),this},Y.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new iu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},Y.prototype._diffStyle=function(me,Ge){var Le=this;if(typeof me=="string"){var $e=this._requestManager.normalizeStyleURL(me),mt=this._requestManager.transformRequest($e,e.ResourceType.Style);e.getJSON(mt,function(jt,_r){jt?Le.fire(new e.ErrorEvent(jt)):_r&&Le._updateDiff(_r,Ge)})}else typeof me=="object"&&this._updateDiff(me,Ge)},Y.prototype._updateDiff=function(me,Ge){try{this.style.setState(me)&&this._update(!0)}catch(Le){e.warnOnce("Unable to perform style diff: "+(Le.message||Le.error||Le)+". Rebuilding the style from scratch."),this._updateStyle(me,Ge)}},Y.prototype.getStyle=function(){if(this.style)return this.style.serialize()},Y.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")},Y.prototype.addSource=function(me,Ge){return this._lazyInitEmptyStyle(),this.style.addSource(me,Ge),this._update(!0)},Y.prototype.isSourceLoaded=function(me){var Ge=this.style&&this.style.sourceCaches[me];if(Ge===void 0){this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+me+"'")));return}return Ge.loaded()},Y.prototype.areTilesLoaded=function(){var me=this.style&&this.style.sourceCaches;for(var Ge in me){var Le=me[Ge],$e=Le._tiles;for(var mt in $e){var jt=$e[mt];if(!(jt.state==="loaded"||jt.state==="errored"))return!1}}return!0},Y.prototype.addSourceType=function(me,Ge,Le){return this._lazyInitEmptyStyle(),this.style.addSourceType(me,Ge,Le)},Y.prototype.removeSource=function(me){return this.style.removeSource(me),this._update(!0)},Y.prototype.getSource=function(me){return this.style.getSource(me)},Y.prototype.addImage=function(me,Ge,Le){Le===void 0&&(Le={});var $e=Le.pixelRatio;$e===void 0&&($e=1);var mt=Le.sdf;mt===void 0&&(mt=!1);var jt=Le.stretchX,_r=Le.stretchY,Fr=Le.content;this._lazyInitEmptyStyle();var hr=0;if(Ge instanceof Ea||gi&&Ge instanceof gi){var gt=e.browser.getImageData(Ge),Et=gt.width,Ft=gt.height,ir=gt.data;this.style.addImage(me,{data:new e.RGBAImage({width:Et,height:Ft},ir),pixelRatio:$e,stretchX:jt,stretchY:_r,content:Fr,sdf:mt,version:hr})}else{if(Ge.width===void 0||Ge.height===void 0)return this.fire(new e.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 fr=Ge.width,sr=Ge.height,pr=Ge.data,lr=Ge;this.style.addImage(me,{data:new e.RGBAImage({width:fr,height:sr},new Uint8Array(pr)),pixelRatio:$e,stretchX:jt,stretchY:_r,content:Fr,sdf:mt,version:hr,userImage:lr}),lr.onAdd&&lr.onAdd(this,me)}},Y.prototype.updateImage=function(me,Ge){var Le=this.style.getImage(me);if(!Le)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var $e=Ge instanceof Ea||gi&&Ge instanceof gi?e.browser.getImageData(Ge):Ge,mt=$e.width,jt=$e.height,_r=$e.data;if(mt===void 0||jt===void 0)return this.fire(new e.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(mt!==Le.data.width||jt!==Le.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var Fr=!(Ge instanceof Ea||gi&&Ge instanceof gi);Le.data.replace(_r,Fr),this.style.updateImage(me,Le)},Y.prototype.hasImage=function(me){return me?!!this.style.getImage(me):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},Y.prototype.removeImage=function(me){this.style.removeImage(me)},Y.prototype.loadImage=function(me,Ge){e.getImage(this._requestManager.transformRequest(me,e.ResourceType.Image),Ge)},Y.prototype.listImages=function(){return this.style.listImages()},Y.prototype.addLayer=function(me,Ge){return this._lazyInitEmptyStyle(),this.style.addLayer(me,Ge),this._update(!0)},Y.prototype.moveLayer=function(me,Ge){return this.style.moveLayer(me,Ge),this._update(!0)},Y.prototype.removeLayer=function(me){return this.style.removeLayer(me),this._update(!0)},Y.prototype.getLayer=function(me){return this.style.getLayer(me)},Y.prototype.setLayerZoomRange=function(me,Ge,Le){return this.style.setLayerZoomRange(me,Ge,Le),this._update(!0)},Y.prototype.setFilter=function(me,Ge,Le){return Le===void 0&&(Le={}),this.style.setFilter(me,Ge,Le),this._update(!0)},Y.prototype.getFilter=function(me){return this.style.getFilter(me)},Y.prototype.setPaintProperty=function(me,Ge,Le,$e){return $e===void 0&&($e={}),this.style.setPaintProperty(me,Ge,Le,$e),this._update(!0)},Y.prototype.getPaintProperty=function(me,Ge){return this.style.getPaintProperty(me,Ge)},Y.prototype.setLayoutProperty=function(me,Ge,Le,$e){return $e===void 0&&($e={}),this.style.setLayoutProperty(me,Ge,Le,$e),this._update(!0)},Y.prototype.getLayoutProperty=function(me,Ge){return this.style.getLayoutProperty(me,Ge)},Y.prototype.setLight=function(me,Ge){return Ge===void 0&&(Ge={}),this._lazyInitEmptyStyle(),this.style.setLight(me,Ge),this._update(!0)},Y.prototype.getLight=function(){return this.style.getLight()},Y.prototype.setFeatureState=function(me,Ge){return this.style.setFeatureState(me,Ge),this._update()},Y.prototype.removeFeatureState=function(me,Ge){return this.style.removeFeatureState(me,Ge),this._update()},Y.prototype.getFeatureState=function(me){return this.style.getFeatureState(me)},Y.prototype.getContainer=function(){return this._container},Y.prototype.getCanvasContainer=function(){return this._canvasContainer},Y.prototype.getCanvas=function(){return this._canvas},Y.prototype._containerDimensions=function(){var me=0,Ge=0;return this._container&&(me=this._container.clientWidth||400,Ge=this._container.clientHeight||300),[me,Ge]},Y.prototype._detectMissingCSS=function(){var me=e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");me!=="rgb(250, 128, 114)"&&e.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/.")},Y.prototype._setupContainer=function(){var me=this._container;me.classList.add("mapboxgl-map");var Ge=this._missingCSSCanary=r.create("div","mapboxgl-canary",me);Ge.style.visibility="hidden",this._detectMissingCSS();var Le=this._canvasContainer=r.create("div","mapboxgl-canvas-container",me);this._interactive&&Le.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",Le),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 $e=this._containerDimensions();this._resizeCanvas($e[0],$e[1]);var mt=this._controlContainer=r.create("div","mapboxgl-control-container",me),jt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(_r){jt[_r]=r.create("div","mapboxgl-ctrl-"+_r,mt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},Y.prototype._resizeCanvas=function(me,Ge){var Le=e.browser.devicePixelRatio||1;this._canvas.width=Le*me,this._canvas.height=Le*Ge,this._canvas.style.width=me+"px",this._canvas.style.height=Ge+"px"},Y.prototype._setupPainter=function(){var me=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),Ge=this._canvas.getContext("webgl",me)||this._canvas.getContext("experimental-webgl",me);if(!Ge){this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Ko(Ge,this.transform),e.webpSupported.testSupport(Ge)},Y.prototype._contextLost=function(me){me.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:me}))},Y.prototype._contextRestored=function(me){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:me}))},Y.prototype._onMapScroll=function(me){if(me.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},Y.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},Y.prototype._update=function(me){return this.style?(this._styleDirty=this._styleDirty||me,this._sourcesDirty=!0,this.triggerRepaint(),this):this},Y.prototype._requestRenderFrame=function(me){return this._update(),this._renderTaskQueue.add(me)},Y.prototype._cancelRenderFrame=function(me){this._renderTaskQueue.remove(me)},Y.prototype._render=function(me){var Ge=this,Le,$e=0,mt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(Le=mt.createQueryEXT(),mt.beginQueryEXT(mt.TIME_ELAPSED_EXT,Le),$e=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(me),!this._removed){var jt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var _r=this.transform.zoom,Fr=e.browser.now();this.style.zoomHistory.update(_r,Fr);var hr=new e.EvaluationParameters(_r,{now:Fr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),gt=hr.crossFadingFactor();(gt!==1||gt!==this._crossFadingFactor)&&(jt=!0,this._crossFadingFactor=gt),this.style.update(hr)}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 e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||jt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Et=e.browser.now()-$e;mt.endQueryEXT(mt.TIME_ELAPSED_EXT,Le),setTimeout(function(){var fr=mt.getQueryObjectEXT(Le,mt.QUERY_RESULT_EXT)/1e6;mt.deleteQueryEXT(Le),Ge.fire(new e.Event("gpu-timing-frame",{cpuTime:Et,gpuTime:fr}))},50)}if(this.listens("gpu-timing-layer")){var Ft=this.painter.collectGpuTimers();setTimeout(function(){var fr=Ge.painter.queryGpuTimers(Ft);Ge.fire(new e.Event("gpu-timing-layer",{layerTimes:fr}))},50)}var ir=this._sourcesDirty||this._styleDirty||this._placementDirty;return ir||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.Event("idle")),this._loaded&&!this._fullyLoaded&&!ir&&(this._fullyLoaded=!0),this}},Y.prototype.remove=function(){this._hash&&this._hash.remove();for(var me=0,Ge=this._controls;me<Ge.length;me+=1){var Le=Ge[me];Le.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 e.window<"u"&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("orientationchange",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));var $e=this.painter.context.gl.getExtension("WEBGL_lose_context");$e&&$e.loseContext&&$e.loseContext(),$i(this._canvasContainer),$i(this._controlContainer),$i(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new e.Event("remove"))},Y.prototype.triggerRepaint=function(){var me=this;this.style&&!this._frame&&(this._frame=e.browser.frame(function(Ge){me._frame=null,me._render(Ge)}))},Y.prototype._onWindowOnline=function(){this._update()},Y.prototype._onWindowResize=function(me){this._trackResize&&this.resize({originalEvent:me})._update()},ye.showTileBoundaries.get=function(){return!!this._showTileBoundaries},ye.showTileBoundaries.set=function(te){this._showTileBoundaries!==te&&(this._showTileBoundaries=te,this._update())},ye.showPadding.get=function(){return!!this._showPadding},ye.showPadding.set=function(te){this._showPadding!==te&&(this._showPadding=te,this._update())},ye.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},ye.showCollisionBoxes.set=function(te){this._showCollisionBoxes!==te&&(this._showCollisionBoxes=te,te?this.style._generateCollisionBoxes():this._update())},ye.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},ye.showOverdrawInspector.set=function(te){this._showOverdrawInspector!==te&&(this._showOverdrawInspector=te,this._update())},ye.repaint.get=function(){return!!this._repaint},ye.repaint.set=function(te){this._repaint!==te&&(this._repaint=te,this.triggerRepaint())},ye.vertices.get=function(){return!!this._vertices},ye.vertices.set=function(te){this._vertices=te,this._update()},Y.prototype._setCacheLimits=function(me,Ge){e.setCacheLimits(me,Ge)},ye.version.get=function(){return e.version},Object.defineProperties(Y.prototype,ye),Y}(yn);function $i(ve){ve.parentNode&&ve.parentNode.removeChild(ve)}var zi={showCompass:!0,showZoom:!0,visualizePitch:!1},Si=function(Y){var ye=this;this.options=e.extend({},zi,Y),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(te){return te.preventDefault()}),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(te){return ye._map.zoomIn({},{originalEvent:te})}),r.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(te){return ye._map.zoomOut({},{originalEvent:te})}),r.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(te){ye.options.visualizePitch?ye._map.resetNorthPitch({},{originalEvent:te}):ye._map.resetNorth({},{originalEvent:te})}),this._compassIcon=r.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Si.prototype._updateZoomButtons=function(){var Y=this._map.getZoom(),ye=Y===this._map.getMaxZoom(),te=Y===this._map.getMinZoom();this._zoomInButton.disabled=ye,this._zoomOutButton.disabled=te,this._zoomInButton.setAttribute("aria-disabled",ye.toString()),this._zoomOutButton.setAttribute("aria-disabled",te.toString())},Si.prototype._rotateCompassArrow=function(){var Y=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=Y},Si.prototype.onAdd=function(Y){return this._map=Y,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 Ti(this._map,this._compass,this.options.visualizePitch)),this._container},Si.prototype.onRemove=function(){r.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},Si.prototype._createButton=function(Y,ye){var te=r.create("button",Y,this._container);return te.type="button",te.addEventListener("click",ye),te},Si.prototype._setButtonTitle=function(Y,ye){var te=this._map._getUIString("NavigationControl."+ye);Y.title=te,Y.setAttribute("aria-label",te)};var Ti=function(Y,ye,te){te===void 0&&(te=!1),this._clickTolerance=10,this.element=ye,this.mouseRotate=new sn({clickTolerance:Y.dragRotate._mouseRotate._clickTolerance}),this.map=Y,te&&(this.mousePitch=new an({clickTolerance:Y.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener(ye,"mousedown",this.mousedown),r.addEventListener(ye,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(ye,"touchmove",this.touchmove),r.addEventListener(ye,"touchend",this.touchend),r.addEventListener(ye,"touchcancel",this.reset)};Ti.prototype.down=function(Y,ye){this.mouseRotate.mousedown(Y,ye),this.mousePitch&&this.mousePitch.mousedown(Y,ye),r.disableDrag()},Ti.prototype.move=function(Y,ye){var te=this.map,me=this.mouseRotate.mousemoveWindow(Y,ye);if(me&&me.bearingDelta&&te.setBearing(te.getBearing()+me.bearingDelta),this.mousePitch){var Ge=this.mousePitch.mousemoveWindow(Y,ye);Ge&&Ge.pitchDelta&&te.setPitch(te.getPitch()+Ge.pitchDelta)}},Ti.prototype.off=function(){var Y=this.element;r.removeEventListener(Y,"mousedown",this.mousedown),r.removeEventListener(Y,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(Y,"touchmove",this.touchmove),r.removeEventListener(Y,"touchend",this.touchend),r.removeEventListener(Y,"touchcancel",this.reset),this.offTemp()},Ti.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Ti.prototype.mousedown=function(Y){this.down(e.extend({},Y,{ctrlKey:!0,preventDefault:function(){return Y.preventDefault()}}),r.mousePos(this.element,Y)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Ti.prototype.mousemove=function(Y){this.move(Y,r.mousePos(this.element,Y))},Ti.prototype.mouseup=function(Y){this.mouseRotate.mouseupWindow(Y),this.mousePitch&&this.mousePitch.mouseupWindow(Y),this.offTemp()},Ti.prototype.touchstart=function(Y){Y.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,Y.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return Y.preventDefault()}},this._startPos))},Ti.prototype.touchmove=function(Y){Y.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,Y.targetTouches)[0],this.move({preventDefault:function(){return Y.preventDefault()}},this._lastPos))},Ti.prototype.touchend=function(Y){Y.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ti.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function Ki(ve,Y,ye){if(ve=new e.LngLat(ve.lng,ve.lat),Y){var te=new e.LngLat(ve.lng-360,ve.lat),me=new e.LngLat(ve.lng+360,ve.lat),Ge=ye.locationPoint(ve).distSqr(Y);ye.locationPoint(te).distSqr(Y)<Ge?ve=te:ye.locationPoint(me).distSqr(Y)<Ge&&(ve=me)}for(;Math.abs(ve.lng-ye.center.lng)>180;){var Le=ye.locationPoint(ve);if(Le.x>=0&&Le.y>=0&&Le.x<=ye.width&&Le.y<=ye.height)break;ve.lng>ye.center.lng?ve.lng-=360:ve.lng+=360}return ve}var mn={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 In(ve,Y,ye){var te=ve.classList;for(var me in mn)te.remove("mapboxgl-"+ye+"-anchor-"+me);te.add("mapboxgl-"+ye+"-anchor-"+Y)}var Di=function(ve){function Y(ye,te){if(ve.call(this),(ye instanceof e.window.HTMLElement||te)&&(ye=e.extend({element:ye},te)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=ye&&ye.anchor||"center",this._color=ye&&ye.color||"#3FB1CE",this._scale=ye&&ye.scale||1,this._draggable=ye&&ye.draggable||!1,this._clickTolerance=ye&&ye.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=ye&&ye.rotation||0,this._rotationAlignment=ye&&ye.rotationAlignment||"auto",this._pitchAlignment=ye&&ye.pitchAlignment&&ye.pitchAlignment!=="auto"?ye.pitchAlignment:this._rotationAlignment,!ye||!ye.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var me=r.createNS("http://www.w3.org/2000/svg","svg"),Ge=41,Le=27;me.setAttributeNS(null,"display","block"),me.setAttributeNS(null,"height",Ge+"px"),me.setAttributeNS(null,"width",Le+"px"),me.setAttributeNS(null,"viewBox","0 0 "+Le+" "+Ge);var $e=r.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"stroke","none"),$e.setAttributeNS(null,"stroke-width","1"),$e.setAttributeNS(null,"fill","none"),$e.setAttributeNS(null,"fill-rule","evenodd");var mt=r.createNS("http://www.w3.org/2000/svg","g");mt.setAttributeNS(null,"fill-rule","nonzero");var jt=r.createNS("http://www.w3.org/2000/svg","g");jt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),jt.setAttributeNS(null,"fill","#000000");for(var _r=[{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"}],Fr=0,hr=_r;Fr<hr.length;Fr+=1){var gt=hr[Fr],Et=r.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",gt.rx),Et.setAttributeNS(null,"ry",gt.ry),jt.appendChild(Et)}var Ft=r.createNS("http://www.w3.org/2000/svg","g");Ft.setAttributeNS(null,"fill",this._color);var ir=r.createNS("http://www.w3.org/2000/svg","path");ir.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"),Ft.appendChild(ir);var fr=r.createNS("http://www.w3.org/2000/svg","g");fr.setAttributeNS(null,"opacity","0.25"),fr.setAttributeNS(null,"fill","#000000");var sr=r.createNS("http://www.w3.org/2000/svg","path");sr.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"),fr.appendChild(sr);var pr=r.createNS("http://www.w3.org/2000/svg","g");pr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),pr.setAttributeNS(null,"fill","#FFFFFF");var lr=r.createNS("http://www.w3.org/2000/svg","g");lr.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Xt=r.createNS("http://www.w3.org/2000/svg","circle");Xt.setAttributeNS(null,"fill","#000000"),Xt.setAttributeNS(null,"opacity","0.25"),Xt.setAttributeNS(null,"cx","5.5"),Xt.setAttributeNS(null,"cy","5.5"),Xt.setAttributeNS(null,"r","5.4999962");var or=r.createNS("http://www.w3.org/2000/svg","circle");or.setAttributeNS(null,"fill","#FFFFFF"),or.setAttributeNS(null,"cx","5.5"),or.setAttributeNS(null,"cy","5.5"),or.setAttributeNS(null,"r","5.4999962"),lr.appendChild(Xt),lr.appendChild(or),mt.appendChild(jt),mt.appendChild(Ft),mt.appendChild(fr),mt.appendChild(pr),mt.appendChild(lr),me.appendChild(mt),me.setAttributeNS(null,"height",Ge*this._scale+"px"),me.setAttributeNS(null,"width",Le*this._scale+"px"),this._element.appendChild(me),this._offset=e.Point.convert(ye&&ye.offset||[0,-14])}else this._element=ye.element,this._offset=e.Point.convert(ye&&ye.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(qt){qt.preventDefault()}),this._element.addEventListener("mousedown",function(qt){qt.preventDefault()}),In(this._element,this._anchor,"marker"),this._popup=null}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.addTo=function(te){return this.remove(),this._map=te,te.getCanvasContainer().appendChild(this._element),te.on("move",this._update),te.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},Y.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),r.remove(this._element),this._popup&&this._popup.remove(),this},Y.prototype.getLngLat=function(){return this._lngLat},Y.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Y.prototype.getElement=function(){return this._element},Y.prototype.setPopup=function(te){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),te){if(!("offset"in te.options)){var me=38.1,Ge=13.5,Le=Math.sqrt(Math.pow(Ge,2)/2);te.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-me],"bottom-left":[Le,(me-Ge+Le)*-1],"bottom-right":[-Le,(me-Ge+Le)*-1],left:[Ge,(me-Ge)*-1],right:[-Ge,(me-Ge)*-1]}:this._offset}this._popup=te,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},Y.prototype._onKeyPress=function(te){var me=te.code,Ge=te.charCode||te.keyCode;(me==="Space"||me==="Enter"||Ge===32||Ge===13)&&this.togglePopup()},Y.prototype._onMapClick=function(te){var me=te.originalEvent.target,Ge=this._element;this._popup&&(me===Ge||Ge.contains(me))&&this.togglePopup()},Y.prototype.getPopup=function(){return this._popup},Y.prototype.togglePopup=function(){var te=this._popup;if(te)te.isOpen()?te.remove():te.addTo(this._map);else return this;return this},Y.prototype._update=function(te){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Ki(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var me="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?me="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(me="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var Ge="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ge="rotateX(0deg)":this._pitchAlignment==="map"&&(Ge="rotateX("+this._map.getPitch()+"deg)"),(!te||te.type==="moveend")&&(this._pos=this._pos.round()),r.setTransform(this._element,mn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+Ge+" "+me)}},Y.prototype.getOffset=function(){return this._offset},Y.prototype.setOffset=function(te){return this._offset=e.Point.convert(te),this._update(),this},Y.prototype._onMove=function(te){if(!this._isDragging){var me=this._clickTolerance||this._map._clickTolerance;this._isDragging=te.point.dist(this._pointerdownPos)>=me}this._isDragging&&(this._pos=te.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 e.Event("dragstart"))),this.fire(new e.Event("drag")))},Y.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 e.Event("dragend")),this._state="inactive"},Y.prototype._addDragHandler=function(te){this._element.contains(te.originalEvent.target)&&(te.preventDefault(),this._positionDelta=te.point.sub(this._pos).add(this._offset),this._pointerdownPos=te.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))},Y.prototype.setDraggable=function(te){return this._draggable=!!te,this._map&&(te?(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},Y.prototype.isDraggable=function(){return this._draggable},Y.prototype.setRotation=function(te){return this._rotation=te||0,this._update(),this},Y.prototype.getRotation=function(){return this._rotation},Y.prototype.setRotationAlignment=function(te){return this._rotationAlignment=te||"auto",this._update(),this},Y.prototype.getRotationAlignment=function(){return this._rotationAlignment},Y.prototype.setPitchAlignment=function(te){return this._pitchAlignment=te&&te!=="auto"?te:this._rotationAlignment,this._update(),this},Y.prototype.getPitchAlignment=function(){return this._pitchAlignment},Y}(e.Evented),nn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},En;function Rn(ve){En!==void 0?ve(En):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(Y){En=Y.state!=="denied",ve(En)}):(En=!!e.window.navigator.geolocation,ve(En))}var Gn=0,Ps=!1,xl=function(ve){function Y(ye){ve.call(this),this.options=e.extend({},nn,ye),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.onAdd=function(te){return this._map=te,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Rn(this._setupUI),this._container},Y.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(e.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(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Gn=0,Ps=!1},Y.prototype._isOutOfMapMaxBounds=function(te){var me=this._map.getMaxBounds(),Ge=te.coords;return me&&(Ge.longitude<me.getWest()||Ge.longitude>me.getEast()||Ge.latitude<me.getSouth()||Ge.latitude>me.getNorth())},Y.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}},Y.prototype._onSuccess=function(te){if(this._map){if(this._isOutOfMapMaxBounds(te)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",te)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=te,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(te),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(te),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",te)),this._finish()}},Y.prototype._updateCamera=function(te){var me=new e.LngLat(te.coords.longitude,te.coords.latitude),Ge=te.coords.accuracy,Le=this._map.getBearing(),$e=e.extend({bearing:Le},this.options.fitBoundsOptions);this._map.fitBounds(me.toBounds(Ge),$e,{geolocateSource:!0})},Y.prototype._updateMarker=function(te){if(te){var me=new e.LngLat(te.coords.longitude,te.coords.latitude);this._accuracyCircleMarker.setLngLat(me).addTo(this._map),this._userLocationDotMarker.setLngLat(me).addTo(this._map),this._accuracy=te.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},Y.prototype._updateCircleRadius=function(){var te=this._map._container.clientHeight/2,me=this._map.unproject([0,te]),Ge=this._map.unproject([1,te]),Le=me.distanceTo(Ge),$e=Math.ceil(2*this._accuracy/Le);this._circleElement.style.width=$e+"px",this._circleElement.style.height=$e+"px"},Y.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},Y.prototype._onError=function(te){if(this._map){if(this.options.trackUserLocation)if(te.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 me=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=me,this._geolocateButton.setAttribute("aria-label",me),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(te.code===3&&Ps)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",te)),this._finish()}},Y.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},Y.prototype._setupUI=function(te){var me=this;if(this._container.addEventListener("contextmenu",function($e){return $e.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",te===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ge=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ge,this._geolocateButton.setAttribute("aria-label",Ge)}else{var Le=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Le,this._geolocateButton.setAttribute("aria-label",Le)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Di(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Di({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($e){var mt=$e.originalEvent&&$e.originalEvent.type==="resize";!$e.geolocateSource&&me._watchState==="ACTIVE_LOCK"&&!mt&&(me._watchState="BACKGROUND",me._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),me._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),me.fire(new e.Event("trackuserlocationend")))})},Y.prototype.trigger=function(){if(!this._setup)return e.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 e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Gn--,Ps=!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 e.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 e.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"),Gn++;var te;Gn>1?(te={maximumAge:6e5,timeout:0},Ps=!0):(te=this.options.positionOptions,Ps=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,te)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},Y.prototype._clearWatch=function(){e.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)},Y}(e.Evented),ho={maxWidth:100,unit:"metric"},Hl=function(Y){this.options=e.extend({},ho,Y),e.bindAll(["_onMove","setUnit"],this)};Hl.prototype.getDefaultPosition=function(){return"bottom-left"},Hl.prototype._onMove=function(){fs(this._map,this._container,this.options)},Hl.prototype.onAdd=function(Y){return this._map=Y,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",Y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Hl.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Hl.prototype.setUnit=function(Y){this.options.unit=Y,fs(this._map,this._container,this.options)};function fs(ve,Y,ye){var te=ye&&ye.maxWidth||100,me=ve._container.clientHeight/2,Ge=ve.unproject([0,me]),Le=ve.unproject([te,me]),$e=Ge.distanceTo(Le);if(ye&&ye.unit==="imperial"){var mt=3.2808*$e;if(mt>5280){var jt=mt/5280;Al(Y,te,jt,ve._getUIString("ScaleControl.Miles"))}else Al(Y,te,mt,ve._getUIString("ScaleControl.Feet"))}else if(ye&&ye.unit==="nautical"){var _r=$e/1852;Al(Y,te,_r,ve._getUIString("ScaleControl.NauticalMiles"))}else $e>=1e3?Al(Y,te,$e/1e3,ve._getUIString("ScaleControl.Kilometers")):Al(Y,te,$e,ve._getUIString("ScaleControl.Meters"))}function Al(ve,Y,ye,te){var me=Ql(ye),Ge=me/ye;ve.style.width=Y*Ge+"px",ve.innerHTML=me+"&nbsp;"+te}function El(ve){var Y=Math.pow(10,Math.ceil(-Math.log(ve)/Math.LN10));return Math.round(ve*Y)/Y}function Ql(ve){var Y=Math.pow(10,(""+Math.floor(ve)).length-1),ye=ve/Y;return ye=ye>=10?10:ye>=5?5:ye>=3?3:ye>=2?2:ye>=1?1:El(ye),Y*ye}var Fs=function(Y){this._fullscreen=!1,Y&&Y.container&&(Y.container instanceof e.window.HTMLElement?this._container=Y.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Fs.prototype.onAdd=function(Y){return this._map=Y,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Fs.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Fs.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Fs.prototype._setupUI=function(){var Y=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",Y).setAttribute("aria-hidden",!0),Y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Fs.prototype._updateTitle=function(){var Y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Y),this._fullscreenButton.title=Y},Fs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Fs.prototype._isFullscreen=function(){return this._fullscreen},Fs.prototype._changeIcon=function(){var Y=e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement;Y===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Fs.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.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 pl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},bl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Hn=function(ve){function Y(ye){ve.call(this),this.options=e.extend(Object.create(pl),ye),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ve&&(Y.__proto__=ve),Y.prototype=Object.create(ve&&ve.prototype),Y.prototype.constructor=Y,Y.prototype.addTo=function(te){return this._map&&this.remove(),this._map=te,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 e.Event("open")),this},Y.prototype.isOpen=function(){return!!this._map},Y.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.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 e.Event("close")),this},Y.prototype.getLngLat=function(){return this._lngLat},Y.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),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},Y.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},Y.prototype.getElement=function(){return this._container},Y.prototype.setText=function(te){return this.setDOMContent(e.window.document.createTextNode(te))},Y.prototype.setHTML=function(te){var me=e.window.document.createDocumentFragment(),Ge=e.window.document.createElement("body"),Le;for(Ge.innerHTML=te;Le=Ge.firstChild,!!Le;)me.appendChild(Le);return this.setDOMContent(me)},Y.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},Y.prototype.setMaxWidth=function(te){return this.options.maxWidth=te,this._update(),this},Y.prototype.setDOMContent=function(te){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(te),this._createCloseButton(),this._update(),this._focusFirstElement(),this},Y.prototype.addClassName=function(te){this._container&&this._container.classList.add(te)},Y.prototype.removeClassName=function(te){this._container&&this._container.classList.remove(te)},Y.prototype.setOffset=function(te){return this.options.offset=te,this._update(),this},Y.prototype.toggleClassName=function(te){if(this._container)return this._container.classList.toggle(te)},Y.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},Y.prototype._onMouseUp=function(te){this._update(te.point)},Y.prototype._onMouseMove=function(te){this._update(te.point)},Y.prototype._onDrag=function(te){this._update(te.point)},Y.prototype._update=function(te){var me=this,Ge=this._lngLat||this._trackPointer;if(!(!this._map||!Ge||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(gt){return me._container.classList.add(gt)}),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=Ki(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!te))){var Le=this._pos=this._trackPointer&&te?te:this._map.project(this._lngLat),$e=this.options.anchor,mt=Cl(this.options.offset);if(!$e){var jt=this._container.offsetWidth,_r=this._container.offsetHeight,Fr;Le.y+mt.bottom.y<_r?Fr=["top"]:Le.y>this._map.transform.height-_r?Fr=["bottom"]:Fr=[],Le.x<jt/2?Fr.push("left"):Le.x>this._map.transform.width-jt/2&&Fr.push("right"),Fr.length===0?$e="bottom":$e=Fr.join("-")}var hr=Le.add(mt[$e]).round();r.setTransform(this._container,mn[$e]+" translate("+hr.x+"px,"+hr.y+"px)"),In(this._container,$e,"popup")}},Y.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var te=this._container.querySelector(bl);te&&te.focus()}},Y.prototype._onClose=function(){this.remove()},Y}(e.Evented);function Cl(ve){if(ve)if(typeof ve=="number"){var Y=Math.round(Math.sqrt(.5*Math.pow(ve,2)));return{center:new e.Point(0,0),top:new e.Point(0,ve),"top-left":new e.Point(Y,Y),"top-right":new e.Point(-Y,Y),bottom:new e.Point(0,-ve),"bottom-left":new e.Point(Y,-Y),"bottom-right":new e.Point(-Y,-Y),left:new e.Point(ve,0),right:new e.Point(-ve,0)}}else if(ve instanceof e.Point||Array.isArray(ve)){var ye=e.Point.convert(ve);return{center:ye,top:ye,"top-left":ye,"top-right":ye,bottom:ye,"bottom-left":ye,"bottom-right":ye,left:ye,right:ye}}else return{center:e.Point.convert(ve.center||[0,0]),top:e.Point.convert(ve.top||[0,0]),"top-left":e.Point.convert(ve["top-left"]||[0,0]),"top-right":e.Point.convert(ve["top-right"]||[0,0]),bottom:e.Point.convert(ve.bottom||[0,0]),"bottom-left":e.Point.convert(ve["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ve["bottom-right"]||[0,0]),left:e.Point.convert(ve.left||[0,0]),right:e.Point.convert(ve.right||[0,0])};else return Cl(new e.Point(0,0))}var Lo={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Va,NavigationControl:Si,GeolocateControl:xl,AttributionControl:Oi,ScaleControl:Hl,FullscreenControl:Fs,Popup:Hn,Marker:Di,Style:iu,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:Nr,clearPrewarmedResources:Or,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ve){e.config.ACCESS_TOKEN=ve},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ve){e.config.API_URL=ve},get workerCount(){return ai.workerCount},set workerCount(ve){ai.workerCount=ve},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ve){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ve},clearStorage:function(Y){e.clearTileCache(Y)},workerUrl:""};return Lo}),A})}}),mV=Ze({"src/plots/mapbox/layers.js"(Z,q){"use strict";var d=ca(),x=fu().sanitizeHTML,A=M6(),M=am();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=M.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s<n.length;s++){var c=n[s].id;if(typeof c=="string"&&c.indexOf(M.traceLayerPrefix)===0){i=c;break}}return i},t.updateLayer=function(i){var n=this.subplot,s=o(i),c=this.lookupBelow(),f=this.findFollowingMapboxLayerId(c);this.removeLayer(),r(i)&&n.addLayer({id:this.idLayer,source:this.idSource,"source-layer":i.sourcelayer||"",type:i.type,minzoom:i.minzoom,maxzoom:i.maxzoom,layout:s.layout,paint:s.paint},f),this.layerType=i.type,this.below=c},t.updateStyle=function(i){if(r(i)){var n=o(i);this.subplot.setOptions(this.idLayer,"setLayoutProperty",n.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",n.paint)}},t.removeLayer=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer)},t.dispose=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer),i.getSource(this.idSource)&&i.removeSource(this.idSource)};function r(i){if(!i.visible)return!1;var n=i.source;if(Array.isArray(n)&&n.length>0){for(var s=0;s<n.length;s++)if(typeof n[s]!="string"||n[s].length===0)return!1;return!0}return d.isPlainObject(n)||typeof n=="string"&&n.length>0}function o(i){var n={},s={};switch(i.type){case"circle":d.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":d.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":d.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var c=i.symbol,f=A(c.textposition,c.iconsize);d.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":c.placement}),d.extendFlat(s,{"icon-color":i.color,"text-color":c.textfont.color,"text-opacity":i.opacity});break;case"raster":d.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,c={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",c.tileSize=256):n==="image"&&(f="url",c.coordinates=i.coordinates),c[f]=s,i.sourceattribution&&(c.attribution=x(i.sourceattribution)),c}q.exports=function(n,s,c){var f=new e(n,s);return f.update(c),f}}}),gV=Ze({"src/plots/mapbox/mapbox.js"(Z,q){"use strict";var d=E6(),x=ca(),A=v0(),M=oo(),e=Wo(),t=Tp(),r=ef(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Tf().prepSelect,s=Tf().clearOutline,c=Tf().clearSelectionsCache,f=Tf().selectOnClick,g=am(),v=mV();function T(y,b){this.id=b,this.gd=y;var p=y._fullLayout,u=y._context;this.container=p._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=p._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(p),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(y,b,p){var u=this,m=b[u.id];u.map&&m.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var h;u.map?h=new Promise(function(P,L){u.updateMap(y,b,P,L)}):h=new Promise(function(P,L){u.createMap(y,b,P,L)}),p.push(h)},l.createMap=function(y,b,p,u){var m=this,h=b[m.id],P=m.styleObj=w(h.style,b);m.accessToken=h.accesstoken;var L=h.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=m.map=new d.Map({container:m.div,style:P.style,center:E(h.center),zoom:h.zoom,bearing:h.bearing,pitch:h.pitch,maxBounds:z,interactive:!m.isStatic,preserveDrawingBuffer:m.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",m.rejectOnError(u),m.isStatic||m.initFx(y,b);var B=[];B.push(new Promise(function(O){F.once("load",O)})),B=B.concat(A.fetchTraceGeoData(y)),Promise.all(B).then(function(){m.fillBelowLookup(y,b),m.updateData(y),m.updateLayout(b),m.resolveOnRender(p)}).catch(u)},l.updateMap=function(y,b,p,u){var m=this,h=m.map,P=b[this.id];m.rejectOnError(u);var L=[],z=w(P.style,b);JSON.stringify(m.styleObj)!==JSON.stringify(z)&&(m.styleObj=z,h.setStyle(z.style),m.traceHash={},L.push(new Promise(function(F){h.once("styledata",F)}))),L=L.concat(A.fetchTraceGeoData(y)),Promise.all(L).then(function(){m.fillBelowLookup(y,b),m.updateData(y),m.updateLayout(b),m.resolveOnRender(p)}).catch(u)},l.fillBelowLookup=function(y,b){var p=b[this.id],u=p.layers,m,h,P=this.belowLookup={},L=!1;for(m=0;m<y.length;m++){var z=y[m][0].trace,F=z._module;typeof z.below=="string"?h=z.below:F.getBelow&&(h=F.getBelow(z,this)),h===""&&(L=!0),P["trace-"+z.uid]=h||""}for(m=0;m<u.length;m++){var B=u[m];typeof B.below=="string"?h=B.below:L?h="traces":h="",P["layout-"+m]=h}var O={},I,N;for(I in P)h=P[I],O[h]?O[h].push(I):O[h]=[I];for(h in O){var U=O[h];if(U.length>1)for(m=0;m<U.length;m++)I=U[m],I.indexOf("trace-")===0?(N=I.split("trace-")[1],this.traceHash[N]&&(this.traceHash[N].below=null)):I.indexOf("layout-")===0&&(N=I.split("layout-")[1],this.layerList[N]&&(this.layerList[N].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};l.updateData=function(y){var b=this.traceHash,p,u,m,h,P=y.slice().sort(function(O,I){return _[O[0].trace.type]-_[I[0].trace.type]});for(m=0;m<P.length;m++){var L=P[m];u=L[0].trace,p=b[u.uid];var z=!1;p&&(p.type===u.type?(p.update(L),z=!0):p.dispose()),!z&&u._module&&(b[u.uid]=u._module.plot(this,L))}var F=Object.keys(b);e:for(m=0;m<F.length;m++){var B=F[m];for(h=0;h<y.length;h++)if(u=y[h][0].trace,B===u.uid)continue e;p=b[B],p.dispose(),delete b[B]}},l.updateLayout=function(y){var b=this.map,p=y[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(E(p.center)),b.setZoom(p.zoom),b.setBearing(p.bearing),b.setPitch(p.pitch)),this.updateLayers(y),this.updateFramework(y),this.updateFx(y),this.map.resize(),this.gd._context._scrollZoom.mapbox?b.scrollZoom.enable():b.scrollZoom.disable()},l.resolveOnRender=function(y){var b=this.map;b.on("render",function p(){b.loaded()&&(b.off("render",p),setTimeout(y,10))})},l.rejectOnError=function(y){var b=this.map;function p(){y(new Error(g.mapOnErrorMsg))}b.once("error",p),b.once("style.error",p),b.once("source.error",p),b.once("tile.error",p),b.once("layer.error",p)},l.createFramework=function(y){var b=this,p=b.div=document.createElement("div");p.id=b.uid,p.style.position="absolute",b.container.appendChild(p),b.xaxis={_id:"x",c2p:function(u){return b.project(u).x}},b.yaxis={_id:"y",c2p:function(u){return b.project(u).y}},b.updateFramework(y),b.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(b.mockAxis,y)},l.initFx=function(y,b){var p=this,u=p.gd,m=p.map;m.on("moveend",function(L){if(p.map){var z=u._fullLayout;if(L.originalEvent||p.wheeling){var F=z[p.id];M.call("_storeDirectGUIEdit",u.layout,z._preGUI,p.getViewEdits(F));var B=p.getView();F._input.center=F.center=B.center,F._input.zoom=F.zoom=B.zoom,F._input.bearing=F.bearing=B.bearing,F._input.pitch=F.pitch=B.pitch,u.emit("plotly_relayout",p.getViewEditsWithDerived(B))}L.originalEvent&&L.originalEvent.type==="mouseup"?p.dragging=!1:p.wheeling&&(p.wheeling=!1),z._rehover&&z._rehover()}}),m.on("wheel",function(){p.wheeling=!0}),m.on("mousemove",function(L){var z=p.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},p.xaxis.p2c=function(){return m.unproject(F).lng},p.yaxis.p2c=function(){return m.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===p.id&&u._fullLayout[p.id]&&r.hover(u,L,p.id)},r.hover(u,L,p.id),u._fullLayout._hoversubplot=p.id});function h(){r.loneUnhover(b._hoverlayer)}m.on("dragstart",function(){p.dragging=!0,h()}),m.on("zoomstart",h),m.on("mouseout",function(){u._fullLayout._hoversubplot=null});function P(){var L=p.getView();u.emit("plotly_relayouting",p.getViewEditsWithDerived(L))}m.on("drag",P),m.on("zoom",P),m.on("dblclick",function(){var L=u._fullLayout[p.id];M.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,p.getViewEdits(L));var z=p.viewInitial;m.setCenter(E(z.center)),m.setZoom(z.zoom),m.setBearing(z.bearing),m.setPitch(z.pitch);var F=p.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",p.getViewEditsWithDerived(F))}),p.clearOutline=function(){c(p.dragOptions),s(p.dragOptions.gd)},p.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&f(z.originalEvent,u,[p.xaxis],[p.yaxis],p.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(y){var b=this,p=b.map,u=b.gd;if(b.isStatic)return;function m(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var h=y.dragmode,P;P=function(z,F){if(F.isRect){var B=z.range={};B[b.id]=[m([F.xmin,F.ymin]),m([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(m)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:y.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:y[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:P},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),p.off("click",b.onClickInPanHandler),i(h)||a(h)?(p.dragPan.disable(),p.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,B){n(z,F,B,b.dragOptions,h)},t.init(b.dragOptions)):(p.dragPan.enable(),p.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),p.on("click",b.onClickInPanHandler))},l.updateFramework=function(y){var b=y[this.id].domain,p=y._size,u=this.div.style;u.width=p.w*(b.x[1]-b.x[0])+"px",u.height=p.h*(b.y[1]-b.y[0])+"px",u.left=p.l+b.x[0]*p.w+"px",u.top=p.t+(1-b.y[1])*p.h+"px",this.xaxis._offset=p.l+b.x[0]*p.w,this.xaxis._length=p.w*(b.x[1]-b.x[0]),this.yaxis._offset=p.t+(1-b.y[1])*p.h,this.yaxis._length=p.h*(b.y[1]-b.y[0])},l.updateLayers=function(y){var b=y[this.id],p=b.layers,u=this.layerList,m;if(p.length!==u.length){for(m=0;m<u.length;m++)u[m].dispose();for(u=this.layerList=[],m=0;m<p.length;m++)u.push(v(this,m,p[m]))}else for(m=0;m<p.length;m++)u[m].update(p[m])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(y,b,p){for(var u in p)this.map[b](y,u,p[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(y,b){var p=this.map;if(typeof b=="string"){if(b===""){p.addLayer(y,b);return}for(var u=this.getMapLayers(),m=0;m<u.length;m++)if(b===u[m].id){p.addLayer(y,b);return}x.warn(["Trying to add layer with *below* value",b,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}p.addLayer(y)},l.project=function(y){return this.map.project(new d.LngLat(y[0],y[1]))},l.getView=function(){var y=this.map,b=y.getCenter(),p=b.lng,u=b.lat,m={lon:p,lat:u},h=y.getCanvas(),P=parseInt(h.style.width),L=parseInt(h.style.height);return{center:m,zoom:y.getZoom(),bearing:y.getBearing(),pitch:y.getPitch(),_derived:{coordinates:[y.unproject([0,0]).toArray(),y.unproject([P,0]).toArray(),y.unproject([P,L]).toArray(),y.unproject([0,L]).toArray()]}}},l.getViewEdits=function(y){for(var b=this.id,p=["center","zoom","bearing","pitch"],u={},m=0;m<p.length;m++){var h=p[m];u[b+"."+h]=y[h]}return u},l.getViewEditsWithDerived=function(y){var b=this.id,p=this.getViewEdits(y);return p[b+"._derived"]=y._derived,p};function w(y,b){var p={};if(x.isPlainObject(y))p.id=y.id,p.style=y;else if(typeof y=="string")if(p.id=y,g.styleValuesMapbox.indexOf(y)!==-1)p.style=S(y);else if(g.stylesNonMapbox[y]){p.style=g.stylesNonMapbox[y];var u=p.style.sources["plotly-"+y],m=u?u.tiles:void 0;m&&m[0]&&m[0].slice(-9)==="?api_key="&&(m[0]+=b._mapboxAccessToken)}else p.style=y;else p.id=g.styleValueDflt,p.style=S(g.styleValueDflt);return p.transition={duration:0,delay:0},p}function S(y){return g.styleUrlPrefix+y+"-"+g.styleUrlSuffix}function E(y){return[y.lon,y.lat]}q.exports=T}}),yV=Ze({"src/plots/mapbox/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=i0(),A=fp(),M=Mx();q.exports=function(o,a,i){x(o,a,i,{type:"mapbox",attributes:M,handleDefaults:e,partition:"y",accessToken:a._mapboxAccessToken})};function e(r,o,a,i){a("accesstoken",i.accessToken),a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var n=a("bounds.west"),s=a("bounds.east"),c=a("bounds.south"),f=a("bounds.north");(n===void 0||s===void 0||c===void 0||f===void 0)&&delete o.bounds,A(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(g,v){return d.coerce(r,o,M.layers,g,v)}var i=a("visible");if(i){var n=a("sourcetype"),s=n==="raster"||n==="image";a("source"),a("sourceattribution"),n==="vector"&&a("sourcelayer"),n==="image"&&a("coordinates");var c;s&&(c="raster");var f=a("type",c);s&&f!=="raster"&&(f=o.type="raster",d.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),f==="circle"&&a("circle.radius"),f==="line"&&(a("line.width"),a("line.dash")),f==="fill"&&a("fill.outlinecolor"),f==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),d.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),MT=Ze({"src/plots/mapbox/index.js"(Z){"use strict";var q=E6(),d=ca(),x=d.strTranslate,A=d.strScale,M=Hh().getSubplotCalcData,e=vd(),t=On(),r=as(),o=fu(),a=gV(),i="mapbox",n=Z.constants=am();Z.name=i,Z.attr="subplot",Z.idRoot=i,Z.idRegex=Z.attrRegex=d.counterRegex(i);var s=["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(" ");Z.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Z.layoutAttributes=Mx(),Z.supplyLayoutDefaults=yV();var c=!0;Z.plot=function(T){c&&(c=!1,d.warn(s));var l=T._fullLayout,_=T.calcdata,w=l._subplots[i];if(q.version!==n.requiredVersion)throw new Error(n.wrongVersionErrorMsg);var S=f(T,w);q.accessToken=S;for(var E=0;E<w.length;E++){var y=w[E],b=M(_,i,y),p=l[y],u=p._subplot;u||(u=new a(T,y),l[y]._subplot=u),u.viewInitial||(u.viewInitial={center:d.extendFlat({},p.center),zoom:p.zoom,bearing:p.bearing,pitch:p.pitch}),u.plot(b,l,T._promises)}},Z.clean=function(v,T,l,_){for(var w=_._subplots[i]||[],S=0;S<w.length;S++){var E=w[S];!T[E]&&_[E]._subplot&&_[E]._subplot.destroy()}},Z.toSVG=function(v){for(var T=v._fullLayout,l=T._subplots[i],_=T._size,w=0;w<l.length;w++){var S=T[l[w]],E=S.domain,y=S._subplot,b=y.toImage("png"),p=T._glimages.append("svg:image");p.attr({xmlns:e.svg,"xlink:href":b,x:_.l+_.w*E.x[0],y:_.t+_.h*(1-E.y[1]),width:_.w*(E.x[1]-E.x[0]),height:_.h*(E.y[1]-E.y[0]),preserveAspectRatio:"none"});var u=t.select(S._subplot.div),m=u.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!m){var h=T._glimages.append("g");h.attr("transform",x(_.l+_.w*E.x[0]+10,_.t+_.h*(1-E.y[0])-31)),h.append("path").attr("d",n.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),h.append("path").attr("d",n.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),h.append("path").attr("d",n.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),h.append("polygon").attr("points",n.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var P=u.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),L=T._glimages.append("g"),z=L.append("text");z.text(P).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":P});var F=r.bBox(z.node()),B=_.w*(E.x[1]-E.x[0]);if(F.width>B/2){var O=P.split("|").join("<br>");z.text(O).attr("data-unformatted",O).call(o.convertToTspans,v),F=r.bBox(z.node())}z.attr("transform",x(-3,-F.height+8)),L.insert("rect",".static-attribution").attr({x:-F.width-6,y:-F.height-3,width:F.width+6,height:F.height+3,fill:"rgba(255, 255, 255, 0.75)"});var I=1;F.width+6>B&&(I=B/(F.width+6));var N=[_.l+_.w*E.x[1],_.t+_.h*(1-E.y[0])];L.attr("transform",x(N[0],N[1])+A(I))}};function f(v,T){var l=v._fullLayout,_=v._context;if(_.mapboxAccessToken==="")return"";for(var w=[],S=[],E=!1,y=!1,b=0;b<T.length;b++){var p=l[T[b]],u=p.accesstoken;g(p.style)&&(u?d.pushUnique(w,u):(g(p._input.style)&&(d.error("Uses Mapbox map style, but did not set an access token."),E=!0),y=!0)),u&&d.pushUnique(S,u)}if(y){var m=E?n.noAccessTokenErrorMsg:n.missingStyleErrorMsg;throw d.error(m),new Error(m)}return w.length?(w.length>1&&d.warn(n.multipleTokensErrorMsg),w[0]):(S.length&&d.log(["Listed mapbox access token(s)",S.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function g(v){return typeof v=="string"&&(n.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0||v.indexOf("stamen")===0)}Z.updateFx=function(v){for(var T=v._fullLayout,l=T._subplots[i],_=0;_<l.length;_++){var w=T[l[_]]._subplot;w.updateFx(T)}}}}),_V=Ze({"src/traces/scattermapbox/index.js"(Z,q){"use strict";var d=["*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(" ");q.exports={attributes:AT(),supplyDefaults:fV(),colorbar:hp(),formatLabels:S6(),calc:iT(),plot:pV(),hoverPoints:ST().hoverPoints,eventData:dV(),selectPoints:vV(),styleOnSelect:function(x,A){if(A){var M=A[0].trace;M._glTrace.update(A)}},moduleType:"trace",name:"scattermapbox",basePlotModule:MT(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}}),xV=Ze({"lib/scattermapbox.js"(Z,q){"use strict";q.exports=_V()}}),C6=Ze({"src/traces/choroplethmapbox/attributes.js"(Z,q){"use strict";var d=C1(),x=Mu(),A=Cs().hovertemplateAttrs,M=eu(),e=rs().extendFlat;q.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},d.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d.text,hovertext:d.hovertext,marker:{line:{color:e({},d.marker.line.color,{editType:"plot"}),width:e({},d.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},d.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},d.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},d.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d.hoverinfo,hovertemplate:A({},{keys:["properties"]}),showlegend:e({},M.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),bV=Ze({"src/traces/choroplethmapbox/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=C6();q.exports=function(e,t,r,o){function a(f,g){return d.coerce(e,t,A,f,g)}var i=a("locations"),n=a("z"),s=a("geojson");if(!d.isArrayOrTypedArray(i)||!i.length||!d.isArrayOrTypedArray(n)||!n.length||!(typeof s=="string"&&s!==""||d.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(i.length,n.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var c=a("marker.line.width");c&&a("marker.line.color"),a("marker.opacity"),x(e,t,o,a,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(t,a)}}}),k6=Ze({"src/traces/choroplethmapbox/convert.js"(Z,q){"use strict";var d=ns(),x=ca(),A=rc(),M=as(),e=d0().makeBlank,t=v0();function r(a){var i=a[0].trace,n=i.visible===!0&&i._length!==0,s={layout:{visibility:"none"},paint:{}},c={layout:{visibility:"none"},paint:{}},f=i._opts={fill:s,line:c,geojson:e()};if(!n)return f;var g=t.extractTraceFeature(a);if(!g)return f;var v=A.makeColorScaleFuncFromTrace(i),T=i.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(m){var h=m.mo;return d(h)?+x.constrain(h,0,1):0});var w;x.isArrayOrTypedArray(l.color)&&(w=function(m){return m.mlc});var S;x.isArrayOrTypedArray(l.width)&&(S=function(m){return m.mlw});for(var E=0;E<a.length;E++){var y=a[E],b=y.fOut;if(b){var p=b.properties;p.fc=v(y.z),_&&(p.mo=_(y)),w&&(p.mlc=w(y)),S&&(p.mlw=S(y)),y.ct=p.ct,y._polygons=t.feature2polygons(b)}}var u=_?{type:"identity",property:"mo"}:T.opacity;return x.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),x.extendFlat(c.paint,{"line-color":w?{type:"identity",property:"mlc"}:l.color,"line-width":S?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",c.layout.visibility="visible",f.geojson={type:"FeatureCollection",features:g},o(a),f}function o(a){var i=a[0].trace,n=i._opts,s;if(i.selectedpoints){for(var c=M.makeSelectedPointStyleFns(i),f=0;f<a.length;f++){var g=a[f];g.fOut&&(g.fOut.properties.mo2=c.selectedOpacityFn(g))}s={type:"identity",property:"mo2"}}else s=x.isArrayOrTypedArray(i.marker.opacity)?{type:"identity",property:"mo"}:i.marker.opacity;return x.extendFlat(n.fill.paint,{"fill-opacity":s}),x.extendFlat(n.line.paint,{"line-opacity":s}),n}q.exports={convert:r,convertOnSelect:o}}}),wV=Ze({"src/traces/choroplethmapbox/plot.js"(Z,q){"use strict";var d=k6().convert,x=k6().convertOnSelect,A=am().traceLayerPrefix;function M(t,r){this.type="choroplethmapbox",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",A+r+"-fill"],["line",A+r+"-line"]],this.below=null}var e=M.prototype;e.update=function(t){this._update(d(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(x(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var i=0;i<o.length;i++){var n=o[i],s=n[0],c=n[1],f=t[s];r.setOptions(c,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&r.setOptions(c,"setPaintProperty",f.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,i=this.sourceId,n=0;n<a.length;n++){var s=a[n],c=s[0],f=t[c];o.addLayer({type:c,id:s[1],source:i,layout:f.layout,paint:f.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},q.exports=function(r,o){var a=o[0].trace,i=new M(r,a.uid),n=i.sourceId,s=d(o),c=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,c),o[0].trace._glTrace=i,i}}}),TV=Ze({"src/traces/choroplethmapbox/index.js"(Z,q){"use strict";var d=["*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(" ");q.exports={attributes:C6(),supplyDefaults:bV(),colorbar:a0(),calc:lT(),plot:wV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(x,A){if(A){var M=A[0].trace;M._glTrace.updateOnSelect(A)}},getBelow:function(x,A){for(var M=A.getMapLayers(),e=M.length-2;e>=0;e--){var t=M[e].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=e+1;r<M.length;r++)if(t=M[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:MT(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}}),AV=Ze({"lib/choroplethmapbox.js"(Z,q){"use strict";q.exports=TV()}}),L6=Ze({"src/traces/densitymapbox/attributes.js"(Z,q){"use strict";var d=Mu(),x=Cs().hovertemplateAttrs,A=eu(),M=AT(),e=rs().extendFlat;q.exports=e({lon:M.lon,lat:M.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:M.text,hovertext:M.hovertext,hoverinfo:e({},A.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:x(),showlegend:e({},A.showlegend,{dflt:!1})},d("",{cLetter:"z",editTypeOverride:"calc"}))}}),SV=Ze({"src/traces/densitymapbox/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=L6();q.exports=function(e,t,r,o){function a(c,f){return d.coerce(e,t,A,c,f)}var i=a("lon")||[],n=a("lat")||[],s=Math.min(i.length,n.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),x(e,t,o,a,{prefix:"",cLetter:"z"})}}}),MV=Ze({"src/traces/densitymapbox/calc.js"(Z,q){"use strict";var d=ns(),x=ca().isArrayOrTypedArray,A=qs().BADNUM,M=wp(),e=ca()._;q.exports=function(r,o){for(var a=o._length,i=new Array(a),n=o.z,s=x(n)&&n.length,c=0;c<a;c++){var f=i[c]={},g=o.lon[c],v=o.lat[c];if(f.lonlat=d(g)&&d(v)?[+g,+v]:[A,A],s){var T=n[c];f.z=d(T)?T:A}}return M(r,o,{vals:s?n:[0,1],containerStr:"",cLetter:"z"}),a&&(i[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),i}}}),EV=Ze({"src/traces/densitymapbox/convert.js"(Z,q){"use strict";var d=ns(),x=ca(),A=Yn(),M=rc(),e=qs().BADNUM,t=d0().makeBlank;q.exports=function(o){var a=o[0].trace,i=a.visible===!0&&a._length!==0,n={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:n,geojson:t()};if(!i)return s;var c=[],f,g=a.z,v=a.radius,T=x.isArrayOrTypedArray(g)&&g.length,l=x.isArrayOrTypedArray(v);for(f=0;f<o.length;f++){var _=o[f],w=_.lonlat;if(w[0]!==e){var S={};if(T){var E=_.z;S.z=E!==e?E:0}l&&(S.r=d(v[f])&&v[f]>0?+v[f]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:S})}}var y=M.extractOpts(a),b=y.reversescale?M.flipScale(y.colorscale):y.colorscale,p=b[0][1],u=A.opacity(p)<1?p:A.addOpacity(p,0),m=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f<b.length;f++)m.push(b[f][0],b[f][1]);var h=["interpolate",["linear"],["get","z"],y.min,0,y.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?h:1/(y.max-y.min),"heatmap-color":m,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:c},s.heatmap.layout.visibility="visible",s}}}),CV=Ze({"src/traces/densitymapbox/plot.js"(Z,q){"use strict";var d=EV(),x=am().traceLayerPrefix;function A(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",x+t+"-heatmap"]],this.below=null}var M=A.prototype;M.update=function(e){var t=this.subplot,r=this.layerList,o=d(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var i=0;i<r.length;i++){var n=r[i],s=n[0],c=n[1],f=o[s];t.setOptions(c,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&t.setOptions(c,"setPaintProperty",f.paint)}},M._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,i=0;i<o.length;i++){var n=o[i],s=n[0],c=e[s];r.addLayer({type:s,id:n[1],source:a,layout:c.layout,paint:c.paint},t)}},M._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},M.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},q.exports=function(t,r){var o=r[0].trace,a=new A(t,o.uid),i=a.sourceId,n=d(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),kV=Ze({"src/traces/densitymapbox/hover.js"(Z,q){"use strict";var d=Wo(),x=ST().hoverPoints,A=ST().getExtraText;q.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var c=a.subplot.mockAxis;a.z=s.z,a.zLabel=d.tickText(c,c.c2l(s.z),"hover").text}return a.extraText=A(n,s,i[0].t.labels),[a]}}}}),LV=Ze({"src/traces/densitymapbox/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return x.lon=A.lon,x.lat=A.lat,x.z=A.z,x}}}),PV=Ze({"src/traces/densitymapbox/index.js"(Z,q){"use strict";var d=["*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(" ");q.exports={attributes:L6(),supplyDefaults:SV(),colorbar:a0(),formatLabels:S6(),calc:MV(),plot:CV(),hoverPoints:kV(),eventData:LV(),getBelow:function(x,A){for(var M=A.getMapLayers(),e=0;e<M.length;e++){var t=M[e],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymapbox",basePlotModule:MT(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}}}),IV=Ze({"lib/densitymapbox.js"(Z,q){"use strict";q.exports=PV()}}),RV=Ze({"src/plots/map/styles/arcgis-sat-hybrid.js"(Z,q){q.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin}
{name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin}
{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),DV=Ze({"src/plots/map/styles/arcgis-sat.js"(Z,q){q.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),_0=Ze({"src/plots/map/constants.js"(Z,q){"use strict";var d=Km(),x=RV(),A=DV(),M='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',e="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",i="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",n={basic:r,streets:r,outdoors:r,light:e,dark:t,satellite:A,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:M,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":e,"carto-darkmatter":t,"carto-voyager":r,"carto-positron-nolabels":o,"carto-darkmatter-nolabels":a,"carto-voyager-nolabels":i},s=d(n);q.exports={styleValueDflt:"basic",stylesMap:n,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error."}}}),Ex=Ze({"src/plots/map/layout_attributes.js"(Z,q){"use strict";var d=ca(),x=Yn().defaultLine,A=bc().attributes,M=tc(),e=tf().textposition,t=pc().overrideAll,r=Dl().templatedArray,o=_0(),a=M({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});a.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var i=q.exports=t({_arrayAttrRegexps:[d.counterRegex("map",".layers",!0)],domain:A({name:"map"}),style:{valType:"any",values:o.styleValuesMap,dflt:o.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:r("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:x},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:x}},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:a,textposition:d.extendFlat({},e,{arrayOk:!1})}})},"plot","from-root");i.uirevision={valType:"any",editType:"none"}}}),ET=Ze({"src/traces/scattermap/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=$d(),M=dg(),e=tf(),t=Ex(),r=eu(),o=Mu(),a=rs().extendFlat,i=pc().overrideAll,n=Ex(),s=M.line,c=M.marker;q.exports=i({lon:M.lon,lat:M.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},n.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:a({},c.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:a({},e.hovertext,{}),line:{color:s.color,width:s.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:c.opacity,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode},o("marker")),fill:M.fill,fillcolor:A(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},r.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:d()},"calc","nested")}}),P6=Ze({"src/traces/scattermap/constants.js"(Z,q){"use strict";var d=["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"];q.exports={isSupportedFont:function(x){return d.indexOf(x)!==-1}}}}),zV=Ze({"src/traces/scattermap/defaults.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=md(),M=Dd(),e=zd(),t=ev(),r=ET(),o=P6().isSupportedFont;q.exports=function(n,s,c,f){function g(m,h){return d.coerce(n,s,r,m,h)}function v(m,h){return d.coerce2(n,s,r,m,h)}var T=a(n,s,g);if(!T){s.visible=!1;return}if(g("text"),g("texttemplate"),g("hovertext"),g("hovertemplate"),g("mode"),g("below"),x.hasMarkers(s)){A(n,s,c,f,g,{noLine:!0,noAngle:!0}),g("marker.allowoverlap"),g("marker.angle");var l=s.marker;l.symbol!=="circle"&&(d.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),d.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}x.hasLines(s)&&(M(n,s,c,f,g,{noDash:!0}),g("connectgaps"));var _=v("cluster.maxzoom"),w=v("cluster.step"),S=v("cluster.color",s.marker&&s.marker.color||c),E=v("cluster.size"),y=v("cluster.opacity"),b=_!==!1||w!==!1||S!==!1||E!==!1||y!==!1,p=g("cluster.enabled",b);if(p||x.hasText(s)){var u=f.font.family;e(n,s,f,g,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:o(u)?u:"Open Sans Regular",weight:f.font.weight,style:f.font.style,size:f.font.size,color:f.font.color}})}g("fill"),s.fill!=="none"&&t(n,s,c,g),d.coerceSelectionMarkerOpacity(s,g)};function a(i,n,s){var c=s("lon")||[],f=s("lat")||[],g=Math.min(c.length,f.length);return n._length=g,g}}}),I6=Ze({"src/traces/scattermap/format_labels.js"(Z,q){"use strict";var d=Wo();q.exports=function(A,M,e){var t={},r=e[M.subplot]._subplot,o=r.mockAxis,a=A.lonlat;return t.lonLabel=d.tickText(o,o.c2l(a[0]),!0).text,t.latLabel=d.tickText(o,o.c2l(a[1]),!0).text,t}}}),R6=Ze({"src/plots/map/convert_text_opts.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M){var e=A.split(" "),t=e[0],r=e[1],o=d.isArrayOrTypedArray(M)?d.mean(M):M,a=.5+o/100,i=1.5+o/100,n=["",""],s=[0,0];switch(t){case"top":n[0]="top",s[1]=-i;break;case"bottom":n[0]="bottom",s[1]=i;break}switch(r){case"left":n[1]="right",s[0]=-a;break;case"right":n[1]="left",s[0]=a;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:s}}}}),FV=Ze({"src/traces/scattermap/convert.js"(Z,q){"use strict";var d=ns(),x=ca(),A=qs().BADNUM,M=d0(),e=rc(),t=as(),r=r1(),o=Fu(),a=P6().isSupportedFont,i=R6(),n=Qp().appendArrayPointValue,s=fu().NEWLINES,c=fu().BR_TAG_ALL;q.exports=function(y,b){var p=b[0].trace,u=p.visible===!0&&p._length!==0,m=p.fill!=="none",h=o.hasLines(p),P=o.hasMarkers(p),L=o.hasText(p),z=P&&p.marker.symbol==="circle",F=P&&p.marker.symbol!=="circle",B=p.cluster&&p.cluster.enabled,O=f("fill"),I=f("line"),N=f("circle"),U=f("symbol"),W={fill:O,line:I,circle:N,symbol:U};if(!u)return W;var Q;if((m||h)&&(Q=M.calcTraceToLineCoords(b)),m&&(O.geojson=M.makePolygon(Q),O.layout.visibility="visible",x.extendFlat(O.paint,{"fill-color":p.fillcolor})),h&&(I.geojson=M.makeLine(Q),I.layout.visibility="visible",x.extendFlat(I.paint,{"line-width":p.line.width,"line-color":p.line.color,"line-opacity":p.opacity})),z){var ue=g(b);N.geojson=ue.geojson,N.layout.visibility="visible",B&&(N.filter=["!",["has","point_count"]],W.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":w(p.cluster.color,p.cluster.step),"circle-radius":w(p.cluster.size,p.cluster.step),"circle-opacity":w(p.cluster.opacity,p.cluster.step)}},W.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":S(p),"text-size":12}}),x.extendFlat(N.paint,{"circle-color":ue.mcc,"circle-radius":ue.mrc,"circle-opacity":ue.mo})}if(z&&B&&(N.filter=["!",["has","point_count"]]),(F||L)&&(U.geojson=v(b,y),x.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),F&&(x.extendFlat(U.layout,{"icon-size":p.marker.size/10}),"angle"in p.marker&&p.marker.angle!=="auto"&&x.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=p.marker.allowoverlap,x.extendFlat(U.paint,{"icon-opacity":p.opacity*p.marker.opacity,"icon-color":p.marker.color})),L)){var le=(p.marker||{}).size,he=i(p.textposition,le);x.extendFlat(U.layout,{"text-size":p.textfont.size,"text-anchor":he.anchor,"text-offset":he.offset,"text-font":S(p)}),x.extendFlat(U.paint,{"text-color":p.textfont.color,"text-opacity":p.opacity})}return W};function f(E){return{type:E,geojson:M.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(E){var y=E[0].trace,b=y.marker,p=y.selectedpoints,u=x.isArrayOrTypedArray(b.color),m=x.isArrayOrTypedArray(b.size),h=x.isArrayOrTypedArray(b.opacity),P;function L(le){return y.opacity*le}function z(le){return le/2}var F;u&&(e.hasColorscale(y,"marker")?F=e.makeColorScaleFuncFromTrace(b):F=x.identity);var B;m&&(B=r(y));var O;h&&(O=function(le){var he=d(le)?+x.constrain(le,0,1):0;return L(he)});var I=[];for(P=0;P<E.length;P++){var N=E[P],U=N.lonlat;if(!_(U)){var W={};F&&(W.mcc=N.mcc=F(N.mc)),B&&(W.mrc=N.mrc=B(N.ms)),O&&(W.mo=O(N.mo)),p&&(W.selected=N.selected||0),I.push({type:"Feature",id:P+1,geometry:{type:"Point",coordinates:U},properties:W})}}var Q;if(p)for(Q=t.makeSelectedPointStyleFns(y),P=0;P<I.length;P++){var ue=I[P].properties;Q.selectedOpacityFn&&(ue.mo=L(Q.selectedOpacityFn(ue))),Q.selectedColorFn&&(ue.mcc=Q.selectedColorFn(ue)),Q.selectedSizeFn&&(ue.mrc=Q.selectedSizeFn(ue))}return{geojson:{type:"FeatureCollection",features:I},mcc:u||Q&&Q.selectedColorFn?{type:"identity",property:"mcc"}:b.color,mrc:m||Q&&Q.selectedSizeFn?{type:"identity",property:"mrc"}:z(b.size),mo:h||Q&&Q.selectedOpacityFn?{type:"identity",property:"mo"}:L(b.opacity)}}function v(E,y){for(var b=y._fullLayout,p=E[0].trace,u=p.marker||{},m=u.symbol,h=u.angle,P=m!=="circle"?T(m):l,L=h!=="auto"?T(h,!0):l,z=o.hasText(p)?T(p.text):l,F=[],B=0;B<E.length;B++){var O=E[B];if(!_(O.lonlat)){var I=p.texttemplate,N;if(I){var U=Array.isArray(I)?I[B]||"":I,W=p._module.formatLabels(O,p,b),Q={};n(Q,p,O.i);var ue=p._meta||{};N=x.texttemplateString(U,W,b._d3locale,Q,O,ue)}else N=z(B);N&&(N=N.replace(s,"").replace(c,`
`)),F.push({type:"Feature",geometry:{type:"Point",coordinates:O.lonlat},properties:{symbol:P(B),angle:L(B),text:N}})}}return{type:"FeatureCollection",features:F}}function T(E,y){return x.isArrayOrTypedArray(E)?y?function(b){return d(E[b])?+E[b]:0}:function(b){return E[b]}:E?function(){return E}:l}function l(){return""}function _(E){return E[0]===A}function w(E,y){var b;if(x.isArrayOrTypedArray(E)&&x.isArrayOrTypedArray(y)){b=["step",["get","point_count"],E[0]];for(var p=1;p<E.length;p++)b.push(y[p-1],E[p])}else b=E;return b}function S(E){var y=E.textfont,b=y.family,p=y.style,u=y.weight,m=b.split(" "),h=m[m.length-1]==="Italic";h&&m.pop(),h=h||p==="italic";var P=m.join(" ");u==="bold"&&m.indexOf("Bold")===-1?P+=" Bold":u<=1e3&&(m[0]==="Metropolis"?(P="Metropolis",u>850?P+=" Black":u>750?P+=" Extra Bold":u>650?P+=" Bold":u>550?P+=" Semi Bold":u>450?P+=" Medium":u>350?P+=" Regular":u>250?P+=" Light":u>150?P+=" Extra Light":P+=" Thin"):m.slice(0,2).join(" ")==="Open Sans"?(P="Open Sans",u>750?P+=" Extrabold":u>650?P+=" Bold":u>550?P+=" Semibold":u>350?P+=" Regular":P+=" Light"):m.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(P="Klokantech Noto Sans",m[3]==="CJK"&&(P+=" CJK"),P+=u>500?" Bold":" Regular")),h&&(P+=" Italic"),P==="Open Sans Regular Italic"?P="Open Sans Italic":P==="Open Sans Regular Bold"?P="Open Sans Bold":P==="Open Sans Regular Bold Italic"?P="Open Sans Bold Italic":P==="Klokantech Noto Sans Regular Italic"&&(P="Klokantech Noto Sans Italic"),a(P)||(P=b);var L=P.split(", ");return L}}}),OV=Ze({"src/traces/scattermap/plot.js"(Z,q){"use strict";var d=ca(),x=FV(),A=_0().traceLayerPrefix,M={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function e(r,o,a,i){this.type="scattermap",this.subplot=r,this.uid=o,this.clusterEnabled=a,this.isHidden=i,this.sourceIds={fill:"source-"+o+"-fill",line:"source-"+o+"-line",circle:"source-"+o+"-circle",symbol:"source-"+o+"-symbol",cluster:"source-"+o+"-circle",clusterCount:"source-"+o+"-circle"},this.layerIds={fill:A+o+"-fill",line:A+o+"-line",circle:A+o+"-circle",symbol:A+o+"-symbol",cluster:A+o+"-cluster",clusterCount:A+o+"-cluster-count"},this.below=null}var t=e.prototype;t.addSource=function(r,o,a){var i={type:"geojson",data:o.geojson};a&&a.enabled&&d.extendFlat(i,{cluster:!0,clusterMaxZoom:a.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[r]);n?n.setData(o.geojson):this.subplot.map.addSource(this.sourceIds[r],i)},t.setSourceData=function(r,o){this.subplot.map.getSource(this.sourceIds[r]).setData(o.geojson)},t.addLayer=function(r,o,a){var i={type:o.type,id:this.layerIds[r],source:this.sourceIds[r],layout:o.layout,paint:o.paint};o.filter&&(i.filter=o.filter);for(var n=this.layerIds[r],s,c=this.subplot.getMapLayers(),f=0;f<c.length;f++)if(c[f].id===n){s=!0;break}s?(this.subplot.setOptions(n,"setLayoutProperty",i.layout),i.layout.visibility==="visible"&&this.subplot.setOptions(n,"setPaintProperty",i.paint)):this.subplot.addLayer(i,a)},t.update=function(o){var a=o[0].trace,i=this.subplot,n=i.map,s=x(i.gd,o),c=i.belowLookup["trace-"+this.uid],f=!!(a.cluster&&a.cluster.enabled),g=!!this.clusterEnabled,v=this;function T(u){u||v.addSource("circle",s.circle,a.cluster);for(var m=M.cluster,h=0;h<m.length;h++){var P=m[h],L=s[P];v.addLayer(P,L,c)}}function l(u){for(var m=M.cluster,h=m.length-1;h>=0;h--){var P=m[h];n.removeLayer(v.layerIds[P])}u||n.removeSource(v.sourceIds.circle)}function _(u){for(var m=M.nonCluster,h=0;h<m.length;h++){var P=m[h],L=s[P];u||v.addSource(P,L),v.addLayer(P,L,c)}}function w(u){for(var m=M.nonCluster,h=m.length-1;h>=0;h--){var P=m[h];n.removeLayer(v.layerIds[P]),u||n.removeSource(v.sourceIds[P])}}function S(u){g?l(u):w(u)}function E(u){f?T(u):_(u)}function y(){for(var u=f?M.cluster:M.nonCluster,m=0;m<u.length;m++){var h=u[m],P=s[h];P&&(i.setOptions(v.layerIds[h],"setLayoutProperty",P.layout),P.layout.visibility==="visible"&&(h!=="cluster"&&v.setSourceData(h,P),i.setOptions(v.layerIds[h],"setPaintProperty",P.paint)))}}var b=this.isHidden,p=a.visible!==!0;p?b||S():b?p||E():g!==f?(S(),E()):(this.below!==c&&(S(!0),E(!0)),y()),this.clusterEnabled=f,this.isHidden=p,this.below=c,o[0].trace._glTrace=this},t.dispose=function(){for(var o=this.subplot.map,a=this.clusterEnabled?M.cluster:M.nonCluster,i=a.length-1;i>=0;i--){var n=a[i];o.removeLayer(this.layerIds[n]),o.removeSource(this.sourceIds[n])}},q.exports=function(o,a){var i=a[0].trace,n=i.cluster&&i.cluster.enabled,s=i.visible!==!0,c=new e(o,i.uid,n,s),f=x(o.gd,a),g=c.below=o.belowLookup["trace-"+i.uid],v,T,l;if(n)for(c.addSource("circle",f.circle,i.cluster),v=0;v<M.cluster.length;v++)T=M.cluster[v],l=f[T],c.addLayer(T,l,g);else for(v=0;v<M.nonCluster.length;v++)T=M.nonCluster[v],l=f[T],c.addSource(T,l,i.cluster),c.addLayer(T,l,g);return a[0].trace._glTrace=c,c}}}),CT=Ze({"src/traces/scattermap/hover.js"(Z,q){"use strict";var d=ef(),x=ca(),A=l1(),M=x.fillText,e=qs().BADNUM,t=_0().traceLayerPrefix;function r(a,i,n){var s=a.cd,c=s[0].trace,f=a.xa,g=a.ya,v=a.subplot,T=[],l=t+c.uid+"-circle",_=c.cluster&&c.cluster.enabled;if(_){var w=v.map.queryRenderedFeatures(null,{layers:[l]});T=w.map(function(B){return B.id})}var S=i>=0?Math.floor((i+180)/360):Math.ceil((i-180)/360),E=S*360,y=i-E;function b(B){var O=B.lonlat;if(O[0]===e||_&&T.indexOf(B.i+1)===-1)return 1/0;var I=x.modHalf(O[0],360),N=O[1],U=v.project([I,N]),W=U.x-f.c2p([y,N]),Q=U.y-g.c2p([I,n]),ue=Math.max(3,B.mrc||0);return Math.max(Math.sqrt(W*W+Q*Q)-ue,1-3/ue)}if(d.getClosest(s,b,a),a.index!==!1){var p=s[a.index],u=p.lonlat,m=[x.modHalf(u[0],360)+E,u[1]],h=f.c2p(m),P=g.c2p(m),L=p.mrc||1;a.x0=h-L,a.x1=h+L,a.y0=P-L,a.y1=P+L;var z={};z[c.subplot]={_subplot:v};var F=c._module.formatLabels(p,c,z);return a.lonLabel=F.lonLabel,a.latLabel=F.latLabel,a.color=A(c,p),a.extraText=o(c,p,s[0].t.labels),a.hovertemplate=c.hovertemplate,[a]}}function o(a,i,n){if(a.hovertemplate)return;var s=i.hi||a.hoverinfo,c=s.split("+"),f=c.indexOf("all")!==-1,g=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,T=i.lonlat,l=[];function _(w){return w+"\xB0"}return f||g&&v?l.push("("+_(T[1])+", "+_(T[0])+")"):g?l.push(n.lon+_(T[0])):v&&l.push(n.lat+_(T[1])),(f||c.indexOf("text")!==-1)&&M(i,a,l),l.join("<br>")}q.exports={hoverPoints:r,getExtraText:o}}}),BV=Ze({"src/traces/scattermap/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return x.lon=A.lon,x.lat=A.lat,x}}}),NV=Ze({"src/traces/scattermap/select.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=qs().BADNUM;q.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,i=[],n=r[0].trace,s;if(!x.hasMarkers(n))return[];if(t===!1)for(s=0;s<r.length;s++)r[s].selected=0;else for(s=0;s<r.length;s++){var c=r[s],f=c.lonlat;if(f[0]!==A){var g=[d.modHalf(f[0],360),f[1]],v=[o.c2p(g),a.c2p(g)];t.contains(v,null,s,e)?(i.push({pointNumber:s,lon:f[0],lat:f[1]}),c.selected=1):c.selected=0}}return i}}}),UV=Ze({"node_modules/maplibre-gl/dist/maplibre-gl.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?q.exports=x():(d=typeof globalThis<"u"?globalThis:d||self,d.maplibregl=x())})(Z,function(){"use strict";var d={},x={};function A(e,t,r){if(x[e]=r,e==="index"){var o="var sharedModule = {}; ("+x.shared+")(sharedModule); ("+x.worker+")(sharedModule);",a={};return x.shared(a),x.index(d,a),typeof window<"u"&&d.setWorkerUrl(window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))),d}}A("shared",["exports"],function(e){"use strict";function t(H,D,K,pe){return new(K||(K=Promise))(function(ke,je){function We(Ut){try{Mt(pe.next(Ut))}catch(nr){je(nr)}}function ft(Ut){try{Mt(pe.throw(Ut))}catch(nr){je(nr)}}function Mt(Ut){var nr;Ut.done?ke(Ut.value):(nr=Ut.value,nr instanceof K?nr:new K(function(Mr){Mr(nr)})).then(We,ft)}Mt((pe=pe.apply(H,D||[])).next())})}function r(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}typeof SuppressedError=="function"&&SuppressedError;var o=a;function a(H,D){this.x=H,this.y=D}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(H){return this.clone()._add(H)},sub:function(H){return this.clone()._sub(H)},multByPoint:function(H){return this.clone()._multByPoint(H)},divByPoint:function(H){return this.clone()._divByPoint(H)},mult:function(H){return this.clone()._mult(H)},div:function(H){return this.clone()._div(H)},rotate:function(H){return this.clone()._rotate(H)},rotateAround:function(H,D){return this.clone()._rotateAround(H,D)},matMult:function(H){return this.clone()._matMult(H)},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(H){return this.x===H.x&&this.y===H.y},dist:function(H){return Math.sqrt(this.distSqr(H))},distSqr:function(H){var D=H.x-this.x,K=H.y-this.y;return D*D+K*K},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(H){return Math.atan2(this.y-H.y,this.x-H.x)},angleWith:function(H){return this.angleWithSep(H.x,H.y)},angleWithSep:function(H,D){return Math.atan2(this.x*D-this.y*H,this.x*H+this.y*D)},_matMult:function(H){var D=H[2]*this.x+H[3]*this.y;return this.x=H[0]*this.x+H[1]*this.y,this.y=D,this},_add:function(H){return this.x+=H.x,this.y+=H.y,this},_sub:function(H){return this.x-=H.x,this.y-=H.y,this},_mult:function(H){return this.x*=H,this.y*=H,this},_div:function(H){return this.x/=H,this.y/=H,this},_multByPoint:function(H){return this.x*=H.x,this.y*=H.y,this},_divByPoint:function(H){return this.x/=H.x,this.y/=H.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var H=this.y;return this.y=this.x,this.x=-H,this},_rotate:function(H){var D=Math.cos(H),K=Math.sin(H),pe=K*this.x+D*this.y;return this.x=D*this.x-K*this.y,this.y=pe,this},_rotateAround:function(H,D){var K=Math.cos(H),pe=Math.sin(H),ke=D.y+pe*(this.x-D.x)+K*(this.y-D.y);return this.x=D.x+K*(this.x-D.x)-pe*(this.y-D.y),this.y=ke,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(H){return H instanceof a?H:Array.isArray(H)?new a(H[0],H[1]):H};var i=r(o),n=s;function s(H,D,K,pe){this.cx=3*H,this.bx=3*(K-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(pe-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=D,this.p2x=K,this.p2y=pe}s.prototype={sampleCurveX:function(H){return((this.ax*H+this.bx)*H+this.cx)*H},sampleCurveY:function(H){return((this.ay*H+this.by)*H+this.cy)*H},sampleCurveDerivativeX:function(H){return(3*this.ax*H+2*this.bx)*H+this.cx},solveCurveX:function(H,D){if(D===void 0&&(D=1e-6),H<0)return 0;if(H>1)return 1;for(var K=H,pe=0;pe<8;pe++){var ke=this.sampleCurveX(K)-H;if(Math.abs(ke)<D)return K;var je=this.sampleCurveDerivativeX(K);if(Math.abs(je)<1e-6)break;K-=ke/je}var We=0,ft=1;for(K=H,pe=0;pe<20&&(ke=this.sampleCurveX(K),!(Math.abs(ke-H)<D));pe++)H>ke?We=K:ft=K,K=.5*(ft-We)+We;return K},solve:function(H,D){return this.sampleCurveY(this.solveCurveX(H,D))}};var c=r(n);let f,g;function v(){return f==null&&(f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),f}function T(){if(g==null&&(g=!1,v())){let D=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(D){for(let pe=0;pe<5*5;pe++){let ke=4*pe;D.fillStyle=`rgb(${ke},${ke+1},${ke+2})`,D.fillRect(pe%5,Math.floor(pe/5),1,1)}let K=D.getImageData(0,0,5,5).data;for(let pe=0;pe<5*5*4;pe++)if(pe%4!=3&&K[pe]!==pe){g=!0;break}}}return g||!1}function l(H,D,K,pe){let ke=new c(H,D,K,pe);return je=>ke.solve(je)}let _=l(.25,.1,.25,1);function w(H,D,K){return Math.min(K,Math.max(D,H))}function S(H,D,K){let pe=K-D,ke=((H-D)%pe+pe)%pe+D;return ke===D?K:ke}function E(H,...D){for(let K of D)for(let pe in K)H[pe]=K[pe];return H}let y=1;function b(H,D,K){let pe={};for(let ke in H)pe[ke]=D.call(this,H[ke],ke,H);return pe}function p(H,D,K){let pe={};for(let ke in H)D.call(this,H[ke],ke,H)&&(pe[ke]=H[ke]);return pe}function u(H){return Array.isArray(H)?H.map(u):typeof H=="object"&&H?b(H,u):H}let m={};function h(H){m[H]||(typeof console<"u"&&console.warn(H),m[H]=!0)}function P(H,D,K){return(K.y-H.y)*(D.x-H.x)>(D.y-H.y)*(K.x-H.x)}function L(H){return typeof WorkerGlobalScope<"u"&&H!==void 0&&H instanceof WorkerGlobalScope}let z=null;function F(H){return typeof ImageBitmap<"u"&&H instanceof ImageBitmap}let B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(H,D,K,pe,ke){return t(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let je=new VideoFrame(H,{timestamp:0});try{let We=je?.format;if(!We||!We.startsWith("BGR")&&!We.startsWith("RGB"))throw new Error(`Unrecognized format ${We}`);let ft=We.startsWith("BGR"),Mt=new Uint8ClampedArray(pe*ke*4);if(yield je.copyTo(Mt,function(Ut,nr,Mr,zr,Hr){let oa=4*Math.max(-nr,0),va=(Math.max(0,Mr)-Mr)*zr*4+oa,Ga=4*zr,Qa=Math.max(0,nr),Yi=Math.max(0,Mr);return{rect:{x:Qa,y:Yi,width:Math.min(Ut.width,nr+zr)-Qa,height:Math.min(Ut.height,Mr+Hr)-Yi},layout:[{offset:va,stride:Ga}]}}(H,D,K,pe,ke)),ft)for(let Ut=0;Ut<Mt.length;Ut+=4){let nr=Mt[Ut];Mt[Ut]=Mt[Ut+2],Mt[Ut+2]=nr}return Mt}finally{je.close()}})}let I,N,U="AbortError";function W(){return new Error(U)}let Q={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ue(H){return Q.REGISTERED_PROTOCOLS[H.substring(0,H.indexOf("://"))]}let le="global-dispatcher";class he extends Error{constructor(D,K,pe,ke){super(`AJAXError: ${K} (${D}): ${pe}`),this.status=D,this.statusText=K,this.url=pe,this.body=ke}}let G=()=>L(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,$=function(H,D){if(/:\/\//.test(H.url)&&!/^https?:|^file:/.test(H.url)){let pe=ue(H.url);if(pe)return pe(H,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,targetMapId:le},D)}if(!(/^file:/.test(K=H.url)||/^file:/.test(G())&&!/^\w+:/.test(K))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(pe,ke){return t(this,void 0,void 0,function*(){let je=new Request(pe.url,{method:pe.method||"GET",body:pe.body,credentials:pe.credentials,headers:pe.headers,cache:pe.cache,referrer:G(),signal:ke.signal});pe.type!=="json"||je.headers.has("Accept")||je.headers.set("Accept","application/json");let We=yield fetch(je);if(!We.ok){let Ut=yield We.blob();throw new he(We.status,We.statusText,pe.url,Ut)}let ft;ft=pe.type==="arrayBuffer"||pe.type==="image"?We.arrayBuffer():pe.type==="json"?We.json():We.text();let Mt=yield ft;if(ke.signal.aborted)throw W();return{data:Mt,cacheControl:We.headers.get("Cache-Control"),expires:We.headers.get("Expires")}})}(H,D);if(L(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:H,mustQueue:!0,targetMapId:le},D)}var K;return function(pe,ke){return new Promise((je,We)=>{var ft;let Mt=new XMLHttpRequest;Mt.open(pe.method||"GET",pe.url,!0),pe.type!=="arrayBuffer"&&pe.type!=="image"||(Mt.responseType="arraybuffer");for(let Ut in pe.headers)Mt.setRequestHeader(Ut,pe.headers[Ut]);pe.type==="json"&&(Mt.responseType="text",!((ft=pe.headers)===null||ft===void 0)&&ft.Accept||Mt.setRequestHeader("Accept","application/json")),Mt.withCredentials=pe.credentials==="include",Mt.onerror=()=>{We(new Error(Mt.statusText))},Mt.onload=()=>{if(!ke.signal.aborted)if((Mt.status>=200&&Mt.status<300||Mt.status===0)&&Mt.response!==null){let Ut=Mt.response;if(pe.type==="json")try{Ut=JSON.parse(Mt.response)}catch(nr){return void We(nr)}je({data:Ut,cacheControl:Mt.getResponseHeader("Cache-Control"),expires:Mt.getResponseHeader("Expires")})}else{let Ut=new Blob([Mt.response],{type:Mt.getResponseHeader("Content-Type")});We(new he(Mt.status,Mt.statusText,pe.url,Ut))}},ke.signal.addEventListener("abort",()=>{Mt.abort(),We(W())}),Mt.send(pe.body)})}(H,D)};function J(H){if(!H||H.indexOf("://")<=0||H.indexOf("data:image/")===0||H.indexOf("blob:")===0)return!0;let D=new URL(H),K=window.location;return D.protocol===K.protocol&&D.host===K.host}function X(H,D,K){K[H]&&K[H].indexOf(D)!==-1||(K[H]=K[H]||[],K[H].push(D))}function oe(H,D,K){if(K&&K[H]){let pe=K[H].indexOf(D);pe!==-1&&K[H].splice(pe,1)}}class ie{constructor(D,K={}){E(this,K),this.type=D}}class j extends ie{constructor(D,K={}){super("error",E({error:D},K))}}class ee{on(D,K){return this._listeners=this._listeners||{},X(D,K,this._listeners),this}off(D,K){return oe(D,K,this._listeners),oe(D,K,this._oneTimeListeners),this}once(D,K){return K?(this._oneTimeListeners=this._oneTimeListeners||{},X(D,K,this._oneTimeListeners),this):new Promise(pe=>this.once(D,pe))}fire(D,K){typeof D=="string"&&(D=new ie(D,K||{}));let pe=D.type;if(this.listens(pe)){D.target=this;let ke=this._listeners&&this._listeners[pe]?this._listeners[pe].slice():[];for(let ft of ke)ft.call(this,D);let je=this._oneTimeListeners&&this._oneTimeListeners[pe]?this._oneTimeListeners[pe].slice():[];for(let ft of je)oe(pe,ft,this._oneTimeListeners),ft.call(this,D);let We=this._eventedParent;We&&(E(D,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),We.fire(D))}else D instanceof j&&console.error(D.error);return this}listens(D){return this._listeners&&this._listeners[D]&&this._listeners[D].length>0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)}setEventedParent(D,K){return this._eventedParent=D,this._eventedParentData=K,this}}var re={$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 ce=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function be(H,D){let K={};for(let pe in H)pe!=="ref"&&(K[pe]=H[pe]);return ce.forEach(pe=>{pe in D&&(K[pe]=D[pe])}),K}function Ae(H,D){if(Array.isArray(H)){if(!Array.isArray(D)||H.length!==D.length)return!1;for(let K=0;K<H.length;K++)if(!Ae(H[K],D[K]))return!1;return!0}if(typeof H=="object"&&H!==null&&D!==null){if(typeof D!="object"||Object.keys(H).length!==Object.keys(D).length)return!1;for(let K in H)if(!Ae(H[K],D[K]))return!1;return!0}return H===D}function ze(H,D){H.push(D)}function Re(H,D,K){ze(K,{command:"addSource",args:[H,D[H]]})}function Xe(H,D,K){ze(D,{command:"removeSource",args:[H]}),K[H]=!0}function it(H,D,K,pe){Xe(H,K,pe),Re(H,D,K)}function ot(H,D,K){let pe;for(pe in H[K])if(Object.prototype.hasOwnProperty.call(H[K],pe)&&pe!=="data"&&!Ae(H[K][pe],D[K][pe]))return!1;for(pe in D[K])if(Object.prototype.hasOwnProperty.call(D[K],pe)&&pe!=="data"&&!Ae(H[K][pe],D[K][pe]))return!1;return!0}function tt(H,D,K,pe,ke,je){H=H||{},D=D||{};for(let We in H)Object.prototype.hasOwnProperty.call(H,We)&&(Ae(H[We],D[We])||K.push({command:je,args:[pe,We,D[We],ke]}));for(let We in D)Object.prototype.hasOwnProperty.call(D,We)&&!Object.prototype.hasOwnProperty.call(H,We)&&(Ae(H[We],D[We])||K.push({command:je,args:[pe,We,D[We],ke]}))}function lt(H){return H.id}function Ee(H,D){return H[D.id]=D,H}class _e{constructor(D,K,pe,ke){this.message=(D?`${D}: `:"")+pe,ke&&(this.identifier=ke),K!=null&&K.__line__&&(this.line=K.__line__)}}function fe(H,...D){for(let K of D)for(let pe in K)H[pe]=K[pe];return H}class Fe extends Error{constructor(D,K){super(K),this.message=K,this.key=D}}class rt{constructor(D,K=[]){this.parent=D,this.bindings={};for(let[pe,ke]of K)this.bindings[pe]=ke}concat(D){return new rt(this,D)}get(D){if(this.bindings[D])return this.bindings[D];if(this.parent)return this.parent.get(D);throw new Error(`${D} not found in scope.`)}has(D){return!!this.bindings[D]||!!this.parent&&this.parent.has(D)}}let st={kind:"null"},Qe={kind:"number"},Lt={kind:"string"},kt={kind:"boolean"},Vt={kind:"color"},Zt={kind:"object"},Sr={kind:"value"},xr={kind:"collator"},jr={kind:"formatted"},wr={kind:"padding"},Ir={kind:"resolvedImage"},bt={kind:"variableAnchorOffsetCollection"};function Be(H,D){return{kind:"array",itemType:H,N:D}}function Ke(H){if(H.kind==="array"){let D=Ke(H.itemType);return typeof H.N=="number"?`array<${D}, ${H.N}>`:H.itemType.kind==="value"?"array":`array<${D}>`}return H.kind}let Ue=[st,Qe,Lt,kt,Vt,jr,Zt,Be(Sr),wr,Ir,bt];function Me(H,D){if(D.kind==="error")return null;if(H.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!Me(H.itemType,D.itemType))&&(typeof H.N!="number"||H.N===D.N))return null}else{if(H.kind===D.kind)return null;if(H.kind==="value"){for(let K of Ue)if(!Me(K,D))return null}}return`Expected ${Ke(H)} but found ${Ke(D)} instead.`}function qe(H,D){return D.some(K=>K.kind===H.kind)}function Ce(H,D){return D.some(K=>K==="null"?H===null:K==="array"?Array.isArray(H):K==="object"?H&&!Array.isArray(H)&&typeof H=="object":K===typeof H)}function Te(H,D){return H.kind==="array"&&D.kind==="array"?H.itemType.kind===D.itemType.kind&&typeof H.N=="number":H.kind===D.kind}let Pe=.96422,at=.82521,yt=4/29,Tt=6/29,Ot=3*Tt*Tt,Gt=Tt*Tt*Tt,rr=Math.PI/180,Qt=180/Math.PI;function Tr(H){return(H%=360)<0&&(H+=360),H}function la([H,D,K,pe]){let ke,je,We=Ba((.2225045*(H=Ua(H))+.7168786*(D=Ua(D))+.0606169*(K=Ua(K)))/1);H===D&&D===K?ke=je=We:(ke=Ba((.4360747*H+.3850649*D+.1430804*K)/Pe),je=Ba((.0139322*H+.0971045*D+.7141733*K)/at));let ft=116*We-16;return[ft<0?0:ft,500*(ke-We),200*(We-je),pe]}function Ua(H){return H<=.04045?H/12.92:Math.pow((H+.055)/1.055,2.4)}function Ba(H){return H>Gt?Math.pow(H,1/3):H/Ot+yt}function Ra([H,D,K,pe]){let ke=(H+16)/116,je=isNaN(D)?ke:ke+D/500,We=isNaN(K)?ke:ke-K/200;return ke=1*za(ke),je=Pe*za(je),We=at*za(We),[ei(3.1338561*je-1.6168667*ke-.4906146*We),ei(-.9787684*je+1.9161415*ke+.033454*We),ei(.0719453*je-.2289914*ke+1.4052427*We),pe]}function ei(H){return(H=H<=.00304?12.92*H:1.055*Math.pow(H,1/2.4)-.055)<0?0:H>1?1:H}function za(H){return H>Tt?H*H*H:Ot*(H-yt)}function ti(H){return parseInt(H.padEnd(2,H),16)/255}function Ci(H,D){return Jt(D?H/100:H,0,1)}function Jt(H,D,K){return Math.min(Math.max(D,H),K)}function Nt(H){return!H.some(Number.isNaN)}let Kt={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 Wt{constructor(D,K,pe,ke=1,je=!0){this.r=D,this.g=K,this.b=pe,this.a=ke,je||(this.r*=ke,this.g*=ke,this.b*=ke,ke||this.overwriteGetter("rgb",[D,K,pe,ke]))}static parse(D){if(D instanceof Wt)return D;if(typeof D!="string")return;let K=function(pe){if((pe=pe.toLowerCase().trim())==="transparent")return[0,0,0,0];let ke=Kt[pe];if(ke){let[We,ft,Mt]=ke;return[We/255,ft/255,Mt/255,1]}if(pe.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(pe)){let We=pe.length<6?1:2,ft=1;return[ti(pe.slice(ft,ft+=We)),ti(pe.slice(ft,ft+=We)),ti(pe.slice(ft,ft+=We)),ti(pe.slice(ft,ft+We)||"ff")]}if(pe.startsWith("rgb")){let We=pe.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(We){let[ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa,Yi]=We,xi=[nr||" ",Hr||" ",Ga].join("");if(xi===" "||xi===" /"||xi===",,"||xi===",,,"){let Hi=[Ut,zr,va].join(""),rn=Hi==="%%%"?100:Hi===""?255:0;if(rn){let jn=[Jt(+Mt/rn,0,1),Jt(+Mr/rn,0,1),Jt(+oa/rn,0,1),Qa?Ci(+Qa,Yi):1];if(Nt(jn))return jn}}return}}let je=pe.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(je){let[We,ft,Mt,Ut,nr,Mr,zr,Hr,oa]=je,va=[Mt||" ",nr||" ",zr].join("");if(va===" "||va===" /"||va===",,"||va===",,,"){let Ga=[+ft,Jt(+Ut,0,100),Jt(+Mr,0,100),Hr?Ci(+Hr,oa):1];if(Nt(Ga))return function([Qa,Yi,xi,Hi]){function rn(jn){let ko=(jn+Qa/30)%12,vs=Yi*Math.min(xi,1-xi);return xi-vs*Math.max(-1,Math.min(ko-3,9-ko,1))}return Qa=Tr(Qa),Yi/=100,xi/=100,[rn(0),rn(8),rn(4),Hi]}(Ga)}}}(D);return K?new Wt(...K,!1):void 0}get rgb(){let{r:D,g:K,b:pe,a:ke}=this,je=ke||1/0;return this.overwriteGetter("rgb",[D/je,K/je,pe/je,ke])}get hcl(){return this.overwriteGetter("hcl",function(D){let[K,pe,ke,je]=la(D),We=Math.sqrt(pe*pe+ke*ke);return[Math.round(1e4*We)?Tr(Math.atan2(ke,pe)*Qt):NaN,We,K,je]}(this.rgb))}get lab(){return this.overwriteGetter("lab",la(this.rgb))}overwriteGetter(D,K){return Object.defineProperty(this,D,{value:K}),K}toString(){let[D,K,pe,ke]=this.rgb;return`rgba(${[D,K,pe].map(je=>Math.round(255*je)).join(",")},${ke})`}}Wt.black=new Wt(0,0,0,1),Wt.white=new Wt(1,1,1,1),Wt.transparent=new Wt(0,0,0,0),Wt.red=new Wt(1,0,0,1);class Pr{constructor(D,K,pe){this.sensitivity=D?K?"variant":"case":K?"accent":"base",this.locale=pe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(D,K){return this.collator.compare(D,K)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ta{constructor(D,K,pe,ke,je){this.text=D,this.image=K,this.scale=pe,this.fontStack=ke,this.textColor=je}}class ma{constructor(D){this.sections=D}static fromString(D){return new ma([new ta(D,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(D=>D.text.length!==0||D.image&&D.image.name.length!==0)}static factory(D){return D instanceof ma?D:ma.fromString(D)}toString(){return this.sections.length===0?"":this.sections.map(D=>D.text).join("")}}class ra{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof ra)return D;if(typeof D=="number")return new ra([D,D,D,D]);if(Array.isArray(D)&&!(D.length<1||D.length>4)){for(let K of D)if(typeof K!="number")return;switch(D.length){case 1:D=[D[0],D[0],D[0],D[0]];break;case 2:D=[D[0],D[1],D[0],D[1]];break;case 3:D=[D[0],D[1],D[2],D[1]]}return new ra(D)}}toString(){return JSON.stringify(this.values)}}let Ia=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Ha{constructor(D){this.values=D.slice()}static parse(D){if(D instanceof Ha)return D;if(Array.isArray(D)&&!(D.length<1)&&D.length%2==0){for(let K=0;K<D.length;K+=2){let pe=D[K],ke=D[K+1];if(typeof pe!="string"||!Ia.has(pe)||!Array.isArray(ke)||ke.length!==2||typeof ke[0]!="number"||typeof ke[1]!="number")return}return new Ha(D)}}toString(){return JSON.stringify(this.values)}}class $a{constructor(D){this.name=D.name,this.available=D.available}toString(){return this.name}static fromString(D){return D?new $a({name:D,available:!1}):null}}function ai(H,D,K,pe){return typeof H=="number"&&H>=0&&H<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof K=="number"&&K>=0&&K<=255?pe===void 0||typeof pe=="number"&&pe>=0&&pe<=1?null:`Invalid rgba value [${[H,D,K,pe].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof pe=="number"?[H,D,K,pe]:[H,D,K]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function mi(H){if(H===null||typeof H=="string"||typeof H=="boolean"||typeof H=="number"||H instanceof Wt||H instanceof Pr||H instanceof ma||H instanceof ra||H instanceof Ha||H instanceof $a)return!0;if(Array.isArray(H)){for(let D of H)if(!mi(D))return!1;return!0}if(typeof H=="object"){for(let D in H)if(!mi(H[D]))return!1;return!0}return!1}function xt(H){if(H===null)return st;if(typeof H=="string")return Lt;if(typeof H=="boolean")return kt;if(typeof H=="number")return Qe;if(H instanceof Wt)return Vt;if(H instanceof Pr)return xr;if(H instanceof ma)return jr;if(H instanceof ra)return wr;if(H instanceof Ha)return bt;if(H instanceof $a)return Ir;if(Array.isArray(H)){let D=H.length,K;for(let pe of H){let ke=xt(pe);if(K){if(K===ke)continue;K=Sr;break}K=ke}return Be(K||Sr,D)}return Zt}function ct(H){let D=typeof H;return H===null?"":D==="string"||D==="number"||D==="boolean"?String(H):H instanceof Wt||H instanceof ma||H instanceof ra||H instanceof Ha||H instanceof $a?H.toString():JSON.stringify(H)}class Nr{constructor(D,K){this.type=D,this.value=K}static parse(D,K){if(D.length!==2)return K.error(`'literal' expression requires exactly one argument, but found ${D.length-1} instead.`);if(!mi(D[1]))return K.error("invalid value");let pe=D[1],ke=xt(pe),je=K.expectedType;return ke.kind!=="array"||ke.N!==0||!je||je.kind!=="array"||typeof je.N=="number"&&je.N!==0||(ke=je),new Nr(ke,pe)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Or{constructor(D){this.name="ExpressionEvaluationError",this.message=D}toJSON(){return this.message}}let Rr={string:Lt,number:Qe,boolean:kt,object:Zt};class Lr{constructor(D,K){this.type=D,this.args=K}static parse(D,K){if(D.length<2)return K.error("Expected at least one argument.");let pe,ke=1,je=D[0];if(je==="array"){let ft,Mt;if(D.length>2){let Ut=D[1];if(typeof Ut!="string"||!(Ut in Rr)||Ut==="object")return K.error('The item type argument of "array" must be one of string, number, boolean',1);ft=Rr[Ut],ke++}else ft=Sr;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return K.error('The length argument to "array" must be a positive integer literal',2);Mt=D[2],ke++}pe=Be(ft,Mt)}else{if(!Rr[je])throw new Error(`Types doesn't contain name = ${je}`);pe=Rr[je]}let We=[];for(;ke<D.length;ke++){let ft=K.parse(D[ke],ke,Sr);if(!ft)return null;We.push(ft)}return new Lr(pe,We)}evaluate(D){for(let K=0;K<this.args.length;K++){let pe=this.args[K].evaluate(D);if(!Me(this.type,xt(pe)))return pe;if(K===this.args.length-1)throw new Or(`Expected value to be of type ${Ke(this.type)}, but found ${Ke(xt(pe))} instead.`)}throw new Error}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Gr={"to-boolean":kt,"to-color":Vt,"to-number":Qe,"to-string":Lt};class Kr{constructor(D,K){this.type=D,this.args=K}static parse(D,K){if(D.length<2)return K.error("Expected at least one argument.");let pe=D[0];if(!Gr[pe])throw new Error(`Can't parse ${pe} as it is not part of the known types`);if((pe==="to-boolean"||pe==="to-string")&&D.length!==2)return K.error("Expected one argument.");let ke=Gr[pe],je=[];for(let We=1;We<D.length;We++){let ft=K.parse(D[We],We,Sr);if(!ft)return null;je.push(ft)}return new Kr(ke,je)}evaluate(D){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(D);case"color":{let K,pe;for(let ke of this.args){if(K=ke.evaluate(D),pe=null,K instanceof Wt)return K;if(typeof K=="string"){let je=D.parseColor(K);if(je)return je}else if(Array.isArray(K)&&(pe=K.length<3||K.length>4?`Invalid rbga value ${JSON.stringify(K)}: expected an array containing either three or four numeric values.`:ai(K[0],K[1],K[2],K[3]),!pe))return new Wt(K[0]/255,K[1]/255,K[2]/255,K[3])}throw new Or(pe||`Could not parse color from value '${typeof K=="string"?K:JSON.stringify(K)}'`)}case"padding":{let K;for(let pe of this.args){K=pe.evaluate(D);let ke=ra.parse(K);if(ke)return ke}throw new Or(`Could not parse padding from value '${typeof K=="string"?K:JSON.stringify(K)}'`)}case"variableAnchorOffsetCollection":{let K;for(let pe of this.args){K=pe.evaluate(D);let ke=Ha.parse(K);if(ke)return ke}throw new Or(`Could not parse variableAnchorOffsetCollection from value '${typeof K=="string"?K:JSON.stringify(K)}'`)}case"number":{let K=null;for(let pe of this.args){if(K=pe.evaluate(D),K===null)return 0;let ke=Number(K);if(!isNaN(ke))return ke}throw new Or(`Could not convert ${JSON.stringify(K)} to number.`)}case"formatted":return ma.fromString(ct(this.args[0].evaluate(D)));case"resolvedImage":return $a.fromString(ct(this.args[0].evaluate(D)));default:return ct(this.args[0].evaluate(D))}}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}let Ur=["Unknown","Point","LineString","Polygon"];class aa{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"?Ur[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(D){let K=this._parseColorCache[D];return K||(K=this._parseColorCache[D]=Wt.parse(D)),K}}class da{constructor(D,K,pe=[],ke,je=new rt,We=[]){this.registry=D,this.path=pe,this.key=pe.map(ft=>`[${ft}]`).join(""),this.scope=je,this.errors=We,this.expectedType=ke,this._isConstant=K}parse(D,K,pe,ke,je={}){return K?this.concat(K,pe,ke)._parse(D,je):this._parse(D,je)}_parse(D,K){function pe(ke,je,We){return We==="assert"?new Lr(je,[ke]):We==="coerce"?new Kr(je,[ke]):ke}if(D!==null&&typeof D!="string"&&typeof D!="boolean"&&typeof D!="number"||(D=["literal",D]),Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let ke=D[0];if(typeof ke!="string")return this.error(`Expression name must be a string, but found ${typeof ke} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let je=this.registry[ke];if(je){let We=je.parse(D,this);if(!We)return null;if(this.expectedType){let ft=this.expectedType,Mt=We.type;if(ft.kind!=="string"&&ft.kind!=="number"&&ft.kind!=="boolean"&&ft.kind!=="object"&&ft.kind!=="array"||Mt.kind!=="value")if(ft.kind!=="color"&&ft.kind!=="formatted"&&ft.kind!=="resolvedImage"||Mt.kind!=="value"&&Mt.kind!=="string")if(ft.kind!=="padding"||Mt.kind!=="value"&&Mt.kind!=="number"&&Mt.kind!=="array")if(ft.kind!=="variableAnchorOffsetCollection"||Mt.kind!=="value"&&Mt.kind!=="array"){if(this.checkSubtype(ft,Mt))return null}else We=pe(We,ft,K.typeAnnotation||"coerce");else We=pe(We,ft,K.typeAnnotation||"coerce");else We=pe(We,ft,K.typeAnnotation||"coerce");else We=pe(We,ft,K.typeAnnotation||"assert")}if(!(We instanceof Nr)&&We.type.kind!=="resolvedImage"&&this._isConstant(We)){let ft=new aa;try{We=new Nr(We.type,We.evaluate(ft))}catch(Mt){return this.error(Mt.message),null}}return We}return this.error(`Unknown expression "${ke}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(D===void 0?"'undefined' value invalid. Use null instead.":typeof D=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof D} instead.`)}concat(D,K,pe){let ke=typeof D=="number"?this.path.concat(D):this.path,je=pe?this.scope.concat(pe):this.scope;return new da(this.registry,this._isConstant,ke,K||null,je,this.errors)}error(D,...K){let pe=`${this.key}${K.map(ke=>`[${ke}]`).join("")}`;this.errors.push(new Fe(pe,D))}checkSubtype(D,K){let pe=Me(D,K);return pe&&this.error(pe),pe}}class fa{constructor(D,K){this.type=K.type,this.bindings=[].concat(D),this.result=K}evaluate(D){return this.result.evaluate(D)}eachChild(D){for(let K of this.bindings)D(K[1]);D(this.result)}static parse(D,K){if(D.length<4)return K.error(`Expected at least 3 arguments, but found ${D.length-1} instead.`);let pe=[];for(let je=1;je<D.length-1;je+=2){let We=D[je];if(typeof We!="string")return K.error(`Expected string, but found ${typeof We} instead.`,je);if(/[^a-zA-Z0-9_]/.test(We))return K.error("Variable names must contain only alphanumeric characters or '_'.",je);let ft=K.parse(D[je+1],je+1);if(!ft)return null;pe.push([We,ft])}let ke=K.parse(D[D.length-1],D.length-1,K.expectedType,pe);return ke?new fa(pe,ke):null}outputDefined(){return this.result.outputDefined()}}class It{constructor(D,K){this.type=K.type,this.name=D,this.boundExpression=K}static parse(D,K){if(D.length!==2||typeof D[1]!="string")return K.error("'var' expression requires exactly one string literal argument.");let pe=D[1];return K.scope.has(pe)?new It(pe,K.scope.get(pe)):K.error(`Unknown variable "${pe}". Make sure "${pe}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(D){return this.boundExpression.evaluate(D)}eachChild(){}outputDefined(){return!1}}class dr{constructor(D,K,pe){this.type=D,this.index=K,this.input=pe}static parse(D,K){if(D.length!==3)return K.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let pe=K.parse(D[1],1,Qe),ke=K.parse(D[2],2,Be(K.expectedType||Sr));return pe&&ke?new dr(ke.type.itemType,pe,ke):null}evaluate(D){let K=this.index.evaluate(D),pe=this.input.evaluate(D);if(K<0)throw new Or(`Array index out of bounds: ${K} < 0.`);if(K>=pe.length)throw new Or(`Array index out of bounds: ${K} > ${pe.length-1}.`);if(K!==Math.floor(K))throw new Or(`Array index must be an integer, but found ${K} instead.`);return pe[K]}eachChild(D){D(this.index),D(this.input)}outputDefined(){return!1}}class kr{constructor(D,K){this.type=kt,this.needle=D,this.haystack=K}static parse(D,K){if(D.length!==3)return K.error(`Expected 2 arguments, but found ${D.length-1} instead.`);let pe=K.parse(D[1],1,Sr),ke=K.parse(D[2],2,Sr);return pe&&ke?qe(pe.type,[kt,Lt,Qe,st,Sr])?new kr(pe,ke):K.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(pe.type)} instead`):null}evaluate(D){let K=this.needle.evaluate(D),pe=this.haystack.evaluate(D);if(!pe)return!1;if(!Ce(K,["boolean","string","number","null"]))throw new Or(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(xt(K))} instead.`);if(!Ce(pe,["string","array"]))throw new Or(`Expected second argument to be of type array or string, but found ${Ke(xt(pe))} instead.`);return pe.indexOf(K)>=0}eachChild(D){D(this.needle),D(this.haystack)}outputDefined(){return!0}}class ia{constructor(D,K,pe){this.type=Qe,this.needle=D,this.haystack=K,this.fromIndex=pe}static parse(D,K){if(D.length<=2||D.length>=5)return K.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let pe=K.parse(D[1],1,Sr),ke=K.parse(D[2],2,Sr);if(!pe||!ke)return null;if(!qe(pe.type,[kt,Lt,Qe,st,Sr]))return K.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(pe.type)} instead`);if(D.length===4){let je=K.parse(D[3],3,Qe);return je?new ia(pe,ke,je):null}return new ia(pe,ke)}evaluate(D){let K=this.needle.evaluate(D),pe=this.haystack.evaluate(D);if(!Ce(K,["boolean","string","number","null"]))throw new Or(`Expected first argument to be of type boolean, string, number or null, but found ${Ke(xt(K))} instead.`);let ke;if(this.fromIndex&&(ke=this.fromIndex.evaluate(D)),Ce(pe,["string"])){let je=pe.indexOf(K,ke);return je===-1?-1:[...pe.slice(0,je)].length}if(Ce(pe,["array"]))return pe.indexOf(K,ke);throw new Or(`Expected second argument to be of type array or string, but found ${Ke(xt(pe))} instead.`)}eachChild(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)}outputDefined(){return!1}}class Ca{constructor(D,K,pe,ke,je,We){this.inputType=D,this.type=K,this.input=pe,this.cases=ke,this.outputs=je,this.otherwise=We}static parse(D,K){if(D.length<5)return K.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if(D.length%2!=1)return K.error("Expected an even number of arguments.");let pe,ke;K.expectedType&&K.expectedType.kind!=="value"&&(ke=K.expectedType);let je={},We=[];for(let Ut=2;Ut<D.length-1;Ut+=2){let nr=D[Ut],Mr=D[Ut+1];Array.isArray(nr)||(nr=[nr]);let zr=K.concat(Ut);if(nr.length===0)return zr.error("Expected at least one branch label.");for(let oa of nr){if(typeof oa!="number"&&typeof oa!="string")return zr.error("Branch labels must be numbers or strings.");if(typeof oa=="number"&&Math.abs(oa)>Number.MAX_SAFE_INTEGER)return zr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof oa=="number"&&Math.floor(oa)!==oa)return zr.error("Numeric branch labels must be integer values.");if(pe){if(zr.checkSubtype(pe,xt(oa)))return null}else pe=xt(oa);if(je[String(oa)]!==void 0)return zr.error("Branch labels must be unique.");je[String(oa)]=We.length}let Hr=K.parse(Mr,Ut,ke);if(!Hr)return null;ke=ke||Hr.type,We.push(Hr)}let ft=K.parse(D[1],1,Sr);if(!ft)return null;let Mt=K.parse(D[D.length-1],D.length-1,ke);return Mt?ft.type.kind!=="value"&&K.concat(1).checkSubtype(pe,ft.type)?null:new Ca(pe,ke,ft,je,We,Mt):null}evaluate(D){let K=this.input.evaluate(D);return(xt(K)===this.inputType&&this.outputs[this.cases[K]]||this.otherwise).evaluate(D)}eachChild(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)}outputDefined(){return this.outputs.every(D=>D.outputDefined())&&this.otherwise.outputDefined()}}class Fa{constructor(D,K,pe){this.type=D,this.branches=K,this.otherwise=pe}static parse(D,K){if(D.length<4)return K.error(`Expected at least 3 arguments, but found only ${D.length-1}.`);if(D.length%2!=0)return K.error("Expected an odd number of arguments.");let pe;K.expectedType&&K.expectedType.kind!=="value"&&(pe=K.expectedType);let ke=[];for(let We=1;We<D.length-1;We+=2){let ft=K.parse(D[We],We,kt);if(!ft)return null;let Mt=K.parse(D[We+1],We+1,pe);if(!Mt)return null;ke.push([ft,Mt]),pe=pe||Mt.type}let je=K.parse(D[D.length-1],D.length-1,pe);if(!je)return null;if(!pe)throw new Error("Can't infer output type");return new Fa(pe,ke,je)}evaluate(D){for(let[K,pe]of this.branches)if(K.evaluate(D))return pe.evaluate(D);return this.otherwise.evaluate(D)}eachChild(D){for(let[K,pe]of this.branches)D(K),D(pe);D(this.otherwise)}outputDefined(){return this.branches.every(([D,K])=>K.outputDefined())&&this.otherwise.outputDefined()}}class Ya{constructor(D,K,pe,ke){this.type=D,this.input=K,this.beginIndex=pe,this.endIndex=ke}static parse(D,K){if(D.length<=2||D.length>=5)return K.error(`Expected 3 or 4 arguments, but found ${D.length-1} instead.`);let pe=K.parse(D[1],1,Sr),ke=K.parse(D[2],2,Qe);if(!pe||!ke)return null;if(!qe(pe.type,[Be(Sr),Lt,Sr]))return K.error(`Expected first argument to be of type array or string, but found ${Ke(pe.type)} instead`);if(D.length===4){let je=K.parse(D[3],3,Qe);return je?new Ya(pe.type,pe,ke,je):null}return new Ya(pe.type,pe,ke)}evaluate(D){let K=this.input.evaluate(D),pe=this.beginIndex.evaluate(D),ke;if(this.endIndex&&(ke=this.endIndex.evaluate(D)),Ce(K,["string"]))return[...K].slice(pe,ke).join("");if(Ce(K,["array"]))return K.slice(pe,ke);throw new Or(`Expected first argument to be of type array or string, but found ${Ke(xt(K))} instead.`)}eachChild(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)}outputDefined(){return!1}}function ha(H,D){let K=H.length-1,pe,ke,je=0,We=K,ft=0;for(;je<=We;)if(ft=Math.floor((je+We)/2),pe=H[ft],ke=H[ft+1],pe<=D){if(ft===K||D<ke)return ft;je=ft+1}else{if(!(pe>D))throw new Or("Input is not a number.");We=ft-1}return 0}class Da{constructor(D,K,pe){this.type=D,this.input=K,this.labels=[],this.outputs=[];for(let[ke,je]of pe)this.labels.push(ke),this.outputs.push(je)}static parse(D,K){if(D.length-1<4)return K.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return K.error("Expected an even number of arguments.");let pe=K.parse(D[1],1,Qe);if(!pe)return null;let ke=[],je=null;K.expectedType&&K.expectedType.kind!=="value"&&(je=K.expectedType);for(let We=1;We<D.length;We+=2){let ft=We===1?-1/0:D[We],Mt=D[We+1],Ut=We,nr=We+1;if(typeof ft!="number")return K.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ut);if(ke.length&&ke[ke.length-1][0]>=ft)return K.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ut);let Mr=K.parse(Mt,nr,je);if(!Mr)return null;je=je||Mr.type,ke.push([ft,Mr])}return new Da(je,pe,ke)}evaluate(D){let K=this.labels,pe=this.outputs;if(K.length===1)return pe[0].evaluate(D);let ke=this.input.evaluate(D);if(ke<=K[0])return pe[0].evaluate(D);let je=K.length;return ke>=K[je-1]?pe[je-1].evaluate(D):pe[ha(K,ke)].evaluate(D)}eachChild(D){D(this.input);for(let K of this.outputs)D(K)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function Xi(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var Li=fn;function fn(H,D,K,pe){this.cx=3*H,this.bx=3*(K-H)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(pe-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=H,this.p1y=D,this.p2x=K,this.p2y=pe}fn.prototype={sampleCurveX:function(H){return((this.ax*H+this.bx)*H+this.cx)*H},sampleCurveY:function(H){return((this.ay*H+this.by)*H+this.cy)*H},sampleCurveDerivativeX:function(H){return(3*this.ax*H+2*this.bx)*H+this.cx},solveCurveX:function(H,D){if(D===void 0&&(D=1e-6),H<0)return 0;if(H>1)return 1;for(var K=H,pe=0;pe<8;pe++){var ke=this.sampleCurveX(K)-H;if(Math.abs(ke)<D)return K;var je=this.sampleCurveDerivativeX(K);if(Math.abs(je)<1e-6)break;K-=ke/je}var We=0,ft=1;for(K=H,pe=0;pe<20&&(ke=this.sampleCurveX(K),!(Math.abs(ke-H)<D));pe++)H>ke?We=K:ft=K,K=.5*(ft-We)+We;return K},solve:function(H,D){return this.sampleCurveY(this.solveCurveX(H,D))}};var An=Xi(Li);function kn(H,D,K){return H+K*(D-H)}function zn(H,D,K){return H.map((pe,ke)=>kn(pe,D[ke],K))}let Xn={number:kn,color:function(H,D,K,pe="rgb"){switch(pe){case"rgb":{let[ke,je,We,ft]=zn(H.rgb,D.rgb,K);return new Wt(ke,je,We,ft,!1)}case"hcl":{let[ke,je,We,ft]=H.hcl,[Mt,Ut,nr,Mr]=D.hcl,zr,Hr;if(isNaN(ke)||isNaN(Mt))isNaN(ke)?isNaN(Mt)?zr=NaN:(zr=Mt,We!==1&&We!==0||(Hr=Ut)):(zr=ke,nr!==1&&nr!==0||(Hr=je));else{let Yi=Mt-ke;Mt>ke&&Yi>180?Yi-=360:Mt<ke&&ke-Mt>180&&(Yi+=360),zr=ke+K*Yi}let[oa,va,Ga,Qa]=function([Yi,xi,Hi,rn]){return Yi=isNaN(Yi)?0:Yi*rr,Ra([Hi,Math.cos(Yi)*xi,Math.sin(Yi)*xi,rn])}([zr,Hr??kn(je,Ut,K),kn(We,nr,K),kn(ft,Mr,K)]);return new Wt(oa,va,Ga,Qa,!1)}case"lab":{let[ke,je,We,ft]=Ra(zn(H.lab,D.lab,K));return new Wt(ke,je,We,ft,!1)}}},array:zn,padding:function(H,D,K){return new ra(zn(H.values,D.values,K))},variableAnchorOffsetCollection:function(H,D,K){let pe=H.values,ke=D.values;if(pe.length!==ke.length)throw new Or(`Cannot interpolate values of different length. from: ${H.toString()}, to: ${D.toString()}`);let je=[];for(let We=0;We<pe.length;We+=2){if(pe[We]!==ke[We])throw new Or(`Cannot interpolate values containing mismatched anchors. from[${We}]: ${pe[We]}, to[${We}]: ${ke[We]}`);je.push(pe[We]);let[ft,Mt]=pe[We+1],[Ut,nr]=ke[We+1];je.push([kn(ft,Ut,K),kn(Mt,nr,K)])}return new Ha(je)}};class to{constructor(D,K,pe,ke,je){this.type=D,this.operator=K,this.interpolation=pe,this.input=ke,this.labels=[],this.outputs=[];for(let[We,ft]of je)this.labels.push(We),this.outputs.push(ft)}static interpolationFactor(D,K,pe,ke){let je=0;if(D.name==="exponential")je=mo(K,D.base,pe,ke);else if(D.name==="linear")je=mo(K,1,pe,ke);else if(D.name==="cubic-bezier"){let We=D.controlPoints;je=new An(We[0],We[1],We[2],We[3]).solve(mo(K,1,pe,ke))}return je}static parse(D,K){let[pe,ke,je,...We]=D;if(!Array.isArray(ke)||ke.length===0)return K.error("Expected an interpolation type expression.",1);if(ke[0]==="linear")ke={name:"linear"};else if(ke[0]==="exponential"){let Ut=ke[1];if(typeof Ut!="number")return K.error("Exponential interpolation requires a numeric base.",1,1);ke={name:"exponential",base:Ut}}else{if(ke[0]!=="cubic-bezier")return K.error(`Unknown interpolation type ${String(ke[0])}`,1,0);{let Ut=ke.slice(1);if(Ut.length!==4||Ut.some(nr=>typeof nr!="number"||nr<0||nr>1))return K.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ke={name:"cubic-bezier",controlPoints:Ut}}}if(D.length-1<4)return K.error(`Expected at least 4 arguments, but found only ${D.length-1}.`);if((D.length-1)%2!=0)return K.error("Expected an even number of arguments.");if(je=K.parse(je,2,Qe),!je)return null;let ft=[],Mt=null;pe==="interpolate-hcl"||pe==="interpolate-lab"?Mt=Vt:K.expectedType&&K.expectedType.kind!=="value"&&(Mt=K.expectedType);for(let Ut=0;Ut<We.length;Ut+=2){let nr=We[Ut],Mr=We[Ut+1],zr=Ut+3,Hr=Ut+4;if(typeof nr!="number")return K.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',zr);if(ft.length&&ft[ft.length-1][0]>=nr)return K.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',zr);let oa=K.parse(Mr,Hr,Mt);if(!oa)return null;Mt=Mt||oa.type,ft.push([nr,oa])}return Te(Mt,Qe)||Te(Mt,Vt)||Te(Mt,wr)||Te(Mt,bt)||Te(Mt,Be(Qe))?new to(Mt,pe,ke,je,ft):K.error(`Type ${Ke(Mt)} is not interpolatable.`)}evaluate(D){let K=this.labels,pe=this.outputs;if(K.length===1)return pe[0].evaluate(D);let ke=this.input.evaluate(D);if(ke<=K[0])return pe[0].evaluate(D);let je=K.length;if(ke>=K[je-1])return pe[je-1].evaluate(D);let We=ha(K,ke),ft=to.interpolationFactor(this.interpolation,ke,K[We],K[We+1]),Mt=pe[We].evaluate(D),Ut=pe[We+1].evaluate(D);switch(this.operator){case"interpolate":return Xn[this.type.kind](Mt,Ut,ft);case"interpolate-hcl":return Xn.color(Mt,Ut,ft,"hcl");case"interpolate-lab":return Xn.color(Mt,Ut,ft,"lab")}}eachChild(D){D(this.input);for(let K of this.outputs)D(K)}outputDefined(){return this.outputs.every(D=>D.outputDefined())}}function mo(H,D,K,pe){let ke=pe-K,je=H-K;return ke===0?0:D===1?je/ke:(Math.pow(D,je)-1)/(Math.pow(D,ke)-1)}class pn{constructor(D,K){this.type=D,this.args=K}static parse(D,K){if(D.length<2)return K.error("Expectected at least one argument.");let pe=null,ke=K.expectedType;ke&&ke.kind!=="value"&&(pe=ke);let je=[];for(let ft of D.slice(1)){let Mt=K.parse(ft,1+je.length,pe,void 0,{typeAnnotation:"omit"});if(!Mt)return null;pe=pe||Mt.type,je.push(Mt)}if(!pe)throw new Error("No output type");let We=ke&&je.some(ft=>Me(ke,ft.type));return new pn(We?Sr:pe,je)}evaluate(D){let K,pe=null,ke=0;for(let je of this.args)if(ke++,pe=je.evaluate(D),pe&&pe instanceof $a&&!pe.available&&(K||(K=pe.name),pe=null,ke===this.args.length&&(pe=K)),pe!==null)break;return pe}eachChild(D){this.args.forEach(D)}outputDefined(){return this.args.every(D=>D.outputDefined())}}function Jo(H,D){return H==="=="||H==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function Xo(H,D,K,pe){return pe.compare(D,K)===0}function Ts(H,D,K){let pe=H!=="=="&&H!=="!=";return class e7{constructor(je,We,ft){this.type=kt,this.lhs=je,this.rhs=We,this.collator=ft,this.hasUntypedArgument=je.type.kind==="value"||We.type.kind==="value"}static parse(je,We){if(je.length!==3&&je.length!==4)return We.error("Expected two or three arguments.");let ft=je[0],Mt=We.parse(je[1],1,Sr);if(!Mt)return null;if(!Jo(ft,Mt.type))return We.concat(1).error(`"${ft}" comparisons are not supported for type '${Ke(Mt.type)}'.`);let Ut=We.parse(je[2],2,Sr);if(!Ut)return null;if(!Jo(ft,Ut.type))return We.concat(2).error(`"${ft}" comparisons are not supported for type '${Ke(Ut.type)}'.`);if(Mt.type.kind!==Ut.type.kind&&Mt.type.kind!=="value"&&Ut.type.kind!=="value")return We.error(`Cannot compare types '${Ke(Mt.type)}' and '${Ke(Ut.type)}'.`);pe&&(Mt.type.kind==="value"&&Ut.type.kind!=="value"?Mt=new Lr(Ut.type,[Mt]):Mt.type.kind!=="value"&&Ut.type.kind==="value"&&(Ut=new Lr(Mt.type,[Ut])));let nr=null;if(je.length===4){if(Mt.type.kind!=="string"&&Ut.type.kind!=="string"&&Mt.type.kind!=="value"&&Ut.type.kind!=="value")return We.error("Cannot use collator to compare non-string types.");if(nr=We.parse(je[3],3,xr),!nr)return null}return new e7(Mt,Ut,nr)}evaluate(je){let We=this.lhs.evaluate(je),ft=this.rhs.evaluate(je);if(pe&&this.hasUntypedArgument){let Mt=xt(We),Ut=xt(ft);if(Mt.kind!==Ut.kind||Mt.kind!=="string"&&Mt.kind!=="number")throw new Or(`Expected arguments for "${H}" to be (string, string) or (number, number), but found (${Mt.kind}, ${Ut.kind}) instead.`)}if(this.collator&&!pe&&this.hasUntypedArgument){let Mt=xt(We),Ut=xt(ft);if(Mt.kind!=="string"||Ut.kind!=="string")return D(je,We,ft)}return this.collator?K(je,We,ft,this.collator.evaluate(je)):D(je,We,ft)}eachChild(je){je(this.lhs),je(this.rhs),this.collator&&je(this.collator)}outputDefined(){return!0}}}let Po=Ts("==",function(H,D,K){return D===K},Xo),so=Ts("!=",function(H,D,K){return D!==K},function(H,D,K,pe){return!Xo(0,D,K,pe)}),Vn=Ts("<",function(H,D,K){return D<K},function(H,D,K,pe){return pe.compare(D,K)<0}),To=Ts(">",function(H,D,K){return D>K},function(H,D,K,pe){return pe.compare(D,K)>0}),qo=Ts("<=",function(H,D,K){return D<=K},function(H,D,K,pe){return pe.compare(D,K)<=0}),Oo=Ts(">=",function(H,D,K){return D>=K},function(H,D,K,pe){return pe.compare(D,K)>=0});class lo{constructor(D,K,pe){this.type=xr,this.locale=pe,this.caseSensitive=D,this.diacriticSensitive=K}static parse(D,K){if(D.length!==2)return K.error("Expected one argument.");let pe=D[1];if(typeof pe!="object"||Array.isArray(pe))return K.error("Collator options argument must be an object.");let ke=K.parse(pe["case-sensitive"]!==void 0&&pe["case-sensitive"],1,kt);if(!ke)return null;let je=K.parse(pe["diacritic-sensitive"]!==void 0&&pe["diacritic-sensitive"],1,kt);if(!je)return null;let We=null;return pe.locale&&(We=K.parse(pe.locale,1,Lt),!We)?null:new lo(ke,je,We)}evaluate(D){return new Pr(this.caseSensitive.evaluate(D),this.diacriticSensitive.evaluate(D),this.locale?this.locale.evaluate(D):null)}eachChild(D){D(this.caseSensitive),D(this.diacriticSensitive),this.locale&&D(this.locale)}outputDefined(){return!1}}class Co{constructor(D,K,pe,ke,je){this.type=Lt,this.number=D,this.locale=K,this.currency=pe,this.minFractionDigits=ke,this.maxFractionDigits=je}static parse(D,K){if(D.length!==3)return K.error("Expected two arguments.");let pe=K.parse(D[1],1,Qe);if(!pe)return null;let ke=D[2];if(typeof ke!="object"||Array.isArray(ke))return K.error("NumberFormat options argument must be an object.");let je=null;if(ke.locale&&(je=K.parse(ke.locale,1,Lt),!je))return null;let We=null;if(ke.currency&&(We=K.parse(ke.currency,1,Lt),!We))return null;let ft=null;if(ke["min-fraction-digits"]&&(ft=K.parse(ke["min-fraction-digits"],1,Qe),!ft))return null;let Mt=null;return ke["max-fraction-digits"]&&(Mt=K.parse(ke["max-fraction-digits"],1,Qe),!Mt)?null:new Co(pe,je,We,ft,Mt)}evaluate(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))}eachChild(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)}outputDefined(){return!1}}class os{constructor(D){this.type=jr,this.sections=D}static parse(D,K){if(D.length<2)return K.error("Expected at least one argument.");let pe=D[1];if(!Array.isArray(pe)&&typeof pe=="object")return K.error("First argument must be an image or text section.");let ke=[],je=!1;for(let We=1;We<=D.length-1;++We){let ft=D[We];if(je&&typeof ft=="object"&&!Array.isArray(ft)){je=!1;let Mt=null;if(ft["font-scale"]&&(Mt=K.parse(ft["font-scale"],1,Qe),!Mt))return null;let Ut=null;if(ft["text-font"]&&(Ut=K.parse(ft["text-font"],1,Be(Lt)),!Ut))return null;let nr=null;if(ft["text-color"]&&(nr=K.parse(ft["text-color"],1,Vt),!nr))return null;let Mr=ke[ke.length-1];Mr.scale=Mt,Mr.font=Ut,Mr.textColor=nr}else{let Mt=K.parse(D[We],1,Sr);if(!Mt)return null;let Ut=Mt.type.kind;if(Ut!=="string"&&Ut!=="value"&&Ut!=="null"&&Ut!=="resolvedImage")return K.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");je=!0,ke.push({content:Mt,scale:null,font:null,textColor:null})}}return new os(ke)}evaluate(D){return new ma(this.sections.map(K=>{let pe=K.content.evaluate(D);return xt(pe)===Ir?new ta("",pe,null,null,null):new ta(ct(pe),null,K.scale?K.scale.evaluate(D):null,K.font?K.font.evaluate(D).join(","):null,K.textColor?K.textColor.evaluate(D):null)}))}eachChild(D){for(let K of this.sections)D(K.content),K.scale&&D(K.scale),K.font&&D(K.font),K.textColor&&D(K.textColor)}outputDefined(){return!1}}class Ys{constructor(D){this.type=Ir,this.input=D}static parse(D,K){if(D.length!==2)return K.error("Expected two arguments.");let pe=K.parse(D[1],1,Lt);return pe?new Ys(pe):K.error("No image name provided.")}evaluate(D){let K=this.input.evaluate(D),pe=$a.fromString(K);return pe&&D.availableImages&&(pe.available=D.availableImages.indexOf(K)>-1),pe}eachChild(D){D(this.input)}outputDefined(){return!1}}class Os{constructor(D){this.type=Qe,this.input=D}static parse(D,K){if(D.length!==2)return K.error(`Expected 1 argument, but found ${D.length-1} instead.`);let pe=K.parse(D[1],1);return pe?pe.type.kind!=="array"&&pe.type.kind!=="string"&&pe.type.kind!=="value"?K.error(`Expected argument of type string or array, but found ${Ke(pe.type)} instead.`):new Os(pe):null}evaluate(D){let K=this.input.evaluate(D);if(typeof K=="string")return[...K].length;if(Array.isArray(K))return K.length;throw new Or(`Expected value to be of type string or array, but found ${Ke(xt(K))} instead.`)}eachChild(D){D(this.input)}outputDefined(){return!1}}let Yo=8192;function Ui(H,D){let K=(180+H[0])/360,pe=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H[1]*Math.PI/360)))/360,ke=Math.pow(2,D.z);return[Math.round(K*ke*Yo),Math.round(pe*ke*Yo)]}function Cn(H,D){let K=Math.pow(2,D.z);return[(ke=(H[0]/Yo+D.x)/K,360*ke-180),(pe=(H[1]/Yo+D.y)/K,360/Math.PI*Math.atan(Math.exp((180-360*pe)*Math.PI/180))-90)];var pe,ke}function tl(H,D){H[0]=Math.min(H[0],D[0]),H[1]=Math.min(H[1],D[1]),H[2]=Math.max(H[2],D[0]),H[3]=Math.max(H[3],D[1])}function Bs(H,D){return!(H[0]<=D[0]||H[2]>=D[2]||H[1]<=D[1]||H[3]>=D[3])}function uo(H,D,K){let pe=H[0]-D[0],ke=H[1]-D[1],je=H[0]-K[0],We=H[1]-K[1];return pe*We-je*ke==0&&pe*je<=0&&ke*We<=0}function $s(H,D,K,pe){return(ke=[pe[0]-K[0],pe[1]-K[1]])[0]*(je=[D[0]-H[0],D[1]-H[1]])[1]-ke[1]*je[0]!=0&&!(!ro(H,D,K,pe)||!ro(K,pe,H,D));var ke,je}function ms(H,D,K){for(let pe of K)for(let ke=0;ke<pe.length-1;++ke)if($s(H,D,pe[ke],pe[ke+1]))return!0;return!1}function Is(H,D,K=!1){let pe=!1;for(let ft of D)for(let Mt=0;Mt<ft.length-1;Mt++){if(uo(H,ft[Mt],ft[Mt+1]))return K;(je=ft[Mt])[1]>(ke=H)[1]!=(We=ft[Mt+1])[1]>ke[1]&&ke[0]<(We[0]-je[0])*(ke[1]-je[1])/(We[1]-je[1])+je[0]&&(pe=!pe)}var ke,je,We;return pe}function rl(H,D){for(let K of D)if(Is(H,K))return!0;return!1}function Sn(H,D){for(let K of H)if(!Is(K,D))return!1;for(let K=0;K<H.length-1;++K)if(ms(H[K],H[K+1],D))return!1;return!0}function po(H,D){for(let K of D)if(Sn(H,K))return!0;return!1}function ro(H,D,K,pe){let ke=pe[0]-K[0],je=pe[1]-K[1],We=(H[0]-K[0])*je-ke*(H[1]-K[1]),ft=(D[0]-K[0])*je-ke*(D[1]-K[1]);return We>0&&ft<0||We<0&&ft>0}function As(H,D,K){let pe=[];for(let ke=0;ke<H.length;ke++){let je=[];for(let We=0;We<H[ke].length;We++){let ft=Ui(H[ke][We],K);tl(D,ft),je.push(ft)}pe.push(je)}return pe}function al(H,D,K){let pe=[];for(let ke=0;ke<H.length;ke++){let je=As(H[ke],D,K);pe.push(je)}return pe}function $n(H,D,K,pe){if(H[0]<K[0]||H[0]>K[2]){let ke=.5*pe,je=H[0]-K[0]>ke?-pe:K[0]-H[0]>ke?pe:0;je===0&&(je=H[0]-K[2]>ke?-pe:K[2]-H[0]>ke?pe:0),H[0]+=je}tl(D,H)}function zs(H,D,K,pe){let ke=Math.pow(2,pe.z)*Yo,je=[pe.x*Yo,pe.y*Yo],We=[];for(let ft of H)for(let Mt of ft){let Ut=[Mt.x+je[0],Mt.y+je[1]];$n(Ut,D,K,ke),We.push(Ut)}return We}function au(H,D,K,pe){let ke=Math.pow(2,pe.z)*Yo,je=[pe.x*Yo,pe.y*Yo],We=[];for(let Mt of H){let Ut=[];for(let nr of Mt){let Mr=[nr.x+je[0],nr.y+je[1]];tl(D,Mr),Ut.push(Mr)}We.push(Ut)}if(D[2]-D[0]<=ke/2){(ft=D)[0]=ft[1]=1/0,ft[2]=ft[3]=-1/0;for(let Mt of We)for(let Ut of Mt)$n(Ut,D,K,ke)}var ft;return We}class fl{constructor(D,K){this.type=kt,this.geojson=D,this.geometries=K}static parse(D,K){if(D.length!==2)return K.error(`'within' expression requires exactly one argument, but found ${D.length-1} instead.`);if(mi(D[1])){let pe=D[1];if(pe.type==="FeatureCollection"){let ke=[];for(let je of pe.features){let{type:We,coordinates:ft}=je.geometry;We==="Polygon"&&ke.push(ft),We==="MultiPolygon"&&ke.push(...ft)}if(ke.length)return new fl(pe,{type:"MultiPolygon",coordinates:ke})}else if(pe.type==="Feature"){let ke=pe.geometry.type;if(ke==="Polygon"||ke==="MultiPolygon")return new fl(pe,pe.geometry)}else if(pe.type==="Polygon"||pe.type==="MultiPolygon")return new fl(pe,pe)}return K.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(K,pe){let ke=[1/0,1/0,-1/0,-1/0],je=[1/0,1/0,-1/0,-1/0],We=K.canonicalID();if(pe.type==="Polygon"){let ft=As(pe.coordinates,je,We),Mt=zs(K.geometry(),ke,je,We);if(!Bs(ke,je))return!1;for(let Ut of Mt)if(!Is(Ut,ft))return!1}if(pe.type==="MultiPolygon"){let ft=al(pe.coordinates,je,We),Mt=zs(K.geometry(),ke,je,We);if(!Bs(ke,je))return!1;for(let Ut of Mt)if(!rl(Ut,ft))return!1}return!0}(D,this.geometries);if(D.geometryType()==="LineString")return function(K,pe){let ke=[1/0,1/0,-1/0,-1/0],je=[1/0,1/0,-1/0,-1/0],We=K.canonicalID();if(pe.type==="Polygon"){let ft=As(pe.coordinates,je,We),Mt=au(K.geometry(),ke,je,We);if(!Bs(ke,je))return!1;for(let Ut of Mt)if(!Sn(Ut,ft))return!1}if(pe.type==="MultiPolygon"){let ft=al(pe.coordinates,je,We),Mt=au(K.geometry(),ke,je,We);if(!Bs(ke,je))return!1;for(let Ut of Mt)if(!po(Ut,ft))return!1}return!0}(D,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let xu=class{constructor(H=[],D=(K,pe)=>K<pe?-1:K>pe?1:0){if(this.data=H,this.length=this.data.length,this.compare=D,this.length>0)for(let K=(this.length>>1)-1;K>=0;K--)this._down(K)}push(H){this.data.push(H),this._up(this.length++)}pop(){if(this.length===0)return;let H=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),H}peek(){return this.data[0]}_up(H){let{data:D,compare:K}=this,pe=D[H];for(;H>0;){let ke=H-1>>1,je=D[ke];if(K(pe,je)>=0)break;D[H]=je,H=ke}D[H]=pe}_down(H){let{data:D,compare:K}=this,pe=this.length>>1,ke=D[H];for(;H<pe;){let je=1+(H<<1),We=je+1;if(We<this.length&&K(D[We],D[je])<0&&(je=We),K(D[je],ke)>=0)break;D[H]=D[je],H=je}D[H]=ke}};function zl(H,D,K,pe,ke){Ns(H,D,K,pe||H.length-1,ke||Eu)}function Ns(H,D,K,pe,ke){for(;pe>K;){if(pe-K>600){var je=pe-K+1,We=D-K+1,ft=Math.log(je),Mt=.5*Math.exp(2*ft/3),Ut=.5*Math.sqrt(ft*Mt*(je-Mt)/je)*(We-je/2<0?-1:1);Ns(H,D,Math.max(K,Math.floor(D-We*Mt/je+Ut)),Math.min(pe,Math.floor(D+(je-We)*Mt/je+Ut)),ke)}var nr=H[D],Mr=K,zr=pe;for(iu(H,K,D),ke(H[pe],nr)>0&&iu(H,K,pe);Mr<zr;){for(iu(H,Mr,zr),Mr++,zr--;ke(H[Mr],nr)<0;)Mr++;for(;ke(H[zr],nr)>0;)zr--}ke(H[K],nr)===0?iu(H,K,zr):iu(H,++zr,pe),zr<=D&&(K=zr+1),D<=zr&&(pe=zr-1)}}function iu(H,D,K){var pe=H[D];H[D]=H[K],H[K]=pe}function Eu(H,D){return H<D?-1:H>D?1:0}function Bc(H,D){if(H.length<=1)return[H];let K=[],pe,ke;for(let je of H){let We=Af(je);We!==0&&(je.area=Math.abs(We),ke===void 0&&(ke=We<0),ke===We<0?(pe&&K.push(pe),pe=[je]):pe.push(je))}if(pe&&K.push(pe),D>1)for(let je=0;je<K.length;je++)K[je].length<=D||(zl(K[je],D,1,K[je].length-1,Cu),K[je]=K[je].slice(0,D));return K}function Cu(H,D){return D.area-H.area}function Af(H){let D=0;for(let K,pe,ke=0,je=H.length,We=je-1;ke<je;We=ke++)K=H[ke],pe=H[We],D+=(pe.x-K.x)*(K.y+pe.y);return D}let pf=1/298.257223563,Us=pf*(2-pf),Vc=Math.PI/180;class Sf{constructor(D){let K=6378.137*Vc*1e3,pe=Math.cos(D*Vc),ke=1/(1-Us*(1-pe*pe)),je=Math.sqrt(ke);this.kx=K*je*pe,this.ky=K*je*ke*(1-Us)}distance(D,K){let pe=this.wrap(D[0]-K[0])*this.kx,ke=(D[1]-K[1])*this.ky;return Math.sqrt(pe*pe+ke*ke)}pointOnLine(D,K){let pe,ke,je,We,ft=1/0;for(let Mt=0;Mt<D.length-1;Mt++){let Ut=D[Mt][0],nr=D[Mt][1],Mr=this.wrap(D[Mt+1][0]-Ut)*this.kx,zr=(D[Mt+1][1]-nr)*this.ky,Hr=0;Mr===0&&zr===0||(Hr=(this.wrap(K[0]-Ut)*this.kx*Mr+(K[1]-nr)*this.ky*zr)/(Mr*Mr+zr*zr),Hr>1?(Ut=D[Mt+1][0],nr=D[Mt+1][1]):Hr>0&&(Ut+=Mr/this.kx*Hr,nr+=zr/this.ky*Hr)),Mr=this.wrap(K[0]-Ut)*this.kx,zr=(K[1]-nr)*this.ky;let oa=Mr*Mr+zr*zr;oa<ft&&(ft=oa,pe=Ut,ke=nr,je=Mt,We=Hr)}return{point:[pe,ke],index:je,t:Math.max(0,Math.min(1,We))}}wrap(D){for(;D<-180;)D+=360;for(;D>180;)D-=360;return D}}function nu(H,D){return D[0]-H[0]}function Ll(H){return H[1]-H[0]+1}function ic(H,D){return H[1]>=H[0]&&H[1]<D}function Ou(H,D){if(H[0]>H[1])return[null,null];let K=Ll(H);if(D){if(K===2)return[H,null];let ke=Math.floor(K/2);return[[H[0],H[0]+ke],[H[0]+ke,H[1]]]}if(K===1)return[H,null];let pe=Math.floor(K/2)-1;return[[H[0],H[0]+pe],[H[0]+pe+1,H[1]]]}function il(H,D){if(!ic(D,H.length))return[1/0,1/0,-1/0,-1/0];let K=[1/0,1/0,-1/0,-1/0];for(let pe=D[0];pe<=D[1];++pe)tl(K,H[pe]);return K}function vl(H){let D=[1/0,1/0,-1/0,-1/0];for(let K of H)for(let pe of K)tl(D,pe);return D}function gs(H){return H[0]!==-1/0&&H[1]!==-1/0&&H[2]!==1/0&&H[3]!==1/0}function Vs(H,D,K){if(!gs(H)||!gs(D))return NaN;let pe=0,ke=0;return H[2]<D[0]&&(pe=D[0]-H[2]),H[0]>D[2]&&(pe=H[0]-D[2]),H[1]>D[3]&&(ke=H[1]-D[3]),H[3]<D[1]&&(ke=D[1]-H[3]),K.distance([0,0],[pe,ke])}function nc(H,D,K){let pe=K.pointOnLine(D,H);return K.distance(H,pe.point)}function Nl(H,D,K,pe,ke){let je=Math.min(nc(H,[K,pe],ke),nc(D,[K,pe],ke)),We=Math.min(nc(K,[H,D],ke),nc(pe,[H,D],ke));return Math.min(je,We)}function qu(H,D,K,pe,ke){if(!ic(D,H.length)||!ic(pe,K.length))return 1/0;let je=1/0;for(let We=D[0];We<D[1];++We){let ft=H[We],Mt=H[We+1];for(let Ut=pe[0];Ut<pe[1];++Ut){let nr=K[Ut],Mr=K[Ut+1];if($s(ft,Mt,nr,Mr))return 0;je=Math.min(je,Nl(ft,Mt,nr,Mr,ke))}}return je}function cl(H,D,K,pe,ke){if(!ic(D,H.length)||!ic(pe,K.length))return NaN;let je=1/0;for(let We=D[0];We<=D[1];++We)for(let ft=pe[0];ft<=pe[1];++ft)if(je=Math.min(je,ke.distance(H[We],K[ft])),je===0)return je;return je}function yh(H,D,K){if(Is(H,D,!0))return 0;let pe=1/0;for(let ke of D){let je=ke[0],We=ke[ke.length-1];if(je!==We&&(pe=Math.min(pe,nc(H,[We,je],K)),pe===0))return pe;let ft=K.pointOnLine(ke,H);if(pe=Math.min(pe,K.distance(H,ft.point)),pe===0)return pe}return pe}function ls(H,D,K,pe){if(!ic(D,H.length))return NaN;for(let je=D[0];je<=D[1];++je)if(Is(H[je],K,!0))return 0;let ke=1/0;for(let je=D[0];je<D[1];++je){let We=H[je],ft=H[je+1];for(let Mt of K)for(let Ut=0,nr=Mt.length,Mr=nr-1;Ut<nr;Mr=Ut++){let zr=Mt[Mr],Hr=Mt[Ut];if($s(We,ft,zr,Hr))return 0;ke=Math.min(ke,Nl(We,ft,zr,Hr,pe))}}return ke}function _h(H,D){for(let K of H)for(let pe of K)if(Is(pe,D,!0))return!0;return!1}function Ss(H,D,K,pe=1/0){let ke=vl(H),je=vl(D);if(pe!==1/0&&Vs(ke,je,K)>=pe)return pe;if(Bs(ke,je)){if(_h(H,D))return 0}else if(_h(D,H))return 0;let We=1/0;for(let ft of H)for(let Mt=0,Ut=ft.length,nr=Ut-1;Mt<Ut;nr=Mt++){let Mr=ft[nr],zr=ft[Mt];for(let Hr of D)for(let oa=0,va=Hr.length,Ga=va-1;oa<va;Ga=oa++){let Qa=Hr[Ga],Yi=Hr[oa];if($s(Mr,zr,Qa,Yi))return 0;We=Math.min(We,Nl(Mr,zr,Qa,Yi,K))}}return We}function Qn(H,D,K,pe,ke,je){if(!je)return;let We=Vs(il(pe,je),ke,K);We<D&&H.push([We,je,[0,0]])}function Gc(H,D,K,pe,ke,je,We){if(!je||!We)return;let ft=Vs(il(pe,je),il(ke,We),K);ft<D&&H.push([ft,je,We])}function Vu(H,D,K,pe,ke=1/0){let je=Math.min(pe.distance(H[0],K[0][0]),ke);if(je===0)return je;let We=new xu([[0,[0,H.length-1],[0,0]]],nu),ft=vl(K);for(;We.length>0;){let Mt=We.pop();if(Mt[0]>=je)continue;let Ut=Mt[1],nr=D?50:100;if(Ll(Ut)<=nr){if(!ic(Ut,H.length))return NaN;if(D){let Mr=ls(H,Ut,K,pe);if(isNaN(Mr)||Mr===0)return Mr;je=Math.min(je,Mr)}else for(let Mr=Ut[0];Mr<=Ut[1];++Mr){let zr=yh(H[Mr],K,pe);if(je=Math.min(je,zr),je===0)return 0}}else{let Mr=Ou(Ut,D);Qn(We,je,pe,H,ft,Mr[0]),Qn(We,je,pe,H,ft,Mr[1])}}return je}function Ul(H,D,K,pe,ke,je=1/0){let We=Math.min(je,ke.distance(H[0],K[0]));if(We===0)return We;let ft=new xu([[0,[0,H.length-1],[0,K.length-1]]],nu);for(;ft.length>0;){let Mt=ft.pop();if(Mt[0]>=We)continue;let Ut=Mt[1],nr=Mt[2],Mr=D?50:100,zr=pe?50:100;if(Ll(Ut)<=Mr&&Ll(nr)<=zr){if(!ic(Ut,H.length)&&ic(nr,K.length))return NaN;let Hr;if(D&&pe)Hr=qu(H,Ut,K,nr,ke),We=Math.min(We,Hr);else if(D&&!pe){let oa=H.slice(Ut[0],Ut[1]+1);for(let va=nr[0];va<=nr[1];++va)if(Hr=nc(K[va],oa,ke),We=Math.min(We,Hr),We===0)return We}else if(!D&&pe){let oa=K.slice(nr[0],nr[1]+1);for(let va=Ut[0];va<=Ut[1];++va)if(Hr=nc(H[va],oa,ke),We=Math.min(We,Hr),We===0)return We}else Hr=cl(H,Ut,K,nr,ke),We=Math.min(We,Hr)}else{let Hr=Ou(Ut,D),oa=Ou(nr,pe);Gc(ft,We,ke,H,K,Hr[0],oa[0]),Gc(ft,We,ke,H,K,Hr[0],oa[1]),Gc(ft,We,ke,H,K,Hr[1],oa[0]),Gc(ft,We,ke,H,K,Hr[1],oa[1])}}return We}function Mf(H){return H.type==="MultiPolygon"?H.coordinates.map(D=>({type:"Polygon",coordinates:D})):H.type==="MultiLineString"?H.coordinates.map(D=>({type:"LineString",coordinates:D})):H.type==="MultiPoint"?H.coordinates.map(D=>({type:"Point",coordinates:D})):[H]}class wc{constructor(D,K){this.type=Qe,this.geojson=D,this.geometries=K}static parse(D,K){if(D.length!==2)return K.error(`'distance' expression requires exactly one argument, but found ${D.length-1} instead.`);if(mi(D[1])){let pe=D[1];if(pe.type==="FeatureCollection")return new wc(pe,pe.features.map(ke=>Mf(ke.geometry)).flat());if(pe.type==="Feature")return new wc(pe,Mf(pe.geometry));if("type"in pe&&"coordinates"in pe)return new wc(pe,Mf(pe))}return K.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(D){if(D.geometry()!=null&&D.canonicalID()!=null){if(D.geometryType()==="Point")return function(K,pe){let ke=K.geometry(),je=ke.flat().map(Mt=>Cn([Mt.x,Mt.y],K.canonical));if(ke.length===0)return NaN;let We=new Sf(je[0][1]),ft=1/0;for(let Mt of pe){switch(Mt.type){case"Point":ft=Math.min(ft,Ul(je,!1,[Mt.coordinates],!1,We,ft));break;case"LineString":ft=Math.min(ft,Ul(je,!1,Mt.coordinates,!0,We,ft));break;case"Polygon":ft=Math.min(ft,Vu(je,!1,Mt.coordinates,We,ft))}if(ft===0)return ft}return ft}(D,this.geometries);if(D.geometryType()==="LineString")return function(K,pe){let ke=K.geometry(),je=ke.flat().map(Mt=>Cn([Mt.x,Mt.y],K.canonical));if(ke.length===0)return NaN;let We=new Sf(je[0][1]),ft=1/0;for(let Mt of pe){switch(Mt.type){case"Point":ft=Math.min(ft,Ul(je,!0,[Mt.coordinates],!1,We,ft));break;case"LineString":ft=Math.min(ft,Ul(je,!0,Mt.coordinates,!0,We,ft));break;case"Polygon":ft=Math.min(ft,Vu(je,!0,Mt.coordinates,We,ft))}if(ft===0)return ft}return ft}(D,this.geometries);if(D.geometryType()==="Polygon")return function(K,pe){let ke=K.geometry();if(ke.length===0||ke[0].length===0)return NaN;let je=Bc(ke,0).map(Mt=>Mt.map(Ut=>Ut.map(nr=>Cn([nr.x,nr.y],K.canonical)))),We=new Sf(je[0][0][0][1]),ft=1/0;for(let Mt of pe)for(let Ut of je){switch(Mt.type){case"Point":ft=Math.min(ft,Vu([Mt.coordinates],!1,Ut,We,ft));break;case"LineString":ft=Math.min(ft,Vu(Mt.coordinates,!0,Ut,We,ft));break;case"Polygon":ft=Math.min(ft,Ss(Ut,Mt.coordinates,We,ft))}if(ft===0)return ft}return ft}(D,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let rf={"==":Po,"!=":so,">":To,"<":Vn,">=":Oo,"<=":qo,array:Lr,at:dr,boolean:Lr,case:Fa,coalesce:pn,collator:lo,format:os,image:Ys,in:kr,"index-of":ia,interpolate:to,"interpolate-hcl":to,"interpolate-lab":to,length:Os,let:fa,literal:Nr,match:Ca,number:Lr,"number-format":Co,object:Lr,slice:Ya,step:Da,string:Lr,"to-boolean":Kr,"to-color":Kr,"to-number":Kr,"to-string":Kr,var:It,within:fl,distance:wc};class Kl{constructor(D,K,pe,ke){this.name=D,this.type=K,this._evaluate=pe,this.args=ke}evaluate(D){return this._evaluate(D,this.args)}eachChild(D){this.args.forEach(D)}outputDefined(){return!1}static parse(D,K){let pe=D[0],ke=Kl.definitions[pe];if(!ke)return K.error(`Unknown expression "${pe}". If you wanted a literal array, use ["literal", [...]].`,0);let je=Array.isArray(ke)?ke[0]:ke.type,We=Array.isArray(ke)?[[ke[1],ke[2]]]:ke.overloads,ft=We.filter(([Ut])=>!Array.isArray(Ut)||Ut.length===D.length-1),Mt=null;for(let[Ut,nr]of ft){Mt=new da(K.registry,Ff,K.path,null,K.scope);let Mr=[],zr=!1;for(let Hr=1;Hr<D.length;Hr++){let oa=D[Hr],va=Array.isArray(Ut)?Ut[Hr-1]:Ut.type,Ga=Mt.parse(oa,1+Mr.length,va);if(!Ga){zr=!0;break}Mr.push(Ga)}if(!zr)if(Array.isArray(Ut)&&Ut.length!==Mr.length)Mt.error(`Expected ${Ut.length} arguments, but found ${Mr.length} instead.`);else{for(let Hr=0;Hr<Mr.length;Hr++){let oa=Array.isArray(Ut)?Ut[Hr]:Ut.type,va=Mr[Hr];Mt.concat(Hr+1).checkSubtype(oa,va.type)}if(Mt.errors.length===0)return new Kl(pe,je,nr,Mr)}}if(ft.length===1)K.errors.push(...Mt.errors);else{let Ut=(ft.length?ft:We).map(([Mr])=>{return zr=Mr,Array.isArray(zr)?`(${zr.map(Ke).join(", ")})`:`(${Ke(zr.type)}...)`;var zr}).join(" | "),nr=[];for(let Mr=1;Mr<D.length;Mr++){let zr=K.parse(D[Mr],1+nr.length);if(!zr)return null;nr.push(Ke(zr.type))}K.error(`Expected arguments of type ${Ut}, but found (${nr.join(", ")}) instead.`)}return null}static register(D,K){Kl.definitions=K;for(let pe in K)D[pe]=Kl}}function Yf(H,[D,K,pe,ke]){D=D.evaluate(H),K=K.evaluate(H),pe=pe.evaluate(H);let je=ke?ke.evaluate(H):1,We=ai(D,K,pe,je);if(We)throw new Or(We);return new Wt(D/255,K/255,pe/255,je,!1)}function zf(H,D){return H in D}function af(H,D){let K=D[H];return K===void 0?null:K}function Nc(H){return{type:H}}function Ff(H){if(H instanceof It)return Ff(H.boundExpression);if(H instanceof Kl&&H.name==="error"||H instanceof lo||H instanceof fl||H instanceof wc)return!1;let D=H instanceof Kr||H instanceof Lr,K=!0;return H.eachChild(pe=>{K=D?K&&Ff(pe):K&&pe instanceof Nr}),!!K&&Of(H)&&Ef(H,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Of(H){if(H instanceof Kl&&(H.name==="get"&&H.args.length===1||H.name==="feature-state"||H.name==="has"&&H.args.length===1||H.name==="properties"||H.name==="geometry-type"||H.name==="id"||/^filter-/.test(H.name))||H instanceof fl||H instanceof wc)return!1;let D=!0;return H.eachChild(K=>{D&&!Of(K)&&(D=!1)}),D}function Gu(H){if(H instanceof Kl&&H.name==="feature-state")return!1;let D=!0;return H.eachChild(K=>{D&&!Gu(K)&&(D=!1)}),D}function Ef(H,D){if(H instanceof Kl&&D.indexOf(H.name)>=0)return!1;let K=!0;return H.eachChild(pe=>{K&&!Ef(pe,D)&&(K=!1)}),K}function oc(H){return{result:"success",value:H}}function Hc(H){return{result:"error",value:H}}function Jl(H){return H["property-type"]==="data-driven"||H["property-type"]==="cross-faded-data-driven"}function Uc(H){return!!H.expression&&H.expression.parameters.indexOf("zoom")>-1}function Tc(H){return!!H.expression&&H.expression.interpolated}function Gs(H){return H instanceof Number?"number":H instanceof String?"string":H instanceof Boolean?"boolean":Array.isArray(H)?"array":H===null?"null":typeof H}function Cf(H){return typeof H=="object"&&H!==null&&!Array.isArray(H)}function lh(H){return H}function Bf(H,D){let K=D.type==="color",pe=H.stops&&typeof H.stops[0][0]=="object",ke=pe||!(pe||H.property!==void 0),je=H.type||(Tc(D)?"exponential":"interval");if(K||D.type==="padding"){let nr=K?Wt.parse:ra.parse;(H=fe({},H)).stops&&(H.stops=H.stops.map(Mr=>[Mr[0],nr(Mr[1])])),H.default=nr(H.default?H.default:D.default)}if(H.colorSpace&&(We=H.colorSpace)!=="rgb"&&We!=="hcl"&&We!=="lab")throw new Error(`Unknown color space: "${H.colorSpace}"`);var We;let ft,Mt,Ut;if(je==="exponential")ft=Nf;else if(je==="interval")ft=ku;else if(je==="categorical"){ft=Kf,Mt=Object.create(null);for(let nr of H.stops)Mt[nr[0]]=nr[1];Ut=typeof H.stops[0][0]}else{if(je!=="identity")throw new Error(`Unknown function type "${je}"`);ft=ml}if(pe){let nr={},Mr=[];for(let oa=0;oa<H.stops.length;oa++){let va=H.stops[oa],Ga=va[0].zoom;nr[Ga]===void 0&&(nr[Ga]={zoom:Ga,type:H.type,property:H.property,default:H.default,stops:[]},Mr.push(Ga)),nr[Ga].stops.push([va[0].value,va[1]])}let zr=[];for(let oa of Mr)zr.push([nr[oa].zoom,Bf(nr[oa],D)]);let Hr={name:"linear"};return{kind:"composite",interpolationType:Hr,interpolationFactor:to.interpolationFactor.bind(void 0,Hr),zoomStops:zr.map(oa=>oa[0]),evaluate:({zoom:oa},va)=>Nf({stops:zr,base:H.base},D,oa).evaluate(oa,va)}}if(ke){let nr=je==="exponential"?{name:"exponential",base:H.base!==void 0?H.base:1}:null;return{kind:"camera",interpolationType:nr,interpolationFactor:to.interpolationFactor.bind(void 0,nr),zoomStops:H.stops.map(Mr=>Mr[0]),evaluate:({zoom:Mr})=>ft(H,D,Mr,Mt,Ut)}}return{kind:"source",evaluate(nr,Mr){let zr=Mr&&Mr.properties?Mr.properties[H.property]:void 0;return zr===void 0?Wc(H.default,D.default):ft(H,D,zr,Mt,Ut)}}}function Wc(H,D,K){return H!==void 0?H:D!==void 0?D:K!==void 0?K:void 0}function Kf(H,D,K,pe,ke){return Wc(typeof K===ke?pe[K]:void 0,H.default,D.default)}function ku(H,D,K){if(Gs(K)!=="number")return Wc(H.default,D.default);let pe=H.stops.length;if(pe===1||K<=H.stops[0][0])return H.stops[0][1];if(K>=H.stops[pe-1][0])return H.stops[pe-1][1];let ke=ha(H.stops.map(je=>je[0]),K);return H.stops[ke][1]}function Nf(H,D,K){let pe=H.base!==void 0?H.base:1;if(Gs(K)!=="number")return Wc(H.default,D.default);let ke=H.stops.length;if(ke===1||K<=H.stops[0][0])return H.stops[0][1];if(K>=H.stops[ke-1][0])return H.stops[ke-1][1];let je=ha(H.stops.map(nr=>nr[0]),K),We=function(nr,Mr,zr,Hr){let oa=Hr-zr,va=nr-zr;return oa===0?0:Mr===1?va/oa:(Math.pow(Mr,va)-1)/(Math.pow(Mr,oa)-1)}(K,pe,H.stops[je][0],H.stops[je+1][0]),ft=H.stops[je][1],Mt=H.stops[je+1][1],Ut=Xn[D.type]||lh;return typeof ft.evaluate=="function"?{evaluate(...nr){let Mr=ft.evaluate.apply(void 0,nr),zr=Mt.evaluate.apply(void 0,nr);if(Mr!==void 0&&zr!==void 0)return Ut(Mr,zr,We,H.colorSpace)}}:Ut(ft,Mt,We,H.colorSpace)}function ml(H,D,K){switch(D.type){case"color":K=Wt.parse(K);break;case"formatted":K=ma.fromString(K.toString());break;case"resolvedImage":K=$a.fromString(K.toString());break;case"padding":K=ra.parse(K);break;default:Gs(K)===D.type||D.type==="enum"&&D.values[K]||(K=void 0)}return Wc(K,H.default,D.default)}Kl.register(rf,{error:[{kind:"error"},[Lt],(H,[D])=>{throw new Or(D.evaluate(H))}],typeof:[Lt,[Sr],(H,[D])=>Ke(xt(D.evaluate(H)))],"to-rgba":[Be(Qe,4),[Vt],(H,[D])=>{let[K,pe,ke,je]=D.evaluate(H).rgb;return[255*K,255*pe,255*ke,je]}],rgb:[Vt,[Qe,Qe,Qe],Yf],rgba:[Vt,[Qe,Qe,Qe,Qe],Yf],has:{type:kt,overloads:[[[Lt],(H,[D])=>zf(D.evaluate(H),H.properties())],[[Lt,Zt],(H,[D,K])=>zf(D.evaluate(H),K.evaluate(H))]]},get:{type:Sr,overloads:[[[Lt],(H,[D])=>af(D.evaluate(H),H.properties())],[[Lt,Zt],(H,[D,K])=>af(D.evaluate(H),K.evaluate(H))]]},"feature-state":[Sr,[Lt],(H,[D])=>af(D.evaluate(H),H.featureState||{})],properties:[Zt,[],H=>H.properties()],"geometry-type":[Lt,[],H=>H.geometryType()],id:[Sr,[],H=>H.id()],zoom:[Qe,[],H=>H.globals.zoom],"heatmap-density":[Qe,[],H=>H.globals.heatmapDensity||0],"line-progress":[Qe,[],H=>H.globals.lineProgress||0],accumulated:[Sr,[],H=>H.globals.accumulated===void 0?null:H.globals.accumulated],"+":[Qe,Nc(Qe),(H,D)=>{let K=0;for(let pe of D)K+=pe.evaluate(H);return K}],"*":[Qe,Nc(Qe),(H,D)=>{let K=1;for(let pe of D)K*=pe.evaluate(H);return K}],"-":{type:Qe,overloads:[[[Qe,Qe],(H,[D,K])=>D.evaluate(H)-K.evaluate(H)],[[Qe],(H,[D])=>-D.evaluate(H)]]},"/":[Qe,[Qe,Qe],(H,[D,K])=>D.evaluate(H)/K.evaluate(H)],"%":[Qe,[Qe,Qe],(H,[D,K])=>D.evaluate(H)%K.evaluate(H)],ln2:[Qe,[],()=>Math.LN2],pi:[Qe,[],()=>Math.PI],e:[Qe,[],()=>Math.E],"^":[Qe,[Qe,Qe],(H,[D,K])=>Math.pow(D.evaluate(H),K.evaluate(H))],sqrt:[Qe,[Qe],(H,[D])=>Math.sqrt(D.evaluate(H))],log10:[Qe,[Qe],(H,[D])=>Math.log(D.evaluate(H))/Math.LN10],ln:[Qe,[Qe],(H,[D])=>Math.log(D.evaluate(H))],log2:[Qe,[Qe],(H,[D])=>Math.log(D.evaluate(H))/Math.LN2],sin:[Qe,[Qe],(H,[D])=>Math.sin(D.evaluate(H))],cos:[Qe,[Qe],(H,[D])=>Math.cos(D.evaluate(H))],tan:[Qe,[Qe],(H,[D])=>Math.tan(D.evaluate(H))],asin:[Qe,[Qe],(H,[D])=>Math.asin(D.evaluate(H))],acos:[Qe,[Qe],(H,[D])=>Math.acos(D.evaluate(H))],atan:[Qe,[Qe],(H,[D])=>Math.atan(D.evaluate(H))],min:[Qe,Nc(Qe),(H,D)=>Math.min(...D.map(K=>K.evaluate(H)))],max:[Qe,Nc(Qe),(H,D)=>Math.max(...D.map(K=>K.evaluate(H)))],abs:[Qe,[Qe],(H,[D])=>Math.abs(D.evaluate(H))],round:[Qe,[Qe],(H,[D])=>{let K=D.evaluate(H);return K<0?-Math.round(-K):Math.round(K)}],floor:[Qe,[Qe],(H,[D])=>Math.floor(D.evaluate(H))],ceil:[Qe,[Qe],(H,[D])=>Math.ceil(D.evaluate(H))],"filter-==":[kt,[Lt,Sr],(H,[D,K])=>H.properties()[D.value]===K.value],"filter-id-==":[kt,[Sr],(H,[D])=>H.id()===D.value],"filter-type-==":[kt,[Lt],(H,[D])=>H.geometryType()===D.value],"filter-<":[kt,[Lt,Sr],(H,[D,K])=>{let pe=H.properties()[D.value],ke=K.value;return typeof pe==typeof ke&&pe<ke}],"filter-id-<":[kt,[Sr],(H,[D])=>{let K=H.id(),pe=D.value;return typeof K==typeof pe&&K<pe}],"filter->":[kt,[Lt,Sr],(H,[D,K])=>{let pe=H.properties()[D.value],ke=K.value;return typeof pe==typeof ke&&pe>ke}],"filter-id->":[kt,[Sr],(H,[D])=>{let K=H.id(),pe=D.value;return typeof K==typeof pe&&K>pe}],"filter-<=":[kt,[Lt,Sr],(H,[D,K])=>{let pe=H.properties()[D.value],ke=K.value;return typeof pe==typeof ke&&pe<=ke}],"filter-id-<=":[kt,[Sr],(H,[D])=>{let K=H.id(),pe=D.value;return typeof K==typeof pe&&K<=pe}],"filter->=":[kt,[Lt,Sr],(H,[D,K])=>{let pe=H.properties()[D.value],ke=K.value;return typeof pe==typeof ke&&pe>=ke}],"filter-id->=":[kt,[Sr],(H,[D])=>{let K=H.id(),pe=D.value;return typeof K==typeof pe&&K>=pe}],"filter-has":[kt,[Sr],(H,[D])=>D.value in H.properties()],"filter-has-id":[kt,[],H=>H.id()!==null&&H.id()!==void 0],"filter-type-in":[kt,[Be(Lt)],(H,[D])=>D.value.indexOf(H.geometryType())>=0],"filter-id-in":[kt,[Be(Sr)],(H,[D])=>D.value.indexOf(H.id())>=0],"filter-in-small":[kt,[Lt,Be(Sr)],(H,[D,K])=>K.value.indexOf(H.properties()[D.value])>=0],"filter-in-large":[kt,[Lt,Be(Sr)],(H,[D,K])=>function(pe,ke,je,We){for(;je<=We;){let ft=je+We>>1;if(ke[ft]===pe)return!0;ke[ft]>pe?We=ft-1:je=ft+1}return!1}(H.properties()[D.value],K.value,0,K.value.length-1)],all:{type:kt,overloads:[[[kt,kt],(H,[D,K])=>D.evaluate(H)&&K.evaluate(H)],[Nc(kt),(H,D)=>{for(let K of D)if(!K.evaluate(H))return!1;return!0}]]},any:{type:kt,overloads:[[[kt,kt],(H,[D,K])=>D.evaluate(H)||K.evaluate(H)],[Nc(kt),(H,D)=>{for(let K of D)if(K.evaluate(H))return!0;return!1}]]},"!":[kt,[kt],(H,[D])=>!D.evaluate(H)],"is-supported-script":[kt,[Lt],(H,[D])=>{let K=H.globals&&H.globals.isSupportedScript;return!K||K(D.evaluate(H))}],upcase:[Lt,[Lt],(H,[D])=>D.evaluate(H).toUpperCase()],downcase:[Lt,[Lt],(H,[D])=>D.evaluate(H).toLowerCase()],concat:[Lt,Nc(Sr),(H,D)=>D.map(K=>ct(K.evaluate(H))).join("")],"resolved-locale":[Lt,[xr],(H,[D])=>D.evaluate(H).resolvedLocale()]});class Lu{constructor(D,K){var pe;this.expression=D,this._warningHistory={},this._evaluator=new aa,this._defaultValue=K?(pe=K).type==="color"&&Cf(pe.default)?new Wt(0,0,0,0):pe.type==="color"?Wt.parse(pe.default)||null:pe.type==="padding"?ra.parse(pe.default)||null:pe.type==="variableAnchorOffsetCollection"?Ha.parse(pe.default)||null:pe.default===void 0?null:pe.default:null,this._enumValues=K&&K.type==="enum"?K.values:null}evaluateWithoutErrorHandling(D,K,pe,ke,je,We){return this._evaluator.globals=D,this._evaluator.feature=K,this._evaluator.featureState=pe,this._evaluator.canonical=ke,this._evaluator.availableImages=je||null,this._evaluator.formattedSection=We,this.expression.evaluate(this._evaluator)}evaluate(D,K,pe,ke,je,We){this._evaluator.globals=D,this._evaluator.feature=K||null,this._evaluator.featureState=pe||null,this._evaluator.canonical=ke,this._evaluator.availableImages=je||null,this._evaluator.formattedSection=We||null;try{let ft=this.expression.evaluate(this._evaluator);if(ft==null||typeof ft=="number"&&ft!=ft)return this._defaultValue;if(this._enumValues&&!(ft in this._enumValues))throw new Or(`Expected value to be one of ${Object.keys(this._enumValues).map(Mt=>JSON.stringify(Mt)).join(", ")}, but found ${JSON.stringify(ft)} instead.`);return ft}catch(ft){return this._warningHistory[ft.message]||(this._warningHistory[ft.message]=!0,typeof console<"u"&&console.warn(ft.message)),this._defaultValue}}}function Ac(H){return Array.isArray(H)&&H.length>0&&typeof H[0]=="string"&&H[0]in rf}function nl(H,D){let K=new da(rf,Ff,[],D?function(ke){let je={color:Vt,string:Lt,number:Qe,enum:Lt,boolean:kt,formatted:jr,padding:wr,resolvedImage:Ir,variableAnchorOffsetCollection:bt};return ke.type==="array"?Be(je[ke.value]||Sr,ke.length):je[ke.type]}(D):void 0),pe=K.parse(H,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return pe?oc(new Lu(pe,D)):Hc(K.errors)}class dc{constructor(D,K){this.kind=D,this._styleExpression=K,this.isStateDependent=D!=="constant"&&!Gu(K.expression)}evaluateWithoutErrorHandling(D,K,pe,ke,je,We){return this._styleExpression.evaluateWithoutErrorHandling(D,K,pe,ke,je,We)}evaluate(D,K,pe,ke,je,We){return this._styleExpression.evaluate(D,K,pe,ke,je,We)}}class vu{constructor(D,K,pe,ke){this.kind=D,this.zoomStops=pe,this._styleExpression=K,this.isStateDependent=D!=="camera"&&!Gu(K.expression),this.interpolationType=ke}evaluateWithoutErrorHandling(D,K,pe,ke,je,We){return this._styleExpression.evaluateWithoutErrorHandling(D,K,pe,ke,je,We)}evaluate(D,K,pe,ke,je,We){return this._styleExpression.evaluate(D,K,pe,ke,je,We)}interpolationFactor(D,K,pe){return this.interpolationType?to.interpolationFactor(this.interpolationType,D,K,pe):0}}function bu(H,D){let K=nl(H,D);if(K.result==="error")return K;let pe=K.value.expression,ke=Of(pe);if(!ke&&!Jl(D))return Hc([new Fe("","data expressions not supported")]);let je=Ef(pe,["zoom"]);if(!je&&!Uc(D))return Hc([new Fe("","zoom expressions not supported")]);let We=Uf(pe);return We||je?We instanceof Fe?Hc([We]):We instanceof to&&!Tc(D)?Hc([new Fe("",'"interpolate" expressions cannot be used with this property')]):oc(We?new vu(ke?"camera":"composite",K.value,We.labels,We instanceof to?We.interpolation:void 0):new dc(ke?"constant":"source",K.value)):Hc([new Fe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ml{constructor(D,K){this._parameters=D,this._specification=K,fe(this,Bf(this._parameters,this._specification))}static deserialize(D){return new Ml(D._parameters,D._specification)}static serialize(D){return{_parameters:D._parameters,_specification:D._specification}}}function Uf(H){let D=null;if(H instanceof fa)D=Uf(H.result);else if(H instanceof pn){for(let K of H.args)if(D=Uf(K),D)break}else(H instanceof Da||H instanceof to)&&H.input instanceof Kl&&H.input.name==="zoom"&&(D=H);return D instanceof Fe||H.eachChild(K=>{let pe=Uf(K);pe instanceof Fe?D=pe:!D&&pe?D=new Fe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):D&&pe&&D!==pe&&(D=new Fe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),D}function Jf(H){if(H===!0||H===!1)return!0;if(!Array.isArray(H)||H.length===0)return!1;switch(H[0]){case"has":return H.length>=2&&H[1]!=="$id"&&H[1]!=="$type";case"in":return H.length>=3&&(typeof H[1]!="string"||Array.isArray(H[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return H.length!==3||Array.isArray(H[1])||Array.isArray(H[2]);case"any":case"all":for(let D of H.slice(1))if(!Jf(D)&&typeof D!="boolean")return!1;return!0;default:return!0}}let Bu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Sc(H){if(H==null)return{filter:()=>!0,needGeometry:!1};Jf(H)||(H=nf(H));let D=nl(H,Bu);if(D.result==="error")throw new Error(D.value.map(K=>`${K.key}: ${K.message}`).join(", "));return{filter:(K,pe,ke)=>D.value.evaluate(K,pe,{},ke),needGeometry:Lh(H)}}function vc(H,D){return H<D?-1:H>D?1:0}function Lh(H){if(!Array.isArray(H))return!1;if(H[0]==="within"||H[0]==="distance")return!0;for(let D=1;D<H.length;D++)if(Lh(H[D]))return!0;return!1}function nf(H){if(!H)return!0;let D=H[0];return H.length<=1?D!=="any":D==="=="?df(H[1],H[2],"=="):D==="!="?tu(df(H[1],H[2],"==")):D==="<"||D===">"||D==="<="||D===">="?df(H[1],H[2],D):D==="any"?(K=H.slice(1),["any"].concat(K.map(nf))):D==="all"?["all"].concat(H.slice(1).map(nf)):D==="none"?["all"].concat(H.slice(1).map(nf).map(tu)):D==="in"?Nu(H[1],H.slice(2)):D==="!in"?tu(Nu(H[1],H.slice(2))):D==="has"?of(H[1]):D!=="!has"||tu(of(H[1]));var K}function df(H,D,K){switch(H){case"$type":return[`filter-type-${K}`,D];case"$id":return[`filter-id-${K}`,D];default:return[`filter-${K}`,H,D]}}function Nu(H,D){if(D.length===0)return!1;switch(H){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(K=>typeof K!=typeof D[0])?["filter-in-large",H,["literal",D.sort(vc)]]:["filter-in-small",H,["literal",D]]}}function of(H){switch(H){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",H]}}function tu(H){return["!",H]}function Xc(H){let D=typeof H;if(D==="number"||D==="boolean"||D==="string"||H==null)return JSON.stringify(H);if(Array.isArray(H)){let ke="[";for(let je of H)ke+=`${Xc(je)},`;return`${ke}]`}let K=Object.keys(H).sort(),pe="{";for(let ke=0;ke<K.length;ke++)pe+=`${JSON.stringify(K[ke])}:${Xc(H[K[ke]])},`;return`${pe}}`}function uh(H){let D="";for(let K of ce)D+=`/${Xc(H[K])}`;return D}function vf(H){let D=H.value;return D?[new _e(H.key,D,"constants have been deprecated as of v8")]:[]}function ol(H){return H instanceof Number||H instanceof String||H instanceof Boolean?H.valueOf():H}function mu(H){if(Array.isArray(H))return H.map(mu);if(H instanceof Object&&!(H instanceof Number||H instanceof String||H instanceof Boolean)){let D={};for(let K in H)D[K]=mu(H[K]);return D}return ol(H)}function Pu(H){let D=H.key,K=H.value,pe=H.valueSpec||{},ke=H.objectElementValidators||{},je=H.style,We=H.styleSpec,ft=H.validateSpec,Mt=[],Ut=Gs(K);if(Ut!=="object")return[new _e(D,K,`object expected, ${Ut} found`)];for(let nr in K){let Mr=nr.split(".")[0],zr=pe[Mr]||pe["*"],Hr;if(ke[Mr])Hr=ke[Mr];else if(pe[Mr])Hr=ft;else if(ke["*"])Hr=ke["*"];else{if(!pe["*"]){Mt.push(new _e(D,K[nr],`unknown property "${nr}"`));continue}Hr=ft}Mt=Mt.concat(Hr({key:(D&&`${D}.`)+nr,value:K[nr],valueSpec:zr,style:je,styleSpec:We,object:K,objectKey:nr,validateSpec:ft},K))}for(let nr in pe)ke[nr]||pe[nr].required&&pe[nr].default===void 0&&K[nr]===void 0&&Mt.push(new _e(D,K,`missing required property "${nr}"`));return Mt}function kf(H){let D=H.value,K=H.valueSpec,pe=H.style,ke=H.styleSpec,je=H.key,We=H.arrayElementValidator||H.validateSpec;if(Gs(D)!=="array")return[new _e(je,D,`array expected, ${Gs(D)} found`)];if(K.length&&D.length!==K.length)return[new _e(je,D,`array length ${K.length} expected, length ${D.length} found`)];if(K["min-length"]&&D.length<K["min-length"])return[new _e(je,D,`array length at least ${K["min-length"]} expected, length ${D.length} found`)];let ft={type:K.value,values:K.values};ke.$version<7&&(ft.function=K.function),Gs(K.value)==="object"&&(ft=K.value);let Mt=[];for(let Ut=0;Ut<D.length;Ut++)Mt=Mt.concat(We({array:D,arrayIndex:Ut,value:D[Ut],valueSpec:ft,validateSpec:H.validateSpec,style:pe,styleSpec:ke,key:`${je}[${Ut}]`}));return Mt}function hl(H){let D=H.key,K=H.value,pe=H.valueSpec,ke=Gs(K);return ke==="number"&&K!=K&&(ke="NaN"),ke!=="number"?[new _e(D,K,`number expected, ${ke} found`)]:"minimum"in pe&&K<pe.minimum?[new _e(D,K,`${K} is less than the minimum value ${pe.minimum}`)]:"maximum"in pe&&K>pe.maximum?[new _e(D,K,`${K} is greater than the maximum value ${pe.maximum}`)]:[]}function sf(H){let D=H.valueSpec,K=ol(H.value.type),pe,ke,je,We={},ft=K!=="categorical"&&H.value.property===void 0,Mt=!ft,Ut=Gs(H.value.stops)==="array"&&Gs(H.value.stops[0])==="array"&&Gs(H.value.stops[0][0])==="object",nr=Pu({key:H.key,value:H.value,valueSpec:H.styleSpec.function,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{stops:function(Hr){if(K==="identity")return[new _e(Hr.key,Hr.value,'identity function may not have a "stops" property')];let oa=[],va=Hr.value;return oa=oa.concat(kf({key:Hr.key,value:va,valueSpec:Hr.valueSpec,validateSpec:Hr.validateSpec,style:Hr.style,styleSpec:Hr.styleSpec,arrayElementValidator:Mr})),Gs(va)==="array"&&va.length===0&&oa.push(new _e(Hr.key,va,"array must have at least one stop")),oa},default:function(Hr){return Hr.validateSpec({key:Hr.key,value:Hr.value,valueSpec:D,validateSpec:Hr.validateSpec,style:Hr.style,styleSpec:Hr.styleSpec})}}});return K==="identity"&&ft&&nr.push(new _e(H.key,H.value,'missing required property "property"')),K==="identity"||H.value.stops||nr.push(new _e(H.key,H.value,'missing required property "stops"')),K==="exponential"&&H.valueSpec.expression&&!Tc(H.valueSpec)&&nr.push(new _e(H.key,H.value,"exponential functions not supported")),H.styleSpec.$version>=8&&(Mt&&!Jl(H.valueSpec)?nr.push(new _e(H.key,H.value,"property functions not supported")):ft&&!Uc(H.valueSpec)&&nr.push(new _e(H.key,H.value,"zoom functions not supported"))),K!=="categorical"&&!Ut||H.value.property!==void 0||nr.push(new _e(H.key,H.value,'"property" property is required')),nr;function Mr(Hr){let oa=[],va=Hr.value,Ga=Hr.key;if(Gs(va)!=="array")return[new _e(Ga,va,`array expected, ${Gs(va)} found`)];if(va.length!==2)return[new _e(Ga,va,`array length 2 expected, length ${va.length} found`)];if(Ut){if(Gs(va[0])!=="object")return[new _e(Ga,va,`object expected, ${Gs(va[0])} found`)];if(va[0].zoom===void 0)return[new _e(Ga,va,"object stop key must have zoom")];if(va[0].value===void 0)return[new _e(Ga,va,"object stop key must have value")];if(je&&je>ol(va[0].zoom))return[new _e(Ga,va[0].zoom,"stop zoom values must appear in ascending order")];ol(va[0].zoom)!==je&&(je=ol(va[0].zoom),ke=void 0,We={}),oa=oa.concat(Pu({key:`${Ga}[0]`,value:va[0],valueSpec:{zoom:{}},validateSpec:Hr.validateSpec,style:Hr.style,styleSpec:Hr.styleSpec,objectElementValidators:{zoom:hl,value:zr}}))}else oa=oa.concat(zr({key:`${Ga}[0]`,value:va[0],valueSpec:{},validateSpec:Hr.validateSpec,style:Hr.style,styleSpec:Hr.styleSpec},va));return Ac(mu(va[1]))?oa.concat([new _e(`${Ga}[1]`,va[1],"expressions are not allowed in function stops.")]):oa.concat(Hr.validateSpec({key:`${Ga}[1]`,value:va[1],valueSpec:D,validateSpec:Hr.validateSpec,style:Hr.style,styleSpec:Hr.styleSpec}))}function zr(Hr,oa){let va=Gs(Hr.value),Ga=ol(Hr.value),Qa=Hr.value!==null?Hr.value:oa;if(pe){if(va!==pe)return[new _e(Hr.key,Qa,`${va} stop domain type must match previous stop domain type ${pe}`)]}else pe=va;if(va!=="number"&&va!=="string"&&va!=="boolean")return[new _e(Hr.key,Qa,"stop domain value must be a number, string, or boolean")];if(va!=="number"&&K!=="categorical"){let Yi=`number expected, ${va} found`;return Jl(D)&&K===void 0&&(Yi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _e(Hr.key,Qa,Yi)]}return K!=="categorical"||va!=="number"||isFinite(Ga)&&Math.floor(Ga)===Ga?K!=="categorical"&&va==="number"&&ke!==void 0&&Ga<ke?[new _e(Hr.key,Qa,"stop domain values must appear in ascending order")]:(ke=Ga,K==="categorical"&&Ga in We?[new _e(Hr.key,Qa,"stop domain values must be unique")]:(We[Ga]=!0,[])):[new _e(Hr.key,Qa,`integer expected, found ${Ga}`)]}}function Mc(H){let D=(H.expressionContext==="property"?bu:nl)(mu(H.value),H.valueSpec);if(D.result==="error")return D.value.map(pe=>new _e(`${H.key}${pe.key}`,H.value,pe.message));let K=D.value.expression||D.value._styleExpression.expression;if(H.expressionContext==="property"&&H.propertyKey==="text-font"&&!K.outputDefined())return[new _e(H.key,H.value,`Invalid data expression for "${H.propertyKey}". Output values must be contained as literals within the expression.`)];if(H.expressionContext==="property"&&H.propertyType==="layout"&&!Gu(K))return[new _e(H.key,H.value,'"feature-state" data expressions are not supported with layout properties.')];if(H.expressionContext==="filter"&&!Gu(K))return[new _e(H.key,H.value,'"feature-state" data expressions are not supported with filters.')];if(H.expressionContext&&H.expressionContext.indexOf("cluster")===0){if(!Ef(K,["zoom","feature-state"]))return[new _e(H.key,H.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(H.expressionContext==="cluster-initial"&&!Of(K))return[new _e(H.key,H.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Hu(H){let D=H.key,K=H.value,pe=H.valueSpec,ke=[];return Array.isArray(pe.values)?pe.values.indexOf(ol(K))===-1&&ke.push(new _e(D,K,`expected one of [${pe.values.join(", ")}], ${JSON.stringify(K)} found`)):Object.keys(pe.values).indexOf(ol(K))===-1&&ke.push(new _e(D,K,`expected one of [${Object.keys(pe.values).join(", ")}], ${JSON.stringify(K)} found`)),ke}function mf(H){return Jf(mu(H.value))?Mc(fe({},H,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(H)}function Wu(H){let D=H.value,K=H.key;if(Gs(D)!=="array")return[new _e(K,D,`array expected, ${Gs(D)} found`)];let pe=H.styleSpec,ke,je=[];if(D.length<1)return[new _e(K,D,"filter array must have at least 1 element")];switch(je=je.concat(Hu({key:`${K}[0]`,value:D[0],valueSpec:pe.filter_operator,style:H.style,styleSpec:H.styleSpec})),ol(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&ol(D[1])==="$type"&&je.push(new _e(K,D,`"$type" cannot be use with operator "${D[0]}"`));case"==":case"!=":D.length!==3&&je.push(new _e(K,D,`filter array for operator "${D[0]}" must have 3 elements`));case"in":case"!in":D.length>=2&&(ke=Gs(D[1]),ke!=="string"&&je.push(new _e(`${K}[1]`,D[1],`string expected, ${ke} found`)));for(let We=2;We<D.length;We++)ke=Gs(D[We]),ol(D[1])==="$type"?je=je.concat(Hu({key:`${K}[${We}]`,value:D[We],valueSpec:pe.geometry_type,style:H.style,styleSpec:H.styleSpec})):ke!=="string"&&ke!=="number"&&ke!=="boolean"&&je.push(new _e(`${K}[${We}]`,D[We],`string, number, or boolean expected, ${ke} found`));break;case"any":case"all":case"none":for(let We=1;We<D.length;We++)je=je.concat(Wu({key:`${K}[${We}]`,value:D[We],style:H.style,styleSpec:H.styleSpec}));break;case"has":case"!has":ke=Gs(D[1]),D.length!==2?je.push(new _e(K,D,`filter array for "${D[0]}" operator must have 2 elements`)):ke!=="string"&&je.push(new _e(`${K}[1]`,D[1],`string expected, ${ke} found`))}return je}function Zc(H,D){let K=H.key,pe=H.validateSpec,ke=H.style,je=H.styleSpec,We=H.value,ft=H.objectKey,Mt=je[`${D}_${H.layerType}`];if(!Mt)return[];let Ut=ft.match(/^(.*)-transition$/);if(D==="paint"&&Ut&&Mt[Ut[1]]&&Mt[Ut[1]].transition)return pe({key:K,value:We,valueSpec:je.transition,style:ke,styleSpec:je});let nr=H.valueSpec||Mt[ft];if(!nr)return[new _e(K,We,`unknown property "${ft}"`)];let Mr;if(Gs(We)==="string"&&Jl(nr)&&!nr.tokens&&(Mr=/^{([^}]+)}$/.exec(We)))return[new _e(K,We,`"${ft}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Mr[1])} }\`.`)];let zr=[];return H.layerType==="symbol"&&(ft==="text-field"&&ke&&!ke.glyphs&&zr.push(new _e(K,We,'use of "text-field" requires a style "glyphs" property')),ft==="text-font"&&Cf(mu(We))&&ol(We.type)==="identity"&&zr.push(new _e(K,We,'"text-font" does not support identity functions'))),zr.concat(pe({key:H.key,value:We,valueSpec:nr,style:ke,styleSpec:je,expressionContext:"property",propertyType:D,propertyKey:ft}))}function Lf(H){return Zc(H,"paint")}function ru(H){return Zc(H,"layout")}function jf(H){let D=[],K=H.value,pe=H.key,ke=H.style,je=H.styleSpec;K.type||K.ref||D.push(new _e(pe,K,'either "type" or "ref" is required'));let We=ol(K.type),ft=ol(K.ref);if(K.id){let Mt=ol(K.id);for(let Ut=0;Ut<H.arrayIndex;Ut++){let nr=ke.layers[Ut];ol(nr.id)===Mt&&D.push(new _e(pe,K.id,`duplicate layer id "${K.id}", previously used at line ${nr.id.__line__}`))}}if("ref"in K){let Mt;["type","source","source-layer","filter","layout"].forEach(Ut=>{Ut in K&&D.push(new _e(pe,K[Ut],`"${Ut}" is prohibited for ref layers`))}),ke.layers.forEach(Ut=>{ol(Ut.id)===ft&&(Mt=Ut)}),Mt?Mt.ref?D.push(new _e(pe,K.ref,"ref cannot reference another ref layer")):We=ol(Mt.type):D.push(new _e(pe,K.ref,`ref layer "${ft}" not found`))}else if(We!=="background")if(K.source){let Mt=ke.sources&&ke.sources[K.source],Ut=Mt&&ol(Mt.type);Mt?Ut==="vector"&&We==="raster"?D.push(new _e(pe,K.source,`layer "${K.id}" requires a raster source`)):Ut!=="raster-dem"&&We==="hillshade"?D.push(new _e(pe,K.source,`layer "${K.id}" requires a raster-dem source`)):Ut==="raster"&&We!=="raster"?D.push(new _e(pe,K.source,`layer "${K.id}" requires a vector source`)):Ut!=="vector"||K["source-layer"]?Ut==="raster-dem"&&We!=="hillshade"?D.push(new _e(pe,K.source,"raster-dem source can only be used with layer type 'hillshade'.")):We!=="line"||!K.paint||!K.paint["line-gradient"]||Ut==="geojson"&&Mt.lineMetrics||D.push(new _e(pe,K,`layer "${K.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new _e(pe,K,`layer "${K.id}" must specify a "source-layer"`)):D.push(new _e(pe,K.source,`source "${K.source}" not found`))}else D.push(new _e(pe,K,'missing required property "source"'));return D=D.concat(Pu({key:pe,value:K,valueSpec:je.layer,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,objectElementValidators:{"*":()=>[],type:()=>H.validateSpec({key:`${pe}.type`,value:K.type,valueSpec:je.layer.type,style:H.style,styleSpec:H.styleSpec,validateSpec:H.validateSpec,object:K,objectKey:"type"}),filter:mf,layout:Mt=>Pu({layer:K,key:Mt.key,value:Mt.value,style:Mt.style,styleSpec:Mt.styleSpec,validateSpec:Mt.validateSpec,objectElementValidators:{"*":Ut=>ru(fe({layerType:We},Ut))}}),paint:Mt=>Pu({layer:K,key:Mt.key,value:Mt.value,style:Mt.style,styleSpec:Mt.styleSpec,validateSpec:Mt.validateSpec,objectElementValidators:{"*":Ut=>Lf(fe({layerType:We},Ut))}})}})),D}function Xu(H){let D=H.value,K=H.key,pe=Gs(D);return pe!=="string"?[new _e(K,D,`string expected, ${pe} found`)]:[]}let Ec={promoteId:function({key:H,value:D}){if(Gs(D)==="string")return Xu({key:H,value:D});{let K=[];for(let pe in D)K.push(...Xu({key:`${H}.${pe}`,value:D[pe]}));return K}}};function mc(H){let D=H.value,K=H.key,pe=H.styleSpec,ke=H.style,je=H.validateSpec;if(!D.type)return[new _e(K,D,'"type" is required')];let We=ol(D.type),ft;switch(We){case"vector":case"raster":return ft=Pu({key:K,value:D,valueSpec:pe[`source_${We.replace("-","_")}`],style:H.style,styleSpec:pe,objectElementValidators:Ec,validateSpec:je}),ft;case"raster-dem":return ft=function(Mt){var Ut;let nr=(Ut=Mt.sourceName)!==null&&Ut!==void 0?Ut:"",Mr=Mt.value,zr=Mt.styleSpec,Hr=zr.source_raster_dem,oa=Mt.style,va=[],Ga=Gs(Mr);if(Mr===void 0)return va;if(Ga!=="object")return va.push(new _e("source_raster_dem",Mr,`object expected, ${Ga} found`)),va;let Qa=ol(Mr.encoding)==="custom",Yi=["redFactor","greenFactor","blueFactor","baseShift"],xi=Mt.value.encoding?`"${Mt.value.encoding}"`:"Default";for(let Hi in Mr)!Qa&&Yi.includes(Hi)?va.push(new _e(Hi,Mr[Hi],`In "${nr}": "${Hi}" is only valid when "encoding" is set to "custom". ${xi} encoding found`)):Hr[Hi]?va=va.concat(Mt.validateSpec({key:Hi,value:Mr[Hi],valueSpec:Hr[Hi],validateSpec:Mt.validateSpec,style:oa,styleSpec:zr})):va.push(new _e(Hi,Mr[Hi],`unknown property "${Hi}"`));return va}({sourceName:K,value:D,style:H.style,styleSpec:pe,validateSpec:je}),ft;case"geojson":if(ft=Pu({key:K,value:D,valueSpec:pe.source_geojson,style:ke,styleSpec:pe,validateSpec:je,objectElementValidators:Ec}),D.cluster)for(let Mt in D.clusterProperties){let[Ut,nr]=D.clusterProperties[Mt],Mr=typeof Ut=="string"?[Ut,["accumulated"],["get",Mt]]:Ut;ft.push(...Mc({key:`${K}.${Mt}.map`,value:nr,validateSpec:je,expressionContext:"cluster-map"})),ft.push(...Mc({key:`${K}.${Mt}.reduce`,value:Mr,validateSpec:je,expressionContext:"cluster-reduce"}))}return ft;case"video":return Pu({key:K,value:D,valueSpec:pe.source_video,style:ke,validateSpec:je,styleSpec:pe});case"image":return Pu({key:K,value:D,valueSpec:pe.source_image,style:ke,validateSpec:je,styleSpec:pe});case"canvas":return[new _e(K,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Hu({key:`${K}.type`,value:D.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ke,validateSpec:je,styleSpec:pe})}}function jl(H){let D=H.value,K=H.styleSpec,pe=K.light,ke=H.style,je=[],We=Gs(D);if(D===void 0)return je;if(We!=="object")return je=je.concat([new _e("light",D,`object expected, ${We} found`)]),je;for(let ft in D){let Mt=ft.match(/^(.*)-transition$/);je=je.concat(Mt&&pe[Mt[1]]&&pe[Mt[1]].transition?H.validateSpec({key:ft,value:D[ft],valueSpec:K.transition,validateSpec:H.validateSpec,style:ke,styleSpec:K}):pe[ft]?H.validateSpec({key:ft,value:D[ft],valueSpec:pe[ft],validateSpec:H.validateSpec,style:ke,styleSpec:K}):[new _e(ft,D[ft],`unknown property "${ft}"`)])}return je}function gu(H){let D=H.value,K=H.styleSpec,pe=K.sky,ke=H.style,je=Gs(D);if(D===void 0)return[];if(je!=="object")return[new _e("sky",D,`object expected, ${je} found`)];let We=[];for(let ft in D)We=We.concat(pe[ft]?H.validateSpec({key:ft,value:D[ft],valueSpec:pe[ft],style:ke,styleSpec:K}):[new _e(ft,D[ft],`unknown property "${ft}"`)]);return We}function Cc(H){let D=H.value,K=H.styleSpec,pe=K.terrain,ke=H.style,je=[],We=Gs(D);if(D===void 0)return je;if(We!=="object")return je=je.concat([new _e("terrain",D,`object expected, ${We} found`)]),je;for(let ft in D)je=je.concat(pe[ft]?H.validateSpec({key:ft,value:D[ft],valueSpec:pe[ft],validateSpec:H.validateSpec,style:ke,styleSpec:K}):[new _e(ft,D[ft],`unknown property "${ft}"`)]);return je}function Yc(H){let D=[],K=H.value,pe=H.key;if(Array.isArray(K)){let ke=[],je=[];for(let We in K)K[We].id&&ke.includes(K[We].id)&&D.push(new _e(pe,K,`all the sprites' ids must be unique, but ${K[We].id} is duplicated`)),ke.push(K[We].id),K[We].url&&je.includes(K[We].url)&&D.push(new _e(pe,K,`all the sprites' URLs must be unique, but ${K[We].url} is duplicated`)),je.push(K[We].url),D=D.concat(Pu({key:`${pe}[${We}]`,value:K[We],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:H.validateSpec}));return D}return Xu({key:pe,value:K})}let sc={"*":()=>[],array:kf,boolean:function(H){let D=H.value,K=H.key,pe=Gs(D);return pe!=="boolean"?[new _e(K,D,`boolean expected, ${pe} found`)]:[]},number:hl,color:function(H){let D=H.key,K=H.value,pe=Gs(K);return pe!=="string"?[new _e(D,K,`color expected, ${pe} found`)]:Wt.parse(String(K))?[]:[new _e(D,K,`color expected, "${K}" found`)]},constants:vf,enum:Hu,filter:mf,function:sf,layer:jf,object:Pu,source:mc,light:jl,sky:gu,terrain:Cc,projection:function(H){let D=H.value,K=H.styleSpec,pe=K.projection,ke=H.style,je=Gs(D);if(D===void 0)return[];if(je!=="object")return[new _e("projection",D,`object expected, ${je} found`)];let We=[];for(let ft in D)We=We.concat(pe[ft]?H.validateSpec({key:ft,value:D[ft],valueSpec:pe[ft],style:ke,styleSpec:K}):[new _e(ft,D[ft],`unknown property "${ft}"`)]);return We},string:Xu,formatted:function(H){return Xu(H).length===0?[]:Mc(H)},resolvedImage:function(H){return Xu(H).length===0?[]:Mc(H)},padding:function(H){let D=H.key,K=H.value;if(Gs(K)==="array"){if(K.length<1||K.length>4)return[new _e(D,K,`padding requires 1 to 4 values; ${K.length} values found`)];let pe={type:"number"},ke=[];for(let je=0;je<K.length;je++)ke=ke.concat(H.validateSpec({key:`${D}[${je}]`,value:K[je],validateSpec:H.validateSpec,valueSpec:pe}));return ke}return hl({key:D,value:K,valueSpec:{}})},variableAnchorOffsetCollection:function(H){let D=H.key,K=H.value,pe=Gs(K),ke=H.styleSpec;if(pe!=="array"||K.length<1||K.length%2!=0)return[new _e(D,K,"variableAnchorOffsetCollection requires a non-empty array of even length")];let je=[];for(let We=0;We<K.length;We+=2)je=je.concat(Hu({key:`${D}[${We}]`,value:K[We],valueSpec:ke.layout_symbol["text-anchor"]})),je=je.concat(kf({key:`${D}[${We+1}]`,value:K[We+1],valueSpec:{length:2,value:"number"},validateSpec:H.validateSpec,style:H.style,styleSpec:ke}));return je},sprite:Yc};function kc(H){let D=H.value,K=H.valueSpec,pe=H.styleSpec;return H.validateSpec=kc,K.expression&&Cf(ol(D))?sf(H):K.expression&&Ac(mu(D))?Mc(H):K.type&&sc[K.type]?sc[K.type](H):Pu(fe({},H,{valueSpec:K.type?pe[K.type]:K}))}function er(H){let D=H.value,K=H.key,pe=Xu(H);return pe.length||(D.indexOf("{fontstack}")===-1&&pe.push(new _e(K,D,'"glyphs" url must include a "{fontstack}" token')),D.indexOf("{range}")===-1&&pe.push(new _e(K,D,'"glyphs" url must include a "{range}" token'))),pe}function yr(H,D=re){let K=[];return K=K.concat(kc({key:"",value:H,valueSpec:D.$root,styleSpec:D,style:H,validateSpec:kc,objectElementValidators:{glyphs:er,"*":()=>[]}})),H.constants&&(K=K.concat(vf({key:"constants",value:H.constants,style:H,styleSpec:D,validateSpec:kc}))),$r(K)}function na(H){return function(D){return H(ws(Uo({},D),{validateSpec:kc}))}}function $r(H){return[].concat(H).sort((D,K)=>D.line-K.line)}function La(H){return function(...D){return $r(H.apply(this,D))}}yr.source=La(na(mc)),yr.sprite=La(na(Yc)),yr.glyphs=La(na(er)),yr.light=La(na(jl)),yr.sky=La(na(gu)),yr.terrain=La(na(Cc)),yr.layer=La(na(jf)),yr.filter=La(na(mf)),yr.paintProperty=La(na(Lf)),yr.layoutProperty=La(na(ru));let hi=yr,Pi=hi.light,Zi=hi.sky,tn=hi.paintProperty,dn=hi.layoutProperty;function Ri(H,D){let K=!1;if(D&&D.length)for(let pe of D)H.fire(new j(new Error(pe.message))),K=!0;return K}class Fi{constructor(D,K,pe){let ke=this.cells=[];if(D instanceof ArrayBuffer){this.arrayBuffer=D;let We=new Int32Array(this.arrayBuffer);D=We[0],this.d=(K=We[1])+2*(pe=We[2]);for(let Mt=0;Mt<this.d*this.d;Mt++){let Ut=We[3+Mt],nr=We[3+Mt+1];ke.push(Ut===nr?null:We.subarray(Ut,nr))}let ft=We[3+ke.length+1];this.keys=We.subarray(We[3+ke.length],ft),this.bboxes=We.subarray(ft),this.insert=this._insertReadonly}else{this.d=K+2*pe;for(let We=0;We<this.d*this.d;We++)ke.push([]);this.keys=[],this.bboxes=[]}this.n=K,this.extent=D,this.padding=pe,this.scale=K/D,this.uid=0;let je=pe/K*D;this.min=-je,this.max=D+je}insert(D,K,pe,ke,je){this._forEachCell(K,pe,ke,je,this._insertCell,this.uid++,void 0,void 0),this.keys.push(D),this.bboxes.push(K),this.bboxes.push(pe),this.bboxes.push(ke),this.bboxes.push(je)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(D,K,pe,ke,je,We){this.cells[je].push(We)}query(D,K,pe,ke,je){let We=this.min,ft=this.max;if(D<=We&&K<=We&&ft<=pe&&ft<=ke&&!je)return Array.prototype.slice.call(this.keys);{let Mt=[];return this._forEachCell(D,K,pe,ke,this._queryCell,Mt,{},je),Mt}}_queryCell(D,K,pe,ke,je,We,ft,Mt){let Ut=this.cells[je];if(Ut!==null){let nr=this.keys,Mr=this.bboxes;for(let zr=0;zr<Ut.length;zr++){let Hr=Ut[zr];if(ft[Hr]===void 0){let oa=4*Hr;(Mt?Mt(Mr[oa+0],Mr[oa+1],Mr[oa+2],Mr[oa+3]):D<=Mr[oa+2]&&K<=Mr[oa+3]&&pe>=Mr[oa+0]&&ke>=Mr[oa+1])?(ft[Hr]=!0,We.push(nr[Hr])):ft[Hr]=!1}}}}_forEachCell(D,K,pe,ke,je,We,ft,Mt){let Ut=this._convertToCellCoord(D),nr=this._convertToCellCoord(K),Mr=this._convertToCellCoord(pe),zr=this._convertToCellCoord(ke);for(let Hr=Ut;Hr<=Mr;Hr++)for(let oa=nr;oa<=zr;oa++){let va=this.d*oa+Hr;if((!Mt||Mt(this._convertFromCellCoord(Hr),this._convertFromCellCoord(oa),this._convertFromCellCoord(Hr+1),this._convertFromCellCoord(oa+1)))&&je.call(this,D,K,pe,ke,va,We,ft,Mt))return}}_convertFromCellCoord(D){return(D-this.padding)/this.scale}_convertToCellCoord(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let D=this.cells,K=3+this.cells.length+1+1,pe=0;for(let We=0;We<this.cells.length;We++)pe+=this.cells[We].length;let ke=new Int32Array(K+pe+this.keys.length+this.bboxes.length);ke[0]=this.extent,ke[1]=this.n,ke[2]=this.padding;let je=K;for(let We=0;We<D.length;We++){let ft=D[We];ke[3+We]=je,ke.set(ft,je),je+=ft.length}return ke[3+D.length]=je,ke.set(this.keys,je),je+=this.keys.length,ke[3+D.length+1]=je,ke.set(this.bboxes,je),je+=this.bboxes.length,ke.buffer}static serialize(D,K){let pe=D.toArrayBuffer();return K&&K.push(pe),{buffer:pe}}static deserialize(D){return new Fi(D.buffer)}}let qi={};function _i(H,D,K={}){if(qi[H])throw new Error(`${H} is already registered.`);Object.defineProperty(D,"_classRegistryKey",{value:H,writeable:!1}),qi[H]={klass:D,omit:K.omit||[],shallow:K.shallow||[]}}_i("Object",Object),_i("TransferableGridIndex",Fi),_i("Color",Wt),_i("Error",Error),_i("AJAXError",he),_i("ResolvedImage",$a),_i("StylePropertyFunction",Ml),_i("StyleExpression",Lu,{omit:["_evaluator"]}),_i("ZoomDependentExpression",vu),_i("ZoomConstantExpression",dc),_i("CompoundExpression",Kl,{omit:["_evaluate"]});for(let H in rf)rf[H]._classRegistryKey||_i(`Expression_${H}`,rf[H]);function Mn(H){return H&&typeof ArrayBuffer<"u"&&(H instanceof ArrayBuffer||H.constructor&&H.constructor.name==="ArrayBuffer")}function Kn(H){return H.$name||H.constructor._classRegistryKey}function ao(H){return!function(D){if(D===null||typeof D!="object")return!1;let K=Kn(D);return!(!K||K==="Object")}(H)&&(H==null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||H instanceof Boolean||H instanceof Number||H instanceof String||H instanceof Date||H instanceof RegExp||H instanceof Blob||H instanceof Error||Mn(H)||F(H)||ArrayBuffer.isView(H)||H instanceof ImageData)}function Jn(H,D){if(ao(H))return(Mn(H)||F(H))&&D&&D.push(H),ArrayBuffer.isView(H)&&D&&D.push(H.buffer),H instanceof ImageData&&D&&D.push(H.data.buffer),H;if(Array.isArray(H)){let je=[];for(let We of H)je.push(Jn(We,D));return je}if(typeof H!="object")throw new Error("can't serialize object of type "+typeof H);let K=Kn(H);if(!K)throw new Error(`can't serialize object of unregistered class ${H.constructor.name}`);if(!qi[K])throw new Error(`${K} is not registered.`);let{klass:pe}=qi[K],ke=pe.serialize?pe.serialize(H,D):{};if(pe.serialize){if(D&&ke===D[D.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let je in H){if(!H.hasOwnProperty(je)||qi[K].omit.indexOf(je)>=0)continue;let We=H[je];ke[je]=qi[K].shallow.indexOf(je)>=0?We:Jn(We,D)}H instanceof Error&&(ke.message=H.message)}if(ke.$name)throw new Error("$name property is reserved for worker serialization logic.");return K!=="Object"&&(ke.$name=K),ke}function co(H){if(ao(H))return H;if(Array.isArray(H))return H.map(co);if(typeof H!="object")throw new Error("can't deserialize object of type "+typeof H);let D=Kn(H)||"Object";if(!qi[D])throw new Error(`can't deserialize unregistered class ${D}`);let{klass:K}=qi[D];if(!K)throw new Error(`can't deserialize unregistered class ${D}`);if(K.deserialize)return K.deserialize(H);let pe=Object.create(K.prototype);for(let ke of Object.keys(H)){if(ke==="$name")continue;let je=H[ke];pe[ke]=qi[D].shallow.indexOf(ke)>=0?je:co(je)}return pe}class wn{constructor(){this.first=!0}update(D,K){let pe=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=pe,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=pe,!0):(this.lastFloorZoom>pe?(this.lastIntegerZoom=pe+1,this.lastIntegerZoomTime=K):this.lastFloorZoom<pe&&(this.lastIntegerZoom=pe,this.lastIntegerZoomTime=K),D!==this.lastZoom&&(this.lastZoom=D,this.lastFloorZoom=pe,!0))}}let un={"Latin-1 Supplement":H=>H>=128&&H<=255,"Hangul Jamo":H=>H>=4352&&H<=4607,Khmer:H=>H>=6016&&H<=6143,"General Punctuation":H=>H>=8192&&H<=8303,"Letterlike Symbols":H=>H>=8448&&H<=8527,"Number Forms":H=>H>=8528&&H<=8591,"Miscellaneous Technical":H=>H>=8960&&H<=9215,"Control Pictures":H=>H>=9216&&H<=9279,"Optical Character Recognition":H=>H>=9280&&H<=9311,"Enclosed Alphanumerics":H=>H>=9312&&H<=9471,"Geometric Shapes":H=>H>=9632&&H<=9727,"Miscellaneous Symbols":H=>H>=9728&&H<=9983,"Miscellaneous Symbols and Arrows":H=>H>=11008&&H<=11263,"Ideographic Description Characters":H=>H>=12272&&H<=12287,"CJK Symbols and Punctuation":H=>H>=12288&&H<=12351,Katakana:H=>H>=12448&&H<=12543,Kanbun:H=>H>=12688&&H<=12703,"CJK Strokes":H=>H>=12736&&H<=12783,"Enclosed CJK Letters and Months":H=>H>=12800&&H<=13055,"CJK Compatibility":H=>H>=13056&&H<=13311,"Yijing Hexagram Symbols":H=>H>=19904&&H<=19967,"Private Use Area":H=>H>=57344&&H<=63743,"Vertical Forms":H=>H>=65040&&H<=65055,"CJK Compatibility Forms":H=>H>=65072&&H<=65103,"Small Form Variants":H=>H>=65104&&H<=65135,"Halfwidth and Fullwidth Forms":H=>H>=65280&&H<=65519};function _o(H){for(let D of H)if(ys(D.charCodeAt(0)))return!0;return!1}function Qo(H){for(let D of H)if(!Rs(D.charCodeAt(0)))return!1;return!0}function xs(H){let D=H.map(K=>{try{return new RegExp(`\\p{sc=${K}}`,"u").source}catch{return null}}).filter(K=>K);return new RegExp(D.join("|"),"u")}let Qs=xs(["Arab","Dupl","Mong","Ougr","Syrc"]);function Rs(H){return!Qs.test(String.fromCodePoint(H))}let Ks=xs(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ys(H){return!(H!==746&&H!==747&&(H<4352||!(un["CJK Compatibility Forms"](H)&&!(H>=65097&&H<=65103)||un["CJK Compatibility"](H)||un["CJK Strokes"](H)||!(!un["CJK Symbols and Punctuation"](H)||H>=12296&&H<=12305||H>=12308&&H<=12319||H===12336)||un["Enclosed CJK Letters and Months"](H)||un["Ideographic Description Characters"](H)||un.Kanbun(H)||un.Katakana(H)&&H!==12540||!(!un["Halfwidth and Fullwidth Forms"](H)||H===65288||H===65289||H===65293||H>=65306&&H<=65310||H===65339||H===65341||H===65343||H>=65371&&H<=65503||H===65507||H>=65512&&H<=65519)||!(!un["Small Form Variants"](H)||H>=65112&&H<=65118||H>=65123&&H<=65126)||un["Vertical Forms"](H)||un["Yijing Hexagram Symbols"](H)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(H))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(H))||Ks.test(String.fromCodePoint(H)))))}function Fl(H){return!(ys(H)||function(D){return!!(un["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||un["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||un["Letterlike Symbols"](D)||un["Number Forms"](D)||un["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||un["Control Pictures"](D)&&D!==9251||un["Optical Character Recognition"](D)||un["Enclosed Alphanumerics"](D)||un["Geometric Shapes"](D)||un["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||un["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||un["CJK Symbols and Punctuation"](D)||un.Katakana(D)||un["Private Use Area"](D)||un["CJK Compatibility Forms"](D)||un["Small Form Variants"](D)||un["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}(H))}let yl=xs(["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 sl(H){return yl.test(String.fromCodePoint(H))}function Un(H,D){return!(!D&&sl(H)||H>=2304&&H<=3583||H>=3840&&H<=4255||un.Khmer(H))}function Io(H){for(let D of H)if(sl(D.charCodeAt(0)))return!0;return!1}let Xs=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(H){this.pluginStatus=H.pluginStatus,this.pluginURL=H.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(H){this.applyArabicShaping=H.applyArabicShaping,this.processBidirectionalText=H.processBidirectionalText,this.processStyledBidirectionalText=H.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ls{constructor(D,K){this.zoom=D,K?(this.now=K.now,this.fadeDuration=K.fadeDuration,this.zoomHistory=K.zoomHistory,this.transition=K.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new wn,this.transition={})}isSupportedScript(D){return function(K,pe){for(let ke of K)if(!Un(ke.charCodeAt(0),pe))return!1;return!0}(D,Xs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let D=this.zoom,K=D-Math.floor(D),pe=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:K+(1-K)*pe}:{fromScale:.5,toScale:1,t:1-(1-pe)*K}}}class ou{constructor(D,K){this.property=D,this.value=K,this.expression=function(pe,ke){if(Cf(pe))return new Ml(pe,ke);if(Ac(pe)){let je=bu(pe,ke);if(je.result==="error")throw new Error(je.value.map(We=>`${We.key}: ${We.message}`).join(", "));return je.value}{let je=pe;return ke.type==="color"&&typeof pe=="string"?je=Wt.parse(pe):ke.type!=="padding"||typeof pe!="number"&&!Array.isArray(pe)?ke.type==="variableAnchorOffsetCollection"&&Array.isArray(pe)&&(je=Ha.parse(pe)):je=ra.parse(pe),{kind:"constant",evaluate:()=>je}}}(K===void 0?D.specification.default:K,D.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(D,K,pe){return this.property.possiblyEvaluate(this,D,K,pe)}}class Iu{constructor(D){this.property=D,this.value=new ou(D,void 0)}transitioned(D,K){return new Lc(this.property,this.value,K,E({},D.transition,this.transition),D.now)}untransitioned(){return new Lc(this.property,this.value,null,{},0)}}class Zu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)}getValue(D){return u(this._values[D].value.value)}setValue(D,K){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].value=new ou(this._values[D].property,K===null?void 0:u(K))}getTransition(D){return u(this._values[D].transition)}setTransition(D,K){Object.prototype.hasOwnProperty.call(this._values,D)||(this._values[D]=new Iu(this._values[D].property)),this._values[D].transition=u(K)||void 0}serialize(){let D={};for(let K of Object.keys(this._values)){let pe=this.getValue(K);pe!==void 0&&(D[K]=pe);let ke=this.getTransition(K);ke!==void 0&&(D[`${K}-transition`]=ke)}return D}transitioned(D,K){let pe=new yu(this._properties);for(let ke of Object.keys(this._values))pe._values[ke]=this._values[ke].transitioned(D,K._values[ke]);return pe}untransitioned(){let D=new yu(this._properties);for(let K of Object.keys(this._values))D._values[K]=this._values[K].untransitioned();return D}}class Lc{constructor(D,K,pe,ke,je){this.property=D,this.value=K,this.begin=je+ke.delay||0,this.end=this.begin+ke.duration||0,D.specification.transition&&(ke.delay||ke.duration)&&(this.prior=pe)}possiblyEvaluate(D,K,pe){let ke=D.now||0,je=this.value.possiblyEvaluate(D,K,pe),We=this.prior;if(We){if(ke>this.end)return this.prior=null,je;if(this.value.isDataDriven())return this.prior=null,je;if(ke<this.begin)return We.possiblyEvaluate(D,K,pe);{let ft=(ke-this.begin)/(this.end-this.begin);return this.property.interpolate(We.possiblyEvaluate(D,K,pe),je,function(Mt){if(Mt<=0)return 0;if(Mt>=1)return 1;let Ut=Mt*Mt,nr=Ut*Mt;return 4*(Mt<.5?nr:3*(Mt-Ut)+nr-.75)}(ft))}}return je}}class yu{constructor(D){this._properties=D,this._values=Object.create(D.defaultTransitioningPropertyValues)}possiblyEvaluate(D,K,pe){let ke=new gc(this._properties);for(let je of Object.keys(this._values))ke._values[je]=this._values[je].possiblyEvaluate(D,K,pe);return ke}hasTransition(){for(let D of Object.keys(this._values))if(this._values[D].prior)return!0;return!1}}class Pc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPropertyValues)}hasValue(D){return this._values[D].value!==void 0}getValue(D){return u(this._values[D].value)}setValue(D,K){this._values[D]=new ou(this._values[D].property,K===null?void 0:u(K))}serialize(){let D={};for(let K of Object.keys(this._values)){let pe=this.getValue(K);pe!==void 0&&(D[K]=pe)}return D}possiblyEvaluate(D,K,pe){let ke=new gc(this._properties);for(let je of Object.keys(this._values))ke._values[je]=this._values[je].possiblyEvaluate(D,K,pe);return ke}}class wu{constructor(D,K,pe){this.property=D,this.value=K,this.parameters=pe}isConstant(){return this.value.kind==="constant"}constantOr(D){return this.value.kind==="constant"?this.value.value:D}evaluate(D,K,pe,ke){return this.property.evaluate(this.value,this.parameters,D,K,pe,ke)}}class gc{constructor(D){this._properties=D,this._values=Object.create(D.defaultPossiblyEvaluatedValues)}get(D){return this._values[D]}}class fo{constructor(D){this.specification=D}possiblyEvaluate(D,K){if(D.isDataDriven())throw new Error("Value should not be data driven");return D.expression.evaluate(K)}interpolate(D,K,pe){let ke=Xn[this.specification.type];return ke?ke(D,K,pe):D}}class zo{constructor(D,K){this.specification=D,this.overrides=K}possiblyEvaluate(D,K,pe,ke){return new wu(this,D.expression.kind==="constant"||D.expression.kind==="camera"?{kind:"constant",value:D.expression.evaluate(K,null,{},pe,ke)}:D.expression,K)}interpolate(D,K,pe){if(D.value.kind!=="constant"||K.value.kind!=="constant")return D;if(D.value.value===void 0||K.value.value===void 0)return new wu(this,{kind:"constant",value:void 0},D.parameters);let ke=Xn[this.specification.type];if(ke){let je=ke(D.value.value,K.value.value,pe);return new wu(this,{kind:"constant",value:je},D.parameters)}return D}evaluate(D,K,pe,ke,je,We){return D.kind==="constant"?D.value:D.evaluate(K,pe,ke,je,We)}}class Ic extends zo{possiblyEvaluate(D,K,pe,ke){if(D.value===void 0)return new wu(this,{kind:"constant",value:void 0},K);if(D.expression.kind==="constant"){let je=D.expression.evaluate(K,null,{},pe,ke),We=D.property.specification.type==="resolvedImage"&&typeof je!="string"?je.name:je,ft=this._calculate(We,We,We,K);return new wu(this,{kind:"constant",value:ft},K)}if(D.expression.kind==="camera"){let je=this._calculate(D.expression.evaluate({zoom:K.zoom-1}),D.expression.evaluate({zoom:K.zoom}),D.expression.evaluate({zoom:K.zoom+1}),K);return new wu(this,{kind:"constant",value:je},K)}return new wu(this,D.expression,K)}evaluate(D,K,pe,ke,je,We){if(D.kind==="source"){let ft=D.evaluate(K,pe,ke,je,We);return this._calculate(ft,ft,ft,K)}return D.kind==="composite"?this._calculate(D.evaluate({zoom:Math.floor(K.zoom)-1},pe,ke),D.evaluate({zoom:Math.floor(K.zoom)},pe,ke),D.evaluate({zoom:Math.floor(K.zoom)+1},pe,ke),K):D.value}_calculate(D,K,pe,ke){return ke.zoom>ke.zoomHistory.lastIntegerZoom?{from:D,to:K}:{from:pe,to:K}}interpolate(D){return D}}class lc{constructor(D){this.specification=D}possiblyEvaluate(D,K,pe,ke){if(D.value!==void 0){if(D.expression.kind==="constant"){let je=D.expression.evaluate(K,null,{},pe,ke);return this._calculate(je,je,je,K)}return this._calculate(D.expression.evaluate(new Ls(Math.floor(K.zoom-1),K)),D.expression.evaluate(new Ls(Math.floor(K.zoom),K)),D.expression.evaluate(new Ls(Math.floor(K.zoom+1),K)),K)}}_calculate(D,K,pe,ke){return ke.zoom>ke.zoomHistory.lastIntegerZoom?{from:D,to:K}:{from:pe,to:K}}interpolate(D){return D}}class Yu{constructor(D){this.specification=D}possiblyEvaluate(D,K,pe,ke){return!!D.expression.evaluate(K,null,{},pe,ke)}interpolate(){return!1}}class Ne{constructor(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let K in D){let pe=D[K];pe.specification.overridable&&this.overridableProperties.push(K);let ke=this.defaultPropertyValues[K]=new ou(pe,void 0),je=this.defaultTransitionablePropertyValues[K]=new Iu(pe);this.defaultTransitioningPropertyValues[K]=je.untransitioned(),this.defaultPossiblyEvaluatedValues[K]=ke.possiblyEvaluate({})}}}_i("DataDrivenProperty",zo),_i("DataConstantProperty",fo),_i("CrossFadedDataDrivenProperty",Ic),_i("CrossFadedProperty",lc),_i("ColorRampProperty",Yu);let R="-transition";class ae extends ee{constructor(D,K){if(super(),this.id=D.id,this.type=D.type,this._featureFilter={filter:()=>!0,needGeometry:!1},D.type!=="custom"&&(this.metadata=D.metadata,this.minzoom=D.minzoom,this.maxzoom=D.maxzoom,D.type!=="background"&&(this.source=D.source,this.sourceLayer=D["source-layer"],this.filter=D.filter),K.layout&&(this._unevaluatedLayout=new Pc(K.layout)),K.paint)){this._transitionablePaint=new Zu(K.paint);for(let pe in D.paint)this.setPaintProperty(pe,D.paint[pe],{validate:!1});for(let pe in D.layout)this.setLayoutProperty(pe,D.layout[pe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new gc(K.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(D){return D==="visibility"?this.visibility:this._unevaluatedLayout.getValue(D)}setLayoutProperty(D,K,pe={}){K!=null&&this._validate(dn,`layers.${this.id}.layout.${D}`,D,K,pe)||(D!=="visibility"?this._unevaluatedLayout.setValue(D,K):this.visibility=K)}getPaintProperty(D){return D.endsWith(R)?this._transitionablePaint.getTransition(D.slice(0,-11)):this._transitionablePaint.getValue(D)}setPaintProperty(D,K,pe={}){if(K!=null&&this._validate(tn,`layers.${this.id}.paint.${D}`,D,K,pe))return!1;if(D.endsWith(R))return this._transitionablePaint.setTransition(D.slice(0,-11),K||void 0),!1;{let ke=this._transitionablePaint._values[D],je=ke.property.specification["property-type"]==="cross-faded-data-driven",We=ke.value.isDataDriven(),ft=ke.value;this._transitionablePaint.setValue(D,K),this._handleSpecialPaintPropertyUpdate(D);let Mt=this._transitionablePaint._values[D].value;return Mt.isDataDriven()||We||je||this._handleOverridablePaintPropertyUpdate(D,ft,Mt)}}_handleSpecialPaintPropertyUpdate(D){}_handleOverridablePaintPropertyUpdate(D,K,pe){return!1}isHidden(D){return!!(this.minzoom&&D<this.minzoom)||!!(this.maxzoom&&D>=this.maxzoom)||this.visibility==="none"}updateTransitions(D){this._transitioningPaint=this._transitionablePaint.transitioned(D,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(D,K){D.getCrossfadeParameters&&(this._crossfadeParameters=D.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(D,void 0,K)),this.paint=this._transitioningPaint.possiblyEvaluate(D,void 0,K)}serialize(){let D={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&&(D.layout=D.layout||{},D.layout.visibility=this.visibility),p(D,(K,pe)=>!(K===void 0||pe==="layout"&&!Object.keys(K).length||pe==="paint"&&!Object.keys(K).length))}_validate(D,K,pe,ke,je={}){return(!je||je.validate!==!1)&&Ri(this,D.call(hi,{key:K,layerType:this.type,objectKey:pe,value:ke,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let D in this.paint._values){let K=this.paint.get(D);if(K instanceof wu&&Jl(K.property.specification)&&(K.value.kind==="source"||K.value.kind==="composite")&&K.value.isStateDependent)return!0}return!1}}let we={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{constructor(D,K){this._structArray=D,this._pos1=K*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Oe{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(D,K){return D._trim(),K&&(D.isTransferred=!0,K.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}}static deserialize(D){let K=Object.create(this.prototype);return K.arrayBuffer=D.arrayBuffer,K.length=D.length,K.capacity=D.arrayBuffer.byteLength/K.bytesPerElement,K._refreshViews(),K}_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(D){this.reserve(D),this.length=D}reserve(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let K=this.uint8;this._refreshViews(),K&&this.uint8.set(K)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function pt(H,D=1){let K=0,pe=0;return{members:H.map(ke=>{let je=we[ke.type].BYTES_PER_ELEMENT,We=K=At(K,Math.max(D,je)),ft=ke.components||1;return pe=Math.max(pe,je),K+=je*ft,{name:ke.name,type:ke.type,components:ft,offset:We}}),size:At(K,Math.max(pe,D)),alignment:D}}function At(H,D){return Math.ceil(H/D)*D}class Bt extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,K)}emplace(D,K,pe){let ke=2*D;return this.int16[ke+0]=K,this.int16[ke+1]=pe,D}}Bt.prototype.bytesPerElement=4,_i("StructArrayLayout2i4",Bt);class $t extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,K,pe)}emplace(D,K,pe,ke){let je=3*D;return this.int16[je+0]=K,this.int16[je+1]=pe,this.int16[je+2]=ke,D}}$t.prototype.bytesPerElement=6,_i("StructArrayLayout3i6",$t);class br extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke){let je=this.length;return this.resize(je+1),this.emplace(je,D,K,pe,ke)}emplace(D,K,pe,ke,je){let We=4*D;return this.int16[We+0]=K,this.int16[We+1]=pe,this.int16[We+2]=ke,this.int16[We+3]=je,D}}br.prototype.bytesPerElement=8,_i("StructArrayLayout4i8",br);class Ar extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je,We){let ft=this.length;return this.resize(ft+1),this.emplace(ft,D,K,pe,ke,je,We)}emplace(D,K,pe,ke,je,We,ft){let Mt=6*D;return this.int16[Mt+0]=K,this.int16[Mt+1]=pe,this.int16[Mt+2]=ke,this.int16[Mt+3]=je,this.int16[Mt+4]=We,this.int16[Mt+5]=ft,D}}Ar.prototype.bytesPerElement=12,_i("StructArrayLayout2i4i12",Ar);class Yr extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je,We){let ft=this.length;return this.resize(ft+1),this.emplace(ft,D,K,pe,ke,je,We)}emplace(D,K,pe,ke,je,We,ft){let Mt=4*D,Ut=8*D;return this.int16[Mt+0]=K,this.int16[Mt+1]=pe,this.uint8[Ut+4]=ke,this.uint8[Ut+5]=je,this.uint8[Ut+6]=We,this.uint8[Ut+7]=ft,D}}Yr.prototype.bytesPerElement=8,_i("StructArrayLayout2i4ub8",Yr);class sa extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,K){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,K)}emplace(D,K,pe){let ke=2*D;return this.float32[ke+0]=K,this.float32[ke+1]=pe,D}}sa.prototype.bytesPerElement=8,_i("StructArrayLayout2f8",sa);class He extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je,We,ft,Mt,Ut,nr){let Mr=this.length;return this.resize(Mr+1),this.emplace(Mr,D,K,pe,ke,je,We,ft,Mt,Ut,nr)}emplace(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr){let zr=10*D;return this.uint16[zr+0]=K,this.uint16[zr+1]=pe,this.uint16[zr+2]=ke,this.uint16[zr+3]=je,this.uint16[zr+4]=We,this.uint16[zr+5]=ft,this.uint16[zr+6]=Mt,this.uint16[zr+7]=Ut,this.uint16[zr+8]=nr,this.uint16[zr+9]=Mr,D}}He.prototype.bytesPerElement=20,_i("StructArrayLayout10ui20",He);class Je extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr){let Hr=this.length;return this.resize(Hr+1),this.emplace(Hr,D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr)}emplace(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr){let oa=12*D;return this.int16[oa+0]=K,this.int16[oa+1]=pe,this.int16[oa+2]=ke,this.int16[oa+3]=je,this.uint16[oa+4]=We,this.uint16[oa+5]=ft,this.uint16[oa+6]=Mt,this.uint16[oa+7]=Ut,this.int16[oa+8]=nr,this.int16[oa+9]=Mr,this.int16[oa+10]=zr,this.int16[oa+11]=Hr,D}}Je.prototype.bytesPerElement=24,_i("StructArrayLayout4i4ui4i24",Je);class ut extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,K,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,K,pe)}emplace(D,K,pe,ke){let je=3*D;return this.float32[je+0]=K,this.float32[je+1]=pe,this.float32[je+2]=ke,D}}ut.prototype.bytesPerElement=12,_i("StructArrayLayout3f12",ut);class dt extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(D){let K=this.length;return this.resize(K+1),this.emplace(K,D)}emplace(D,K){return this.uint32[1*D+0]=K,D}}dt.prototype.bytesPerElement=4,_i("StructArrayLayout1ul4",dt);class Ct extends Oe{_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(D,K,pe,ke,je,We,ft,Mt,Ut){let nr=this.length;return this.resize(nr+1),this.emplace(nr,D,K,pe,ke,je,We,ft,Mt,Ut)}emplace(D,K,pe,ke,je,We,ft,Mt,Ut,nr){let Mr=10*D,zr=5*D;return this.int16[Mr+0]=K,this.int16[Mr+1]=pe,this.int16[Mr+2]=ke,this.int16[Mr+3]=je,this.int16[Mr+4]=We,this.int16[Mr+5]=ft,this.uint32[zr+3]=Mt,this.uint16[Mr+8]=Ut,this.uint16[Mr+9]=nr,D}}Ct.prototype.bytesPerElement=20,_i("StructArrayLayout6i1ul2ui20",Ct);class wt extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je,We){let ft=this.length;return this.resize(ft+1),this.emplace(ft,D,K,pe,ke,je,We)}emplace(D,K,pe,ke,je,We,ft){let Mt=6*D;return this.int16[Mt+0]=K,this.int16[Mt+1]=pe,this.int16[Mt+2]=ke,this.int16[Mt+3]=je,this.int16[Mt+4]=We,this.int16[Mt+5]=ft,D}}wt.prototype.bytesPerElement=12,_i("StructArrayLayout2i2i2i12",wt);class Dt extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je){let We=this.length;return this.resize(We+1),this.emplace(We,D,K,pe,ke,je)}emplace(D,K,pe,ke,je,We){let ft=4*D,Mt=8*D;return this.float32[ft+0]=K,this.float32[ft+1]=pe,this.float32[ft+2]=ke,this.int16[Mt+6]=je,this.int16[Mt+7]=We,D}}Dt.prototype.bytesPerElement=16,_i("StructArrayLayout2f1f2i16",Dt);class ur extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke,je,We){let ft=this.length;return this.resize(ft+1),this.emplace(ft,D,K,pe,ke,je,We)}emplace(D,K,pe,ke,je,We,ft){let Mt=16*D,Ut=4*D,nr=8*D;return this.uint8[Mt+0]=K,this.uint8[Mt+1]=pe,this.float32[Ut+1]=ke,this.float32[Ut+2]=je,this.int16[nr+6]=We,this.int16[nr+7]=ft,D}}ur.prototype.bytesPerElement=16,_i("StructArrayLayout2ub2f2i16",ur);class mr extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,K,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,K,pe)}emplace(D,K,pe,ke){let je=3*D;return this.uint16[je+0]=K,this.uint16[je+1]=pe,this.uint16[je+2]=ke,D}}mr.prototype.bytesPerElement=6,_i("StructArrayLayout3ui6",mr);class Er extends Oe{_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(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa){let Yi=this.length;return this.resize(Yi+1),this.emplace(Yi,D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa)}emplace(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa,Yi){let xi=24*D,Hi=12*D,rn=48*D;return this.int16[xi+0]=K,this.int16[xi+1]=pe,this.uint16[xi+2]=ke,this.uint16[xi+3]=je,this.uint32[Hi+2]=We,this.uint32[Hi+3]=ft,this.uint32[Hi+4]=Mt,this.uint16[xi+10]=Ut,this.uint16[xi+11]=nr,this.uint16[xi+12]=Mr,this.float32[Hi+7]=zr,this.float32[Hi+8]=Hr,this.uint8[rn+36]=oa,this.uint8[rn+37]=va,this.uint8[rn+38]=Ga,this.uint32[Hi+10]=Qa,this.int16[xi+22]=Yi,D}}Er.prototype.bytesPerElement=48,_i("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Er);class Br extends Oe{_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(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa,Yi,xi,Hi,rn,jn,ko,vs,go,Dn,is,Vo){let Bo=this.length;return this.resize(Bo+1),this.emplace(Bo,D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa,Yi,xi,Hi,rn,jn,ko,vs,go,Dn,is,Vo)}emplace(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va,Ga,Qa,Yi,xi,Hi,rn,jn,ko,vs,go,Dn,is,Vo,Bo){let _n=32*D,us=16*D;return this.int16[_n+0]=K,this.int16[_n+1]=pe,this.int16[_n+2]=ke,this.int16[_n+3]=je,this.int16[_n+4]=We,this.int16[_n+5]=ft,this.int16[_n+6]=Mt,this.int16[_n+7]=Ut,this.uint16[_n+8]=nr,this.uint16[_n+9]=Mr,this.uint16[_n+10]=zr,this.uint16[_n+11]=Hr,this.uint16[_n+12]=oa,this.uint16[_n+13]=va,this.uint16[_n+14]=Ga,this.uint16[_n+15]=Qa,this.uint16[_n+16]=Yi,this.uint16[_n+17]=xi,this.uint16[_n+18]=Hi,this.uint16[_n+19]=rn,this.uint16[_n+20]=jn,this.uint16[_n+21]=ko,this.uint16[_n+22]=vs,this.uint32[us+12]=go,this.float32[us+13]=Dn,this.float32[us+14]=is,this.uint16[_n+30]=Vo,this.uint16[_n+31]=Bo,D}}Br.prototype.bytesPerElement=64,_i("StructArrayLayout8i15ui1ul2f2ui64",Br);class Qr extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D){let K=this.length;return this.resize(K+1),this.emplace(K,D)}emplace(D,K){return this.float32[1*D+0]=K,D}}Qr.prototype.bytesPerElement=4,_i("StructArrayLayout1f4",Qr);class ga extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,K,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,K,pe)}emplace(D,K,pe,ke){let je=3*D;return this.uint16[6*D+0]=K,this.float32[je+1]=pe,this.float32[je+2]=ke,D}}ga.prototype.bytesPerElement=12,_i("StructArrayLayout1ui2f12",ga);class Sa extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,K,pe){let ke=this.length;return this.resize(ke+1),this.emplace(ke,D,K,pe)}emplace(D,K,pe,ke){let je=4*D;return this.uint32[2*D+0]=K,this.uint16[je+2]=pe,this.uint16[je+3]=ke,D}}Sa.prototype.bytesPerElement=8,_i("StructArrayLayout1ul2ui8",Sa);class Oa extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D,K){let pe=this.length;return this.resize(pe+1),this.emplace(pe,D,K)}emplace(D,K,pe){let ke=2*D;return this.uint16[ke+0]=K,this.uint16[ke+1]=pe,D}}Oa.prototype.bytesPerElement=4,_i("StructArrayLayout2ui4",Oa);class di extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(D){let K=this.length;return this.resize(K+1),this.emplace(K,D)}emplace(D,K){return this.uint16[1*D+0]=K,D}}di.prototype.bytesPerElement=2,_i("StructArrayLayout1ui2",di);class Wi extends Oe{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(D,K,pe,ke){let je=this.length;return this.resize(je+1),this.emplace(je,D,K,pe,ke)}emplace(D,K,pe,ke,je){let We=4*D;return this.float32[We+0]=K,this.float32[We+1]=pe,this.float32[We+2]=ke,this.float32[We+3]=je,D}}Wi.prototype.bytesPerElement=16,_i("StructArrayLayout4f16",Wi);class Gi extends Se{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 i(this.anchorPointX,this.anchorPointY)}}Gi.prototype.size=20;class on extends Ct{get(D){return new Gi(this,D)}}_i("CollisionBoxArray",on);class Tn extends Se{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(D){this._structArray.uint8[this._pos1+37]=D}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(D){this._structArray.uint8[this._pos1+38]=D}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(D){this._structArray.uint32[this._pos4+10]=D}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Tn.prototype.size=48;class Wn extends Er{get(D){return new Tn(this,D)}}_i("PlacedSymbolArray",Wn);class Bn extends Se{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(D){this._structArray.uint32[this._pos4+12]=D}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]}}Bn.prototype.size=64;class Ao extends Br{get(D){return new Bn(this,D)}}_i("SymbolInstanceArray",Ao);class ss extends Qr{getoffsetX(D){return this.float32[1*D+0]}}_i("GlyphOffsetArray",ss);class So extends $t{getx(D){return this.int16[3*D+0]}gety(D){return this.int16[3*D+1]}gettileUnitDistanceFromAnchor(D){return this.int16[3*D+2]}}_i("SymbolLineVertexArray",So);class Ko extends Se{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]}}Ko.prototype.size=12;class hs extends ga{get(D){return new Ko(this,D)}}_i("TextAnchorOffsetArray",hs);class ll extends Se{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]}}ll.prototype.size=8;class Js extends Sa{get(D){return new ll(this,D)}}_i("FeatureIndexArray",Js);class es extends Bt{}class ts extends Bt{}class Pl extends Bt{}class $l extends Ar{}class Ru extends Yr{}class hu extends sa{}class wl extends He{}class su extends Je{}class uc extends ut{}class ql extends dt{}class Vl extends wt{}class de extends ur{}class De extends mr{}class et extends Oa{}let vt=pt([{name:"a_pos",components:2,type:"Int16"}],4),{members:_t}=vt;class St{constructor(D=[]){this.segments=D}prepareSegment(D,K,pe,ke){let je=this.segments[this.segments.length-1];return D>St.MAX_VERTEX_ARRAY_LENGTH&&h(`Max vertices per segment is ${St.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${D}`),(!je||je.vertexLength+D>St.MAX_VERTEX_ARRAY_LENGTH||je.sortKey!==ke)&&(je={vertexOffset:K.length,primitiveOffset:pe.length,vertexLength:0,primitiveLength:0},ke!==void 0&&(je.sortKey=ke),this.segments.push(je)),je}get(){return this.segments}destroy(){for(let D of this.segments)for(let K in D.vaos)D.vaos[K].destroy()}static simpleSegment(D,K,pe,ke){return new St([{vertexOffset:D,primitiveOffset:K,vertexLength:pe,primitiveLength:ke,vaos:{},sortKey:0}])}}function ar(H,D){return 256*(H=w(Math.floor(H),0,255))+w(Math.floor(D),0,255)}St.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_i("SegmentVector",St);let zt=pt([{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 gr={exports:{}},Vr={exports:{}};Vr.exports=function(H,D){var K,pe,ke,je,We,ft,Mt,Ut;for(pe=H.length-(K=3&H.length),ke=D,We=3432918353,ft=461845907,Ut=0;Ut<pe;)Mt=255&H.charCodeAt(Ut)|(255&H.charCodeAt(++Ut))<<8|(255&H.charCodeAt(++Ut))<<16|(255&H.charCodeAt(++Ut))<<24,++Ut,ke=27492+(65535&(je=5*(65535&(ke=(ke^=Mt=(65535&(Mt=(Mt=(65535&Mt)*We+(((Mt>>>16)*We&65535)<<16)&4294967295)<<15|Mt>>>17))*ft+(((Mt>>>16)*ft&65535)<<16)&4294967295)<<13|ke>>>19))+((5*(ke>>>16)&65535)<<16)&4294967295))+((58964+(je>>>16)&65535)<<16);switch(Mt=0,K){case 3:Mt^=(255&H.charCodeAt(Ut+2))<<16;case 2:Mt^=(255&H.charCodeAt(Ut+1))<<8;case 1:ke^=Mt=(65535&(Mt=(Mt=(65535&(Mt^=255&H.charCodeAt(Ut)))*We+(((Mt>>>16)*We&65535)<<16)&4294967295)<<15|Mt>>>17))*ft+(((Mt>>>16)*ft&65535)<<16)&4294967295}return ke^=H.length,ke=2246822507*(65535&(ke^=ke>>>16))+((2246822507*(ke>>>16)&65535)<<16)&4294967295,ke=3266489909*(65535&(ke^=ke>>>13))+((3266489909*(ke>>>16)&65535)<<16)&4294967295,(ke^=ke>>>16)>>>0};var Wr=Vr.exports,Ta={exports:{}};Ta.exports=function(H,D){for(var K,pe=H.length,ke=D^pe,je=0;pe>=4;)K=1540483477*(65535&(K=255&H.charCodeAt(je)|(255&H.charCodeAt(++je))<<8|(255&H.charCodeAt(++je))<<16|(255&H.charCodeAt(++je))<<24))+((1540483477*(K>>>16)&65535)<<16),ke=1540483477*(65535&ke)+((1540483477*(ke>>>16)&65535)<<16)^(K=1540483477*(65535&(K^=K>>>24))+((1540483477*(K>>>16)&65535)<<16)),pe-=4,++je;switch(pe){case 3:ke^=(255&H.charCodeAt(je+2))<<16;case 2:ke^=(255&H.charCodeAt(je+1))<<8;case 1:ke=1540483477*(65535&(ke^=255&H.charCodeAt(je)))+((1540483477*(ke>>>16)&65535)<<16)}return ke=1540483477*(65535&(ke^=ke>>>13))+((1540483477*(ke>>>16)&65535)<<16),(ke^=ke>>>15)>>>0};var ya=Wr,ri=Ta.exports;gr.exports=ya,gr.exports.murmur3=ya,gr.exports.murmur2=ri;var ni=r(gr.exports);class Ma{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(D,K,pe,ke){this.ids.push(Na(D)),this.positions.push(K,pe,ke)}getPositions(D){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let K=Na(D),pe=0,ke=this.ids.length-1;for(;pe<ke;){let We=pe+ke>>1;this.ids[We]>=K?ke=We:pe=We+1}let je=[];for(;this.ids[pe]===K;)je.push({index:this.positions[3*pe],start:this.positions[3*pe+1],end:this.positions[3*pe+2]}),pe++;return je}static serialize(D,K){let pe=new Float64Array(D.ids),ke=new Uint32Array(D.positions);return Ka(pe,ke,0,pe.length-1),K&&K.push(pe.buffer,ke.buffer),{ids:pe,positions:ke}}static deserialize(D){let K=new Ma;return K.ids=D.ids,K.positions=D.positions,K.indexed=!0,K}}function Na(H){let D=+H;return!isNaN(D)&&D<=Number.MAX_SAFE_INTEGER?D:ni(String(H))}function Ka(H,D,K,pe){for(;K<pe;){let ke=H[K+pe>>1],je=K-1,We=pe+1;for(;;){do je++;while(H[je]<ke);do We--;while(H[We]>ke);if(je>=We)break;vi(H,je,We),vi(D,3*je,3*We),vi(D,3*je+1,3*We+1),vi(D,3*je+2,3*We+2)}We-K<pe-We?(Ka(H,D,K,We),K=We+1):(Ka(H,D,We+1,pe),pe=We)}}function vi(H,D,K){let pe=H[D];H[D]=H[K],H[K]=pe}_i("FeaturePositionMap",Ma);class ui{constructor(D,K){this.gl=D.gl,this.location=K}}class Pa extends ui{constructor(D,K){super(D,K),this.current=0}set(D){this.current!==D&&(this.current=D,this.gl.uniform1f(this.location,D))}}class sn extends ui{constructor(D,K){super(D,K),this.current=[0,0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]&&D[3]===this.current[3]||(this.current=D,this.gl.uniform4f(this.location,D[0],D[1],D[2],D[3]))}}class an extends ui{constructor(D,K){super(D,K),this.current=Wt.transparent}set(D){D.r===this.current.r&&D.g===this.current.g&&D.b===this.current.b&&D.a===this.current.a||(this.current=D,this.gl.uniform4f(this.location,D.r,D.g,D.b,D.a))}}let vn=new Float32Array(16);function Pn(H){return[ar(255*H.r,255*H.g),ar(255*H.b,255*H.a)]}class Zn{constructor(D,K,pe){this.value=D,this.uniformNames=K.map(ke=>`u_${ke}`),this.type=pe}setUniform(D,K,pe){D.set(pe.constantOr(this.value))}getBinding(D,K,pe){return this.type==="color"?new an(D,K):new Pa(D,K)}}class eo{constructor(D,K){this.uniformNames=K.map(pe=>`u_${pe}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(D,K){this.pixelRatioFrom=K.pixelRatio,this.pixelRatioTo=D.pixelRatio,this.patternFrom=K.tlbr,this.patternTo=D.tlbr}setUniform(D,K,pe,ke){let je=ke==="u_pattern_to"?this.patternTo:ke==="u_pattern_from"?this.patternFrom:ke==="u_pixel_ratio_to"?this.pixelRatioTo:ke==="u_pixel_ratio_from"?this.pixelRatioFrom:null;je&&D.set(je)}getBinding(D,K,pe){return pe.substr(0,9)==="u_pattern"?new sn(D,K):new Pa(D,K)}}class $o{constructor(D,K,pe,ke){this.expression=D,this.type=pe,this.maxValue=0,this.paintVertexAttributes=K.map(je=>({name:`a_${je}`,type:"Float32",components:pe==="color"?2:1,offset:0})),this.paintVertexArray=new ke}populatePaintArray(D,K,pe,ke,je){let We=this.paintVertexArray.length,ft=this.expression.evaluate(new Ls(0),K,{},ke,[],je);this.paintVertexArray.resize(D),this._setPaintValue(We,D,ft)}updatePaintArray(D,K,pe,ke){let je=this.expression.evaluate({zoom:0},pe,ke);this._setPaintValue(D,K,je)}_setPaintValue(D,K,pe){if(this.type==="color"){let ke=Pn(pe);for(let je=D;je<K;je++)this.paintVertexArray.emplace(je,ke[0],ke[1])}else{for(let ke=D;ke<K;ke++)this.paintVertexArray.emplace(ke,pe);this.maxValue=Math.max(this.maxValue,Math.abs(pe))}}upload(D){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=D.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class io{constructor(D,K,pe,ke,je,We){this.expression=D,this.uniformNames=K.map(ft=>`u_${ft}_t`),this.type=pe,this.useIntegerZoom=ke,this.zoom=je,this.maxValue=0,this.paintVertexAttributes=K.map(ft=>({name:`a_${ft}`,type:"Float32",components:pe==="color"?4:2,offset:0})),this.paintVertexArray=new We}populatePaintArray(D,K,pe,ke,je){let We=this.expression.evaluate(new Ls(this.zoom),K,{},ke,[],je),ft=this.expression.evaluate(new Ls(this.zoom+1),K,{},ke,[],je),Mt=this.paintVertexArray.length;this.paintVertexArray.resize(D),this._setPaintValue(Mt,D,We,ft)}updatePaintArray(D,K,pe,ke){let je=this.expression.evaluate({zoom:this.zoom},pe,ke),We=this.expression.evaluate({zoom:this.zoom+1},pe,ke);this._setPaintValue(D,K,je,We)}_setPaintValue(D,K,pe,ke){if(this.type==="color"){let je=Pn(pe),We=Pn(ke);for(let ft=D;ft<K;ft++)this.paintVertexArray.emplace(ft,je[0],je[1],We[0],We[1])}else{for(let je=D;je<K;je++)this.paintVertexArray.emplace(je,pe,ke);this.maxValue=Math.max(this.maxValue,Math.abs(pe),Math.abs(ke))}}upload(D){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=D.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(D,K){let pe=this.useIntegerZoom?Math.floor(K.zoom):K.zoom,ke=w(this.expression.interpolationFactor(pe,this.zoom,this.zoom+1),0,1);D.set(ke)}getBinding(D,K,pe){return new Pa(D,K)}}class Zo{constructor(D,K,pe,ke,je,We){this.expression=D,this.type=K,this.useIntegerZoom=pe,this.zoom=ke,this.layerId=We,this.zoomInPaintVertexArray=new je,this.zoomOutPaintVertexArray=new je}populatePaintArray(D,K,pe){let ke=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(D),this.zoomOutPaintVertexArray.resize(D),this._setPaintValues(ke,D,K.patterns&&K.patterns[this.layerId],pe)}updatePaintArray(D,K,pe,ke,je){this._setPaintValues(D,K,pe.patterns&&pe.patterns[this.layerId],je)}_setPaintValues(D,K,pe,ke){if(!ke||!pe)return;let{min:je,mid:We,max:ft}=pe,Mt=ke[je],Ut=ke[We],nr=ke[ft];if(Mt&&Ut&&nr)for(let Mr=D;Mr<K;Mr++)this.zoomInPaintVertexArray.emplace(Mr,Ut.tl[0],Ut.tl[1],Ut.br[0],Ut.br[1],Mt.tl[0],Mt.tl[1],Mt.br[0],Mt.br[1],Ut.pixelRatio,Mt.pixelRatio),this.zoomOutPaintVertexArray.emplace(Mr,Ut.tl[0],Ut.tl[1],Ut.br[0],Ut.br[1],nr.tl[0],nr.tl[1],nr.br[0],nr.br[1],Ut.pixelRatio,nr.pixelRatio)}upload(D){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=D.createVertexBuffer(this.zoomInPaintVertexArray,zt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=D.createVertexBuffer(this.zoomOutPaintVertexArray,zt.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class ul{constructor(D,K,pe){this.binders={},this._buffers=[];let ke=[];for(let je in D.paint._values){if(!pe(je))continue;let We=D.paint.get(je);if(!(We instanceof wu&&Jl(We.property.specification)))continue;let ft=_l(je,D.type),Mt=We.value,Ut=We.property.specification.type,nr=We.property.useIntegerZoom,Mr=We.property.specification["property-type"],zr=Mr==="cross-faded"||Mr==="cross-faded-data-driven";if(Mt.kind==="constant")this.binders[je]=zr?new eo(Mt.value,ft):new Zn(Mt.value,ft,Ut),ke.push(`/u_${je}`);else if(Mt.kind==="source"||zr){let Hr=gn(je,Ut,"source");this.binders[je]=zr?new Zo(Mt,Ut,nr,K,Hr,D.id):new $o(Mt,ft,Ut,Hr),ke.push(`/a_${je}`)}else{let Hr=gn(je,Ut,"composite");this.binders[je]=new io(Mt,ft,Ut,nr,K,Hr),ke.push(`/z_${je}`)}}this.cacheKey=ke.sort().join("")}getMaxValue(D){let K=this.binders[D];return K instanceof $o||K instanceof io?K.maxValue:0}populatePaintArrays(D,K,pe,ke,je){for(let We in this.binders){let ft=this.binders[We];(ft instanceof $o||ft instanceof io||ft instanceof Zo)&&ft.populatePaintArray(D,K,pe,ke,je)}}setConstantPatternPositions(D,K){for(let pe in this.binders){let ke=this.binders[pe];ke instanceof eo&&ke.setConstantPatternPositions(D,K)}}updatePaintArrays(D,K,pe,ke,je){let We=!1;for(let ft in D){let Mt=K.getPositions(ft);for(let Ut of Mt){let nr=pe.feature(Ut.index);for(let Mr in this.binders){let zr=this.binders[Mr];if((zr instanceof $o||zr instanceof io||zr instanceof Zo)&&zr.expression.isStateDependent===!0){let Hr=ke.paint.get(Mr);zr.expression=Hr.value,zr.updatePaintArray(Ut.start,Ut.end,nr,D[ft],je),We=!0}}}}return We}defines(){let D=[];for(let K in this.binders){let pe=this.binders[K];(pe instanceof Zn||pe instanceof eo)&&D.push(...pe.uniformNames.map(ke=>`#define HAS_UNIFORM_${ke}`))}return D}getBinderAttributes(){let D=[];for(let K in this.binders){let pe=this.binders[K];if(pe instanceof $o||pe instanceof io)for(let ke=0;ke<pe.paintVertexAttributes.length;ke++)D.push(pe.paintVertexAttributes[ke].name);else if(pe instanceof Zo)for(let ke=0;ke<zt.members.length;ke++)D.push(zt.members[ke].name)}return D}getBinderUniforms(){let D=[];for(let K in this.binders){let pe=this.binders[K];if(pe instanceof Zn||pe instanceof eo||pe instanceof io)for(let ke of pe.uniformNames)D.push(ke)}return D}getPaintVertexBuffers(){return this._buffers}getUniforms(D,K){let pe=[];for(let ke in this.binders){let je=this.binders[ke];if(je instanceof Zn||je instanceof eo||je instanceof io){for(let We of je.uniformNames)if(K[We]){let ft=je.getBinding(D,K[We],We);pe.push({name:We,property:ke,binding:ft})}}}return pe}setUniforms(D,K,pe,ke){for(let{name:je,property:We,binding:ft}of K)this.binders[We].setUniform(ft,ke,pe.get(We),je)}updatePaintBuffers(D){this._buffers=[];for(let K in this.binders){let pe=this.binders[K];if(D&&pe instanceof Zo){let ke=D.fromScale===2?pe.zoomInPaintVertexBuffer:pe.zoomOutPaintVertexBuffer;ke&&this._buffers.push(ke)}else(pe instanceof $o||pe instanceof io)&&pe.paintVertexBuffer&&this._buffers.push(pe.paintVertexBuffer)}}upload(D){for(let K in this.binders){let pe=this.binders[K];(pe instanceof $o||pe instanceof io||pe instanceof Zo)&&pe.upload(D)}this.updatePaintBuffers()}destroy(){for(let D in this.binders){let K=this.binders[D];(K instanceof $o||K instanceof io||K instanceof Zo)&&K.destroy()}}}class el{constructor(D,K,pe=()=>!0){this.programConfigurations={};for(let ke of D)this.programConfigurations[ke.id]=new ul(ke,K,pe);this.needsUpload=!1,this._featureMap=new Ma,this._bufferOffset=0}populatePaintArrays(D,K,pe,ke,je,We){for(let ft in this.programConfigurations)this.programConfigurations[ft].populatePaintArrays(D,K,ke,je,We);K.id!==void 0&&this._featureMap.add(K.id,pe,this._bufferOffset,D),this._bufferOffset=D,this.needsUpload=!0}updatePaintArrays(D,K,pe,ke){for(let je of pe)this.needsUpload=this.programConfigurations[je.id].updatePaintArrays(D,this._featureMap,K,je,ke)||this.needsUpload}get(D){return this.programConfigurations[D]}upload(D){if(this.needsUpload){for(let K in this.programConfigurations)this.programConfigurations[K].upload(D);this.needsUpload=!1}}destroy(){for(let D in this.programConfigurations)this.programConfigurations[D].destroy()}}function _l(H,D){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"]}[H]||[H.replace(`${D}-`,"").replace(/-/g,"_")]}function gn(H,D,K){let pe={color:{source:sa,composite:Wi},number:{source:Qr,composite:sa}},ke=function(je){return{"line-pattern":{source:wl,composite:wl},"fill-pattern":{source:wl,composite:wl},"fill-extrusion-pattern":{source:wl,composite:wl}}[je]}(H);return ke&&ke[K]||pe[D][K]}_i("ConstantBinder",Zn),_i("CrossFadedConstantBinder",eo),_i("SourceExpressionBinder",$o),_i("CrossFadedCompositeBinder",Zo),_i("CompositeExpressionBinder",io),_i("ProgramConfiguration",ul,{omit:["_buffers"]}),_i("ProgramConfigurationSet",el);let vo=8192,cs=Math.pow(2,14)-1,ps=-cs-1;function Tl(H){let D=vo/H.extent,K=H.loadGeometry();for(let pe=0;pe<K.length;pe++){let ke=K[pe];for(let je=0;je<ke.length;je++){let We=ke[je],ft=Math.round(We.x*D),Mt=Math.round(We.y*D);We.x=w(ft,ps,cs),We.y=w(Mt,ps,cs),(ft<We.x||ft>We.x+1||Mt<We.y||Mt>We.y+1)&&h("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return K}function Gl(H,D){return{type:H.type,id:H.id,properties:H.properties,geometry:D?Tl(H):[]}}function Tu(H,D,K,pe,ke){H.emplaceBack(2*D+(pe+1)/2,2*K+(ke+1)/2)}class Il{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(K=>K.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new ts,this.indexArray=new De,this.segments=new St,this.programConfigurations=new el(D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(K=>K.isStateDependent()).map(K=>K.id)}populate(D,K,pe){let ke=this.layers[0],je=[],We=null,ft=!1;ke.type==="circle"&&(We=ke.layout.get("circle-sort-key"),ft=!We.isConstant());for(let{feature:Mt,id:Ut,index:nr,sourceLayerIndex:Mr}of D){let zr=this.layers[0]._featureFilter.needGeometry,Hr=Gl(Mt,zr);if(!this.layers[0]._featureFilter.filter(new Ls(this.zoom),Hr,pe))continue;let oa=ft?We.evaluate(Hr,{},pe):void 0,va={id:Ut,properties:Mt.properties,type:Mt.type,sourceLayerIndex:Mr,index:nr,geometry:zr?Hr.geometry:Tl(Mt),patterns:{},sortKey:oa};je.push(va)}ft&&je.sort((Mt,Ut)=>Mt.sortKey-Ut.sortKey);for(let Mt of je){let{geometry:Ut,index:nr,sourceLayerIndex:Mr}=Mt,zr=D[nr].feature;this.addFeature(Mt,Ut,nr,pe),K.featureIndex.insert(zr,Ut,nr,Mr,this.index)}}update(D,K,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,K,this.stateDependentLayers,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,_t),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(D,K,pe,ke){for(let je of K)for(let We of je){let ft=We.x,Mt=We.y;if(ft<0||ft>=vo||Mt<0||Mt>=vo)continue;let Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),nr=Ut.vertexLength;Tu(this.layoutVertexArray,ft,Mt,-1,-1),Tu(this.layoutVertexArray,ft,Mt,1,-1),Tu(this.layoutVertexArray,ft,Mt,1,1),Tu(this.layoutVertexArray,ft,Mt,-1,1),this.indexArray.emplaceBack(nr,nr+1,nr+2),this.indexArray.emplaceBack(nr,nr+3,nr+2),Ut.vertexLength+=4,Ut.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,{},ke)}}function yc(H,D){for(let K=0;K<H.length;K++)if(Ai(D,H[K]))return!0;for(let K=0;K<D.length;K++)if(Ai(H,D[K]))return!0;return!!ua(H,D)}function nt(H,D,K){return!!Ai(H,D)||!!xa(D,H,K)}function Yt(H,D){if(H.length===1)return Ja(D,H[0]);for(let K=0;K<D.length;K++){let pe=D[K];for(let ke=0;ke<pe.length;ke++)if(Ai(H,pe[ke]))return!0}for(let K=0;K<H.length;K++)if(Ja(D,H[K]))return!0;for(let K=0;K<D.length;K++)if(ua(H,D[K]))return!0;return!1}function cr(H,D,K){if(H.length>1){if(ua(H,D))return!0;for(let pe=0;pe<D.length;pe++)if(xa(D[pe],H,K))return!0}for(let pe=0;pe<H.length;pe++)if(xa(H[pe],D,K))return!0;return!1}function ua(H,D){if(H.length===0||D.length===0)return!1;for(let K=0;K<H.length-1;K++){let pe=H[K],ke=H[K+1];for(let je=0;je<D.length-1;je++)if(Aa(pe,ke,D[je],D[je+1]))return!0}return!1}function Aa(H,D,K,pe){return P(H,K,pe)!==P(D,K,pe)&&P(H,D,K)!==P(H,D,pe)}function xa(H,D,K){let pe=K*K;if(D.length===1)return H.distSqr(D[0])<pe;for(let ke=1;ke<D.length;ke++)if(wa(H,D[ke-1],D[ke])<pe)return!0;return!1}function wa(H,D,K){let pe=D.distSqr(K);if(pe===0)return H.distSqr(D);let ke=((H.x-D.x)*(K.x-D.x)+(H.y-D.y)*(K.y-D.y))/pe;return H.distSqr(ke<0?D:ke>1?K:K.sub(D)._mult(ke)._add(D))}function Ja(H,D){let K,pe,ke,je=!1;for(let We=0;We<H.length;We++){K=H[We];for(let ft=0,Mt=K.length-1;ft<K.length;Mt=ft++)pe=K[ft],ke=K[Mt],pe.y>D.y!=ke.y>D.y&&D.x<(ke.x-pe.x)*(D.y-pe.y)/(ke.y-pe.y)+pe.x&&(je=!je)}return je}function Ai(H,D){let K=!1;for(let pe=0,ke=H.length-1;pe<H.length;ke=pe++){let je=H[pe],We=H[ke];je.y>D.y!=We.y>D.y&&D.x<(We.x-je.x)*(D.y-je.y)/(We.y-je.y)+je.x&&(K=!K)}return K}function bi(H,D,K){let pe=K[0],ke=K[2];if(H.x<pe.x&&D.x<pe.x||H.x>ke.x&&D.x>ke.x||H.y<pe.y&&D.y<pe.y||H.y>ke.y&&D.y>ke.y)return!1;let je=P(H,D,K[0]);return je!==P(H,D,K[1])||je!==P(H,D,K[2])||je!==P(H,D,K[3])}function fi(H,D,K){let pe=D.paint.get(H).value;return pe.kind==="constant"?pe.value:K.programConfigurations.get(D.id).getMaxValue(H)}function yn(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])}function Oi(H,D,K,pe,ke){if(!D[0]&&!D[1])return H;let je=i.convert(D)._mult(ke);K==="viewport"&&je._rotate(-pe);let We=[];for(let ft=0;ft<H.length;ft++)We.push(H[ft].sub(je));return We}let ki,qa;_i("CircleBucket",Il,{omit:["layers"]});var ea={get paint(){return qa=qa||new Ne({"circle-radius":new zo(re.paint_circle["circle-radius"]),"circle-color":new zo(re.paint_circle["circle-color"]),"circle-blur":new zo(re.paint_circle["circle-blur"]),"circle-opacity":new zo(re.paint_circle["circle-opacity"]),"circle-translate":new fo(re.paint_circle["circle-translate"]),"circle-translate-anchor":new fo(re.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new fo(re.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new fo(re.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new zo(re.paint_circle["circle-stroke-width"]),"circle-stroke-color":new zo(re.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new zo(re.paint_circle["circle-stroke-opacity"])})},get layout(){return ki=ki||new Ne({"circle-sort-key":new zo(re.layout_circle["circle-sort-key"])})}},Ea=1e-6,ii=typeof Float32Array<"u"?Float32Array:Array;function gi(H){return H[0]=1,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=1,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=1,H[11]=0,H[12]=0,H[13]=0,H[14]=0,H[15]=1,H}function Wa(H,D,K){var pe=D[0],ke=D[1],je=D[2],We=D[3],ft=D[4],Mt=D[5],Ut=D[6],nr=D[7],Mr=D[8],zr=D[9],Hr=D[10],oa=D[11],va=D[12],Ga=D[13],Qa=D[14],Yi=D[15],xi=K[0],Hi=K[1],rn=K[2],jn=K[3];return H[0]=xi*pe+Hi*ft+rn*Mr+jn*va,H[1]=xi*ke+Hi*Mt+rn*zr+jn*Ga,H[2]=xi*je+Hi*Ut+rn*Hr+jn*Qa,H[3]=xi*We+Hi*nr+rn*oa+jn*Yi,H[4]=(xi=K[4])*pe+(Hi=K[5])*ft+(rn=K[6])*Mr+(jn=K[7])*va,H[5]=xi*ke+Hi*Mt+rn*zr+jn*Ga,H[6]=xi*je+Hi*Ut+rn*Hr+jn*Qa,H[7]=xi*We+Hi*nr+rn*oa+jn*Yi,H[8]=(xi=K[8])*pe+(Hi=K[9])*ft+(rn=K[10])*Mr+(jn=K[11])*va,H[9]=xi*ke+Hi*Mt+rn*zr+jn*Ga,H[10]=xi*je+Hi*Ut+rn*Hr+jn*Qa,H[11]=xi*We+Hi*nr+rn*oa+jn*Yi,H[12]=(xi=K[12])*pe+(Hi=K[13])*ft+(rn=K[14])*Mr+(jn=K[15])*va,H[13]=xi*ke+Hi*Mt+rn*zr+jn*Ga,H[14]=xi*je+Hi*Ut+rn*Hr+jn*Qa,H[15]=xi*We+Hi*nr+rn*oa+jn*Yi,H}Math.hypot||(Math.hypot=function(){for(var H=0,D=arguments.length;D--;)H+=arguments[D]*arguments[D];return Math.sqrt(H)});var ji,Ii=Wa;function hn(H,D,K){var pe=D[0],ke=D[1],je=D[2],We=D[3];return H[0]=K[0]*pe+K[4]*ke+K[8]*je+K[12]*We,H[1]=K[1]*pe+K[5]*ke+K[9]*je+K[13]*We,H[2]=K[2]*pe+K[6]*ke+K[10]*je+K[14]*We,H[3]=K[3]*pe+K[7]*ke+K[11]*je+K[15]*We,H}ji=new ii(4),ii!=Float32Array&&(ji[0]=0,ji[1]=0,ji[2]=0,ji[3]=0);class Za extends ae{constructor(D){super(D,ea)}createBucket(D){return new Il(D)}queryRadius(D){let K=D;return fi("circle-radius",this,K)+fi("circle-stroke-width",this,K)+yn(this.paint.get("circle-translate"))}queryIntersectsFeature(D,K,pe,ke,je,We,ft,Mt){let Ut=Oi(D,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),We.angle,ft),nr=this.paint.get("circle-radius").evaluate(K,pe)+this.paint.get("circle-stroke-width").evaluate(K,pe),Mr=this.paint.get("circle-pitch-alignment")==="map",zr=Mr?Ut:function(oa,va){return oa.map(Ga=>Va(Ga,va))}(Ut,Mt),Hr=Mr?nr*ft:nr;for(let oa of ke)for(let va of oa){let Ga=Mr?va:Va(va,Mt),Qa=Hr,Yi=hn([],[va.x,va.y,0,1],Mt);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Qa*=Yi[3]/We.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Qa*=We.cameraToCenterDistance/Yi[3]),nt(zr,Ga,Qa))return!0}return!1}}function Va(H,D){let K=hn([],[H.x,H.y,0,1],D);return new i(K[0]/K[3],K[1]/K[3])}class $i extends Il{}let zi;_i("HeatmapBucket",$i,{omit:["layers"]});var Si={get paint(){return zi=zi||new Ne({"heatmap-radius":new zo(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new zo(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fo(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yu(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fo(re.paint_heatmap["heatmap-opacity"])})}};function Ti(H,{width:D,height:K},pe,ke){if(ke){if(ke instanceof Uint8ClampedArray)ke=new Uint8Array(ke.buffer);else if(ke.length!==D*K*pe)throw new RangeError(`mismatched image size. expected: ${ke.length} but got: ${D*K*pe}`)}else ke=new Uint8Array(D*K*pe);return H.width=D,H.height=K,H.data=ke,H}function Ki(H,{width:D,height:K},pe){if(D===H.width&&K===H.height)return;let ke=Ti({},{width:D,height:K},pe);mn(H,ke,{x:0,y:0},{x:0,y:0},{width:Math.min(H.width,D),height:Math.min(H.height,K)},pe),H.width=D,H.height=K,H.data=ke.data}function mn(H,D,K,pe,ke,je){if(ke.width===0||ke.height===0)return D;if(ke.width>H.width||ke.height>H.height||K.x>H.width-ke.width||K.y>H.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>D.width||ke.height>D.height||pe.x>D.width-ke.width||pe.y>D.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");let We=H.data,ft=D.data;if(We===ft)throw new Error("srcData equals dstData, so image is already copied");for(let Mt=0;Mt<ke.height;Mt++){let Ut=((K.y+Mt)*H.width+K.x)*je,nr=((pe.y+Mt)*D.width+pe.x)*je;for(let Mr=0;Mr<ke.width*je;Mr++)ft[nr+Mr]=We[Ut+Mr]}return D}class In{constructor(D,K){Ti(this,D,1,K)}resize(D){Ki(this,D,1)}clone(){return new In({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(D,K,pe,ke,je){mn(D,K,pe,ke,je,1)}}class Di{constructor(D,K){Ti(this,D,4,K)}resize(D){Ki(this,D,4)}replace(D,K){K?this.data.set(D):this.data=D instanceof Uint8ClampedArray?new Uint8Array(D.buffer):D}clone(){return new Di({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(D,K,pe,ke,je){mn(D,K,pe,ke,je,4)}}function nn(H){let D={},K=H.resolution||256,pe=H.clips?H.clips.length:1,ke=H.image||new Di({width:K,height:pe});if(Math.log(K)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${K}`);let je=(We,ft,Mt)=>{D[H.evaluationKey]=Mt;let Ut=H.expression.evaluate(D);ke.data[We+ft+0]=Math.floor(255*Ut.r/Ut.a),ke.data[We+ft+1]=Math.floor(255*Ut.g/Ut.a),ke.data[We+ft+2]=Math.floor(255*Ut.b/Ut.a),ke.data[We+ft+3]=Math.floor(255*Ut.a)};if(H.clips)for(let We=0,ft=0;We<pe;++We,ft+=4*K)for(let Mt=0,Ut=0;Mt<K;Mt++,Ut+=4){let nr=Mt/(K-1),{start:Mr,end:zr}=H.clips[We];je(ft,Ut,Mr*(1-nr)+zr*nr)}else for(let We=0,ft=0;We<K;We++,ft+=4)je(0,ft,We/(K-1));return ke}_i("AlphaImage",In),_i("RGBAImage",Di);let En="big-fb";class Rn extends ae{createBucket(D){return new $i(D)}constructor(D){super(D,Si),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(D){D==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=nn({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(En)&&this.heatmapFbos.delete(En)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Gn;var Ps={get paint(){return Gn=Gn||new Ne({"hillshade-illumination-direction":new fo(re.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new fo(re.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new fo(re.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new fo(re.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new fo(re.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new fo(re.paint_hillshade["hillshade-accent-color"])})}};class xl extends ae{constructor(D){super(D,Ps)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let ho=pt([{name:"a_pos",components:2,type:"Int16"}],4),{members:Hl}=ho;function fs(H,D,K=2){let pe=D&&D.length,ke=pe?D[0]*K:H.length,je=Al(H,0,ke,K,!0),We=[];if(!je||je.next===je.prev)return We;let ft,Mt,Ut;if(pe&&(je=function(nr,Mr,zr,Hr){let oa=[];for(let va=0,Ga=Mr.length;va<Ga;va++){let Qa=Al(nr,Mr[va]*Hr,va<Ga-1?Mr[va+1]*Hr:nr.length,Hr,!1);Qa===Qa.next&&(Qa.steiner=!0),oa.push(ye(Qa))}oa.sort(Cl);for(let va=0;va<oa.length;va++)zr=Lo(oa[va],zr);return zr}(H,D,je,K)),H.length>80*K){ft=1/0,Mt=1/0;let nr=-1/0,Mr=-1/0;for(let zr=K;zr<ke;zr+=K){let Hr=H[zr],oa=H[zr+1];Hr<ft&&(ft=Hr),oa<Mt&&(Mt=oa),Hr>nr&&(nr=Hr),oa>Mr&&(Mr=oa)}Ut=Math.max(nr-ft,Mr-Mt),Ut=Ut!==0?32767/Ut:0}return Ql(je,We,K,ft,Mt,Ut,0),We}function Al(H,D,K,pe,ke){let je;if(ke===function(We,ft,Mt,Ut){let nr=0;for(let Mr=ft,zr=Mt-Ut;Mr<Mt;Mr+=Ut)nr+=(We[zr]-We[Mr])*(We[Mr+1]+We[zr+1]),zr=Mr;return nr}(H,D,K,pe)>0)for(let We=D;We<K;We+=pe)je=hr(We/pe|0,H[We],H[We+1],je);else for(let We=K-pe;We>=D;We-=pe)je=hr(We/pe|0,H[We],H[We+1],je);return je&&Le(je,je.next)&&(gt(je),je=je.next),je}function El(H,D){if(!H)return H;D||(D=H);let K,pe=H;do if(K=!1,pe.steiner||!Le(pe,pe.next)&&Ge(pe.prev,pe,pe.next)!==0)pe=pe.next;else{if(gt(pe),pe=D=pe.prev,pe===pe.next)break;K=!0}while(K||pe!==D);return D}function Ql(H,D,K,pe,ke,je,We){if(!H)return;!We&&je&&function(Mt,Ut,nr,Mr){let zr=Mt;do zr.z===0&&(zr.z=Y(zr.x,zr.y,Ut,nr,Mr)),zr.prevZ=zr.prev,zr.nextZ=zr.next,zr=zr.next;while(zr!==Mt);zr.prevZ.nextZ=null,zr.prevZ=null,function(Hr){let oa,va=1;do{let Ga,Qa=Hr;Hr=null;let Yi=null;for(oa=0;Qa;){oa++;let xi=Qa,Hi=0;for(let jn=0;jn<va&&(Hi++,xi=xi.nextZ,xi);jn++);let rn=va;for(;Hi>0||rn>0&&xi;)Hi!==0&&(rn===0||!xi||Qa.z<=xi.z)?(Ga=Qa,Qa=Qa.nextZ,Hi--):(Ga=xi,xi=xi.nextZ,rn--),Yi?Yi.nextZ=Ga:Hr=Ga,Ga.prevZ=Yi,Yi=Ga;Qa=xi}Yi.nextZ=null,va*=2}while(oa>1)}(zr)}(H,pe,ke,je);let ft=H;for(;H.prev!==H.next;){let Mt=H.prev,Ut=H.next;if(je?pl(H,pe,ke,je):Fs(H))D.push(Mt.i,H.i,Ut.i),gt(H),H=Ut.next,ft=Ut.next;else if((H=Ut)===ft){We?We===1?Ql(H=bl(El(H),D),D,K,pe,ke,je,2):We===2&&Hn(H,D,K,pe,ke,je):Ql(El(H),D,K,pe,ke,je,1);break}}}function Fs(H){let D=H.prev,K=H,pe=H.next;if(Ge(D,K,pe)>=0)return!1;let ke=D.x,je=K.x,We=pe.x,ft=D.y,Mt=K.y,Ut=pe.y,nr=ke<je?ke<We?ke:We:je<We?je:We,Mr=ft<Mt?ft<Ut?ft:Ut:Mt<Ut?Mt:Ut,zr=ke>je?ke>We?ke:We:je>We?je:We,Hr=ft>Mt?ft>Ut?ft:Ut:Mt>Ut?Mt:Ut,oa=pe.next;for(;oa!==D;){if(oa.x>=nr&&oa.x<=zr&&oa.y>=Mr&&oa.y<=Hr&&te(ke,ft,je,Mt,We,Ut,oa.x,oa.y)&&Ge(oa.prev,oa,oa.next)>=0)return!1;oa=oa.next}return!0}function pl(H,D,K,pe){let ke=H.prev,je=H,We=H.next;if(Ge(ke,je,We)>=0)return!1;let ft=ke.x,Mt=je.x,Ut=We.x,nr=ke.y,Mr=je.y,zr=We.y,Hr=ft<Mt?ft<Ut?ft:Ut:Mt<Ut?Mt:Ut,oa=nr<Mr?nr<zr?nr:zr:Mr<zr?Mr:zr,va=ft>Mt?ft>Ut?ft:Ut:Mt>Ut?Mt:Ut,Ga=nr>Mr?nr>zr?nr:zr:Mr>zr?Mr:zr,Qa=Y(Hr,oa,D,K,pe),Yi=Y(va,Ga,D,K,pe),xi=H.prevZ,Hi=H.nextZ;for(;xi&&xi.z>=Qa&&Hi&&Hi.z<=Yi;){if(xi.x>=Hr&&xi.x<=va&&xi.y>=oa&&xi.y<=Ga&&xi!==ke&&xi!==We&&te(ft,nr,Mt,Mr,Ut,zr,xi.x,xi.y)&&Ge(xi.prev,xi,xi.next)>=0||(xi=xi.prevZ,Hi.x>=Hr&&Hi.x<=va&&Hi.y>=oa&&Hi.y<=Ga&&Hi!==ke&&Hi!==We&&te(ft,nr,Mt,Mr,Ut,zr,Hi.x,Hi.y)&&Ge(Hi.prev,Hi,Hi.next)>=0))return!1;Hi=Hi.nextZ}for(;xi&&xi.z>=Qa;){if(xi.x>=Hr&&xi.x<=va&&xi.y>=oa&&xi.y<=Ga&&xi!==ke&&xi!==We&&te(ft,nr,Mt,Mr,Ut,zr,xi.x,xi.y)&&Ge(xi.prev,xi,xi.next)>=0)return!1;xi=xi.prevZ}for(;Hi&&Hi.z<=Yi;){if(Hi.x>=Hr&&Hi.x<=va&&Hi.y>=oa&&Hi.y<=Ga&&Hi!==ke&&Hi!==We&&te(ft,nr,Mt,Mr,Ut,zr,Hi.x,Hi.y)&&Ge(Hi.prev,Hi,Hi.next)>=0)return!1;Hi=Hi.nextZ}return!0}function bl(H,D){let K=H;do{let pe=K.prev,ke=K.next.next;!Le(pe,ke)&&$e(pe,K,K.next,ke)&&_r(pe,ke)&&_r(ke,pe)&&(D.push(pe.i,K.i,ke.i),gt(K),gt(K.next),K=H=ke),K=K.next}while(K!==H);return El(K)}function Hn(H,D,K,pe,ke,je){let We=H;do{let ft=We.next.next;for(;ft!==We.prev;){if(We.i!==ft.i&&me(We,ft)){let Mt=Fr(We,ft);return We=El(We,We.next),Mt=El(Mt,Mt.next),Ql(We,D,K,pe,ke,je,0),void Ql(Mt,D,K,pe,ke,je,0)}ft=ft.next}We=We.next}while(We!==H)}function Cl(H,D){return H.x-D.x}function Lo(H,D){let K=function(ke,je){let We=je,ft=ke.x,Mt=ke.y,Ut,nr=-1/0;do{if(Mt<=We.y&&Mt>=We.next.y&&We.next.y!==We.y){let va=We.x+(Mt-We.y)*(We.next.x-We.x)/(We.next.y-We.y);if(va<=ft&&va>nr&&(nr=va,Ut=We.x<We.next.x?We:We.next,va===ft))return Ut}We=We.next}while(We!==je);if(!Ut)return null;let Mr=Ut,zr=Ut.x,Hr=Ut.y,oa=1/0;We=Ut;do{if(ft>=We.x&&We.x>=zr&&ft!==We.x&&te(Mt<Hr?ft:nr,Mt,zr,Hr,Mt<Hr?nr:ft,Mt,We.x,We.y)){let va=Math.abs(Mt-We.y)/(ft-We.x);_r(We,ke)&&(va<oa||va===oa&&(We.x>Ut.x||We.x===Ut.x&&ve(Ut,We)))&&(Ut=We,oa=va)}We=We.next}while(We!==Mr);return Ut}(H,D);if(!K)return D;let pe=Fr(K,H);return El(pe,pe.next),El(K,K.next)}function ve(H,D){return Ge(H.prev,H,D.prev)<0&&Ge(D.next,H,H.next)<0}function Y(H,D,K,pe,ke){return(H=1431655765&((H=858993459&((H=252645135&((H=16711935&((H=(H-K)*ke|0)|H<<8))|H<<4))|H<<2))|H<<1))|(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-pe)*ke|0)|D<<8))|D<<4))|D<<2))|D<<1))<<1}function ye(H){let D=H,K=H;do(D.x<K.x||D.x===K.x&&D.y<K.y)&&(K=D),D=D.next;while(D!==H);return K}function te(H,D,K,pe,ke,je,We,ft){return(ke-We)*(D-ft)>=(H-We)*(je-ft)&&(H-We)*(pe-ft)>=(K-We)*(D-ft)&&(K-We)*(je-ft)>=(ke-We)*(pe-ft)}function me(H,D){return H.next.i!==D.i&&H.prev.i!==D.i&&!function(K,pe){let ke=K;do{if(ke.i!==K.i&&ke.next.i!==K.i&&ke.i!==pe.i&&ke.next.i!==pe.i&&$e(ke,ke.next,K,pe))return!0;ke=ke.next}while(ke!==K);return!1}(H,D)&&(_r(H,D)&&_r(D,H)&&function(K,pe){let ke=K,je=!1,We=(K.x+pe.x)/2,ft=(K.y+pe.y)/2;do ke.y>ft!=ke.next.y>ft&&ke.next.y!==ke.y&&We<(ke.next.x-ke.x)*(ft-ke.y)/(ke.next.y-ke.y)+ke.x&&(je=!je),ke=ke.next;while(ke!==K);return je}(H,D)&&(Ge(H.prev,H,D.prev)||Ge(H,D.prev,D))||Le(H,D)&&Ge(H.prev,H,H.next)>0&&Ge(D.prev,D,D.next)>0)}function Ge(H,D,K){return(D.y-H.y)*(K.x-D.x)-(D.x-H.x)*(K.y-D.y)}function Le(H,D){return H.x===D.x&&H.y===D.y}function $e(H,D,K,pe){let ke=jt(Ge(H,D,K)),je=jt(Ge(H,D,pe)),We=jt(Ge(K,pe,H)),ft=jt(Ge(K,pe,D));return ke!==je&&We!==ft||!(ke!==0||!mt(H,K,D))||!(je!==0||!mt(H,pe,D))||!(We!==0||!mt(K,H,pe))||!(ft!==0||!mt(K,D,pe))}function mt(H,D,K){return D.x<=Math.max(H.x,K.x)&&D.x>=Math.min(H.x,K.x)&&D.y<=Math.max(H.y,K.y)&&D.y>=Math.min(H.y,K.y)}function jt(H){return H>0?1:H<0?-1:0}function _r(H,D){return Ge(H.prev,H,H.next)<0?Ge(H,D,H.next)>=0&&Ge(H,H.prev,D)>=0:Ge(H,D,H.prev)<0||Ge(H,H.next,D)<0}function Fr(H,D){let K=Et(H.i,H.x,H.y),pe=Et(D.i,D.x,D.y),ke=H.next,je=D.prev;return H.next=D,D.prev=H,K.next=ke,ke.prev=K,pe.next=K,K.prev=pe,je.next=pe,pe.prev=je,pe}function hr(H,D,K,pe){let ke=Et(H,D,K);return pe?(ke.next=pe.next,ke.prev=pe,pe.next.prev=ke,pe.next=ke):(ke.prev=ke,ke.next=ke),ke}function gt(H){H.next.prev=H.prev,H.prev.next=H.next,H.prevZ&&(H.prevZ.nextZ=H.nextZ),H.nextZ&&(H.nextZ.prevZ=H.prevZ)}function Et(H,D,K){return{i:H,x:D,y:K,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Ft(H,D,K){let pe=K.patternDependencies,ke=!1;for(let je of D){let We=je.paint.get(`${H}-pattern`);We.isConstant()||(ke=!0);let ft=We.constantOr(null);ft&&(ke=!0,pe[ft.to]=!0,pe[ft.from]=!0)}return ke}function ir(H,D,K,pe,ke){let je=ke.patternDependencies;for(let We of D){let ft=We.paint.get(`${H}-pattern`).value;if(ft.kind!=="constant"){let Mt=ft.evaluate({zoom:pe-1},K,{},ke.availableImages),Ut=ft.evaluate({zoom:pe},K,{},ke.availableImages),nr=ft.evaluate({zoom:pe+1},K,{},ke.availableImages);Mt=Mt&&Mt.name?Mt.name:Mt,Ut=Ut&&Ut.name?Ut.name:Ut,nr=nr&&nr.name?nr.name:nr,je[Mt]=!0,je[Ut]=!0,je[nr]=!0,K.patterns[We.id]={min:Mt,mid:Ut,max:nr}}}return K}class fr{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(K=>K.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Pl,this.indexArray=new De,this.indexArray2=new et,this.programConfigurations=new el(D.layers,D.zoom),this.segments=new St,this.segments2=new St,this.stateDependentLayerIds=this.layers.filter(K=>K.isStateDependent()).map(K=>K.id)}populate(D,K,pe){this.hasPattern=Ft("fill",this.layers,K);let ke=this.layers[0].layout.get("fill-sort-key"),je=!ke.isConstant(),We=[];for(let{feature:ft,id:Mt,index:Ut,sourceLayerIndex:nr}of D){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Gl(ft,Mr);if(!this.layers[0]._featureFilter.filter(new Ls(this.zoom),zr,pe))continue;let Hr=je?ke.evaluate(zr,{},pe,K.availableImages):void 0,oa={id:Mt,properties:ft.properties,type:ft.type,sourceLayerIndex:nr,index:Ut,geometry:Mr?zr.geometry:Tl(ft),patterns:{},sortKey:Hr};We.push(oa)}je&&We.sort((ft,Mt)=>ft.sortKey-Mt.sortKey);for(let ft of We){let{geometry:Mt,index:Ut,sourceLayerIndex:nr}=ft;if(this.hasPattern){let Mr=ir("fill",this.layers,ft,this.zoom,K);this.patternFeatures.push(Mr)}else this.addFeature(ft,Mt,Ut,pe,{});K.featureIndex.insert(D[Ut].feature,Mt,Ut,nr,this.index)}}update(D,K,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,K,this.stateDependentLayers,pe)}addFeatures(D,K,pe){for(let ke of this.patternFeatures)this.addFeature(ke,ke.geometry,ke.index,K,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Hl),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.indexBuffer2=D.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(D),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(D,K,pe,ke,je){for(let We of Bc(K,500)){let ft=0;for(let Hr of We)ft+=Hr.length;let Mt=this.segments.prepareSegment(ft,this.layoutVertexArray,this.indexArray),Ut=Mt.vertexLength,nr=[],Mr=[];for(let Hr of We){if(Hr.length===0)continue;Hr!==We[0]&&Mr.push(nr.length/2);let oa=this.segments2.prepareSegment(Hr.length,this.layoutVertexArray,this.indexArray2),va=oa.vertexLength;this.layoutVertexArray.emplaceBack(Hr[0].x,Hr[0].y),this.indexArray2.emplaceBack(va+Hr.length-1,va),nr.push(Hr[0].x),nr.push(Hr[0].y);for(let Ga=1;Ga<Hr.length;Ga++)this.layoutVertexArray.emplaceBack(Hr[Ga].x,Hr[Ga].y),this.indexArray2.emplaceBack(va+Ga-1,va+Ga),nr.push(Hr[Ga].x),nr.push(Hr[Ga].y);oa.vertexLength+=Hr.length,oa.primitiveLength+=Hr.length}let zr=fs(nr,Mr);for(let Hr=0;Hr<zr.length;Hr+=3)this.indexArray.emplaceBack(Ut+zr[Hr],Ut+zr[Hr+1],Ut+zr[Hr+2]);Mt.vertexLength+=ft,Mt.primitiveLength+=zr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}}let sr,pr;_i("FillBucket",fr,{omit:["layers","patternFeatures"]});var lr={get paint(){return pr=pr||new Ne({"fill-antialias":new fo(re.paint_fill["fill-antialias"]),"fill-opacity":new zo(re.paint_fill["fill-opacity"]),"fill-color":new zo(re.paint_fill["fill-color"]),"fill-outline-color":new zo(re.paint_fill["fill-outline-color"]),"fill-translate":new fo(re.paint_fill["fill-translate"]),"fill-translate-anchor":new fo(re.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ic(re.paint_fill["fill-pattern"])})},get layout(){return sr=sr||new Ne({"fill-sort-key":new zo(re.layout_fill["fill-sort-key"])})}};class Xt extends ae{constructor(D){super(D,lr)}recalculate(D,K){super.recalculate(D,K);let pe=this.paint._values["fill-outline-color"];pe.value.kind==="constant"&&pe.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(D){return new fr(D)}queryRadius(){return yn(this.paint.get("fill-translate"))}queryIntersectsFeature(D,K,pe,ke,je,We,ft){return Yt(Oi(D,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),We.angle,ft),ke)}isTileClipped(){return!0}}let or=pt([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),qt=pt([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Dr}=or;var Jr={},ba=o,yi=Xa;function Xa(H,D,K,pe,ke){this.properties={},this.extent=K,this.type=0,this._pbf=H,this._geometry=-1,this._keys=pe,this._values=ke,H.readFields(si,this,D)}function si(H,D,K){H==1?D.id=K.readVarint():H==2?function(pe,ke){for(var je=pe.readVarint()+pe.pos;pe.pos<je;){var We=ke._keys[pe.readVarint()],ft=ke._values[pe.readVarint()];ke.properties[We]=ft}}(K,D):H==3?D.type=K.readVarint():H==4&&(D._geometry=K.pos)}function Ji(H){for(var D,K,pe=0,ke=0,je=H.length,We=je-1;ke<je;We=ke++)pe+=((K=H[We]).x-(D=H[ke]).x)*(D.y+K.y);return pe}Xa.types=["Unknown","Point","LineString","Polygon"],Xa.prototype.loadGeometry=function(){var H=this._pbf;H.pos=this._geometry;for(var D,K=H.readVarint()+H.pos,pe=1,ke=0,je=0,We=0,ft=[];H.pos<K;){if(ke<=0){var Mt=H.readVarint();pe=7&Mt,ke=Mt>>3}if(ke--,pe===1||pe===2)je+=H.readSVarint(),We+=H.readSVarint(),pe===1&&(D&&ft.push(D),D=[]),D.push(new ba(je,We));else{if(pe!==7)throw new Error("unknown command "+pe);D&&D.push(D[0].clone())}}return D&&ft.push(D),ft},Xa.prototype.bbox=function(){var H=this._pbf;H.pos=this._geometry;for(var D=H.readVarint()+H.pos,K=1,pe=0,ke=0,je=0,We=1/0,ft=-1/0,Mt=1/0,Ut=-1/0;H.pos<D;){if(pe<=0){var nr=H.readVarint();K=7&nr,pe=nr>>3}if(pe--,K===1||K===2)(ke+=H.readSVarint())<We&&(We=ke),ke>ft&&(ft=ke),(je+=H.readSVarint())<Mt&&(Mt=je),je>Ut&&(Ut=je);else if(K!==7)throw new Error("unknown command "+K)}return[We,Mt,ft,Ut]},Xa.prototype.toGeoJSON=function(H,D,K){var pe,ke,je=this.extent*Math.pow(2,K),We=this.extent*H,ft=this.extent*D,Mt=this.loadGeometry(),Ut=Xa.types[this.type];function nr(Hr){for(var oa=0;oa<Hr.length;oa++){var va=Hr[oa];Hr[oa]=[360*(va.x+We)/je-180,360/Math.PI*Math.atan(Math.exp((180-360*(va.y+ft)/je)*Math.PI/180))-90]}}switch(this.type){case 1:var Mr=[];for(pe=0;pe<Mt.length;pe++)Mr[pe]=Mt[pe][0];nr(Mt=Mr);break;case 2:for(pe=0;pe<Mt.length;pe++)nr(Mt[pe]);break;case 3:for(Mt=function(Hr){var oa=Hr.length;if(oa<=1)return[Hr];for(var va,Ga,Qa=[],Yi=0;Yi<oa;Yi++){var xi=Ji(Hr[Yi]);xi!==0&&(Ga===void 0&&(Ga=xi<0),Ga===xi<0?(va&&Qa.push(va),va=[Hr[Yi]]):va.push(Hr[Yi]))}return va&&Qa.push(va),Qa}(Mt),pe=0;pe<Mt.length;pe++)for(ke=0;ke<Mt[pe].length;ke++)nr(Mt[pe][ke])}Mt.length===1?Mt=Mt[0]:Ut="Multi"+Ut;var zr={type:"Feature",geometry:{type:Ut,coordinates:Mt},properties:this.properties};return"id"in this&&(zr.id=this.id),zr};var Bi=yi,pi=wi;function wi(H,D){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=H,this._keys=[],this._values=[],this._features=[],H.readFields(Mi,this,D),this.length=this._features.length}function Mi(H,D,K){H===15?D.version=K.readVarint():H===1?D.name=K.readString():H===5?D.extent=K.readVarint():H===2?D._features.push(K.pos):H===3?D._keys.push(K.readString()):H===4&&D._values.push(function(pe){for(var ke=null,je=pe.readVarint()+pe.pos;pe.pos<je;){var We=pe.readVarint()>>3;ke=We===1?pe.readString():We===2?pe.readFloat():We===3?pe.readDouble():We===4?pe.readVarint64():We===5?pe.readVarint():We===6?pe.readSVarint():We===7?pe.readBoolean():null}return ke}(K))}wi.prototype.feature=function(H){if(H<0||H>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[H];var D=this._pbf.readVarint()+this._pbf.pos;return new Bi(this._pbf,D,this.extent,this._keys,this._values)};var Vi=pi;function cn(H,D,K){if(H===3){var pe=new Vi(K,K.readVarint()+K.pos);pe.length&&(D[pe.name]=pe)}}Jr.VectorTile=function(H,D){this.layers=H.readFields(cn,{},D)},Jr.VectorTileFeature=yi,Jr.VectorTileLayer=pi;let xo=Jr.VectorTileFeature.types,jo=Math.pow(2,13);function ks(H,D,K,pe,ke,je,We,ft){H.emplaceBack(D,K,2*Math.floor(pe*jo)+We,ke*jo*2,je*jo*2,Math.round(ft))}class Fo{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(K=>K.id),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new $l,this.centroidVertexArray=new es,this.indexArray=new De,this.programConfigurations=new el(D.layers,D.zoom),this.segments=new St,this.stateDependentLayerIds=this.layers.filter(K=>K.isStateDependent()).map(K=>K.id)}populate(D,K,pe){this.features=[],this.hasPattern=Ft("fill-extrusion",this.layers,K);for(let{feature:ke,id:je,index:We,sourceLayerIndex:ft}of D){let Mt=this.layers[0]._featureFilter.needGeometry,Ut=Gl(ke,Mt);if(!this.layers[0]._featureFilter.filter(new Ls(this.zoom),Ut,pe))continue;let nr={id:je,sourceLayerIndex:ft,index:We,geometry:Mt?Ut.geometry:Tl(ke),properties:ke.properties,type:ke.type,patterns:{}};this.hasPattern?this.features.push(ir("fill-extrusion",this.layers,nr,this.zoom,K)):this.addFeature(nr,nr.geometry,We,pe,{}),K.featureIndex.insert(ke,nr.geometry,We,ft,this.index,!0)}}addFeatures(D,K,pe){for(let ke of this.features){let{geometry:je}=ke;this.addFeature(ke,je,ke.index,K,pe)}}update(D,K,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,K,this.stateDependentLayers,pe)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,Dr),this.centroidVertexBuffer=D.createVertexBuffer(this.centroidVertexArray,qt.members,!0),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(D,K,pe,ke,je){for(let We of Bc(K,500)){let ft={x:0,y:0,vertexCount:0},Mt=0;for(let oa of We)Mt+=oa.length;let Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let oa of We){if(oa.length===0||Hs(oa))continue;let va=0;for(let Ga=0;Ga<oa.length;Ga++){let Qa=oa[Ga];if(Ga>=1){let Yi=oa[Ga-1];if(!bs(Qa,Yi)){Ut.vertexLength+4>St.MAX_VERTEX_ARRAY_LENGTH&&(Ut=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let xi=Qa.sub(Yi)._perp()._unit(),Hi=Yi.dist(Qa);va+Hi>32768&&(va=0),ks(this.layoutVertexArray,Qa.x,Qa.y,xi.x,xi.y,0,0,va),ks(this.layoutVertexArray,Qa.x,Qa.y,xi.x,xi.y,0,1,va),ft.x+=2*Qa.x,ft.y+=2*Qa.y,ft.vertexCount+=2,va+=Hi,ks(this.layoutVertexArray,Yi.x,Yi.y,xi.x,xi.y,0,0,va),ks(this.layoutVertexArray,Yi.x,Yi.y,xi.x,xi.y,0,1,va),ft.x+=2*Yi.x,ft.y+=2*Yi.y,ft.vertexCount+=2;let rn=Ut.vertexLength;this.indexArray.emplaceBack(rn,rn+2,rn+1),this.indexArray.emplaceBack(rn+1,rn+2,rn+3),Ut.vertexLength+=4,Ut.primitiveLength+=2}}}}if(Ut.vertexLength+Mt>St.MAX_VERTEX_ARRAY_LENGTH&&(Ut=this.segments.prepareSegment(Mt,this.layoutVertexArray,this.indexArray)),xo[D.type]!=="Polygon")continue;let nr=[],Mr=[],zr=Ut.vertexLength;for(let oa of We)if(oa.length!==0){oa!==We[0]&&Mr.push(nr.length/2);for(let va=0;va<oa.length;va++){let Ga=oa[va];ks(this.layoutVertexArray,Ga.x,Ga.y,0,0,1,1,0),ft.x+=Ga.x,ft.y+=Ga.y,ft.vertexCount+=1,nr.push(Ga.x),nr.push(Ga.y)}}let Hr=fs(nr,Mr);for(let oa=0;oa<Hr.length;oa+=3)this.indexArray.emplaceBack(zr+Hr[oa],zr+Hr[oa+2],zr+Hr[oa+1]);Ut.primitiveLength+=Hr.length/3,Ut.vertexLength+=Mt;for(let oa=0;oa<ft.vertexCount;oa++){let va=Math.floor(ft.x/ft.vertexCount),Ga=Math.floor(ft.y/ft.vertexCount);this.centroidVertexArray.emplaceBack(va,Ga)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}}function bs(H,D){return H.x===D.x&&(H.x<0||H.x>vo)||H.y===D.y&&(H.y<0||H.y>vo)}function Hs(H){return H.every(D=>D.x<0)||H.every(D=>D.x>vo)||H.every(D=>D.y<0)||H.every(D=>D.y>vo)}let pu;_i("FillExtrusionBucket",Fo,{omit:["layers","features"]});var Mp={get paint(){return pu=pu||new Ne({"fill-extrusion-opacity":new fo(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new zo(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fo(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fo(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ic(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new zo(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new zo(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fo(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ep extends ae{constructor(D){super(D,Mp)}createBucket(D){return new Fo(D)}queryRadius(){return yn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(D,K,pe,ke,je,We,ft,Mt){let Ut=Oi(D,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),We.angle,ft),nr=this.paint.get("fill-extrusion-height").evaluate(K,pe),Mr=this.paint.get("fill-extrusion-base").evaluate(K,pe),zr=function(oa,va,Ga,Qa){let Yi=[];for(let xi of oa){let Hi=[xi.x,xi.y,0,1];hn(Hi,Hi,va),Yi.push(new i(Hi[0]/Hi[3],Hi[1]/Hi[3]))}return Yi}(Ut,Mt),Hr=function(oa,va,Ga,Qa){let Yi=[],xi=[],Hi=Qa[8]*va,rn=Qa[9]*va,jn=Qa[10]*va,ko=Qa[11]*va,vs=Qa[8]*Ga,go=Qa[9]*Ga,Dn=Qa[10]*Ga,is=Qa[11]*Ga;for(let Vo of oa){let Bo=[],_n=[];for(let us of Vo){let No=us.x,Es=us.y,Ku=Qa[0]*No+Qa[4]*Es+Qa[12],Uu=Qa[1]*No+Qa[5]*Es+Qa[13],Qf=Qa[2]*No+Qa[6]*Es+Qa[14],Hp=Qa[3]*No+Qa[7]*Es+Qa[15],bh=Qf+jn,eh=Hp+ko,Jh=Ku+vs,$h=Uu+go,Qh=Qf+Dn,uf=Hp+is,th=new i((Ku+Hi)/eh,(Uu+rn)/eh);th.z=bh/eh,Bo.push(th);let Fh=new i(Jh/uf,$h/uf);Fh.z=Qh/uf,_n.push(Fh)}Yi.push(Bo),xi.push(_n)}return[Yi,xi]}(ke,Mr,nr,Mt);return function(oa,va,Ga){let Qa=1/0;Yt(Ga,va)&&(Qa=qp(Ga,va[0]));for(let Yi=0;Yi<va.length;Yi++){let xi=va[Yi],Hi=oa[Yi];for(let rn=0;rn<xi.length-1;rn++){let jn=xi[rn],ko=[jn,xi[rn+1],Hi[rn+1],Hi[rn],jn];yc(Ga,ko)&&(Qa=Math.min(Qa,qp(Ga,ko)))}}return Qa!==1/0&&Qa}(Hr[0],Hr[1],zr)}}function Ph(H,D){return H.x*D.x+H.y*D.y}function qp(H,D){if(H.length===1){let K=0,pe=D[K++],ke;for(;!ke||pe.equals(ke);)if(ke=D[K++],!ke)return 1/0;for(;K<D.length;K++){let je=D[K],We=H[0],ft=ke.sub(pe),Mt=je.sub(pe),Ut=We.sub(pe),nr=Ph(ft,ft),Mr=Ph(ft,Mt),zr=Ph(Mt,Mt),Hr=Ph(Ut,ft),oa=Ph(Ut,Mt),va=nr*zr-Mr*Mr,Ga=(zr*Hr-Mr*oa)/va,Qa=(nr*oa-Mr*Hr)/va,Yi=pe.z*(1-Ga-Qa)+ke.z*Ga+je.z*Qa;if(isFinite(Yi))return Yi}return 1/0}{let K=1/0;for(let pe of D)K=Math.min(K,pe.z);return K}}let qd=pt([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:td}=qd,Ih=pt([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:rd}=Ih,Kh=Jr.VectorTileFeature.types,Rh=Math.cos(Math.PI/180*37.5),Cp=Math.pow(2,14)/.5;class Vp{constructor(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(K=>K.id),this.index=D.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(K=>{this.gradients[K.id]={}}),this.layoutVertexArray=new Ru,this.layoutVertexArray2=new hu,this.indexArray=new De,this.programConfigurations=new el(D.layers,D.zoom),this.segments=new St,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(K=>K.isStateDependent()).map(K=>K.id)}populate(D,K,pe){this.hasPattern=Ft("line",this.layers,K);let ke=this.layers[0].layout.get("line-sort-key"),je=!ke.isConstant(),We=[];for(let{feature:ft,id:Mt,index:Ut,sourceLayerIndex:nr}of D){let Mr=this.layers[0]._featureFilter.needGeometry,zr=Gl(ft,Mr);if(!this.layers[0]._featureFilter.filter(new Ls(this.zoom),zr,pe))continue;let Hr=je?ke.evaluate(zr,{},pe):void 0,oa={id:Mt,properties:ft.properties,type:ft.type,sourceLayerIndex:nr,index:Ut,geometry:Mr?zr.geometry:Tl(ft),patterns:{},sortKey:Hr};We.push(oa)}je&&We.sort((ft,Mt)=>ft.sortKey-Mt.sortKey);for(let ft of We){let{geometry:Mt,index:Ut,sourceLayerIndex:nr}=ft;if(this.hasPattern){let Mr=ir("line",this.layers,ft,this.zoom,K);this.patternFeatures.push(Mr)}else this.addFeature(ft,Mt,Ut,pe,{});K.featureIndex.insert(D[Ut].feature,Mt,Ut,nr,this.index)}}update(D,K,pe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(D,K,this.stateDependentLayers,pe)}addFeatures(D,K,pe){for(let ke of this.patternFeatures)this.addFeature(ke,ke.geometry,ke.index,K,pe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(D){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=D.createVertexBuffer(this.layoutVertexArray2,rd)),this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,td),this.indexBuffer=D.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(D),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(D){if(D.properties&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(D.properties,"mapbox_clip_end"))return{start:+D.properties.mapbox_clip_start,end:+D.properties.mapbox_clip_end}}addFeature(D,K,pe,ke,je){let We=this.layers[0].layout,ft=We.get("line-join").evaluate(D,{}),Mt=We.get("line-cap"),Ut=We.get("line-miter-limit"),nr=We.get("line-round-limit");this.lineClips=this.lineFeatureClips(D);for(let Mr of K)this.addLine(Mr,D,ft,Mt,Ut,nr);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,pe,je,ke)}addLine(D,K,pe,ke,je,We){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Qa=0;Qa<D.length-1;Qa++)this.totalDistance+=D[Qa].dist(D[Qa+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let ft=Kh[K.type]==="Polygon",Mt=D.length;for(;Mt>=2&&D[Mt-1].equals(D[Mt-2]);)Mt--;let Ut=0;for(;Ut<Mt-1&&D[Ut].equals(D[Ut+1]);)Ut++;if(Mt<(ft?3:2))return;pe==="bevel"&&(je=1.05);let nr=this.overscaling<=16?15*vo/(512*this.overscaling):0,Mr=this.segments.prepareSegment(10*Mt,this.layoutVertexArray,this.indexArray),zr,Hr,oa,va,Ga;this.e1=this.e2=-1,ft&&(zr=D[Mt-2],Ga=D[Ut].sub(zr)._unit()._perp());for(let Qa=Ut;Qa<Mt;Qa++){if(oa=Qa===Mt-1?ft?D[Ut+1]:void 0:D[Qa+1],oa&&D[Qa].equals(oa))continue;Ga&&(va=Ga),zr&&(Hr=zr),zr=D[Qa],Ga=oa?oa.sub(zr)._unit()._perp():va,va=va||Ga;let Yi=va.add(Ga);Yi.x===0&&Yi.y===0||Yi._unit();let xi=va.x*Ga.x+va.y*Ga.y,Hi=Yi.x*Ga.x+Yi.y*Ga.y,rn=Hi!==0?1/Hi:1/0,jn=2*Math.sqrt(2-2*Hi),ko=Hi<Rh&&Hr&&oa,vs=va.x*Ga.y-va.y*Ga.x>0;if(ko&&Qa>Ut){let is=zr.dist(Hr);if(is>2*nr){let Vo=zr.sub(zr.sub(Hr)._mult(nr/is)._round());this.updateDistance(Hr,Vo),this.addCurrentVertex(Vo,va,0,0,Mr),Hr=Vo}}let go=Hr&&oa,Dn=go?pe:ft?"butt":ke;if(go&&Dn==="round"&&(rn<We?Dn="miter":rn<=2&&(Dn="fakeround")),Dn==="miter"&&rn>je&&(Dn="bevel"),Dn==="bevel"&&(rn>2&&(Dn="flipbevel"),rn<je&&(Dn="miter")),Hr&&this.updateDistance(Hr,zr),Dn==="miter")Yi._mult(rn),this.addCurrentVertex(zr,Yi,0,0,Mr);else if(Dn==="flipbevel"){if(rn>100)Yi=Ga.mult(-1);else{let is=rn*va.add(Ga).mag()/va.sub(Ga).mag();Yi._perp()._mult(is*(vs?-1:1))}this.addCurrentVertex(zr,Yi,0,0,Mr),this.addCurrentVertex(zr,Yi.mult(-1),0,0,Mr)}else if(Dn==="bevel"||Dn==="fakeround"){let is=-Math.sqrt(rn*rn-1),Vo=vs?is:0,Bo=vs?0:is;if(Hr&&this.addCurrentVertex(zr,va,Vo,Bo,Mr),Dn==="fakeround"){let _n=Math.round(180*jn/Math.PI/20);for(let us=1;us<_n;us++){let No=us/_n;if(No!==.5){let Ku=No-.5;No+=No*Ku*(No-1)*((1.0904+xi*(xi*(3.55645-1.43519*xi)-3.2452))*Ku*Ku+(.848013+xi*(.215638*xi-1.06021)))}let Es=Ga.sub(va)._mult(No)._add(va)._unit()._mult(vs?-1:1);this.addHalfVertex(zr,Es.x,Es.y,!1,vs,0,Mr)}}oa&&this.addCurrentVertex(zr,Ga,-Vo,-Bo,Mr)}else if(Dn==="butt")this.addCurrentVertex(zr,Yi,0,0,Mr);else if(Dn==="square"){let is=Hr?1:-1;this.addCurrentVertex(zr,Yi,is,is,Mr)}else Dn==="round"&&(Hr&&(this.addCurrentVertex(zr,va,0,0,Mr),this.addCurrentVertex(zr,va,1,1,Mr,!0)),oa&&(this.addCurrentVertex(zr,Ga,-1,-1,Mr,!0),this.addCurrentVertex(zr,Ga,0,0,Mr)));if(ko&&Qa<Mt-1){let is=zr.dist(oa);if(is>2*nr){let Vo=zr.add(oa.sub(zr)._mult(nr/is)._round());this.updateDistance(zr,Vo),this.addCurrentVertex(Vo,Ga,0,0,Mr),zr=Vo}}}}addCurrentVertex(D,K,pe,ke,je,We=!1){let ft=K.y*ke-K.x,Mt=-K.y-K.x*ke;this.addHalfVertex(D,K.x+K.y*pe,K.y-K.x*pe,We,!1,pe,je),this.addHalfVertex(D,ft,Mt,We,!0,-ke,je),this.distance>Cp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(D,K,pe,ke,je,We))}addHalfVertex({x:D,y:K},pe,ke,je,We,ft,Mt){let Ut=.5*(this.lineClips?this.scaledDistance*(Cp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((D<<1)+(je?1:0),(K<<1)+(We?1:0),Math.round(63*pe)+128,Math.round(63*ke)+128,1+(ft===0?0:ft<0?-1:1)|(63&Ut)<<2,Ut>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let nr=Mt.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,nr),Mt.primitiveLength++),We?this.e2=nr:this.e1=nr}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(D,K){this.distance+=D.dist(K),this.updateScaledDistance()}}let kp,kv;_i("LineBucket",Vp,{omit:["layers","patternFeatures"]});var Vd={get paint(){return kv=kv||new Ne({"line-opacity":new zo(re.paint_line["line-opacity"]),"line-color":new zo(re.paint_line["line-color"]),"line-translate":new fo(re.paint_line["line-translate"]),"line-translate-anchor":new fo(re.paint_line["line-translate-anchor"]),"line-width":new zo(re.paint_line["line-width"]),"line-gap-width":new zo(re.paint_line["line-gap-width"]),"line-offset":new zo(re.paint_line["line-offset"]),"line-blur":new zo(re.paint_line["line-blur"]),"line-dasharray":new lc(re.paint_line["line-dasharray"]),"line-pattern":new Ic(re.paint_line["line-pattern"]),"line-gradient":new Yu(re.paint_line["line-gradient"])})},get layout(){return kp=kp||new Ne({"line-cap":new fo(re.layout_line["line-cap"]),"line-join":new zo(re.layout_line["line-join"]),"line-miter-limit":new fo(re.layout_line["line-miter-limit"]),"line-round-limit":new fo(re.layout_line["line-round-limit"]),"line-sort-key":new zo(re.layout_line["line-sort-key"])})}};class qf extends zo{possiblyEvaluate(D,K){return K=new Ls(Math.floor(K.zoom),{now:K.now,fadeDuration:K.fadeDuration,zoomHistory:K.zoomHistory,transition:K.transition}),super.possiblyEvaluate(D,K)}evaluate(D,K,pe,ke){return K=E({},K,{zoom:Math.floor(K.zoom)}),super.evaluate(D,K,pe,ke)}}let Gd;class Lv extends ae{constructor(D){super(D,Vd),this.gradientVersion=0,Gd||(Gd=new qf(Vd.paint.properties["line-width"].specification),Gd.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(D){if(D==="line-gradient"){let K=this.gradientExpression();this.stepInterpolant=!!function(pe){return pe._styleExpression!==void 0}(K)&&K._styleExpression.expression instanceof Da,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(D,K){super.recalculate(D,K),this.paint._values["line-floorwidth"]=Gd.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,D)}createBucket(D){return new Vp(D)}queryRadius(D){let K=D,pe=ch(fi("line-width",this,K),fi("line-gap-width",this,K)),ke=fi("line-offset",this,K);return pe/2+Math.abs(ke)+yn(this.paint.get("line-translate"))}queryIntersectsFeature(D,K,pe,ke,je,We,ft){let Mt=Oi(D,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),We.angle,ft),Ut=ft/2*ch(this.paint.get("line-width").evaluate(K,pe),this.paint.get("line-gap-width").evaluate(K,pe)),nr=this.paint.get("line-offset").evaluate(K,pe);return nr&&(ke=function(Mr,zr){let Hr=[];for(let oa=0;oa<Mr.length;oa++){let va=Mr[oa],Ga=[];for(let Qa=0;Qa<va.length;Qa++){let Yi=va[Qa-1],xi=va[Qa],Hi=va[Qa+1],rn=Qa===0?new i(0,0):xi.sub(Yi)._unit()._perp(),jn=Qa===va.length-1?new i(0,0):Hi.sub(xi)._unit()._perp(),ko=rn._add(jn)._unit(),vs=ko.x*jn.x+ko.y*jn.y;vs!==0&&ko._mult(1/vs),Ga.push(ko._mult(zr)._add(xi))}Hr.push(Ga)}return Hr}(ke,nr*ft)),function(Mr,zr,Hr){for(let oa=0;oa<zr.length;oa++){let va=zr[oa];if(Mr.length>=3){for(let Ga=0;Ga<va.length;Ga++)if(Ai(Mr,va[Ga]))return!0}if(cr(Mr,va,Hr))return!0}return!1}(Mt,ke,Ut)}isTileClipped(){return!0}}function ch(H,D){return D>0?D+2*H:H}let iv=pt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),im=pt([{name:"a_projected_pos",components:3,type:"Float32"}],4);pt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let nm=pt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);pt([{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 Pv=pt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),nv=pt([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ov(H,D,K){return H.sections.forEach(pe=>{pe.text=function(ke,je,We){let ft=je.layout.get("text-transform").evaluate(We,{});return ft==="uppercase"?ke=ke.toLocaleUpperCase():ft==="lowercase"&&(ke=ke.toLocaleLowerCase()),Xs.applyArabicShaping&&(ke=Xs.applyArabicShaping(ke)),ke}(pe.text,D,K)}),H}pt([{name:"triangle",components:3,type:"Uint16"}]),pt([{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"}]),pt([{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"}]),pt([{type:"Float32",name:"offsetX"}]),pt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),pt([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let cc={"!":"\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 lu=24,Dh=Au,Iv=function(H,D,K,pe,ke){var je,We,ft=8*ke-pe-1,Mt=(1<<ft)-1,Ut=Mt>>1,nr=-7,Mr=K?ke-1:0,zr=K?-1:1,Hr=H[D+Mr];for(Mr+=zr,je=Hr&(1<<-nr)-1,Hr>>=-nr,nr+=ft;nr>0;je=256*je+H[D+Mr],Mr+=zr,nr-=8);for(We=je&(1<<-nr)-1,je>>=-nr,nr+=pe;nr>0;We=256*We+H[D+Mr],Mr+=zr,nr-=8);if(je===0)je=1-Ut;else{if(je===Mt)return We?NaN:1/0*(Hr?-1:1);We+=Math.pow(2,pe),je-=Ut}return(Hr?-1:1)*We*Math.pow(2,je-pe)},om=function(H,D,K,pe,ke,je){var We,ft,Mt,Ut=8*je-ke-1,nr=(1<<Ut)-1,Mr=nr>>1,zr=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Hr=pe?0:je-1,oa=pe?1:-1,va=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(ft=isNaN(D)?1:0,We=nr):(We=Math.floor(Math.log(D)/Math.LN2),D*(Mt=Math.pow(2,-We))<1&&(We--,Mt*=2),(D+=We+Mr>=1?zr/Mt:zr*Math.pow(2,1-Mr))*Mt>=2&&(We++,Mt/=2),We+Mr>=nr?(ft=0,We=nr):We+Mr>=1?(ft=(D*Mt-1)*Math.pow(2,ke),We+=Mr):(ft=D*Math.pow(2,Mr-1)*Math.pow(2,ke),We=0));ke>=8;H[K+Hr]=255&ft,Hr+=oa,ft/=256,ke-=8);for(We=We<<ke|ft,Ut+=ke;Ut>0;H[K+Hr]=255&We,Hr+=oa,We/=256,Ut-=8);H[K+Hr-oa]|=128*va};function Au(H){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(H)?H:new Uint8Array(H||0),this.pos=0,this.type=0,this.length=this.buf.length}Au.Varint=0,Au.Fixed64=1,Au.Bytes=2,Au.Fixed32=5;var x0=4294967296,sv=1/x0,_g=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Lp(H){return H.type===Au.Bytes?H.readVarint()+H.pos:H.pos+1}function lv(H,D,K){return K?4294967296*D+(H>>>0):4294967296*(D>>>0)+(H>>>0)}function xg(H,D,K){var pe=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(7*Math.LN2));K.realloc(pe);for(var ke=K.pos-1;ke>=H;ke--)K.buf[ke+pe]=K.buf[ke]}function b0(H,D){for(var K=0;K<H.length;K++)D.writeVarint(H[K])}function UT(H,D){for(var K=0;K<H.length;K++)D.writeSVarint(H[K])}function jT(H,D){for(var K=0;K<H.length;K++)D.writeFloat(H[K])}function qT(H,D){for(var K=0;K<H.length;K++)D.writeDouble(H[K])}function VT(H,D){for(var K=0;K<H.length;K++)D.writeBoolean(H[K])}function dC(H,D){for(var K=0;K<H.length;K++)D.writeFixed32(H[K])}function GT(H,D){for(var K=0;K<H.length;K++)D.writeSFixed32(H[K])}function HT(H,D){for(var K=0;K<H.length;K++)D.writeFixed64(H[K])}function WT(H,D){for(var K=0;K<H.length;K++)D.writeSFixed64(H[K])}function Rv(H,D){return(H[D]|H[D+1]<<8|H[D+2]<<16)+16777216*H[D+3]}function w0(H,D,K){H[K]=D,H[K+1]=D>>>8,H[K+2]=D>>>16,H[K+3]=D>>>24}function kx(H,D){return(H[D]|H[D+1]<<8|H[D+2]<<16)+(H[D+3]<<24)}Au.prototype={destroy:function(){this.buf=null},readFields:function(H,D,K){for(K=K||this.length;this.pos<K;){var pe=this.readVarint(),ke=pe>>3,je=this.pos;this.type=7&pe,H(ke,D,this),this.pos===je&&this.skip(pe)}return D},readMessage:function(H,D){return this.readFields(H,D,this.readVarint()+this.pos)},readFixed32:function(){var H=Rv(this.buf,this.pos);return this.pos+=4,H},readSFixed32:function(){var H=kx(this.buf,this.pos);return this.pos+=4,H},readFixed64:function(){var H=Rv(this.buf,this.pos)+Rv(this.buf,this.pos+4)*x0;return this.pos+=8,H},readSFixed64:function(){var H=Rv(this.buf,this.pos)+kx(this.buf,this.pos+4)*x0;return this.pos+=8,H},readFloat:function(){var H=Iv(this.buf,this.pos,!0,23,4);return this.pos+=4,H},readDouble:function(){var H=Iv(this.buf,this.pos,!0,52,8);return this.pos+=8,H},readVarint:function(H){var D,K,pe=this.buf;return D=127&(K=pe[this.pos++]),K<128?D:(D|=(127&(K=pe[this.pos++]))<<7,K<128?D:(D|=(127&(K=pe[this.pos++]))<<14,K<128?D:(D|=(127&(K=pe[this.pos++]))<<21,K<128?D:function(ke,je,We){var ft,Mt,Ut=We.buf;if(ft=(112&(Mt=Ut[We.pos++]))>>4,Mt<128||(ft|=(127&(Mt=Ut[We.pos++]))<<3,Mt<128)||(ft|=(127&(Mt=Ut[We.pos++]))<<10,Mt<128)||(ft|=(127&(Mt=Ut[We.pos++]))<<17,Mt<128)||(ft|=(127&(Mt=Ut[We.pos++]))<<24,Mt<128)||(ft|=(1&(Mt=Ut[We.pos++]))<<31,Mt<128))return lv(ke,ft,je);throw new Error("Expected varint not more than 10 bytes")}(D|=(15&(K=pe[this.pos]))<<28,H,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var H=this.readVarint();return H%2==1?(H+1)/-2:H/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var H=this.readVarint()+this.pos,D=this.pos;return this.pos=H,H-D>=12&&_g?function(K,pe,ke){return _g.decode(K.subarray(pe,ke))}(this.buf,D,H):function(K,pe,ke){for(var je="",We=pe;We<ke;){var ft,Mt,Ut,nr=K[We],Mr=null,zr=nr>239?4:nr>223?3:nr>191?2:1;if(We+zr>ke)break;zr===1?nr<128&&(Mr=nr):zr===2?(192&(ft=K[We+1]))==128&&(Mr=(31&nr)<<6|63&ft)<=127&&(Mr=null):zr===3?(Mt=K[We+2],(192&(ft=K[We+1]))==128&&(192&Mt)==128&&((Mr=(15&nr)<<12|(63&ft)<<6|63&Mt)<=2047||Mr>=55296&&Mr<=57343)&&(Mr=null)):zr===4&&(Mt=K[We+2],Ut=K[We+3],(192&(ft=K[We+1]))==128&&(192&Mt)==128&&(192&Ut)==128&&((Mr=(15&nr)<<18|(63&ft)<<12|(63&Mt)<<6|63&Ut)<=65535||Mr>=1114112)&&(Mr=null)),Mr===null?(Mr=65533,zr=1):Mr>65535&&(Mr-=65536,je+=String.fromCharCode(Mr>>>10&1023|55296),Mr=56320|1023&Mr),je+=String.fromCharCode(Mr),We+=zr}return je}(this.buf,D,H)},readBytes:function(){var H=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,H);return this.pos=H,D},readPackedVarint:function(H,D){if(this.type!==Au.Bytes)return H.push(this.readVarint(D));var K=Lp(this);for(H=H||[];this.pos<K;)H.push(this.readVarint(D));return H},readPackedSVarint:function(H){if(this.type!==Au.Bytes)return H.push(this.readSVarint());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readSVarint());return H},readPackedBoolean:function(H){if(this.type!==Au.Bytes)return H.push(this.readBoolean());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readBoolean());return H},readPackedFloat:function(H){if(this.type!==Au.Bytes)return H.push(this.readFloat());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readFloat());return H},readPackedDouble:function(H){if(this.type!==Au.Bytes)return H.push(this.readDouble());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readDouble());return H},readPackedFixed32:function(H){if(this.type!==Au.Bytes)return H.push(this.readFixed32());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readFixed32());return H},readPackedSFixed32:function(H){if(this.type!==Au.Bytes)return H.push(this.readSFixed32());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readSFixed32());return H},readPackedFixed64:function(H){if(this.type!==Au.Bytes)return H.push(this.readFixed64());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readFixed64());return H},readPackedSFixed64:function(H){if(this.type!==Au.Bytes)return H.push(this.readSFixed64());var D=Lp(this);for(H=H||[];this.pos<D;)H.push(this.readSFixed64());return H},skip:function(H){var D=7&H;if(D===Au.Varint)for(;this.buf[this.pos++]>127;);else if(D===Au.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Au.Fixed32)this.pos+=4;else{if(D!==Au.Fixed64)throw new Error("Unimplemented type: "+D);this.pos+=8}},writeTag:function(H,D){this.writeVarint(H<<3|D)},realloc:function(H){for(var D=this.length||16;D<this.pos+H;)D*=2;if(D!==this.length){var K=new Uint8Array(D);K.set(this.buf),this.buf=K,this.length=D}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(H){this.realloc(4),w0(this.buf,H,this.pos),this.pos+=4},writeSFixed32:function(H){this.realloc(4),w0(this.buf,H,this.pos),this.pos+=4},writeFixed64:function(H){this.realloc(8),w0(this.buf,-1&H,this.pos),w0(this.buf,Math.floor(H*sv),this.pos+4),this.pos+=8},writeSFixed64:function(H){this.realloc(8),w0(this.buf,-1&H,this.pos),w0(this.buf,Math.floor(H*sv),this.pos+4),this.pos+=8},writeVarint:function(H){(H=+H||0)>268435455||H<0?function(D,K){var pe,ke;if(D>=0?(pe=D%4294967296|0,ke=D/4294967296|0):(ke=~(-D/4294967296),4294967295^(pe=~(-D%4294967296))?pe=pe+1|0:(pe=0,ke=ke+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");K.realloc(10),function(je,We,ft){ft.buf[ft.pos++]=127&je|128,je>>>=7,ft.buf[ft.pos++]=127&je|128,je>>>=7,ft.buf[ft.pos++]=127&je|128,je>>>=7,ft.buf[ft.pos++]=127&je|128,ft.buf[ft.pos]=127&(je>>>=7)}(pe,0,K),function(je,We){var ft=(7&je)<<4;We.buf[We.pos++]|=ft|((je>>>=3)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je|((je>>>=7)?128:0),je&&(We.buf[We.pos++]=127&je)))))}(ke,K)}(H,this):(this.realloc(4),this.buf[this.pos++]=127&H|(H>127?128:0),H<=127||(this.buf[this.pos++]=127&(H>>>=7)|(H>127?128:0),H<=127||(this.buf[this.pos++]=127&(H>>>=7)|(H>127?128:0),H<=127||(this.buf[this.pos++]=H>>>7&127))))},writeSVarint:function(H){this.writeVarint(H<0?2*-H-1:2*H)},writeBoolean:function(H){this.writeVarint(!!H)},writeString:function(H){H=String(H),this.realloc(4*H.length),this.pos++;var D=this.pos;this.pos=function(pe,ke,je){for(var We,ft,Mt=0;Mt<ke.length;Mt++){if((We=ke.charCodeAt(Mt))>55295&&We<57344){if(!ft){We>56319||Mt+1===ke.length?(pe[je++]=239,pe[je++]=191,pe[je++]=189):ft=We;continue}if(We<56320){pe[je++]=239,pe[je++]=191,pe[je++]=189,ft=We;continue}We=ft-55296<<10|We-56320|65536,ft=null}else ft&&(pe[je++]=239,pe[je++]=191,pe[je++]=189,ft=null);We<128?pe[je++]=We:(We<2048?pe[je++]=We>>6|192:(We<65536?pe[je++]=We>>12|224:(pe[je++]=We>>18|240,pe[je++]=We>>12&63|128),pe[je++]=We>>6&63|128),pe[je++]=63&We|128)}return je}(this.buf,H,this.pos);var K=this.pos-D;K>=128&&xg(D,K,this),this.pos=D-1,this.writeVarint(K),this.pos+=K},writeFloat:function(H){this.realloc(4),om(this.buf,H,this.pos,!0,23,4),this.pos+=4},writeDouble:function(H){this.realloc(8),om(this.buf,H,this.pos,!0,52,8),this.pos+=8},writeBytes:function(H){var D=H.length;this.writeVarint(D),this.realloc(D);for(var K=0;K<D;K++)this.buf[this.pos++]=H[K]},writeRawMessage:function(H,D){this.pos++;var K=this.pos;H(D,this);var pe=this.pos-K;pe>=128&&xg(K,pe,this),this.pos=K-1,this.writeVarint(pe),this.pos+=pe},writeMessage:function(H,D,K){this.writeTag(H,Au.Bytes),this.writeRawMessage(D,K)},writePackedVarint:function(H,D){D.length&&this.writeMessage(H,b0,D)},writePackedSVarint:function(H,D){D.length&&this.writeMessage(H,UT,D)},writePackedBoolean:function(H,D){D.length&&this.writeMessage(H,VT,D)},writePackedFloat:function(H,D){D.length&&this.writeMessage(H,jT,D)},writePackedDouble:function(H,D){D.length&&this.writeMessage(H,qT,D)},writePackedFixed32:function(H,D){D.length&&this.writeMessage(H,dC,D)},writePackedSFixed32:function(H,D){D.length&&this.writeMessage(H,GT,D)},writePackedFixed64:function(H,D){D.length&&this.writeMessage(H,HT,D)},writePackedSFixed64:function(H,D){D.length&&this.writeMessage(H,WT,D)},writeBytesField:function(H,D){this.writeTag(H,Au.Bytes),this.writeBytes(D)},writeFixed32Field:function(H,D){this.writeTag(H,Au.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(H,D){this.writeTag(H,Au.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(H,D){this.writeTag(H,Au.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(H,D){this.writeTag(H,Au.Fixed64),this.writeSFixed64(D)},writeVarintField:function(H,D){this.writeTag(H,Au.Varint),this.writeVarint(D)},writeSVarintField:function(H,D){this.writeTag(H,Au.Varint),this.writeSVarint(D)},writeStringField:function(H,D){this.writeTag(H,Au.Bytes),this.writeString(D)},writeFloatField:function(H,D){this.writeTag(H,Au.Fixed32),this.writeFloat(D)},writeDoubleField:function(H,D){this.writeTag(H,Au.Fixed64),this.writeDouble(D)},writeBooleanField:function(H,D){this.writeVarintField(H,!!D)}};var P1=r(Dh);let I1=3;function vC(H,D,K){H===1&&K.readMessage(XT,D)}function XT(H,D,K){if(H===3){let{id:pe,bitmap:ke,width:je,height:We,left:ft,top:Mt,advance:Ut}=K.readMessage(Lx,{});D.push({id:pe,bitmap:new In({width:je+2*I1,height:We+2*I1},ke),metrics:{width:je,height:We,left:ft,top:Mt,advance:Ut}})}}function Lx(H,D,K){H===1?D.id=K.readVarint():H===2?D.bitmap=K.readBytes():H===3?D.width=K.readVarint():H===4?D.height=K.readVarint():H===5?D.left=K.readSVarint():H===6?D.top=K.readSVarint():H===7&&(D.advance=K.readVarint())}let Px=I1;function R1(H){let D=0,K=0;for(let We of H)D+=We.w*We.h,K=Math.max(K,We.w);H.sort((We,ft)=>ft.h-We.h);let pe=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(D/.95)),K),h:1/0}],ke=0,je=0;for(let We of H)for(let ft=pe.length-1;ft>=0;ft--){let Mt=pe[ft];if(!(We.w>Mt.w||We.h>Mt.h)){if(We.x=Mt.x,We.y=Mt.y,je=Math.max(je,We.y+We.h),ke=Math.max(ke,We.x+We.w),We.w===Mt.w&&We.h===Mt.h){let Ut=pe.pop();ft<pe.length&&(pe[ft]=Ut)}else We.h===Mt.h?(Mt.x+=We.w,Mt.w-=We.w):We.w===Mt.w?(Mt.y+=We.h,Mt.h-=We.h):(pe.push({x:Mt.x+We.w,y:Mt.y,w:Mt.w-We.w,h:We.h}),Mt.y+=We.h,Mt.h-=We.h);break}}return{w:ke,h:je,fill:D/(ke*je)||0}}let zh=1;class bg{constructor(D,{pixelRatio:K,version:pe,stretchX:ke,stretchY:je,content:We,textFitWidth:ft,textFitHeight:Mt}){this.paddedRect=D,this.pixelRatio=K,this.stretchX=ke,this.stretchY=je,this.content=We,this.version=pe,this.textFitWidth=ft,this.textFitHeight=Mt}get tl(){return[this.paddedRect.x+zh,this.paddedRect.y+zh]}get br(){return[this.paddedRect.x+this.paddedRect.w-zh,this.paddedRect.y+this.paddedRect.h-zh]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*zh)/this.pixelRatio,(this.paddedRect.h-2*zh)/this.pixelRatio]}}class wg{constructor(D,K){let pe={},ke={};this.haveRenderCallbacks=[];let je=[];this.addImages(D,pe,je),this.addImages(K,ke,je);let{w:We,h:ft}=R1(je),Mt=new Di({width:We||1,height:ft||1});for(let Ut in D){let nr=D[Ut],Mr=pe[Ut].paddedRect;Di.copy(nr.data,Mt,{x:0,y:0},{x:Mr.x+zh,y:Mr.y+zh},nr.data)}for(let Ut in K){let nr=K[Ut],Mr=ke[Ut].paddedRect,zr=Mr.x+zh,Hr=Mr.y+zh,oa=nr.data.width,va=nr.data.height;Di.copy(nr.data,Mt,{x:0,y:0},{x:zr,y:Hr},nr.data),Di.copy(nr.data,Mt,{x:0,y:va-1},{x:zr,y:Hr-1},{width:oa,height:1}),Di.copy(nr.data,Mt,{x:0,y:0},{x:zr,y:Hr+va},{width:oa,height:1}),Di.copy(nr.data,Mt,{x:oa-1,y:0},{x:zr-1,y:Hr},{width:1,height:va}),Di.copy(nr.data,Mt,{x:0,y:0},{x:zr+oa,y:Hr},{width:1,height:va})}this.image=Mt,this.iconPositions=pe,this.patternPositions=ke}addImages(D,K,pe){for(let ke in D){let je=D[ke],We={x:0,y:0,w:je.data.width+2*zh,h:je.data.height+2*zh};pe.push(We),K[ke]=new bg(We,je),je.hasRenderCallback&&this.haveRenderCallbacks.push(ke)}}patchUpdatedImages(D,K){D.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let pe in D.updatedImages)this.patchUpdatedImage(this.iconPositions[pe],D.getImage(pe),K),this.patchUpdatedImage(this.patternPositions[pe],D.getImage(pe),K)}patchUpdatedImage(D,K,pe){if(!D||!K||D.version===K.version)return;D.version=K.version;let[ke,je]=D.tl;pe.update(K.data,void 0,{x:ke,y:je})}}var Pp;_i("ImagePosition",bg),_i("ImageAtlas",wg),e.ah=void 0,(Pp=e.ah||(e.ah={}))[Pp.none=0]="none",Pp[Pp.horizontal=1]="horizontal",Pp[Pp.vertical=2]="vertical",Pp[Pp.horizontalOnly=3]="horizontalOnly";let $f=-17;class T0{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(D,K){let pe=new T0;return pe.scale=D||1,pe.fontStack=K,pe}static forImage(D){let K=new T0;return K.imageName=D,K}}class sm{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(D,K){let pe=new sm;for(let ke=0;ke<D.sections.length;ke++){let je=D.sections[ke];je.image?pe.addImageSection(je):pe.addTextSection(je,K)}return pe}length(){return this.text.length}getSection(D){return this.sections[this.sectionIndex[D]]}getSectionIndex(D){return this.sectionIndex[D]}getCharCode(D){return this.text.charCodeAt(D)}verticalizePunctuation(){this.text=function(D){let K="";for(let pe=0;pe<D.length;pe++){let ke=D.charCodeAt(pe+1)||null,je=D.charCodeAt(pe-1)||null;K+=ke&&Fl(ke)&&!cc[D[pe+1]]||je&&Fl(je)&&!cc[D[pe-1]]||!cc[D[pe]]?D[pe]:cc[D[pe]]}return K}(this.text)}trim(){let D=0;for(let pe=0;pe<this.text.length&&Tg[this.text.charCodeAt(pe)];pe++)D++;let K=this.text.length;for(let pe=this.text.length-1;pe>=0&&pe>=D&&Tg[this.text.charCodeAt(pe)];pe--)K--;this.text=this.text.substring(D,K),this.sectionIndex=this.sectionIndex.slice(D,K)}substring(D,K){let pe=new sm;return pe.text=this.text.substring(D,K),pe.sectionIndex=this.sectionIndex.slice(D,K),pe.sections=this.sections,pe}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((D,K)=>Math.max(D,this.sections[K].scale),0)}addTextSection(D,K){this.text+=D.text,this.sections.push(T0.forText(D.scale,D.fontStack||K));let pe=this.sections.length-1;for(let ke=0;ke<D.text.length;++ke)this.sectionIndex.push(pe)}addImageSection(D){let K=D.image?D.image.name:"";if(K.length===0)return void h("Can't add FormattedSection with an empty image.");let pe=this.getNextImageSectionCharCode();pe?(this.text+=String.fromCharCode(pe),this.sections.push(T0.forImage(K)),this.sectionIndex.push(this.sections.length-1)):h("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function A0(H,D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa){let va=sm.fromFeature(H,ke),Ga;Mr===e.ah.vertical&&va.verticalizePunctuation();let{processBidirectionalText:Qa,processStyledBidirectionalText:Yi}=Xs;if(Qa&&va.sections.length===1){Ga=[];let rn=Qa(va.toString(),lm(va,Ut,je,D,pe,Hr));for(let jn of rn){let ko=new sm;ko.text=jn,ko.sections=va.sections;for(let vs=0;vs<jn.length;vs++)ko.sectionIndex.push(0);Ga.push(ko)}}else if(Yi){Ga=[];let rn=Yi(va.text,va.sectionIndex,lm(va,Ut,je,D,pe,Hr));for(let jn of rn){let ko=new sm;ko.text=jn[0],ko.sectionIndex=jn[1],ko.sections=va.sections,Ga.push(ko)}}else Ga=function(rn,jn){let ko=[],vs=rn.text,go=0;for(let Dn of jn)ko.push(rn.substring(go,Dn)),go=Dn;return go<vs.length&&ko.push(rn.substring(go,vs.length)),ko}(va,lm(va,Ut,je,D,pe,Hr));let xi=[],Hi={positionedLines:xi,text:va.toString(),top:nr[1],bottom:nr[1],left:nr[0],right:nr[0],writingMode:Mr,iconsInText:!1,verticalizable:!1};return function(rn,jn,ko,vs,go,Dn,is,Vo,Bo,_n,us,No){let Es=0,Ku=$f,Uu=0,Qf=0,Hp=Vo==="right"?1:Vo==="left"?0:.5,bh=0;for(let uf of go){uf.trim();let th=uf.getMaxScale(),Fh=(th-1)*lu,wh={positionedGlyphs:[],lineOffset:0};rn.positionedLines[bh]=wh;let fh=wh.positionedGlyphs,gf=0;if(!uf.length()){Ku+=Dn,++bh;continue}for(let pp=0;pp<uf.length();pp++){let uu=uf.getSection(pp),fc=uf.getSectionIndex(pp),Ju=uf.getCharCode(pp),Rp=0,Kc=null,dm=null,_d=null,hd=lu,Wp=!(Bo===e.ah.horizontal||!us&&!ys(Ju)||us&&(Tg[Ju]||(eh=Ju,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(eh)))));if(uu.imageName){let Rc=vs[uu.imageName];if(!Rc)continue;_d=uu.imageName,rn.iconsInText=rn.iconsInText||!0,dm=Rc.paddedRect;let Pf=Rc.displaySize;uu.scale=uu.scale*lu/No,Kc={width:Pf[0],height:Pf[1],left:zh,top:-Px,advance:Wp?Pf[1]:Pf[0]},Rp=Fh+(lu-Pf[1]*uu.scale),hd=Kc.advance;let Xp=Wp?Pf[0]*uu.scale-lu*th:Pf[1]*uu.scale-lu*th;Xp>0&&Xp>gf&&(gf=Xp)}else{let Rc=ko[uu.fontStack],Pf=Rc&&Rc[Ju];if(Pf&&Pf.rect)dm=Pf.rect,Kc=Pf.metrics;else{let Xp=jn[uu.fontStack],Zd=Xp&&Xp[Ju];if(!Zd)continue;Kc=Zd.metrics}Rp=(th-uu.scale)*lu}Wp?(rn.verticalizable=!0,fh.push({glyph:Ju,imageName:_d,x:Es,y:Ku+Rp,vertical:Wp,scale:uu.scale,fontStack:uu.fontStack,sectionIndex:fc,metrics:Kc,rect:dm}),Es+=hd*uu.scale+_n):(fh.push({glyph:Ju,imageName:_d,x:Es,y:Ku+Rp,vertical:Wp,scale:uu.scale,fontStack:uu.fontStack,sectionIndex:fc,metrics:Kc,rect:dm}),Es+=Kc.advance*uu.scale+_n)}fh.length!==0&&(Uu=Math.max(Es-_n,Uu),uv(fh,0,fh.length-1,Hp,gf)),Es=0;let Ip=Dn*th+gf;wh.lineOffset=Math.max(gf,Fh),Ku+=Ip,Qf=Math.max(Ip,Qf),++bh}var eh;let Jh=Ku-$f,{horizontalAlign:$h,verticalAlign:Qh}=Sg(is);(function(uf,th,Fh,wh,fh,gf,Ip,pp,uu){let fc=(th-Fh)*fh,Ju=0;Ju=gf!==Ip?-pp*wh-$f:(-wh*uu+.5)*Ip;for(let Rp of uf)for(let Kc of Rp.positionedGlyphs)Kc.x+=fc,Kc.y+=Ju})(rn.positionedLines,Hp,$h,Qh,Uu,Qf,Dn,Jh,go.length),rn.top+=-Qh*Jh,rn.bottom=rn.top+Jh,rn.left+=-$h*Uu,rn.right=rn.left+Uu}(Hi,D,K,pe,Ga,We,ft,Mt,Mr,Ut,zr,oa),!function(rn){for(let jn of rn)if(jn.positionedGlyphs.length!==0)return!1;return!0}(xi)&&Hi}let Tg={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ZT={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},YT={40:!0};function Ix(H,D,K,pe,ke,je){if(D.imageName){let We=pe[D.imageName];return We?We.displaySize[0]*D.scale*lu/je+ke:0}{let We=K[D.fontStack],ft=We&&We[H];return ft?ft.metrics.advance*D.scale+ke:0}}function Rx(H,D,K,pe){let ke=Math.pow(H-D,2);return pe?H<D?ke/2:2*ke:ke+Math.abs(K)*K}function KT(H,D,K){let pe=0;return H===10&&(pe-=1e4),K&&(pe+=150),H!==40&&H!==65288||(pe+=50),D!==41&&D!==65289||(pe+=50),pe}function Ag(H,D,K,pe,ke,je){let We=null,ft=Rx(D,K,ke,je);for(let Mt of pe){let Ut=Rx(D-Mt.x,K,ke,je)+Mt.badness;Ut<=ft&&(We=Mt,ft=Ut)}return{index:H,x:D,priorBreak:We,badness:ft}}function Dx(H){return H?Dx(H.priorBreak).concat(H.index):[]}function lm(H,D,K,pe,ke,je){if(!H)return[];let We=[],ft=function(Mr,zr,Hr,oa,va,Ga){let Qa=0;for(let Yi=0;Yi<Mr.length();Yi++){let xi=Mr.getSection(Yi);Qa+=Ix(Mr.getCharCode(Yi),xi,oa,va,zr,Ga)}return Qa/Math.max(1,Math.ceil(Qa/Hr))}(H,D,K,pe,ke,je),Mt=H.text.indexOf("\u200B")>=0,Ut=0;for(let Mr=0;Mr<H.length();Mr++){let zr=H.getSection(Mr),Hr=H.getCharCode(Mr);if(Tg[Hr]||(Ut+=Ix(Hr,zr,pe,ke,D,je)),Mr<H.length()-1){let oa=!((nr=Hr)<11904)&&(!!un["CJK Compatibility Forms"](nr)||!!un["CJK Compatibility"](nr)||!!un["CJK Strokes"](nr)||!!un["CJK Symbols and Punctuation"](nr)||!!un["Enclosed CJK Letters and Months"](nr)||!!un["Halfwidth and Fullwidth Forms"](nr)||!!un["Ideographic Description Characters"](nr)||!!un["Vertical Forms"](nr)||Ks.test(String.fromCodePoint(nr)));(ZT[Hr]||oa||zr.imageName||Mr!==H.length()-2&&YT[H.getCharCode(Mr+1)])&&We.push(Ag(Mr+1,Ut,ft,We,KT(Hr,H.getCharCode(Mr+1),oa&&Mt),!1))}}var nr;return Dx(Ag(H.length(),Ut,ft,We,0,!0))}function Sg(H){let D=.5,K=.5;switch(H){case"right":case"top-right":case"bottom-right":D=1;break;case"left":case"top-left":case"bottom-left":D=0}switch(H){case"bottom":case"bottom-right":case"bottom-left":K=1;break;case"top":case"top-right":case"top-left":K=0}return{horizontalAlign:D,verticalAlign:K}}function uv(H,D,K,pe,ke){if(!pe&&!ke)return;let je=H[K],We=(H[K].x+je.metrics.advance*je.scale)*pe;for(let ft=D;ft<=K;ft++)H[ft].x-=We,H[ft].y+=ke}function S0(H,D,K){let{horizontalAlign:pe,verticalAlign:ke}=Sg(K),je=D[0]-H.displaySize[0]*pe,We=D[1]-H.displaySize[1]*ke;return{image:H,top:We,bottom:We+H.displaySize[1],left:je,right:je+H.displaySize[0]}}function zx(H){var D,K;let pe=H.left,ke=H.top,je=H.right-pe,We=H.bottom-ke,ft=(D=H.image.textFitWidth)!==null&&D!==void 0?D:"stretchOrShrink",Mt=(K=H.image.textFitHeight)!==null&&K!==void 0?K:"stretchOrShrink",Ut=(H.image.content[2]-H.image.content[0])/(H.image.content[3]-H.image.content[1]);if(Mt==="proportional"){if(ft==="stretchOnly"&&je/We<Ut||ft==="proportional"){let nr=Math.ceil(We*Ut);pe*=nr/je,je=nr}}else if(ft==="proportional"&&Mt==="stretchOnly"&&Ut!==0&&je/We>Ut){let nr=Math.ceil(je/Ut);ke*=nr/We,We=nr}return{x1:pe,y1:ke,x2:pe+je,y2:ke+We}}function Fx(H,D,K,pe,ke,je){let We=H.image,ft;if(We.content){let Ga=We.content,Qa=We.pixelRatio||1;ft=[Ga[0]/Qa,Ga[1]/Qa,We.displaySize[0]-Ga[2]/Qa,We.displaySize[1]-Ga[3]/Qa]}let Mt=D.left*je,Ut=D.right*je,nr,Mr,zr,Hr;K==="width"||K==="both"?(Hr=ke[0]+Mt-pe[3],Mr=ke[0]+Ut+pe[1]):(Hr=ke[0]+(Mt+Ut-We.displaySize[0])/2,Mr=Hr+We.displaySize[0]);let oa=D.top*je,va=D.bottom*je;return K==="height"||K==="both"?(nr=ke[1]+oa-pe[0],zr=ke[1]+va+pe[2]):(nr=ke[1]+(oa+va-We.displaySize[1])/2,zr=nr+We.displaySize[1]),{image:We,top:nr,right:Mr,bottom:zr,left:Hr,collisionPadding:ft}}let M0=255,yd=128,cv=M0*yd;function Ox(H,D){let{expression:K}=D;if(K.kind==="constant")return{kind:"constant",layoutSize:K.evaluate(new Ls(H+1))};if(K.kind==="source")return{kind:"source"};{let{zoomStops:pe,interpolationType:ke}=K,je=0;for(;je<pe.length&&pe[je]<=H;)je++;je=Math.max(0,je-1);let We=je;for(;We<pe.length&&pe[We]<H+1;)We++;We=Math.min(pe.length-1,We);let ft=pe[je],Mt=pe[We];return K.kind==="composite"?{kind:"composite",minZoom:ft,maxZoom:Mt,interpolationType:ke}:{kind:"camera",minZoom:ft,maxZoom:Mt,minSize:K.evaluate(new Ls(ft)),maxSize:K.evaluate(new Ls(Mt)),interpolationType:ke}}}function D1(H,D,K){let pe="never",ke=H.get(D);return ke?pe=ke:H.get(K)&&(pe="always"),pe}let JT=Jr.VectorTileFeature.types,$T=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Mg(H,D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr){let Hr=ft?Math.min(cv,Math.round(ft[0])):0,oa=ft?Math.min(cv,Math.round(ft[1])):0;H.emplaceBack(D,K,Math.round(32*pe),Math.round(32*ke),je,We,(Hr<<1)+(Mt?1:0),oa,16*Ut,16*nr,256*Mr,256*zr)}function z1(H,D,K){H.emplaceBack(D.x,D.y,K),H.emplaceBack(D.x,D.y,K),H.emplaceBack(D.x,D.y,K),H.emplaceBack(D.x,D.y,K)}function F1(H){for(let D of H.sections)if(Io(D.text))return!0;return!1}class O1{constructor(D){this.layoutVertexArray=new su,this.indexArray=new De,this.programConfigurations=D,this.segments=new St,this.dynamicLayoutVertexArray=new uc,this.opacityVertexArray=new ql,this.hasVisibleVertices=!1,this.placedSymbolArray=new Wn}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(D,K,pe,ke){this.isEmpty()||(pe&&(this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,iv.members),this.indexBuffer=D.createIndexBuffer(this.indexArray,K),this.dynamicLayoutVertexBuffer=D.createVertexBuffer(this.dynamicLayoutVertexArray,im.members,!0),this.opacityVertexBuffer=D.createVertexBuffer(this.opacityVertexArray,$T,!0),this.opacityVertexBuffer.itemSize=1),(pe||ke)&&this.programConfigurations.upload(D))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}_i("SymbolBuffers",O1);class fv{constructor(D,K,pe){this.layoutVertexArray=new D,this.layoutAttributes=K,this.indexArray=new pe,this.segments=new St,this.collisionVertexArray=new de}upload(D){this.layoutVertexBuffer=D.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=D.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=D.createVertexBuffer(this.collisionVertexArray,nm.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}_i("CollisionBuffers",fv);class um{constructor(D){this.collisionBoxArray=D.collisionBoxArray,this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(We=>We.id),this.index=D.index,this.pixelRatio=D.pixelRatio,this.sourceLayerIndex=D.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=gi([]),this.placementViewportMatrix=gi([]);let K=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ox(this.zoom,K["text-size"]),this.iconSizeData=Ox(this.zoom,K["icon-size"]);let pe=this.layers[0].layout,ke=pe.get("symbol-sort-key"),je=pe.get("symbol-z-order");this.canOverlap=D1(pe,"text-overlap","text-allow-overlap")!=="never"||D1(pe,"icon-overlap","icon-allow-overlap")!=="never"||pe.get("text-ignore-placement")||pe.get("icon-ignore-placement"),this.sortFeaturesByKey=je!=="viewport-y"&&!ke.isConstant(),this.sortFeaturesByY=(je==="viewport-y"||je==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,pe.get("symbol-placement")==="point"&&(this.writingModes=pe.get("text-writing-mode").map(We=>e.ah[We])),this.stateDependentLayerIds=this.layers.filter(We=>We.isStateDependent()).map(We=>We.id),this.sourceID=D.sourceID}createArrays(){this.text=new O1(new el(this.layers,this.zoom,D=>/^text/.test(D))),this.icon=new O1(new el(this.layers,this.zoom,D=>/^icon/.test(D))),this.glyphOffsetArray=new ss,this.lineVertexArray=new So,this.symbolInstances=new Ao,this.textAnchorOffsets=new hs}calculateGlyphDependencies(D,K,pe,ke,je){for(let We=0;We<D.length;We++)if(K[D.charCodeAt(We)]=!0,(pe||ke)&&je){let ft=cc[D.charAt(We)];ft&&(K[ft.charCodeAt(0)]=!0)}}populate(D,K,pe){let ke=this.layers[0],je=ke.layout,We=je.get("text-font"),ft=je.get("text-field"),Mt=je.get("icon-image"),Ut=(ft.value.kind!=="constant"||ft.value.value instanceof ma&&!ft.value.value.isEmpty()||ft.value.value.toString().length>0)&&(We.value.kind!=="constant"||We.value.value.length>0),nr=Mt.value.kind!=="constant"||!!Mt.value.value||Object.keys(Mt.parameters).length>0,Mr=je.get("symbol-sort-key");if(this.features=[],!Ut&&!nr)return;let zr=K.iconDependencies,Hr=K.glyphDependencies,oa=K.availableImages,va=new Ls(this.zoom);for(let{feature:Ga,id:Qa,index:Yi,sourceLayerIndex:xi}of D){let Hi=ke._featureFilter.needGeometry,rn=Gl(Ga,Hi);if(!ke._featureFilter.filter(va,rn,pe))continue;let jn,ko;if(Hi||(rn.geometry=Tl(Ga)),Ut){let go=ke.getValueAndResolveTokens("text-field",rn,pe,oa),Dn=ma.factory(go),is=this.hasRTLText=this.hasRTLText||F1(Dn);(!is||Xs.getRTLTextPluginStatus()==="unavailable"||is&&Xs.isParsed())&&(jn=ov(Dn,ke,rn))}if(nr){let go=ke.getValueAndResolveTokens("icon-image",rn,pe,oa);ko=go instanceof $a?go:$a.fromString(go)}if(!jn&&!ko)continue;let vs=this.sortFeaturesByKey?Mr.evaluate(rn,{},pe):void 0;if(this.features.push({id:Qa,text:jn,icon:ko,index:Yi,sourceLayerIndex:xi,geometry:rn.geometry,properties:Ga.properties,type:JT[Ga.type],sortKey:vs}),ko&&(zr[ko.name]=!0),jn){let go=We.evaluate(rn,{},pe).join(","),Dn=je.get("text-rotation-alignment")!=="viewport"&&je.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let is of jn.sections)if(is.image)zr[is.image.name]=!0;else{let Vo=_o(jn.toString()),Bo=is.fontStack||go,_n=Hr[Bo]=Hr[Bo]||{};this.calculateGlyphDependencies(is.text,_n,Dn,this.allowVerticalPlacement,Vo)}}}je.get("symbol-placement")==="line"&&(this.features=function(Ga){let Qa={},Yi={},xi=[],Hi=0;function rn(go){xi.push(Ga[go]),Hi++}function jn(go,Dn,is){let Vo=Yi[go];return delete Yi[go],Yi[Dn]=Vo,xi[Vo].geometry[0].pop(),xi[Vo].geometry[0]=xi[Vo].geometry[0].concat(is[0]),Vo}function ko(go,Dn,is){let Vo=Qa[Dn];return delete Qa[Dn],Qa[go]=Vo,xi[Vo].geometry[0].shift(),xi[Vo].geometry[0]=is[0].concat(xi[Vo].geometry[0]),Vo}function vs(go,Dn,is){let Vo=is?Dn[0][Dn[0].length-1]:Dn[0][0];return`${go}:${Vo.x}:${Vo.y}`}for(let go=0;go<Ga.length;go++){let Dn=Ga[go],is=Dn.geometry,Vo=Dn.text?Dn.text.toString():null;if(!Vo){rn(go);continue}let Bo=vs(Vo,is),_n=vs(Vo,is,!0);if(Bo in Yi&&_n in Qa&&Yi[Bo]!==Qa[_n]){let us=ko(Bo,_n,is),No=jn(Bo,_n,xi[us].geometry);delete Qa[Bo],delete Yi[_n],Yi[vs(Vo,xi[No].geometry,!0)]=No,xi[us].geometry=null}else Bo in Yi?jn(Bo,_n,is):_n in Qa?ko(Bo,_n,is):(rn(go),Qa[Bo]=Hi-1,Yi[_n]=Hi-1)}return xi.filter(go=>go.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ga,Qa)=>Ga.sortKey-Qa.sortKey)}update(D,K,pe){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(D,K,this.layers,pe),this.icon.programConfigurations.updatePaintArrays(D,K,this.layers,pe))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(D){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(D),this.iconCollisionBox.upload(D)),this.text.upload(D,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(D,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(D,K){let pe=this.lineVertexArray.length;if(D.segment!==void 0){let ke=D.dist(K[D.segment+1]),je=D.dist(K[D.segment]),We={};for(let ft=D.segment+1;ft<K.length;ft++)We[ft]={x:K[ft].x,y:K[ft].y,tileUnitDistanceFromAnchor:ke},ft<K.length-1&&(ke+=K[ft+1].dist(K[ft]));for(let ft=D.segment||0;ft>=0;ft--)We[ft]={x:K[ft].x,y:K[ft].y,tileUnitDistanceFromAnchor:je},ft>0&&(je+=K[ft-1].dist(K[ft]));for(let ft=0;ft<K.length;ft++){let Mt=We[ft];this.lineVertexArray.emplaceBack(Mt.x,Mt.y,Mt.tileUnitDistanceFromAnchor)}}return{lineStartIndex:pe,lineLength:this.lineVertexArray.length-pe}}addSymbols(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr){let Hr=D.indexArray,oa=D.layoutVertexArray,va=D.segments.prepareSegment(4*K.length,oa,Hr,this.canOverlap?We.sortKey:void 0),Ga=this.glyphOffsetArray.length,Qa=va.vertexLength,Yi=this.allowVerticalPlacement&&ft===e.ah.vertical?Math.PI/2:0,xi=We.text&&We.text.sections;for(let Hi=0;Hi<K.length;Hi++){let{tl:rn,tr:jn,bl:ko,br:vs,tex:go,pixelOffsetTL:Dn,pixelOffsetBR:is,minFontScaleX:Vo,minFontScaleY:Bo,glyphOffset:_n,isSDF:us,sectionIndex:No}=K[Hi],Es=va.vertexLength,Ku=_n[1];Mg(oa,Mt.x,Mt.y,rn.x,Ku+rn.y,go.x,go.y,pe,us,Dn.x,Dn.y,Vo,Bo),Mg(oa,Mt.x,Mt.y,jn.x,Ku+jn.y,go.x+go.w,go.y,pe,us,is.x,Dn.y,Vo,Bo),Mg(oa,Mt.x,Mt.y,ko.x,Ku+ko.y,go.x,go.y+go.h,pe,us,Dn.x,is.y,Vo,Bo),Mg(oa,Mt.x,Mt.y,vs.x,Ku+vs.y,go.x+go.w,go.y+go.h,pe,us,is.x,is.y,Vo,Bo),z1(D.dynamicLayoutVertexArray,Mt,Yi),Hr.emplaceBack(Es,Es+1,Es+2),Hr.emplaceBack(Es+1,Es+2,Es+3),va.vertexLength+=4,va.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_n[0]),Hi!==K.length-1&&No===K[Hi+1].sectionIndex||D.programConfigurations.populatePaintArrays(oa.length,We,We.index,{},zr,xi&&xi[No])}D.placedSymbolArray.emplaceBack(Mt.x,Mt.y,Ga,this.glyphOffsetArray.length-Ga,Qa,Ut,nr,Mt.segment,pe?pe[0]:0,pe?pe[1]:0,ke[0],ke[1],ft,0,!1,0,Mr)}_addCollisionDebugVertex(D,K,pe,ke,je,We){return K.emplaceBack(0,0),D.emplaceBack(pe.x,pe.y,ke,je,Math.round(We.x),Math.round(We.y))}addCollisionDebugVertices(D,K,pe,ke,je,We,ft){let Mt=je.segments.prepareSegment(4,je.layoutVertexArray,je.indexArray),Ut=Mt.vertexLength,nr=je.layoutVertexArray,Mr=je.collisionVertexArray,zr=ft.anchorX,Hr=ft.anchorY;this._addCollisionDebugVertex(nr,Mr,We,zr,Hr,new i(D,K)),this._addCollisionDebugVertex(nr,Mr,We,zr,Hr,new i(pe,K)),this._addCollisionDebugVertex(nr,Mr,We,zr,Hr,new i(pe,ke)),this._addCollisionDebugVertex(nr,Mr,We,zr,Hr,new i(D,ke)),Mt.vertexLength+=4;let oa=je.indexArray;oa.emplaceBack(Ut,Ut+1),oa.emplaceBack(Ut+1,Ut+2),oa.emplaceBack(Ut+2,Ut+3),oa.emplaceBack(Ut+3,Ut),Mt.primitiveLength+=4}addDebugCollisionBoxes(D,K,pe,ke){for(let je=D;je<K;je++){let We=this.collisionBoxArray.get(je);this.addCollisionDebugVertices(We.x1,We.y1,We.x2,We.y2,ke?this.textCollisionBox:this.iconCollisionBox,We.anchorPoint,pe)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new fv(Vl,Pv.members,et),this.iconCollisionBox=new fv(Vl,Pv.members,et);for(let D=0;D<this.symbolInstances.length;D++){let K=this.symbolInstances.get(D);this.addDebugCollisionBoxes(K.textBoxStartIndex,K.textBoxEndIndex,K,!0),this.addDebugCollisionBoxes(K.verticalTextBoxStartIndex,K.verticalTextBoxEndIndex,K,!0),this.addDebugCollisionBoxes(K.iconBoxStartIndex,K.iconBoxEndIndex,K,!1),this.addDebugCollisionBoxes(K.verticalIconBoxStartIndex,K.verticalIconBoxEndIndex,K,!1)}}_deserializeCollisionBoxesForSymbol(D,K,pe,ke,je,We,ft,Mt,Ut){let nr={};for(let Mr=K;Mr<pe;Mr++){let zr=D.get(Mr);nr.textBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},nr.textFeatureIndex=zr.featureIndex;break}for(let Mr=ke;Mr<je;Mr++){let zr=D.get(Mr);nr.verticalTextBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},nr.verticalTextFeatureIndex=zr.featureIndex;break}for(let Mr=We;Mr<ft;Mr++){let zr=D.get(Mr);nr.iconBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},nr.iconFeatureIndex=zr.featureIndex;break}for(let Mr=Mt;Mr<Ut;Mr++){let zr=D.get(Mr);nr.verticalIconBox={x1:zr.x1,y1:zr.y1,x2:zr.x2,y2:zr.y2,anchorPointX:zr.anchorPointX,anchorPointY:zr.anchorPointY},nr.verticalIconFeatureIndex=zr.featureIndex;break}return nr}deserializeCollisionBoxes(D){this.collisionArrays=[];for(let K=0;K<this.symbolInstances.length;K++){let pe=this.symbolInstances.get(K);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(D,pe.textBoxStartIndex,pe.textBoxEndIndex,pe.verticalTextBoxStartIndex,pe.verticalTextBoxEndIndex,pe.iconBoxStartIndex,pe.iconBoxEndIndex,pe.verticalIconBoxStartIndex,pe.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(D,K){let pe=D.placedSymbolArray.get(K),ke=pe.vertexStartIndex+4*pe.numGlyphs;for(let je=pe.vertexStartIndex;je<ke;je+=4)D.indexArray.emplaceBack(je,je+1,je+2),D.indexArray.emplaceBack(je+1,je+2,je+3)}getSortedSymbolIndexes(D){if(this.sortedAngle===D&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let K=Math.sin(D),pe=Math.cos(D),ke=[],je=[],We=[];for(let ft=0;ft<this.symbolInstances.length;++ft){We.push(ft);let Mt=this.symbolInstances.get(ft);ke.push(0|Math.round(K*Mt.anchorX+pe*Mt.anchorY)),je.push(Mt.featureIndex)}return We.sort((ft,Mt)=>ke[ft]-ke[Mt]||je[Mt]-je[ft]),We}addToSortKeyRanges(D,K){let pe=this.sortKeyRanges[this.sortKeyRanges.length-1];pe&&pe.sortKey===K?pe.symbolInstanceEnd=D+1:this.sortKeyRanges.push({sortKey:K,symbolInstanceStart:D,symbolInstanceEnd:D+1})}sortFeatures(D){if(this.sortFeaturesByY&&this.sortedAngle!==D&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let K of this.symbolInstanceIndexes){let pe=this.symbolInstances.get(K);this.featureSortOrder.push(pe.featureIndex),[pe.rightJustifiedTextSymbolIndex,pe.centerJustifiedTextSymbolIndex,pe.leftJustifiedTextSymbolIndex].forEach((ke,je,We)=>{ke>=0&&We.indexOf(ke)===je&&this.addIndicesForPlacedSymbol(this.text,ke)}),pe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,pe.verticalPlacedTextSymbolIndex),pe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,pe.placedIconSymbolIndex),pe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,pe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let lf,E0;_i("SymbolBucket",um,{omit:["layers","collisionBoxArray","features","compareText"]}),um.MAX_GLYPHS=65535,um.addDynamicAttributes=z1;var Eg={get paint(){return E0=E0||new Ne({"icon-opacity":new zo(re.paint_symbol["icon-opacity"]),"icon-color":new zo(re.paint_symbol["icon-color"]),"icon-halo-color":new zo(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new zo(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new zo(re.paint_symbol["icon-halo-blur"]),"icon-translate":new fo(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new fo(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new zo(re.paint_symbol["text-opacity"]),"text-color":new zo(re.paint_symbol["text-color"],{runtimeType:Vt,getOverride:H=>H.textColor,hasOverride:H=>!!H.textColor}),"text-halo-color":new zo(re.paint_symbol["text-halo-color"]),"text-halo-width":new zo(re.paint_symbol["text-halo-width"]),"text-halo-blur":new zo(re.paint_symbol["text-halo-blur"]),"text-translate":new fo(re.paint_symbol["text-translate"]),"text-translate-anchor":new fo(re.paint_symbol["text-translate-anchor"])})},get layout(){return lf=lf||new Ne({"symbol-placement":new fo(re.layout_symbol["symbol-placement"]),"symbol-spacing":new fo(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fo(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new zo(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fo(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fo(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new fo(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new fo(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new fo(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fo(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new zo(re.layout_symbol["icon-size"]),"icon-text-fit":new fo(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fo(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new zo(re.layout_symbol["icon-image"]),"icon-rotate":new zo(re.layout_symbol["icon-rotate"]),"icon-padding":new zo(re.layout_symbol["icon-padding"]),"icon-keep-upright":new fo(re.layout_symbol["icon-keep-upright"]),"icon-offset":new zo(re.layout_symbol["icon-offset"]),"icon-anchor":new zo(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fo(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fo(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fo(re.layout_symbol["text-rotation-alignment"]),"text-field":new zo(re.layout_symbol["text-field"]),"text-font":new zo(re.layout_symbol["text-font"]),"text-size":new zo(re.layout_symbol["text-size"]),"text-max-width":new zo(re.layout_symbol["text-max-width"]),"text-line-height":new fo(re.layout_symbol["text-line-height"]),"text-letter-spacing":new zo(re.layout_symbol["text-letter-spacing"]),"text-justify":new zo(re.layout_symbol["text-justify"]),"text-radial-offset":new zo(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fo(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new zo(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new zo(re.layout_symbol["text-anchor"]),"text-max-angle":new fo(re.layout_symbol["text-max-angle"]),"text-writing-mode":new fo(re.layout_symbol["text-writing-mode"]),"text-rotate":new zo(re.layout_symbol["text-rotate"]),"text-padding":new fo(re.layout_symbol["text-padding"]),"text-keep-upright":new fo(re.layout_symbol["text-keep-upright"]),"text-transform":new zo(re.layout_symbol["text-transform"]),"text-offset":new zo(re.layout_symbol["text-offset"]),"text-allow-overlap":new fo(re.layout_symbol["text-allow-overlap"]),"text-overlap":new fo(re.layout_symbol["text-overlap"]),"text-ignore-placement":new fo(re.layout_symbol["text-ignore-placement"]),"text-optional":new fo(re.layout_symbol["text-optional"])})}};class C0{constructor(D){if(D.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=D.property.overrides?D.property.overrides.runtimeType:st,this.defaultValue=D}evaluate(D){if(D.formattedSection){let K=this.defaultValue.property.overrides;if(K&&K.hasOverride(D.formattedSection))return K.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default}eachChild(D){this.defaultValue.isConstant()||D(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}_i("FormatSectionOverride",C0,{omit:["defaultValue"]});class Dv extends ae{constructor(D){super(D,Eg)}recalculate(D,K){if(super.recalculate(D,K),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 pe=this.layout.get("text-writing-mode");if(pe){let ke=[];for(let je of pe)ke.indexOf(je)<0&&ke.push(je);this.layout._values["text-writing-mode"]=ke}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(D,K,pe,ke){let je=this.layout.get(D).evaluate(K,{},pe,ke),We=this._unevaluatedLayout._values[D];return We.isDataDriven()||Ac(We.value)||!je?je:function(ft,Mt){return Mt.replace(/{([^{}]+)}/g,(Ut,nr)=>ft&&nr in ft?String(ft[nr]):"")}(K.properties,je)}createBucket(D){return new um(D)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let D of Eg.paint.overridableProperties){if(!Dv.hasPaintOverride(this.layout,D))continue;let K=this.paint.get(D),pe=new C0(K),ke=new Lu(pe,K.property.specification),je=null;je=K.value.kind==="constant"||K.value.kind==="source"?new dc("source",ke):new vu("composite",ke,K.value.zoomStops),this.paint._values[D]=new wu(K.property,je,K.parameters)}}_handleOverridablePaintPropertyUpdate(D,K,pe){return!(!this.layout||K.isDataDriven()||pe.isDataDriven())&&Dv.hasPaintOverride(this.layout,D)}static hasPaintOverride(D,K){let pe=D.get("text-field"),ke=Eg.paint.properties[K],je=!1,We=ft=>{for(let Mt of ft)if(ke.overrides&&ke.overrides.hasOverride(Mt))return void(je=!0)};if(pe.value.kind==="constant"&&pe.value.value instanceof ma)We(pe.value.value.sections);else if(pe.value.kind==="source"){let ft=Ut=>{je||(Ut instanceof Nr&&xt(Ut.value)===jr?We(Ut.value.sections):Ut instanceof os?We(Ut.sections):Ut.eachChild(ft))},Mt=pe.value;Mt._styleExpression&&ft(Mt._styleExpression.expression)}return je}}let Bx;var k0={get paint(){return Bx=Bx||new Ne({"background-color":new fo(re.paint_background["background-color"]),"background-pattern":new lc(re.paint_background["background-pattern"]),"background-opacity":new fo(re.paint_background["background-opacity"])})}};class QT extends ae{constructor(D){super(D,k0)}}let B1;var Nx={get paint(){return B1=B1||new Ne({"raster-opacity":new fo(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new fo(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fo(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fo(re.paint_raster["raster-brightness-max"]),"raster-saturation":new fo(re.paint_raster["raster-saturation"]),"raster-contrast":new fo(re.paint_raster["raster-contrast"]),"raster-resampling":new fo(re.paint_raster["raster-resampling"]),"raster-fade-duration":new fo(re.paint_raster["raster-fade-duration"])})}};class L0 extends ae{constructor(D){super(D,Nx)}}class N1 extends ae{constructor(D){super(D,{}),this.onAdd=K=>{this.implementation.onAdd&&this.implementation.onAdd(K,K.painter.context.gl)},this.onRemove=K=>{this.implementation.onRemove&&this.implementation.onRemove(K,K.painter.context.gl)},this.implementation=D}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 U1{constructor(D){this._methodToThrottle=D,this._triggered=!1,typeof MessageChannel<"u"&&(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 j1=63710088e-1;class Hd{constructor(D,K){if(isNaN(D)||isNaN(K))throw new Error(`Invalid LngLat object: (${D}, ${K})`);if(this.lng=+D,this.lat=+K,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Hd(S(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(D){let K=Math.PI/180,pe=this.lat*K,ke=D.lat*K,je=Math.sin(pe)*Math.sin(ke)+Math.cos(pe)*Math.cos(ke)*Math.cos((D.lng-this.lng)*K);return j1*Math.acos(Math.min(je,1))}static convert(D){if(D instanceof Hd)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new Hd(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new Hd(Number("lng"in D?D.lng:D.lon),Number(D.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 cm=2*Math.PI*j1;function Ux(H){return cm*Math.cos(H*Math.PI/180)}function Cg(H){return(180+H)/360}function jx(H){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+H*Math.PI/360)))/360}function kg(H,D){return H/Ux(D)}function P0(H){return 360/Math.PI*Math.atan(Math.exp((180-360*H)*Math.PI/180))-90}class I0{constructor(D,K,pe=0){this.x=+D,this.y=+K,this.z=+pe}static fromLngLat(D,K=0){let pe=Hd.convert(D);return new I0(Cg(pe.lng),jx(pe.lat),kg(K,pe.lat))}toLngLat(){return new Hd(360*this.x-180,P0(this.y))}toAltitude(){return this.z*Ux(P0(this.y))}meterInMercatorCoordinateUnits(){return 1/cm*(D=P0(this.y),1/Math.cos(D*Math.PI/180));var D}}function ad(H,D,K){var pe=2*Math.PI*6378137/256/Math.pow(2,K);return[H*pe-2*Math.PI*6378137/2,D*pe-2*Math.PI*6378137/2]}class q1{constructor(D,K,pe){if(!function(ke,je,We){return!(ke<0||ke>25||We<0||We>=Math.pow(2,ke)||je<0||je>=Math.pow(2,ke))}(D,K,pe))throw new Error(`x=${K}, y=${pe}, z=${D} outside of bounds. 0<=x<${Math.pow(2,D)}, 0<=y<${Math.pow(2,D)} 0<=z<=25 `);this.z=D,this.x=K,this.y=pe,this.key=R0(0,D,D,K,pe)}equals(D){return this.z===D.z&&this.x===D.x&&this.y===D.y}url(D,K,pe){let ke=(We=this.y,ft=this.z,Mt=ad(256*(je=this.x),256*(We=Math.pow(2,ft)-We-1),ft),Ut=ad(256*(je+1),256*(We+1),ft),Mt[0]+","+Mt[1]+","+Ut[0]+","+Ut[1]);var je,We,ft,Mt,Ut;let nr=function(Mr,zr,Hr){let oa,va="";for(let Ga=Mr;Ga>0;Ga--)oa=1<<Ga-1,va+=(zr&oa?1:0)+(Hr&oa?2:0);return va}(this.z,this.x,this.y);return D[(this.x+this.y)%D.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(pe==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,K>1?"@2x":"").replace(/{quadkey}/g,nr).replace(/{bbox-epsg-3857}/g,ke)}isChildOf(D){let K=this.z-D.z;return K>0&&D.x===this.x>>K&&D.y===this.y>>K}getTilePoint(D){let K=Math.pow(2,this.z);return new i((D.x*K-this.x)*vo,(D.y*K-this.y)*vo)}toString(){return`${this.z}/${this.x}/${this.y}`}}class qx{constructor(D,K){this.wrap=D,this.canonical=K,this.key=R0(D,K.z,K.z,K.x,K.y)}}class Gp{constructor(D,K,pe,ke,je){if(D<pe)throw new Error(`overscaledZ should be >= z; overscaledZ = ${D}; z = ${pe}`);this.overscaledZ=D,this.wrap=K,this.canonical=new q1(pe,+ke,+je),this.key=R0(K,D,pe,ke,je)}clone(){return new Gp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)}scaledTo(D){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let K=this.canonical.z-D;return D>this.canonical.z?new Gp(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Gp(D,this.wrap,D,this.canonical.x>>K,this.canonical.y>>K)}calculateScaledKey(D,K){if(D>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${D}; overscaledZ = ${this.overscaledZ}`);let pe=this.canonical.z-D;return D>this.canonical.z?R0(this.wrap*+K,D,this.canonical.z,this.canonical.x,this.canonical.y):R0(this.wrap*+K,D,D,this.canonical.x>>pe,this.canonical.y>>pe)}isChildOf(D){if(D.wrap!==this.wrap)return!1;let K=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ<this.overscaledZ&&D.canonical.x===this.canonical.x>>K&&D.canonical.y===this.canonical.y>>K}children(D){if(this.overscaledZ>=D)return[new Gp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let K=this.canonical.z+1,pe=2*this.canonical.x,ke=2*this.canonical.y;return[new Gp(K,this.wrap,K,pe,ke),new Gp(K,this.wrap,K,pe+1,ke),new Gp(K,this.wrap,K,pe,ke+1),new Gp(K,this.wrap,K,pe+1,ke+1)]}isLessThan(D){return this.wrap<D.wrap||!(this.wrap>D.wrap)&&(this.overscaledZ<D.overscaledZ||!(this.overscaledZ>D.overscaledZ)&&(this.canonical.x<D.canonical.x||!(this.canonical.x>D.canonical.x)&&this.canonical.y<D.canonical.y))}wrapped(){return new Gp(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(D){return new Gp(this.overscaledZ,D,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new qx(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(D){return this.canonical.getTilePoint(new I0(D.x-this.wrap,D.y))}}function R0(H,D,K,pe,ke){(H*=2)<0&&(H=-1*H-1);let je=1<<K;return(je*je*H+je*ke+pe).toString(36)+K.toString(36)+D.toString(36)}_i("CanonicalTileID",q1),_i("OverscaledTileID",Gp,{omit:["posMatrix"]});class Vx{constructor(D,K,pe,ke=1,je=1,We=1,ft=0){if(this.uid=D,K.height!==K.width)throw new RangeError("DEM tiles must be square");if(pe&&!["mapbox","terrarium","custom"].includes(pe))return void h(`"${pe}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=K.height;let Mt=this.dim=K.height-2;switch(this.data=new Uint32Array(K.data.buffer),pe){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=ke,this.greenFactor=je,this.blueFactor=We,this.baseShift=ft;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let Ut=0;Ut<Mt;Ut++)this.data[this._idx(-1,Ut)]=this.data[this._idx(0,Ut)],this.data[this._idx(Mt,Ut)]=this.data[this._idx(Mt-1,Ut)],this.data[this._idx(Ut,-1)]=this.data[this._idx(Ut,0)],this.data[this._idx(Ut,Mt)]=this.data[this._idx(Ut,Mt-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Mt,-1)]=this.data[this._idx(Mt-1,0)],this.data[this._idx(-1,Mt)]=this.data[this._idx(0,Mt-1)],this.data[this._idx(Mt,Mt)]=this.data[this._idx(Mt-1,Mt-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let Ut=0;Ut<Mt;Ut++)for(let nr=0;nr<Mt;nr++){let Mr=this.get(Ut,nr);Mr>this.max&&(this.max=Mr),Mr<this.min&&(this.min=Mr)}}get(D,K){let pe=new Uint8Array(this.data.buffer),ke=4*this._idx(D,K);return this.unpack(pe[ke],pe[ke+1],pe[ke+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(D,K){if(D<-1||D>=this.dim+1||K<-1||K>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(K+1)*this.stride+(D+1)}unpack(D,K,pe){return D*this.redFactor+K*this.greenFactor+pe*this.blueFactor-this.baseShift}getPixels(){return new Di({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(D,K,pe){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");let ke=K*this.dim,je=K*this.dim+this.dim,We=pe*this.dim,ft=pe*this.dim+this.dim;switch(K){case-1:ke=je-1;break;case 1:je=ke+1}switch(pe){case-1:We=ft-1;break;case 1:ft=We+1}let Mt=-K*this.dim,Ut=-pe*this.dim;for(let nr=We;nr<ft;nr++)for(let Mr=ke;Mr<je;Mr++)this.data[this._idx(Mr,nr)]=D.data[this._idx(Mr+Mt,nr+Ut)]}}_i("DEMData",Vx);class Gx{constructor(D){this._stringToNumber={},this._numberToString=[];for(let K=0;K<D.length;K++){let pe=D[K];this._stringToNumber[pe]=K,this._numberToString[K]=pe}}encode(D){return this._stringToNumber[D]}decode(D){if(D>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${D} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[D]}}class V1{constructor(D,K,pe,ke,je){this.type="Feature",this._vectorTileFeature=D,D._z=K,D._x=pe,D._y=ke,this.properties=D.properties,this.id=je}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(D){this._geometry=D}toJSON(){let D={geometry:this.geometry};for(let K in this)K!=="_geometry"&&K!=="_vectorTileFeature"&&(D[K]=this[K]);return D}}class zv{constructor(D,K){this.tileID=D,this.x=D.canonical.x,this.y=D.canonical.y,this.z=D.canonical.z,this.grid=new Fi(vo,16,0),this.grid3D=new Fi(vo,16,0),this.featureIndexArray=new Js,this.promoteId=K}insert(D,K,pe,ke,je,We){let ft=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(pe,ke,je);let Mt=We?this.grid3D:this.grid;for(let Ut=0;Ut<K.length;Ut++){let nr=K[Ut],Mr=[1/0,1/0,-1/0,-1/0];for(let zr=0;zr<nr.length;zr++){let Hr=nr[zr];Mr[0]=Math.min(Mr[0],Hr.x),Mr[1]=Math.min(Mr[1],Hr.y),Mr[2]=Math.max(Mr[2],Hr.x),Mr[3]=Math.max(Mr[3],Hr.y)}Mr[0]<vo&&Mr[1]<vo&&Mr[2]>=0&&Mr[3]>=0&&Mt.insert(ft,Mr[0],Mr[1],Mr[2],Mr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Jr.VectorTile(new P1(this.rawTileData)).layers,this.sourceLayerCoder=new Gx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(D,K,pe,ke){this.loadVTLayers();let je=D.params||{},We=vo/D.tileSize/D.scale,ft=Sc(je.filter),Mt=D.queryGeometry,Ut=D.queryPadding*We,nr=Wx(Mt),Mr=this.grid.query(nr.minX-Ut,nr.minY-Ut,nr.maxX+Ut,nr.maxY+Ut),zr=Wx(D.cameraQueryGeometry),Hr=this.grid3D.query(zr.minX-Ut,zr.minY-Ut,zr.maxX+Ut,zr.maxY+Ut,(Ga,Qa,Yi,xi)=>function(Hi,rn,jn,ko,vs){for(let Dn of Hi)if(rn<=Dn.x&&jn<=Dn.y&&ko>=Dn.x&&vs>=Dn.y)return!0;let go=[new i(rn,jn),new i(rn,vs),new i(ko,vs),new i(ko,jn)];if(Hi.length>2){for(let Dn of go)if(Ai(Hi,Dn))return!0}for(let Dn=0;Dn<Hi.length-1;Dn++)if(bi(Hi[Dn],Hi[Dn+1],go))return!0;return!1}(D.cameraQueryGeometry,Ga-Ut,Qa-Ut,Yi+Ut,xi+Ut));for(let Ga of Hr)Mr.push(Ga);Mr.sort(eA);let oa={},va;for(let Ga=0;Ga<Mr.length;Ga++){let Qa=Mr[Ga];if(Qa===va)continue;va=Qa;let Yi=this.featureIndexArray.get(Qa),xi=null;this.loadMatchingFeature(oa,Yi.bucketIndex,Yi.sourceLayerIndex,Yi.featureIndex,ft,je.layers,je.availableImages,K,pe,ke,(Hi,rn,jn)=>(xi||(xi=Tl(Hi)),rn.queryIntersectsFeature(Mt,Hi,jn,xi,this.z,D.transform,We,D.pixelPosMatrix)))}return oa}loadMatchingFeature(D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr){let zr=this.bucketLayerIDs[K];if(We&&!function(Ga,Qa){for(let Yi=0;Yi<Ga.length;Yi++)if(Qa.indexOf(Ga[Yi])>=0)return!0;return!1}(We,zr))return;let Hr=this.sourceLayerCoder.decode(pe),oa=this.vtLayers[Hr].feature(ke);if(je.needGeometry){let Ga=Gl(oa,!0);if(!je.filter(new Ls(this.tileID.overscaledZ),Ga,this.tileID.canonical))return}else if(!je.filter(new Ls(this.tileID.overscaledZ),oa))return;let va=this.getId(oa,Hr);for(let Ga=0;Ga<zr.length;Ga++){let Qa=zr[Ga];if(We&&We.indexOf(Qa)<0)continue;let Yi=Mt[Qa];if(!Yi)continue;let xi={};va&&nr&&(xi=nr.getState(Yi.sourceLayer||"_geojsonTileLayer",va));let Hi=E({},Ut[Qa]);Hi.paint=Hx(Hi.paint,Yi.paint,oa,xi,ft),Hi.layout=Hx(Hi.layout,Yi.layout,oa,xi,ft);let rn=!Mr||Mr(oa,Yi,xi);if(!rn)continue;let jn=new V1(oa,this.z,this.x,this.y,va);jn.layer=Hi;let ko=D[Qa];ko===void 0&&(ko=D[Qa]=[]),ko.push({featureIndex:ke,feature:jn,intersectionZ:rn})}}lookupSymbolFeatures(D,K,pe,ke,je,We,ft,Mt){let Ut={};this.loadVTLayers();let nr=Sc(je);for(let Mr of D)this.loadMatchingFeature(Ut,pe,ke,Mr,nr,We,ft,Mt,K);return Ut}hasLayer(D){for(let K of this.bucketLayerIDs)for(let pe of K)if(D===pe)return!0;return!1}getId(D,K){let pe=D.id;return this.promoteId&&(pe=D.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[K]],typeof pe=="boolean"&&(pe=Number(pe))),pe}}function Hx(H,D,K,pe,ke){return b(H,(je,We)=>{let ft=D instanceof gc?D.get(We):null;return ft&&ft.evaluate?ft.evaluate(K,pe,ke):ft})}function Wx(H){let D=1/0,K=1/0,pe=-1/0,ke=-1/0;for(let je of H)D=Math.min(D,je.x),K=Math.min(K,je.y),pe=Math.max(pe,je.x),ke=Math.max(ke,je.y);return{minX:D,minY:K,maxX:pe,maxY:ke}}function eA(H,D){return D-H}function Xx(H,D,K,pe,ke){let je=[];for(let We=0;We<H.length;We++){let ft=H[We],Mt;for(let Ut=0;Ut<ft.length-1;Ut++){let nr=ft[Ut],Mr=ft[Ut+1];nr.x<D&&Mr.x<D||(nr.x<D?nr=new i(D,nr.y+(D-nr.x)/(Mr.x-nr.x)*(Mr.y-nr.y))._round():Mr.x<D&&(Mr=new i(D,nr.y+(D-nr.x)/(Mr.x-nr.x)*(Mr.y-nr.y))._round()),nr.y<K&&Mr.y<K||(nr.y<K?nr=new i(nr.x+(K-nr.y)/(Mr.y-nr.y)*(Mr.x-nr.x),K)._round():Mr.y<K&&(Mr=new i(nr.x+(K-nr.y)/(Mr.y-nr.y)*(Mr.x-nr.x),K)._round()),nr.x>=pe&&Mr.x>=pe||(nr.x>=pe?nr=new i(pe,nr.y+(pe-nr.x)/(Mr.x-nr.x)*(Mr.y-nr.y))._round():Mr.x>=pe&&(Mr=new i(pe,nr.y+(pe-nr.x)/(Mr.x-nr.x)*(Mr.y-nr.y))._round()),nr.y>=ke&&Mr.y>=ke||(nr.y>=ke?nr=new i(nr.x+(ke-nr.y)/(Mr.y-nr.y)*(Mr.x-nr.x),ke)._round():Mr.y>=ke&&(Mr=new i(nr.x+(ke-nr.y)/(Mr.y-nr.y)*(Mr.x-nr.x),ke)._round()),Mt&&nr.equals(Mt[Mt.length-1])||(Mt=[nr],je.push(Mt)),Mt.push(Mr)))))}}return je}_i("FeatureIndex",zv,{omit:["rawTileData","sourceLayerCoder"]});class Wd extends i{constructor(D,K,pe,ke){super(D,K),this.angle=pe,ke!==void 0&&(this.segment=ke)}clone(){return new Wd(this.x,this.y,this.angle,this.segment)}}function G1(H,D,K,pe,ke){if(D.segment===void 0||K===0)return!0;let je=D,We=D.segment+1,ft=0;for(;ft>-K/2;){if(We--,We<0)return!1;ft-=H[We].dist(je),je=H[We]}ft+=H[We].dist(H[We+1]),We++;let Mt=[],Ut=0;for(;ft<K/2;){let nr=H[We],Mr=H[We+1];if(!Mr)return!1;let zr=H[We-1].angleTo(nr)-nr.angleTo(Mr);for(zr=Math.abs((zr+3*Math.PI)%(2*Math.PI)-Math.PI),Mt.push({distance:ft,angleDelta:zr}),Ut+=zr;ft-Mt[0].distance>pe;)Ut-=Mt.shift().angleDelta;if(Ut>ke)return!1;We++,ft+=nr.dist(Mr)}return!0}function Zx(H){let D=0;for(let K=0;K<H.length-1;K++)D+=H[K].dist(H[K+1]);return D}function Yx(H,D,K){return H?.6*D*K:0}function Kx(H,D){return Math.max(H?H.right-H.left:0,D?D.right-D.left:0)}function tA(H,D,K,pe,ke,je){let We=Yx(K,ke,je),ft=Kx(K,pe)*je,Mt=0,Ut=Zx(H)/2;for(let nr=0;nr<H.length-1;nr++){let Mr=H[nr],zr=H[nr+1],Hr=Mr.dist(zr);if(Mt+Hr>Ut){let oa=(Ut-Mt)/Hr,va=Xn.number(Mr.x,zr.x,oa),Ga=Xn.number(Mr.y,zr.y,oa),Qa=new Wd(va,Ga,zr.angleTo(Mr),nr);return Qa._round(),!We||G1(H,Qa,ft,We,D)?Qa:void 0}Mt+=Hr}}function rA(H,D,K,pe,ke,je,We,ft,Mt){let Ut=Yx(pe,je,We),nr=Kx(pe,ke),Mr=nr*We,zr=H[0].x===0||H[0].x===Mt||H[0].y===0||H[0].y===Mt;return D-Mr<D/4&&(D=Mr+D/4),Jx(H,zr?D/2*ft%D:(nr/2+2*je)*We*ft%D,D,Ut,K,Mr,zr,!1,Mt)}function Jx(H,D,K,pe,ke,je,We,ft,Mt){let Ut=je/2,nr=Zx(H),Mr=0,zr=D-K,Hr=[];for(let oa=0;oa<H.length-1;oa++){let va=H[oa],Ga=H[oa+1],Qa=va.dist(Ga),Yi=Ga.angleTo(va);for(;zr+K<Mr+Qa;){zr+=K;let xi=(zr-Mr)/Qa,Hi=Xn.number(va.x,Ga.x,xi),rn=Xn.number(va.y,Ga.y,xi);if(Hi>=0&&Hi<Mt&&rn>=0&&rn<Mt&&zr-Ut>=0&&zr+Ut<=nr){let jn=new Wd(Hi,rn,Yi,oa);jn._round(),pe&&!G1(H,jn,je,pe,ke)||Hr.push(jn)}}Mr+=Qa}return ft||Hr.length||We||(Hr=Jx(H,Mr/2,K,pe,ke,je,We,!0,Mt)),Hr}_i("Anchor",Wd);let fm=zh;function $x(H,D,K,pe){let ke=[],je=H.image,We=je.pixelRatio,ft=je.paddedRect.w-2*fm,Mt=je.paddedRect.h-2*fm,Ut={x1:H.left,y1:H.top,x2:H.right,y2:H.bottom},nr=je.stretchX||[[0,ft]],Mr=je.stretchY||[[0,Mt]],zr=(_n,us)=>_n+us[1]-us[0],Hr=nr.reduce(zr,0),oa=Mr.reduce(zr,0),va=ft-Hr,Ga=Mt-oa,Qa=0,Yi=Hr,xi=0,Hi=oa,rn=0,jn=va,ko=0,vs=Ga;if(je.content&&pe){let _n=je.content,us=_n[2]-_n[0],No=_n[3]-_n[1];(je.textFitWidth||je.textFitHeight)&&(Ut=zx(H)),Qa=Xd(nr,0,_n[0]),xi=Xd(Mr,0,_n[1]),Yi=Xd(nr,_n[0],_n[2]),Hi=Xd(Mr,_n[1],_n[3]),rn=_n[0]-Qa,ko=_n[1]-xi,jn=us-Yi,vs=No-Hi}let go=Ut.x1,Dn=Ut.y1,is=Ut.x2-go,Vo=Ut.y2-Dn,Bo=(_n,us,No,Es)=>{let Ku=Lg(_n.stretch-Qa,Yi,is,go),Uu=hm(_n.fixed-rn,jn,_n.stretch,Hr),Qf=Lg(us.stretch-xi,Hi,Vo,Dn),Hp=hm(us.fixed-ko,vs,us.stretch,oa),bh=Lg(No.stretch-Qa,Yi,is,go),eh=hm(No.fixed-rn,jn,No.stretch,Hr),Jh=Lg(Es.stretch-xi,Hi,Vo,Dn),$h=hm(Es.fixed-ko,vs,Es.stretch,oa),Qh=new i(Ku,Qf),uf=new i(bh,Qf),th=new i(bh,Jh),Fh=new i(Ku,Jh),wh=new i(Uu/We,Hp/We),fh=new i(eh/We,$h/We),gf=D*Math.PI/180;if(gf){let uu=Math.sin(gf),fc=Math.cos(gf),Ju=[fc,-uu,uu,fc];Qh._matMult(Ju),uf._matMult(Ju),Fh._matMult(Ju),th._matMult(Ju)}let Ip=_n.stretch+_n.fixed,pp=us.stretch+us.fixed;return{tl:Qh,tr:uf,bl:Fh,br:th,tex:{x:je.paddedRect.x+fm+Ip,y:je.paddedRect.y+fm+pp,w:No.stretch+No.fixed-Ip,h:Es.stretch+Es.fixed-pp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wh,pixelOffsetBR:fh,minFontScaleX:jn/We/is,minFontScaleY:vs/We/Vo,isSDF:K}};if(pe&&(je.stretchX||je.stretchY)){let _n=Qx(nr,va,Hr),us=Qx(Mr,Ga,oa);for(let No=0;No<_n.length-1;No++){let Es=_n[No],Ku=_n[No+1];for(let Uu=0;Uu<us.length-1;Uu++)ke.push(Bo(Es,us[Uu],Ku,us[Uu+1]))}}else ke.push(Bo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ft+1},{fixed:0,stretch:Mt+1}));return ke}function Xd(H,D,K){let pe=0;for(let ke of H)pe+=Math.max(D,Math.min(K,ke[1]))-Math.max(D,Math.min(K,ke[0]));return pe}function Qx(H,D,K){let pe=[{fixed:-fm,stretch:0}];for(let[ke,je]of H){let We=pe[pe.length-1];pe.push({fixed:ke-We.stretch,stretch:We.stretch}),pe.push({fixed:ke-We.stretch,stretch:We.stretch+(je-ke)})}return pe.push({fixed:D+fm,stretch:K}),pe}function Lg(H,D,K,pe){return H/D*K+pe}function hm(H,D,K,pe){return H-D*K/pe}class hv{constructor(D,K,pe,ke,je,We,ft,Mt,Ut,nr){var Mr;if(this.boxStartIndex=D.length,Ut){let zr=We.top,Hr=We.bottom,oa=We.collisionPadding;oa&&(zr-=oa[1],Hr+=oa[3]);let va=Hr-zr;va>0&&(va=Math.max(10,va),this.circleDiameter=va)}else{let zr=!((Mr=We.image)===null||Mr===void 0)&&Mr.content&&(We.image.textFitWidth||We.image.textFitHeight)?zx(We):{x1:We.left,y1:We.top,x2:We.right,y2:We.bottom};zr.y1=zr.y1*ft-Mt[0],zr.y2=zr.y2*ft+Mt[2],zr.x1=zr.x1*ft-Mt[3],zr.x2=zr.x2*ft+Mt[1];let Hr=We.collisionPadding;if(Hr&&(zr.x1-=Hr[0]*ft,zr.y1-=Hr[1]*ft,zr.x2+=Hr[2]*ft,zr.y2+=Hr[3]*ft),nr){let oa=new i(zr.x1,zr.y1),va=new i(zr.x2,zr.y1),Ga=new i(zr.x1,zr.y2),Qa=new i(zr.x2,zr.y2),Yi=nr*Math.PI/180;oa._rotate(Yi),va._rotate(Yi),Ga._rotate(Yi),Qa._rotate(Yi),zr.x1=Math.min(oa.x,va.x,Ga.x,Qa.x),zr.x2=Math.max(oa.x,va.x,Ga.x,Qa.x),zr.y1=Math.min(oa.y,va.y,Ga.y,Qa.y),zr.y2=Math.max(oa.y,va.y,Ga.y,Qa.y)}D.emplaceBack(K.x,K.y,zr.x1,zr.y1,zr.x2,zr.y2,pe,ke,je)}this.boxEndIndex=D.length}}class fd{constructor(D=[],K=(pe,ke)=>pe<ke?-1:pe>ke?1:0){if(this.data=D,this.length=this.data.length,this.compare=K,this.length>0)for(let pe=(this.length>>1)-1;pe>=0;pe--)this._down(pe)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],K=this.data.pop();return--this.length>0&&(this.data[0]=K,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:K,compare:pe}=this,ke=K[D];for(;D>0;){let je=D-1>>1,We=K[je];if(pe(ke,We)>=0)break;K[D]=We,D=je}K[D]=ke}_down(D){let{data:K,compare:pe}=this,ke=this.length>>1,je=K[D];for(;D<ke;){let We=1+(D<<1),ft=We+1;if(ft<this.length&&pe(K[ft],K[We])<0&&(We=ft),pe(K[We],je)>=0)break;K[D]=K[We],D=We}K[D]=je}}function aA(H,D=1,K=!1){let pe=1/0,ke=1/0,je=-1/0,We=-1/0,ft=H[0];for(let Hr=0;Hr<ft.length;Hr++){let oa=ft[Hr];(!Hr||oa.x<pe)&&(pe=oa.x),(!Hr||oa.y<ke)&&(ke=oa.y),(!Hr||oa.x>je)&&(je=oa.x),(!Hr||oa.y>We)&&(We=oa.y)}let Mt=Math.min(je-pe,We-ke),Ut=Mt/2,nr=new fd([],iA);if(Mt===0)return new i(pe,ke);for(let Hr=pe;Hr<je;Hr+=Mt)for(let oa=ke;oa<We;oa+=Mt)nr.push(new pm(Hr+Ut,oa+Ut,Ut,H));let Mr=function(Hr){let oa=0,va=0,Ga=0,Qa=Hr[0];for(let Yi=0,xi=Qa.length,Hi=xi-1;Yi<xi;Hi=Yi++){let rn=Qa[Yi],jn=Qa[Hi],ko=rn.x*jn.y-jn.x*rn.y;va+=(rn.x+jn.x)*ko,Ga+=(rn.y+jn.y)*ko,oa+=3*ko}return new pm(va/oa,Ga/oa,0,Hr)}(H),zr=nr.length;for(;nr.length;){let Hr=nr.pop();(Hr.d>Mr.d||!Mr.d)&&(Mr=Hr,K&&console.log("found best %d after %d probes",Math.round(1e4*Hr.d)/1e4,zr)),Hr.max-Mr.d<=D||(Ut=Hr.h/2,nr.push(new pm(Hr.p.x-Ut,Hr.p.y-Ut,Ut,H)),nr.push(new pm(Hr.p.x+Ut,Hr.p.y-Ut,Ut,H)),nr.push(new pm(Hr.p.x-Ut,Hr.p.y+Ut,Ut,H)),nr.push(new pm(Hr.p.x+Ut,Hr.p.y+Ut,Ut,H)),zr+=4)}return K&&(console.log(`num probes: ${zr}`),console.log(`best distance: ${Mr.d}`)),Mr.p}function iA(H,D){return D.max-H.max}function pm(H,D,K,pe){this.p=new i(H,D),this.h=K,this.d=function(ke,je){let We=!1,ft=1/0;for(let Mt=0;Mt<je.length;Mt++){let Ut=je[Mt];for(let nr=0,Mr=Ut.length,zr=Mr-1;nr<Mr;zr=nr++){let Hr=Ut[nr],oa=Ut[zr];Hr.y>ke.y!=oa.y>ke.y&&ke.x<(oa.x-Hr.x)*(ke.y-Hr.y)/(oa.y-Hr.y)+Hr.x&&(We=!We),ft=Math.min(ft,wa(ke,Hr,oa))}}return(We?1:-1)*Math.sqrt(ft)}(this.p,pe),this.max=this.d+this.h*Math.SQRT2}var xh;e.aq=void 0,(xh=e.aq||(e.aq={}))[xh.center=1]="center",xh[xh.left=2]="left",xh[xh.right=3]="right",xh[xh.top=4]="top",xh[xh.bottom=5]="bottom",xh[xh["top-left"]=6]="top-left",xh[xh["top-right"]=7]="top-right",xh[xh["bottom-left"]=8]="bottom-left",xh[xh["bottom-right"]=9]="bottom-right";let pv=7,Fv=Number.POSITIVE_INFINITY;function H1(H,D){return D[1]!==Fv?function(K,pe,ke){let je=0,We=0;switch(pe=Math.abs(pe),ke=Math.abs(ke),K){case"top-right":case"top-left":case"top":We=ke-pv;break;case"bottom-right":case"bottom-left":case"bottom":We=-ke+pv}switch(K){case"top-right":case"bottom-right":case"right":je=-pe;break;case"top-left":case"bottom-left":case"left":je=pe}return[je,We]}(H,D[0],D[1]):function(K,pe){let ke=0,je=0;pe<0&&(pe=0);let We=pe/Math.SQRT2;switch(K){case"top-right":case"top-left":je=We-pv;break;case"bottom-right":case"bottom-left":je=-We+pv;break;case"bottom":je=-pe+pv;break;case"top":je=pe-pv}switch(K){case"top-right":case"bottom-right":ke=-We;break;case"top-left":case"bottom-left":ke=We;break;case"left":ke=pe;break;case"right":ke=-pe}return[ke,je]}(H,D[0])}function eb(H,D,K){var pe;let ke=H.layout,je=(pe=ke.get("text-variable-anchor-offset"))===null||pe===void 0?void 0:pe.evaluate(D,{},K);if(je){let ft=je.values,Mt=[];for(let Ut=0;Ut<ft.length;Ut+=2){let nr=Mt[Ut]=ft[Ut],Mr=ft[Ut+1].map(zr=>zr*lu);nr.startsWith("top")?Mr[1]-=pv:nr.startsWith("bottom")&&(Mr[1]+=pv),Mt[Ut+1]=Mr}return new Ha(Mt)}let We=ke.get("text-variable-anchor");if(We){let ft;ft=H._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ke.get("text-radial-offset").evaluate(D,{},K)*lu,Fv]:ke.get("text-offset").evaluate(D,{},K).map(Ut=>Ut*lu);let Mt=[];for(let Ut of We)Mt.push(Ut,H1(Ut,ft));return new Ha(Mt)}return null}function W1(H){switch(H){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function nA(H,D,K,pe,ke,je,We,ft,Mt,Ut,nr){let Mr=je.textMaxSize.evaluate(D,{});Mr===void 0&&(Mr=We);let zr=H.layers[0].layout,Hr=zr.get("icon-offset").evaluate(D,{},nr),oa=rb(K.horizontal),va=We/24,Ga=H.tilePixelRatio*va,Qa=H.tilePixelRatio*Mr/24,Yi=H.tilePixelRatio*ft,xi=H.tilePixelRatio*zr.get("symbol-spacing"),Hi=zr.get("text-padding")*H.tilePixelRatio,rn=function(_n,us,No,Es=1){let Ku=_n.get("icon-padding").evaluate(us,{},No),Uu=Ku&&Ku.values;return[Uu[0]*Es,Uu[1]*Es,Uu[2]*Es,Uu[3]*Es]}(zr,D,nr,H.tilePixelRatio),jn=zr.get("text-max-angle")/180*Math.PI,ko=zr.get("text-rotation-alignment")!=="viewport"&&zr.get("symbol-placement")!=="point",vs=zr.get("icon-rotation-alignment")==="map"&&zr.get("symbol-placement")!=="point",go=zr.get("symbol-placement"),Dn=xi/2,is=zr.get("icon-text-fit"),Vo;pe&&is!=="none"&&(H.allowVerticalPlacement&&K.vertical&&(Vo=Fx(pe,K.vertical,is,zr.get("icon-text-fit-padding"),Hr,va)),oa&&(pe=Fx(pe,oa,is,zr.get("icon-text-fit-padding"),Hr,va)));let Bo=(_n,us)=>{us.x<0||us.x>=vo||us.y<0||us.y>=vo||function(No,Es,Ku,Uu,Qf,Hp,bh,eh,Jh,$h,Qh,uf,th,Fh,wh,fh,gf,Ip,pp,uu,fc,Ju,Rp,Kc,dm){let _d=No.addToLineVertexArray(Es,Ku),hd,Wp,Rc,Pf,Xp=0,Zd=0,dp=0,vm=0,J1=-1,Dg=-1,xd={},Ov=ni("");if(No.allowVerticalPlacement&&Uu.vertical){let Oh=eh.layout.get("text-rotate").evaluate(fc,{},Kc)+90;Rc=new hv(Jh,Es,$h,Qh,uf,Uu.vertical,th,Fh,wh,Oh),bh&&(Pf=new hv(Jh,Es,$h,Qh,uf,bh,gf,Ip,wh,Oh))}if(Qf){let Oh=eh.layout.get("icon-rotate").evaluate(fc,{}),Zp=eh.layout.get("icon-text-fit")!=="none",dv=$x(Qf,Oh,Rp,Zp),ep=bh?$x(bh,Oh,Rp,Zp):void 0;Wp=new hv(Jh,Es,$h,Qh,uf,Qf,gf,Ip,!1,Oh),Xp=4*dv.length;let Bh=No.iconSizeData,nd=null;Bh.kind==="source"?(nd=[yd*eh.layout.get("icon-size").evaluate(fc,{})],nd[0]>cv&&h(`${No.layerIds[0]}: Value for "icon-size" is >= ${M0}. Reduce your "icon-size".`)):Bh.kind==="composite"&&(nd=[yd*Ju.compositeIconSizes[0].evaluate(fc,{},Kc),yd*Ju.compositeIconSizes[1].evaluate(fc,{},Kc)],(nd[0]>cv||nd[1]>cv)&&h(`${No.layerIds[0]}: Value for "icon-size" is >= ${M0}. Reduce your "icon-size".`)),No.addSymbols(No.icon,dv,nd,uu,pp,fc,e.ah.none,Es,_d.lineStartIndex,_d.lineLength,-1,Kc),J1=No.icon.placedSymbolArray.length-1,ep&&(Zd=4*ep.length,No.addSymbols(No.icon,ep,nd,uu,pp,fc,e.ah.vertical,Es,_d.lineStartIndex,_d.lineLength,-1,Kc),Dg=No.icon.placedSymbolArray.length-1)}let hh=Object.keys(Uu.horizontal);for(let Oh of hh){let Zp=Uu.horizontal[Oh];if(!hd){Ov=ni(Zp.text);let ep=eh.layout.get("text-rotate").evaluate(fc,{},Kc);hd=new hv(Jh,Es,$h,Qh,uf,Zp,th,Fh,wh,ep)}let dv=Zp.positionedLines.length===1;if(dp+=tb(No,Es,Zp,Hp,eh,wh,fc,fh,_d,Uu.vertical?e.ah.horizontal:e.ah.horizontalOnly,dv?hh:[Oh],xd,J1,Ju,Kc),dv)break}Uu.vertical&&(vm+=tb(No,Es,Uu.vertical,Hp,eh,wh,fc,fh,_d,e.ah.vertical,["vertical"],xd,Dg,Ju,Kc));let lA=hd?hd.boxStartIndex:No.collisionBoxArray.length,zg=hd?hd.boxEndIndex:No.collisionBoxArray.length,bd=Rc?Rc.boxStartIndex:No.collisionBoxArray.length,vp=Rc?Rc.boxEndIndex:No.collisionBoxArray.length,ob=Wp?Wp.boxStartIndex:No.collisionBoxArray.length,uA=Wp?Wp.boxEndIndex:No.collisionBoxArray.length,sb=Pf?Pf.boxStartIndex:No.collisionBoxArray.length,cA=Pf?Pf.boxEndIndex:No.collisionBoxArray.length,id=-1,F0=(Oh,Zp)=>Oh&&Oh.circleDiameter?Math.max(Oh.circleDiameter,Zp):Zp;id=F0(hd,id),id=F0(Rc,id),id=F0(Wp,id),id=F0(Pf,id);let Fg=id>-1?1:0;Fg&&(id*=dm/lu),No.glyphOffsetArray.length>=um.MAX_GLYPHS&&h("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),fc.sortKey!==void 0&&No.addToSortKeyRanges(No.symbolInstances.length,fc.sortKey);let $1=eb(eh,fc,Kc),[fA,hA]=function(Oh,Zp){let dv=Oh.length,ep=Zp?.values;if(ep?.length>0)for(let Bh=0;Bh<ep.length;Bh+=2){let nd=ep[Bh+1];Oh.emplaceBack(e.aq[ep[Bh]],nd[0],nd[1])}return[dv,Oh.length]}(No.textAnchorOffsets,$1);No.symbolInstances.emplaceBack(Es.x,Es.y,xd.right>=0?xd.right:-1,xd.center>=0?xd.center:-1,xd.left>=0?xd.left:-1,xd.vertical||-1,J1,Dg,Ov,lA,zg,bd,vp,ob,uA,sb,cA,$h,dp,vm,Xp,Zd,Fg,0,th,id,fA,hA)}(H,us,_n,K,pe,ke,Vo,H.layers[0],H.collisionBoxArray,D.index,D.sourceLayerIndex,H.index,Ga,[Hi,Hi,Hi,Hi],ko,Mt,Yi,rn,vs,Hr,D,je,Ut,nr,We)};if(go==="line")for(let _n of Xx(D.geometry,0,0,vo,vo)){let us=rA(_n,xi,jn,K.vertical||oa,pe,24,Qa,H.overscaling,vo);for(let No of us)oa&&oA(H,oa.text,Dn,No)||Bo(_n,No)}else if(go==="line-center"){for(let _n of D.geometry)if(_n.length>1){let us=tA(_n,jn,K.vertical||oa,pe,24,Qa);us&&Bo(_n,us)}}else if(D.type==="Polygon")for(let _n of Bc(D.geometry,0)){let us=aA(_n,16);Bo(_n[0],new Wd(us.x,us.y,0))}else if(D.type==="LineString")for(let _n of D.geometry)Bo(_n,new Wd(_n[0].x,_n[0].y,0));else if(D.type==="Point")for(let _n of D.geometry)for(let us of _n)Bo([us],new Wd(us.x,us.y,0))}function tb(H,D,K,pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa){let va=function(Yi,xi,Hi,rn,jn,ko,vs,go){let Dn=rn.layout.get("text-rotate").evaluate(ko,{})*Math.PI/180,is=[];for(let Vo of xi.positionedLines)for(let Bo of Vo.positionedGlyphs){if(!Bo.rect)continue;let _n=Bo.rect||{},us=Px+1,No=!0,Es=1,Ku=0,Uu=(jn||go)&&Bo.vertical,Qf=Bo.metrics.advance*Bo.scale/2;if(go&&xi.verticalizable&&(Ku=Vo.lineOffset/2-(Bo.imageName?-(lu-Bo.metrics.width*Bo.scale)/2:(Bo.scale-1)*lu)),Bo.imageName){let uu=vs[Bo.imageName];No=uu.sdf,Es=uu.pixelRatio,us=zh/Es}let Hp=jn?[Bo.x+Qf,Bo.y]:[0,0],bh=jn?[0,0]:[Bo.x+Qf+Hi[0],Bo.y+Hi[1]-Ku],eh=[0,0];Uu&&(eh=bh,bh=[0,0]);let Jh=Bo.metrics.isDoubleResolution?2:1,$h=(Bo.metrics.left-us)*Bo.scale-Qf+bh[0],Qh=(-Bo.metrics.top-us)*Bo.scale+bh[1],uf=$h+_n.w/Jh*Bo.scale/Es,th=Qh+_n.h/Jh*Bo.scale/Es,Fh=new i($h,Qh),wh=new i(uf,Qh),fh=new i($h,th),gf=new i(uf,th);if(Uu){let uu=new i(-Qf,Qf-$f),fc=-Math.PI/2,Ju=lu/2-Qf,Rp=new i(5-$f-Ju,-(Bo.imageName?Ju:0)),Kc=new i(...eh);Fh._rotateAround(fc,uu)._add(Rp)._add(Kc),wh._rotateAround(fc,uu)._add(Rp)._add(Kc),fh._rotateAround(fc,uu)._add(Rp)._add(Kc),gf._rotateAround(fc,uu)._add(Rp)._add(Kc)}if(Dn){let uu=Math.sin(Dn),fc=Math.cos(Dn),Ju=[fc,-uu,uu,fc];Fh._matMult(Ju),wh._matMult(Ju),fh._matMult(Ju),gf._matMult(Ju)}let Ip=new i(0,0),pp=new i(0,0);is.push({tl:Fh,tr:wh,bl:fh,br:gf,tex:_n,writingMode:xi.writingMode,glyphOffset:Hp,sectionIndex:Bo.sectionIndex,isSDF:No,pixelOffsetTL:Ip,pixelOffsetBR:pp,minFontScaleX:0,minFontScaleY:0})}return is}(0,K,ft,ke,je,We,pe,H.allowVerticalPlacement),Ga=H.textSizeData,Qa=null;Ga.kind==="source"?(Qa=[yd*ke.layout.get("text-size").evaluate(We,{})],Qa[0]>cv&&h(`${H.layerIds[0]}: Value for "text-size" is >= ${M0}. Reduce your "text-size".`)):Ga.kind==="composite"&&(Qa=[yd*Hr.compositeTextSizes[0].evaluate(We,{},oa),yd*Hr.compositeTextSizes[1].evaluate(We,{},oa)],(Qa[0]>cv||Qa[1]>cv)&&h(`${H.layerIds[0]}: Value for "text-size" is >= ${M0}. Reduce your "text-size".`)),H.addSymbols(H.text,va,Qa,ft,je,We,Ut,D,Mt.lineStartIndex,Mt.lineLength,zr,oa);for(let Yi of nr)Mr[Yi]=H.text.placedSymbolArray.length-1;return 4*va.length}function rb(H){for(let D in H)return H[D];return null}function oA(H,D,K,pe){let ke=H.compareText;if(D in ke){let je=ke[D];for(let We=je.length-1;We>=0;We--)if(pe.dist(je[We])<K)return!0}else ke[D]=[];return ke[D].push(pe),!1}let ab=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class X1{static from(D){if(!(D instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[K,pe]=new Uint8Array(D,0,2);if(K!==219)throw new Error("Data does not appear to be in a KDBush format.");let ke=pe>>4;if(ke!==1)throw new Error(`Got v${ke} data when expected v1.`);let je=ab[15&pe];if(!je)throw new Error("Unrecognized array type.");let[We]=new Uint16Array(D,2,1),[ft]=new Uint32Array(D,4,1);return new X1(ft,We,je,D)}constructor(D,K=64,pe=Float64Array,ke){if(isNaN(D)||D<0)throw new Error(`Unpexpected numItems value: ${D}.`);this.numItems=+D,this.nodeSize=Math.min(Math.max(+K,2),65535),this.ArrayType=pe,this.IndexArrayType=D<65536?Uint16Array:Uint32Array;let je=ab.indexOf(this.ArrayType),We=2*D*this.ArrayType.BYTES_PER_ELEMENT,ft=D*this.IndexArrayType.BYTES_PER_ELEMENT,Mt=(8-ft%8)%8;if(je<0)throw new Error(`Unexpected typed array class: ${pe}.`);ke&&ke instanceof ArrayBuffer?(this.data=ke,this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ft+Mt,2*D),this._pos=2*D,this._finished=!0):(this.data=new ArrayBuffer(8+We+ft+Mt),this.ids=new this.IndexArrayType(this.data,8,D),this.coords=new this.ArrayType(this.data,8+ft+Mt,2*D),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+je]),new Uint16Array(this.data,2,1)[0]=K,new Uint32Array(this.data,4,1)[0]=D)}add(D,K){let pe=this._pos>>1;return this.ids[pe]=pe,this.coords[this._pos++]=D,this.coords[this._pos++]=K,pe}finish(){let D=this._pos>>1;if(D!==this.numItems)throw new Error(`Added ${D} items when expected ${this.numItems}.`);return Pg(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(D,K,pe,ke){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:je,coords:We,nodeSize:ft}=this,Mt=[0,je.length-1,0],Ut=[];for(;Mt.length;){let nr=Mt.pop()||0,Mr=Mt.pop()||0,zr=Mt.pop()||0;if(Mr-zr<=ft){for(let Ga=zr;Ga<=Mr;Ga++){let Qa=We[2*Ga],Yi=We[2*Ga+1];Qa>=D&&Qa<=pe&&Yi>=K&&Yi<=ke&&Ut.push(je[Ga])}continue}let Hr=zr+Mr>>1,oa=We[2*Hr],va=We[2*Hr+1];oa>=D&&oa<=pe&&va>=K&&va<=ke&&Ut.push(je[Hr]),(nr===0?D<=oa:K<=va)&&(Mt.push(zr),Mt.push(Hr-1),Mt.push(1-nr)),(nr===0?pe>=oa:ke>=va)&&(Mt.push(Hr+1),Mt.push(Mr),Mt.push(1-nr))}return Ut}within(D,K,pe){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ke,coords:je,nodeSize:We}=this,ft=[0,ke.length-1,0],Mt=[],Ut=pe*pe;for(;ft.length;){let nr=ft.pop()||0,Mr=ft.pop()||0,zr=ft.pop()||0;if(Mr-zr<=We){for(let Ga=zr;Ga<=Mr;Ga++)nb(je[2*Ga],je[2*Ga+1],D,K)<=Ut&&Mt.push(ke[Ga]);continue}let Hr=zr+Mr>>1,oa=je[2*Hr],va=je[2*Hr+1];nb(oa,va,D,K)<=Ut&&Mt.push(ke[Hr]),(nr===0?D-pe<=oa:K-pe<=va)&&(ft.push(zr),ft.push(Hr-1),ft.push(1-nr)),(nr===0?D+pe>=oa:K+pe>=va)&&(ft.push(Hr+1),ft.push(Mr),ft.push(1-nr))}return Mt}}function Pg(H,D,K,pe,ke,je){if(ke-pe<=K)return;let We=pe+ke>>1;ib(H,D,We,pe,ke,je),Pg(H,D,K,pe,We-1,1-je),Pg(H,D,K,We+1,ke,1-je)}function ib(H,D,K,pe,ke,je){for(;ke>pe;){if(ke-pe>600){let Ut=ke-pe+1,nr=K-pe+1,Mr=Math.log(Ut),zr=.5*Math.exp(2*Mr/3),Hr=.5*Math.sqrt(Mr*zr*(Ut-zr)/Ut)*(nr-Ut/2<0?-1:1);ib(H,D,K,Math.max(pe,Math.floor(K-nr*zr/Ut+Hr)),Math.min(ke,Math.floor(K+(Ut-nr)*zr/Ut+Hr)),je)}let We=D[2*K+je],ft=pe,Mt=ke;for(D0(H,D,pe,K),D[2*ke+je]>We&&D0(H,D,pe,ke);ft<Mt;){for(D0(H,D,ft,Mt),ft++,Mt--;D[2*ft+je]<We;)ft++;for(;D[2*Mt+je]>We;)Mt--}D[2*pe+je]===We?D0(H,D,pe,Mt):(Mt++,D0(H,D,Mt,ke)),Mt<=K&&(pe=Mt+1),K<=Mt&&(ke=Mt-1)}}function D0(H,D,K,pe){Z1(H,K,pe),Z1(D,2*K,2*pe),Z1(D,2*K+1,2*pe+1)}function Z1(H,D,K){let pe=H[D];H[D]=H[K],H[K]=pe}function nb(H,D,K,pe){let ke=H-K,je=D-pe;return ke*ke+je*je}var Ig;e.bg=void 0,(Ig=e.bg||(e.bg={})).create="create",Ig.load="load",Ig.fullLoad="fullLoad";let z0=null,Vf=[],Y1=1e3/60,K1="loadTime",Rg="fullLoadTime",sA={mark(H){performance.mark(H)},frame(H){let D=H;z0!=null&&Vf.push(D-z0),z0=D},clearMetrics(){z0=null,Vf=[],performance.clearMeasures(K1),performance.clearMeasures(Rg);for(let H in e.bg)performance.clearMarks(e.bg[H])},getPerformanceMetrics(){performance.measure(K1,e.bg.create,e.bg.load),performance.measure(Rg,e.bg.create,e.bg.fullLoad);let H=performance.getEntriesByName(K1)[0].duration,D=performance.getEntriesByName(Rg)[0].duration,K=Vf.length,pe=1/(Vf.reduce((je,We)=>je+We,0)/K/1e3),ke=Vf.filter(je=>je>Y1).reduce((je,We)=>je+(We-Y1)/Y1,0);return{loadTime:H,fullLoadTime:D,fps:pe,percentDroppedFrames:ke/(K+ke)*100,totalFrames:K}}};e.$=class extends br{},e.A=ii,e.B=Zi,e.C=function(H){if(z==null){let D=H.navigator?H.navigator.userAgent:null;z=!!H.safari||!(!D||!(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return z},e.D=fo,e.E=ee,e.F=class{constructor(H,D){this.target=H,this.mapId=D,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new U1(()=>this.process()),this.subscription=function(K,pe,ke,je){return K.addEventListener(pe,ke,!1),{unsubscribe:()=>{K.removeEventListener(pe,ke,!1)}}}(this.target,"message",K=>this.receive(K)),this.globalScope=L(self)?H:window}registerMessageHandler(H,D){this.messageHandlers[H]=D}sendAsync(H,D){return new Promise((K,pe)=>{let ke=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ke]={resolve:K,reject:pe},D&&D.signal.addEventListener("abort",()=>{delete this.resolveRejects[ke];let ft={id:ke,type:"<cancel>",origin:location.origin,targetMapId:H.targetMapId,sourceMapId:this.mapId};this.target.postMessage(ft)},{once:!0});let je=[],We=Object.assign(Object.assign({},H),{id:ke,sourceMapId:this.mapId,origin:location.origin,data:Jn(H.data,je)});this.target.postMessage(We,{transfer:je})})}receive(H){let D=H.data,K=D.id;if(!(D.origin!=="file://"&&location.origin!=="file://"&&D.origin!=="resource://android"&&location.origin!=="resource://android"&&D.origin!==location.origin||D.targetMapId&&this.mapId!==D.targetMapId)){if(D.type==="<cancel>"){delete this.tasks[K];let pe=this.abortControllers[K];return delete this.abortControllers[K],void(pe&&pe.abort())}if(L(self)||D.mustQueue)return this.tasks[K]=D,this.taskQueue.push(K),void this.invoker.trigger();this.processTask(K,D)}}process(){if(this.taskQueue.length===0)return;let H=this.taskQueue.shift(),D=this.tasks[H];delete this.tasks[H],this.taskQueue.length>0&&this.invoker.trigger(),D&&this.processTask(H,D)}processTask(H,D){return t(this,void 0,void 0,function*(){if(D.type==="<response>"){let ke=this.resolveRejects[H];return delete this.resolveRejects[H],ke?void(D.error?ke.reject(co(D.error)):ke.resolve(co(D.data))):void 0}if(!this.messageHandlers[D.type])return void this.completeTask(H,new Error(`Could not find a registered handler for ${D.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let K=co(D.data),pe=new AbortController;this.abortControllers[H]=pe;try{let ke=yield this.messageHandlers[D.type](D.sourceMapId,K,pe);this.completeTask(H,null,ke)}catch(ke){this.completeTask(H,ke)}})}completeTask(H,D,K){let pe=[];delete this.abortControllers[H];let ke={id:H,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:D?Jn(D):null,data:Jn(K,pe)};this.target.postMessage(ke,{transfer:pe})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=le,e.H=function(){var H=new ii(16);return ii!=Float32Array&&(H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[11]=0,H[12]=0,H[13]=0,H[14]=0),H[0]=1,H[5]=1,H[10]=1,H[15]=1,H},e.I=bg,e.J=function(H,D,K){var pe,ke,je,We,ft,Mt,Ut,nr,Mr,zr,Hr,oa,va=K[0],Ga=K[1],Qa=K[2];return D===H?(H[12]=D[0]*va+D[4]*Ga+D[8]*Qa+D[12],H[13]=D[1]*va+D[5]*Ga+D[9]*Qa+D[13],H[14]=D[2]*va+D[6]*Ga+D[10]*Qa+D[14],H[15]=D[3]*va+D[7]*Ga+D[11]*Qa+D[15]):(ke=D[1],je=D[2],We=D[3],ft=D[4],Mt=D[5],Ut=D[6],nr=D[7],Mr=D[8],zr=D[9],Hr=D[10],oa=D[11],H[0]=pe=D[0],H[1]=ke,H[2]=je,H[3]=We,H[4]=ft,H[5]=Mt,H[6]=Ut,H[7]=nr,H[8]=Mr,H[9]=zr,H[10]=Hr,H[11]=oa,H[12]=pe*va+ft*Ga+Mr*Qa+D[12],H[13]=ke*va+Mt*Ga+zr*Qa+D[13],H[14]=je*va+Ut*Ga+Hr*Qa+D[14],H[15]=We*va+nr*Ga+oa*Qa+D[15]),H},e.K=function(H,D,K){var pe=K[0],ke=K[1],je=K[2];return H[0]=D[0]*pe,H[1]=D[1]*pe,H[2]=D[2]*pe,H[3]=D[3]*pe,H[4]=D[4]*ke,H[5]=D[5]*ke,H[6]=D[6]*ke,H[7]=D[7]*ke,H[8]=D[8]*je,H[9]=D[9]*je,H[10]=D[10]*je,H[11]=D[11]*je,H[12]=D[12],H[13]=D[13],H[14]=D[14],H[15]=D[15],H},e.L=Wa,e.M=function(H,D){let K={};for(let pe=0;pe<D.length;pe++){let ke=D[pe];ke in H&&(K[ke]=H[ke])}return K},e.N=Hd,e.O=Cg,e.P=i,e.Q=jx,e.R=Di,e.S=Gp,e.T=Zu,e.U=v,e.V=T,e.W=O,e.X=vo,e.Y=pt,e.Z=I0,e._=t,e.a=Q,e.a$=function(H,D){var K=H[0],pe=H[1],ke=H[2],je=H[3],We=H[4],ft=H[5],Mt=H[6],Ut=H[7],nr=H[8],Mr=H[9],zr=H[10],Hr=H[11],oa=H[12],va=H[13],Ga=H[14],Qa=H[15],Yi=D[0],xi=D[1],Hi=D[2],rn=D[3],jn=D[4],ko=D[5],vs=D[6],go=D[7],Dn=D[8],is=D[9],Vo=D[10],Bo=D[11],_n=D[12],us=D[13],No=D[14],Es=D[15];return Math.abs(K-Yi)<=Ea*Math.max(1,Math.abs(K),Math.abs(Yi))&&Math.abs(pe-xi)<=Ea*Math.max(1,Math.abs(pe),Math.abs(xi))&&Math.abs(ke-Hi)<=Ea*Math.max(1,Math.abs(ke),Math.abs(Hi))&&Math.abs(je-rn)<=Ea*Math.max(1,Math.abs(je),Math.abs(rn))&&Math.abs(We-jn)<=Ea*Math.max(1,Math.abs(We),Math.abs(jn))&&Math.abs(ft-ko)<=Ea*Math.max(1,Math.abs(ft),Math.abs(ko))&&Math.abs(Mt-vs)<=Ea*Math.max(1,Math.abs(Mt),Math.abs(vs))&&Math.abs(Ut-go)<=Ea*Math.max(1,Math.abs(Ut),Math.abs(go))&&Math.abs(nr-Dn)<=Ea*Math.max(1,Math.abs(nr),Math.abs(Dn))&&Math.abs(Mr-is)<=Ea*Math.max(1,Math.abs(Mr),Math.abs(is))&&Math.abs(zr-Vo)<=Ea*Math.max(1,Math.abs(zr),Math.abs(Vo))&&Math.abs(Hr-Bo)<=Ea*Math.max(1,Math.abs(Hr),Math.abs(Bo))&&Math.abs(oa-_n)<=Ea*Math.max(1,Math.abs(oa),Math.abs(_n))&&Math.abs(va-us)<=Ea*Math.max(1,Math.abs(va),Math.abs(us))&&Math.abs(Ga-No)<=Ea*Math.max(1,Math.abs(Ga),Math.abs(No))&&Math.abs(Qa-Es)<=Ea*Math.max(1,Math.abs(Qa),Math.abs(Es))},e.a0=St,e.a1=q1,e.a2=_e,e.a3=H=>{let D=window.document.createElement("video");return D.muted=!0,new Promise(K=>{D.onloadstart=()=>{K(D)};for(let pe of H){let ke=window.document.createElement("source");J(pe)||(D.crossOrigin="Anonymous"),ke.src=pe,D.appendChild(ke)}})},e.a4=function(){return y++},e.a5=on,e.a6=um,e.a7=Sc,e.a8=Gl,e.a9=V1,e.aA=function(H){if(H.type==="custom")return new N1(H);switch(H.type){case"background":return new QT(H);case"circle":return new Za(H);case"fill":return new Xt(H);case"fill-extrusion":return new Ep(H);case"heatmap":return new Rn(H);case"hillshade":return new xl(H);case"line":return new Lv(H);case"raster":return new L0(H);case"symbol":return new Dv(H)}},e.aB=u,e.aC=function(H,D){if(!H)return[{command:"setStyle",args:[D]}];let K=[];try{if(!Ae(H.version,D.version))return[{command:"setStyle",args:[D]}];Ae(H.center,D.center)||K.push({command:"setCenter",args:[D.center]}),Ae(H.zoom,D.zoom)||K.push({command:"setZoom",args:[D.zoom]}),Ae(H.bearing,D.bearing)||K.push({command:"setBearing",args:[D.bearing]}),Ae(H.pitch,D.pitch)||K.push({command:"setPitch",args:[D.pitch]}),Ae(H.sprite,D.sprite)||K.push({command:"setSprite",args:[D.sprite]}),Ae(H.glyphs,D.glyphs)||K.push({command:"setGlyphs",args:[D.glyphs]}),Ae(H.transition,D.transition)||K.push({command:"setTransition",args:[D.transition]}),Ae(H.light,D.light)||K.push({command:"setLight",args:[D.light]}),Ae(H.terrain,D.terrain)||K.push({command:"setTerrain",args:[D.terrain]}),Ae(H.sky,D.sky)||K.push({command:"setSky",args:[D.sky]}),Ae(H.projection,D.projection)||K.push({command:"setProjection",args:[D.projection]});let pe={},ke=[];(function(We,ft,Mt,Ut){let nr;for(nr in ft=ft||{},We=We||{})Object.prototype.hasOwnProperty.call(We,nr)&&(Object.prototype.hasOwnProperty.call(ft,nr)||Xe(nr,Mt,Ut));for(nr in ft)Object.prototype.hasOwnProperty.call(ft,nr)&&(Object.prototype.hasOwnProperty.call(We,nr)?Ae(We[nr],ft[nr])||(We[nr].type==="geojson"&&ft[nr].type==="geojson"&&ot(We,ft,nr)?ze(Mt,{command:"setGeoJSONSourceData",args:[nr,ft[nr].data]}):it(nr,ft,Mt,Ut)):Re(nr,ft,Mt))})(H.sources,D.sources,ke,pe);let je=[];H.layers&&H.layers.forEach(We=>{"source"in We&&pe[We.source]?K.push({command:"removeLayer",args:[We.id]}):je.push(We)}),K=K.concat(ke),function(We,ft,Mt){ft=ft||[];let Ut=(We=We||[]).map(lt),nr=ft.map(lt),Mr=We.reduce(Ee,{}),zr=ft.reduce(Ee,{}),Hr=Ut.slice(),oa=Object.create(null),va,Ga,Qa,Yi,xi;for(let Hi=0,rn=0;Hi<Ut.length;Hi++)va=Ut[Hi],Object.prototype.hasOwnProperty.call(zr,va)?rn++:(ze(Mt,{command:"removeLayer",args:[va]}),Hr.splice(Hr.indexOf(va,rn),1));for(let Hi=0,rn=0;Hi<nr.length;Hi++)va=nr[nr.length-1-Hi],Hr[Hr.length-1-Hi]!==va&&(Object.prototype.hasOwnProperty.call(Mr,va)?(ze(Mt,{command:"removeLayer",args:[va]}),Hr.splice(Hr.lastIndexOf(va,Hr.length-rn),1)):rn++,Yi=Hr[Hr.length-Hi],ze(Mt,{command:"addLayer",args:[zr[va],Yi]}),Hr.splice(Hr.length-Hi,0,va),oa[va]=!0);for(let Hi=0;Hi<nr.length;Hi++)if(va=nr[Hi],Ga=Mr[va],Qa=zr[va],!oa[va]&&!Ae(Ga,Qa))if(Ae(Ga.source,Qa.source)&&Ae(Ga["source-layer"],Qa["source-layer"])&&Ae(Ga.type,Qa.type)){for(xi in tt(Ga.layout,Qa.layout,Mt,va,null,"setLayoutProperty"),tt(Ga.paint,Qa.paint,Mt,va,null,"setPaintProperty"),Ae(Ga.filter,Qa.filter)||ze(Mt,{command:"setFilter",args:[va,Qa.filter]}),Ae(Ga.minzoom,Qa.minzoom)&&Ae(Ga.maxzoom,Qa.maxzoom)||ze(Mt,{command:"setLayerZoomRange",args:[va,Qa.minzoom,Qa.maxzoom]}),Ga)Object.prototype.hasOwnProperty.call(Ga,xi)&&xi!=="layout"&&xi!=="paint"&&xi!=="filter"&&xi!=="metadata"&&xi!=="minzoom"&&xi!=="maxzoom"&&(xi.indexOf("paint.")===0?tt(Ga[xi],Qa[xi],Mt,va,xi.slice(6),"setPaintProperty"):Ae(Ga[xi],Qa[xi])||ze(Mt,{command:"setLayerProperty",args:[va,xi,Qa[xi]]}));for(xi in Qa)Object.prototype.hasOwnProperty.call(Qa,xi)&&!Object.prototype.hasOwnProperty.call(Ga,xi)&&xi!=="layout"&&xi!=="paint"&&xi!=="filter"&&xi!=="metadata"&&xi!=="minzoom"&&xi!=="maxzoom"&&(xi.indexOf("paint.")===0?tt(Ga[xi],Qa[xi],Mt,va,xi.slice(6),"setPaintProperty"):Ae(Ga[xi],Qa[xi])||ze(Mt,{command:"setLayerProperty",args:[va,xi,Qa[xi]]}))}else ze(Mt,{command:"removeLayer",args:[va]}),Yi=Hr[Hr.lastIndexOf(va)+1],ze(Mt,{command:"addLayer",args:[Qa,Yi]})}(je,D.layers,K)}catch(pe){console.warn("Unable to compute style diff:",pe),K=[{command:"setStyle",args:[D]}]}return K},e.aD=function(H){let D=[],K=H.id;return K===void 0&&D.push({message:`layers.${K}: missing required property "id"`}),H.render===void 0&&D.push({message:`layers.${K}: missing required method "render"`}),H.renderingMode&&H.renderingMode!=="2d"&&H.renderingMode!=="3d"&&D.push({message:`layers.${K}: property "renderingMode" must be either "2d" or "3d"`}),D},e.aE=function H(D,K){if(Array.isArray(D)){if(!Array.isArray(K)||D.length!==K.length)return!1;for(let pe=0;pe<D.length;pe++)if(!H(D[pe],K[pe]))return!1;return!0}if(typeof D=="object"&&D!==null&&K!==null){if(typeof K!="object"||Object.keys(D).length!==Object.keys(K).length)return!1;for(let pe in D)if(!H(D[pe],K[pe]))return!1;return!0}return D===K},e.aF=b,e.aG=p,e.aH=class extends ui{constructor(H,D){super(H,D),this.current=0}set(H){this.current!==H&&(this.current=H,this.gl.uniform1i(this.location,H))}},e.aI=Pa,e.aJ=class extends ui{constructor(H,D){super(H,D),this.current=vn}set(H){if(H[12]!==this.current[12]||H[0]!==this.current[0])return this.current=H,void this.gl.uniformMatrix4fv(this.location,!1,H);for(let D=1;D<16;D++)if(H[D]!==this.current[D]){this.current=H,this.gl.uniformMatrix4fv(this.location,!1,H);break}}},e.aK=sn,e.aL=an,e.aM=Wt,e.aN=class extends ui{constructor(H,D){super(H,D),this.current=[0,0,0]}set(H){H[0]===this.current[0]&&H[1]===this.current[1]&&H[2]===this.current[2]||(this.current=H,this.gl.uniform3f(this.location,H[0],H[1],H[2]))}},e.aO=class extends ui{constructor(H,D){super(H,D),this.current=[0,0]}set(H){H[0]===this.current[0]&&H[1]===this.current[1]||(this.current=H,this.gl.uniform2f(this.location,H[0],H[1]))}},e.aP=function(H,D,K,pe,ke,je,We){var ft=1/(D-K),Mt=1/(pe-ke),Ut=1/(je-We);return H[0]=-2*ft,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=-2*Mt,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=2*Ut,H[11]=0,H[12]=(D+K)*ft,H[13]=(ke+pe)*Mt,H[14]=(We+je)*Ut,H[15]=1,H},e.aQ=Ii,e.aR=class extends Dt{},e.aS=nv,e.aT=class extends mr{},e.aU=En,e.aV=function(H){return H<=1?1:Math.pow(2,Math.ceil(Math.log(H)/Math.LN2))},e.aW=nn,e.aX=es,e.aY=De,e.aZ=class extends di{},e.a_=function(H,D){return H[0]===D[0]&&H[1]===D[1]&&H[2]===D[2]&&H[3]===D[3]&&H[4]===D[4]&&H[5]===D[5]&&H[6]===D[6]&&H[7]===D[7]&&H[8]===D[8]&&H[9]===D[9]&&H[10]===D[10]&&H[11]===D[11]&&H[12]===D[12]&&H[13]===D[13]&&H[14]===D[14]&&H[15]===D[15]},e.aa=function(H){let D={};if(H.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(K,pe,ke,je)=>{let We=ke||je;return D[pe]=!We||We.toLowerCase(),""}),D["max-age"]){let K=parseInt(D["max-age"],10);isNaN(K)?delete D["max-age"]:D["max-age"]=K}return D},e.ab=function(H,D){let K=[];for(let pe in H)pe in D||K.push(pe);return K},e.ac=w,e.ad=function(H,D,K){var pe=Math.sin(K),ke=Math.cos(K),je=D[0],We=D[1],ft=D[2],Mt=D[3],Ut=D[4],nr=D[5],Mr=D[6],zr=D[7];return D!==H&&(H[8]=D[8],H[9]=D[9],H[10]=D[10],H[11]=D[11],H[12]=D[12],H[13]=D[13],H[14]=D[14],H[15]=D[15]),H[0]=je*ke+Ut*pe,H[1]=We*ke+nr*pe,H[2]=ft*ke+Mr*pe,H[3]=Mt*ke+zr*pe,H[4]=Ut*ke-je*pe,H[5]=nr*ke-We*pe,H[6]=Mr*ke-ft*pe,H[7]=zr*ke-Mt*pe,H},e.ae=function(H){var D=new ii(16);return D[0]=H[0],D[1]=H[1],D[2]=H[2],D[3]=H[3],D[4]=H[4],D[5]=H[5],D[6]=H[6],D[7]=H[7],D[8]=H[8],D[9]=H[9],D[10]=H[10],D[11]=H[11],D[12]=H[12],D[13]=H[13],D[14]=H[14],D[15]=H[15],D},e.af=hn,e.ag=function(H,D){let K=0,pe=0;if(H.kind==="constant")pe=H.layoutSize;else if(H.kind!=="source"){let{interpolationType:ke,minZoom:je,maxZoom:We}=H,ft=ke?w(to.interpolationFactor(ke,D,je,We),0,1):0;H.kind==="camera"?pe=Xn.number(H.minSize,H.maxSize,ft):K=ft}return{uSizeT:K,uSize:pe}},e.ai=function(H,{uSize:D,uSizeT:K},{lowerSize:pe,upperSize:ke}){return H.kind==="source"?pe/yd:H.kind==="composite"?Xn.number(pe/yd,ke/yd,K):D},e.aj=z1,e.ak=function(H,D,K,pe){let ke=D.y-H.y,je=D.x-H.x,We=pe.y-K.y,ft=pe.x-K.x,Mt=We*je-ft*ke;if(Mt===0)return null;let Ut=(ft*(H.y-K.y)-We*(H.x-K.x))/Mt;return new i(H.x+Ut*je,H.y+Ut*ke)},e.al=Xx,e.am=yc,e.an=gi,e.ao=function(H){let D=1/0,K=1/0,pe=-1/0,ke=-1/0;for(let je of H)D=Math.min(D,je.x),K=Math.min(K,je.y),pe=Math.max(pe,je.x),ke=Math.max(ke,je.y);return[D,K,pe,ke]},e.ap=lu,e.ar=D1,e.as=function(H,D){var K=D[0],pe=D[1],ke=D[2],je=D[3],We=D[4],ft=D[5],Mt=D[6],Ut=D[7],nr=D[8],Mr=D[9],zr=D[10],Hr=D[11],oa=D[12],va=D[13],Ga=D[14],Qa=D[15],Yi=K*ft-pe*We,xi=K*Mt-ke*We,Hi=K*Ut-je*We,rn=pe*Mt-ke*ft,jn=pe*Ut-je*ft,ko=ke*Ut-je*Mt,vs=nr*va-Mr*oa,go=nr*Ga-zr*oa,Dn=nr*Qa-Hr*oa,is=Mr*Ga-zr*va,Vo=Mr*Qa-Hr*va,Bo=zr*Qa-Hr*Ga,_n=Yi*Bo-xi*Vo+Hi*is+rn*Dn-jn*go+ko*vs;return _n?(H[0]=(ft*Bo-Mt*Vo+Ut*is)*(_n=1/_n),H[1]=(ke*Vo-pe*Bo-je*is)*_n,H[2]=(va*ko-Ga*jn+Qa*rn)*_n,H[3]=(zr*jn-Mr*ko-Hr*rn)*_n,H[4]=(Mt*Dn-We*Bo-Ut*go)*_n,H[5]=(K*Bo-ke*Dn+je*go)*_n,H[6]=(Ga*Hi-oa*ko-Qa*xi)*_n,H[7]=(nr*ko-zr*Hi+Hr*xi)*_n,H[8]=(We*Vo-ft*Dn+Ut*vs)*_n,H[9]=(pe*Dn-K*Vo-je*vs)*_n,H[10]=(oa*jn-va*Hi+Qa*Yi)*_n,H[11]=(Mr*Hi-nr*jn-Hr*Yi)*_n,H[12]=(ft*go-We*is-Mt*vs)*_n,H[13]=(K*is-pe*go+ke*vs)*_n,H[14]=(va*xi-oa*rn-Ga*Yi)*_n,H[15]=(nr*rn-Mr*xi+zr*Yi)*_n,H):null},e.at=W1,e.au=Sg,e.av=X1,e.aw=function(){let H={},D=re.$version;for(let K in re.$root){let pe=re.$root[K];if(pe.required){let ke=null;ke=K==="version"?D:pe.type==="array"?[]:{},ke!=null&&(H[K]=ke)}}return H},e.ax=wn,e.ay=G,e.az=function(H){H=H.slice();let D=Object.create(null);for(let K=0;K<H.length;K++)D[H[K].id]=H[K];for(let K=0;K<H.length;K++)"ref"in H[K]&&(H[K]=be(H[K],D[H[K].ref]));return H},e.b=F,e.b0=function(H,D){return H[0]=D[0],H[1]=D[1],H[2]=D[2],H[3]=D[3],H[4]=D[4],H[5]=D[5],H[6]=D[6],H[7]=D[7],H[8]=D[8],H[9]=D[9],H[10]=D[10],H[11]=D[11],H[12]=D[12],H[13]=D[13],H[14]=D[14],H[15]=D[15],H},e.b1=function(H,D,K){return H[0]=D[0]*K[0],H[1]=D[1]*K[1],H[2]=D[2]*K[2],H[3]=D[3]*K[3],H},e.b2=function(H,D){return H[0]*D[0]+H[1]*D[1]+H[2]*D[2]+H[3]*D[3]},e.b3=S,e.b4=qx,e.b5=kg,e.b6=function(H,D,K,pe,ke){var je,We=1/Math.tan(D/2);return H[0]=We/K,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=We,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[11]=-1,H[12]=0,H[13]=0,H[15]=0,ke!=null&&ke!==1/0?(H[10]=(ke+pe)*(je=1/(pe-ke)),H[14]=2*ke*pe*je):(H[10]=-1,H[14]=-2*pe),H},e.b7=function(H,D,K){var pe=Math.sin(K),ke=Math.cos(K),je=D[4],We=D[5],ft=D[6],Mt=D[7],Ut=D[8],nr=D[9],Mr=D[10],zr=D[11];return D!==H&&(H[0]=D[0],H[1]=D[1],H[2]=D[2],H[3]=D[3],H[12]=D[12],H[13]=D[13],H[14]=D[14],H[15]=D[15]),H[4]=je*ke+Ut*pe,H[5]=We*ke+nr*pe,H[6]=ft*ke+Mr*pe,H[7]=Mt*ke+zr*pe,H[8]=Ut*ke-je*pe,H[9]=nr*ke-We*pe,H[10]=Mr*ke-ft*pe,H[11]=zr*ke-Mt*pe,H},e.b8=l,e.b9=_,e.bA=Dh,e.bB=function(H){return H.message===U},e.bC=nl,e.bD=Xs,e.ba=function(H){return H*Math.PI/180},e.bb=function(H,D){let{x:K,y:pe}=I0.fromLngLat(D);return!(H<0||H>25||pe<0||pe>=1||K<0||K>=1)},e.bc=function(H,D){return H[0]=D[0],H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=D[1],H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=D[2],H[11]=0,H[12]=0,H[13]=0,H[14]=0,H[15]=1,H},e.bd=class extends $t{},e.be=j1,e.bf=sA,e.bh=he,e.bi=function(H,D){Q.REGISTERED_PROTOCOLS[H]=D},e.bj=function(H){delete Q.REGISTERED_PROTOCOLS[H]},e.bk=function(H,D){let K={};for(let ke=0;ke<H.length;ke++){let je=D&&D[H[ke].id]||uh(H[ke]);D&&(D[H[ke].id]=je);let We=K[je];We||(We=K[je]=[]),We.push(H[ke])}let pe=[];for(let ke in K)pe.push(K[ke]);return pe},e.bl=_i,e.bm=Gx,e.bn=zv,e.bo=wg,e.bp=function(H){H.bucket.createArrays(),H.bucket.tilePixelRatio=vo/(512*H.bucket.overscaling),H.bucket.compareText={},H.bucket.iconsNeedLinear=!1;let D=H.bucket.layers[0],K=D.layout,pe=D._unevaluatedLayout._values,ke={layoutIconSize:pe["icon-size"].possiblyEvaluate(new Ls(H.bucket.zoom+1),H.canonical),layoutTextSize:pe["text-size"].possiblyEvaluate(new Ls(H.bucket.zoom+1),H.canonical),textMaxSize:pe["text-size"].possiblyEvaluate(new Ls(18))};if(H.bucket.textSizeData.kind==="composite"){let{minZoom:Ut,maxZoom:nr}=H.bucket.textSizeData;ke.compositeTextSizes=[pe["text-size"].possiblyEvaluate(new Ls(Ut),H.canonical),pe["text-size"].possiblyEvaluate(new Ls(nr),H.canonical)]}if(H.bucket.iconSizeData.kind==="composite"){let{minZoom:Ut,maxZoom:nr}=H.bucket.iconSizeData;ke.compositeIconSizes=[pe["icon-size"].possiblyEvaluate(new Ls(Ut),H.canonical),pe["icon-size"].possiblyEvaluate(new Ls(nr),H.canonical)]}let je=K.get("text-line-height")*lu,We=K.get("text-rotation-alignment")!=="viewport"&&K.get("symbol-placement")!=="point",ft=K.get("text-keep-upright"),Mt=K.get("text-size");for(let Ut of H.bucket.features){let nr=K.get("text-font").evaluate(Ut,{},H.canonical).join(","),Mr=Mt.evaluate(Ut,{},H.canonical),zr=ke.layoutTextSize.evaluate(Ut,{},H.canonical),Hr=ke.layoutIconSize.evaluate(Ut,{},H.canonical),oa={horizontal:{},vertical:void 0},va=Ut.text,Ga,Qa=[0,0];if(va){let Hi=va.toString(),rn=K.get("text-letter-spacing").evaluate(Ut,{},H.canonical)*lu,jn=Qo(Hi)?rn:0,ko=K.get("text-anchor").evaluate(Ut,{},H.canonical),vs=eb(D,Ut,H.canonical);if(!vs){let Vo=K.get("text-radial-offset").evaluate(Ut,{},H.canonical);Qa=Vo?H1(ko,[Vo*lu,Fv]):K.get("text-offset").evaluate(Ut,{},H.canonical).map(Bo=>Bo*lu)}let go=We?"center":K.get("text-justify").evaluate(Ut,{},H.canonical),Dn=K.get("symbol-placement")==="point"?K.get("text-max-width").evaluate(Ut,{},H.canonical)*lu:1/0,is=()=>{H.bucket.allowVerticalPlacement&&_o(Hi)&&(oa.vertical=A0(va,H.glyphMap,H.glyphPositions,H.imagePositions,nr,Dn,je,ko,"left",jn,Qa,e.ah.vertical,!0,zr,Mr))};if(!We&&vs){let Vo=new Set;if(go==="auto")for(let _n=0;_n<vs.values.length;_n+=2)Vo.add(W1(vs.values[_n]));else Vo.add(go);let Bo=!1;for(let _n of Vo)if(!oa.horizontal[_n])if(Bo)oa.horizontal[_n]=oa.horizontal[0];else{let us=A0(va,H.glyphMap,H.glyphPositions,H.imagePositions,nr,Dn,je,"center",_n,jn,Qa,e.ah.horizontal,!1,zr,Mr);us&&(oa.horizontal[_n]=us,Bo=us.positionedLines.length===1)}is()}else{go==="auto"&&(go=W1(ko));let Vo=A0(va,H.glyphMap,H.glyphPositions,H.imagePositions,nr,Dn,je,ko,go,jn,Qa,e.ah.horizontal,!1,zr,Mr);Vo&&(oa.horizontal[go]=Vo),is(),_o(Hi)&&We&&ft&&(oa.vertical=A0(va,H.glyphMap,H.glyphPositions,H.imagePositions,nr,Dn,je,ko,go,jn,Qa,e.ah.vertical,!1,zr,Mr))}}let Yi=!1;if(Ut.icon&&Ut.icon.name){let Hi=H.imageMap[Ut.icon.name];Hi&&(Ga=S0(H.imagePositions[Ut.icon.name],K.get("icon-offset").evaluate(Ut,{},H.canonical),K.get("icon-anchor").evaluate(Ut,{},H.canonical)),Yi=!!Hi.sdf,H.bucket.sdfIcons===void 0?H.bucket.sdfIcons=Yi:H.bucket.sdfIcons!==Yi&&h("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Hi.pixelRatio!==H.bucket.pixelRatio||K.get("icon-rotate").constantOr(1)!==0)&&(H.bucket.iconsNeedLinear=!0))}let xi=rb(oa.horizontal)||oa.vertical;H.bucket.iconsInText=!!xi&&xi.iconsInText,(xi||Ga)&&nA(H.bucket,Ut,oa,Ga,H.imageMap,ke,zr,Hr,Qa,Yi,H.canonical)}H.showCollisionBoxes&&H.bucket.generateCollisionDebugBuffers()},e.bq=Vp,e.br=fr,e.bs=Fo,e.bt=Jr,e.bu=P1,e.bv=class{constructor(H){this._marks={start:[H.url,"start"].join("#"),end:[H.url,"end"].join("#"),measure:H.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let H=performance.getEntriesByName(this._marks.measure);return H.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),H=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),H}},e.bw=function(H,D,K,pe,ke){return t(this,void 0,void 0,function*(){if(T())try{return yield O(H,D,K,pe,ke)}catch{}return function(je,We,ft,Mt,Ut){let nr=je.width,Mr=je.height;I&&N||(I=new OffscreenCanvas(nr,Mr),N=I.getContext("2d",{willReadFrequently:!0})),I.width=nr,I.height=Mr,N.drawImage(je,0,0,nr,Mr);let zr=N.getImageData(We,ft,Mt,Ut);return N.clearRect(0,0,nr,Mr),zr.data}(H,D,K,pe,ke)})},e.bx=Vx,e.by=r,e.bz=o,e.c=W,e.d=H=>t(void 0,void 0,void 0,function*(){if(H.byteLength===0)return createImageBitmap(new ImageData(1,1));let D=new Blob([new Uint8Array(H)],{type:"image/png"});try{return createImageBitmap(D)}catch(K){throw new Error(`Could not load image because of ${K.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.e=E,e.f=H=>new Promise((D,K)=>{let pe=new Image;pe.onload=()=>{D(pe),URL.revokeObjectURL(pe.src),pe.onload=null,window.requestAnimationFrame(()=>{pe.src=B})},pe.onerror=()=>K(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 ke=new Blob([new Uint8Array(H)],{type:"image/png"});pe.src=H.byteLength?URL.createObjectURL(ke):B}),e.g=ue,e.h=(H,D)=>$(E(H,{type:"json"}),D),e.i=L,e.j=j,e.k=ie,e.l=(H,D)=>$(E(H,{type:"arrayBuffer"}),D),e.m=$,e.n=function(H){return new P1(H).readFields(vC,[])},e.o=In,e.p=R1,e.q=Ne,e.r=Pi,e.s=J,e.t=Ri,e.u=hi,e.v=re,e.w=h,e.x=function([H,D,K]){return D+=90,D*=Math.PI/180,K*=Math.PI/180,{x:H*Math.cos(D)*Math.sin(K),y:H*Math.sin(D)*Math.sin(K),z:H*Math.cos(K)}},e.y=Xn,e.z=Ls}),A("worker",["./shared"],function(e){"use strict";class t{constructor(Be){this.keyCache={},Be&&this.replace(Be)}replace(Be){this._layerConfigs={},this._layers={},this.update(Be,[])}update(Be,Ke){for(let Me of Be){this._layerConfigs[Me.id]=Me;let qe=this._layers[Me.id]=e.aA(Me);qe._featureFilter=e.a7(qe.filter),this.keyCache[Me.id]&&delete this.keyCache[Me.id]}for(let Me of Ke)delete this.keyCache[Me],delete this._layerConfigs[Me],delete this._layers[Me];this.familiesBySource={};let Ue=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let Me of Ue){let qe=Me.map(Tt=>this._layers[Tt.id]),Ce=qe[0];if(Ce.visibility==="none")continue;let Te=Ce.source||"",Pe=this.familiesBySource[Te];Pe||(Pe=this.familiesBySource[Te]={});let at=Ce.sourceLayer||"_geojsonTileLayer",yt=Pe[at];yt||(yt=Pe[at]=[]),yt.push(qe)}}}class r{constructor(Be){let Ke={},Ue=[];for(let Te in Be){let Pe=Be[Te],at=Ke[Te]={};for(let yt in Pe){let Tt=Pe[+yt];if(!Tt||Tt.bitmap.width===0||Tt.bitmap.height===0)continue;let Ot={x:0,y:0,w:Tt.bitmap.width+2,h:Tt.bitmap.height+2};Ue.push(Ot),at[yt]={rect:Ot,metrics:Tt.metrics}}}let{w:Me,h:qe}=e.p(Ue),Ce=new e.o({width:Me||1,height:qe||1});for(let Te in Be){let Pe=Be[Te];for(let at in Pe){let yt=Pe[+at];if(!yt||yt.bitmap.width===0||yt.bitmap.height===0)continue;let Tt=Ke[Te][at].rect;e.o.copy(yt.bitmap,Ce,{x:0,y:0},{x:Tt.x+1,y:Tt.y+1},yt.bitmap)}}this.image=Ce,this.positions=Ke}}e.bl("GlyphAtlas",r);class o{constructor(Be){this.tileID=new e.S(Be.tileID.overscaledZ,Be.tileID.wrap,Be.tileID.canonical.z,Be.tileID.canonical.x,Be.tileID.canonical.y),this.uid=Be.uid,this.zoom=Be.zoom,this.pixelRatio=Be.pixelRatio,this.tileSize=Be.tileSize,this.source=Be.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Be.showCollisionBoxes,this.collectResourceTiming=!!Be.collectResourceTiming,this.returnDependencies=!!Be.returnDependencies,this.promoteId=Be.promoteId,this.inFlightDependencies=[]}parse(Be,Ke,Ue,Me){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=Be,this.collisionBoxArray=new e.a5;let qe=new e.bm(Object.keys(Be.layers).sort()),Ce=new e.bn(this.tileID,this.promoteId);Ce.bucketLayerIDs=[];let Te={},Pe={featureIndex:Ce,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ue},at=Ke.familiesBySource[this.source];for(let ei in at){let za=Be.layers[ei];if(!za)continue;za.version===1&&e.w(`Vector tile source "${this.source}" layer "${ei}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ti=qe.encode(ei),Ci=[];for(let Jt=0;Jt<za.length;Jt++){let Nt=za.feature(Jt),Kt=Ce.getId(Nt,ei);Ci.push({feature:Nt,id:Kt,index:Jt,sourceLayerIndex:ti})}for(let Jt of at[ei]){let Nt=Jt[0];Nt.source!==this.source&&e.w(`layer.source = ${Nt.source} does not equal this.source = ${this.source}`),Nt.minzoom&&this.zoom<Math.floor(Nt.minzoom)||Nt.maxzoom&&this.zoom>=Nt.maxzoom||Nt.visibility!=="none"&&(a(Jt,this.zoom,Ue),(Te[Nt.id]=Nt.createBucket({index:Ce.bucketLayerIDs.length,layers:Jt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ti,sourceID:this.source})).populate(Ci,Pe,this.tileID.canonical),Ce.bucketLayerIDs.push(Jt.map(Kt=>Kt.id)))}}let yt=e.aF(Pe.glyphDependencies,ei=>Object.keys(ei).map(Number));this.inFlightDependencies.forEach(ei=>ei?.abort()),this.inFlightDependencies=[];let Tt=Promise.resolve({});if(Object.keys(yt).length){let ei=new AbortController;this.inFlightDependencies.push(ei),Tt=Me.sendAsync({type:"GG",data:{stacks:yt,source:this.source,tileID:this.tileID,type:"glyphs"}},ei)}let Ot=Object.keys(Pe.iconDependencies),Gt=Promise.resolve({});if(Ot.length){let ei=new AbortController;this.inFlightDependencies.push(ei),Gt=Me.sendAsync({type:"GI",data:{icons:Ot,source:this.source,tileID:this.tileID,type:"icons"}},ei)}let rr=Object.keys(Pe.patternDependencies),Qt=Promise.resolve({});if(rr.length){let ei=new AbortController;this.inFlightDependencies.push(ei),Qt=Me.sendAsync({type:"GI",data:{icons:rr,source:this.source,tileID:this.tileID,type:"patterns"}},ei)}let[Tr,la,Ua]=yield Promise.all([Tt,Gt,Qt]),Ba=new r(Tr),Ra=new e.bo(la,Ua);for(let ei in Te){let za=Te[ei];za instanceof e.a6?(a(za.layers,this.zoom,Ue),e.bp({bucket:za,glyphMap:Tr,glyphPositions:Ba.positions,imageMap:la,imagePositions:Ra.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):za.hasPattern&&(za instanceof e.bq||za instanceof e.br||za instanceof e.bs)&&(a(za.layers,this.zoom,Ue),za.addFeatures(Pe,this.tileID.canonical,Ra.patternPositions))}return this.status="done",{buckets:Object.values(Te).filter(ei=>!ei.isEmpty()),featureIndex:Ce,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ba.image,imageAtlas:Ra,glyphMap:this.returnDependencies?Tr:null,iconMap:this.returnDependencies?la:null,glyphPositions:this.returnDependencies?Ba.positions:null}})}}function a(bt,Be,Ke){let Ue=new e.z(Be);for(let Me of bt)Me.recalculate(Ue,Ke)}class i{constructor(Be,Ke,Ue){this.actor=Be,this.layerIndex=Ke,this.availableImages=Ue,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Be,Ke){return e._(this,void 0,void 0,function*(){let Ue=yield e.l(Be.request,Ke);try{return{vectorTile:new e.bt.VectorTile(new e.bu(Ue.data)),rawData:Ue.data,cacheControl:Ue.cacheControl,expires:Ue.expires}}catch(Me){let qe=new Uint8Array(Ue.data),Ce=`Unable to parse the tile at ${Be.request.url}, `;throw Ce+=qe[0]===31&&qe[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Me.message}`,new Error(Ce)}})}loadTile(Be){return e._(this,void 0,void 0,function*(){let Ke=Be.uid,Ue=!!(Be&&Be.request&&Be.request.collectResourceTiming)&&new e.bv(Be.request),Me=new o(Be);this.loading[Ke]=Me;let qe=new AbortController;Me.abort=qe;try{let Ce=yield this.loadVectorTile(Be,qe);if(delete this.loading[Ke],!Ce)return null;let Te=Ce.rawData,Pe={};Ce.expires&&(Pe.expires=Ce.expires),Ce.cacheControl&&(Pe.cacheControl=Ce.cacheControl);let at={};if(Ue){let Tt=Ue.finish();Tt&&(at.resourceTiming=JSON.parse(JSON.stringify(Tt)))}Me.vectorTile=Ce.vectorTile;let yt=Me.parse(Ce.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ke]=Me,this.fetching[Ke]={rawTileData:Te,cacheControl:Pe,resourceTiming:at};try{let Tt=yield yt;return e.e({rawTileData:Te.slice(0)},Tt,Pe,at)}finally{delete this.fetching[Ke]}}catch(Ce){throw delete this.loading[Ke],Me.status="done",this.loaded[Ke]=Me,Ce}})}reloadTile(Be){return e._(this,void 0,void 0,function*(){let Ke=Be.uid;if(!this.loaded||!this.loaded[Ke])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ue=this.loaded[Ke];if(Ue.showCollisionBoxes=Be.showCollisionBoxes,Ue.status==="parsing"){let Me=yield Ue.parse(Ue.vectorTile,this.layerIndex,this.availableImages,this.actor),qe;if(this.fetching[Ke]){let{rawTileData:Ce,cacheControl:Te,resourceTiming:Pe}=this.fetching[Ke];delete this.fetching[Ke],qe=e.e({rawTileData:Ce.slice(0)},Me,Te,Pe)}else qe=Me;return qe}if(Ue.status==="done"&&Ue.vectorTile)return Ue.parse(Ue.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Be){return e._(this,void 0,void 0,function*(){let Ke=this.loading,Ue=Be.uid;Ke&&Ke[Ue]&&Ke[Ue].abort&&(Ke[Ue].abort.abort(),delete Ke[Ue])})}removeTile(Be){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Be.uid]&&delete this.loaded[Be.uid]})}}class n{constructor(){this.loaded={}}loadTile(Be){return e._(this,void 0,void 0,function*(){let{uid:Ke,encoding:Ue,rawImageData:Me,redFactor:qe,greenFactor:Ce,blueFactor:Te,baseShift:Pe}=Be,at=Me.width+2,yt=Me.height+2,Tt=e.b(Me)?new e.R({width:at,height:yt},yield e.bw(Me,-1,-1,at,yt)):Me,Ot=new e.bx(Ke,Tt,Ue,qe,Ce,Te,Pe);return this.loaded=this.loaded||{},this.loaded[Ke]=Ot,Ot})}removeTile(Be){let Ke=this.loaded,Ue=Be.uid;Ke&&Ke[Ue]&&delete Ke[Ue]}}function s(bt,Be){if(bt.length!==0){c(bt[0],Be);for(var Ke=1;Ke<bt.length;Ke++)c(bt[Ke],!Be)}}function c(bt,Be){for(var Ke=0,Ue=0,Me=0,qe=bt.length,Ce=qe-1;Me<qe;Ce=Me++){var Te=(bt[Me][0]-bt[Ce][0])*(bt[Ce][1]+bt[Me][1]),Pe=Ke+Te;Ue+=Math.abs(Ke)>=Math.abs(Te)?Ke-Pe+Te:Te-Pe+Ke,Ke=Pe}Ke+Ue>=0!=!!Be&&bt.reverse()}var f=e.by(function bt(Be,Ke){var Ue,Me=Be&&Be.type;if(Me==="FeatureCollection")for(Ue=0;Ue<Be.features.length;Ue++)bt(Be.features[Ue],Ke);else if(Me==="GeometryCollection")for(Ue=0;Ue<Be.geometries.length;Ue++)bt(Be.geometries[Ue],Ke);else if(Me==="Feature")bt(Be.geometry,Ke);else if(Me==="Polygon")s(Be.coordinates,Ke);else if(Me==="MultiPolygon")for(Ue=0;Ue<Be.coordinates.length;Ue++)s(Be.coordinates[Ue],Ke);return Be});let g=e.bt.VectorTileFeature.prototype.toGeoJSON;var v={exports:{}},T=e.bz,l=e.bt.VectorTileFeature,_=w;function w(bt,Be){this.options=Be||{},this.features=bt,this.length=bt.length}function S(bt,Be){this.id=typeof bt.id=="number"?bt.id:void 0,this.type=bt.type,this.rawGeometry=bt.type===1?[bt.geometry]:bt.geometry,this.properties=bt.tags,this.extent=Be||4096}w.prototype.feature=function(bt){return new S(this.features[bt],this.options.extent)},S.prototype.loadGeometry=function(){var bt=this.rawGeometry;this.geometry=[];for(var Be=0;Be<bt.length;Be++){for(var Ke=bt[Be],Ue=[],Me=0;Me<Ke.length;Me++)Ue.push(new T(Ke[Me][0],Ke[Me][1]));this.geometry.push(Ue)}return this.geometry},S.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var bt=this.geometry,Be=1/0,Ke=-1/0,Ue=1/0,Me=-1/0,qe=0;qe<bt.length;qe++)for(var Ce=bt[qe],Te=0;Te<Ce.length;Te++){var Pe=Ce[Te];Be=Math.min(Be,Pe.x),Ke=Math.max(Ke,Pe.x),Ue=Math.min(Ue,Pe.y),Me=Math.max(Me,Pe.y)}return[Be,Ue,Ke,Me]},S.prototype.toGeoJSON=l.prototype.toGeoJSON;var E=e.bA,y=_;function b(bt){var Be=new E;return function(Ke,Ue){for(var Me in Ke.layers)Ue.writeMessage(3,p,Ke.layers[Me])}(bt,Be),Be.finish()}function p(bt,Be){var Ke;Be.writeVarintField(15,bt.version||1),Be.writeStringField(1,bt.name||""),Be.writeVarintField(5,bt.extent||4096);var Ue={keys:[],values:[],keycache:{},valuecache:{}};for(Ke=0;Ke<bt.length;Ke++)Ue.feature=bt.feature(Ke),Be.writeMessage(2,u,Ue);var Me=Ue.keys;for(Ke=0;Ke<Me.length;Ke++)Be.writeStringField(3,Me[Ke]);var qe=Ue.values;for(Ke=0;Ke<qe.length;Ke++)Be.writeMessage(4,z,qe[Ke])}function u(bt,Be){var Ke=bt.feature;Ke.id!==void 0&&Be.writeVarintField(1,Ke.id),Be.writeMessage(2,m,bt),Be.writeVarintField(3,Ke.type),Be.writeMessage(4,L,Ke)}function m(bt,Be){var Ke=bt.feature,Ue=bt.keys,Me=bt.values,qe=bt.keycache,Ce=bt.valuecache;for(var Te in Ke.properties){var Pe=Ke.properties[Te],at=qe[Te];if(Pe!==null){at===void 0&&(Ue.push(Te),qe[Te]=at=Ue.length-1),Be.writeVarint(at);var yt=typeof Pe;yt!=="string"&&yt!=="boolean"&&yt!=="number"&&(Pe=JSON.stringify(Pe));var Tt=yt+":"+Pe,Ot=Ce[Tt];Ot===void 0&&(Me.push(Pe),Ce[Tt]=Ot=Me.length-1),Be.writeVarint(Ot)}}}function h(bt,Be){return(Be<<3)+(7&bt)}function P(bt){return bt<<1^bt>>31}function L(bt,Be){for(var Ke=bt.loadGeometry(),Ue=bt.type,Me=0,qe=0,Ce=Ke.length,Te=0;Te<Ce;Te++){var Pe=Ke[Te],at=1;Ue===1&&(at=Pe.length),Be.writeVarint(h(1,at));for(var yt=Ue===3?Pe.length-1:Pe.length,Tt=0;Tt<yt;Tt++){Tt===1&&Ue!==1&&Be.writeVarint(h(2,yt-1));var Ot=Pe[Tt].x-Me,Gt=Pe[Tt].y-qe;Be.writeVarint(P(Ot)),Be.writeVarint(P(Gt)),Me+=Ot,qe+=Gt}Ue===3&&Be.writeVarint(h(7,1))}}function z(bt,Be){var Ke=typeof bt;Ke==="string"?Be.writeStringField(1,bt):Ke==="boolean"?Be.writeBooleanField(7,bt):Ke==="number"&&(bt%1!=0?Be.writeDoubleField(3,bt):bt<0?Be.writeSVarintField(6,bt):Be.writeVarintField(5,bt))}v.exports=b,v.exports.fromVectorTileJs=b,v.exports.fromGeojsonVt=function(bt,Be){Be=Be||{};var Ke={};for(var Ue in bt)Ke[Ue]=new y(bt[Ue].features,Be),Ke[Ue].name=Ue,Ke[Ue].version=Be.version,Ke[Ue].extent=Be.extent;return b({layers:Ke})},v.exports.GeoJSONWrapper=y;var F=e.by(v.exports);let B={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:bt=>bt},O=Math.fround||(I=new Float32Array(1),bt=>(I[0]=+bt,I[0]));var I;let N=3,U=5,W=6;class Q{constructor(Be){this.options=Object.assign(Object.create(B),Be),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Be){let{log:Ke,minZoom:Ue,maxZoom:Me}=this.options;Ke&&console.time("total time");let qe=`prepare ${Be.length} points`;Ke&&console.time(qe),this.points=Be;let Ce=[];for(let Pe=0;Pe<Be.length;Pe++){let at=Be[Pe];if(!at.geometry)continue;let[yt,Tt]=at.geometry.coordinates,Ot=O(he(yt)),Gt=O(G(Tt));Ce.push(Ot,Gt,1/0,Pe,-1,1),this.options.reduce&&Ce.push(0)}let Te=this.trees[Me+1]=this._createTree(Ce);Ke&&console.timeEnd(qe);for(let Pe=Me;Pe>=Ue;Pe--){let at=+Date.now();Te=this.trees[Pe]=this._createTree(this._cluster(Te,Pe)),Ke&&console.log("z%d: %d clusters in %dms",Pe,Te.numItems,+Date.now()-at)}return Ke&&console.timeEnd("total time"),this}getClusters(Be,Ke){let Ue=((Be[0]+180)%360+360)%360-180,Me=Math.max(-90,Math.min(90,Be[1])),qe=Be[2]===180?180:((Be[2]+180)%360+360)%360-180,Ce=Math.max(-90,Math.min(90,Be[3]));if(Be[2]-Be[0]>=360)Ue=-180,qe=180;else if(Ue>qe){let Tt=this.getClusters([Ue,Me,180,Ce],Ke),Ot=this.getClusters([-180,Me,qe,Ce],Ke);return Tt.concat(Ot)}let Te=this.trees[this._limitZoom(Ke)],Pe=Te.range(he(Ue),G(Ce),he(qe),G(Me)),at=Te.data,yt=[];for(let Tt of Pe){let Ot=this.stride*Tt;yt.push(at[Ot+U]>1?ue(at,Ot,this.clusterProps):this.points[at[Ot+N]])}return yt}getChildren(Be){let Ke=this._getOriginId(Be),Ue=this._getOriginZoom(Be),Me="No cluster with the specified id.",qe=this.trees[Ue];if(!qe)throw new Error(Me);let Ce=qe.data;if(Ke*this.stride>=Ce.length)throw new Error(Me);let Te=this.options.radius/(this.options.extent*Math.pow(2,Ue-1)),Pe=qe.within(Ce[Ke*this.stride],Ce[Ke*this.stride+1],Te),at=[];for(let yt of Pe){let Tt=yt*this.stride;Ce[Tt+4]===Be&&at.push(Ce[Tt+U]>1?ue(Ce,Tt,this.clusterProps):this.points[Ce[Tt+N]])}if(at.length===0)throw new Error(Me);return at}getLeaves(Be,Ke,Ue){let Me=[];return this._appendLeaves(Me,Be,Ke=Ke||10,Ue=Ue||0,0),Me}getTile(Be,Ke,Ue){let Me=this.trees[this._limitZoom(Be)],qe=Math.pow(2,Be),{extent:Ce,radius:Te}=this.options,Pe=Te/Ce,at=(Ue-Pe)/qe,yt=(Ue+1+Pe)/qe,Tt={features:[]};return this._addTileFeatures(Me.range((Ke-Pe)/qe,at,(Ke+1+Pe)/qe,yt),Me.data,Ke,Ue,qe,Tt),Ke===0&&this._addTileFeatures(Me.range(1-Pe/qe,at,1,yt),Me.data,qe,Ue,qe,Tt),Ke===qe-1&&this._addTileFeatures(Me.range(0,at,Pe/qe,yt),Me.data,-1,Ue,qe,Tt),Tt.features.length?Tt:null}getClusterExpansionZoom(Be){let Ke=this._getOriginZoom(Be)-1;for(;Ke<=this.options.maxZoom;){let Ue=this.getChildren(Be);if(Ke++,Ue.length!==1)break;Be=Ue[0].properties.cluster_id}return Ke}_appendLeaves(Be,Ke,Ue,Me,qe){let Ce=this.getChildren(Ke);for(let Te of Ce){let Pe=Te.properties;if(Pe&&Pe.cluster?qe+Pe.point_count<=Me?qe+=Pe.point_count:qe=this._appendLeaves(Be,Pe.cluster_id,Ue,Me,qe):qe<Me?qe++:Be.push(Te),Be.length===Ue)break}return qe}_createTree(Be){let Ke=new e.av(Be.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Ue=0;Ue<Be.length;Ue+=this.stride)Ke.add(Be[Ue],Be[Ue+1]);return Ke.finish(),Ke.data=Be,Ke}_addTileFeatures(Be,Ke,Ue,Me,qe,Ce){for(let Te of Be){let Pe=Te*this.stride,at=Ke[Pe+U]>1,yt,Tt,Ot;if(at)yt=le(Ke,Pe,this.clusterProps),Tt=Ke[Pe],Ot=Ke[Pe+1];else{let Qt=this.points[Ke[Pe+N]];yt=Qt.properties;let[Tr,la]=Qt.geometry.coordinates;Tt=he(Tr),Ot=G(la)}let Gt={type:1,geometry:[[Math.round(this.options.extent*(Tt*qe-Ue)),Math.round(this.options.extent*(Ot*qe-Me))]],tags:yt},rr;rr=at||this.options.generateId?Ke[Pe+N]:this.points[Ke[Pe+N]].id,rr!==void 0&&(Gt.id=rr),Ce.features.push(Gt)}}_limitZoom(Be){return Math.max(this.options.minZoom,Math.min(Math.floor(+Be),this.options.maxZoom+1))}_cluster(Be,Ke){let{radius:Ue,extent:Me,reduce:qe,minPoints:Ce}=this.options,Te=Ue/(Me*Math.pow(2,Ke)),Pe=Be.data,at=[],yt=this.stride;for(let Tt=0;Tt<Pe.length;Tt+=yt){if(Pe[Tt+2]<=Ke)continue;Pe[Tt+2]=Ke;let Ot=Pe[Tt],Gt=Pe[Tt+1],rr=Be.within(Pe[Tt],Pe[Tt+1],Te),Qt=Pe[Tt+U],Tr=Qt;for(let la of rr){let Ua=la*yt;Pe[Ua+2]>Ke&&(Tr+=Pe[Ua+U])}if(Tr>Qt&&Tr>=Ce){let la,Ua=Ot*Qt,Ba=Gt*Qt,Ra=-1,ei=((Tt/yt|0)<<5)+(Ke+1)+this.points.length;for(let za of rr){let ti=za*yt;if(Pe[ti+2]<=Ke)continue;Pe[ti+2]=Ke;let Ci=Pe[ti+U];Ua+=Pe[ti]*Ci,Ba+=Pe[ti+1]*Ci,Pe[ti+4]=ei,qe&&(la||(la=this._map(Pe,Tt,!0),Ra=this.clusterProps.length,this.clusterProps.push(la)),qe(la,this._map(Pe,ti)))}Pe[Tt+4]=ei,at.push(Ua/Tr,Ba/Tr,1/0,ei,-1,Tr),qe&&at.push(Ra)}else{for(let la=0;la<yt;la++)at.push(Pe[Tt+la]);if(Tr>1)for(let la of rr){let Ua=la*yt;if(!(Pe[Ua+2]<=Ke)){Pe[Ua+2]=Ke;for(let Ba=0;Ba<yt;Ba++)at.push(Pe[Ua+Ba])}}}}return at}_getOriginId(Be){return Be-this.points.length>>5}_getOriginZoom(Be){return(Be-this.points.length)%32}_map(Be,Ke,Ue){if(Be[Ke+U]>1){let Ce=this.clusterProps[Be[Ke+W]];return Ue?Object.assign({},Ce):Ce}let Me=this.points[Be[Ke+N]].properties,qe=this.options.map(Me);return Ue&&qe===Me?Object.assign({},qe):qe}}function ue(bt,Be,Ke){return{type:"Feature",id:bt[Be+N],properties:le(bt,Be,Ke),geometry:{type:"Point",coordinates:[(Ue=bt[Be],360*(Ue-.5)),$(bt[Be+1])]}};var Ue}function le(bt,Be,Ke){let Ue=bt[Be+U],Me=Ue>=1e4?`${Math.round(Ue/1e3)}k`:Ue>=1e3?Math.round(Ue/100)/10+"k":Ue,qe=bt[Be+W],Ce=qe===-1?{}:Object.assign({},Ke[qe]);return Object.assign(Ce,{cluster:!0,cluster_id:bt[Be+N],point_count:Ue,point_count_abbreviated:Me})}function he(bt){return bt/360+.5}function G(bt){let Be=Math.sin(bt*Math.PI/180),Ke=.5-.25*Math.log((1+Be)/(1-Be))/Math.PI;return Ke<0?0:Ke>1?1:Ke}function $(bt){let Be=(180-360*bt)*Math.PI/180;return 360*Math.atan(Math.exp(Be))/Math.PI-90}function J(bt,Be,Ke,Ue){let Me=Ue,qe=Be+(Ke-Be>>1),Ce,Te=Ke-Be,Pe=bt[Be],at=bt[Be+1],yt=bt[Ke],Tt=bt[Ke+1];for(let Ot=Be+3;Ot<Ke;Ot+=3){let Gt=X(bt[Ot],bt[Ot+1],Pe,at,yt,Tt);if(Gt>Me)Ce=Ot,Me=Gt;else if(Gt===Me){let rr=Math.abs(Ot-qe);rr<Te&&(Ce=Ot,Te=rr)}}Me>Ue&&(Ce-Be>3&&J(bt,Be,Ce,Ue),bt[Ce+2]=Me,Ke-Ce>3&&J(bt,Ce,Ke,Ue))}function X(bt,Be,Ke,Ue,Me,qe){let Ce=Me-Ke,Te=qe-Ue;if(Ce!==0||Te!==0){let Pe=((bt-Ke)*Ce+(Be-Ue)*Te)/(Ce*Ce+Te*Te);Pe>1?(Ke=Me,Ue=qe):Pe>0&&(Ke+=Ce*Pe,Ue+=Te*Pe)}return Ce=bt-Ke,Te=Be-Ue,Ce*Ce+Te*Te}function oe(bt,Be,Ke,Ue){let Me={id:bt??null,type:Be,geometry:Ke,tags:Ue,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Be==="Point"||Be==="MultiPoint"||Be==="LineString")ie(Me,Ke);else if(Be==="Polygon")ie(Me,Ke[0]);else if(Be==="MultiLineString")for(let qe of Ke)ie(Me,qe);else if(Be==="MultiPolygon")for(let qe of Ke)ie(Me,qe[0]);return Me}function ie(bt,Be){for(let Ke=0;Ke<Be.length;Ke+=3)bt.minX=Math.min(bt.minX,Be[Ke]),bt.minY=Math.min(bt.minY,Be[Ke+1]),bt.maxX=Math.max(bt.maxX,Be[Ke]),bt.maxY=Math.max(bt.maxY,Be[Ke+1])}function j(bt,Be,Ke,Ue){if(!Be.geometry)return;let Me=Be.geometry.coordinates;if(Me&&Me.length===0)return;let qe=Be.geometry.type,Ce=Math.pow(Ke.tolerance/((1<<Ke.maxZoom)*Ke.extent),2),Te=[],Pe=Be.id;if(Ke.promoteId?Pe=Be.properties[Ke.promoteId]:Ke.generateId&&(Pe=Ue||0),qe==="Point")ee(Me,Te);else if(qe==="MultiPoint")for(let at of Me)ee(at,Te);else if(qe==="LineString")re(Me,Te,Ce,!1);else if(qe==="MultiLineString"){if(Ke.lineMetrics){for(let at of Me)Te=[],re(at,Te,Ce,!1),bt.push(oe(Pe,"LineString",Te,Be.properties));return}ce(Me,Te,Ce,!1)}else if(qe==="Polygon")ce(Me,Te,Ce,!0);else{if(qe!=="MultiPolygon"){if(qe==="GeometryCollection"){for(let at of Be.geometry.geometries)j(bt,{id:Pe,geometry:at,properties:Be.properties},Ke,Ue);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let at of Me){let yt=[];ce(at,yt,Ce,!0),Te.push(yt)}}bt.push(oe(Pe,qe,Te,Be.properties))}function ee(bt,Be){Be.push(be(bt[0]),Ae(bt[1]),0)}function re(bt,Be,Ke,Ue){let Me,qe,Ce=0;for(let Pe=0;Pe<bt.length;Pe++){let at=be(bt[Pe][0]),yt=Ae(bt[Pe][1]);Be.push(at,yt,0),Pe>0&&(Ce+=Ue?(Me*yt-at*qe)/2:Math.sqrt(Math.pow(at-Me,2)+Math.pow(yt-qe,2))),Me=at,qe=yt}let Te=Be.length-3;Be[2]=1,J(Be,0,Te,Ke),Be[Te+2]=1,Be.size=Math.abs(Ce),Be.start=0,Be.end=Be.size}function ce(bt,Be,Ke,Ue){for(let Me=0;Me<bt.length;Me++){let qe=[];re(bt[Me],qe,Ke,Ue),Be.push(qe)}}function be(bt){return bt/360+.5}function Ae(bt){let Be=Math.sin(bt*Math.PI/180),Ke=.5-.25*Math.log((1+Be)/(1-Be))/Math.PI;return Ke<0?0:Ke>1?1:Ke}function ze(bt,Be,Ke,Ue,Me,qe,Ce,Te){if(Ue/=Be,qe>=(Ke/=Be)&&Ce<Ue)return bt;if(Ce<Ke||qe>=Ue)return null;let Pe=[];for(let at of bt){let yt=at.geometry,Tt=at.type,Ot=Me===0?at.minX:at.minY,Gt=Me===0?at.maxX:at.maxY;if(Ot>=Ke&&Gt<Ue){Pe.push(at);continue}if(Gt<Ke||Ot>=Ue)continue;let rr=[];if(Tt==="Point"||Tt==="MultiPoint")Re(yt,rr,Ke,Ue,Me);else if(Tt==="LineString")Xe(yt,rr,Ke,Ue,Me,!1,Te.lineMetrics);else if(Tt==="MultiLineString")ot(yt,rr,Ke,Ue,Me,!1);else if(Tt==="Polygon")ot(yt,rr,Ke,Ue,Me,!0);else if(Tt==="MultiPolygon")for(let Qt of yt){let Tr=[];ot(Qt,Tr,Ke,Ue,Me,!0),Tr.length&&rr.push(Tr)}if(rr.length){if(Te.lineMetrics&&Tt==="LineString"){for(let Qt of rr)Pe.push(oe(at.id,Tt,Qt,at.tags));continue}Tt!=="LineString"&&Tt!=="MultiLineString"||(rr.length===1?(Tt="LineString",rr=rr[0]):Tt="MultiLineString"),Tt!=="Point"&&Tt!=="MultiPoint"||(Tt=rr.length===3?"Point":"MultiPoint"),Pe.push(oe(at.id,Tt,rr,at.tags))}}return Pe.length?Pe:null}function Re(bt,Be,Ke,Ue,Me){for(let qe=0;qe<bt.length;qe+=3){let Ce=bt[qe+Me];Ce>=Ke&&Ce<=Ue&&tt(Be,bt[qe],bt[qe+1],bt[qe+2])}}function Xe(bt,Be,Ke,Ue,Me,qe,Ce){let Te=it(bt),Pe=Me===0?lt:Ee,at,yt,Tt=bt.start;for(let Tr=0;Tr<bt.length-3;Tr+=3){let la=bt[Tr],Ua=bt[Tr+1],Ba=bt[Tr+2],Ra=bt[Tr+3],ei=bt[Tr+4],za=Me===0?la:Ua,ti=Me===0?Ra:ei,Ci=!1;Ce&&(at=Math.sqrt(Math.pow(la-Ra,2)+Math.pow(Ua-ei,2))),za<Ke?ti>Ke&&(yt=Pe(Te,la,Ua,Ra,ei,Ke),Ce&&(Te.start=Tt+at*yt)):za>Ue?ti<Ue&&(yt=Pe(Te,la,Ua,Ra,ei,Ue),Ce&&(Te.start=Tt+at*yt)):tt(Te,la,Ua,Ba),ti<Ke&&za>=Ke&&(yt=Pe(Te,la,Ua,Ra,ei,Ke),Ci=!0),ti>Ue&&za<=Ue&&(yt=Pe(Te,la,Ua,Ra,ei,Ue),Ci=!0),!qe&&Ci&&(Ce&&(Te.end=Tt+at*yt),Be.push(Te),Te=it(bt)),Ce&&(Tt+=at)}let Ot=bt.length-3,Gt=bt[Ot],rr=bt[Ot+1],Qt=Me===0?Gt:rr;Qt>=Ke&&Qt<=Ue&&tt(Te,Gt,rr,bt[Ot+2]),Ot=Te.length-3,qe&&Ot>=3&&(Te[Ot]!==Te[0]||Te[Ot+1]!==Te[1])&&tt(Te,Te[0],Te[1],Te[2]),Te.length&&Be.push(Te)}function it(bt){let Be=[];return Be.size=bt.size,Be.start=bt.start,Be.end=bt.end,Be}function ot(bt,Be,Ke,Ue,Me,qe){for(let Ce of bt)Xe(Ce,Be,Ke,Ue,Me,qe,!1)}function tt(bt,Be,Ke,Ue){bt.push(Be,Ke,Ue)}function lt(bt,Be,Ke,Ue,Me,qe){let Ce=(qe-Be)/(Ue-Be);return tt(bt,qe,Ke+(Me-Ke)*Ce,1),Ce}function Ee(bt,Be,Ke,Ue,Me,qe){let Ce=(qe-Ke)/(Me-Ke);return tt(bt,Be+(Ue-Be)*Ce,qe,1),Ce}function _e(bt,Be){let Ke=[];for(let Ue=0;Ue<bt.length;Ue++){let Me=bt[Ue],qe=Me.type,Ce;if(qe==="Point"||qe==="MultiPoint"||qe==="LineString")Ce=fe(Me.geometry,Be);else if(qe==="MultiLineString"||qe==="Polygon"){Ce=[];for(let Te of Me.geometry)Ce.push(fe(Te,Be))}else if(qe==="MultiPolygon"){Ce=[];for(let Te of Me.geometry){let Pe=[];for(let at of Te)Pe.push(fe(at,Be));Ce.push(Pe)}}Ke.push(oe(Me.id,qe,Ce,Me.tags))}return Ke}function fe(bt,Be){let Ke=[];Ke.size=bt.size,bt.start!==void 0&&(Ke.start=bt.start,Ke.end=bt.end);for(let Ue=0;Ue<bt.length;Ue+=3)Ke.push(bt[Ue]+Be,bt[Ue+1],bt[Ue+2]);return Ke}function Fe(bt,Be){if(bt.transformed)return bt;let Ke=1<<bt.z,Ue=bt.x,Me=bt.y;for(let qe of bt.features){let Ce=qe.geometry,Te=qe.type;if(qe.geometry=[],Te===1)for(let Pe=0;Pe<Ce.length;Pe+=2)qe.geometry.push(rt(Ce[Pe],Ce[Pe+1],Be,Ke,Ue,Me));else for(let Pe=0;Pe<Ce.length;Pe++){let at=[];for(let yt=0;yt<Ce[Pe].length;yt+=2)at.push(rt(Ce[Pe][yt],Ce[Pe][yt+1],Be,Ke,Ue,Me));qe.geometry.push(at)}}return bt.transformed=!0,bt}function rt(bt,Be,Ke,Ue,Me,qe){return[Math.round(Ke*(bt*Ue-Me)),Math.round(Ke*(Be*Ue-qe))]}function st(bt,Be,Ke,Ue,Me){let qe=Be===Me.maxZoom?0:Me.tolerance/((1<<Be)*Me.extent),Ce={features:[],numPoints:0,numSimplified:0,numFeatures:bt.length,source:null,x:Ke,y:Ue,z:Be,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let Te of bt)Qe(Ce,Te,qe,Me);return Ce}function Qe(bt,Be,Ke,Ue){let Me=Be.geometry,qe=Be.type,Ce=[];if(bt.minX=Math.min(bt.minX,Be.minX),bt.minY=Math.min(bt.minY,Be.minY),bt.maxX=Math.max(bt.maxX,Be.maxX),bt.maxY=Math.max(bt.maxY,Be.maxY),qe==="Point"||qe==="MultiPoint")for(let Te=0;Te<Me.length;Te+=3)Ce.push(Me[Te],Me[Te+1]),bt.numPoints++,bt.numSimplified++;else if(qe==="LineString")Lt(Ce,Me,bt,Ke,!1,!1);else if(qe==="MultiLineString"||qe==="Polygon")for(let Te=0;Te<Me.length;Te++)Lt(Ce,Me[Te],bt,Ke,qe==="Polygon",Te===0);else if(qe==="MultiPolygon")for(let Te=0;Te<Me.length;Te++){let Pe=Me[Te];for(let at=0;at<Pe.length;at++)Lt(Ce,Pe[at],bt,Ke,!0,at===0)}if(Ce.length){let Te=Be.tags||null;if(qe==="LineString"&&Ue.lineMetrics){Te={};for(let at in Be.tags)Te[at]=Be.tags[at];Te.mapbox_clip_start=Me.start/Me.size,Te.mapbox_clip_end=Me.end/Me.size}let Pe={geometry:Ce,type:qe==="Polygon"||qe==="MultiPolygon"?3:qe==="LineString"||qe==="MultiLineString"?2:1,tags:Te};Be.id!==null&&(Pe.id=Be.id),bt.features.push(Pe)}}function Lt(bt,Be,Ke,Ue,Me,qe){let Ce=Ue*Ue;if(Ue>0&&Be.size<(Me?Ce:Ue))return void(Ke.numPoints+=Be.length/3);let Te=[];for(let Pe=0;Pe<Be.length;Pe+=3)(Ue===0||Be[Pe+2]>Ce)&&(Ke.numSimplified++,Te.push(Be[Pe],Be[Pe+1])),Ke.numPoints++;Me&&function(Pe,at){let yt=0;for(let Tt=0,Ot=Pe.length,Gt=Ot-2;Tt<Ot;Gt=Tt,Tt+=2)yt+=(Pe[Tt]-Pe[Gt])*(Pe[Tt+1]+Pe[Gt+1]);if(yt>0===at)for(let Tt=0,Ot=Pe.length;Tt<Ot/2;Tt+=2){let Gt=Pe[Tt],rr=Pe[Tt+1];Pe[Tt]=Pe[Ot-2-Tt],Pe[Tt+1]=Pe[Ot-1-Tt],Pe[Ot-2-Tt]=Gt,Pe[Ot-1-Tt]=rr}}(Te,qe),bt.push(Te)}let kt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Vt{constructor(Be,Ke){let Ue=(Ke=this.options=function(qe,Ce){for(let Te in Ce)qe[Te]=Ce[Te];return qe}(Object.create(kt),Ke)).debug;if(Ue&&console.time("preprocess data"),Ke.maxZoom<0||Ke.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");let Me=function(qe,Ce){let Te=[];if(qe.type==="FeatureCollection")for(let Pe=0;Pe<qe.features.length;Pe++)j(Te,qe.features[Pe],Ce,Pe);else j(Te,qe.type==="Feature"?qe:{geometry:qe},Ce);return Te}(Be,Ke);this.tiles={},this.tileCoords=[],Ue&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Ke.indexMaxZoom,Ke.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Me=function(qe,Ce){let Te=Ce.buffer/Ce.extent,Pe=qe,at=ze(qe,1,-1-Te,Te,0,-1,2,Ce),yt=ze(qe,1,1-Te,2+Te,0,-1,2,Ce);return(at||yt)&&(Pe=ze(qe,1,-Te,1+Te,0,-1,2,Ce)||[],at&&(Pe=_e(at,1).concat(Pe)),yt&&(Pe=Pe.concat(_e(yt,-1)))),Pe}(Me,Ke),Me.length&&this.splitTile(Me,0,0,0),Ue&&(Me.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(Be,Ke,Ue,Me,qe,Ce,Te){let Pe=[Be,Ke,Ue,Me],at=this.options,yt=at.debug;for(;Pe.length;){Me=Pe.pop(),Ue=Pe.pop(),Ke=Pe.pop(),Be=Pe.pop();let Tt=1<<Ke,Ot=Zt(Ke,Ue,Me),Gt=this.tiles[Ot];if(!Gt&&(yt>1&&console.time("creation"),Gt=this.tiles[Ot]=st(Be,Ke,Ue,Me,at),this.tileCoords.push({z:Ke,x:Ue,y:Me}),yt)){yt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Ue,Me,Gt.numFeatures,Gt.numPoints,Gt.numSimplified),console.timeEnd("creation"));let Ci=`z${Ke}`;this.stats[Ci]=(this.stats[Ci]||0)+1,this.total++}if(Gt.source=Be,qe==null){if(Ke===at.indexMaxZoom||Gt.numPoints<=at.indexMaxPoints)continue}else{if(Ke===at.maxZoom||Ke===qe)continue;if(qe!=null){let Ci=qe-Ke;if(Ue!==Ce>>Ci||Me!==Te>>Ci)continue}}if(Gt.source=null,Be.length===0)continue;yt>1&&console.time("clipping");let rr=.5*at.buffer/at.extent,Qt=.5-rr,Tr=.5+rr,la=1+rr,Ua=null,Ba=null,Ra=null,ei=null,za=ze(Be,Tt,Ue-rr,Ue+Tr,0,Gt.minX,Gt.maxX,at),ti=ze(Be,Tt,Ue+Qt,Ue+la,0,Gt.minX,Gt.maxX,at);Be=null,za&&(Ua=ze(za,Tt,Me-rr,Me+Tr,1,Gt.minY,Gt.maxY,at),Ba=ze(za,Tt,Me+Qt,Me+la,1,Gt.minY,Gt.maxY,at),za=null),ti&&(Ra=ze(ti,Tt,Me-rr,Me+Tr,1,Gt.minY,Gt.maxY,at),ei=ze(ti,Tt,Me+Qt,Me+la,1,Gt.minY,Gt.maxY,at),ti=null),yt>1&&console.timeEnd("clipping"),Pe.push(Ua||[],Ke+1,2*Ue,2*Me),Pe.push(Ba||[],Ke+1,2*Ue,2*Me+1),Pe.push(Ra||[],Ke+1,2*Ue+1,2*Me),Pe.push(ei||[],Ke+1,2*Ue+1,2*Me+1)}}getTile(Be,Ke,Ue){Be=+Be,Ke=+Ke,Ue=+Ue;let Me=this.options,{extent:qe,debug:Ce}=Me;if(Be<0||Be>24)return null;let Te=1<<Be,Pe=Zt(Be,Ke=Ke+Te&Te-1,Ue);if(this.tiles[Pe])return Fe(this.tiles[Pe],qe);Ce>1&&console.log("drilling down to z%d-%d-%d",Be,Ke,Ue);let at,yt=Be,Tt=Ke,Ot=Ue;for(;!at&&yt>0;)yt--,Tt>>=1,Ot>>=1,at=this.tiles[Zt(yt,Tt,Ot)];return at&&at.source?(Ce>1&&(console.log("found parent tile z%d-%d-%d",yt,Tt,Ot),console.time("drilling down")),this.splitTile(at.source,yt,Tt,Ot,Be,Ke,Ue),Ce>1&&console.timeEnd("drilling down"),this.tiles[Pe]?Fe(this.tiles[Pe],qe):null):null}}function Zt(bt,Be,Ke){return 32*((1<<bt)*Ke+Be)+bt}function Sr(bt,Be){return Be?bt.properties[Be]:bt.id}function xr(bt,Be){if(bt==null)return!0;if(bt.type==="Feature")return Sr(bt,Be)!=null;if(bt.type==="FeatureCollection"){let Ke=new Set;for(let Ue of bt.features){let Me=Sr(Ue,Be);if(Me==null||Ke.has(Me))return!1;Ke.add(Me)}return!0}return!1}function jr(bt,Be){let Ke=new Map;if(bt!=null)if(bt.type==="Feature")Ke.set(Sr(bt,Be),bt);else for(let Ue of bt.features)Ke.set(Sr(Ue,Be),Ue);return Ke}class wr extends i{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Be,Ke){return e._(this,void 0,void 0,function*(){let Ue=Be.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Me=this._geoJSONIndex.getTile(Ue.z,Ue.x,Ue.y);if(!Me)return null;let qe=new class{constructor(Te){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.X,this.length=Te.length,this._features=Te}feature(Te){return new class{constructor(Pe){this._feature=Pe,this.extent=e.X,this.type=Pe.type,this.properties=Pe.tags,"id"in Pe&&!isNaN(Pe.id)&&(this.id=parseInt(Pe.id,10))}loadGeometry(){if(this._feature.type===1){let Pe=[];for(let at of this._feature.geometry)Pe.push([new e.P(at[0],at[1])]);return Pe}{let Pe=[];for(let at of this._feature.geometry){let yt=[];for(let Tt of at)yt.push(new e.P(Tt[0],Tt[1]));Pe.push(yt)}return Pe}}toGeoJSON(Pe,at,yt){return g.call(this,Pe,at,yt)}}(this._features[Te])}}(Me.features),Ce=F(qe);return Ce.byteOffset===0&&Ce.byteLength===Ce.buffer.byteLength||(Ce=new Uint8Array(Ce)),{vectorTile:qe,rawData:Ce.buffer}})}loadData(Be){return e._(this,void 0,void 0,function*(){var Ke;(Ke=this._pendingRequest)===null||Ke===void 0||Ke.abort();let Ue=!!(Be&&Be.request&&Be.request.collectResourceTiming)&&new e.bv(Be.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Be,this._pendingRequest),this._geoJSONIndex=Be.cluster?new Q(function({superclusterOptions:Ce,clusterProperties:Te}){if(!Te||!Ce)return Ce;let Pe={},at={},yt={accumulated:null,zoom:0},Tt={properties:null},Ot=Object.keys(Te);for(let Gt of Ot){let[rr,Qt]=Te[Gt],Tr=e.bC(Qt),la=e.bC(typeof rr=="string"?[rr,["accumulated"],["get",Gt]]:rr);Pe[Gt]=Tr.value,at[Gt]=la.value}return Ce.map=Gt=>{Tt.properties=Gt;let rr={};for(let Qt of Ot)rr[Qt]=Pe[Qt].evaluate(yt,Tt);return rr},Ce.reduce=(Gt,rr)=>{Tt.properties=rr;for(let Qt of Ot)yt.accumulated=Gt[Qt],Gt[Qt]=at[Qt].evaluate(yt,Tt)},Ce}(Be)).load((yield this._pendingData).features):(Me=yield this._pendingData,new Vt(Me,Be.geojsonVtOptions)),this.loaded={};let qe={};if(Ue){let Ce=Ue.finish();Ce&&(qe.resourceTiming={},qe.resourceTiming[Be.source]=JSON.parse(JSON.stringify(Ce)))}return qe}catch(qe){if(delete this._pendingRequest,e.bB(qe))return{abandoned:!0};throw qe}var Me})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Be){let Ke=this.loaded;return Ke&&Ke[Be.uid]?super.reloadTile(Be):this.loadTile(Be)}loadAndProcessGeoJSON(Be,Ke){return e._(this,void 0,void 0,function*(){let Ue=yield this.loadGeoJSON(Be,Ke);if(delete this._pendingRequest,typeof Ue!="object")throw new Error(`Input data given to '${Be.source}' is not a valid GeoJSON object.`);if(f(Ue,!0),Be.filter){let Me=e.bC(Be.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Me.result==="error")throw new Error(Me.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));Ue={type:"FeatureCollection",features:Ue.features.filter(Ce=>Me.value.evaluate({zoom:0},Ce))}}return Ue})}loadGeoJSON(Be,Ke){return e._(this,void 0,void 0,function*(){let{promoteId:Ue}=Be;if(Be.request){let Me=yield e.h(Be.request,Ke);return this._dataUpdateable=xr(Me.data,Ue)?jr(Me.data,Ue):void 0,Me.data}if(typeof Be.data=="string")try{let Me=JSON.parse(Be.data);return this._dataUpdateable=xr(Me,Ue)?jr(Me,Ue):void 0,Me}catch{throw new Error(`Input data given to '${Be.source}' is not a valid GeoJSON object.`)}if(!Be.dataDiff)throw new Error(`Input data given to '${Be.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Be.source}`);return function(Me,qe,Ce){var Te,Pe,at,yt;if(qe.removeAll&&Me.clear(),qe.remove)for(let Tt of qe.remove)Me.delete(Tt);if(qe.add)for(let Tt of qe.add){let Ot=Sr(Tt,Ce);Ot!=null&&Me.set(Ot,Tt)}if(qe.update)for(let Tt of qe.update){let Ot=Me.get(Tt.id);if(Ot==null)continue;let Gt=!Tt.removeAllProperties&&(((Te=Tt.removeProperties)===null||Te===void 0?void 0:Te.length)>0||((Pe=Tt.addOrUpdateProperties)===null||Pe===void 0?void 0:Pe.length)>0);if((Tt.newGeometry||Tt.removeAllProperties||Gt)&&(Ot=Object.assign({},Ot),Me.set(Tt.id,Ot),Gt&&(Ot.properties=Object.assign({},Ot.properties))),Tt.newGeometry&&(Ot.geometry=Tt.newGeometry),Tt.removeAllProperties)Ot.properties={};else if(((at=Tt.removeProperties)===null||at===void 0?void 0:at.length)>0)for(let rr of Tt.removeProperties)Object.prototype.hasOwnProperty.call(Ot.properties,rr)&&delete Ot.properties[rr];if(((yt=Tt.addOrUpdateProperties)===null||yt===void 0?void 0:yt.length)>0)for(let{key:rr,value:Qt}of Tt.addOrUpdateProperties)Ot.properties[rr]=Qt}}(this._dataUpdateable,Be.dataDiff,Ue),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Be){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Be){return this._geoJSONIndex.getClusterExpansionZoom(Be.clusterId)}getClusterChildren(Be){return this._geoJSONIndex.getChildren(Be.clusterId)}getClusterLeaves(Be){return this._geoJSONIndex.getLeaves(Be.clusterId,Be.limit,Be.offset)}}class Ir{constructor(Be){this.self=Be,this.actor=new e.F(Be),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ke,Ue)=>{if(this.externalWorkerSourceTypes[Ke])throw new Error(`Worker source with name "${Ke}" already registered.`);this.externalWorkerSourceTypes[Ke]=Ue},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=Ke=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(Ke)},this.actor.registerMessageHandler("LDT",(Ke,Ue)=>this._getDEMWorkerSource(Ke,Ue.source).loadTile(Ue)),this.actor.registerMessageHandler("RDT",(Ke,Ue)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ke,Ue.source).removeTile(Ue)})),this.actor.registerMessageHandler("GCEZ",(Ke,Ue)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Ue.type,Ue.source).getClusterExpansionZoom(Ue)})),this.actor.registerMessageHandler("GCC",(Ke,Ue)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Ue.type,Ue.source).getClusterChildren(Ue)})),this.actor.registerMessageHandler("GCL",(Ke,Ue)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(Ke,Ue.type,Ue.source).getClusterLeaves(Ue)})),this.actor.registerMessageHandler("LD",(Ke,Ue)=>this._getWorkerSource(Ke,Ue.type,Ue.source).loadData(Ue)),this.actor.registerMessageHandler("GD",(Ke,Ue)=>this._getWorkerSource(Ke,Ue.type,Ue.source).getData()),this.actor.registerMessageHandler("LT",(Ke,Ue)=>this._getWorkerSource(Ke,Ue.type,Ue.source).loadTile(Ue)),this.actor.registerMessageHandler("RT",(Ke,Ue)=>this._getWorkerSource(Ke,Ue.type,Ue.source).reloadTile(Ue)),this.actor.registerMessageHandler("AT",(Ke,Ue)=>this._getWorkerSource(Ke,Ue.type,Ue.source).abortTile(Ue)),this.actor.registerMessageHandler("RMT",(Ke,Ue)=>this._getWorkerSource(Ke,Ue.type,Ue.source).removeTile(Ue)),this.actor.registerMessageHandler("RS",(Ke,Ue)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[Ke]||!this.workerSources[Ke][Ue.type]||!this.workerSources[Ke][Ue.type][Ue.source])return;let Me=this.workerSources[Ke][Ue.type][Ue.source];delete this.workerSources[Ke][Ue.type][Ue.source],Me.removeSource!==void 0&&Me.removeSource(Ue)})),this.actor.registerMessageHandler("RM",Ke=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[Ke],delete this.availableImages[Ke],delete this.workerSources[Ke],delete this.demWorkerSources[Ke]})),this.actor.registerMessageHandler("SR",(Ke,Ue)=>e._(this,void 0,void 0,function*(){this.referrer=Ue})),this.actor.registerMessageHandler("SRPS",(Ke,Ue)=>this._syncRTLPluginState(Ke,Ue)),this.actor.registerMessageHandler("IS",(Ke,Ue)=>e._(this,void 0,void 0,function*(){this.self.importScripts(Ue)})),this.actor.registerMessageHandler("SI",(Ke,Ue)=>this._setImages(Ke,Ue)),this.actor.registerMessageHandler("UL",(Ke,Ue)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ke).update(Ue.layers,Ue.removedIds)})),this.actor.registerMessageHandler("SL",(Ke,Ue)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(Ke).replace(Ue)}))}_setImages(Be,Ke){return e._(this,void 0,void 0,function*(){this.availableImages[Be]=Ke;for(let Ue in this.workerSources[Be]){let Me=this.workerSources[Be][Ue];for(let qe in Me)Me[qe].availableImages=Ke}})}_syncRTLPluginState(Be,Ke){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if(Ke.pluginStatus!=="loading")return e.bD.setState(Ke),Ke;let Ue=Ke.pluginURL;if(this.self.importScripts(Ue),e.bD.isParsed()){let Me={pluginStatus:"loaded",pluginURL:Ue};return e.bD.setState(Me),Me}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ue}`)})}_getAvailableImages(Be){let Ke=this.availableImages[Be];return Ke||(Ke=[]),Ke}_getLayerIndex(Be){let Ke=this.layerIndexes[Be];return Ke||(Ke=this.layerIndexes[Be]=new t),Ke}_getWorkerSource(Be,Ke,Ue){if(this.workerSources[Be]||(this.workerSources[Be]={}),this.workerSources[Be][Ke]||(this.workerSources[Be][Ke]={}),!this.workerSources[Be][Ke][Ue]){let Me={sendAsync:(qe,Ce)=>(qe.targetMapId=Be,this.actor.sendAsync(qe,Ce))};switch(Ke){case"vector":this.workerSources[Be][Ke][Ue]=new i(Me,this._getLayerIndex(Be),this._getAvailableImages(Be));break;case"geojson":this.workerSources[Be][Ke][Ue]=new wr(Me,this._getLayerIndex(Be),this._getAvailableImages(Be));break;default:this.workerSources[Be][Ke][Ue]=new this.externalWorkerSourceTypes[Ke](Me,this._getLayerIndex(Be),this._getAvailableImages(Be))}}return this.workerSources[Be][Ke][Ue]}_getDEMWorkerSource(Be,Ke){return this.demWorkerSources[Be]||(this.demWorkerSources[Be]={}),this.demWorkerSources[Be][Ke]||(this.demWorkerSources[Be][Ke]=new n),this.demWorkerSources[Be][Ke]}}return e.i(self)&&(self.worker=new Ir(self)),Ir}),A("index",["exports","./shared"],function(e,t){"use strict";var r="4.7.1";let o,a,i={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Ne=>new Promise((R,ae)=>{let we=requestAnimationFrame(R);Ne.signal.addEventListener("abort",()=>{cancelAnimationFrame(we),ae(t.c())})}),getImageData(Ne,R=0){return this.getImageCanvasContext(Ne).getImageData(-R,-R,Ne.width+2*R,Ne.height+2*R)},getImageCanvasContext(Ne){let R=window.document.createElement("canvas"),ae=R.getContext("2d",{willReadFrequently:!0});if(!ae)throw new Error("failed to create canvas 2d context");return R.width=Ne.width,R.height=Ne.height,ae.drawImage(Ne,0,0,Ne.width,Ne.height),ae},resolveURL:Ne=>(o||(o=document.createElement("a")),o.href=Ne,o.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(a==null&&(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)}};class n{static testProp(R){if(!n.docStyle)return R[0];for(let ae=0;ae<R.length;ae++)if(R[ae]in n.docStyle)return R[ae];return R[0]}static create(R,ae,we){let Se=window.document.createElement(R);return ae!==void 0&&(Se.className=ae),we&&we.appendChild(Se),Se}static createNS(R,ae){return window.document.createElementNS(R,ae)}static disableDrag(){n.docStyle&&n.selectProp&&(n.userSelect=n.docStyle[n.selectProp],n.docStyle[n.selectProp]="none")}static enableDrag(){n.docStyle&&n.selectProp&&(n.docStyle[n.selectProp]=n.userSelect)}static setTransform(R,ae){R.style[n.transformProp]=ae}static addEventListener(R,ae,we,Se={}){R.addEventListener(ae,we,"passive"in Se?Se:Se.capture)}static removeEventListener(R,ae,we,Se={}){R.removeEventListener(ae,we,"passive"in Se?Se:Se.capture)}static suppressClickInternal(R){R.preventDefault(),R.stopPropagation(),window.removeEventListener("click",n.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",n.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",n.suppressClickInternal,!0)},0)}static getScale(R){let ae=R.getBoundingClientRect();return{x:ae.width/R.offsetWidth||1,y:ae.height/R.offsetHeight||1,boundingClientRect:ae}}static getPoint(R,ae,we){let Se=ae.boundingClientRect;return new t.P((we.clientX-Se.left)/ae.x-R.clientLeft,(we.clientY-Se.top)/ae.y-R.clientTop)}static mousePos(R,ae){let we=n.getScale(R);return n.getPoint(R,we,ae)}static touchPos(R,ae){let we=[],Se=n.getScale(R);for(let Oe=0;Oe<ae.length;Oe++)we.push(n.getPoint(R,Se,ae[Oe]));return we}static mouseButton(R){return R.button}static remove(R){R.parentNode&&R.parentNode.removeChild(R)}}n.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,n.selectProp=n.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),n.transformProp=n.testProp(["transform","WebkitTransform"]);let s={supported:!1,testSupport:function(Ne){!g&&f&&(v?T(Ne):c=Ne)}},c,f,g=!1,v=!1;function T(Ne){let R=Ne.createTexture();Ne.bindTexture(Ne.TEXTURE_2D,R);try{if(Ne.texImage2D(Ne.TEXTURE_2D,0,Ne.RGBA,Ne.RGBA,Ne.UNSIGNED_BYTE,f),Ne.isContextLost())return;s.supported=!0}catch{}Ne.deleteTexture(R),g=!0}var l;typeof document<"u"&&(f=document.createElement("img"),f.onload=()=>{c&&T(c),c=null,v=!0},f.onerror=()=>{g=!0,c=null},f.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Ne){let R,ae,we,Se;Ne.resetRequestQueue=()=>{R=[],ae=0,we=0,Se={}},Ne.addThrottleControl=Bt=>{let $t=we++;return Se[$t]=Bt,$t},Ne.removeThrottleControl=Bt=>{delete Se[Bt],pt()},Ne.getImage=(Bt,$t,br=!0)=>new Promise((Ar,Yr)=>{s.supported&&(Bt.headers||(Bt.headers={}),Bt.headers.accept="image/webp,*/*"),t.e(Bt,{type:"image"}),R.push({abortController:$t,requestParameters:Bt,supportImageRefresh:br,state:"queued",onError:sa=>{Yr(sa)},onSuccess:sa=>{Ar(sa)}}),pt()});let Oe=Bt=>t._(this,void 0,void 0,function*(){Bt.state="running";let{requestParameters:$t,supportImageRefresh:br,onError:Ar,onSuccess:Yr,abortController:sa}=Bt,He=br===!1&&!t.i(self)&&!t.g($t.url)&&(!$t.headers||Object.keys($t.headers).reduce((dt,Ct)=>dt&&Ct==="accept",!0));ae++;let Je=He?At($t,sa):t.m($t,sa);try{let dt=yield Je;delete Bt.abortController,Bt.state="completed",dt.data instanceof HTMLImageElement||t.b(dt.data)?Yr(dt):dt.data&&Yr({data:yield(ut=dt.data,typeof createImageBitmap=="function"?t.d(ut):t.f(ut)),cacheControl:dt.cacheControl,expires:dt.expires})}catch(dt){delete Bt.abortController,Ar(dt)}finally{ae--,pt()}var ut}),pt=()=>{let Bt=(()=>{for(let $t of Object.keys(Se))if(Se[$t]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let $t=ae;$t<Bt&&R.length>0;$t++){let br=R.shift();br.abortController.signal.aborted?$t--:Oe(br)}},At=(Bt,$t)=>new Promise((br,Ar)=>{let Yr=new Image,sa=Bt.url,He=Bt.credentials;He&&He==="include"?Yr.crossOrigin="use-credentials":(He&&He==="same-origin"||!t.s(sa))&&(Yr.crossOrigin="anonymous"),$t.signal.addEventListener("abort",()=>{Yr.src="",Ar(t.c())}),Yr.fetchPriority="high",Yr.onload=()=>{Yr.onerror=Yr.onload=null,br({data:Yr})},Yr.onerror=()=>{Yr.onerror=Yr.onload=null,$t.signal.aborted||Ar(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Yr.src=sa})}(l||(l={})),l.resetRequestQueue();class _{constructor(R){this._transformRequestFn=R}transformRequest(R,ae){return this._transformRequestFn&&this._transformRequestFn(R,ae)||{url:R}}setTransformRequest(R){this._transformRequestFn=R}}function w(Ne){var R=new t.A(3);return R[0]=Ne[0],R[1]=Ne[1],R[2]=Ne[2],R}var S,E=function(Ne,R,ae){return Ne[0]=R[0]-ae[0],Ne[1]=R[1]-ae[1],Ne[2]=R[2]-ae[2],Ne};S=new t.A(3),t.A!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0);var y=function(Ne){var R=Ne[0],ae=Ne[1];return R*R+ae*ae};function b(Ne){let R=[];if(typeof Ne=="string")R.push({id:"default",url:Ne});else if(Ne&&Ne.length>0){let ae=[];for(let{id:we,url:Se}of Ne){let Oe=`${we}${Se}`;ae.indexOf(Oe)===-1&&(ae.push(Oe),R.push({id:we,url:Se}))}}return R}function p(Ne,R,ae){let we=Ne.split("?");return we[0]+=`${R}${ae}`,we.join("?")}(function(){var Ne=new t.A(2);t.A!=Float32Array&&(Ne[0]=0,Ne[1]=0)})();class u{constructor(R,ae,we,Se){this.context=R,this.format=we,this.texture=R.gl.createTexture(),this.update(ae,Se)}update(R,ae,we){let{width:Se,height:Oe}=R,pt=!(this.size&&this.size[0]===Se&&this.size[1]===Oe||we),{context:At}=this,{gl:Bt}=At;if(this.useMipmap=!!(ae&&ae.useMipmap),Bt.bindTexture(Bt.TEXTURE_2D,this.texture),At.pixelStoreUnpackFlipY.set(!1),At.pixelStoreUnpack.set(1),At.pixelStoreUnpackPremultiplyAlpha.set(this.format===Bt.RGBA&&(!ae||ae.premultiply!==!1)),pt)this.size=[Se,Oe],R instanceof HTMLImageElement||R instanceof HTMLCanvasElement||R instanceof HTMLVideoElement||R instanceof ImageData||t.b(R)?Bt.texImage2D(Bt.TEXTURE_2D,0,this.format,this.format,Bt.UNSIGNED_BYTE,R):Bt.texImage2D(Bt.TEXTURE_2D,0,this.format,Se,Oe,0,this.format,Bt.UNSIGNED_BYTE,R.data);else{let{x:$t,y:br}=we||{x:0,y:0};R instanceof HTMLImageElement||R instanceof HTMLCanvasElement||R instanceof HTMLVideoElement||R instanceof ImageData||t.b(R)?Bt.texSubImage2D(Bt.TEXTURE_2D,0,$t,br,Bt.RGBA,Bt.UNSIGNED_BYTE,R):Bt.texSubImage2D(Bt.TEXTURE_2D,0,$t,br,Se,Oe,Bt.RGBA,Bt.UNSIGNED_BYTE,R.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Bt.generateMipmap(Bt.TEXTURE_2D)}bind(R,ae,we){let{context:Se}=this,{gl:Oe}=Se;Oe.bindTexture(Oe.TEXTURE_2D,this.texture),we!==Oe.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(we=Oe.LINEAR),R!==this.filter&&(Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_MAG_FILTER,R),Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_MIN_FILTER,we||R),this.filter=R),ae!==this.wrap&&(Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_WRAP_S,ae),Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_WRAP_T,ae),this.wrap=ae)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:R}=this.context;R.deleteTexture(this.texture),this.texture=null}}function m(Ne){let{userImage:R}=Ne;return!!(R&&R.render&&R.render())&&(Ne.data.replace(new Uint8Array(R.data.buffer)),!0)}class h extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(R){if(this.loaded!==R&&(this.loaded=R,R)){for(let{ids:ae,promiseResolve:we}of this.requestors)we(this._getImagesForIds(ae));this.requestors=[]}}getImage(R){let ae=this.images[R];if(ae&&!ae.data&&ae.spriteData){let we=ae.spriteData;ae.data=new t.R({width:we.width,height:we.height},we.context.getImageData(we.x,we.y,we.width,we.height).data),ae.spriteData=null}return ae}addImage(R,ae){if(this.images[R])throw new Error(`Image id ${R} already exist, use updateImage instead`);this._validate(R,ae)&&(this.images[R]=ae)}_validate(R,ae){let we=!0,Se=ae.data||ae.spriteData;return this._validateStretch(ae.stretchX,Se&&Se.width)||(this.fire(new t.j(new Error(`Image "${R}" has invalid "stretchX" value`))),we=!1),this._validateStretch(ae.stretchY,Se&&Se.height)||(this.fire(new t.j(new Error(`Image "${R}" has invalid "stretchY" value`))),we=!1),this._validateContent(ae.content,ae)||(this.fire(new t.j(new Error(`Image "${R}" has invalid "content" value`))),we=!1),we}_validateStretch(R,ae){if(!R)return!0;let we=0;for(let Se of R){if(Se[0]<we||Se[1]<Se[0]||ae<Se[1])return!1;we=Se[1]}return!0}_validateContent(R,ae){if(!R)return!0;if(R.length!==4)return!1;let we=ae.spriteData,Se=we&&we.width||ae.data.width,Oe=we&&we.height||ae.data.height;return!(R[0]<0||Se<R[0]||R[1]<0||Oe<R[1]||R[2]<0||Se<R[2]||R[3]<0||Oe<R[3]||R[2]<R[0]||R[3]<R[1])}updateImage(R,ae,we=!0){let Se=this.getImage(R);if(we&&(Se.data.width!==ae.data.width||Se.data.height!==ae.data.height))throw new Error(`size mismatch between old image (${Se.data.width}x${Se.data.height}) and new image (${ae.data.width}x${ae.data.height}).`);ae.version=Se.version+1,this.images[R]=ae,this.updatedImages[R]=!0}removeImage(R){let ae=this.images[R];delete this.images[R],delete this.patterns[R],ae.userImage&&ae.userImage.onRemove&&ae.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(R){return new Promise((ae,we)=>{let Se=!0;if(!this.isLoaded())for(let Oe of R)this.images[Oe]||(Se=!1);this.isLoaded()||Se?ae(this._getImagesForIds(R)):this.requestors.push({ids:R,promiseResolve:ae})})}_getImagesForIds(R){let ae={};for(let we of R){let Se=this.getImage(we);Se||(this.fire(new t.k("styleimagemissing",{id:we})),Se=this.getImage(we)),Se?ae[we]={data:Se.data.clone(),pixelRatio:Se.pixelRatio,sdf:Se.sdf,version:Se.version,stretchX:Se.stretchX,stretchY:Se.stretchY,content:Se.content,textFitWidth:Se.textFitWidth,textFitHeight:Se.textFitHeight,hasRenderCallback:!!(Se.userImage&&Se.userImage.render)}:t.w(`Image "${we}" 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 ae}getPixelSize(){let{width:R,height:ae}=this.atlasImage;return{width:R,height:ae}}getPattern(R){let ae=this.patterns[R],we=this.getImage(R);if(!we)return null;if(ae&&ae.position.version===we.version)return ae.position;if(ae)ae.position.version=we.version;else{let Se={w:we.data.width+2,h:we.data.height+2,x:0,y:0},Oe=new t.I(Se,we);this.patterns[R]={bin:Se,position:Oe}}return this._updatePatternAtlas(),this.patterns[R].position}bind(R){let ae=R.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new u(R,this.atlasImage,ae.RGBA),this.atlasTexture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE)}_updatePatternAtlas(){let R=[];for(let Oe in this.patterns)R.push(this.patterns[Oe].bin);let{w:ae,h:we}=t.p(R),Se=this.atlasImage;Se.resize({width:ae||1,height:we||1});for(let Oe in this.patterns){let{bin:pt}=this.patterns[Oe],At=pt.x+1,Bt=pt.y+1,$t=this.getImage(Oe).data,br=$t.width,Ar=$t.height;t.R.copy($t,Se,{x:0,y:0},{x:At,y:Bt},{width:br,height:Ar}),t.R.copy($t,Se,{x:0,y:Ar-1},{x:At,y:Bt-1},{width:br,height:1}),t.R.copy($t,Se,{x:0,y:0},{x:At,y:Bt+Ar},{width:br,height:1}),t.R.copy($t,Se,{x:br-1,y:0},{x:At-1,y:Bt},{width:1,height:Ar}),t.R.copy($t,Se,{x:0,y:0},{x:At+br,y:Bt},{width:1,height:Ar})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(R){for(let ae of R){if(this.callbackDispatchedThisFrame[ae])continue;this.callbackDispatchedThisFrame[ae]=!0;let we=this.getImage(ae);we||t.w(`Image with ID: "${ae}" was not found`),m(we)&&this.updateImage(ae,we)}}}let P=1e20;function L(Ne,R,ae,we,Se,Oe,pt,At,Bt){for(let $t=R;$t<R+we;$t++)z(Ne,ae*Oe+$t,Oe,Se,pt,At,Bt);for(let $t=ae;$t<ae+Se;$t++)z(Ne,$t*Oe+R,1,we,pt,At,Bt)}function z(Ne,R,ae,we,Se,Oe,pt){Oe[0]=0,pt[0]=-P,pt[1]=P,Se[0]=Ne[R];for(let At=1,Bt=0,$t=0;At<we;At++){Se[At]=Ne[R+At*ae];let br=At*At;do{let Ar=Oe[Bt];$t=(Se[At]-Se[Ar]+br-Ar*Ar)/(At-Ar)/2}while($t<=pt[Bt]&&--Bt>-1);Bt++,Oe[Bt]=At,pt[Bt]=$t,pt[Bt+1]=P}for(let At=0,Bt=0;At<we;At++){for(;pt[Bt+1]<At;)Bt++;let $t=Oe[Bt],br=At-$t;Ne[R+At*ae]=Se[$t]+br*br}}class F{constructor(R,ae){this.requestManager=R,this.localIdeographFontFamily=ae,this.entries={}}setURL(R){this.url=R}getGlyphs(R){return t._(this,void 0,void 0,function*(){let ae=[];for(let Oe in R)for(let pt of R[Oe])ae.push(this._getAndCacheGlyphsPromise(Oe,pt));let we=yield Promise.all(ae),Se={};for(let{stack:Oe,id:pt,glyph:At}of we)Se[Oe]||(Se[Oe]={}),Se[Oe][pt]=At&&{id:At.id,bitmap:At.bitmap.clone(),metrics:At.metrics};return Se})}_getAndCacheGlyphsPromise(R,ae){return t._(this,void 0,void 0,function*(){let we=this.entries[R];we||(we=this.entries[R]={glyphs:{},requests:{},ranges:{}});let Se=we.glyphs[ae];if(Se!==void 0)return{stack:R,id:ae,glyph:Se};if(Se=this._tinySDF(we,R,ae),Se)return we.glyphs[ae]=Se,{stack:R,id:ae,glyph:Se};let Oe=Math.floor(ae/256);if(256*Oe>65535)throw new Error("glyphs > 65535 not supported");if(we.ranges[Oe])return{stack:R,id:ae,glyph:Se};if(!this.url)throw new Error("glyphsUrl is not set");if(!we.requests[Oe]){let At=F.loadGlyphRange(R,Oe,this.url,this.requestManager);we.requests[Oe]=At}let pt=yield we.requests[Oe];for(let At in pt)this._doesCharSupportLocalGlyph(+At)||(we.glyphs[+At]=pt[+At]);return we.ranges[Oe]=!0,{stack:R,id:ae,glyph:pt[ae]||null}})}_doesCharSupportLocalGlyph(R){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(R))}_tinySDF(R,ae,we){let Se=this.localIdeographFontFamily;if(!Se||!this._doesCharSupportLocalGlyph(we))return;let Oe=R.tinySDF;if(!Oe){let At="400";/bold/i.test(ae)?At="900":/medium/i.test(ae)?At="500":/light/i.test(ae)&&(At="200"),Oe=R.tinySDF=new F.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Se,fontWeight:At})}let pt=Oe.draw(String.fromCharCode(we));return{id:we,bitmap:new t.o({width:pt.width||60,height:pt.height||60},pt.data),metrics:{width:pt.glyphWidth/2||24,height:pt.glyphHeight/2||24,left:pt.glyphLeft/2+.5||0,top:pt.glyphTop/2-27.5||-8,advance:pt.glyphAdvance/2||24,isDoubleResolution:!0}}}}F.loadGlyphRange=function(Ne,R,ae,we){return t._(this,void 0,void 0,function*(){let Se=256*R,Oe=Se+255,pt=we.transformRequest(ae.replace("{fontstack}",Ne).replace("{range}",`${Se}-${Oe}`),"Glyphs"),At=yield t.l(pt,new AbortController);if(!At||!At.data)throw new Error(`Could not load glyph range. range: ${R}, ${Se}-${Oe}`);let Bt={};for(let $t of t.n(At.data))Bt[$t.id]=$t;return Bt})},F.TinySDF=class{constructor({fontSize:Ne=24,buffer:R=3,radius:ae=8,cutoff:we=.25,fontFamily:Se="sans-serif",fontWeight:Oe="normal",fontStyle:pt="normal"}={}){this.buffer=R,this.cutoff=we,this.radius=ae;let At=this.size=Ne+4*R,Bt=this._createCanvas(At),$t=this.ctx=Bt.getContext("2d",{willReadFrequently:!0});$t.font=`${pt} ${Oe} ${Ne}px ${Se}`,$t.textBaseline="alphabetic",$t.textAlign="left",$t.fillStyle="black",this.gridOuter=new Float64Array(At*At),this.gridInner=new Float64Array(At*At),this.f=new Float64Array(At),this.z=new Float64Array(At+1),this.v=new Uint16Array(At)}_createCanvas(Ne){let R=document.createElement("canvas");return R.width=R.height=Ne,R}draw(Ne){let{width:R,actualBoundingBoxAscent:ae,actualBoundingBoxDescent:we,actualBoundingBoxLeft:Se,actualBoundingBoxRight:Oe}=this.ctx.measureText(Ne),pt=Math.ceil(ae),At=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Oe-Se))),Bt=Math.min(this.size-this.buffer,pt+Math.ceil(we)),$t=At+2*this.buffer,br=Bt+2*this.buffer,Ar=Math.max($t*br,0),Yr=new Uint8ClampedArray(Ar),sa={data:Yr,width:$t,height:br,glyphWidth:At,glyphHeight:Bt,glyphTop:pt,glyphLeft:0,glyphAdvance:R};if(At===0||Bt===0)return sa;let{ctx:He,buffer:Je,gridInner:ut,gridOuter:dt}=this;He.clearRect(Je,Je,At,Bt),He.fillText(Ne,Je,Je+pt);let Ct=He.getImageData(Je,Je,At,Bt);dt.fill(P,0,Ar),ut.fill(0,0,Ar);for(let wt=0;wt<Bt;wt++)for(let Dt=0;Dt<At;Dt++){let ur=Ct.data[4*(wt*At+Dt)+3]/255;if(ur===0)continue;let mr=(wt+Je)*$t+Dt+Je;if(ur===1)dt[mr]=0,ut[mr]=P;else{let Er=.5-ur;dt[mr]=Er>0?Er*Er:0,ut[mr]=Er<0?Er*Er:0}}L(dt,0,0,$t,br,$t,this.f,this.v,this.z),L(ut,Je,Je,At,Bt,$t,this.f,this.v,this.z);for(let wt=0;wt<Ar;wt++){let Dt=Math.sqrt(dt[wt])-Math.sqrt(ut[wt]);Yr[wt]=Math.round(255-255*(Dt/this.radius+this.cutoff))}return sa}};class B{constructor(){this.specification=t.v.light.position}possiblyEvaluate(R,ae){return t.x(R.expression.evaluate(ae))}interpolate(R,ae,we){return{x:t.y.number(R.x,ae.x,we),y:t.y.number(R.y,ae.y,we),z:t.y.number(R.z,ae.z,we)}}}let O;class I extends t.E{constructor(R){super(),O=O||new t.q({anchor:new t.D(t.v.light.anchor),position:new B,color:new t.D(t.v.light.color),intensity:new t.D(t.v.light.intensity)}),this._transitionable=new t.T(O),this.setLight(R),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(R,ae={}){if(!this._validate(t.r,R,ae))for(let we in R){let Se=R[we];we.endsWith("-transition")?this._transitionable.setTransition(we.slice(0,-11),Se):this._transitionable.setValue(we,Se)}}updateTransitions(R){this._transitioning=this._transitionable.transitioned(R,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(R){this.properties=this._transitioning.possiblyEvaluate(R)}_validate(R,ae,we){return(!we||we.validate!==!1)&&t.t(this,R.call(t.u,{value:ae,style:{glyphs:!0,sprite:!0},styleSpec:t.v}))}}let N=new t.q({"sky-color":new t.D(t.v.sky["sky-color"]),"horizon-color":new t.D(t.v.sky["horizon-color"]),"fog-color":new t.D(t.v.sky["fog-color"]),"fog-ground-blend":new t.D(t.v.sky["fog-ground-blend"]),"horizon-fog-blend":new t.D(t.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new t.D(t.v.sky["sky-horizon-blend"]),"atmosphere-blend":new t.D(t.v.sky["atmosphere-blend"])});class U extends t.E{constructor(R){super(),this._transitionable=new t.T(N),this.setSky(R),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new t.z(0))}setSky(R,ae={}){if(!this._validate(t.B,R,ae)){R||(R={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let we in R){let Se=R[we];we.endsWith("-transition")?this._transitionable.setTransition(we.slice(0,-11),Se):this._transitionable.setValue(we,Se)}}}getSky(){return this._transitionable.serialize()}updateTransitions(R){this._transitioning=this._transitionable.transitioned(R,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(R){this.properties=this._transitioning.possiblyEvaluate(R)}_validate(R,ae,we={}){return we?.validate!==!1&&t.t(this,R.call(t.u,t.e({value:ae,style:{glyphs:!0,sprite:!0},styleSpec:t.v})))}calculateFogBlendOpacity(R){return R<60?0:R<70?(R-60)/10:1}}class W{constructor(R,ae){this.width=R,this.height=ae,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(R,ae){let we=R.join(",")+String(ae);return this.dashEntry[we]||(this.dashEntry[we]=this.addDash(R,ae)),this.dashEntry[we]}getDashRanges(R,ae,we){let Se=[],Oe=R.length%2==1?-R[R.length-1]*we:0,pt=R[0]*we,At=!0;Se.push({left:Oe,right:pt,isDash:At,zeroLength:R[0]===0});let Bt=R[0];for(let $t=1;$t<R.length;$t++){At=!At;let br=R[$t];Oe=Bt*we,Bt+=br,pt=Bt*we,Se.push({left:Oe,right:pt,isDash:At,zeroLength:br===0})}return Se}addRoundDash(R,ae,we){let Se=ae/2;for(let Oe=-we;Oe<=we;Oe++){let pt=this.width*(this.nextRow+we+Oe),At=0,Bt=R[At];for(let $t=0;$t<this.width;$t++){$t/Bt.right>1&&(Bt=R[++At]);let br=Math.abs($t-Bt.left),Ar=Math.abs($t-Bt.right),Yr=Math.min(br,Ar),sa,He=Oe/we*(Se+1);if(Bt.isDash){let Je=Se-Math.abs(He);sa=Math.sqrt(Yr*Yr+Je*Je)}else sa=Se-Math.sqrt(Yr*Yr+He*He);this.data[pt+$t]=Math.max(0,Math.min(255,sa+128))}}}addRegularDash(R){for(let At=R.length-1;At>=0;--At){let Bt=R[At],$t=R[At+1];Bt.zeroLength?R.splice(At,1):$t&&$t.isDash===Bt.isDash&&($t.left=Bt.left,R.splice(At,1))}let ae=R[0],we=R[R.length-1];ae.isDash===we.isDash&&(ae.left=we.left-this.width,we.right=ae.right+this.width);let Se=this.width*this.nextRow,Oe=0,pt=R[Oe];for(let At=0;At<this.width;At++){At/pt.right>1&&(pt=R[++Oe]);let Bt=Math.abs(At-pt.left),$t=Math.abs(At-pt.right),br=Math.min(Bt,$t);this.data[Se+At]=Math.max(0,Math.min(255,(pt.isDash?br:-br)+128))}}addDash(R,ae){let we=ae?7:0,Se=2*we+1;if(this.nextRow+Se>this.height)return t.w("LineAtlas out of space"),null;let Oe=0;for(let At=0;At<R.length;At++)Oe+=R[At];if(Oe!==0){let At=this.width/Oe,Bt=this.getDashRanges(R,this.width,At);ae?this.addRoundDash(Bt,At,we):this.addRegularDash(Bt)}let pt={y:(this.nextRow+we+.5)/this.height,height:2*we/this.height,width:Oe};return this.nextRow+=Se,this.dirty=!0,pt}bind(R){let ae=R.gl;this.texture?(ae.bindTexture(ae.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ae.texSubImage2D(ae.TEXTURE_2D,0,0,0,this.width,this.height,ae.ALPHA,ae.UNSIGNED_BYTE,this.data))):(this.texture=ae.createTexture(),ae.bindTexture(ae.TEXTURE_2D,this.texture),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_S,ae.REPEAT),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_T,ae.REPEAT),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MIN_FILTER,ae.LINEAR),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MAG_FILTER,ae.LINEAR),ae.texImage2D(ae.TEXTURE_2D,0,ae.ALPHA,this.width,this.height,0,ae.ALPHA,ae.UNSIGNED_BYTE,this.data))}}let Q="maplibre_preloaded_worker_pool";class ue{constructor(){this.active={}}acquire(R){if(!this.workers)for(this.workers=[];this.workers.length<ue.workerCount;)this.workers.push(new Worker(t.a.WORKER_URL));return this.active[R]=!0,this.workers.slice()}release(R){delete this.active[R],this.numActive()===0&&(this.workers.forEach(ae=>{ae.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Q]}numActive(){return Object.keys(this.active).length}}let le=Math.floor(i.hardwareConcurrency/2),he,G;function $(){return he||(he=new ue),he}ue.workerCount=t.C(globalThis)?Math.max(Math.min(le,3),1):1;class J{constructor(R,ae){this.workerPool=R,this.actors=[],this.currentActor=0,this.id=ae;let we=this.workerPool.acquire(ae);for(let Se=0;Se<we.length;Se++){let Oe=new t.F(we[Se],ae);Oe.name=`Worker ${Se}`,this.actors.push(Oe)}if(!this.actors.length)throw new Error("No actors found")}broadcast(R,ae){let we=[];for(let Se of this.actors)we.push(Se.sendAsync({type:R,data:ae}));return Promise.all(we)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(R=!0){this.actors.forEach(ae=>{ae.remove()}),this.actors=[],R&&this.workerPool.release(this.id)}registerMessageHandler(R,ae){for(let we of this.actors)we.registerMessageHandler(R,ae)}}function X(){return G||(G=new J($(),t.G),G.registerMessageHandler("GR",(Ne,R,ae)=>t.m(R,ae))),G}function oe(Ne,R){let ae=t.H();return t.J(ae,ae,[1,1,0]),t.K(ae,ae,[.5*Ne.width,.5*Ne.height,1]),t.L(ae,ae,Ne.calculatePosMatrix(R.toUnwrapped()))}function ie(Ne,R,ae,we,Se,Oe){let pt=function(Ar,Yr,sa){if(Ar)for(let He of Ar){let Je=Yr[He];if(Je&&Je.source===sa&&Je.type==="fill-extrusion")return!0}else for(let He in Yr){let Je=Yr[He];if(Je.source===sa&&Je.type==="fill-extrusion")return!0}return!1}(Se&&Se.layers,R,Ne.id),At=Oe.maxPitchScaleFactor(),Bt=Ne.tilesIn(we,At,pt);Bt.sort(j);let $t=[];for(let Ar of Bt)$t.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(R,ae,Ne._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,Se,Oe,At,oe(Ne.transform,Ar.tileID))});let br=function(Ar){let Yr={},sa={};for(let He of Ar){let Je=He.queryResults,ut=He.wrappedTileID,dt=sa[ut]=sa[ut]||{};for(let Ct in Je){let wt=Je[Ct],Dt=dt[Ct]=dt[Ct]||{},ur=Yr[Ct]=Yr[Ct]||[];for(let mr of wt)Dt[mr.featureIndex]||(Dt[mr.featureIndex]=!0,ur.push(mr))}}return Yr}($t);for(let Ar in br)br[Ar].forEach(Yr=>{let sa=Yr.feature,He=Ne.getFeatureState(sa.layer["source-layer"],sa.id);sa.source=sa.layer.source,sa.layer["source-layer"]&&(sa.sourceLayer=sa.layer["source-layer"]),sa.state=He});return br}function j(Ne,R){let ae=Ne.tileID,we=R.tileID;return ae.overscaledZ-we.overscaledZ||ae.canonical.y-we.canonical.y||ae.wrap-we.wrap||ae.canonical.x-we.canonical.x}function ee(Ne,R,ae){return t._(this,void 0,void 0,function*(){let we=Ne;if(Ne.url?we=(yield t.h(R.transformRequest(Ne.url,"Source"),ae)).data:yield i.frameAsync(ae),!we)return null;let Se=t.M(t.e(we,Ne),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in we&&we.vector_layers&&(Se.vectorLayerIds=we.vector_layers.map(Oe=>Oe.id)),Se})}class re{constructor(R,ae){R&&(ae?this.setSouthWest(R).setNorthEast(ae):Array.isArray(R)&&(R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1])))}setNorthEast(R){return this._ne=R instanceof t.N?new t.N(R.lng,R.lat):t.N.convert(R),this}setSouthWest(R){return this._sw=R instanceof t.N?new t.N(R.lng,R.lat):t.N.convert(R),this}extend(R){let ae=this._sw,we=this._ne,Se,Oe;if(R instanceof t.N)Se=R,Oe=R;else{if(!(R instanceof re))return Array.isArray(R)?R.length===4||R.every(Array.isArray)?this.extend(re.convert(R)):this.extend(t.N.convert(R)):R&&("lng"in R||"lon"in R)&&"lat"in R?this.extend(t.N.convert(R)):this;if(Se=R._sw,Oe=R._ne,!Se||!Oe)return this}return ae||we?(ae.lng=Math.min(Se.lng,ae.lng),ae.lat=Math.min(Se.lat,ae.lat),we.lng=Math.max(Oe.lng,we.lng),we.lat=Math.max(Oe.lat,we.lat)):(this._sw=new t.N(Se.lng,Se.lat),this._ne=new t.N(Oe.lng,Oe.lat)),this}getCenter(){return new t.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 t.N(this.getWest(),this.getNorth())}getSouthEast(){return new t.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(R){let{lng:ae,lat:we}=t.N.convert(R),Se=this._sw.lng<=ae&&ae<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Se=this._sw.lng>=ae&&ae>=this._ne.lng),this._sw.lat<=we&&we<=this._ne.lat&&Se}static convert(R){return R instanceof re?R:R&&new re(R)}static fromLngLat(R,ae=0){let we=360*ae/40075017,Se=we/Math.cos(Math.PI/180*R.lat);return new re(new t.N(R.lng-Se,R.lat-we),new t.N(R.lng+Se,R.lat+we))}adjustAntiMeridian(){let R=new t.N(this._sw.lng,this._sw.lat),ae=new t.N(this._ne.lng,this._ne.lat);return new re(R,R.lng>ae.lng?new t.N(ae.lng+360,ae.lat):ae)}}class ce{constructor(R,ae,we){this.bounds=re.convert(this.validateBounds(R)),this.minzoom=ae||0,this.maxzoom=we||24}validateBounds(R){return Array.isArray(R)&&R.length===4?[Math.max(-180,R[0]),Math.max(-90,R[1]),Math.min(180,R[2]),Math.min(90,R[3])]:[-180,-90,180,90]}contains(R){let ae=Math.pow(2,R.z),we=Math.floor(t.O(this.bounds.getWest())*ae),Se=Math.floor(t.Q(this.bounds.getNorth())*ae),Oe=Math.ceil(t.O(this.bounds.getEast())*ae),pt=Math.ceil(t.Q(this.bounds.getSouth())*ae);return R.x>=we&&R.x<Oe&&R.y>=Se&&R.y<pt}}class be extends t.E{constructor(R,ae,we,Se){if(super(),this.id=R,this.dispatcher=we,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.e(this,t.M(ae,["url","scheme","tileSize","promoteId"])),this._options=t.e({type:"vector"},ae),this._collectResourceTiming=ae.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Se)}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let R=yield ee(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),R&&(t.e(this,R),R.bounds&&(this.tileBounds=new ce(R.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(R){this._tileJSONRequest=null,this.fire(new t.j(R))}})}loaded(){return this._loaded}hasTile(R){return!this.tileBounds||this.tileBounds.contains(R.canonical)}onAdd(R){this.map=R,this.load()}setSourceProperty(R){this._tileJSONRequest&&this._tileJSONRequest.abort(),R(),this.load()}setTiles(R){return this.setSourceProperty(()=>{this._options.tiles=R}),this}setUrl(R){return this.setSourceProperty(()=>{this.url=R,this._options.url=R}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(R){return t._(this,void 0,void 0,function*(){let ae=R.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),we={request:this.map._requestManager.transformRequest(ae,"Tile"),uid:R.uid,tileID:R.tileID,zoom:R.tileID.overscaledZ,tileSize:this.tileSize*R.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};we.request.collectResourceTiming=this._collectResourceTiming;let Se="RT";if(R.actor&&R.state!=="expired"){if(R.state==="loading")return new Promise((Oe,pt)=>{R.reloadPromise={resolve:Oe,reject:pt}})}else R.actor=this.dispatcher.getActor(),Se="LT";R.abortController=new AbortController;try{let Oe=yield R.actor.sendAsync({type:Se,data:we},R.abortController);if(delete R.abortController,R.aborted)return;this._afterTileLoadWorkerResponse(R,Oe)}catch(Oe){if(delete R.abortController,R.aborted)return;if(Oe&&Oe.status!==404)throw Oe;this._afterTileLoadWorkerResponse(R,null)}})}_afterTileLoadWorkerResponse(R,ae){if(ae&&ae.resourceTiming&&(R.resourceTiming=ae.resourceTiming),ae&&this.map._refreshExpiredTiles&&R.setExpiryData(ae),R.loadVectorData(ae,this.map.painter),R.reloadPromise){let we=R.reloadPromise;R.reloadPromise=null,this.loadTile(R).then(we.resolve).catch(we.reject)}}abortTile(R){return t._(this,void 0,void 0,function*(){R.abortController&&(R.abortController.abort(),delete R.abortController),R.actor&&(yield R.actor.sendAsync({type:"AT",data:{uid:R.uid,type:this.type,source:this.id}}))})}unloadTile(R){return t._(this,void 0,void 0,function*(){R.unloadVectorData(),R.actor&&(yield R.actor.sendAsync({type:"RMT",data:{uid:R.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Ae extends t.E{constructor(R,ae,we,Se){super(),this.id=R,this.dispatcher=we,this.setEventedParent(Se),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},ae),t.e(this,t.M(ae,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let R=yield ee(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,R&&(t.e(this,R),R.bounds&&(this.tileBounds=new ce(R.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(R){this._tileJSONRequest=null,this.fire(new t.j(R))}})}loaded(){return this._loaded}onAdd(R){this.map=R,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(R){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),R(),this.load()}setTiles(R){return this.setSourceProperty(()=>{this._options.tiles=R}),this}setUrl(R){return this.setSourceProperty(()=>{this.url=R,this._options.url=R}),this}serialize(){return t.e({},this._options)}hasTile(R){return!this.tileBounds||this.tileBounds.contains(R.canonical)}loadTile(R){return t._(this,void 0,void 0,function*(){let ae=R.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);R.abortController=new AbortController;try{let we=yield l.getImage(this.map._requestManager.transformRequest(ae,"Tile"),R.abortController,this.map._refreshExpiredTiles);if(delete R.abortController,R.aborted)return void(R.state="unloaded");if(we&&we.data){this.map._refreshExpiredTiles&&we.cacheControl&&we.expires&&R.setExpiryData({cacheControl:we.cacheControl,expires:we.expires});let Se=this.map.painter.context,Oe=Se.gl,pt=we.data;R.texture=this.map.painter.getTileTexture(pt.width),R.texture?R.texture.update(pt,{useMipmap:!0}):(R.texture=new u(Se,pt,Oe.RGBA,{useMipmap:!0}),R.texture.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE,Oe.LINEAR_MIPMAP_NEAREST)),R.state="loaded"}}catch(we){if(delete R.abortController,R.aborted)R.state="unloaded";else if(we)throw R.state="errored",we}})}abortTile(R){return t._(this,void 0,void 0,function*(){R.abortController&&(R.abortController.abort(),delete R.abortController)})}unloadTile(R){return t._(this,void 0,void 0,function*(){R.texture&&this.map.painter.saveTileTexture(R.texture)})}hasTransition(){return!1}}class ze extends Ae{constructor(R,ae,we,Se){super(R,ae,we,Se),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},ae),this.encoding=ae.encoding||"mapbox",this.redFactor=ae.redFactor,this.greenFactor=ae.greenFactor,this.blueFactor=ae.blueFactor,this.baseShift=ae.baseShift}loadTile(R){return t._(this,void 0,void 0,function*(){let ae=R.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),we=this.map._requestManager.transformRequest(ae,"Tile");R.neighboringTiles=this._getNeighboringTiles(R.tileID),R.abortController=new AbortController;try{let Se=yield l.getImage(we,R.abortController,this.map._refreshExpiredTiles);if(delete R.abortController,R.aborted)return void(R.state="unloaded");if(Se&&Se.data){let Oe=Se.data;this.map._refreshExpiredTiles&&Se.cacheControl&&Se.expires&&R.setExpiryData({cacheControl:Se.cacheControl,expires:Se.expires});let pt=t.b(Oe)&&t.U()?Oe:yield this.readImageNow(Oe),At={type:this.type,uid:R.uid,source:this.id,rawImageData:pt,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!R.actor||R.state==="expired"){R.actor=this.dispatcher.getActor();let Bt=yield R.actor.sendAsync({type:"LDT",data:At});R.dem=Bt,R.needsHillshadePrepare=!0,R.needsTerrainPrepare=!0,R.state="loaded"}}}catch(Se){if(delete R.abortController,R.aborted)R.state="unloaded";else if(Se)throw R.state="errored",Se}})}readImageNow(R){return t._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&t.V()){let ae=R.width+2,we=R.height+2;try{return new t.R({width:ae,height:we},yield t.W(R,-1,-1,ae,we))}catch{}}return i.getImageData(R,1)})}_getNeighboringTiles(R){let ae=R.canonical,we=Math.pow(2,ae.z),Se=(ae.x-1+we)%we,Oe=ae.x===0?R.wrap-1:R.wrap,pt=(ae.x+1+we)%we,At=ae.x+1===we?R.wrap+1:R.wrap,Bt={};return Bt[new t.S(R.overscaledZ,Oe,ae.z,Se,ae.y).key]={backfilled:!1},Bt[new t.S(R.overscaledZ,At,ae.z,pt,ae.y).key]={backfilled:!1},ae.y>0&&(Bt[new t.S(R.overscaledZ,Oe,ae.z,Se,ae.y-1).key]={backfilled:!1},Bt[new t.S(R.overscaledZ,R.wrap,ae.z,ae.x,ae.y-1).key]={backfilled:!1},Bt[new t.S(R.overscaledZ,At,ae.z,pt,ae.y-1).key]={backfilled:!1}),ae.y+1<we&&(Bt[new t.S(R.overscaledZ,Oe,ae.z,Se,ae.y+1).key]={backfilled:!1},Bt[new t.S(R.overscaledZ,R.wrap,ae.z,ae.x,ae.y+1).key]={backfilled:!1},Bt[new t.S(R.overscaledZ,At,ae.z,pt,ae.y+1).key]={backfilled:!1}),Bt}unloadTile(R){return t._(this,void 0,void 0,function*(){R.demTexture&&this.map.painter.saveTileTexture(R.demTexture),R.fbo&&(R.fbo.destroy(),delete R.fbo),R.dem&&delete R.dem,delete R.neighboringTiles,R.state="unloaded",R.actor&&(yield R.actor.sendAsync({type:"RDT",data:{type:this.type,uid:R.uid,source:this.id}}))})}}class Re extends t.E{constructor(R,ae,we,Se){super(),this.id=R,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=we.getActor(),this.setEventedParent(Se),this._data=ae.data,this._options=t.e({},ae),this._collectResourceTiming=ae.collectResourceTiming,ae.maxzoom!==void 0&&(this.maxzoom=ae.maxzoom),ae.type&&(this.type=ae.type),ae.attribution&&(this.attribution=ae.attribution),this.promoteId=ae.promoteId;let Oe=t.X/this.tileSize;ae.clusterMaxZoom!==void 0&&this.maxzoom<=ae.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${ae.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,cluster:ae.cluster||!1,geojsonVtOptions:{buffer:(ae.buffer!==void 0?ae.buffer:128)*Oe,tolerance:(ae.tolerance!==void 0?ae.tolerance:.375)*Oe,extent:t.X,maxZoom:this.maxzoom,lineMetrics:ae.lineMetrics||!1,generateId:ae.generateId||!1},superclusterOptions:{maxZoom:ae.clusterMaxZoom!==void 0?ae.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,ae.clusterMinPoints||2),extent:t.X,radius:(ae.clusterRadius||50)*Oe,log:!1,generateId:ae.generateId||!1},clusterProperties:ae.clusterProperties,filter:ae.filter},ae.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(R){this.map=R,this.load()}setData(R){return this._data=R,this._updateWorkerData(),this}updateData(R){return this._updateWorkerData(R),this}getData(){return t._(this,void 0,void 0,function*(){let R=t.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:R})})}setClusterOptions(R){return this.workerOptions.cluster=R.cluster,R&&(R.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=R.clusterRadius),R.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=R.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(R){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:R,source:this.id}})}getClusterChildren(R){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:R,source:this.id}})}getClusterLeaves(R,ae,we){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:R,limit:ae,offset:we}})}_updateWorkerData(R){return t._(this,void 0,void 0,function*(){let ae=t.e({type:this.type},this.workerOptions);R?ae.dataDiff=R:typeof this._data=="string"?(ae.request=this.map._requestManager.transformRequest(i.resolveURL(this._data),"Source"),ae.request.collectResourceTiming=this._collectResourceTiming):ae.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new t.k("dataloading",{dataType:"source"}));try{let we=yield this.actor.sendAsync({type:"LD",data:ae});if(this._pendingLoads--,this._removed||we.abandoned)return void this.fire(new t.k("dataabort",{dataType:"source"}));let Se=null;we.resourceTiming&&we.resourceTiming[this.id]&&(Se=we.resourceTiming[this.id].slice(0));let Oe={dataType:"source"};this._collectResourceTiming&&Se&&Se.length>0&&t.e(Oe,{resourceTiming:Se}),this.fire(new t.k("data",Object.assign(Object.assign({},Oe),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},Oe),{sourceDataType:"content"})))}catch(we){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(we))}})}loaded(){return this._pendingLoads===0}loadTile(R){return t._(this,void 0,void 0,function*(){let ae=R.actor?"RT":"LT";R.actor=this.actor;let we={type:this.type,uid:R.uid,tileID:R.tileID,zoom:R.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};R.abortController=new AbortController;let Se=yield this.actor.sendAsync({type:ae,data:we},R.abortController);delete R.abortController,R.unloadVectorData(),R.aborted||R.loadVectorData(Se,this.map.painter,ae==="RT")})}abortTile(R){return t._(this,void 0,void 0,function*(){R.abortController&&(R.abortController.abort(),delete R.abortController),R.aborted=!0})}unloadTile(R){return t._(this,void 0,void 0,function*(){R.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:R.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 t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Xe=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class it extends t.E{constructor(R,ae,we,Se){super(),this.id=R,this.dispatcher=we,this.coordinates=ae.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Se),this.options=ae}load(R){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let ae=yield l.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,ae&&ae.data&&(this.image=ae.data,R&&(this.coordinates=R),this._finishLoading())}catch(ae){this._request=null,this._loaded=!0,this.fire(new t.j(ae))}})}loaded(){return this._loaded}updateImage(R){return R.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=R.url,this.load(R.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(R){this.map=R,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(R){this.coordinates=R;let ae=R.map(t.Z.fromLngLat);this.tileID=function(Se){let Oe=1/0,pt=1/0,At=-1/0,Bt=-1/0;for(let Yr of Se)Oe=Math.min(Oe,Yr.x),pt=Math.min(pt,Yr.y),At=Math.max(At,Yr.x),Bt=Math.max(Bt,Yr.y);let $t=Math.max(At-Oe,Bt-pt),br=Math.max(0,Math.floor(-Math.log($t)/Math.LN2)),Ar=Math.pow(2,br);return new t.a1(br,Math.floor((Oe+At)/2*Ar),Math.floor((pt+Bt)/2*Ar))}(ae),this.minzoom=this.maxzoom=this.tileID.z;let we=ae.map(Se=>this.tileID.getTilePoint(Se)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(we[0].x,we[0].y,0,0),this._boundsArray.emplaceBack(we[1].x,we[1].y,t.X,0),this._boundsArray.emplaceBack(we[3].x,we[3].y,0,t.X),this._boundsArray.emplaceBack(we[2].x,we[2].y,t.X,t.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let R=this.map.painter.context,ae=R.gl;this.boundsBuffer||(this.boundsBuffer=R.createVertexBuffer(this._boundsArray,Xe.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new u(R,this.image,ae.RGBA),this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE));let we=!1;for(let Se in this.tiles){let Oe=this.tiles[Se];Oe.state!=="loaded"&&(Oe.state="loaded",Oe.texture=this.texture,we=!0)}we&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(R){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(R.tileID.canonical)?(this.tiles[String(R.tileID.wrap)]=R,R.buckets={}):R.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class ot extends it{constructor(R,ae,we,Se){super(R,ae,we,Se),this.roundZoom=!0,this.type="video",this.options=ae}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let R=this.options;this.urls=[];for(let ae of R.urls)this.urls.push(this.map._requestManager.transformRequest(ae,"Source").url);try{let ae=yield t.a3(this.urls);if(this._loaded=!0,!ae)return;this.video=ae,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(ae){this.fire(new t.j(ae))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(R){if(this.video){let ae=this.video.seekable;R<ae.start(0)||R>ae.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${ae.start(0)} and ${ae.end(0)}-second mark.`))):this.video.currentTime=R}}getVideo(){return this.video}onAdd(R){this.map||(this.map=R,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 R=this.map.painter.context,ae=R.gl;this.boundsBuffer||(this.boundsBuffer=R.createVertexBuffer(this._boundsArray,Xe.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),ae.texSubImage2D(ae.TEXTURE_2D,0,0,0,ae.RGBA,ae.UNSIGNED_BYTE,this.video)):(this.texture=new u(R,this.video,ae.RGBA),this.texture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE));let we=!1;for(let Se in this.tiles){let Oe=this.tiles[Se];Oe.state!=="loaded"&&(Oe.state="loaded",Oe.texture=this.texture,we=!0)}we&&this.fire(new t.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 tt extends it{constructor(R,ae,we,Se){super(R,ae,we,Se),ae.coordinates?Array.isArray(ae.coordinates)&&ae.coordinates.length===4&&!ae.coordinates.some(Oe=>!Array.isArray(Oe)||Oe.length!==2||Oe.some(pt=>typeof pt!="number"))||this.fire(new t.j(new t.a2(`sources.${R}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${R}`,null,'missing required property "coordinates"'))),ae.animate&&typeof ae.animate!="boolean"&&this.fire(new t.j(new t.a2(`sources.${R}`,null,'optional "animate" property must be a boolean value'))),ae.canvas?typeof ae.canvas=="string"||ae.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${R}`,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 t.j(new t.a2(`sources.${R}`,null,'missing required property "canvas"'))),this.options=ae,this.animate=ae.animate===void 0||ae.animate}load(){return t._(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 t.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(R){this.map=R,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let R=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,R=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,R=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let ae=this.map.painter.context,we=ae.gl;this.boundsBuffer||(this.boundsBuffer=ae.createVertexBuffer(this._boundsArray,Xe.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(R||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new u(ae,this.canvas,we.RGBA,{premultiply:!0});let Se=!1;for(let Oe in this.tiles){let pt=this.tiles[Oe];pt.state!=="loaded"&&(pt.state="loaded",pt.texture=this.texture,Se=!0)}Se&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let R of[this.canvas.width,this.canvas.height])if(isNaN(R)||R<=0)return!0;return!1}}let lt={},Ee=Ne=>{switch(Ne){case"geojson":return Re;case"image":return it;case"raster":return Ae;case"raster-dem":return ze;case"vector":return be;case"video":return ot;case"canvas":return tt}return lt[Ne]},_e="RTLPluginLoaded";class fe extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=X()}_syncState(R){return this.status=R,this.dispatcher.broadcast("SRPS",{pluginStatus:R,pluginURL:this.url}).catch(ae=>{throw this.status="error",ae})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(R){return t._(this,arguments,void 0,function*(ae,we=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=i.resolveURL(ae),!this.url)throw new Error(`requested url ${ae} is invalid`);if(this.status==="unavailable"){if(!we)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.k(_e))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Fe=null;function rt(){return Fe||(Fe=new fe),Fe}class st{constructor(R,ae){this.timeAdded=0,this.fadeEndTime=0,this.tileID=R,this.uid=t.a4(),this.uses=0,this.tileSize=ae,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(R){let ae=R+this.timeAdded;ae<this.fadeEndTime||(this.fadeEndTime=ae)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(R){this.demTexture&&R.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(R,ae,we){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",R){R.featureIndex&&(this.latestFeatureIndex=R.featureIndex,R.rawTileData?(this.latestRawTileData=R.rawTileData,this.latestFeatureIndex.rawTileData=R.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=R.collisionBoxArray,this.buckets=function(Se,Oe){let pt={};if(!Oe)return pt;for(let At of Se){let Bt=At.layerIds.map($t=>Oe.getLayer($t)).filter(Boolean);if(Bt.length!==0){At.layers=Bt,At.stateDependentLayerIds&&(At.stateDependentLayers=At.stateDependentLayerIds.map($t=>Bt.filter(br=>br.id===$t)[0]));for(let $t of Bt)pt[$t.id]=At}}return pt}(R.buckets,ae.style),this.hasSymbolBuckets=!1;for(let Se in this.buckets){let Oe=this.buckets[Se];if(Oe instanceof t.a6){if(this.hasSymbolBuckets=!0,!we)break;Oe.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let Se in this.buckets){let Oe=this.buckets[Se];if(Oe instanceof t.a6&&Oe.hasRTLText){this.hasRTLText=!0,rt().lazyLoad();break}}this.queryPadding=0;for(let Se in this.buckets){let Oe=this.buckets[Se];this.queryPadding=Math.max(this.queryPadding,ae.style.getLayer(Se).queryRadius(Oe))}R.imageAtlas&&(this.imageAtlas=R.imageAtlas),R.glyphAtlasImage&&(this.glyphAtlasImage=R.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let R in this.buckets)this.buckets[R].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(R){return this.buckets[R.id]}upload(R){for(let we in this.buckets){let Se=this.buckets[we];Se.uploadPending()&&Se.upload(R)}let ae=R.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new u(R,this.imageAtlas.image,ae.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new u(R,this.glyphAtlasImage,ae.ALPHA),this.glyphAtlasImage=null)}prepare(R){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(R,this.imageAtlasTexture)}queryRenderedFeatures(R,ae,we,Se,Oe,pt,At,Bt,$t,br){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Se,cameraQueryGeometry:Oe,scale:pt,tileSize:this.tileSize,pixelPosMatrix:br,transform:Bt,params:At,queryPadding:this.queryPadding*$t},R,ae,we):{}}querySourceFeatures(R,ae){let we=this.latestFeatureIndex;if(!we||!we.rawTileData)return;let Se=we.loadVTLayers(),Oe=ae&&ae.sourceLayer?ae.sourceLayer:"",pt=Se._geojsonTileLayer||Se[Oe];if(!pt)return;let At=t.a7(ae&&ae.filter),{z:Bt,x:$t,y:br}=this.tileID.canonical,Ar={z:Bt,x:$t,y:br};for(let Yr=0;Yr<pt.length;Yr++){let sa=pt.feature(Yr);if(At.needGeometry){let ut=t.a8(sa,!0);if(!At.filter(new t.z(this.tileID.overscaledZ),ut,this.tileID.canonical))continue}else if(!At.filter(new t.z(this.tileID.overscaledZ),sa))continue;let He=we.getId(sa,Oe),Je=new t.a9(sa,Bt,$t,br,He);Je.tile=Ar,R.push(Je)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(R){let ae=this.expirationTime;if(R.cacheControl){let we=t.aa(R.cacheControl);we["max-age"]&&(this.expirationTime=Date.now()+1e3*we["max-age"])}else R.expires&&(this.expirationTime=new Date(R.expires).getTime());if(this.expirationTime){let we=Date.now(),Se=!1;if(this.expirationTime>we)Se=!1;else if(ae)if(this.expirationTime<ae)Se=!0;else{let Oe=this.expirationTime-ae;Oe?this.expirationTime=we+Math.max(Oe,3e4):Se=!0}else Se=!0;Se?(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(R,ae){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(R).length===0)return;let we=this.latestFeatureIndex.loadVTLayers();for(let Se in this.buckets){if(!ae.style.hasLayer(Se))continue;let Oe=this.buckets[Se],pt=Oe.layers[0].sourceLayer||"_geojsonTileLayer",At=we[pt],Bt=R[pt];if(!At||!Bt||Object.keys(Bt).length===0)continue;Oe.update(Bt,At,this.imageAtlas&&this.imageAtlas.patternPositions||{});let $t=ae&&ae.style&&ae.style.getLayer(Se);$t&&(this.queryPadding=Math.max(this.queryPadding,$t.queryRadius(Oe)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<i.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(R){this.symbolFadeHoldUntil=i.now()+R}setDependencies(R,ae){let we={};for(let Se of ae)we[Se]=!0;this.dependencies[R]=we}hasDependency(R,ae){for(let we of R){let Se=this.dependencies[we];if(Se){for(let Oe of ae)if(Se[Oe])return!0}}return!1}}class Qe{constructor(R,ae){this.max=R,this.onRemove=ae,this.reset()}reset(){for(let R in this.data)for(let ae of this.data[R])ae.timeout&&clearTimeout(ae.timeout),this.onRemove(ae.value);return this.data={},this.order=[],this}add(R,ae,we){let Se=R.wrapped().key;this.data[Se]===void 0&&(this.data[Se]=[]);let Oe={value:ae,timeout:void 0};if(we!==void 0&&(Oe.timeout=setTimeout(()=>{this.remove(R,Oe)},we)),this.data[Se].push(Oe),this.order.push(Se),this.order.length>this.max){let pt=this._getAndRemoveByKey(this.order[0]);pt&&this.onRemove(pt)}return this}has(R){return R.wrapped().key in this.data}getAndRemove(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null}_getAndRemoveByKey(R){let ae=this.data[R].shift();return ae.timeout&&clearTimeout(ae.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),ae.value}getByKey(R){let ae=this.data[R];return ae?ae[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,ae){if(!this.has(R))return this;let we=R.wrapped().key,Se=ae===void 0?0:this.data[we].indexOf(ae),Oe=this.data[we][Se];return this.data[we].splice(Se,1),Oe.timeout&&clearTimeout(Oe.timeout),this.data[we].length===0&&delete this.data[we],this.onRemove(Oe.value),this.order.splice(this.order.indexOf(we),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let ae=this._getAndRemoveByKey(this.order[0]);ae&&this.onRemove(ae)}return this}filter(R){let ae=[];for(let we in this.data)for(let Se of this.data[we])R(Se.value)||ae.push(Se);for(let we of ae)this.remove(we.value.tileID,we)}}class Lt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(R,ae,we){let Se=String(ae);if(this.stateChanges[R]=this.stateChanges[R]||{},this.stateChanges[R][Se]=this.stateChanges[R][Se]||{},t.e(this.stateChanges[R][Se],we),this.deletedStates[R]===null){this.deletedStates[R]={};for(let Oe in this.state[R])Oe!==Se&&(this.deletedStates[R][Oe]=null)}else if(this.deletedStates[R]&&this.deletedStates[R][Se]===null){this.deletedStates[R][Se]={};for(let Oe in this.state[R][Se])we[Oe]||(this.deletedStates[R][Se][Oe]=null)}else for(let Oe in we)this.deletedStates[R]&&this.deletedStates[R][Se]&&this.deletedStates[R][Se][Oe]===null&&delete this.deletedStates[R][Se][Oe]}removeFeatureState(R,ae,we){if(this.deletedStates[R]===null)return;let Se=String(ae);if(this.deletedStates[R]=this.deletedStates[R]||{},we&&ae!==void 0)this.deletedStates[R][Se]!==null&&(this.deletedStates[R][Se]=this.deletedStates[R][Se]||{},this.deletedStates[R][Se][we]=null);else if(ae!==void 0)if(this.stateChanges[R]&&this.stateChanges[R][Se])for(we in this.deletedStates[R][Se]={},this.stateChanges[R][Se])this.deletedStates[R][Se][we]=null;else this.deletedStates[R][Se]=null;else this.deletedStates[R]=null}getState(R,ae){let we=String(ae),Se=t.e({},(this.state[R]||{})[we],(this.stateChanges[R]||{})[we]);if(this.deletedStates[R]===null)return{};if(this.deletedStates[R]){let Oe=this.deletedStates[R][ae];if(Oe===null)return{};for(let pt in Oe)delete Se[pt]}return Se}initializeTileState(R,ae){R.setFeatureState(this.state,ae)}coalesceChanges(R,ae){let we={};for(let Se in this.stateChanges){this.state[Se]=this.state[Se]||{};let Oe={};for(let pt in this.stateChanges[Se])this.state[Se][pt]||(this.state[Se][pt]={}),t.e(this.state[Se][pt],this.stateChanges[Se][pt]),Oe[pt]=this.state[Se][pt];we[Se]=Oe}for(let Se in this.deletedStates){this.state[Se]=this.state[Se]||{};let Oe={};if(this.deletedStates[Se]===null)for(let pt in this.state[Se])Oe[pt]={},this.state[Se][pt]={};else for(let pt in this.deletedStates[Se]){if(this.deletedStates[Se][pt]===null)this.state[Se][pt]={};else for(let At of Object.keys(this.deletedStates[Se][pt]))delete this.state[Se][pt][At];Oe[pt]=this.state[Se][pt]}we[Se]=we[Se]||{},t.e(we[Se],Oe)}if(this.stateChanges={},this.deletedStates={},Object.keys(we).length!==0)for(let Se in R)R[Se].setFeatureState(we,ae)}}class kt extends t.E{constructor(R,ae,we){super(),this.id=R,this.dispatcher=we,this.on("data",Se=>this._dataHandler(Se)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Se,Oe,pt,At)=>{let Bt=new(Ee(Oe.type))(Se,Oe,pt,At);if(Bt.id!==Se)throw new Error(`Expected Source id to be ${Se} instead of ${Bt.id}`);return Bt})(R,ae,we,this),this._tiles={},this._cache=new Qe(0,Se=>this._unloadTile(Se)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Lt,this._didEmitContent=!1,this._updated=!1}onAdd(R){this.map=R,this._maxTileCacheSize=R?R._maxTileCacheSize:null,this._maxTileCacheZoomLevels=R?R._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(R)}onRemove(R){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(R)}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 R in this._tiles){let ae=this._tiles[R];if(ae.state!=="loaded"&&ae.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let R=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,R&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(R,ae,we){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(R),this._tileLoaded(R,ae,we)}catch(Se){R.state="errored",Se.status!==404?this._source.fire(new t.j(Se,{tile:R})):this.update(this.transform,this.terrain)}})}_unloadTile(R){this._source.unloadTile&&this._source.unloadTile(R)}_abortTile(R){this._source.abortTile&&this._source.abortTile(R),this._source.fire(new t.k("dataabort",{tile:R,coord:R.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(R){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let ae in this._tiles){let we=this._tiles[ae];we.upload(R),we.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(R=>R.tileID).sort(Vt).map(R=>R.key)}getRenderableIds(R){let ae=[];for(let we in this._tiles)this._isIdRenderable(we,R)&&ae.push(this._tiles[we]);return R?ae.sort((we,Se)=>{let Oe=we.tileID,pt=Se.tileID,At=new t.P(Oe.canonical.x,Oe.canonical.y)._rotate(this.transform.angle),Bt=new t.P(pt.canonical.x,pt.canonical.y)._rotate(this.transform.angle);return Oe.overscaledZ-pt.overscaledZ||Bt.y-At.y||Bt.x-At.x}).map(we=>we.tileID.key):ae.map(we=>we.tileID).sort(Vt).map(we=>we.key)}hasRenderableParent(R){let ae=this.findLoadedParent(R,0);return!!ae&&this._isIdRenderable(ae.tileID.key)}_isIdRenderable(R,ae){return this._tiles[R]&&this._tiles[R].hasData()&&!this._coveredTiles[R]&&(ae||!this._tiles[R].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let R in this._tiles)this._tiles[R].state!=="errored"&&this._reloadTile(R,"reloading")}}_reloadTile(R,ae){return t._(this,void 0,void 0,function*(){let we=this._tiles[R];we&&(we.state!=="loading"&&(we.state=ae),yield this._loadTile(we,R,ae))})}_tileLoaded(R,ae,we){R.timeAdded=i.now(),we==="expired"&&(R.refreshedUponExpiration=!0),this._setTileReloadTimer(ae,R),this.getSource().type==="raster-dem"&&R.dem&&this._backfillDEM(R),this._state.initializeTileState(R,this.map?this.map.painter:null),R.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:R,coord:R.tileID}))}_backfillDEM(R){let ae=this.getRenderableIds();for(let Se=0;Se<ae.length;Se++){let Oe=ae[Se];if(R.neighboringTiles&&R.neighboringTiles[Oe]){let pt=this.getTileByID(Oe);we(R,pt),we(pt,R)}}function we(Se,Oe){Se.needsHillshadePrepare=!0,Se.needsTerrainPrepare=!0;let pt=Oe.tileID.canonical.x-Se.tileID.canonical.x,At=Oe.tileID.canonical.y-Se.tileID.canonical.y,Bt=Math.pow(2,Se.tileID.canonical.z),$t=Oe.tileID.key;pt===0&&At===0||Math.abs(At)>1||(Math.abs(pt)>1&&(Math.abs(pt+Bt)===1?pt+=Bt:Math.abs(pt-Bt)===1&&(pt-=Bt)),Oe.dem&&Se.dem&&(Se.dem.backfillBorder(Oe.dem,pt,At),Se.neighboringTiles&&Se.neighboringTiles[$t]&&(Se.neighboringTiles[$t].backfilled=!0)))}}getTile(R){return this.getTileByID(R.key)}getTileByID(R){return this._tiles[R]}_retainLoadedChildren(R,ae,we,Se){for(let Oe in this._tiles){let pt=this._tiles[Oe];if(Se[Oe]||!pt.hasData()||pt.tileID.overscaledZ<=ae||pt.tileID.overscaledZ>we)continue;let At=pt.tileID;for(;pt&&pt.tileID.overscaledZ>ae+1;){let $t=pt.tileID.scaledTo(pt.tileID.overscaledZ-1);pt=this._tiles[$t.key],pt&&pt.hasData()&&(At=$t)}let Bt=At;for(;Bt.overscaledZ>ae;)if(Bt=Bt.scaledTo(Bt.overscaledZ-1),R[Bt.key]){Se[At.key]=At;break}}}findLoadedParent(R,ae){if(R.key in this._loadedParentTiles){let we=this._loadedParentTiles[R.key];return we&&we.tileID.overscaledZ>=ae?we:null}for(let we=R.overscaledZ-1;we>=ae;we--){let Se=R.scaledTo(we),Oe=this._getLoadedTile(Se);if(Oe)return Oe}}findLoadedSibling(R){return this._getLoadedTile(R)}_getLoadedTile(R){let ae=this._tiles[R.key];return ae&&ae.hasData()?ae:this._cache.getByKey(R.wrapped().key)}updateCacheSize(R){let ae=Math.ceil(R.width/this._source.tileSize)+1,we=Math.ceil(R.height/this._source.tileSize)+1,Se=Math.floor(ae*we*(this._maxTileCacheZoomLevels===null?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Oe=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Se):Se;this._cache.setMaxSize(Oe)}handleWrapJump(R){let ae=Math.round((R-(this._prevLng===void 0?R:this._prevLng))/360);if(this._prevLng=R,ae){let we={};for(let Se in this._tiles){let Oe=this._tiles[Se];Oe.tileID=Oe.tileID.unwrapTo(Oe.tileID.wrap+ae),we[Oe.tileID.key]=Oe}this._tiles=we;for(let Se in this._timers)clearTimeout(this._timers[Se]),delete this._timers[Se];for(let Se in this._tiles)this._setTileReloadTimer(Se,this._tiles[Se])}}_updateCoveredAndRetainedTiles(R,ae,we,Se,Oe,pt){let At={},Bt={},$t=Object.keys(R),br=i.now();for(let Ar of $t){let Yr=R[Ar],sa=this._tiles[Ar];if(!sa||sa.fadeEndTime!==0&&sa.fadeEndTime<=br)continue;let He=this.findLoadedParent(Yr,ae),Je=this.findLoadedSibling(Yr),ut=He||Je||null;ut&&(this._addTile(ut.tileID),At[ut.tileID.key]=ut.tileID),Bt[Ar]=Yr}this._retainLoadedChildren(Bt,Se,we,R);for(let Ar in At)R[Ar]||(this._coveredTiles[Ar]=!0,R[Ar]=At[Ar]);if(pt){let Ar={},Yr={};for(let sa of Oe)this._tiles[sa.key].hasData()?Ar[sa.key]=sa:Yr[sa.key]=sa;for(let sa in Yr){let He=Yr[sa].children(this._source.maxzoom);this._tiles[He[0].key]&&this._tiles[He[1].key]&&this._tiles[He[2].key]&&this._tiles[He[3].key]&&(Ar[He[0].key]=R[He[0].key]=He[0],Ar[He[1].key]=R[He[1].key]=He[1],Ar[He[2].key]=R[He[2].key]=He[2],Ar[He[3].key]=R[He[3].key]=He[3],delete Yr[sa])}for(let sa in Yr){let He=Yr[sa],Je=this.findLoadedParent(He,this._source.minzoom),ut=this.findLoadedSibling(He),dt=Je||ut||null;if(dt){Ar[dt.tileID.key]=R[dt.tileID.key]=dt.tileID;for(let Ct in Ar)Ar[Ct].isChildOf(dt.tileID)&&delete Ar[Ct]}}for(let sa in this._tiles)Ar[sa]||(this._coveredTiles[sa]=!0)}}update(R,ae){if(!this._sourceLoaded||this._paused)return;let we;this.transform=R,this.terrain=ae,this.updateCacheSize(R),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?we=R.getVisibleUnwrappedCoordinates(this._source.tileID).map(br=>new t.S(br.canonical.z,br.wrap,br.canonical.z,br.canonical.x,br.canonical.y)):(we=R.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:ae}),this._source.hasTile&&(we=we.filter(br=>this._source.hasTile(br)))):we=[];let Se=R.coveringZoomLevel(this._source),Oe=Math.max(Se-kt.maxOverzooming,this._source.minzoom),pt=Math.max(Se+kt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let br={};for(let Ar of we)if(Ar.canonical.z>this._source.minzoom){let Yr=Ar.scaledTo(Ar.canonical.z-1);br[Yr.key]=Yr;let sa=Ar.scaledTo(Math.max(this._source.minzoom,Math.min(Ar.canonical.z,5)));br[sa.key]=sa}we=we.concat(Object.values(br))}let At=we.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,At&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Bt=this._updateRetainedTiles(we,Se);Zt(this._source.type)&&this._updateCoveredAndRetainedTiles(Bt,Oe,pt,Se,we,ae);for(let br in Bt)this._tiles[br].clearFadeHold();let $t=t.ab(this._tiles,Bt);for(let br of $t){let Ar=this._tiles[br];Ar.hasSymbolBuckets&&!Ar.holdingForFade()?Ar.setHoldDuration(this.map._fadeDuration):Ar.hasSymbolBuckets&&!Ar.symbolFadeFinished()||this._removeTile(br)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let R in this._tiles)this._tiles[R].holdingForFade()&&this._removeTile(R)}_updateRetainedTiles(R,ae){var we;let Se={},Oe={},pt=Math.max(ae-kt.maxOverzooming,this._source.minzoom),At=Math.max(ae+kt.maxUnderzooming,this._source.minzoom),Bt={};for(let $t of R){let br=this._addTile($t);Se[$t.key]=$t,br.hasData()||ae<this._source.maxzoom&&(Bt[$t.key]=$t)}this._retainLoadedChildren(Bt,ae,At,Se);for(let $t of R){let br=this._tiles[$t.key];if(br.hasData())continue;if(ae+1>this._source.maxzoom){let Yr=$t.children(this._source.maxzoom)[0],sa=this.getTile(Yr);if(sa&&sa.hasData()){Se[Yr.key]=Yr;continue}}else{let Yr=$t.children(this._source.maxzoom);if(Se[Yr[0].key]&&Se[Yr[1].key]&&Se[Yr[2].key]&&Se[Yr[3].key])continue}let Ar=br.wasRequested();for(let Yr=$t.overscaledZ-1;Yr>=pt;--Yr){let sa=$t.scaledTo(Yr);if(Oe[sa.key])break;if(Oe[sa.key]=!0,br=this.getTile(sa),!br&&Ar&&(br=this._addTile(sa)),br){let He=br.hasData();if((He||!(!((we=this.map)===null||we===void 0)&&we.cancelPendingTileRequestsWhileZooming)||Ar)&&(Se[sa.key]=sa),Ar=br.wasRequested(),He)break}}}return Se}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let R in this._tiles){let ae=[],we,Se=this._tiles[R].tileID;for(;Se.overscaledZ>0;){if(Se.key in this._loadedParentTiles){we=this._loadedParentTiles[Se.key];break}ae.push(Se.key);let Oe=Se.scaledTo(Se.overscaledZ-1);if(we=this._getLoadedTile(Oe),we)break;Se=Oe}for(let Oe of ae)this._loadedParentTiles[Oe]=we}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let R in this._tiles){let ae=this._tiles[R].tileID,we=this._getLoadedTile(ae);this._loadedSiblingTiles[ae.key]=we}}_addTile(R){let ae=this._tiles[R.key];if(ae)return ae;ae=this._cache.getAndRemove(R),ae&&(this._setTileReloadTimer(R.key,ae),ae.tileID=R,this._state.initializeTileState(ae,this.map?this.map.painter:null),this._cacheTimers[R.key]&&(clearTimeout(this._cacheTimers[R.key]),delete this._cacheTimers[R.key],this._setTileReloadTimer(R.key,ae)));let we=ae;return ae||(ae=new st(R,this._source.tileSize*R.overscaleFactor()),this._loadTile(ae,R.key,ae.state)),ae.uses++,this._tiles[R.key]=ae,we||this._source.fire(new t.k("dataloading",{tile:ae,coord:ae.tileID,dataType:"source"})),ae}_setTileReloadTimer(R,ae){R in this._timers&&(clearTimeout(this._timers[R]),delete this._timers[R]);let we=ae.getExpiryTimeout();we&&(this._timers[R]=setTimeout(()=>{this._reloadTile(R,"expired"),delete this._timers[R]},we))}_removeTile(R){let ae=this._tiles[R];ae&&(ae.uses--,delete this._tiles[R],this._timers[R]&&(clearTimeout(this._timers[R]),delete this._timers[R]),ae.uses>0||(ae.hasData()&&ae.state!=="reloading"?this._cache.add(ae.tileID,ae,ae.getExpiryTimeout()):(ae.aborted=!0,this._abortTile(ae),this._unloadTile(ae))))}_dataHandler(R){let ae=R.sourceDataType;R.dataType==="source"&&ae==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&R.dataType==="source"&&ae==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let R in this._tiles)this._removeTile(R);this._cache.reset()}tilesIn(R,ae,we){let Se=[],Oe=this.transform;if(!Oe)return Se;let pt=we?Oe.getCameraQueryGeometry(R):R,At=R.map(He=>Oe.pointCoordinate(He,this.terrain)),Bt=pt.map(He=>Oe.pointCoordinate(He,this.terrain)),$t=this.getIds(),br=1/0,Ar=1/0,Yr=-1/0,sa=-1/0;for(let He of Bt)br=Math.min(br,He.x),Ar=Math.min(Ar,He.y),Yr=Math.max(Yr,He.x),sa=Math.max(sa,He.y);for(let He=0;He<$t.length;He++){let Je=this._tiles[$t[He]];if(Je.holdingForFade())continue;let ut=Je.tileID,dt=Math.pow(2,Oe.zoom-Je.tileID.overscaledZ),Ct=ae*Je.queryPadding*t.X/Je.tileSize/dt,wt=[ut.getTilePoint(new t.Z(br,Ar)),ut.getTilePoint(new t.Z(Yr,sa))];if(wt[0].x-Ct<t.X&&wt[0].y-Ct<t.X&&wt[1].x+Ct>=0&&wt[1].y+Ct>=0){let Dt=At.map(mr=>ut.getTilePoint(mr)),ur=Bt.map(mr=>ut.getTilePoint(mr));Se.push({tile:Je,tileID:ut,queryGeometry:Dt,cameraQueryGeometry:ur,scale:dt})}}return Se}getVisibleCoordinates(R){let ae=this.getRenderableIds(R).map(we=>this._tiles[we].tileID);for(let we of ae)we.posMatrix=this.transform.calculatePosMatrix(we.toUnwrapped());return ae}hasTransition(){if(this._source.hasTransition())return!0;if(Zt(this._source.type)){let R=i.now();for(let ae in this._tiles)if(this._tiles[ae].fadeEndTime>=R)return!0}return!1}setFeatureState(R,ae,we){this._state.updateState(R=R||"_geojsonTileLayer",ae,we)}removeFeatureState(R,ae,we){this._state.removeFeatureState(R=R||"_geojsonTileLayer",ae,we)}getFeatureState(R,ae){return this._state.getState(R=R||"_geojsonTileLayer",ae)}setDependencies(R,ae,we){let Se=this._tiles[R];Se&&Se.setDependencies(ae,we)}reloadTilesForDependencies(R,ae){for(let we in this._tiles)this._tiles[we].hasDependency(R,ae)&&this._reloadTile(we,"reloading");this._cache.filter(we=>!we.hasDependency(R,ae))}}function Vt(Ne,R){let ae=Math.abs(2*Ne.wrap)-+(Ne.wrap<0),we=Math.abs(2*R.wrap)-+(R.wrap<0);return Ne.overscaledZ-R.overscaledZ||we-ae||R.canonical.y-Ne.canonical.y||R.canonical.x-Ne.canonical.x}function Zt(Ne){return Ne==="raster"||Ne==="image"||Ne==="video"}kt.maxOverzooming=10,kt.maxUnderzooming=3;class Sr{constructor(R,ae){this.reset(R,ae)}reset(R,ae){this.points=R||[],this._distances=[0];for(let we=1;we<this.points.length;we++)this._distances[we]=this._distances[we-1]+this.points[we].dist(this.points[we-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(ae||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(R){if(this.points.length===1)return this.points[0];R=t.ac(R,0,1);let ae=1,we=this._distances[ae],Se=R*this.paddedLength+this.padding;for(;we<Se&&ae<this._distances.length;)we=this._distances[++ae];let Oe=ae-1,pt=this._distances[Oe],At=we-pt,Bt=At>0?(Se-pt)/At:0;return this.points[Oe].mult(1-Bt).add(this.points[ae].mult(Bt))}}function xr(Ne,R){let ae=!0;return Ne==="always"||Ne!=="never"&&R!=="never"||(ae=!1),ae}class jr{constructor(R,ae,we){let Se=this.boxCells=[],Oe=this.circleCells=[];this.xCellCount=Math.ceil(R/we),this.yCellCount=Math.ceil(ae/we);for(let pt=0;pt<this.xCellCount*this.yCellCount;pt++)Se.push([]),Oe.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=R,this.height=ae,this.xScale=this.xCellCount/R,this.yScale=this.yCellCount/ae,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(R,ae,we,Se,Oe){this._forEachCell(ae,we,Se,Oe,this._insertBoxCell,this.boxUid++),this.boxKeys.push(R),this.bboxes.push(ae),this.bboxes.push(we),this.bboxes.push(Se),this.bboxes.push(Oe)}insertCircle(R,ae,we,Se){this._forEachCell(ae-Se,we-Se,ae+Se,we+Se,this._insertCircleCell,this.circleUid++),this.circleKeys.push(R),this.circles.push(ae),this.circles.push(we),this.circles.push(Se)}_insertBoxCell(R,ae,we,Se,Oe,pt){this.boxCells[Oe].push(pt)}_insertCircleCell(R,ae,we,Se,Oe,pt){this.circleCells[Oe].push(pt)}_query(R,ae,we,Se,Oe,pt,At){if(we<0||R>this.width||Se<0||ae>this.height)return[];let Bt=[];if(R<=0&&ae<=0&&this.width<=we&&this.height<=Se){if(Oe)return[{key:null,x1:R,y1:ae,x2:we,y2:Se}];for(let $t=0;$t<this.boxKeys.length;$t++)Bt.push({key:this.boxKeys[$t],x1:this.bboxes[4*$t],y1:this.bboxes[4*$t+1],x2:this.bboxes[4*$t+2],y2:this.bboxes[4*$t+3]});for(let $t=0;$t<this.circleKeys.length;$t++){let br=this.circles[3*$t],Ar=this.circles[3*$t+1],Yr=this.circles[3*$t+2];Bt.push({key:this.circleKeys[$t],x1:br-Yr,y1:Ar-Yr,x2:br+Yr,y2:Ar+Yr})}}else this._forEachCell(R,ae,we,Se,this._queryCell,Bt,{hitTest:Oe,overlapMode:pt,seenUids:{box:{},circle:{}}},At);return Bt}query(R,ae,we,Se){return this._query(R,ae,we,Se,!1,null)}hitTest(R,ae,we,Se,Oe,pt){return this._query(R,ae,we,Se,!0,Oe,pt).length>0}hitTestCircle(R,ae,we,Se,Oe){let pt=R-we,At=R+we,Bt=ae-we,$t=ae+we;if(At<0||pt>this.width||$t<0||Bt>this.height)return!1;let br=[];return this._forEachCell(pt,Bt,At,$t,this._queryCellCircle,br,{hitTest:!0,overlapMode:Se,circle:{x:R,y:ae,radius:we},seenUids:{box:{},circle:{}}},Oe),br.length>0}_queryCell(R,ae,we,Se,Oe,pt,At,Bt){let{seenUids:$t,hitTest:br,overlapMode:Ar}=At,Yr=this.boxCells[Oe];if(Yr!==null){let He=this.bboxes;for(let Je of Yr)if(!$t.box[Je]){$t.box[Je]=!0;let ut=4*Je,dt=this.boxKeys[Je];if(R<=He[ut+2]&&ae<=He[ut+3]&&we>=He[ut+0]&&Se>=He[ut+1]&&(!Bt||Bt(dt))&&(!br||!xr(Ar,dt.overlapMode))&&(pt.push({key:dt,x1:He[ut],y1:He[ut+1],x2:He[ut+2],y2:He[ut+3]}),br))return!0}}let sa=this.circleCells[Oe];if(sa!==null){let He=this.circles;for(let Je of sa)if(!$t.circle[Je]){$t.circle[Je]=!0;let ut=3*Je,dt=this.circleKeys[Je];if(this._circleAndRectCollide(He[ut],He[ut+1],He[ut+2],R,ae,we,Se)&&(!Bt||Bt(dt))&&(!br||!xr(Ar,dt.overlapMode))){let Ct=He[ut],wt=He[ut+1],Dt=He[ut+2];if(pt.push({key:dt,x1:Ct-Dt,y1:wt-Dt,x2:Ct+Dt,y2:wt+Dt}),br)return!0}}}return!1}_queryCellCircle(R,ae,we,Se,Oe,pt,At,Bt){let{circle:$t,seenUids:br,overlapMode:Ar}=At,Yr=this.boxCells[Oe];if(Yr!==null){let He=this.bboxes;for(let Je of Yr)if(!br.box[Je]){br.box[Je]=!0;let ut=4*Je,dt=this.boxKeys[Je];if(this._circleAndRectCollide($t.x,$t.y,$t.radius,He[ut+0],He[ut+1],He[ut+2],He[ut+3])&&(!Bt||Bt(dt))&&!xr(Ar,dt.overlapMode))return pt.push(!0),!0}}let sa=this.circleCells[Oe];if(sa!==null){let He=this.circles;for(let Je of sa)if(!br.circle[Je]){br.circle[Je]=!0;let ut=3*Je,dt=this.circleKeys[Je];if(this._circlesCollide(He[ut],He[ut+1],He[ut+2],$t.x,$t.y,$t.radius)&&(!Bt||Bt(dt))&&!xr(Ar,dt.overlapMode))return pt.push(!0),!0}}}_forEachCell(R,ae,we,Se,Oe,pt,At,Bt){let $t=this._convertToXCellCoord(R),br=this._convertToYCellCoord(ae),Ar=this._convertToXCellCoord(we),Yr=this._convertToYCellCoord(Se);for(let sa=$t;sa<=Ar;sa++)for(let He=br;He<=Yr;He++)if(Oe.call(this,R,ae,we,Se,this.xCellCount*He+sa,pt,At,Bt))return}_convertToXCellCoord(R){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(R*this.xScale)))}_convertToYCellCoord(R){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(R*this.yScale)))}_circlesCollide(R,ae,we,Se,Oe,pt){let At=Se-R,Bt=Oe-ae,$t=we+pt;return $t*$t>At*At+Bt*Bt}_circleAndRectCollide(R,ae,we,Se,Oe,pt,At){let Bt=(pt-Se)/2,$t=Math.abs(R-(Se+Bt));if($t>Bt+we)return!1;let br=(At-Oe)/2,Ar=Math.abs(ae-(Oe+br));if(Ar>br+we)return!1;if($t<=Bt||Ar<=br)return!0;let Yr=$t-Bt,sa=Ar-br;return Yr*Yr+sa*sa<=we*we}}function wr(Ne,R,ae,we,Se){let Oe=t.H();return R?(t.K(Oe,Oe,[1/Se,1/Se,1]),ae||t.ad(Oe,Oe,we.angle)):t.L(Oe,we.labelPlaneMatrix,Ne),Oe}function Ir(Ne,R,ae,we,Se){if(R){let Oe=t.ae(Ne);return t.K(Oe,Oe,[Se,Se,1]),ae||t.ad(Oe,Oe,-we.angle),Oe}return we.glCoordMatrix}function bt(Ne,R,ae,we){let Se;we?(Se=[Ne,R,we(Ne,R),1],t.af(Se,Se,ae)):(Se=[Ne,R,0,1],Qt(Se,Se,ae));let Oe=Se[3];return{point:new t.P(Se[0]/Oe,Se[1]/Oe),signedDistanceFromCamera:Oe,isOccluded:!1}}function Be(Ne,R){return .5+Ne/R*.5}function Ke(Ne,R){return Ne.x>=-R[0]&&Ne.x<=R[0]&&Ne.y>=-R[1]&&Ne.y<=R[1]}function Ue(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa,He){let Je=we?Ne.textSizeData:Ne.iconSizeData,ut=t.ag(Je,ae.transform.zoom),dt=[256/ae.width*2+1,256/ae.height*2+1],Ct=we?Ne.text.dynamicLayoutVertexArray:Ne.icon.dynamicLayoutVertexArray;Ct.clear();let wt=Ne.lineVertexArray,Dt=we?Ne.text.placedSymbolArray:Ne.icon.placedSymbolArray,ur=ae.transform.width/ae.transform.height,mr=!1;for(let Er=0;Er<Dt.length;Er++){let Br=Dt.get(Er);if(Br.hidden||Br.writingMode===t.ah.vertical&&!mr){rr(Br.numGlyphs,Ct);continue}mr=!1;let Qr=bt(Br.anchorX,Br.anchorY,R,He);if(!Ke(Qr.point,dt)){rr(Br.numGlyphs,Ct);continue}let ga=Be(ae.transform.cameraToCenterDistance,Qr.signedDistanceFromCamera),Sa=t.ai(Je,ut,Br),Oa=pt?Sa/ga:Sa*ga,di={getElevation:He,labelPlaneMatrix:Se,lineVertexArray:wt,pitchWithMap:pt,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:$t,tileAnchorPoint:new t.P(Br.anchorX,Br.anchorY),unwrappedTileID:br,width:Ar,height:Yr,translation:sa},Wi=Ce(di,Br,Oa,!1,At,R,Oe,Ne.glyphOffsetArray,Ct,ur,Bt);mr=Wi.useVertical,(Wi.notEnoughRoom||mr||Wi.needsFlipping&&Ce(di,Br,Oa,!0,At,R,Oe,Ne.glyphOffsetArray,Ct,ur,Bt).notEnoughRoom)&&rr(Br.numGlyphs,Ct)}we?Ne.text.dynamicLayoutVertexBuffer.updateData(Ct):Ne.icon.dynamicLayoutVertexBuffer.updateData(Ct)}function Me(Ne,R,ae,we,Se,Oe,pt,At){let Bt=Oe.glyphStartIndex+Oe.numGlyphs,$t=Oe.lineStartIndex,br=Oe.lineStartIndex+Oe.lineLength,Ar=R.getoffsetX(Oe.glyphStartIndex),Yr=R.getoffsetX(Bt-1),sa=Ot(Ne*Ar,ae,we,Se,Oe.segment,$t,br,At,pt);if(!sa)return null;let He=Ot(Ne*Yr,ae,we,Se,Oe.segment,$t,br,At,pt);return He?At.projectionCache.anyProjectionOccluded?null:{first:sa,last:He}:null}function qe(Ne,R,ae,we){return Ne===t.ah.horizontal&&Math.abs(ae.y-R.y)>Math.abs(ae.x-R.x)*we?{useVertical:!0}:(Ne===t.ah.vertical?R.y<ae.y:R.x>ae.x)?{needsFlipping:!0}:null}function Ce(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br){let Ar=ae/24,Yr=R.lineOffsetX*Ar,sa=R.lineOffsetY*Ar,He;if(R.numGlyphs>1){let Je=R.glyphStartIndex+R.numGlyphs,ut=R.lineStartIndex,dt=R.lineStartIndex+R.lineLength,Ct=Me(Ar,At,Yr,sa,we,R,br,Ne);if(!Ct)return{notEnoughRoom:!0};let wt=bt(Ct.first.point.x,Ct.first.point.y,pt,Ne.getElevation).point,Dt=bt(Ct.last.point.x,Ct.last.point.y,pt,Ne.getElevation).point;if(Se&&!we){let ur=qe(R.writingMode,wt,Dt,$t);if(ur)return ur}He=[Ct.first];for(let ur=R.glyphStartIndex+1;ur<Je-1;ur++)He.push(Ot(Ar*At.getoffsetX(ur),Yr,sa,we,R.segment,ut,dt,Ne,br));He.push(Ct.last)}else{if(Se&&!we){let ut=bt(Ne.tileAnchorPoint.x,Ne.tileAnchorPoint.y,Oe,Ne.getElevation).point,dt=R.lineStartIndex+R.segment+1,Ct=new t.P(Ne.lineVertexArray.getx(dt),Ne.lineVertexArray.gety(dt)),wt=bt(Ct.x,Ct.y,Oe,Ne.getElevation),Dt=wt.signedDistanceFromCamera>0?wt.point:function(mr,Er,Br,Qr,ga,Sa){return Te(mr,Er,Br,1,ga,Sa)}(Ne.tileAnchorPoint,Ct,ut,0,Oe,Ne),ur=qe(R.writingMode,ut,Dt,$t);if(ur)return ur}let Je=Ot(Ar*At.getoffsetX(R.glyphStartIndex),Yr,sa,we,R.segment,R.lineStartIndex,R.lineStartIndex+R.lineLength,Ne,br);if(!Je||Ne.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};He=[Je]}for(let Je of He)t.aj(Bt,Je.point,Je.angle);return{}}function Te(Ne,R,ae,we,Se,Oe){let pt=Ne.add(Ne.sub(R)._unit()),At=Se!==void 0?bt(pt.x,pt.y,Se,Oe.getElevation).point:at(pt.x,pt.y,Oe).point,Bt=ae.sub(At);return ae.add(Bt._mult(we/Bt.mag()))}function Pe(Ne,R,ae){let we=R.projectionCache;if(we.projections[Ne])return we.projections[Ne];let Se=new t.P(R.lineVertexArray.getx(Ne),R.lineVertexArray.gety(Ne)),Oe=at(Se.x,Se.y,R);if(Oe.signedDistanceFromCamera>0)return we.projections[Ne]=Oe.point,we.anyProjectionOccluded=we.anyProjectionOccluded||Oe.isOccluded,Oe.point;let pt=Ne-ae.direction;return function(At,Bt,$t,br,Ar){return Te(At,Bt,$t,br,void 0,Ar)}(ae.distanceFromAnchor===0?R.tileAnchorPoint:new t.P(R.lineVertexArray.getx(pt),R.lineVertexArray.gety(pt)),Se,ae.previousVertex,ae.absOffsetX-ae.distanceFromAnchor+1,R)}function at(Ne,R,ae){let we=Ne+ae.translation[0],Se=R+ae.translation[1],Oe;return!ae.pitchWithMap&&ae.projection.useSpecialProjectionForSymbols?(Oe=ae.projection.projectTileCoordinates(we,Se,ae.unwrappedTileID,ae.getElevation),Oe.point.x=(.5*Oe.point.x+.5)*ae.width,Oe.point.y=(.5*-Oe.point.y+.5)*ae.height):(Oe=bt(we,Se,ae.labelPlaneMatrix,ae.getElevation),Oe.isOccluded=!1),Oe}function yt(Ne,R,ae){return Ne._unit()._perp()._mult(R*ae)}function Tt(Ne,R,ae,we,Se,Oe,pt,At,Bt){if(At.projectionCache.offsets[Ne])return At.projectionCache.offsets[Ne];let $t=ae.add(R);if(Ne+Bt.direction<we||Ne+Bt.direction>=Se)return At.projectionCache.offsets[Ne]=$t,$t;let br=Pe(Ne+Bt.direction,At,Bt),Ar=yt(br.sub(ae),pt,Bt.direction),Yr=ae.add(Ar),sa=br.add(Ar);return At.projectionCache.offsets[Ne]=t.ak(Oe,$t,Yr,sa)||$t,At.projectionCache.offsets[Ne]}function Ot(Ne,R,ae,we,Se,Oe,pt,At,Bt){let $t=we?Ne-R:Ne+R,br=$t>0?1:-1,Ar=0;we&&(br*=-1,Ar=Math.PI),br<0&&(Ar+=Math.PI);let Yr,sa=br>0?Oe+Se:Oe+Se+1;At.projectionCache.cachedAnchorPoint?Yr=At.projectionCache.cachedAnchorPoint:(Yr=at(At.tileAnchorPoint.x,At.tileAnchorPoint.y,At).point,At.projectionCache.cachedAnchorPoint=Yr);let He,Je,ut=Yr,dt=Yr,Ct=0,wt=0,Dt=Math.abs($t),ur=[],mr;for(;Ct+wt<=Dt;){if(sa+=br,sa<Oe||sa>=pt)return null;Ct+=wt,dt=ut,Je=He;let Qr={absOffsetX:Dt,direction:br,distanceFromAnchor:Ct,previousVertex:dt};if(ut=Pe(sa,At,Qr),ae===0)ur.push(dt),mr=ut.sub(dt);else{let ga,Sa=ut.sub(dt);ga=Sa.mag()===0?yt(Pe(sa+br,At,Qr).sub(ut),ae,br):yt(Sa,ae,br),Je||(Je=dt.add(ga)),He=Tt(sa,ga,ut,Oe,pt,Je,ae,At,Qr),ur.push(Je),mr=He.sub(Je)}wt=mr.mag()}let Er=mr._mult((Dt-Ct)/wt)._add(Je||dt),Br=Ar+Math.atan2(ut.y-dt.y,ut.x-dt.x);return ur.push(Er),{point:Er,angle:Bt?Br:0,path:ur}}let Gt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function rr(Ne,R){for(let ae=0;ae<Ne;ae++){let we=R.length;R.resize(we+4),R.float32.set(Gt,3*we)}}function Qt(Ne,R,ae){let we=R[0],Se=R[1];return Ne[0]=ae[0]*we+ae[4]*Se+ae[12],Ne[1]=ae[1]*we+ae[5]*Se+ae[13],Ne[3]=ae[3]*we+ae[7]*Se+ae[15],Ne}let Tr=100;class la{constructor(R,ae,we=new jr(R.width+200,R.height+200,25),Se=new jr(R.width+200,R.height+200,25)){this.transform=R,this.mapProjection=ae,this.grid=we,this.ignoredGrid=Se,this.pitchFactor=Math.cos(R._pitch)*R.cameraToCenterDistance,this.screenRightBoundary=R.width+Tr,this.screenBottomBoundary=R.height+Tr,this.gridRightBoundary=R.width+200,this.gridBottomBoundary=R.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar){let Yr=R.anchorPointX+Bt[0],sa=R.anchorPointY+Bt[1],He=this.projectAndGetPerspectiveRatio(Se,Yr,sa,Oe,br),Je=we*He.perspectiveRatio,ut;if(pt||At)ut=this._projectCollisionBox(R,Je,Se,Oe,pt,At,Bt,He,br,Ar);else{let ur=He.point.x+(Ar?Ar.x*Je:0),mr=He.point.y+(Ar?Ar.y*Je:0);ut={allPointsOccluded:!1,box:[ur+R.x1*Je,mr+R.y1*Je,ur+R.x2*Je,mr+R.y2*Je]}}let[dt,Ct,wt,Dt]=ut.box;return this.mapProjection.useSpecialProjectionForSymbols&&(pt?ut.allPointsOccluded:this.mapProjection.isOccluded(Yr,sa,Oe))||He.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(dt,Ct,wt,Dt)||ae!=="always"&&this.grid.hitTest(dt,Ct,wt,Dt,ae,$t)?{box:[dt,Ct,wt,Dt],placeable:!1,offscreen:!1}:{box:[dt,Ct,wt,Dt],placeable:!0,offscreen:this.isOffscreen(dt,Ct,wt,Dt)}}placeCollisionCircles(R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa,He,Je,ut){let dt=[],Ct=new t.P(ae.anchorX,ae.anchorY),wt=this.getPerspectiveRatio(pt,Ct.x,Ct.y,At,ut),Dt=(Ar?Oe/wt:Oe*wt)/t.ap,ur={getElevation:ut,labelPlaneMatrix:Bt,lineVertexArray:we,pitchWithMap:Ar,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Ct,unwrappedTileID:At,width:this.transform.width,height:this.transform.height,translation:Je},mr=Me(Dt,Se,ae.lineOffsetX*Dt,ae.lineOffsetY*Dt,!1,ae,!1,ur),Er=!1,Br=!1,Qr=!0;if(mr){let ga=.5*sa*wt+He,Sa=new t.P(-100,-100),Oa=new t.P(this.screenRightBoundary,this.screenBottomBoundary),di=new Sr,Wi=mr.first,Gi=mr.last,on=[];for(let Bn=Wi.path.length-1;Bn>=1;Bn--)on.push(Wi.path[Bn]);for(let Bn=1;Bn<Gi.path.length;Bn++)on.push(Gi.path[Bn]);let Tn=2.5*ga;if($t){let Bn=this.projectPathToScreenSpace(on,ur,$t);on=Bn.some(Ao=>Ao.signedDistanceFromCamera<=0)?[]:Bn.map(Ao=>Ao.point)}let Wn=[];if(on.length>0){let Bn=on[0].clone(),Ao=on[0].clone();for(let ss=1;ss<on.length;ss++)Bn.x=Math.min(Bn.x,on[ss].x),Bn.y=Math.min(Bn.y,on[ss].y),Ao.x=Math.max(Ao.x,on[ss].x),Ao.y=Math.max(Ao.y,on[ss].y);Wn=Bn.x>=Sa.x&&Ao.x<=Oa.x&&Bn.y>=Sa.y&&Ao.y<=Oa.y?[on]:Ao.x<Sa.x||Bn.x>Oa.x||Ao.y<Sa.y||Bn.y>Oa.y?[]:t.al([on],Sa.x,Sa.y,Oa.x,Oa.y)}for(let Bn of Wn){di.reset(Bn,.25*ga);let Ao=0;Ao=di.length<=.5*ga?1:Math.ceil(di.paddedLength/Tn)+1;for(let ss=0;ss<Ao;ss++){let So=ss/Math.max(Ao-1,1),Ko=di.lerp(So),hs=Ko.x+Tr,ll=Ko.y+Tr;dt.push(hs,ll,ga,0);let Js=hs-ga,es=ll-ga,ts=hs+ga,Pl=ll+ga;if(Qr=Qr&&this.isOffscreen(Js,es,ts,Pl),Br=Br||this.isInsideGrid(Js,es,ts,Pl),R!=="always"&&this.grid.hitTestCircle(hs,ll,ga,R,Yr)&&(Er=!0,!br))return{circles:[],offscreen:!1,collisionDetected:Er}}}}return{circles:!br&&Er||!Br||wt<this.perspectiveRatioCutoff?[]:dt,offscreen:Qr,collisionDetected:Er}}projectPathToScreenSpace(R,ae,we){return R.map(Se=>bt(Se.x,Se.y,we,ae.getElevation))}queryRenderedSymbols(R){if(R.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let ae=[],we=1/0,Se=1/0,Oe=-1/0,pt=-1/0;for(let br of R){let Ar=new t.P(br.x+Tr,br.y+Tr);we=Math.min(we,Ar.x),Se=Math.min(Se,Ar.y),Oe=Math.max(Oe,Ar.x),pt=Math.max(pt,Ar.y),ae.push(Ar)}let At=this.grid.query(we,Se,Oe,pt).concat(this.ignoredGrid.query(we,Se,Oe,pt)),Bt={},$t={};for(let br of At){let Ar=br.key;if(Bt[Ar.bucketInstanceId]===void 0&&(Bt[Ar.bucketInstanceId]={}),Bt[Ar.bucketInstanceId][Ar.featureIndex])continue;let Yr=[new t.P(br.x1,br.y1),new t.P(br.x2,br.y1),new t.P(br.x2,br.y2),new t.P(br.x1,br.y2)];t.am(ae,Yr)&&(Bt[Ar.bucketInstanceId][Ar.featureIndex]=!0,$t[Ar.bucketInstanceId]===void 0&&($t[Ar.bucketInstanceId]=[]),$t[Ar.bucketInstanceId].push(Ar.featureIndex))}return $t}insertCollisionBox(R,ae,we,Se,Oe,pt){(we?this.ignoredGrid:this.grid).insert({bucketInstanceId:Se,featureIndex:Oe,collisionGroupID:pt,overlapMode:ae},R[0],R[1],R[2],R[3])}insertCollisionCircles(R,ae,we,Se,Oe,pt){let At=we?this.ignoredGrid:this.grid,Bt={bucketInstanceId:Se,featureIndex:Oe,collisionGroupID:pt,overlapMode:ae};for(let $t=0;$t<R.length;$t+=4)At.insertCircle(Bt,R[$t],R[$t+1],R[$t+2])}projectAndGetPerspectiveRatio(R,ae,we,Se,Oe){let pt;Oe?(pt=[ae,we,Oe(ae,we),1],t.af(pt,pt,R)):(pt=[ae,we,0,1],Qt(pt,pt,R));let At=pt[3];return{point:new t.P((pt[0]/At+1)/2*this.transform.width+Tr,(-pt[1]/At+1)/2*this.transform.height+Tr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/At*.5,isOccluded:!1,signedDistanceFromCamera:At}}getPerspectiveRatio(R,ae,we,Se,Oe){let pt=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(ae,we,Se,Oe):bt(ae,we,R,Oe);return .5+this.transform.cameraToCenterDistance/pt.signedDistanceFromCamera*.5}isOffscreen(R,ae,we,Se){return we<Tr||R>=this.screenRightBoundary||Se<Tr||ae>this.screenBottomBoundary}isInsideGrid(R,ae,we,Se){return we>=0&&R<this.gridRightBoundary&&Se>=0&&ae<this.gridBottomBoundary}getViewportMatrix(){let R=t.an([]);return t.J(R,R,[-100,-100,0]),R}_projectCollisionBox(R,ae,we,Se,Oe,pt,At,Bt,$t,br){let Ar=new t.P(1,0),Yr=new t.P(0,1),sa=new t.P(R.anchorPointX+At[0],R.anchorPointY+At[1]);if(pt&&!Oe){let Qr=this.projectAndGetPerspectiveRatio(we,sa.x+1,sa.y,Se,$t).point.sub(Bt.point).unit(),ga=Math.atan(Qr.y/Qr.x)+(Qr.x<0?Math.PI:0),Sa=Math.sin(ga),Oa=Math.cos(ga);Ar=new t.P(Oa,Sa),Yr=new t.P(-Sa,Oa)}else if(!pt&&Oe){let Qr=-this.transform.angle,ga=Math.sin(Qr),Sa=Math.cos(Qr);Ar=new t.P(Sa,ga),Yr=new t.P(-ga,Sa)}let He=Bt.point,Je=ae;if(Oe){He=sa;let Qr=this.transform.zoom-Math.floor(this.transform.zoom);Je=Math.pow(2,-Qr),Je*=this.mapProjection.getPitchedTextCorrection(this.transform,sa,Se),br||(Je*=t.ac(.5+Bt.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}br&&(He=He.add(Ar.mult(br.x*Je)).add(Yr.mult(br.y*Je)));let ut=R.x1*Je,dt=R.x2*Je,Ct=(ut+dt)/2,wt=R.y1*Je,Dt=R.y2*Je,ur=(wt+Dt)/2,mr=[{offsetX:ut,offsetY:wt},{offsetX:Ct,offsetY:wt},{offsetX:dt,offsetY:wt},{offsetX:dt,offsetY:ur},{offsetX:dt,offsetY:Dt},{offsetX:Ct,offsetY:Dt},{offsetX:ut,offsetY:Dt},{offsetX:ut,offsetY:ur}],Er=[];for(let{offsetX:Qr,offsetY:ga}of mr)Er.push(new t.P(He.x+Ar.x*Qr+Yr.x*ga,He.y+Ar.y*Qr+Yr.y*ga));let Br=!1;if(Oe){let Qr=Er.map(ga=>this.projectAndGetPerspectiveRatio(we,ga.x,ga.y,Se,$t));Br=Qr.some(ga=>!ga.isOccluded),Er=Qr.map(ga=>ga.point)}else Br=!0;return{box:t.ao(Er),allPointsOccluded:!Br}}}function Ua(Ne,R,ae){return R*(t.X/(Ne.tileSize*Math.pow(2,ae-Ne.tileID.overscaledZ)))}class Ba{constructor(R,ae,we,Se){this.opacity=R?Math.max(0,Math.min(1,R.opacity+(R.placed?ae:-ae))):Se&&we?1:0,this.placed=we}isHidden(){return this.opacity===0&&!this.placed}}class Ra{constructor(R,ae,we,Se,Oe){this.text=new Ba(R?R.text:null,ae,we,Oe),this.icon=new Ba(R?R.icon:null,ae,Se,Oe)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ei{constructor(R,ae,we){this.text=R,this.icon=ae,this.skipFade=we}}class za{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class ti{constructor(R,ae,we,Se,Oe){this.bucketInstanceId=R,this.featureIndex=ae,this.sourceLayerIndex=we,this.bucketIndex=Se,this.tileID=Oe}}class Ci{constructor(R){this.crossSourceCollisions=R,this.maxGroupID=0,this.collisionGroups={}}get(R){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[R]){let ae=++this.maxGroupID;this.collisionGroups[R]={ID:ae,predicate:we=>we.collisionGroupID===ae}}return this.collisionGroups[R]}}function Jt(Ne,R,ae,we,Se){let{horizontalAlign:Oe,verticalAlign:pt}=t.au(Ne);return new t.P(-(Oe-.5)*R+we[0]*Se,-(pt-.5)*ae+we[1]*Se)}class Nt{constructor(R,ae,we,Se,Oe,pt){this.transform=R.clone(),this.terrain=we,this.collisionIndex=new la(this.transform,ae),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Se,this.retainedQueryData={},this.collisionGroups=new Ci(Oe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=pt,pt&&(pt.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(R){let ae=this.terrain;return ae?(we,Se)=>ae.getElevation(R,we,Se):null}getBucketParts(R,ae,we,Se){let Oe=we.getBucket(ae),pt=we.latestFeatureIndex;if(!Oe||!pt||ae.id!==Oe.layerIds[0])return;let At=we.collisionBoxArray,Bt=Oe.layers[0].layout,$t=Oe.layers[0].paint,br=Math.pow(2,this.transform.zoom-we.tileID.overscaledZ),Ar=we.tileSize/t.X,Yr=we.tileID.toUnwrapped(),sa=this.transform.calculatePosMatrix(Yr),He=Bt.get("text-pitch-alignment")==="map",Je=Bt.get("text-rotation-alignment")==="map",ut=Ua(we,1,this.transform.zoom),dt=this.collisionIndex.mapProjection.translatePosition(this.transform,we,$t.get("text-translate"),$t.get("text-translate-anchor")),Ct=this.collisionIndex.mapProjection.translatePosition(this.transform,we,$t.get("icon-translate"),$t.get("icon-translate-anchor")),wt=wr(sa,He,Je,this.transform,ut),Dt=null;if(He){let mr=Ir(sa,He,Je,this.transform,ut);Dt=t.L([],this.transform.labelPlaneMatrix,mr)}this.retainedQueryData[Oe.bucketInstanceId]=new ti(Oe.bucketInstanceId,pt,Oe.sourceLayerIndex,Oe.index,we.tileID);let ur={bucket:Oe,layout:Bt,translationText:dt,translationIcon:Ct,posMatrix:sa,unwrappedTileID:Yr,textLabelPlaneMatrix:wt,labelToScreenMatrix:Dt,scale:br,textPixelRatio:Ar,holdingForFade:we.holdingForFade(),collisionBoxArray:At,partiallyEvaluatedTextSize:t.ag(Oe.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Oe.sourceID)};if(Se)for(let mr of Oe.sortKeyRanges){let{sortKey:Er,symbolInstanceStart:Br,symbolInstanceEnd:Qr}=mr;R.push({sortKey:Er,symbolInstanceStart:Br,symbolInstanceEnd:Qr,parameters:ur})}else R.push({symbolInstanceStart:0,symbolInstanceEnd:Oe.symbolInstances.length,parameters:ur})}attemptAnchorPlacement(R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa,He,Je,ut,dt,Ct,wt){let Dt=t.aq[R.textAnchor],ur=[R.textOffset0,R.textOffset1],mr=Jt(Dt,we,Se,ur,Oe),Er=this.collisionIndex.placeCollisionBox(ae,Yr,Bt,$t,br,At,pt,ut,Ar.predicate,wt,mr);if((!Ct||this.collisionIndex.placeCollisionBox(Ct,Yr,Bt,$t,br,At,pt,dt,Ar.predicate,wt,mr).placeable)&&Er.placeable){let Br;if(this.prevPlacement&&this.prevPlacement.variableOffsets[sa.crossTileID]&&this.prevPlacement.placements[sa.crossTileID]&&this.prevPlacement.placements[sa.crossTileID].text&&(Br=this.prevPlacement.variableOffsets[sa.crossTileID].anchor),sa.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[sa.crossTileID]={textOffset:ur,width:we,height:Se,anchor:Dt,textBoxScale:Oe,prevAnchor:Br},this.markUsedJustification(He,Dt,sa,Je),He.allowVerticalPlacement&&(this.markUsedOrientation(He,Je,sa),this.placedOrientations[sa.crossTileID]=Je),{shift:mr,placedGlyphBoxes:Er}}}placeLayerBucketPart(R,ae,we){let{bucket:Se,layout:Oe,translationText:pt,translationIcon:At,posMatrix:Bt,unwrappedTileID:$t,textLabelPlaneMatrix:br,labelToScreenMatrix:Ar,textPixelRatio:Yr,holdingForFade:sa,collisionBoxArray:He,partiallyEvaluatedTextSize:Je,collisionGroup:ut}=R.parameters,dt=Oe.get("text-optional"),Ct=Oe.get("icon-optional"),wt=t.ar(Oe,"text-overlap","text-allow-overlap"),Dt=wt==="always",ur=t.ar(Oe,"icon-overlap","icon-allow-overlap"),mr=ur==="always",Er=Oe.get("text-rotation-alignment")==="map",Br=Oe.get("text-pitch-alignment")==="map",Qr=Oe.get("icon-text-fit")!=="none",ga=Oe.get("symbol-z-order")==="viewport-y",Sa=Dt&&(mr||!Se.hasIconData()||Ct),Oa=mr&&(Dt||!Se.hasTextData()||dt);!Se.collisionArrays&&He&&Se.deserializeCollisionBoxes(He);let di=this._getTerrainElevationFunc(this.retainedQueryData[Se.bucketInstanceId].tileID),Wi=(Gi,on,Tn)=>{var Wn,Bn;if(ae[Gi.crossTileID])return;if(sa)return void(this.placements[Gi.crossTileID]=new ei(!1,!1,!1));let Ao=!1,ss=!1,So=!0,Ko=null,hs={box:null,placeable:!1,offscreen:null},ll={box:null,placeable:!1,offscreen:null},Js=null,es=null,ts=null,Pl=0,$l=0,Ru=0;on.textFeatureIndex?Pl=on.textFeatureIndex:Gi.useRuntimeCollisionCircles&&(Pl=Gi.featureIndex),on.verticalTextFeatureIndex&&($l=on.verticalTextFeatureIndex);let hu=on.textBox;if(hu){let ql=et=>{let vt=t.ah.horizontal;if(Se.allowVerticalPlacement&&!et&&this.prevPlacement){let _t=this.prevPlacement.placedOrientations[Gi.crossTileID];_t&&(this.placedOrientations[Gi.crossTileID]=_t,vt=_t,this.markUsedOrientation(Se,vt,Gi))}return vt},Vl=(et,vt)=>{if(Se.allowVerticalPlacement&&Gi.numVerticalGlyphVertices>0&&on.verticalTextBox){for(let _t of Se.writingModes)if(_t===t.ah.vertical?(hs=vt(),ll=hs):hs=et(),hs&&hs.placeable)break}else hs=et()},de=Gi.textAnchorOffsetStartIndex,De=Gi.textAnchorOffsetEndIndex;if(De===de){let et=(vt,_t)=>{let St=this.collisionIndex.placeCollisionBox(vt,wt,Yr,Bt,$t,Br,Er,pt,ut.predicate,di);return St&&St.placeable&&(this.markUsedOrientation(Se,_t,Gi),this.placedOrientations[Gi.crossTileID]=_t),St};Vl(()=>et(hu,t.ah.horizontal),()=>{let vt=on.verticalTextBox;return Se.allowVerticalPlacement&&Gi.numVerticalGlyphVertices>0&&vt?et(vt,t.ah.vertical):{box:null,offscreen:null}}),ql(hs&&hs.placeable)}else{let et=t.aq[(Bn=(Wn=this.prevPlacement)===null||Wn===void 0?void 0:Wn.variableOffsets[Gi.crossTileID])===null||Bn===void 0?void 0:Bn.anchor],vt=(St,ar,zt)=>{let gr=St.x2-St.x1,Vr=St.y2-St.y1,Wr=Gi.textBoxScale,Ta=Qr&&ur==="never"?ar:null,ya=null,ri=wt==="never"?1:2,ni="never";et&&ri++;for(let Ma=0;Ma<ri;Ma++){for(let Na=de;Na<De;Na++){let Ka=Se.textAnchorOffsets.get(Na);if(et&&Ka.textAnchor!==et)continue;let vi=this.attemptAnchorPlacement(Ka,St,gr,Vr,Wr,Er,Br,Yr,Bt,$t,ut,ni,Gi,Se,zt,pt,At,Ta,di);if(vi&&(ya=vi.placedGlyphBoxes,ya&&ya.placeable))return Ao=!0,Ko=vi.shift,ya}et?et=null:ni=wt}return we&&!ya&&(ya={box:this.collisionIndex.placeCollisionBox(hu,"always",Yr,Bt,$t,Br,Er,pt,ut.predicate,di,new t.P(0,0)).box,offscreen:!1,placeable:!1}),ya};Vl(()=>vt(hu,on.iconBox,t.ah.horizontal),()=>{let St=on.verticalTextBox;return Se.allowVerticalPlacement&&(!hs||!hs.placeable)&&Gi.numVerticalGlyphVertices>0&&St?vt(St,on.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),hs&&(Ao=hs.placeable,So=hs.offscreen);let _t=ql(hs&&hs.placeable);if(!Ao&&this.prevPlacement){let St=this.prevPlacement.variableOffsets[Gi.crossTileID];St&&(this.variableOffsets[Gi.crossTileID]=St,this.markUsedJustification(Se,St.anchor,Gi,_t))}}}if(Js=hs,Ao=Js&&Js.placeable,So=Js&&Js.offscreen,Gi.useRuntimeCollisionCircles){let ql=Se.text.placedSymbolArray.get(Gi.centerJustifiedTextSymbolIndex),Vl=t.ai(Se.textSizeData,Je,ql),de=Oe.get("text-padding");es=this.collisionIndex.placeCollisionCircles(wt,ql,Se.lineVertexArray,Se.glyphOffsetArray,Vl,Bt,$t,br,Ar,we,Br,ut.predicate,Gi.collisionCircleDiameter,de,pt,di),es.circles.length&&es.collisionDetected&&!we&&t.w("Collisions detected, but collision boxes are not shown"),Ao=Dt||es.circles.length>0&&!es.collisionDetected,So=So&&es.offscreen}if(on.iconFeatureIndex&&(Ru=on.iconFeatureIndex),on.iconBox){let ql=Vl=>this.collisionIndex.placeCollisionBox(Vl,ur,Yr,Bt,$t,Br,Er,At,ut.predicate,di,Qr&&Ko?Ko:void 0);ll&&ll.placeable&&on.verticalIconBox?(ts=ql(on.verticalIconBox),ss=ts.placeable):(ts=ql(on.iconBox),ss=ts.placeable),So=So&&ts.offscreen}let wl=dt||Gi.numHorizontalGlyphVertices===0&&Gi.numVerticalGlyphVertices===0,su=Ct||Gi.numIconVertices===0;wl||su?su?wl||(ss=ss&&Ao):Ao=ss&&Ao:ss=Ao=ss&&Ao;let uc=ss&&ts.placeable;if(Ao&&Js.placeable&&this.collisionIndex.insertCollisionBox(Js.box,wt,Oe.get("text-ignore-placement"),Se.bucketInstanceId,ll&&ll.placeable&&$l?$l:Pl,ut.ID),uc&&this.collisionIndex.insertCollisionBox(ts.box,ur,Oe.get("icon-ignore-placement"),Se.bucketInstanceId,Ru,ut.ID),es&&Ao&&this.collisionIndex.insertCollisionCircles(es.circles,wt,Oe.get("text-ignore-placement"),Se.bucketInstanceId,Pl,ut.ID),we&&this.storeCollisionData(Se.bucketInstanceId,Tn,on,Js,ts,es),Gi.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Se.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Gi.crossTileID]=new ei(Ao||Sa,ss||Oa,So||Se.justReloaded),ae[Gi.crossTileID]=!0};if(ga){if(R.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Gi=Se.getSortedSymbolIndexes(this.transform.angle);for(let on=Gi.length-1;on>=0;--on){let Tn=Gi[on];Wi(Se.symbolInstances.get(Tn),Se.collisionArrays[Tn],Tn)}}else for(let Gi=R.symbolInstanceStart;Gi<R.symbolInstanceEnd;Gi++)Wi(Se.symbolInstances.get(Gi),Se.collisionArrays[Gi],Gi);if(we&&Se.bucketInstanceId in this.collisionCircleArrays){let Gi=this.collisionCircleArrays[Se.bucketInstanceId];t.as(Gi.invProjMatrix,Bt),Gi.viewportMatrix=this.collisionIndex.getViewportMatrix()}Se.justReloaded=!1}storeCollisionData(R,ae,we,Se,Oe,pt){if(we.textBox||we.iconBox){let At,Bt;this.collisionBoxArrays.has(R)?At=this.collisionBoxArrays.get(R):(At=new Map,this.collisionBoxArrays.set(R,At)),At.has(ae)?Bt=At.get(ae):(Bt={text:null,icon:null},At.set(ae,Bt)),we.textBox&&(Bt.text=Se.box),we.iconBox&&(Bt.icon=Oe.box)}if(pt){let At=this.collisionCircleArrays[R];At===void 0&&(At=this.collisionCircleArrays[R]=new za);for(let Bt=0;Bt<pt.circles.length;Bt+=4)At.circles.push(pt.circles[Bt+0]),At.circles.push(pt.circles[Bt+1]),At.circles.push(pt.circles[Bt+2]),At.circles.push(pt.collisionDetected?1:0)}}markUsedJustification(R,ae,we,Se){let Oe;Oe=Se===t.ah.vertical?we.verticalPlacedTextSymbolIndex:{left:we.leftJustifiedTextSymbolIndex,center:we.centerJustifiedTextSymbolIndex,right:we.rightJustifiedTextSymbolIndex}[t.at(ae)];let pt=[we.leftJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.rightJustifiedTextSymbolIndex,we.verticalPlacedTextSymbolIndex];for(let At of pt)At>=0&&(R.text.placedSymbolArray.get(At).crossTileID=Oe>=0&&At!==Oe?0:we.crossTileID)}markUsedOrientation(R,ae,we){let Se=ae===t.ah.horizontal||ae===t.ah.horizontalOnly?ae:0,Oe=ae===t.ah.vertical?ae:0,pt=[we.leftJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.rightJustifiedTextSymbolIndex];for(let At of pt)R.text.placedSymbolArray.get(At).placedOrientation=Se;we.verticalPlacedTextSymbolIndex&&(R.text.placedSymbolArray.get(we.verticalPlacedTextSymbolIndex).placedOrientation=Oe)}commit(R){this.commitTime=R,this.zoomAtLastRecencyCheck=this.transform.zoom;let ae=this.prevPlacement,we=!1;this.prevZoomAdjustment=ae?ae.zoomAdjustment(this.transform.zoom):0;let Se=ae?ae.symbolFadeChange(R):1,Oe=ae?ae.opacities:{},pt=ae?ae.variableOffsets:{},At=ae?ae.placedOrientations:{};for(let Bt in this.placements){let $t=this.placements[Bt],br=Oe[Bt];br?(this.opacities[Bt]=new Ra(br,Se,$t.text,$t.icon),we=we||$t.text!==br.text.placed||$t.icon!==br.icon.placed):(this.opacities[Bt]=new Ra(null,Se,$t.text,$t.icon,$t.skipFade),we=we||$t.text||$t.icon)}for(let Bt in Oe){let $t=Oe[Bt];if(!this.opacities[Bt]){let br=new Ra($t,Se,!1,!1);br.isHidden()||(this.opacities[Bt]=br,we=we||$t.text.placed||$t.icon.placed)}}for(let Bt in pt)this.variableOffsets[Bt]||!this.opacities[Bt]||this.opacities[Bt].isHidden()||(this.variableOffsets[Bt]=pt[Bt]);for(let Bt in At)this.placedOrientations[Bt]||!this.opacities[Bt]||this.opacities[Bt].isHidden()||(this.placedOrientations[Bt]=At[Bt]);if(ae&&ae.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");we?this.lastPlacementChangeTime=R:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ae?ae.lastPlacementChangeTime:R)}updateLayerOpacities(R,ae){let we={};for(let Se of ae){let Oe=Se.getBucket(R);Oe&&Se.latestFeatureIndex&&R.id===Oe.layerIds[0]&&this.updateBucketOpacities(Oe,Se.tileID,we,Se.collisionBoxArray)}}updateBucketOpacities(R,ae,we,Se){R.hasTextData()&&(R.text.opacityVertexArray.clear(),R.text.hasVisibleVertices=!1),R.hasIconData()&&(R.icon.opacityVertexArray.clear(),R.icon.hasVisibleVertices=!1),R.hasIconCollisionBoxData()&&R.iconCollisionBox.collisionVertexArray.clear(),R.hasTextCollisionBoxData()&&R.textCollisionBox.collisionVertexArray.clear();let Oe=R.layers[0],pt=Oe.layout,At=new Ra(null,0,!1,!1,!0),Bt=pt.get("text-allow-overlap"),$t=pt.get("icon-allow-overlap"),br=Oe._unevaluatedLayout.hasValue("text-variable-anchor")||Oe._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ar=pt.get("text-rotation-alignment")==="map",Yr=pt.get("text-pitch-alignment")==="map",sa=pt.get("icon-text-fit")!=="none",He=new Ra(null,0,Bt&&($t||!R.hasIconData()||pt.get("icon-optional")),$t&&(Bt||!R.hasTextData()||pt.get("text-optional")),!0);!R.collisionArrays&&Se&&(R.hasIconCollisionBoxData()||R.hasTextCollisionBoxData())&&R.deserializeCollisionBoxes(Se);let Je=(dt,Ct,wt)=>{for(let Dt=0;Dt<Ct/4;Dt++)dt.opacityVertexArray.emplaceBack(wt);dt.hasVisibleVertices=dt.hasVisibleVertices||wt!==ai},ut=this.collisionBoxArrays.get(R.bucketInstanceId);for(let dt=0;dt<R.symbolInstances.length;dt++){let Ct=R.symbolInstances.get(dt),{numHorizontalGlyphVertices:wt,numVerticalGlyphVertices:Dt,crossTileID:ur}=Ct,mr=this.opacities[ur];we[ur]?mr=At:mr||(mr=He,this.opacities[ur]=mr),we[ur]=!0;let Er=Ct.numIconVertices>0,Br=this.placedOrientations[Ct.crossTileID],Qr=Br===t.ah.vertical,ga=Br===t.ah.horizontal||Br===t.ah.horizontalOnly;if(wt>0||Dt>0){let Oa=$a(mr.text);Je(R.text,wt,Qr?ai:Oa),Je(R.text,Dt,ga?ai:Oa);let di=mr.text.isHidden();[Ct.rightJustifiedTextSymbolIndex,Ct.centerJustifiedTextSymbolIndex,Ct.leftJustifiedTextSymbolIndex].forEach(on=>{on>=0&&(R.text.placedSymbolArray.get(on).hidden=di||Qr?1:0)}),Ct.verticalPlacedTextSymbolIndex>=0&&(R.text.placedSymbolArray.get(Ct.verticalPlacedTextSymbolIndex).hidden=di||ga?1:0);let Wi=this.variableOffsets[Ct.crossTileID];Wi&&this.markUsedJustification(R,Wi.anchor,Ct,Br);let Gi=this.placedOrientations[Ct.crossTileID];Gi&&(this.markUsedJustification(R,"left",Ct,Gi),this.markUsedOrientation(R,Gi,Ct))}if(Er){let Oa=$a(mr.icon),di=!(sa&&Ct.verticalPlacedIconSymbolIndex&&Qr);Ct.placedIconSymbolIndex>=0&&(Je(R.icon,Ct.numIconVertices,di?Oa:ai),R.icon.placedSymbolArray.get(Ct.placedIconSymbolIndex).hidden=mr.icon.isHidden()),Ct.verticalPlacedIconSymbolIndex>=0&&(Je(R.icon,Ct.numVerticalIconVertices,di?ai:Oa),R.icon.placedSymbolArray.get(Ct.verticalPlacedIconSymbolIndex).hidden=mr.icon.isHidden())}let Sa=ut&&ut.has(dt)?ut.get(dt):{text:null,icon:null};if(R.hasIconCollisionBoxData()||R.hasTextCollisionBoxData()){let Oa=R.collisionArrays[dt];if(Oa){let di=new t.P(0,0);if(Oa.textBox||Oa.verticalTextBox){let Wi=!0;if(br){let Gi=this.variableOffsets[ur];Gi?(di=Jt(Gi.anchor,Gi.width,Gi.height,Gi.textOffset,Gi.textBoxScale),Ar&&di._rotate(Yr?this.transform.angle:-this.transform.angle)):Wi=!1}if(Oa.textBox||Oa.verticalTextBox){let Gi;Oa.textBox&&(Gi=Qr),Oa.verticalTextBox&&(Gi=ga),Kt(R.textCollisionBox.collisionVertexArray,mr.text.placed,!Wi||Gi,Sa.text,di.x,di.y)}}if(Oa.iconBox||Oa.verticalIconBox){let Wi=!!(!ga&&Oa.verticalIconBox),Gi;Oa.iconBox&&(Gi=Wi),Oa.verticalIconBox&&(Gi=!Wi),Kt(R.iconCollisionBox.collisionVertexArray,mr.icon.placed,Gi,Sa.icon,sa?di.x:0,sa?di.y:0)}}}}if(R.sortFeatures(this.transform.angle),this.retainedQueryData[R.bucketInstanceId]&&(this.retainedQueryData[R.bucketInstanceId].featureSortOrder=R.featureSortOrder),R.hasTextData()&&R.text.opacityVertexBuffer&&R.text.opacityVertexBuffer.updateData(R.text.opacityVertexArray),R.hasIconData()&&R.icon.opacityVertexBuffer&&R.icon.opacityVertexBuffer.updateData(R.icon.opacityVertexArray),R.hasIconCollisionBoxData()&&R.iconCollisionBox.collisionVertexBuffer&&R.iconCollisionBox.collisionVertexBuffer.updateData(R.iconCollisionBox.collisionVertexArray),R.hasTextCollisionBoxData()&&R.textCollisionBox.collisionVertexBuffer&&R.textCollisionBox.collisionVertexBuffer.updateData(R.textCollisionBox.collisionVertexArray),R.text.opacityVertexArray.length!==R.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${R.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${R.text.layoutVertexArray.length}) / 4`);if(R.icon.opacityVertexArray.length!==R.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${R.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${R.icon.layoutVertexArray.length}) / 4`);if(R.bucketInstanceId in this.collisionCircleArrays){let dt=this.collisionCircleArrays[R.bucketInstanceId];R.placementInvProjMatrix=dt.invProjMatrix,R.placementViewportMatrix=dt.viewportMatrix,R.collisionCircleArray=dt.circles,delete this.collisionCircleArrays[R.bucketInstanceId]}}symbolFadeChange(R){return this.fadeDuration===0?1:(R-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(R){return Math.max(0,(this.transform.zoom-R)/1.5)}hasTransitions(R){return this.stale||R-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(R,ae){let we=this.zoomAtLastRecencyCheck===ae?1-this.zoomAdjustment(ae):1;return this.zoomAtLastRecencyCheck=ae,this.commitTime+this.fadeDuration*we>R}setStale(){this.stale=!0}}function Kt(Ne,R,ae,we,Se,Oe){we&&we.length!==0||(we=[0,0,0,0]);let pt=we[0]-Tr,At=we[1]-Tr,Bt=we[2]-Tr,$t=we[3]-Tr;Ne.emplaceBack(R?1:0,ae?1:0,Se||0,Oe||0,pt,At),Ne.emplaceBack(R?1:0,ae?1:0,Se||0,Oe||0,Bt,At),Ne.emplaceBack(R?1:0,ae?1:0,Se||0,Oe||0,Bt,$t),Ne.emplaceBack(R?1:0,ae?1:0,Se||0,Oe||0,pt,$t)}let Wt=Math.pow(2,25),Pr=Math.pow(2,24),ta=Math.pow(2,17),ma=Math.pow(2,16),ra=Math.pow(2,9),Ia=Math.pow(2,8),Ha=Math.pow(2,1);function $a(Ne){if(Ne.opacity===0&&!Ne.placed)return 0;if(Ne.opacity===1&&Ne.placed)return 4294967295;let R=Ne.placed?1:0,ae=Math.floor(127*Ne.opacity);return ae*Wt+R*Pr+ae*ta+R*ma+ae*ra+R*Ia+ae*Ha+R}let ai=0;function mi(){return{isOccluded:(Ne,R,ae)=>!1,getPitchedTextCorrection:(Ne,R,ae)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Ne,R,ae,we){throw new Error("Not implemented.")},translatePosition:(Ne,R,ae,we)=>function(Se,Oe,pt,At,Bt=!1){if(!pt[0]&&!pt[1])return[0,0];let $t=Bt?At==="map"?Se.angle:0:At==="viewport"?-Se.angle:0;if($t){let br=Math.sin($t),Ar=Math.cos($t);pt=[pt[0]*Ar-pt[1]*br,pt[0]*br+pt[1]*Ar]}return[Bt?pt[0]:Ua(Oe,pt[0],Se.zoom),Bt?pt[1]:Ua(Oe,pt[1],Se.zoom)]}(Ne,R,ae,we),getCircleRadiusCorrection:Ne=>1}}class xt{constructor(R){this._sortAcrossTiles=R.layout.get("symbol-z-order")!=="viewport-y"&&!R.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(R,ae,we,Se,Oe){let pt=this._bucketParts;for(;this._currentTileIndex<R.length;)if(ae.getBucketParts(pt,Se,R[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,Oe())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,pt.sort((At,Bt)=>At.sortKey-Bt.sortKey));this._currentPartIndex<pt.length;)if(ae.placeLayerBucketPart(pt[this._currentPartIndex],this._seenCrossTileIDs,we),this._currentPartIndex++,Oe())return!0;return!1}}class ct{constructor(R,ae,we,Se,Oe,pt,At,Bt){this.placement=new Nt(R,mi(),ae,pt,At,Bt),this._currentPlacementIndex=we.length-1,this._forceFullPlacement=Se,this._showCollisionBoxes=Oe,this._done=!1}isDone(){return this._done}continuePlacement(R,ae,we){let Se=i.now(),Oe=()=>!this._forceFullPlacement&&i.now()-Se>2;for(;this._currentPlacementIndex>=0;){let pt=ae[R[this._currentPlacementIndex]],At=this.placement.collisionIndex.transform.zoom;if(pt.type==="symbol"&&(!pt.minzoom||pt.minzoom<=At)&&(!pt.maxzoom||pt.maxzoom>At)){if(this._inProgressLayer||(this._inProgressLayer=new xt(pt)),this._inProgressLayer.continuePlacement(we[pt.source],this.placement,this._showCollisionBoxes,pt,Oe))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(R){return this.placement.commit(R),this.placement}}let Nr=512/t.X/2;class Or{constructor(R,ae,we){this.tileID=R,this.bucketInstanceId=we,this._symbolsByKey={};let Se=new Map;for(let Oe=0;Oe<ae.length;Oe++){let pt=ae.get(Oe),At=pt.key,Bt=Se.get(At);Bt?Bt.push(pt):Se.set(At,[pt])}for(let[Oe,pt]of Se){let At={positions:pt.map(Bt=>({x:Math.floor(Bt.anchorX*Nr),y:Math.floor(Bt.anchorY*Nr)})),crossTileIDs:pt.map(Bt=>Bt.crossTileID)};if(At.positions.length>128){let Bt=new t.av(At.positions.length,16,Uint16Array);for(let{x:$t,y:br}of At.positions)Bt.add($t,br);Bt.finish(),delete At.positions,At.index=Bt}this._symbolsByKey[Oe]=At}}getScaledCoordinates(R,ae){let{x:we,y:Se,z:Oe}=this.tileID.canonical,{x:pt,y:At,z:Bt}=ae.canonical,$t=Nr/Math.pow(2,Bt-Oe),br=(At*t.X+R.anchorY)*$t,Ar=Se*t.X*Nr;return{x:Math.floor((pt*t.X+R.anchorX)*$t-we*t.X*Nr),y:Math.floor(br-Ar)}}findMatches(R,ae,we){let Se=this.tileID.canonical.z<ae.canonical.z?1:Math.pow(2,this.tileID.canonical.z-ae.canonical.z);for(let Oe=0;Oe<R.length;Oe++){let pt=R.get(Oe);if(pt.crossTileID)continue;let At=this._symbolsByKey[pt.key];if(!At)continue;let Bt=this.getScaledCoordinates(pt,ae);if(At.index){let $t=At.index.range(Bt.x-Se,Bt.y-Se,Bt.x+Se,Bt.y+Se).sort();for(let br of $t){let Ar=At.crossTileIDs[br];if(!we[Ar]){we[Ar]=!0,pt.crossTileID=Ar;break}}}else if(At.positions)for(let $t=0;$t<At.positions.length;$t++){let br=At.positions[$t],Ar=At.crossTileIDs[$t];if(Math.abs(br.x-Bt.x)<=Se&&Math.abs(br.y-Bt.y)<=Se&&!we[Ar]){we[Ar]=!0,pt.crossTileID=Ar;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:R})=>R)}}class Rr{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Lr{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(R){let ae=Math.round((R-this.lng)/360);if(ae!==0)for(let we in this.indexes){let Se=this.indexes[we],Oe={};for(let pt in Se){let At=Se[pt];At.tileID=At.tileID.unwrapTo(At.tileID.wrap+ae),Oe[At.tileID.key]=At}this.indexes[we]=Oe}this.lng=R}addBucket(R,ae,we){if(this.indexes[R.overscaledZ]&&this.indexes[R.overscaledZ][R.key]){if(this.indexes[R.overscaledZ][R.key].bucketInstanceId===ae.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(R.overscaledZ,this.indexes[R.overscaledZ][R.key])}for(let Oe=0;Oe<ae.symbolInstances.length;Oe++)ae.symbolInstances.get(Oe).crossTileID=0;this.usedCrossTileIDs[R.overscaledZ]||(this.usedCrossTileIDs[R.overscaledZ]={});let Se=this.usedCrossTileIDs[R.overscaledZ];for(let Oe in this.indexes){let pt=this.indexes[Oe];if(Number(Oe)>R.overscaledZ)for(let At in pt){let Bt=pt[At];Bt.tileID.isChildOf(R)&&Bt.findMatches(ae.symbolInstances,R,Se)}else{let At=pt[R.scaledTo(Number(Oe)).key];At&&At.findMatches(ae.symbolInstances,R,Se)}}for(let Oe=0;Oe<ae.symbolInstances.length;Oe++){let pt=ae.symbolInstances.get(Oe);pt.crossTileID||(pt.crossTileID=we.generate(),Se[pt.crossTileID]=!0)}return this.indexes[R.overscaledZ]===void 0&&(this.indexes[R.overscaledZ]={}),this.indexes[R.overscaledZ][R.key]=new Or(R,ae.symbolInstances,ae.bucketInstanceId),!0}removeBucketCrossTileIDs(R,ae){for(let we of ae.getCrossTileIDsLists())for(let Se of we)delete this.usedCrossTileIDs[R][Se]}removeStaleBuckets(R){let ae=!1;for(let we in this.indexes){let Se=this.indexes[we];for(let Oe in Se)R[Se[Oe].bucketInstanceId]||(this.removeBucketCrossTileIDs(we,Se[Oe]),delete Se[Oe],ae=!0)}return ae}}class Gr{constructor(){this.layerIndexes={},this.crossTileIDs=new Rr,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(R,ae,we){let Se=this.layerIndexes[R.id];Se===void 0&&(Se=this.layerIndexes[R.id]=new Lr);let Oe=!1,pt={};Se.handleWrapJump(we);for(let At of ae){let Bt=At.getBucket(R);Bt&&R.id===Bt.layerIds[0]&&(Bt.bucketInstanceId||(Bt.bucketInstanceId=++this.maxBucketInstanceId),Se.addBucket(At.tileID,Bt,this.crossTileIDs)&&(Oe=!0),pt[Bt.bucketInstanceId]=!0)}return Se.removeStaleBuckets(pt)&&(Oe=!0),Oe}pruneUnusedLayers(R){let ae={};R.forEach(we=>{ae[we]=!0});for(let we in this.layerIndexes)ae[we]||delete this.layerIndexes[we]}}let Kr=(Ne,R)=>t.t(Ne,R&&R.filter(ae=>ae.identifier!=="source.canvas")),Ur=t.aw();class aa extends t.E{constructor(R,ae={}){super(),this._rtlPluginLoaded=()=>{for(let we in this.sourceCaches){let Se=this.sourceCaches[we].getSource().type;Se!=="vector"&&Se!=="geojson"||this.sourceCaches[we].reload()}},this.map=R,this.dispatcher=new J($(),R._getMapId()),this.dispatcher.registerMessageHandler("GG",(we,Se)=>this.getGlyphs(we,Se)),this.dispatcher.registerMessageHandler("GI",(we,Se)=>this.getImages(we,Se)),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new F(R._requestManager,ae.localIdeographFontFamily),this.lineAtlas=new W(256,512),this.crossTileSymbolIndex=new Gr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),rt().on(_e,this._rtlPluginLoaded),this.on("data",we=>{if(we.dataType!=="source"||we.sourceDataType!=="metadata")return;let Se=this.sourceCaches[we.sourceId];if(!Se)return;let Oe=Se.getSource();if(Oe&&Oe.vectorLayerIds)for(let pt in this._layers){let At=this._layers[pt];At.source===Oe.id&&this._validateLayer(At)}})}loadURL(R,ae={},we){this.fire(new t.k("dataloading",{dataType:"style"})),ae.validate=typeof ae.validate!="boolean"||ae.validate;let Se=this.map._requestManager.transformRequest(R,"Style");this._loadStyleRequest=new AbortController;let Oe=this._loadStyleRequest;t.h(Se,this._loadStyleRequest).then(pt=>{this._loadStyleRequest=null,this._load(pt.data,ae,we)}).catch(pt=>{this._loadStyleRequest=null,pt&&!Oe.signal.aborted&&this.fire(new t.j(pt))})}loadJSON(R,ae={},we){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,i.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,ae.validate=ae.validate!==!1,this._load(R,ae,we)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(Ur,{validate:!1})}_load(R,ae,we){var Se;let Oe=ae.transformStyle?ae.transformStyle(we,R):R;if(!ae.validate||!Kr(this,t.u(Oe))){this._loaded=!0,this.stylesheet=Oe;for(let pt in Oe.sources)this.addSource(pt,Oe.sources[pt],{validate:!1});Oe.sprite?this._loadSprite(Oe.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Oe.glyphs),this._createLayers(),this.light=new I(this.stylesheet.light),this.sky=new U(this.stylesheet.sky),this.map.setTerrain((Se=this.stylesheet.terrain)!==null&&Se!==void 0?Se:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let R=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",R),this._order=R.map(ae=>ae.id),this._layers={},this._serializedLayers=null;for(let ae of R){let we=t.aA(ae);we.setEventedParent(this,{layer:{id:ae.id}}),this._layers[ae.id]=we}}_loadSprite(R,ae=!1,we=void 0){let Se;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Oe,pt,At,Bt){return t._(this,void 0,void 0,function*(){let $t=b(Oe),br=At>1?"@2x":"",Ar={},Yr={};for(let{id:sa,url:He}of $t){let Je=pt.transformRequest(p(He,br,".json"),"SpriteJSON");Ar[sa]=t.h(Je,Bt);let ut=pt.transformRequest(p(He,br,".png"),"SpriteImage");Yr[sa]=l.getImage(ut,Bt)}return yield Promise.all([...Object.values(Ar),...Object.values(Yr)]),function(sa,He){return t._(this,void 0,void 0,function*(){let Je={};for(let ut in sa){Je[ut]={};let dt=i.getImageCanvasContext((yield He[ut]).data),Ct=(yield sa[ut]).data;for(let wt in Ct){let{width:Dt,height:ur,x:mr,y:Er,sdf:Br,pixelRatio:Qr,stretchX:ga,stretchY:Sa,content:Oa,textFitWidth:di,textFitHeight:Wi}=Ct[wt];Je[ut][wt]={data:null,pixelRatio:Qr,sdf:Br,stretchX:ga,stretchY:Sa,content:Oa,textFitWidth:di,textFitHeight:Wi,spriteData:{width:Dt,height:ur,x:mr,y:Er,context:dt}}}}return Je})}(Ar,Yr)})}(R,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Oe=>{if(this._spriteRequest=null,Oe)for(let pt in Oe){this._spritesImagesIds[pt]=[];let At=this._spritesImagesIds[pt]?this._spritesImagesIds[pt].filter(Bt=>!(Bt in Oe)):[];for(let Bt of At)this.imageManager.removeImage(Bt),this._changedImages[Bt]=!0;for(let Bt in Oe[pt]){let $t=pt==="default"?Bt:`${pt}:${Bt}`;this._spritesImagesIds[pt].push($t),$t in this.imageManager.images?this.imageManager.updateImage($t,Oe[pt][Bt],!1):this.imageManager.addImage($t,Oe[pt][Bt]),ae&&(this._changedImages[$t]=!0)}}}).catch(Oe=>{this._spriteRequest=null,Se=Oe,this.fire(new t.j(Se))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),ae&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),we&&we(Se)})}_unloadSprite(){for(let R of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(R),this._changedImages[R]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}_validateLayer(R){let ae=this.sourceCaches[R.source];if(!ae)return;let we=R.sourceLayer;if(!we)return;let Se=ae.getSource();(Se.type==="geojson"||Se.vectorLayerIds&&Se.vectorLayerIds.indexOf(we)===-1)&&this.fire(new t.j(new Error(`Source layer "${we}" does not exist on source "${Se.id}" as specified by style layer "${R.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let R in this.sourceCaches)if(!this.sourceCaches[R].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(R,ae=!1){let we=this._serializedAllLayers();if(!R||R.length===0)return Object.values(ae?t.aB(we):we);let Se=[];for(let Oe of R)if(we[Oe]){let pt=ae?t.aB(we[Oe]):we[Oe];Se.push(pt)}return Se}_serializedAllLayers(){let R=this._serializedLayers;if(R)return R;R=this._serializedLayers={};let ae=Object.keys(this._layers);for(let we of ae){let Se=this._layers[we];Se.type!=="custom"&&(R[we]=Se.serialize())}return R}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let R in this.sourceCaches)if(this.sourceCaches[R].hasTransition())return!0;for(let R in this._layers)if(this._layers[R].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(R){if(!this._loaded)return;let ae=this._changed;if(ae){let Se=Object.keys(this._updatedLayers),Oe=Object.keys(this._removedLayers);(Se.length||Oe.length)&&this._updateWorkerLayers(Se,Oe);for(let pt in this._updatedSources){let At=this._updatedSources[pt];if(At==="reload")this._reloadSource(pt);else{if(At!=="clear")throw new Error(`Invalid action ${At}`);this._clearSource(pt)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let pt in this._updatedPaintProps)this._layers[pt].updateTransitions(R);this.light.updateTransitions(R),this.sky.updateTransitions(R),this._resetUpdates()}let we={};for(let Se in this.sourceCaches){let Oe=this.sourceCaches[Se];we[Se]=Oe.used,Oe.used=!1}for(let Se of this._order){let Oe=this._layers[Se];Oe.recalculate(R,this._availableImages),!Oe.isHidden(R.zoom)&&Oe.source&&(this.sourceCaches[Oe.source].used=!0)}for(let Se in we){let Oe=this.sourceCaches[Se];!!we[Se]!=!!Oe.used&&Oe.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Se}))}this.light.recalculate(R),this.sky.recalculate(R),this.z=R.zoom,ae&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let R=Object.keys(this._changedImages);if(R.length){for(let ae in this.sourceCaches)this.sourceCaches[ae].reloadTilesForDependencies(["icons","patterns"],R);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let R in this.sourceCaches)this.sourceCaches[R].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(R,ae){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(R,!1),removedIds:ae})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(R,ae={}){var we;this._checkLoaded();let Se=this.serialize();if(R=ae.transformStyle?ae.transformStyle(Se,R):R,((we=ae.validate)===null||we===void 0||we)&&Kr(this,t.u(R)))return!1;(R=t.aB(R)).layers=t.az(R.layers);let Oe=t.aC(Se,R),pt=this._getOperationsToPerform(Oe);if(pt.unimplemented.length>0)throw new Error(`Unimplemented: ${pt.unimplemented.join(", ")}.`);if(pt.operations.length===0)return!1;for(let At of pt.operations)At();return this.stylesheet=R,this._serializedLayers=null,!0}_getOperationsToPerform(R){let ae=[],we=[];for(let Se of R)switch(Se.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":ae.push(()=>this.addLayer.apply(this,Se.args));break;case"removeLayer":ae.push(()=>this.removeLayer.apply(this,Se.args));break;case"setPaintProperty":ae.push(()=>this.setPaintProperty.apply(this,Se.args));break;case"setLayoutProperty":ae.push(()=>this.setLayoutProperty.apply(this,Se.args));break;case"setFilter":ae.push(()=>this.setFilter.apply(this,Se.args));break;case"addSource":ae.push(()=>this.addSource.apply(this,Se.args));break;case"removeSource":ae.push(()=>this.removeSource.apply(this,Se.args));break;case"setLayerZoomRange":ae.push(()=>this.setLayerZoomRange.apply(this,Se.args));break;case"setLight":ae.push(()=>this.setLight.apply(this,Se.args));break;case"setGeoJSONSourceData":ae.push(()=>this.setGeoJSONSourceData.apply(this,Se.args));break;case"setGlyphs":ae.push(()=>this.setGlyphs.apply(this,Se.args));break;case"setSprite":ae.push(()=>this.setSprite.apply(this,Se.args));break;case"setSky":ae.push(()=>this.setSky.apply(this,Se.args));break;case"setTerrain":ae.push(()=>this.map.setTerrain.apply(this,Se.args));break;case"setTransition":ae.push(()=>{});break;default:we.push(Se.command)}return{operations:ae,unimplemented:we}}addImage(R,ae){if(this.getImage(R))return this.fire(new t.j(new Error(`An image named "${R}" already exists.`)));this.imageManager.addImage(R,ae),this._afterImageUpdated(R)}updateImage(R,ae){this.imageManager.updateImage(R,ae)}getImage(R){return this.imageManager.getImage(R)}removeImage(R){if(!this.getImage(R))return this.fire(new t.j(new Error(`An image named "${R}" does not exist.`)));this.imageManager.removeImage(R),this._afterImageUpdated(R)}_afterImageUpdated(R){this._availableImages=this.imageManager.listImages(),this._changedImages[R]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(R,ae,we={}){if(this._checkLoaded(),this.sourceCaches[R]!==void 0)throw new Error(`Source "${R}" already exists.`);if(!ae.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(ae).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(ae.type)>=0&&this._validate(t.u.source,`sources.${R}`,ae,null,we))return;this.map&&this.map._collectResourceTiming&&(ae.collectResourceTiming=!0);let Se=this.sourceCaches[R]=new kt(R,ae,this.dispatcher);Se.style=this,Se.setEventedParent(this,()=>({isSourceLoaded:Se.loaded(),source:Se.serialize(),sourceId:R})),Se.onAdd(this.map),this._changed=!0}removeSource(R){if(this._checkLoaded(),this.sourceCaches[R]===void 0)throw new Error("There is no source with this ID");for(let we in this._layers)if(this._layers[we].source===R)return this.fire(new t.j(new Error(`Source "${R}" cannot be removed while layer "${we}" is using it.`)));let ae=this.sourceCaches[R];delete this.sourceCaches[R],delete this._updatedSources[R],ae.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:R})),ae.setEventedParent(null),ae.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(R,ae){if(this._checkLoaded(),this.sourceCaches[R]===void 0)throw new Error(`There is no source with this ID=${R}`);let we=this.sourceCaches[R].getSource();if(we.type!=="geojson")throw new Error(`geojsonSource.type is ${we.type}, which is !== 'geojson`);we.setData(ae),this._changed=!0}getSource(R){return this.sourceCaches[R]&&this.sourceCaches[R].getSource()}addLayer(R,ae,we={}){this._checkLoaded();let Se=R.id;if(this.getLayer(Se))return void this.fire(new t.j(new Error(`Layer "${Se}" already exists on this map.`)));let Oe;if(R.type==="custom"){if(Kr(this,t.aD(R)))return;Oe=t.aA(R)}else{if("source"in R&&typeof R.source=="object"&&(this.addSource(Se,R.source),R=t.aB(R),R=t.e(R,{source:Se})),this._validate(t.u.layer,`layers.${Se}`,R,{arrayIndex:-1},we))return;Oe=t.aA(R),this._validateLayer(Oe),Oe.setEventedParent(this,{layer:{id:Se}})}let pt=ae?this._order.indexOf(ae):this._order.length;if(ae&&pt===-1)this.fire(new t.j(new Error(`Cannot add layer "${Se}" before non-existing layer "${ae}".`)));else{if(this._order.splice(pt,0,Se),this._layerOrderChanged=!0,this._layers[Se]=Oe,this._removedLayers[Se]&&Oe.source&&Oe.type!=="custom"){let At=this._removedLayers[Se];delete this._removedLayers[Se],At.type!==Oe.type?this._updatedSources[Oe.source]="clear":(this._updatedSources[Oe.source]="reload",this.sourceCaches[Oe.source].pause())}this._updateLayer(Oe),Oe.onAdd&&Oe.onAdd(this.map)}}moveLayer(R,ae){if(this._checkLoaded(),this._changed=!0,!this._layers[R])return void this.fire(new t.j(new Error(`The layer '${R}' does not exist in the map's style and cannot be moved.`)));if(R===ae)return;let we=this._order.indexOf(R);this._order.splice(we,1);let Se=ae?this._order.indexOf(ae):this._order.length;ae&&Se===-1?this.fire(new t.j(new Error(`Cannot move layer "${R}" before non-existing layer "${ae}".`))):(this._order.splice(Se,0,R),this._layerOrderChanged=!0)}removeLayer(R){this._checkLoaded();let ae=this._layers[R];if(!ae)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${R}".`)));ae.setEventedParent(null);let we=this._order.indexOf(R);this._order.splice(we,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[R]=ae,delete this._layers[R],this._serializedLayers&&delete this._serializedLayers[R],delete this._updatedLayers[R],delete this._updatedPaintProps[R],ae.onRemove&&ae.onRemove(this.map)}getLayer(R){return this._layers[R]}getLayersOrder(){return[...this._order]}hasLayer(R){return R in this._layers}setLayerZoomRange(R,ae,we){this._checkLoaded();let Se=this.getLayer(R);Se?Se.minzoom===ae&&Se.maxzoom===we||(ae!=null&&(Se.minzoom=ae),we!=null&&(Se.maxzoom=we),this._updateLayer(Se)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${R}".`)))}setFilter(R,ae,we={}){this._checkLoaded();let Se=this.getLayer(R);if(Se){if(!t.aE(Se.filter,ae))return ae==null?(Se.filter=void 0,void this._updateLayer(Se)):void(this._validate(t.u.filter,`layers.${Se.id}.filter`,ae,null,we)||(Se.filter=t.aB(ae),this._updateLayer(Se)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${R}".`)))}getFilter(R){return t.aB(this.getLayer(R).filter)}setLayoutProperty(R,ae,we,Se={}){this._checkLoaded();let Oe=this.getLayer(R);Oe?t.aE(Oe.getLayoutProperty(ae),we)||(Oe.setLayoutProperty(ae,we,Se),this._updateLayer(Oe)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${R}".`)))}getLayoutProperty(R,ae){let we=this.getLayer(R);if(we)return we.getLayoutProperty(ae);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${R}".`)))}setPaintProperty(R,ae,we,Se={}){this._checkLoaded();let Oe=this.getLayer(R);Oe?t.aE(Oe.getPaintProperty(ae),we)||(Oe.setPaintProperty(ae,we,Se)&&this._updateLayer(Oe),this._changed=!0,this._updatedPaintProps[R]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${R}".`)))}getPaintProperty(R,ae){return this.getLayer(R).getPaintProperty(ae)}setFeatureState(R,ae){this._checkLoaded();let we=R.source,Se=R.sourceLayer,Oe=this.sourceCaches[we];if(Oe===void 0)return void this.fire(new t.j(new Error(`The source '${we}' does not exist in the map's style.`)));let pt=Oe.getSource().type;pt==="geojson"&&Se?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):pt!=="vector"||Se?(R.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Oe.setFeatureState(Se,R.id,ae)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(R,ae){this._checkLoaded();let we=R.source,Se=this.sourceCaches[we];if(Se===void 0)return void this.fire(new t.j(new Error(`The source '${we}' does not exist in the map's style.`)));let Oe=Se.getSource().type,pt=Oe==="vector"?R.sourceLayer:void 0;Oe!=="vector"||pt?ae&&typeof R.id!="string"&&typeof R.id!="number"?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):Se.removeFeatureState(pt,R.id,ae):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(R){this._checkLoaded();let ae=R.source,we=R.sourceLayer,Se=this.sourceCaches[ae];if(Se!==void 0)return Se.getSource().type!=="vector"||we?(R.id===void 0&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),Se.getFeatureState(we,R.id)):void this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.j(new Error(`The source '${ae}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let R=t.aF(this.sourceCaches,Oe=>Oe.serialize()),ae=this._serializeByIds(this._order,!0),we=this.map.getTerrain()||void 0,Se=this.stylesheet;return t.aG({version:Se.version,name:Se.name,metadata:Se.metadata,light:Se.light,sky:Se.sky,center:Se.center,zoom:Se.zoom,bearing:Se.bearing,pitch:Se.pitch,sprite:Se.sprite,glyphs:Se.glyphs,transition:Se.transition,sources:R,layers:ae,terrain:we},Oe=>Oe!==void 0)}_updateLayer(R){this._updatedLayers[R.id]=!0,R.source&&!this._updatedSources[R.source]&&this.sourceCaches[R.source].getSource().type!=="raster"&&(this._updatedSources[R.source]="reload",this.sourceCaches[R.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(R){let ae=pt=>this._layers[pt].type==="fill-extrusion",we={},Se=[];for(let pt=this._order.length-1;pt>=0;pt--){let At=this._order[pt];if(ae(At)){we[At]=pt;for(let Bt of R){let $t=Bt[At];if($t)for(let br of $t)Se.push(br)}}}Se.sort((pt,At)=>At.intersectionZ-pt.intersectionZ);let Oe=[];for(let pt=this._order.length-1;pt>=0;pt--){let At=this._order[pt];if(ae(At))for(let Bt=Se.length-1;Bt>=0;Bt--){let $t=Se[Bt].feature;if(we[$t.layer.id]<pt)break;Oe.push($t),Se.pop()}else for(let Bt of R){let $t=Bt[At];if($t)for(let br of $t)Oe.push(br.feature)}}return Oe}queryRenderedFeatures(R,ae,we){ae&&ae.filter&&this._validate(t.u.filter,"queryRenderedFeatures.filter",ae.filter,null,ae);let Se={};if(ae&&ae.layers){if(!Array.isArray(ae.layers))return this.fire(new t.j(new Error("parameters.layers must be an Array."))),[];for(let At of ae.layers){let Bt=this._layers[At];if(!Bt)return this.fire(new t.j(new Error(`The layer '${At}' does not exist in the map's style and cannot be queried for features.`))),[];Se[Bt.source]=!0}}let Oe=[];ae.availableImages=this._availableImages;let pt=this._serializedAllLayers();for(let At in this.sourceCaches)ae.layers&&!Se[At]||Oe.push(ie(this.sourceCaches[At],this._layers,pt,R,ae,we));return this.placement&&Oe.push(function(At,Bt,$t,br,Ar,Yr,sa){let He={},Je=Yr.queryRenderedSymbols(br),ut=[];for(let dt of Object.keys(Je).map(Number))ut.push(sa[dt]);ut.sort(j);for(let dt of ut){let Ct=dt.featureIndex.lookupSymbolFeatures(Je[dt.bucketInstanceId],Bt,dt.bucketIndex,dt.sourceLayerIndex,Ar.filter,Ar.layers,Ar.availableImages,At);for(let wt in Ct){let Dt=He[wt]=He[wt]||[],ur=Ct[wt];ur.sort((mr,Er)=>{let Br=dt.featureSortOrder;if(Br){let Qr=Br.indexOf(mr.featureIndex);return Br.indexOf(Er.featureIndex)-Qr}return Er.featureIndex-mr.featureIndex});for(let mr of ur)Dt.push(mr)}}for(let dt in He)He[dt].forEach(Ct=>{let wt=Ct.feature,Dt=$t[At[dt].source].getFeatureState(wt.layer["source-layer"],wt.id);wt.source=wt.layer.source,wt.layer["source-layer"]&&(wt.sourceLayer=wt.layer["source-layer"]),wt.state=Dt});return He}(this._layers,pt,this.sourceCaches,R,ae,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Oe)}querySourceFeatures(R,ae){ae&&ae.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",ae.filter,null,ae);let we=this.sourceCaches[R];return we?function(Se,Oe){let pt=Se.getRenderableIds().map($t=>Se.getTileByID($t)),At=[],Bt={};for(let $t=0;$t<pt.length;$t++){let br=pt[$t],Ar=br.tileID.canonical.key;Bt[Ar]||(Bt[Ar]=!0,br.querySourceFeatures(At,Oe))}return At}(we,ae):[]}getLight(){return this.light.getLight()}setLight(R,ae={}){this._checkLoaded();let we=this.light.getLight(),Se=!1;for(let pt in R)if(!t.aE(R[pt],we[pt])){Se=!0;break}if(!Se)return;let Oe={now:i.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(R,ae),this.light.updateTransitions(Oe)}getSky(){var R;return(R=this.stylesheet)===null||R===void 0?void 0:R.sky}setSky(R,ae={}){let we=this.getSky(),Se=!1;if(!R&&!we)return;if(R&&!we)Se=!0;else if(!R&&we)Se=!0;else for(let pt in R)if(!t.aE(R[pt],we[pt])){Se=!0;break}if(!Se)return;let Oe={now:i.now(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=R,this.sky.setSky(R,ae),this.sky.updateTransitions(Oe)}_validate(R,ae,we,Se,Oe={}){return(!Oe||Oe.validate!==!1)&&Kr(this,R.call(t.u,t.e({key:ae,style:this.serialize(),value:we,styleSpec:t.v},Se)))}_remove(R=!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),rt().off(_e,this._rtlPluginLoaded);for(let ae in this._layers)this._layers[ae].setEventedParent(null);for(let ae in this.sourceCaches){let we=this.sourceCaches[ae];we.setEventedParent(null),we.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),R&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(R)}_clearSource(R){this.sourceCaches[R].clearTiles()}_reloadSource(R){this.sourceCaches[R].resume(),this.sourceCaches[R].reload()}_updateSources(R){for(let ae in this.sourceCaches)this.sourceCaches[ae].update(R,this.map.terrain)}_generateCollisionBoxes(){for(let R in this.sourceCaches)this._reloadSource(R)}_updatePlacement(R,ae,we,Se,Oe=!1){let pt=!1,At=!1,Bt={};for(let $t of this._order){let br=this._layers[$t];if(br.type!=="symbol")continue;if(!Bt[br.source]){let Yr=this.sourceCaches[br.source];Bt[br.source]=Yr.getRenderableIds(!0).map(sa=>Yr.getTileByID(sa)).sort((sa,He)=>He.tileID.overscaledZ-sa.tileID.overscaledZ||(sa.tileID.isLessThan(He.tileID)?-1:1))}let Ar=this.crossTileSymbolIndex.addLayer(br,Bt[br.source],R.center.lng);pt=pt||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Oe=Oe||this._layerOrderChanged||we===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.now(),R.zoom))&&(this.pauseablePlacement=new ct(R,this.map.terrain,this._order,Oe,ae,we,Se,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Bt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.now()),At=!0),pt&&this.pauseablePlacement.placement.setStale()),At||pt)for(let $t of this._order){let br=this._layers[$t];br.type==="symbol"&&this.placement.updateLayerOpacities(br,Bt[br.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.now())}_releaseSymbolFadeTiles(){for(let R in this.sourceCaches)this.sourceCaches[R].releaseSymbolFadeTiles()}getImages(R,ae){return t._(this,void 0,void 0,function*(){let we=yield this.imageManager.getImages(ae.icons);this._updateTilesForChangedImages();let Se=this.sourceCaches[ae.source];return Se&&Se.setDependencies(ae.tileID.key,ae.type,ae.icons),we})}getGlyphs(R,ae){return t._(this,void 0,void 0,function*(){let we=yield this.glyphManager.getGlyphs(ae.stacks),Se=this.sourceCaches[ae.source];return Se&&Se.setDependencies(ae.tileID.key,ae.type,[""]),we})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(R,ae={}){this._checkLoaded(),R&&this._validate(t.u.glyphs,"glyphs",R,null,ae)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=R,this.glyphManager.entries={},this.glyphManager.setURL(R))}addSprite(R,ae,we={},Se){this._checkLoaded();let Oe=[{id:R,url:ae}],pt=[...b(this.stylesheet.sprite),...Oe];this._validate(t.u.sprite,"sprite",pt,null,we)||(this.stylesheet.sprite=pt,this._loadSprite(Oe,!0,Se))}removeSprite(R){this._checkLoaded();let ae=b(this.stylesheet.sprite);if(ae.find(we=>we.id===R)){if(this._spritesImagesIds[R])for(let we of this._spritesImagesIds[R])this.imageManager.removeImage(we),this._changedImages[we]=!0;ae.splice(ae.findIndex(we=>we.id===R),1),this.stylesheet.sprite=ae.length>0?ae:void 0,delete this._spritesImagesIds[R],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}else this.fire(new t.j(new Error(`Sprite "${R}" doesn't exists on this map.`)))}getSprite(){return b(this.stylesheet.sprite)}setSprite(R,ae={},we){this._checkLoaded(),R&&this._validate(t.u.sprite,"sprite",R,null,ae)||(this.stylesheet.sprite=R,R?this._loadSprite(R,!0,we):(this._unloadSprite(),we&&we(null)))}}var da=t.Y([{name:"a_pos",type:"Int16",components:2}]);let fa={prelude:It(`#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:It(`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:It(`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:It(`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:It("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:It(`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:It(`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:It("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:It("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:It("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:It(`#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:It(`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:It(`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:It(`#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:It(`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:It(`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:It(`#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:It(`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:It(`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:It(`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:It(`#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:It(`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:It(`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:It(`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:It(`#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:It(`#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:It("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:It("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:It("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:It("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 It(Ne,R){let ae=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,we=R.match(/attribute ([\w]+) ([\w]+)/g),Se=Ne.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Oe=R.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),pt=Oe?Oe.concat(Se):Se,At={};return{fragmentSource:Ne=Ne.replace(ae,(Bt,$t,br,Ar,Yr)=>(At[Yr]=!0,$t==="define"?`
#ifndef HAS_UNIFORM_u_${Yr}
varying ${br} ${Ar} ${Yr};
#else
uniform ${br} ${Ar} u_${Yr};
#endif
`:`
#ifdef HAS_UNIFORM_u_${Yr}
${br} ${Ar} ${Yr} = u_${Yr};
#endif
`)),vertexSource:R=R.replace(ae,(Bt,$t,br,Ar,Yr)=>{let sa=Ar==="float"?"vec2":"vec4",He=Yr.match(/color/)?"color":sa;return At[Yr]?$t==="define"?`
#ifndef HAS_UNIFORM_u_${Yr}
uniform lowp float u_${Yr}_t;
attribute ${br} ${sa} a_${Yr};
varying ${br} ${Ar} ${Yr};
#else
uniform ${br} ${Ar} u_${Yr};
#endif
`:He==="vec4"?`
#ifndef HAS_UNIFORM_u_${Yr}
${Yr} = a_${Yr};
#else
${br} ${Ar} ${Yr} = u_${Yr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Yr}
${Yr} = unpack_mix_${He}(a_${Yr}, u_${Yr}_t);
#else
${br} ${Ar} ${Yr} = u_${Yr};
#endif
`:$t==="define"?`
#ifndef HAS_UNIFORM_u_${Yr}
uniform lowp float u_${Yr}_t;
attribute ${br} ${sa} a_${Yr};
#else
uniform ${br} ${Ar} u_${Yr};
#endif
`:He==="vec4"?`
#ifndef HAS_UNIFORM_u_${Yr}
${br} ${Ar} ${Yr} = a_${Yr};
#else
${br} ${Ar} ${Yr} = u_${Yr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${Yr}
${br} ${Ar} ${Yr} = unpack_mix_${He}(a_${Yr}, u_${Yr}_t);
#else
${br} ${Ar} ${Yr} = u_${Yr};
#endif
`}),staticAttributes:we,staticUniforms:pt}}class dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(R,ae,we,Se,Oe,pt,At,Bt,$t){this.context=R;let br=this.boundPaintVertexBuffers.length!==Se.length;for(let Ar=0;!br&&Ar<Se.length;Ar++)this.boundPaintVertexBuffers[Ar]!==Se[Ar]&&(br=!0);!this.vao||this.boundProgram!==ae||this.boundLayoutVertexBuffer!==we||br||this.boundIndexBuffer!==Oe||this.boundVertexOffset!==pt||this.boundDynamicVertexBuffer!==At||this.boundDynamicVertexBuffer2!==Bt||this.boundDynamicVertexBuffer3!==$t?this.freshBind(ae,we,Se,Oe,pt,At,Bt,$t):(R.bindVertexArray.set(this.vao),At&&At.bind(),Oe&&Oe.dynamicDraw&&Oe.bind(),Bt&&Bt.bind(),$t&&$t.bind())}freshBind(R,ae,we,Se,Oe,pt,At,Bt){let $t=R.numAttributes,br=this.context,Ar=br.gl;this.vao&&this.destroy(),this.vao=br.createVertexArray(),br.bindVertexArray.set(this.vao),this.boundProgram=R,this.boundLayoutVertexBuffer=ae,this.boundPaintVertexBuffers=we,this.boundIndexBuffer=Se,this.boundVertexOffset=Oe,this.boundDynamicVertexBuffer=pt,this.boundDynamicVertexBuffer2=At,this.boundDynamicVertexBuffer3=Bt,ae.enableAttributes(Ar,R);for(let Yr of we)Yr.enableAttributes(Ar,R);pt&&pt.enableAttributes(Ar,R),At&&At.enableAttributes(Ar,R),Bt&&Bt.enableAttributes(Ar,R),ae.bind(),ae.setVertexAttribPointers(Ar,R,Oe);for(let Yr of we)Yr.bind(),Yr.setVertexAttribPointers(Ar,R,Oe);pt&&(pt.bind(),pt.setVertexAttribPointers(Ar,R,Oe)),Se&&Se.bind(),At&&(At.bind(),At.setVertexAttribPointers(Ar,R,Oe)),Bt&&(Bt.bind(),Bt.setVertexAttribPointers(Ar,R,Oe)),br.currentNumAttributes=$t}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let kr=(Ne,R,ae,we,Se)=>({u_matrix:Ne,u_texture:0,u_ele_delta:R,u_fog_matrix:ae,u_fog_color:we?we.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:we?we.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:we?we.calculateFogBlendOpacity(Se):0,u_horizon_color:we?we.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:we?we.properties.get("horizon-fog-blend"):1});function ia(Ne){let R=[];for(let ae=0;ae<Ne.length;ae++){if(Ne[ae]===null)continue;let we=Ne[ae].split(" ");R.push(we.pop())}return R}class Ca{constructor(R,ae,we,Se,Oe,pt){let At=R.gl;this.program=At.createProgram();let Bt=ia(ae.staticAttributes),$t=we?we.getBinderAttributes():[],br=Bt.concat($t),Ar=fa.prelude.staticUniforms?ia(fa.prelude.staticUniforms):[],Yr=ae.staticUniforms?ia(ae.staticUniforms):[],sa=we?we.getBinderUniforms():[],He=Ar.concat(Yr).concat(sa),Je=[];for(let mr of He)Je.indexOf(mr)<0&&Je.push(mr);let ut=we?we.defines():[];Oe&&ut.push("#define OVERDRAW_INSPECTOR;"),pt&&ut.push("#define TERRAIN3D;");let dt=ut.concat(fa.prelude.fragmentSource,ae.fragmentSource).join(`
`),Ct=ut.concat(fa.prelude.vertexSource,ae.vertexSource).join(`
`),wt=At.createShader(At.FRAGMENT_SHADER);if(At.isContextLost())return void(this.failedToCreate=!0);if(At.shaderSource(wt,dt),At.compileShader(wt),!At.getShaderParameter(wt,At.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${At.getShaderInfoLog(wt)}`);At.attachShader(this.program,wt);let Dt=At.createShader(At.VERTEX_SHADER);if(At.isContextLost())return void(this.failedToCreate=!0);if(At.shaderSource(Dt,Ct),At.compileShader(Dt),!At.getShaderParameter(Dt,At.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${At.getShaderInfoLog(Dt)}`);At.attachShader(this.program,Dt),this.attributes={};let ur={};this.numAttributes=br.length;for(let mr=0;mr<this.numAttributes;mr++)br[mr]&&(At.bindAttribLocation(this.program,mr,br[mr]),this.attributes[br[mr]]=mr);if(At.linkProgram(this.program),!At.getProgramParameter(this.program,At.LINK_STATUS))throw new Error(`Program failed to link: ${At.getProgramInfoLog(this.program)}`);At.deleteShader(Dt),At.deleteShader(wt);for(let mr=0;mr<Je.length;mr++){let Er=Je[mr];if(Er&&!ur[Er]){let Br=At.getUniformLocation(this.program,Er);Br&&(ur[Er]=Br)}}this.fixedUniforms=Se(R,ur),this.terrainUniforms=((mr,Er)=>({u_depth:new t.aH(mr,Er.u_depth),u_terrain:new t.aH(mr,Er.u_terrain),u_terrain_dim:new t.aI(mr,Er.u_terrain_dim),u_terrain_matrix:new t.aJ(mr,Er.u_terrain_matrix),u_terrain_unpack:new t.aK(mr,Er.u_terrain_unpack),u_terrain_exaggeration:new t.aI(mr,Er.u_terrain_exaggeration)}))(R,ur),this.binderUniforms=we?we.getUniforms(R,ur):[]}draw(R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa,He,Je,ut,dt,Ct){let wt=R.gl;if(this.failedToCreate)return;if(R.program.set(this.program),R.setDepthMode(we),R.setStencilMode(Se),R.setColorMode(Oe),R.setCullFace(pt),Bt){R.activeTexture.set(wt.TEXTURE2),wt.bindTexture(wt.TEXTURE_2D,Bt.depthTexture),R.activeTexture.set(wt.TEXTURE3),wt.bindTexture(wt.TEXTURE_2D,Bt.texture);for(let ur in this.terrainUniforms)this.terrainUniforms[ur].set(Bt[ur])}for(let ur in this.fixedUniforms)this.fixedUniforms[ur].set(At[ur]);Je&&Je.setUniforms(R,this.binderUniforms,sa,{zoom:He});let Dt=0;switch(ae){case wt.LINES:Dt=2;break;case wt.TRIANGLES:Dt=3;break;case wt.LINE_STRIP:Dt=1}for(let ur of Yr.get()){let mr=ur.vaos||(ur.vaos={});(mr[$t]||(mr[$t]=new dr)).bind(R,this,br,Je?Je.getPaintVertexBuffers():[],Ar,ur.vertexOffset,ut,dt,Ct),wt.drawElements(ae,ur.primitiveLength*Dt,wt.UNSIGNED_SHORT,ur.primitiveOffset*Dt*2)}}}function Fa(Ne,R,ae){let we=1/Ua(ae,1,R.transform.tileZoom),Se=Math.pow(2,ae.tileID.overscaledZ),Oe=ae.tileSize*Math.pow(2,R.transform.tileZoom)/Se,pt=Oe*(ae.tileID.canonical.x+ae.tileID.wrap*Se),At=Oe*ae.tileID.canonical.y;return{u_image:0,u_texsize:ae.imageAtlasTexture.size,u_scale:[we,Ne.fromScale,Ne.toScale],u_fade:Ne.t,u_pixel_coord_upper:[pt>>16,At>>16],u_pixel_coord_lower:[65535&pt,65535&At]}}let Ya=(Ne,R,ae,we)=>{let Se=R.style.light,Oe=Se.properties.get("position"),pt=[Oe.x,Oe.y,Oe.z],At=function(){var $t=new t.A(9);return t.A!=Float32Array&&($t[1]=0,$t[2]=0,$t[3]=0,$t[5]=0,$t[6]=0,$t[7]=0),$t[0]=1,$t[4]=1,$t[8]=1,$t}();Se.properties.get("anchor")==="viewport"&&function($t,br){var Ar=Math.sin(br),Yr=Math.cos(br);$t[0]=Yr,$t[1]=Ar,$t[2]=0,$t[3]=-Ar,$t[4]=Yr,$t[5]=0,$t[6]=0,$t[7]=0,$t[8]=1}(At,-R.transform.angle),function($t,br,Ar){var Yr=br[0],sa=br[1],He=br[2];$t[0]=Yr*Ar[0]+sa*Ar[3]+He*Ar[6],$t[1]=Yr*Ar[1]+sa*Ar[4]+He*Ar[7],$t[2]=Yr*Ar[2]+sa*Ar[5]+He*Ar[8]}(pt,pt,At);let Bt=Se.properties.get("color");return{u_matrix:Ne,u_lightpos:pt,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[Bt.r,Bt.g,Bt.b],u_vertical_gradient:+ae,u_opacity:we}},ha=(Ne,R,ae,we,Se,Oe,pt)=>t.e(Ya(Ne,R,ae,we),Fa(Oe,R,pt),{u_height_factor:-Math.pow(2,Se.overscaledZ)/pt.tileSize/8}),Da=Ne=>({u_matrix:Ne}),Xi=(Ne,R,ae,we)=>t.e(Da(Ne),Fa(ae,R,we)),Li=(Ne,R)=>({u_matrix:Ne,u_world:R}),fn=(Ne,R,ae,we,Se)=>t.e(Xi(Ne,R,ae,we),{u_world:Se}),An=(Ne,R,ae,we)=>{let Se=Ne.transform,Oe,pt;if(we.paint.get("circle-pitch-alignment")==="map"){let At=Ua(ae,1,Se.zoom);Oe=!0,pt=[At,At]}else Oe=!1,pt=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(we.paint.get("circle-pitch-scale")==="map"),u_matrix:Ne.translatePosMatrix(R.posMatrix,ae,we.paint.get("circle-translate"),we.paint.get("circle-translate-anchor")),u_pitch_with_map:+Oe,u_device_pixel_ratio:Ne.pixelRatio,u_extrude_scale:pt}},kn=(Ne,R,ae)=>({u_matrix:Ne,u_inv_matrix:R,u_camera_to_center_distance:ae.cameraToCenterDistance,u_viewport_size:[ae.width,ae.height]}),zn=(Ne,R,ae=1)=>({u_matrix:Ne,u_color:R,u_overlay:0,u_overlay_scale:ae}),Xn=Ne=>({u_matrix:Ne}),to=(Ne,R,ae,we)=>({u_matrix:Ne,u_extrude_scale:Ua(R,1,ae),u_intensity:we}),mo=(Ne,R,ae,we)=>{let Se=t.H();t.aP(Se,0,Ne.width,Ne.height,0,0,1);let Oe=Ne.context.gl;return{u_matrix:Se,u_world:[Oe.drawingBufferWidth,Oe.drawingBufferHeight],u_image:ae,u_color_ramp:we,u_opacity:R.paint.get("heatmap-opacity")}};function pn(Ne,R){let ae=Math.pow(2,R.canonical.z),we=R.canonical.y;return[new t.Z(0,we/ae).toLngLat().lat,new t.Z(0,(we+1)/ae).toLngLat().lat]}let Jo=(Ne,R,ae,we)=>{let Se=Ne.transform;return{u_matrix:Vn(Ne,R,ae,we),u_ratio:1/Ua(R,1,Se.zoom),u_device_pixel_ratio:Ne.pixelRatio,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},Xo=(Ne,R,ae,we,Se)=>t.e(Jo(Ne,R,ae,Se),{u_image:0,u_image_height:we}),Ts=(Ne,R,ae,we,Se)=>{let Oe=Ne.transform,pt=so(R,Oe);return{u_matrix:Vn(Ne,R,ae,Se),u_texsize:R.imageAtlasTexture.size,u_ratio:1/Ua(R,1,Oe.zoom),u_device_pixel_ratio:Ne.pixelRatio,u_image:0,u_scale:[pt,we.fromScale,we.toScale],u_fade:we.t,u_units_to_pixels:[1/Oe.pixelsToGLUnits[0],1/Oe.pixelsToGLUnits[1]]}},Po=(Ne,R,ae,we,Se,Oe)=>{let pt=Ne.lineAtlas,At=so(R,Ne.transform),Bt=ae.layout.get("line-cap")==="round",$t=pt.getDash(we.from,Bt),br=pt.getDash(we.to,Bt),Ar=$t.width*Se.fromScale,Yr=br.width*Se.toScale;return t.e(Jo(Ne,R,ae,Oe),{u_patternscale_a:[At/Ar,-$t.height/2],u_patternscale_b:[At/Yr,-br.height/2],u_sdfgamma:pt.width/(256*Math.min(Ar,Yr)*Ne.pixelRatio)/2,u_image:0,u_tex_y_a:$t.y,u_tex_y_b:br.y,u_mix:Se.t})};function so(Ne,R){return 1/Ua(Ne,1,R.tileZoom)}function Vn(Ne,R,ae,we){return Ne.translatePosMatrix(we?we.posMatrix:R.tileID.posMatrix,R,ae.paint.get("line-translate"),ae.paint.get("line-translate-anchor"))}let To=(Ne,R,ae,we,Se)=>{return{u_matrix:Ne,u_tl_parent:R,u_scale_parent:ae,u_buffer_scale:1,u_fade_t:we.mix,u_opacity:we.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:(pt=Se.paint.get("raster-saturation"),pt>0?1-1/(1.001-pt):-pt),u_contrast_factor:(Oe=Se.paint.get("raster-contrast"),Oe>0?1/(1-Oe):1+Oe),u_spin_weights:qo(Se.paint.get("raster-hue-rotate"))};var Oe,pt};function qo(Ne){Ne*=Math.PI/180;let R=Math.sin(Ne),ae=Math.cos(Ne);return[(2*ae+1)/3,(-Math.sqrt(3)*R-ae+1)/3,(Math.sqrt(3)*R-ae+1)/3]}let Oo=(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa)=>{let He=pt.transform;return{u_is_size_zoom_constant:+(Ne==="constant"||Ne==="source"),u_is_size_feature_constant:+(Ne==="constant"||Ne==="camera"),u_size_t:R?R.uSizeT:0,u_size:R?R.uSize:0,u_camera_to_center_distance:He.cameraToCenterDistance,u_pitch:He.pitch/360*2*Math.PI,u_rotate_symbol:+ae,u_aspect_ratio:He.width/He.height,u_fade_change:pt.options.fadeDuration?pt.symbolFadeChange:1,u_matrix:At,u_label_plane_matrix:Bt,u_coord_matrix:$t,u_is_text:+Ar,u_pitch_with_map:+we,u_is_along_line:Se,u_is_variable_anchor:Oe,u_texsize:Yr,u_texture:0,u_translation:br,u_pitched_scale:sa}},lo=(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa,He)=>{let Je=pt.transform;return t.e(Oo(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,He),{u_gamma_scale:we?Math.cos(Je._pitch)*Je.cameraToCenterDistance:1,u_device_pixel_ratio:pt.pixelRatio,u_is_halo:+sa})},Co=(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa)=>t.e(lo(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,!0,Ar,!0,sa),{u_texsize_icon:Yr,u_texture_icon:1}),os=(Ne,R,ae)=>({u_matrix:Ne,u_opacity:R,u_color:ae}),Ys=(Ne,R,ae,we,Se,Oe)=>t.e(function(pt,At,Bt,$t){let br=Bt.imageManager.getPattern(pt.from.toString()),Ar=Bt.imageManager.getPattern(pt.to.toString()),{width:Yr,height:sa}=Bt.imageManager.getPixelSize(),He=Math.pow(2,$t.tileID.overscaledZ),Je=$t.tileSize*Math.pow(2,Bt.transform.tileZoom)/He,ut=Je*($t.tileID.canonical.x+$t.tileID.wrap*He),dt=Je*$t.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:br.tl,u_pattern_br_a:br.br,u_pattern_tl_b:Ar.tl,u_pattern_br_b:Ar.br,u_texsize:[Yr,sa],u_mix:At.t,u_pattern_size_a:br.displaySize,u_pattern_size_b:Ar.displaySize,u_scale_a:At.fromScale,u_scale_b:At.toScale,u_tile_units_to_pixels:1/Ua($t,1,Bt.transform.tileZoom),u_pixel_coord_upper:[ut>>16,dt>>16],u_pixel_coord_lower:[65535&ut,65535&dt]}}(we,Oe,ae,Se),{u_matrix:Ne,u_opacity:R}),Os={fillExtrusion:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_lightpos:new t.aN(Ne,R.u_lightpos),u_lightintensity:new t.aI(Ne,R.u_lightintensity),u_lightcolor:new t.aN(Ne,R.u_lightcolor),u_vertical_gradient:new t.aI(Ne,R.u_vertical_gradient),u_opacity:new t.aI(Ne,R.u_opacity)}),fillExtrusionPattern:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_lightpos:new t.aN(Ne,R.u_lightpos),u_lightintensity:new t.aI(Ne,R.u_lightintensity),u_lightcolor:new t.aN(Ne,R.u_lightcolor),u_vertical_gradient:new t.aI(Ne,R.u_vertical_gradient),u_height_factor:new t.aI(Ne,R.u_height_factor),u_image:new t.aH(Ne,R.u_image),u_texsize:new t.aO(Ne,R.u_texsize),u_pixel_coord_upper:new t.aO(Ne,R.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ne,R.u_pixel_coord_lower),u_scale:new t.aN(Ne,R.u_scale),u_fade:new t.aI(Ne,R.u_fade),u_opacity:new t.aI(Ne,R.u_opacity)}),fill:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix)}),fillPattern:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_image:new t.aH(Ne,R.u_image),u_texsize:new t.aO(Ne,R.u_texsize),u_pixel_coord_upper:new t.aO(Ne,R.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ne,R.u_pixel_coord_lower),u_scale:new t.aN(Ne,R.u_scale),u_fade:new t.aI(Ne,R.u_fade)}),fillOutline:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_world:new t.aO(Ne,R.u_world)}),fillOutlinePattern:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_world:new t.aO(Ne,R.u_world),u_image:new t.aH(Ne,R.u_image),u_texsize:new t.aO(Ne,R.u_texsize),u_pixel_coord_upper:new t.aO(Ne,R.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ne,R.u_pixel_coord_lower),u_scale:new t.aN(Ne,R.u_scale),u_fade:new t.aI(Ne,R.u_fade)}),circle:(Ne,R)=>({u_camera_to_center_distance:new t.aI(Ne,R.u_camera_to_center_distance),u_scale_with_map:new t.aH(Ne,R.u_scale_with_map),u_pitch_with_map:new t.aH(Ne,R.u_pitch_with_map),u_extrude_scale:new t.aO(Ne,R.u_extrude_scale),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_matrix:new t.aJ(Ne,R.u_matrix)}),collisionBox:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_pixel_extrude_scale:new t.aO(Ne,R.u_pixel_extrude_scale)}),collisionCircle:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_inv_matrix:new t.aJ(Ne,R.u_inv_matrix),u_camera_to_center_distance:new t.aI(Ne,R.u_camera_to_center_distance),u_viewport_size:new t.aO(Ne,R.u_viewport_size)}),debug:(Ne,R)=>({u_color:new t.aL(Ne,R.u_color),u_matrix:new t.aJ(Ne,R.u_matrix),u_overlay:new t.aH(Ne,R.u_overlay),u_overlay_scale:new t.aI(Ne,R.u_overlay_scale)}),clippingMask:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix)}),heatmap:(Ne,R)=>({u_extrude_scale:new t.aI(Ne,R.u_extrude_scale),u_intensity:new t.aI(Ne,R.u_intensity),u_matrix:new t.aJ(Ne,R.u_matrix)}),heatmapTexture:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_world:new t.aO(Ne,R.u_world),u_image:new t.aH(Ne,R.u_image),u_color_ramp:new t.aH(Ne,R.u_color_ramp),u_opacity:new t.aI(Ne,R.u_opacity)}),hillshade:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_image:new t.aH(Ne,R.u_image),u_latrange:new t.aO(Ne,R.u_latrange),u_light:new t.aO(Ne,R.u_light),u_shadow:new t.aL(Ne,R.u_shadow),u_highlight:new t.aL(Ne,R.u_highlight),u_accent:new t.aL(Ne,R.u_accent)}),hillshadePrepare:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_image:new t.aH(Ne,R.u_image),u_dimension:new t.aO(Ne,R.u_dimension),u_zoom:new t.aI(Ne,R.u_zoom),u_unpack:new t.aK(Ne,R.u_unpack)}),line:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_ratio:new t.aI(Ne,R.u_ratio),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ne,R.u_units_to_pixels)}),lineGradient:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_ratio:new t.aI(Ne,R.u_ratio),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ne,R.u_units_to_pixels),u_image:new t.aH(Ne,R.u_image),u_image_height:new t.aI(Ne,R.u_image_height)}),linePattern:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_texsize:new t.aO(Ne,R.u_texsize),u_ratio:new t.aI(Ne,R.u_ratio),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_image:new t.aH(Ne,R.u_image),u_units_to_pixels:new t.aO(Ne,R.u_units_to_pixels),u_scale:new t.aN(Ne,R.u_scale),u_fade:new t.aI(Ne,R.u_fade)}),lineSDF:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_ratio:new t.aI(Ne,R.u_ratio),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_units_to_pixels:new t.aO(Ne,R.u_units_to_pixels),u_patternscale_a:new t.aO(Ne,R.u_patternscale_a),u_patternscale_b:new t.aO(Ne,R.u_patternscale_b),u_sdfgamma:new t.aI(Ne,R.u_sdfgamma),u_image:new t.aH(Ne,R.u_image),u_tex_y_a:new t.aI(Ne,R.u_tex_y_a),u_tex_y_b:new t.aI(Ne,R.u_tex_y_b),u_mix:new t.aI(Ne,R.u_mix)}),raster:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_tl_parent:new t.aO(Ne,R.u_tl_parent),u_scale_parent:new t.aI(Ne,R.u_scale_parent),u_buffer_scale:new t.aI(Ne,R.u_buffer_scale),u_fade_t:new t.aI(Ne,R.u_fade_t),u_opacity:new t.aI(Ne,R.u_opacity),u_image0:new t.aH(Ne,R.u_image0),u_image1:new t.aH(Ne,R.u_image1),u_brightness_low:new t.aI(Ne,R.u_brightness_low),u_brightness_high:new t.aI(Ne,R.u_brightness_high),u_saturation_factor:new t.aI(Ne,R.u_saturation_factor),u_contrast_factor:new t.aI(Ne,R.u_contrast_factor),u_spin_weights:new t.aN(Ne,R.u_spin_weights)}),symbolIcon:(Ne,R)=>({u_is_size_zoom_constant:new t.aH(Ne,R.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ne,R.u_is_size_feature_constant),u_size_t:new t.aI(Ne,R.u_size_t),u_size:new t.aI(Ne,R.u_size),u_camera_to_center_distance:new t.aI(Ne,R.u_camera_to_center_distance),u_pitch:new t.aI(Ne,R.u_pitch),u_rotate_symbol:new t.aH(Ne,R.u_rotate_symbol),u_aspect_ratio:new t.aI(Ne,R.u_aspect_ratio),u_fade_change:new t.aI(Ne,R.u_fade_change),u_matrix:new t.aJ(Ne,R.u_matrix),u_label_plane_matrix:new t.aJ(Ne,R.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ne,R.u_coord_matrix),u_is_text:new t.aH(Ne,R.u_is_text),u_pitch_with_map:new t.aH(Ne,R.u_pitch_with_map),u_is_along_line:new t.aH(Ne,R.u_is_along_line),u_is_variable_anchor:new t.aH(Ne,R.u_is_variable_anchor),u_texsize:new t.aO(Ne,R.u_texsize),u_texture:new t.aH(Ne,R.u_texture),u_translation:new t.aO(Ne,R.u_translation),u_pitched_scale:new t.aI(Ne,R.u_pitched_scale)}),symbolSDF:(Ne,R)=>({u_is_size_zoom_constant:new t.aH(Ne,R.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ne,R.u_is_size_feature_constant),u_size_t:new t.aI(Ne,R.u_size_t),u_size:new t.aI(Ne,R.u_size),u_camera_to_center_distance:new t.aI(Ne,R.u_camera_to_center_distance),u_pitch:new t.aI(Ne,R.u_pitch),u_rotate_symbol:new t.aH(Ne,R.u_rotate_symbol),u_aspect_ratio:new t.aI(Ne,R.u_aspect_ratio),u_fade_change:new t.aI(Ne,R.u_fade_change),u_matrix:new t.aJ(Ne,R.u_matrix),u_label_plane_matrix:new t.aJ(Ne,R.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ne,R.u_coord_matrix),u_is_text:new t.aH(Ne,R.u_is_text),u_pitch_with_map:new t.aH(Ne,R.u_pitch_with_map),u_is_along_line:new t.aH(Ne,R.u_is_along_line),u_is_variable_anchor:new t.aH(Ne,R.u_is_variable_anchor),u_texsize:new t.aO(Ne,R.u_texsize),u_texture:new t.aH(Ne,R.u_texture),u_gamma_scale:new t.aI(Ne,R.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_is_halo:new t.aH(Ne,R.u_is_halo),u_translation:new t.aO(Ne,R.u_translation),u_pitched_scale:new t.aI(Ne,R.u_pitched_scale)}),symbolTextAndIcon:(Ne,R)=>({u_is_size_zoom_constant:new t.aH(Ne,R.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(Ne,R.u_is_size_feature_constant),u_size_t:new t.aI(Ne,R.u_size_t),u_size:new t.aI(Ne,R.u_size),u_camera_to_center_distance:new t.aI(Ne,R.u_camera_to_center_distance),u_pitch:new t.aI(Ne,R.u_pitch),u_rotate_symbol:new t.aH(Ne,R.u_rotate_symbol),u_aspect_ratio:new t.aI(Ne,R.u_aspect_ratio),u_fade_change:new t.aI(Ne,R.u_fade_change),u_matrix:new t.aJ(Ne,R.u_matrix),u_label_plane_matrix:new t.aJ(Ne,R.u_label_plane_matrix),u_coord_matrix:new t.aJ(Ne,R.u_coord_matrix),u_is_text:new t.aH(Ne,R.u_is_text),u_pitch_with_map:new t.aH(Ne,R.u_pitch_with_map),u_is_along_line:new t.aH(Ne,R.u_is_along_line),u_is_variable_anchor:new t.aH(Ne,R.u_is_variable_anchor),u_texsize:new t.aO(Ne,R.u_texsize),u_texsize_icon:new t.aO(Ne,R.u_texsize_icon),u_texture:new t.aH(Ne,R.u_texture),u_texture_icon:new t.aH(Ne,R.u_texture_icon),u_gamma_scale:new t.aI(Ne,R.u_gamma_scale),u_device_pixel_ratio:new t.aI(Ne,R.u_device_pixel_ratio),u_is_halo:new t.aH(Ne,R.u_is_halo),u_translation:new t.aO(Ne,R.u_translation),u_pitched_scale:new t.aI(Ne,R.u_pitched_scale)}),background:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_opacity:new t.aI(Ne,R.u_opacity),u_color:new t.aL(Ne,R.u_color)}),backgroundPattern:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_opacity:new t.aI(Ne,R.u_opacity),u_image:new t.aH(Ne,R.u_image),u_pattern_tl_a:new t.aO(Ne,R.u_pattern_tl_a),u_pattern_br_a:new t.aO(Ne,R.u_pattern_br_a),u_pattern_tl_b:new t.aO(Ne,R.u_pattern_tl_b),u_pattern_br_b:new t.aO(Ne,R.u_pattern_br_b),u_texsize:new t.aO(Ne,R.u_texsize),u_mix:new t.aI(Ne,R.u_mix),u_pattern_size_a:new t.aO(Ne,R.u_pattern_size_a),u_pattern_size_b:new t.aO(Ne,R.u_pattern_size_b),u_scale_a:new t.aI(Ne,R.u_scale_a),u_scale_b:new t.aI(Ne,R.u_scale_b),u_pixel_coord_upper:new t.aO(Ne,R.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(Ne,R.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(Ne,R.u_tile_units_to_pixels)}),terrain:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_texture:new t.aH(Ne,R.u_texture),u_ele_delta:new t.aI(Ne,R.u_ele_delta),u_fog_matrix:new t.aJ(Ne,R.u_fog_matrix),u_fog_color:new t.aL(Ne,R.u_fog_color),u_fog_ground_blend:new t.aI(Ne,R.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(Ne,R.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(Ne,R.u_horizon_color),u_horizon_fog_blend:new t.aI(Ne,R.u_horizon_fog_blend)}),terrainDepth:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_ele_delta:new t.aI(Ne,R.u_ele_delta)}),terrainCoords:(Ne,R)=>({u_matrix:new t.aJ(Ne,R.u_matrix),u_texture:new t.aH(Ne,R.u_texture),u_terrain_coords_id:new t.aI(Ne,R.u_terrain_coords_id),u_ele_delta:new t.aI(Ne,R.u_ele_delta)}),sky:(Ne,R)=>({u_sky_color:new t.aL(Ne,R.u_sky_color),u_horizon_color:new t.aL(Ne,R.u_horizon_color),u_horizon:new t.aI(Ne,R.u_horizon),u_sky_horizon_blend:new t.aI(Ne,R.u_sky_horizon_blend)})};class Yo{constructor(R,ae,we){this.context=R;let Se=R.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!we,this.context.unbindVAO(),R.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ae.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.STATIC_DRAW),this.dynamicDraw||delete ae.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(R){let ae=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ae.bufferSubData(ae.ELEMENT_ARRAY_BUFFER,0,R.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Ui={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Cn{constructor(R,ae,we,Se){this.length=ae.length,this.attributes=we,this.itemSize=ae.bytesPerElement,this.dynamicDraw=Se,this.context=R;let Oe=R.gl;this.buffer=Oe.createBuffer(),R.bindVertexBuffer.set(this.buffer),Oe.bufferData(Oe.ARRAY_BUFFER,ae.arrayBuffer,this.dynamicDraw?Oe.DYNAMIC_DRAW:Oe.STATIC_DRAW),this.dynamicDraw||delete ae.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(R){if(R.length!==this.length)throw new Error(`Length of new data is ${R.length}, which doesn't match current length of ${this.length}`);let ae=this.context.gl;this.bind(),ae.bufferSubData(ae.ARRAY_BUFFER,0,R.arrayBuffer)}enableAttributes(R,ae){for(let we=0;we<this.attributes.length;we++){let Se=ae.attributes[this.attributes[we].name];Se!==void 0&&R.enableVertexAttribArray(Se)}}setVertexAttribPointers(R,ae,we){for(let Se=0;Se<this.attributes.length;Se++){let Oe=this.attributes[Se],pt=ae.attributes[Oe.name];pt!==void 0&&R.vertexAttribPointer(pt,Oe.components,R[Ui[Oe.type]],!1,this.itemSize,Oe.offset+this.itemSize*(we||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let tl=new WeakMap;function Bs(Ne){var R;if(tl.has(Ne))return tl.get(Ne);{let ae=(R=Ne.getParameter(Ne.VERSION))===null||R===void 0?void 0:R.startsWith("WebGL 2.0");return tl.set(Ne,ae),ae}}class uo{constructor(R){this.gl=R.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(R){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class $s extends uo{getDefault(){return t.aM.transparent}set(R){let ae=this.current;(R.r!==ae.r||R.g!==ae.g||R.b!==ae.b||R.a!==ae.a||this.dirty)&&(this.gl.clearColor(R.r,R.g,R.b,R.a),this.current=R,this.dirty=!1)}}class ms extends uo{getDefault(){return 1}set(R){(R!==this.current||this.dirty)&&(this.gl.clearDepth(R),this.current=R,this.dirty=!1)}}class Is extends uo{getDefault(){return 0}set(R){(R!==this.current||this.dirty)&&(this.gl.clearStencil(R),this.current=R,this.dirty=!1)}}class rl extends uo{getDefault(){return[!0,!0,!0,!0]}set(R){let ae=this.current;(R[0]!==ae[0]||R[1]!==ae[1]||R[2]!==ae[2]||R[3]!==ae[3]||this.dirty)&&(this.gl.colorMask(R[0],R[1],R[2],R[3]),this.current=R,this.dirty=!1)}}class Sn extends uo{getDefault(){return!0}set(R){(R!==this.current||this.dirty)&&(this.gl.depthMask(R),this.current=R,this.dirty=!1)}}class po extends uo{getDefault(){return 255}set(R){(R!==this.current||this.dirty)&&(this.gl.stencilMask(R),this.current=R,this.dirty=!1)}}class ro extends uo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(R){let ae=this.current;(R.func!==ae.func||R.ref!==ae.ref||R.mask!==ae.mask||this.dirty)&&(this.gl.stencilFunc(R.func,R.ref,R.mask),this.current=R,this.dirty=!1)}}class As extends uo{getDefault(){let R=this.gl;return[R.KEEP,R.KEEP,R.KEEP]}set(R){let ae=this.current;(R[0]!==ae[0]||R[1]!==ae[1]||R[2]!==ae[2]||this.dirty)&&(this.gl.stencilOp(R[0],R[1],R[2]),this.current=R,this.dirty=!1)}}class al extends uo{getDefault(){return!1}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;R?ae.enable(ae.STENCIL_TEST):ae.disable(ae.STENCIL_TEST),this.current=R,this.dirty=!1}}class $n extends uo{getDefault(){return[0,1]}set(R){let ae=this.current;(R[0]!==ae[0]||R[1]!==ae[1]||this.dirty)&&(this.gl.depthRange(R[0],R[1]),this.current=R,this.dirty=!1)}}class zs extends uo{getDefault(){return!1}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;R?ae.enable(ae.DEPTH_TEST):ae.disable(ae.DEPTH_TEST),this.current=R,this.dirty=!1}}class au extends uo{getDefault(){return this.gl.LESS}set(R){(R!==this.current||this.dirty)&&(this.gl.depthFunc(R),this.current=R,this.dirty=!1)}}class fl extends uo{getDefault(){return!1}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;R?ae.enable(ae.BLEND):ae.disable(ae.BLEND),this.current=R,this.dirty=!1}}class xu extends uo{getDefault(){let R=this.gl;return[R.ONE,R.ZERO]}set(R){let ae=this.current;(R[0]!==ae[0]||R[1]!==ae[1]||this.dirty)&&(this.gl.blendFunc(R[0],R[1]),this.current=R,this.dirty=!1)}}class zl extends uo{getDefault(){return t.aM.transparent}set(R){let ae=this.current;(R.r!==ae.r||R.g!==ae.g||R.b!==ae.b||R.a!==ae.a||this.dirty)&&(this.gl.blendColor(R.r,R.g,R.b,R.a),this.current=R,this.dirty=!1)}}class Ns extends uo{getDefault(){return this.gl.FUNC_ADD}set(R){(R!==this.current||this.dirty)&&(this.gl.blendEquation(R),this.current=R,this.dirty=!1)}}class iu extends uo{getDefault(){return!1}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;R?ae.enable(ae.CULL_FACE):ae.disable(ae.CULL_FACE),this.current=R,this.dirty=!1}}class Eu extends uo{getDefault(){return this.gl.BACK}set(R){(R!==this.current||this.dirty)&&(this.gl.cullFace(R),this.current=R,this.dirty=!1)}}class Bc extends uo{getDefault(){return this.gl.CCW}set(R){(R!==this.current||this.dirty)&&(this.gl.frontFace(R),this.current=R,this.dirty=!1)}}class Cu extends uo{getDefault(){return null}set(R){(R!==this.current||this.dirty)&&(this.gl.useProgram(R),this.current=R,this.dirty=!1)}}class Af extends uo{getDefault(){return this.gl.TEXTURE0}set(R){(R!==this.current||this.dirty)&&(this.gl.activeTexture(R),this.current=R,this.dirty=!1)}}class pf extends uo{getDefault(){let R=this.gl;return[0,0,R.drawingBufferWidth,R.drawingBufferHeight]}set(R){let ae=this.current;(R[0]!==ae[0]||R[1]!==ae[1]||R[2]!==ae[2]||R[3]!==ae[3]||this.dirty)&&(this.gl.viewport(R[0],R[1],R[2],R[3]),this.current=R,this.dirty=!1)}}class Us extends uo{getDefault(){return null}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.bindFramebuffer(ae.FRAMEBUFFER,R),this.current=R,this.dirty=!1}}class Vc extends uo{getDefault(){return null}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.bindRenderbuffer(ae.RENDERBUFFER,R),this.current=R,this.dirty=!1}}class Sf extends uo{getDefault(){return null}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.bindTexture(ae.TEXTURE_2D,R),this.current=R,this.dirty=!1}}class nu extends uo{getDefault(){return null}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.bindBuffer(ae.ARRAY_BUFFER,R),this.current=R,this.dirty=!1}}class Ll extends uo{getDefault(){return null}set(R){let ae=this.gl;ae.bindBuffer(ae.ELEMENT_ARRAY_BUFFER,R),this.current=R,this.dirty=!1}}class ic extends uo{getDefault(){return null}set(R){var ae;if(R===this.current&&!this.dirty)return;let we=this.gl;Bs(we)?we.bindVertexArray(R):(ae=we.getExtension("OES_vertex_array_object"))===null||ae===void 0||ae.bindVertexArrayOES(R),this.current=R,this.dirty=!1}}class Ou extends uo{getDefault(){return 4}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.pixelStorei(ae.UNPACK_ALIGNMENT,R),this.current=R,this.dirty=!1}}class il extends uo{getDefault(){return!1}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.pixelStorei(ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,R),this.current=R,this.dirty=!1}}class vl extends uo{getDefault(){return!1}set(R){if(R===this.current&&!this.dirty)return;let ae=this.gl;ae.pixelStorei(ae.UNPACK_FLIP_Y_WEBGL,R),this.current=R,this.dirty=!1}}class gs extends uo{constructor(R,ae){super(R),this.context=R,this.parent=ae}getDefault(){return null}}class Vs extends gs{setDirty(){this.dirty=!0}set(R){if(R===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ae=this.gl;ae.framebufferTexture2D(ae.FRAMEBUFFER,ae.COLOR_ATTACHMENT0,ae.TEXTURE_2D,R,0),this.current=R,this.dirty=!1}}class nc extends gs{set(R){if(R===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ae=this.gl;ae.framebufferRenderbuffer(ae.FRAMEBUFFER,ae.DEPTH_ATTACHMENT,ae.RENDERBUFFER,R),this.current=R,this.dirty=!1}}class Nl extends gs{set(R){if(R===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let ae=this.gl;ae.framebufferRenderbuffer(ae.FRAMEBUFFER,ae.DEPTH_STENCIL_ATTACHMENT,ae.RENDERBUFFER,R),this.current=R,this.dirty=!1}}class qu{constructor(R,ae,we,Se,Oe){this.context=R,this.width=ae,this.height=we;let pt=R.gl,At=this.framebuffer=pt.createFramebuffer();if(this.colorAttachment=new Vs(R,At),Se)this.depthAttachment=Oe?new Nl(R,At):new nc(R,At);else if(Oe)throw new Error("Stencil cannot be set without depth");if(pt.checkFramebufferStatus(pt.FRAMEBUFFER)!==pt.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){let R=this.context.gl,ae=this.colorAttachment.get();if(ae&&R.deleteTexture(ae),this.depthAttachment){let we=this.depthAttachment.get();we&&R.deleteRenderbuffer(we)}R.deleteFramebuffer(this.framebuffer)}}class cl{constructor(R,ae,we){this.blendFunction=R,this.blendColor=ae,this.mask=we}}cl.Replace=[1,0],cl.disabled=new cl(cl.Replace,t.aM.transparent,[!1,!1,!1,!1]),cl.unblended=new cl(cl.Replace,t.aM.transparent,[!0,!0,!0,!0]),cl.alphaBlended=new cl([1,771],t.aM.transparent,[!0,!0,!0,!0]);class yh{constructor(R){var ae,we;if(this.gl=R,this.clearColor=new $s(this),this.clearDepth=new ms(this),this.clearStencil=new Is(this),this.colorMask=new rl(this),this.depthMask=new Sn(this),this.stencilMask=new po(this),this.stencilFunc=new ro(this),this.stencilOp=new As(this),this.stencilTest=new al(this),this.depthRange=new $n(this),this.depthTest=new zs(this),this.depthFunc=new au(this),this.blend=new fl(this),this.blendFunc=new xu(this),this.blendColor=new zl(this),this.blendEquation=new Ns(this),this.cullFace=new iu(this),this.cullFaceSide=new Eu(this),this.frontFace=new Bc(this),this.program=new Cu(this),this.activeTexture=new Af(this),this.viewport=new pf(this),this.bindFramebuffer=new Us(this),this.bindRenderbuffer=new Vc(this),this.bindTexture=new Sf(this),this.bindVertexBuffer=new nu(this),this.bindElementBuffer=new Ll(this),this.bindVertexArray=new ic(this),this.pixelStoreUnpack=new Ou(this),this.pixelStoreUnpackPremultiplyAlpha=new il(this),this.pixelStoreUnpackFlipY=new vl(this),this.extTextureFilterAnisotropic=R.getExtension("EXT_texture_filter_anisotropic")||R.getExtension("MOZ_EXT_texture_filter_anisotropic")||R.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=R.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=R.getParameter(R.MAX_TEXTURE_SIZE),Bs(R)){this.HALF_FLOAT=R.HALF_FLOAT;let Se=R.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(ae=R.RGBA16F)!==null&&ae!==void 0?ae:Se?.RGBA16F_EXT,this.RGB16F=(we=R.RGB16F)!==null&&we!==void 0?we:Se?.RGB16F_EXT,R.getExtension("EXT_color_buffer_float")}else{R.getExtension("EXT_color_buffer_half_float"),R.getExtension("OES_texture_half_float_linear");let Se=R.getExtension("OES_texture_half_float");this.HALF_FLOAT=Se?.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(R,ae){return new Yo(this,R,ae)}createVertexBuffer(R,ae,we){return new Cn(this,R,ae,we)}createRenderbuffer(R,ae,we){let Se=this.gl,Oe=Se.createRenderbuffer();return this.bindRenderbuffer.set(Oe),Se.renderbufferStorage(Se.RENDERBUFFER,R,ae,we),this.bindRenderbuffer.set(null),Oe}createFramebuffer(R,ae,we,Se){return new qu(this,R,ae,we,Se)}clear({color:R,depth:ae,stencil:we}){let Se=this.gl,Oe=0;R&&(Oe|=Se.COLOR_BUFFER_BIT,this.clearColor.set(R),this.colorMask.set([!0,!0,!0,!0])),ae!==void 0&&(Oe|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ae),this.depthMask.set(!0)),we!==void 0&&(Oe|=Se.STENCIL_BUFFER_BIT,this.clearStencil.set(we),this.stencilMask.set(255)),Se.clear(Oe)}setCullFace(R){R.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(R.mode),this.frontFace.set(R.frontFace))}setDepthMode(R){R.func!==this.gl.ALWAYS||R.mask?(this.depthTest.set(!0),this.depthFunc.set(R.func),this.depthMask.set(R.mask),this.depthRange.set(R.range)):this.depthTest.set(!1)}setStencilMode(R){R.test.func!==this.gl.ALWAYS||R.mask?(this.stencilTest.set(!0),this.stencilMask.set(R.mask),this.stencilOp.set([R.fail,R.depthFail,R.pass]),this.stencilFunc.set({func:R.test.func,ref:R.ref,mask:R.test.mask})):this.stencilTest.set(!1)}setColorMode(R){t.aE(R.blendFunction,cl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(R.blendFunction),this.blendColor.set(R.blendColor)),this.colorMask.set(R.mask)}createVertexArray(){var R;return Bs(this.gl)?this.gl.createVertexArray():(R=this.gl.getExtension("OES_vertex_array_object"))===null||R===void 0?void 0:R.createVertexArrayOES()}deleteVertexArray(R){var ae;return Bs(this.gl)?this.gl.deleteVertexArray(R):(ae=this.gl.getExtension("OES_vertex_array_object"))===null||ae===void 0?void 0:ae.deleteVertexArrayOES(R)}unbindVAO(){this.bindVertexArray.set(null)}}class ls{constructor(R,ae,we){this.func=R,this.mask=ae,this.range=we}}ls.ReadOnly=!1,ls.ReadWrite=!0,ls.disabled=new ls(519,ls.ReadOnly,[0,1]);let _h=7680;class Ss{constructor(R,ae,we,Se,Oe,pt){this.test=R,this.ref=ae,this.mask=we,this.fail=Se,this.depthFail=Oe,this.pass=pt}}Ss.disabled=new Ss({func:519,mask:0},0,0,_h,_h,_h);class Qn{constructor(R,ae,we){this.enable=R,this.mode=ae,this.frontFace=we}}let Gc;function Vu(Ne,R,ae,we,Se){let Oe=Ne.context,pt=Oe.gl,At=Ne.useProgram("collisionBox"),Bt=[],$t=0,br=0;for(let dt=0;dt<we.length;dt++){let Ct=we[dt],wt=R.getTile(Ct).getBucket(ae);if(!wt)continue;let Dt=Se?wt.textCollisionBox:wt.iconCollisionBox,ur=wt.collisionCircleArray;if(ur.length>0){let mr=t.H();t.aQ(mr,wt.placementInvProjMatrix,Ne.transform.glCoordMatrix),t.aQ(mr,mr,wt.placementViewportMatrix),Bt.push({circleArray:ur,circleOffset:br,transform:Ct.posMatrix,invTransform:mr,coord:Ct}),$t+=ur.length/4,br=$t}Dt&&At.draw(Oe,pt.LINES,ls.disabled,Ss.disabled,Ne.colorModeForRenderPass(),Qn.disabled,{u_matrix:Ct.posMatrix,u_pixel_extrude_scale:[1/(Ar=Ne.transform).width,1/Ar.height]},Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(Ct),ae.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,null,Ne.transform.zoom,null,null,Dt.collisionVertexBuffer)}var Ar;if(!Se||!Bt.length)return;let Yr=Ne.useProgram("collisionCircle"),sa=new t.aR;sa.resize(4*$t),sa._trim();let He=0;for(let dt of Bt)for(let Ct=0;Ct<dt.circleArray.length/4;Ct++){let wt=4*Ct,Dt=dt.circleArray[wt+0],ur=dt.circleArray[wt+1],mr=dt.circleArray[wt+2],Er=dt.circleArray[wt+3];sa.emplace(He++,Dt,ur,mr,Er,0),sa.emplace(He++,Dt,ur,mr,Er,1),sa.emplace(He++,Dt,ur,mr,Er,2),sa.emplace(He++,Dt,ur,mr,Er,3)}(!Gc||Gc.length<2*$t)&&(Gc=function(dt){let Ct=2*dt,wt=new t.aT;wt.resize(Ct),wt._trim();for(let Dt=0;Dt<Ct;Dt++){let ur=6*Dt;wt.uint16[ur+0]=4*Dt+0,wt.uint16[ur+1]=4*Dt+1,wt.uint16[ur+2]=4*Dt+2,wt.uint16[ur+3]=4*Dt+2,wt.uint16[ur+4]=4*Dt+3,wt.uint16[ur+5]=4*Dt+0}return wt}($t));let Je=Oe.createIndexBuffer(Gc,!0),ut=Oe.createVertexBuffer(sa,t.aS.members,!0);for(let dt of Bt){let Ct=kn(dt.transform,dt.invTransform,Ne.transform);Yr.draw(Oe,pt.TRIANGLES,ls.disabled,Ss.disabled,Ne.colorModeForRenderPass(),Qn.disabled,Ct,Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(dt.coord),ae.id,ut,Je,t.a0.simpleSegment(0,2*dt.circleOffset,dt.circleArray.length,dt.circleArray.length/2),null,Ne.transform.zoom,null,null,null)}ut.destroy(),Je.destroy()}Qn.disabled=new Qn(!1,1029,2305),Qn.backCCW=new Qn(!0,1029,2305);let Ul=t.an(new Float32Array(16));function Mf(Ne,R,ae,we,Se,Oe){let{horizontalAlign:pt,verticalAlign:At}=t.au(Ne);return new t.P((-(pt-.5)*R/Se+we[0])*Oe,(-(At-.5)*ae/Se+we[1])*Oe)}function wc(Ne,R,ae,we,Se,Oe){let pt=R.tileAnchorPoint.add(new t.P(R.translation[0],R.translation[1]));if(R.pitchWithMap){let At=we.mult(Oe);ae||(At=At.rotate(-Se));let Bt=pt.add(At);return bt(Bt.x,Bt.y,R.labelPlaneMatrix,R.getElevation).point}if(ae){let At=at(R.tileAnchorPoint.x+1,R.tileAnchorPoint.y,R).point.sub(Ne),Bt=Math.atan(At.y/At.x)+(At.x<0?Math.PI:0);return Ne.add(we.rotate(Bt))}return Ne.add(we)}function rf(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar,Yr,sa){let He=Ne.text.placedSymbolArray,Je=Ne.text.dynamicLayoutVertexArray,ut=Ne.icon.dynamicLayoutVertexArray,dt={};Je.clear();for(let Ct=0;Ct<He.length;Ct++){let wt=He.get(Ct),Dt=wt.hidden||!wt.crossTileID||Ne.allowVerticalPlacement&&!wt.placedOrientation?null:we[wt.crossTileID];if(Dt){let ur=new t.P(wt.anchorX,wt.anchorY),mr={getElevation:sa,width:Se.width,height:Se.height,labelPlaneMatrix:Oe,lineVertexArray:null,pitchWithMap:ae,projection:br,projectionCache:null,tileAnchorPoint:ur,translation:Ar,unwrappedTileID:Yr},Er=ae?bt(ur.x,ur.y,pt,sa):at(ur.x,ur.y,mr),Br=Be(Se.cameraToCenterDistance,Er.signedDistanceFromCamera),Qr=t.ai(Ne.textSizeData,Bt,wt)*Br/t.ap;ae&&(Qr*=Ne.tilePixelRatio/At);let{width:ga,height:Sa,anchor:Oa,textOffset:di,textBoxScale:Wi}=Dt,Gi=Mf(Oa,ga,Sa,di,Wi,Qr),on=br.getPitchedTextCorrection(Se,ur.add(new t.P(Ar[0],Ar[1])),Yr),Tn=wc(Er.point,mr,R,Gi,Se.angle,on),Wn=Ne.allowVerticalPlacement&&wt.placedOrientation===t.ah.vertical?Math.PI/2:0;for(let Bn=0;Bn<wt.numGlyphs;Bn++)t.aj(Je,Tn,Wn);$t&&wt.associatedIconIndex>=0&&(dt[wt.associatedIconIndex]={shiftedAnchor:Tn,angle:Wn})}else rr(wt.numGlyphs,Je)}if($t){ut.clear();let Ct=Ne.icon.placedSymbolArray;for(let wt=0;wt<Ct.length;wt++){let Dt=Ct.get(wt);if(Dt.hidden)rr(Dt.numGlyphs,ut);else{let ur=dt[wt];if(ur)for(let mr=0;mr<Dt.numGlyphs;mr++)t.aj(ut,ur.shiftedAnchor,ur.angle);else rr(Dt.numGlyphs,ut)}}Ne.icon.dynamicLayoutVertexBuffer.updateData(ut)}Ne.text.dynamicLayoutVertexBuffer.updateData(Je)}function Kl(Ne,R,ae){return ae.iconsInText&&R?"symbolTextAndIcon":Ne?"symbolSDF":"symbolIcon"}function Yf(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t,br,Ar){let Yr=Ne.context,sa=Yr.gl,He=Ne.transform,Je=mi(),ut=At==="map",dt=Bt==="map",Ct=At!=="viewport"&&ae.layout.get("symbol-placement")!=="point",wt=ut&&!dt&&!Ct,Dt=!dt&&Ct,ur=!ae.layout.get("symbol-sort-key").isConstant(),mr=!1,Er=Ne.depthModeForSublayer(0,ls.ReadOnly),Br=ae._unevaluatedLayout.hasValue("text-variable-anchor")||ae._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Qr=[],ga=Je.getCircleRadiusCorrection(He);for(let Sa of we){let Oa=R.getTile(Sa),di=Oa.getBucket(ae);if(!di)continue;let Wi=Se?di.text:di.icon;if(!Wi||!Wi.segments.get().length||!Wi.hasVisibleVertices)continue;let Gi=Wi.programConfigurations.get(ae.id),on=Se||di.sdfIcons,Tn=Se?di.textSizeData:di.iconSizeData,Wn=dt||He.pitch!==0,Bn=Ne.useProgram(Kl(on,Se,di),Gi),Ao=t.ag(Tn,He.zoom),ss=Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(Sa),So,Ko,hs,ll,Js=[0,0],es=null;if(Se)Ko=Oa.glyphAtlasTexture,hs=sa.LINEAR,So=Oa.glyphAtlasTexture.size,di.iconsInText&&(Js=Oa.imageAtlasTexture.size,es=Oa.imageAtlasTexture,ll=Wn||Ne.options.rotating||Ne.options.zooming||Tn.kind==="composite"||Tn.kind==="camera"?sa.LINEAR:sa.NEAREST);else{let St=ae.layout.get("icon-size").constantOr(0)!==1||di.iconsNeedLinear;Ko=Oa.imageAtlasTexture,hs=on||Ne.options.rotating||Ne.options.zooming||St||Wn?sa.LINEAR:sa.NEAREST,So=Oa.imageAtlasTexture.size}let ts=Ua(Oa,1,Ne.transform.zoom),Pl=Dt?Sa.posMatrix:Ul,$l=wr(Pl,dt,ut,Ne.transform,ts),Ru=Ir(Pl,dt,ut,Ne.transform,ts),hu=Ir(Sa.posMatrix,dt,ut,Ne.transform,ts),wl=Je.translatePosition(Ne.transform,Oa,Oe,pt),su=Br&&di.hasTextData(),uc=ae.layout.get("icon-text-fit")!=="none"&&su&&di.hasIconData();if(Ct){let St=Ne.style.map.terrain?(zt,gr)=>Ne.style.map.terrain.getElevation(Sa,zt,gr):null,ar=ae.layout.get("text-rotation-alignment")==="map";Ue(di,Sa.posMatrix,Ne,Se,$l,hu,dt,$t,ar,Je,Sa.toUnwrapped(),He.width,He.height,wl,St)}let ql=Sa.posMatrix,Vl=Se&&Br||uc,de=Ct||Vl?Ul:$l,De=Ru,et=on&&ae.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0,vt;vt=on?di.iconsInText?Co(Tn.kind,Ao,wt,dt,Ct,Vl,Ne,ql,de,De,wl,So,Js,ga):lo(Tn.kind,Ao,wt,dt,Ct,Vl,Ne,ql,de,De,wl,Se,So,!0,ga):Oo(Tn.kind,Ao,wt,dt,Ct,Vl,Ne,ql,de,De,wl,Se,So,ga);let _t={program:Bn,buffers:Wi,uniformValues:vt,atlasTexture:Ko,atlasTextureIcon:es,atlasInterpolation:hs,atlasInterpolationIcon:ll,isSDF:on,hasHalo:et};if(ur&&di.canOverlap){mr=!0;let St=Wi.segments.get();for(let ar of St)Qr.push({segments:new t.a0([ar]),sortKey:ar.sortKey,state:_t,terrainData:ss})}else Qr.push({segments:Wi.segments,sortKey:0,state:_t,terrainData:ss})}mr&&Qr.sort((Sa,Oa)=>Sa.sortKey-Oa.sortKey);for(let Sa of Qr){let Oa=Sa.state;if(Yr.activeTexture.set(sa.TEXTURE0),Oa.atlasTexture.bind(Oa.atlasInterpolation,sa.CLAMP_TO_EDGE),Oa.atlasTextureIcon&&(Yr.activeTexture.set(sa.TEXTURE1),Oa.atlasTextureIcon&&Oa.atlasTextureIcon.bind(Oa.atlasInterpolationIcon,sa.CLAMP_TO_EDGE)),Oa.isSDF){let di=Oa.uniformValues;Oa.hasHalo&&(di.u_is_halo=1,zf(Oa.buffers,Sa.segments,ae,Ne,Oa.program,Er,br,Ar,di,Sa.terrainData)),di.u_is_halo=0}zf(Oa.buffers,Sa.segments,ae,Ne,Oa.program,Er,br,Ar,Oa.uniformValues,Sa.terrainData)}}function zf(Ne,R,ae,we,Se,Oe,pt,At,Bt,$t){let br=we.context;Se.draw(br,br.gl.TRIANGLES,Oe,pt,At,Qn.disabled,Bt,$t,ae.id,Ne.layoutVertexBuffer,Ne.indexBuffer,R,ae.paint,we.transform.zoom,Ne.programConfigurations.get(ae.id),Ne.dynamicLayoutVertexBuffer,Ne.opacityVertexBuffer)}function af(Ne,R,ae,we){let Se=Ne.context,Oe=Se.gl,pt=Ss.disabled,At=new cl([Oe.ONE,Oe.ONE],t.aM.transparent,[!0,!0,!0,!0]),Bt=R.getBucket(ae);if(!Bt)return;let $t=we.key,br=ae.heatmapFbos.get($t);br||(br=Ff(Se,R.tileSize,R.tileSize),ae.heatmapFbos.set($t,br)),Se.bindFramebuffer.set(br.framebuffer),Se.viewport.set([0,0,R.tileSize,R.tileSize]),Se.clear({color:t.aM.transparent});let Ar=Bt.programConfigurations.get(ae.id),Yr=Ne.useProgram("heatmap",Ar),sa=Ne.style.map.terrain.getTerrainData(we);Yr.draw(Se,Oe.TRIANGLES,ls.disabled,pt,At,Qn.disabled,to(we.posMatrix,R,Ne.transform.zoom,ae.paint.get("heatmap-intensity")),sa,ae.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,ae.paint,Ne.transform.zoom,Ar)}function Nc(Ne,R,ae){let we=Ne.context,Se=we.gl;we.setColorMode(Ne.colorModeForRenderPass());let Oe=Of(we,R),pt=ae.key,At=R.heatmapFbos.get(pt);At&&(we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,At.colorAttachment.get()),we.activeTexture.set(Se.TEXTURE1),Oe.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),Ne.useProgram("heatmapTexture").draw(we,Se.TRIANGLES,ls.disabled,Ss.disabled,Ne.colorModeForRenderPass(),Qn.disabled,mo(Ne,R,0,1),null,R.id,Ne.rasterBoundsBuffer,Ne.quadTriangleIndexBuffer,Ne.rasterBoundsSegments,R.paint,Ne.transform.zoom),At.destroy(),R.heatmapFbos.delete(pt))}function Ff(Ne,R,ae){var we,Se;let Oe=Ne.gl,pt=Oe.createTexture();Oe.bindTexture(Oe.TEXTURE_2D,pt),Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_WRAP_S,Oe.CLAMP_TO_EDGE),Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_WRAP_T,Oe.CLAMP_TO_EDGE),Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_MIN_FILTER,Oe.LINEAR),Oe.texParameteri(Oe.TEXTURE_2D,Oe.TEXTURE_MAG_FILTER,Oe.LINEAR);let At=(we=Ne.HALF_FLOAT)!==null&&we!==void 0?we:Oe.UNSIGNED_BYTE,Bt=(Se=Ne.RGBA16F)!==null&&Se!==void 0?Se:Oe.RGBA;Oe.texImage2D(Oe.TEXTURE_2D,0,Bt,R,ae,0,Oe.RGBA,At,null);let $t=Ne.createFramebuffer(R,ae,!1,!1);return $t.colorAttachment.set(pt),$t}function Of(Ne,R){return R.colorRampTexture||(R.colorRampTexture=new u(Ne,R.colorRamp,Ne.gl.RGBA)),R.colorRampTexture}function Gu(Ne,R,ae,we,Se){if(!ae||!we||!we.imageAtlas)return;let Oe=we.imageAtlas.patternPositions,pt=Oe[ae.to.toString()],At=Oe[ae.from.toString()];if(!pt&&At&&(pt=At),!At&&pt&&(At=pt),!pt||!At){let Bt=Se.getPaintProperty(R);pt=Oe[Bt],At=Oe[Bt]}pt&&At&&Ne.setConstantPatternPositions(pt,At)}function Ef(Ne,R,ae,we,Se,Oe,pt){let At=Ne.context.gl,Bt="fill-pattern",$t=ae.paint.get(Bt),br=$t&&$t.constantOr(1),Ar=ae.getCrossfadeParameters(),Yr,sa,He,Je,ut;pt?(sa=br&&!ae.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Yr=At.LINES):(sa=br?"fillPattern":"fill",Yr=At.TRIANGLES);let dt=$t.constantOr(null);for(let Ct of we){let wt=R.getTile(Ct);if(br&&!wt.patternsLoaded())continue;let Dt=wt.getBucket(ae);if(!Dt)continue;let ur=Dt.programConfigurations.get(ae.id),mr=Ne.useProgram(sa,ur),Er=Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(Ct);br&&(Ne.context.activeTexture.set(At.TEXTURE0),wt.imageAtlasTexture.bind(At.LINEAR,At.CLAMP_TO_EDGE),ur.updatePaintBuffers(Ar)),Gu(ur,Bt,dt,wt,ae);let Br=Er?Ct:null,Qr=Ne.translatePosMatrix(Br?Br.posMatrix:Ct.posMatrix,wt,ae.paint.get("fill-translate"),ae.paint.get("fill-translate-anchor"));if(pt){Je=Dt.indexBuffer2,ut=Dt.segments2;let ga=[At.drawingBufferWidth,At.drawingBufferHeight];He=sa==="fillOutlinePattern"&&br?fn(Qr,Ne,Ar,wt,ga):Li(Qr,ga)}else Je=Dt.indexBuffer,ut=Dt.segments,He=br?Xi(Qr,Ne,Ar,wt):Da(Qr);mr.draw(Ne.context,Yr,Se,Ne.stencilModeForClipping(Ct),Oe,Qn.disabled,He,Er,ae.id,Dt.layoutVertexBuffer,Je,ut,ae.paint,Ne.transform.zoom,ur)}}function oc(Ne,R,ae,we,Se,Oe,pt){let At=Ne.context,Bt=At.gl,$t="fill-extrusion-pattern",br=ae.paint.get($t),Ar=br.constantOr(1),Yr=ae.getCrossfadeParameters(),sa=ae.paint.get("fill-extrusion-opacity"),He=br.constantOr(null);for(let Je of we){let ut=R.getTile(Je),dt=ut.getBucket(ae);if(!dt)continue;let Ct=Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(Je),wt=dt.programConfigurations.get(ae.id),Dt=Ne.useProgram(Ar?"fillExtrusionPattern":"fillExtrusion",wt);Ar&&(Ne.context.activeTexture.set(Bt.TEXTURE0),ut.imageAtlasTexture.bind(Bt.LINEAR,Bt.CLAMP_TO_EDGE),wt.updatePaintBuffers(Yr)),Gu(wt,$t,He,ut,ae);let ur=Ne.translatePosMatrix(Je.posMatrix,ut,ae.paint.get("fill-extrusion-translate"),ae.paint.get("fill-extrusion-translate-anchor")),mr=ae.paint.get("fill-extrusion-vertical-gradient"),Er=Ar?ha(ur,Ne,mr,sa,Je,Yr,ut):Ya(ur,Ne,mr,sa);Dt.draw(At,At.gl.TRIANGLES,Se,Oe,pt,Qn.backCCW,Er,Ct,ae.id,dt.layoutVertexBuffer,dt.indexBuffer,dt.segments,ae.paint,Ne.transform.zoom,wt,Ne.style.map.terrain&&dt.centroidVertexBuffer)}}function Hc(Ne,R,ae,we,Se,Oe,pt){let At=Ne.context,Bt=At.gl,$t=ae.fbo;if(!$t)return;let br=Ne.useProgram("hillshade"),Ar=Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(R);At.activeTexture.set(Bt.TEXTURE0),Bt.bindTexture(Bt.TEXTURE_2D,$t.colorAttachment.get()),br.draw(At,Bt.TRIANGLES,Se,Oe,pt,Qn.disabled,((Yr,sa,He,Je)=>{let ut=He.paint.get("hillshade-shadow-color"),dt=He.paint.get("hillshade-highlight-color"),Ct=He.paint.get("hillshade-accent-color"),wt=He.paint.get("hillshade-illumination-direction")*(Math.PI/180);He.paint.get("hillshade-illumination-anchor")==="viewport"&&(wt-=Yr.transform.angle);let Dt=!Yr.options.moving;return{u_matrix:Je?Je.posMatrix:Yr.transform.calculatePosMatrix(sa.tileID.toUnwrapped(),Dt),u_image:0,u_latrange:pn(0,sa.tileID),u_light:[He.paint.get("hillshade-exaggeration"),wt],u_shadow:ut,u_highlight:dt,u_accent:Ct}})(Ne,ae,we,Ar?R:null),Ar,we.id,Ne.rasterBoundsBuffer,Ne.quadTriangleIndexBuffer,Ne.rasterBoundsSegments)}function Jl(Ne,R,ae,we,Se,Oe){let pt=Ne.context,At=pt.gl,Bt=R.dem;if(Bt&&Bt.data){let $t=Bt.dim,br=Bt.stride,Ar=Bt.getPixels();if(pt.activeTexture.set(At.TEXTURE1),pt.pixelStoreUnpackPremultiplyAlpha.set(!1),R.demTexture=R.demTexture||Ne.getTileTexture(br),R.demTexture){let sa=R.demTexture;sa.update(Ar,{premultiply:!1}),sa.bind(At.NEAREST,At.CLAMP_TO_EDGE)}else R.demTexture=new u(pt,Ar,At.RGBA,{premultiply:!1}),R.demTexture.bind(At.NEAREST,At.CLAMP_TO_EDGE);pt.activeTexture.set(At.TEXTURE0);let Yr=R.fbo;if(!Yr){let sa=new u(pt,{width:$t,height:$t,data:null},At.RGBA);sa.bind(At.LINEAR,At.CLAMP_TO_EDGE),Yr=R.fbo=pt.createFramebuffer($t,$t,!0,!1),Yr.colorAttachment.set(sa.texture)}pt.bindFramebuffer.set(Yr.framebuffer),pt.viewport.set([0,0,$t,$t]),Ne.useProgram("hillshadePrepare").draw(pt,At.TRIANGLES,we,Se,Oe,Qn.disabled,((sa,He)=>{let Je=He.stride,ut=t.H();return t.aP(ut,0,t.X,-t.X,0,0,1),t.J(ut,ut,[0,-t.X,0]),{u_matrix:ut,u_image:1,u_dimension:[Je,Je],u_zoom:sa.overscaledZ,u_unpack:He.getUnpackVector()}})(R.tileID,Bt),null,ae.id,Ne.rasterBoundsBuffer,Ne.quadTriangleIndexBuffer,Ne.rasterBoundsSegments),R.needsHillshadePrepare=!1}}function Uc(Ne,R,ae,we,Se,Oe){let pt=we.paint.get("raster-fade-duration");if(!Oe&&pt>0){let At=i.now(),Bt=(At-Ne.timeAdded)/pt,$t=R?(At-R.timeAdded)/pt:-1,br=ae.getSource(),Ar=Se.coveringZoomLevel({tileSize:br.tileSize,roundZoom:br.roundZoom}),Yr=!R||Math.abs(R.tileID.overscaledZ-Ar)>Math.abs(Ne.tileID.overscaledZ-Ar),sa=Yr&&Ne.refreshedUponExpiration?1:t.ac(Yr?Bt:1-$t,0,1);return Ne.refreshedUponExpiration&&Bt>=1&&(Ne.refreshedUponExpiration=!1),R?{opacity:1,mix:1-sa}:{opacity:sa,mix:0}}return{opacity:1,mix:0}}let Tc=new t.aM(1,0,0,1),Gs=new t.aM(0,1,0,1),Cf=new t.aM(0,0,1,1),lh=new t.aM(1,0,1,1),Bf=new t.aM(0,1,1,1);function Wc(Ne,R,ae,we){ku(Ne,0,R+ae/2,Ne.transform.width,ae,we)}function Kf(Ne,R,ae,we){ku(Ne,R-ae/2,0,ae,Ne.transform.height,we)}function ku(Ne,R,ae,we,Se,Oe){let pt=Ne.context,At=pt.gl;At.enable(At.SCISSOR_TEST),At.scissor(R*Ne.pixelRatio,ae*Ne.pixelRatio,we*Ne.pixelRatio,Se*Ne.pixelRatio),pt.clear({color:Oe}),At.disable(At.SCISSOR_TEST)}function Nf(Ne,R,ae){let we=Ne.context,Se=we.gl,Oe=ae.posMatrix,pt=Ne.useProgram("debug"),At=ls.disabled,Bt=Ss.disabled,$t=Ne.colorModeForRenderPass(),br="$debug",Ar=Ne.style.map.terrain&&Ne.style.map.terrain.getTerrainData(ae);we.activeTexture.set(Se.TEXTURE0);let Yr=R.getTileByID(ae.key).latestRawTileData,sa=Math.floor((Yr&&Yr.byteLength||0)/1024),He=R.getTile(ae).tileSize,Je=512/Math.min(He,512)*(ae.overscaledZ/Ne.transform.zoom)*.5,ut=ae.canonical.toString();ae.overscaledZ!==ae.canonical.z&&(ut+=` => ${ae.overscaledZ}`),function(dt,Ct){dt.initDebugOverlayCanvas();let wt=dt.debugOverlayCanvas,Dt=dt.context.gl,ur=dt.debugOverlayCanvas.getContext("2d");ur.clearRect(0,0,wt.width,wt.height),ur.shadowColor="white",ur.shadowBlur=2,ur.lineWidth=1.5,ur.strokeStyle="white",ur.textBaseline="top",ur.font="bold 36px Open Sans, sans-serif",ur.fillText(Ct,5,5),ur.strokeText(Ct,5,5),dt.debugOverlayTexture.update(wt),dt.debugOverlayTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE)}(Ne,`${ut} ${sa}kB`),pt.draw(we,Se.TRIANGLES,At,Bt,cl.alphaBlended,Qn.disabled,zn(Oe,t.aM.transparent,Je),null,br,Ne.debugBuffer,Ne.quadTriangleIndexBuffer,Ne.debugSegments),pt.draw(we,Se.LINE_STRIP,At,Bt,$t,Qn.disabled,zn(Oe,t.aM.red),Ar,br,Ne.debugBuffer,Ne.tileBorderIndexBuffer,Ne.debugSegments)}function ml(Ne,R,ae){let we=Ne.context,Se=we.gl,Oe=Ne.colorModeForRenderPass(),pt=new ls(Se.LEQUAL,ls.ReadWrite,Ne.depthRangeFor3D),At=Ne.useProgram("terrain"),Bt=R.getTerrainMesh();we.bindFramebuffer.set(null),we.viewport.set([0,0,Ne.width,Ne.height]);for(let $t of ae){let br=Ne.renderToTexture.getTexture($t),Ar=R.getTerrainData($t.tileID);we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,br.texture);let Yr=Ne.transform.calculatePosMatrix($t.tileID.toUnwrapped()),sa=R.getMeshFrameDelta(Ne.transform.zoom),He=Ne.transform.calculateFogMatrix($t.tileID.toUnwrapped()),Je=kr(Yr,sa,He,Ne.style.sky,Ne.transform.pitch);At.draw(we,Se.TRIANGLES,pt,Ss.disabled,Oe,Qn.backCCW,Je,Ar,"terrain",Bt.vertexBuffer,Bt.indexBuffer,Bt.segments)}}class Lu{constructor(R,ae,we){this.vertexBuffer=R,this.indexBuffer=ae,this.segments=we}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Ac{constructor(R,ae){this.context=new yh(R),this.transform=ae,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=kt.maxUnderzooming+kt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gr}resize(R,ae,we){if(this.width=Math.floor(R*we),this.height=Math.floor(ae*we),this.pixelRatio=we,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let Se of this.style._order)this.style._layers[Se].resize()}setup(){let R=this.context,ae=new t.aX;ae.emplaceBack(0,0),ae.emplaceBack(t.X,0),ae.emplaceBack(0,t.X),ae.emplaceBack(t.X,t.X),this.tileExtentBuffer=R.createVertexBuffer(ae,da.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let we=new t.aX;we.emplaceBack(0,0),we.emplaceBack(t.X,0),we.emplaceBack(0,t.X),we.emplaceBack(t.X,t.X),this.debugBuffer=R.createVertexBuffer(we,da.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let Se=new t.$;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.X,0,t.X,0),Se.emplaceBack(0,t.X,0,t.X),Se.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=R.createVertexBuffer(Se,Xe.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let Oe=new t.aX;Oe.emplaceBack(0,0),Oe.emplaceBack(1,0),Oe.emplaceBack(0,1),Oe.emplaceBack(1,1),this.viewportBuffer=R.createVertexBuffer(Oe,da.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let pt=new t.aZ;pt.emplaceBack(0),pt.emplaceBack(1),pt.emplaceBack(3),pt.emplaceBack(2),pt.emplaceBack(0),this.tileBorderIndexBuffer=R.createIndexBuffer(pt);let At=new t.aY;At.emplaceBack(0,1,2),At.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=R.createIndexBuffer(At);let Bt=this.context.gl;this.stencilClearMode=new Ss({func:Bt.ALWAYS,mask:0},0,255,Bt.ZERO,Bt.ZERO,Bt.ZERO)}clearStencil(){let R=this.context,ae=R.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let we=t.H();t.aP(we,0,this.width,this.height,0,0,1),t.K(we,we,[ae.drawingBufferWidth,ae.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(R,ae.TRIANGLES,ls.disabled,this.stencilClearMode,cl.disabled,Qn.disabled,Xn(we),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(R,ae){if(this.currentStencilSource===R.source||!R.isTileClipped()||!ae||!ae.length)return;this.currentStencilSource=R.source;let we=this.context,Se=we.gl;this.nextStencilID+ae.length>256&&this.clearStencil(),we.setColorMode(cl.disabled),we.setDepthMode(ls.disabled);let Oe=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let pt of ae){let At=this._tileClippingMaskIDs[pt.key]=this.nextStencilID++,Bt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(pt);Oe.draw(we,Se.TRIANGLES,ls.disabled,new Ss({func:Se.ALWAYS,mask:0},At,255,Se.KEEP,Se.KEEP,Se.REPLACE),cl.disabled,Qn.disabled,Xn(pt.posMatrix),Bt,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let R=this.nextStencilID++,ae=this.context.gl;return new Ss({func:ae.NOTEQUAL,mask:255},R,255,ae.KEEP,ae.KEEP,ae.REPLACE)}stencilModeForClipping(R){let ae=this.context.gl;return new Ss({func:ae.EQUAL,mask:255},this._tileClippingMaskIDs[R.key],0,ae.KEEP,ae.KEEP,ae.REPLACE)}stencilConfigForOverlap(R){let ae=this.context.gl,we=R.sort((pt,At)=>At.overscaledZ-pt.overscaledZ),Se=we[we.length-1].overscaledZ,Oe=we[0].overscaledZ-Se+1;if(Oe>1){this.currentStencilSource=void 0,this.nextStencilID+Oe>256&&this.clearStencil();let pt={};for(let At=0;At<Oe;At++)pt[At+Se]=new Ss({func:ae.GEQUAL,mask:255},At+this.nextStencilID,255,ae.KEEP,ae.KEEP,ae.REPLACE);return this.nextStencilID+=Oe,[pt,we]}return[{[Se]:Ss.disabled},we]}colorModeForRenderPass(){let R=this.context.gl;return this._showOverdrawInspector?new cl([R.CONSTANT_COLOR,R.ONE],new t.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?cl.unblended:cl.alphaBlended}depthModeForSublayer(R,ae,we){if(!this.opaquePassEnabledForLayer())return ls.disabled;let Se=1-((1+this.currentLayer)*this.numSublayers+R)*this.depthEpsilon;return new ls(we||this.context.gl.LEQUAL,ae,[Se,Se])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(R,ae){this.style=R,this.options=ae,this.lineAtlas=R.lineAtlas,this.imageManager=R.imageManager,this.glyphManager=R.glyphManager,this.symbolFadeChange=R.placement.symbolFadeChange(i.now()),this.imageManager.beginFrame();let we=this.style._order,Se=this.style.sourceCaches,Oe={},pt={},At={};for(let Bt in Se){let $t=Se[Bt];$t.used&&$t.prepare(this.context),Oe[Bt]=$t.getVisibleCoordinates(),pt[Bt]=Oe[Bt].slice().reverse(),At[Bt]=$t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Bt=0;Bt<we.length;Bt++)if(this.style._layers[we[Bt]].is3D()){this.opaquePassCutoff=Bt;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let Bt of we){let $t=this.style._layers[Bt];if(!$t.hasOffscreenPass()||$t.isHidden(this.transform.zoom))continue;let br=pt[$t.source];($t.type==="custom"||br.length)&&this.renderLayer(this,Se[$t.source],$t,br)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:ae.showOverdrawInspector?t.aM.black:t.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(Bt,$t){let br=Bt.context,Ar=br.gl,Yr=((dt,Ct,wt)=>({u_sky_color:dt.properties.get("sky-color"),u_horizon_color:dt.properties.get("horizon-color"),u_horizon:(Ct.height/2+Ct.getHorizon())*wt,u_sky_horizon_blend:dt.properties.get("sky-horizon-blend")*Ct.height/2*wt}))($t,Bt.style.map.transform,Bt.pixelRatio),sa=new ls(Ar.LEQUAL,ls.ReadWrite,[0,1]),He=Ss.disabled,Je=Bt.colorModeForRenderPass(),ut=Bt.useProgram("sky");if(!$t.mesh){let dt=new t.aX;dt.emplaceBack(-1,-1),dt.emplaceBack(1,-1),dt.emplaceBack(1,1),dt.emplaceBack(-1,1);let Ct=new t.aY;Ct.emplaceBack(0,1,2),Ct.emplaceBack(0,2,3),$t.mesh=new Lu(br.createVertexBuffer(dt,da.members),br.createIndexBuffer(Ct),t.a0.simpleSegment(0,0,dt.length,Ct.length))}ut.draw(br,Ar.TRIANGLES,sa,He,Je,Qn.disabled,Yr,void 0,"sky",$t.mesh.vertexBuffer,$t.mesh.indexBuffer,$t.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=ae.showOverdrawInspector,this.depthRangeFor3D=[0,1-(R._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=we.length-1;this.currentLayer>=0;this.currentLayer--){let Bt=this.style._layers[we[this.currentLayer]],$t=Se[Bt.source],br=Oe[Bt.source];this._renderTileClippingMasks(Bt,br),this.renderLayer(this,$t,Bt,br)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<we.length;this.currentLayer++){let Bt=this.style._layers[we[this.currentLayer]],$t=Se[Bt.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Bt))continue;let br=(Bt.type==="symbol"?At:pt)[Bt.source];this._renderTileClippingMasks(Bt,Oe[Bt.source]),this.renderLayer(this,$t,Bt,br)}if(this.options.showTileBoundaries){let Bt=function($t,br){let Ar=null,Yr=Object.values($t._layers).flatMap(ut=>ut.source&&!ut.isHidden(br)?[$t.sourceCaches[ut.source]]:[]),sa=Yr.filter(ut=>ut.getSource().type==="vector"),He=Yr.filter(ut=>ut.getSource().type!=="vector"),Je=ut=>{(!Ar||Ar.getSource().maxzoom<ut.getSource().maxzoom)&&(Ar=ut)};return sa.forEach(ut=>Je(ut)),Ar||He.forEach(ut=>Je(ut)),Ar}(this.style,this.transform.zoom);Bt&&function($t,br,Ar){for(let Yr=0;Yr<Ar.length;Yr++)Nf($t,br,Ar[Yr])}(this,Bt,Bt.getVisibleCoordinates())}this.options.showPadding&&function(Bt){let $t=Bt.transform.padding;Wc(Bt,Bt.transform.height-($t.top||0),3,Tc),Wc(Bt,$t.bottom||0,3,Gs),Kf(Bt,$t.left||0,3,Cf),Kf(Bt,Bt.transform.width-($t.right||0),3,lh);let br=Bt.transform.centerPoint;(function(Ar,Yr,sa,He){ku(Ar,Yr-1,sa-10,2,20,He),ku(Ar,Yr-10,sa-1,20,2,He)})(Bt,br.x,Bt.transform.height-br.y,Bf)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(R){if(!this.style||!this.style.map||!this.style.map.terrain)return;let ae=this.terrainFacilitator.matrix,we=this.transform.modelViewProjectionMatrix,Se=this.terrainFacilitator.dirty;Se||(Se=R?!t.a_(ae,we):!t.a$(ae,we)),Se||(Se=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Se&&(t.b0(ae,we),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Oe,pt){let At=Oe.context,Bt=At.gl,$t=cl.unblended,br=new ls(Bt.LEQUAL,ls.ReadWrite,[0,1]),Ar=pt.getTerrainMesh(),Yr=pt.sourceCache.getRenderableTiles(),sa=Oe.useProgram("terrainDepth");At.bindFramebuffer.set(pt.getFramebuffer("depth").framebuffer),At.viewport.set([0,0,Oe.width/devicePixelRatio,Oe.height/devicePixelRatio]),At.clear({color:t.aM.transparent,depth:1});for(let He of Yr){let Je=pt.getTerrainData(He.tileID),ut={u_matrix:Oe.transform.calculatePosMatrix(He.tileID.toUnwrapped()),u_ele_delta:pt.getMeshFrameDelta(Oe.transform.zoom)};sa.draw(At,Bt.TRIANGLES,br,Ss.disabled,$t,Qn.backCCW,ut,Je,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}At.bindFramebuffer.set(null),At.viewport.set([0,0,Oe.width,Oe.height])}(this,this.style.map.terrain),function(Oe,pt){let At=Oe.context,Bt=At.gl,$t=cl.unblended,br=new ls(Bt.LEQUAL,ls.ReadWrite,[0,1]),Ar=pt.getTerrainMesh(),Yr=pt.getCoordsTexture(),sa=pt.sourceCache.getRenderableTiles(),He=Oe.useProgram("terrainCoords");At.bindFramebuffer.set(pt.getFramebuffer("coords").framebuffer),At.viewport.set([0,0,Oe.width/devicePixelRatio,Oe.height/devicePixelRatio]),At.clear({color:t.aM.transparent,depth:1}),pt.coordsIndex=[];for(let Je of sa){let ut=pt.getTerrainData(Je.tileID);At.activeTexture.set(Bt.TEXTURE0),Bt.bindTexture(Bt.TEXTURE_2D,Yr.texture);let dt={u_matrix:Oe.transform.calculatePosMatrix(Je.tileID.toUnwrapped()),u_terrain_coords_id:(255-pt.coordsIndex.length)/255,u_texture:0,u_ele_delta:pt.getMeshFrameDelta(Oe.transform.zoom)};He.draw(At,Bt.TRIANGLES,br,Ss.disabled,$t,Qn.backCCW,dt,ut,"terrain",Ar.vertexBuffer,Ar.indexBuffer,Ar.segments),pt.coordsIndex.push(Je.tileID.key)}At.bindFramebuffer.set(null),At.viewport.set([0,0,Oe.width,Oe.height])}(this,this.style.map.terrain))}renderLayer(R,ae,we,Se){if(!we.isHidden(this.transform.zoom)&&(we.type==="background"||we.type==="custom"||(Se||[]).length))switch(this.id=we.id,we.type){case"symbol":(function(Oe,pt,At,Bt,$t){if(Oe.renderPass!=="translucent")return;let br=Ss.disabled,Ar=Oe.colorModeForRenderPass();(At._unevaluatedLayout.hasValue("text-variable-anchor")||At._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Yr,sa,He,Je,ut,dt,Ct,wt,Dt){let ur=sa.transform,mr=mi(),Er=ut==="map",Br=dt==="map";for(let Qr of Yr){let ga=Je.getTile(Qr),Sa=ga.getBucket(He);if(!Sa||!Sa.text||!Sa.text.segments.get().length)continue;let Oa=t.ag(Sa.textSizeData,ur.zoom),di=Ua(ga,1,sa.transform.zoom),Wi=wr(Qr.posMatrix,Br,Er,sa.transform,di),Gi=He.layout.get("icon-text-fit")!=="none"&&Sa.hasIconData();if(Oa){let on=Math.pow(2,ur.zoom-ga.tileID.overscaledZ),Tn=sa.style.map.terrain?(Bn,Ao)=>sa.style.map.terrain.getElevation(Qr,Bn,Ao):null,Wn=mr.translatePosition(ur,ga,Ct,wt);rf(Sa,Er,Br,Dt,ur,Wi,Qr.posMatrix,on,Oa,Gi,mr,Wn,Qr.toUnwrapped(),Tn)}}}(Bt,Oe,At,pt,At.layout.get("text-rotation-alignment"),At.layout.get("text-pitch-alignment"),At.paint.get("text-translate"),At.paint.get("text-translate-anchor"),$t),At.paint.get("icon-opacity").constantOr(1)!==0&&Yf(Oe,pt,At,Bt,!1,At.paint.get("icon-translate"),At.paint.get("icon-translate-anchor"),At.layout.get("icon-rotation-alignment"),At.layout.get("icon-pitch-alignment"),At.layout.get("icon-keep-upright"),br,Ar),At.paint.get("text-opacity").constantOr(1)!==0&&Yf(Oe,pt,At,Bt,!0,At.paint.get("text-translate"),At.paint.get("text-translate-anchor"),At.layout.get("text-rotation-alignment"),At.layout.get("text-pitch-alignment"),At.layout.get("text-keep-upright"),br,Ar),pt.map.showCollisionBoxes&&(Vu(Oe,pt,At,Bt,!0),Vu(Oe,pt,At,Bt,!1))})(R,ae,we,Se,this.style.placement.variableOffsets);break;case"circle":(function(Oe,pt,At,Bt){if(Oe.renderPass!=="translucent")return;let $t=At.paint.get("circle-opacity"),br=At.paint.get("circle-stroke-width"),Ar=At.paint.get("circle-stroke-opacity"),Yr=!At.layout.get("circle-sort-key").isConstant();if($t.constantOr(1)===0&&(br.constantOr(1)===0||Ar.constantOr(1)===0))return;let sa=Oe.context,He=sa.gl,Je=Oe.depthModeForSublayer(0,ls.ReadOnly),ut=Ss.disabled,dt=Oe.colorModeForRenderPass(),Ct=[];for(let wt=0;wt<Bt.length;wt++){let Dt=Bt[wt],ur=pt.getTile(Dt),mr=ur.getBucket(At);if(!mr)continue;let Er=mr.programConfigurations.get(At.id),Br=Oe.useProgram("circle",Er),Qr=mr.layoutVertexBuffer,ga=mr.indexBuffer,Sa=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Dt),Oa={programConfiguration:Er,program:Br,layoutVertexBuffer:Qr,indexBuffer:ga,uniformValues:An(Oe,Dt,ur,At),terrainData:Sa};if(Yr){let di=mr.segments.get();for(let Wi of di)Ct.push({segments:new t.a0([Wi]),sortKey:Wi.sortKey,state:Oa})}else Ct.push({segments:mr.segments,sortKey:0,state:Oa})}Yr&&Ct.sort((wt,Dt)=>wt.sortKey-Dt.sortKey);for(let wt of Ct){let{programConfiguration:Dt,program:ur,layoutVertexBuffer:mr,indexBuffer:Er,uniformValues:Br,terrainData:Qr}=wt.state;ur.draw(sa,He.TRIANGLES,Je,ut,dt,Qn.disabled,Br,Qr,At.id,mr,Er,wt.segments,At.paint,Oe.transform.zoom,Dt)}})(R,ae,we,Se);break;case"heatmap":(function(Oe,pt,At,Bt){if(At.paint.get("heatmap-opacity")===0)return;let $t=Oe.context;if(Oe.style.map.terrain){for(let br of Bt){let Ar=pt.getTile(br);pt.hasRenderableParent(br)||(Oe.renderPass==="offscreen"?af(Oe,Ar,At,br):Oe.renderPass==="translucent"&&Nc(Oe,At,br))}$t.viewport.set([0,0,Oe.width,Oe.height])}else Oe.renderPass==="offscreen"?function(br,Ar,Yr,sa){let He=br.context,Je=He.gl,ut=Ss.disabled,dt=new cl([Je.ONE,Je.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(Ct,wt,Dt){let ur=Ct.gl;Ct.activeTexture.set(ur.TEXTURE1),Ct.viewport.set([0,0,wt.width/4,wt.height/4]);let mr=Dt.heatmapFbos.get(t.aU);mr?(ur.bindTexture(ur.TEXTURE_2D,mr.colorAttachment.get()),Ct.bindFramebuffer.set(mr.framebuffer)):(mr=Ff(Ct,wt.width/4,wt.height/4),Dt.heatmapFbos.set(t.aU,mr))})(He,br,Yr),He.clear({color:t.aM.transparent});for(let Ct=0;Ct<sa.length;Ct++){let wt=sa[Ct];if(Ar.hasRenderableParent(wt))continue;let Dt=Ar.getTile(wt),ur=Dt.getBucket(Yr);if(!ur)continue;let mr=ur.programConfigurations.get(Yr.id),Er=br.useProgram("heatmap",mr),{zoom:Br}=br.transform;Er.draw(He,Je.TRIANGLES,ls.disabled,ut,dt,Qn.disabled,to(wt.posMatrix,Dt,Br,Yr.paint.get("heatmap-intensity")),null,Yr.id,ur.layoutVertexBuffer,ur.indexBuffer,ur.segments,Yr.paint,br.transform.zoom,mr)}He.viewport.set([0,0,br.width,br.height])}(Oe,pt,At,Bt):Oe.renderPass==="translucent"&&function(br,Ar){let Yr=br.context,sa=Yr.gl;Yr.setColorMode(br.colorModeForRenderPass());let He=Ar.heatmapFbos.get(t.aU);He&&(Yr.activeTexture.set(sa.TEXTURE0),sa.bindTexture(sa.TEXTURE_2D,He.colorAttachment.get()),Yr.activeTexture.set(sa.TEXTURE1),Of(Yr,Ar).bind(sa.LINEAR,sa.CLAMP_TO_EDGE),br.useProgram("heatmapTexture").draw(Yr,sa.TRIANGLES,ls.disabled,Ss.disabled,br.colorModeForRenderPass(),Qn.disabled,mo(br,Ar,0,1),null,Ar.id,br.viewportBuffer,br.quadTriangleIndexBuffer,br.viewportSegments,Ar.paint,br.transform.zoom))}(Oe,At)})(R,ae,we,Se);break;case"line":(function(Oe,pt,At,Bt){if(Oe.renderPass!=="translucent")return;let $t=At.paint.get("line-opacity"),br=At.paint.get("line-width");if($t.constantOr(1)===0||br.constantOr(1)===0)return;let Ar=Oe.depthModeForSublayer(0,ls.ReadOnly),Yr=Oe.colorModeForRenderPass(),sa=At.paint.get("line-dasharray"),He=At.paint.get("line-pattern"),Je=He.constantOr(1),ut=At.paint.get("line-gradient"),dt=At.getCrossfadeParameters(),Ct=Je?"linePattern":sa?"lineSDF":ut?"lineGradient":"line",wt=Oe.context,Dt=wt.gl,ur=!0;for(let mr of Bt){let Er=pt.getTile(mr);if(Je&&!Er.patternsLoaded())continue;let Br=Er.getBucket(At);if(!Br)continue;let Qr=Br.programConfigurations.get(At.id),ga=Oe.context.program.get(),Sa=Oe.useProgram(Ct,Qr),Oa=ur||Sa.program!==ga,di=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(mr),Wi=He.constantOr(null);if(Wi&&Er.imageAtlas){let Tn=Er.imageAtlas,Wn=Tn.patternPositions[Wi.to.toString()],Bn=Tn.patternPositions[Wi.from.toString()];Wn&&Bn&&Qr.setConstantPatternPositions(Wn,Bn)}let Gi=di?mr:null,on=Je?Ts(Oe,Er,At,dt,Gi):sa?Po(Oe,Er,At,sa,dt,Gi):ut?Xo(Oe,Er,At,Br.lineClipsArray.length,Gi):Jo(Oe,Er,At,Gi);if(Je)wt.activeTexture.set(Dt.TEXTURE0),Er.imageAtlasTexture.bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Qr.updatePaintBuffers(dt);else if(sa&&(Oa||Oe.lineAtlas.dirty))wt.activeTexture.set(Dt.TEXTURE0),Oe.lineAtlas.bind(wt);else if(ut){let Tn=Br.gradients[At.id],Wn=Tn.texture;if(At.gradientVersion!==Tn.version){let Bn=256;if(At.stepInterpolant){let Ao=pt.getSource().maxzoom,ss=mr.canonical.z===Ao?Math.ceil(1<<Oe.transform.maxZoom-mr.canonical.z):1;Bn=t.ac(t.aV(Br.maxLineLength/t.X*1024*ss),256,wt.maxTextureSize)}Tn.gradient=t.aW({expression:At.gradientExpression(),evaluationKey:"lineProgress",resolution:Bn,image:Tn.gradient||void 0,clips:Br.lineClipsArray}),Tn.texture?Tn.texture.update(Tn.gradient):Tn.texture=new u(wt,Tn.gradient,Dt.RGBA),Tn.version=At.gradientVersion,Wn=Tn.texture}wt.activeTexture.set(Dt.TEXTURE0),Wn.bind(At.stepInterpolant?Dt.NEAREST:Dt.LINEAR,Dt.CLAMP_TO_EDGE)}Sa.draw(wt,Dt.TRIANGLES,Ar,Oe.stencilModeForClipping(mr),Yr,Qn.disabled,on,di,At.id,Br.layoutVertexBuffer,Br.indexBuffer,Br.segments,At.paint,Oe.transform.zoom,Qr,Br.layoutVertexBuffer2),ur=!1}})(R,ae,we,Se);break;case"fill":(function(Oe,pt,At,Bt){let $t=At.paint.get("fill-color"),br=At.paint.get("fill-opacity");if(br.constantOr(1)===0)return;let Ar=Oe.colorModeForRenderPass(),Yr=At.paint.get("fill-pattern"),sa=Oe.opaquePassEnabledForLayer()&&!Yr.constantOr(1)&&$t.constantOr(t.aM.transparent).a===1&&br.constantOr(0)===1?"opaque":"translucent";if(Oe.renderPass===sa){let He=Oe.depthModeForSublayer(1,Oe.renderPass==="opaque"?ls.ReadWrite:ls.ReadOnly);Ef(Oe,pt,At,Bt,He,Ar,!1)}if(Oe.renderPass==="translucent"&&At.paint.get("fill-antialias")){let He=Oe.depthModeForSublayer(At.getPaintProperty("fill-outline-color")?2:0,ls.ReadOnly);Ef(Oe,pt,At,Bt,He,Ar,!0)}})(R,ae,we,Se);break;case"fill-extrusion":(function(Oe,pt,At,Bt){let $t=At.paint.get("fill-extrusion-opacity");if($t!==0&&Oe.renderPass==="translucent"){let br=new ls(Oe.context.gl.LEQUAL,ls.ReadWrite,Oe.depthRangeFor3D);if($t!==1||At.paint.get("fill-extrusion-pattern").constantOr(1))oc(Oe,pt,At,Bt,br,Ss.disabled,cl.disabled),oc(Oe,pt,At,Bt,br,Oe.stencilModeFor3D(),Oe.colorModeForRenderPass());else{let Ar=Oe.colorModeForRenderPass();oc(Oe,pt,At,Bt,br,Ss.disabled,Ar)}}})(R,ae,we,Se);break;case"hillshade":(function(Oe,pt,At,Bt){if(Oe.renderPass!=="offscreen"&&Oe.renderPass!=="translucent")return;let $t=Oe.context,br=Oe.depthModeForSublayer(0,ls.ReadOnly),Ar=Oe.colorModeForRenderPass(),[Yr,sa]=Oe.renderPass==="translucent"?Oe.stencilConfigForOverlap(Bt):[{},Bt];for(let He of sa){let Je=pt.getTile(He);Je.needsHillshadePrepare!==void 0&&Je.needsHillshadePrepare&&Oe.renderPass==="offscreen"?Jl(Oe,Je,At,br,Ss.disabled,Ar):Oe.renderPass==="translucent"&&Hc(Oe,He,Je,At,br,Yr[He.overscaledZ],Ar)}$t.viewport.set([0,0,Oe.width,Oe.height])})(R,ae,we,Se);break;case"raster":(function(Oe,pt,At,Bt){if(Oe.renderPass!=="translucent"||At.paint.get("raster-opacity")===0||!Bt.length)return;let $t=Oe.context,br=$t.gl,Ar=pt.getSource(),Yr=Oe.useProgram("raster"),sa=Oe.colorModeForRenderPass(),[He,Je]=Ar instanceof it?[{},Bt]:Oe.stencilConfigForOverlap(Bt),ut=Je[Je.length-1].overscaledZ,dt=!Oe.options.moving;for(let Ct of Je){let wt=Oe.depthModeForSublayer(Ct.overscaledZ-ut,At.paint.get("raster-opacity")===1?ls.ReadWrite:ls.ReadOnly,br.LESS),Dt=pt.getTile(Ct);Dt.registerFadeDuration(At.paint.get("raster-fade-duration"));let ur=pt.findLoadedParent(Ct,0),mr=pt.findLoadedSibling(Ct),Er=Uc(Dt,ur||mr||null,pt,At,Oe.transform,Oe.style.map.terrain),Br,Qr,ga=At.paint.get("raster-resampling")==="nearest"?br.NEAREST:br.LINEAR;$t.activeTexture.set(br.TEXTURE0),Dt.texture.bind(ga,br.CLAMP_TO_EDGE,br.LINEAR_MIPMAP_NEAREST),$t.activeTexture.set(br.TEXTURE1),ur?(ur.texture.bind(ga,br.CLAMP_TO_EDGE,br.LINEAR_MIPMAP_NEAREST),Br=Math.pow(2,ur.tileID.overscaledZ-Dt.tileID.overscaledZ),Qr=[Dt.tileID.canonical.x*Br%1,Dt.tileID.canonical.y*Br%1]):Dt.texture.bind(ga,br.CLAMP_TO_EDGE,br.LINEAR_MIPMAP_NEAREST),Dt.texture.useMipmap&&$t.extTextureFilterAnisotropic&&Oe.transform.pitch>20&&br.texParameterf(br.TEXTURE_2D,$t.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$t.extTextureFilterAnisotropicMax);let Sa=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Ct),Oa=Sa?Ct:null,di=Oa?Oa.posMatrix:Oe.transform.calculatePosMatrix(Ct.toUnwrapped(),dt),Wi=To(di,Qr||[0,0],Br||1,Er,At);Ar instanceof it?Yr.draw($t,br.TRIANGLES,wt,Ss.disabled,sa,Qn.disabled,Wi,Sa,At.id,Ar.boundsBuffer,Oe.quadTriangleIndexBuffer,Ar.boundsSegments):Yr.draw($t,br.TRIANGLES,wt,He[Ct.overscaledZ],sa,Qn.disabled,Wi,Sa,At.id,Oe.rasterBoundsBuffer,Oe.quadTriangleIndexBuffer,Oe.rasterBoundsSegments)}})(R,ae,we,Se);break;case"background":(function(Oe,pt,At,Bt){let $t=At.paint.get("background-color"),br=At.paint.get("background-opacity");if(br===0)return;let Ar=Oe.context,Yr=Ar.gl,sa=Oe.transform,He=sa.tileSize,Je=At.paint.get("background-pattern");if(Oe.isPatternMissing(Je))return;let ut=!Je&&$t.a===1&&br===1&&Oe.opaquePassEnabledForLayer()?"opaque":"translucent";if(Oe.renderPass!==ut)return;let dt=Ss.disabled,Ct=Oe.depthModeForSublayer(0,ut==="opaque"?ls.ReadWrite:ls.ReadOnly),wt=Oe.colorModeForRenderPass(),Dt=Oe.useProgram(Je?"backgroundPattern":"background"),ur=Bt||sa.coveringTiles({tileSize:He,terrain:Oe.style.map.terrain});Je&&(Ar.activeTexture.set(Yr.TEXTURE0),Oe.imageManager.bind(Oe.context));let mr=At.getCrossfadeParameters();for(let Er of ur){let Br=Bt?Er.posMatrix:Oe.transform.calculatePosMatrix(Er.toUnwrapped()),Qr=Je?Ys(Br,br,Oe,Je,{tileID:Er,tileSize:He},mr):os(Br,br,$t),ga=Oe.style.map.terrain&&Oe.style.map.terrain.getTerrainData(Er);Dt.draw(Ar,Yr.TRIANGLES,Ct,dt,wt,Qn.disabled,Qr,ga,At.id,Oe.tileExtentBuffer,Oe.quadTriangleIndexBuffer,Oe.tileExtentSegments)}})(R,0,we,Se);break;case"custom":(function(Oe,pt,At){let Bt=Oe.context,$t=At.implementation;if(Oe.renderPass==="offscreen"){let br=$t.prerender;br&&(Oe.setCustomLayerDefaults(),Bt.setColorMode(Oe.colorModeForRenderPass()),br.call($t,Bt.gl,Oe.transform.customLayerMatrix()),Bt.setDirty(),Oe.setBaseState())}else if(Oe.renderPass==="translucent"){Oe.setCustomLayerDefaults(),Bt.setColorMode(Oe.colorModeForRenderPass()),Bt.setStencilMode(Ss.disabled);let br=$t.renderingMode==="3d"?new ls(Oe.context.gl.LEQUAL,ls.ReadWrite,Oe.depthRangeFor3D):Oe.depthModeForSublayer(0,ls.ReadOnly);Bt.setDepthMode(br),$t.render(Bt.gl,Oe.transform.customLayerMatrix(),{farZ:Oe.transform.farZ,nearZ:Oe.transform.nearZ,fov:Oe.transform._fov,modelViewProjectionMatrix:Oe.transform.modelViewProjectionMatrix,projectionMatrix:Oe.transform.projectionMatrix}),Bt.setDirty(),Oe.setBaseState(),Bt.bindFramebuffer.set(null)}})(R,0,we)}}translatePosMatrix(R,ae,we,Se,Oe){if(!we[0]&&!we[1])return R;let pt=Oe?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(pt){let $t=Math.sin(pt),br=Math.cos(pt);we=[we[0]*br-we[1]*$t,we[0]*$t+we[1]*br]}let At=[Oe?we[0]:Ua(ae,we[0],this.transform.zoom),Oe?we[1]:Ua(ae,we[1],this.transform.zoom),0],Bt=new Float32Array(16);return t.J(Bt,R,At),Bt}saveTileTexture(R){let ae=this._tileTextures[R.size[0]];ae?ae.push(R):this._tileTextures[R.size[0]]=[R]}getTileTexture(R){let ae=this._tileTextures[R];return ae&&ae.length>0?ae.pop():null}isPatternMissing(R){if(!R)return!1;if(!R.from||!R.to)return!0;let ae=this.imageManager.getPattern(R.from.toString()),we=this.imageManager.getPattern(R.to.toString());return!ae||!we}useProgram(R,ae){this.cache=this.cache||{};let we=R+(ae?ae.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[we]||(this.cache[we]=new Ca(this.context,fa[R],ae,Os[R],this._showOverdrawInspector,this.style.map.terrain)),this.cache[we]}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 R=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(R.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:R,drawingBufferHeight:ae}=this.context.gl;return this.width!==R||this.height!==ae}}class nl{constructor(R,ae){this.points=R,this.planes=ae}static fromInvProjectionMatrix(R,ae,we){let Se=Math.pow(2,we),Oe=[[-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(At=>{let Bt=1/(At=t.af([],At,R))[3]/ae*Se;return t.b1(At,At,[Bt,Bt,1/At[3],Bt])}),pt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(At=>{let Bt=function(Yr,sa){var He=sa[0],Je=sa[1],ut=sa[2],dt=He*He+Je*Je+ut*ut;return dt>0&&(dt=1/Math.sqrt(dt)),Yr[0]=sa[0]*dt,Yr[1]=sa[1]*dt,Yr[2]=sa[2]*dt,Yr}([],function(Yr,sa,He){var Je=sa[0],ut=sa[1],dt=sa[2],Ct=He[0],wt=He[1],Dt=He[2];return Yr[0]=ut*Dt-dt*wt,Yr[1]=dt*Ct-Je*Dt,Yr[2]=Je*wt-ut*Ct,Yr}([],E([],Oe[At[0]],Oe[At[1]]),E([],Oe[At[2]],Oe[At[1]]))),$t=-((br=Bt)[0]*(Ar=Oe[At[1]])[0]+br[1]*Ar[1]+br[2]*Ar[2]);var br,Ar;return Bt.concat($t)});return new nl(Oe,pt)}}class dc{constructor(R,ae){this.min=R,this.max=ae,this.center=function(we,Se,Oe){return we[0]=.5*Se[0],we[1]=.5*Se[1],we[2]=.5*Se[2],we}([],function(we,Se,Oe){return we[0]=Se[0]+Oe[0],we[1]=Se[1]+Oe[1],we[2]=Se[2]+Oe[2],we}([],this.min,this.max))}quadrant(R){let ae=[R%2==0,R<2],we=w(this.min),Se=w(this.max);for(let Oe=0;Oe<ae.length;Oe++)we[Oe]=ae[Oe]?this.min[Oe]:this.center[Oe],Se[Oe]=ae[Oe]?this.center[Oe]:this.max[Oe];return Se[2]=this.max[2],new dc(we,Se)}distanceX(R){return Math.max(Math.min(this.max[0],R[0]),this.min[0])-R[0]}distanceY(R){return Math.max(Math.min(this.max[1],R[1]),this.min[1])-R[1]}intersects(R){let ae=[[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]],we=!0;for(let Se=0;Se<R.planes.length;Se++){let Oe=R.planes[Se],pt=0;for(let At=0;At<ae.length;At++)t.b2(Oe,ae[At])>=0&&pt++;if(pt===0)return 0;pt!==ae.length&&(we=!1)}if(we)return 2;for(let Se=0;Se<3;Se++){let Oe=Number.MAX_VALUE,pt=-Number.MAX_VALUE;for(let At=0;At<R.points.length;At++){let Bt=R.points[At][Se]-this.min[Se];Oe=Math.min(Oe,Bt),pt=Math.max(pt,Bt)}if(pt<0||Oe>this.max[Se]-this.min[Se])return 0}return 1}}class vu{constructor(R=0,ae=0,we=0,Se=0){if(isNaN(R)||R<0||isNaN(ae)||ae<0||isNaN(we)||we<0||isNaN(Se)||Se<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=R,this.bottom=ae,this.left=we,this.right=Se}interpolate(R,ae,we){return ae.top!=null&&R.top!=null&&(this.top=t.y.number(R.top,ae.top,we)),ae.bottom!=null&&R.bottom!=null&&(this.bottom=t.y.number(R.bottom,ae.bottom,we)),ae.left!=null&&R.left!=null&&(this.left=t.y.number(R.left,ae.left,we)),ae.right!=null&&R.right!=null&&(this.right=t.y.number(R.right,ae.right,we)),this}getCenter(R,ae){let we=t.ac((this.left+R-this.right)/2,0,R),Se=t.ac((this.top+ae-this.bottom)/2,0,ae);return new t.P(we,Se)}equals(R){return this.top===R.top&&this.bottom===R.bottom&&this.left===R.left&&this.right===R.right}clone(){return new vu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let bu=85.051129;class Ml{constructor(R,ae,we,Se,Oe){this.tileSize=512,this._renderWorldCopies=Oe===void 0||!!Oe,this._minZoom=R||0,this._maxZoom=ae||22,this._minPitch=we??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new vu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let R=new Ml(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return R.apply(this),R}apply(R){this.tileSize=R.tileSize,this.latRange=R.latRange,this.lngRange=R.lngRange,this.width=R.width,this.height=R.height,this._center=R._center,this._elevation=R._elevation,this.minElevationForCurrentTile=R.minElevationForCurrentTile,this.zoom=R.zoom,this.angle=R.angle,this._fov=R._fov,this._pitch=R._pitch,this._unmodified=R._unmodified,this._edgeInsets=R._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(R){this._minZoom!==R&&(this._minZoom=R,this.zoom=Math.max(this.zoom,R))}get maxZoom(){return this._maxZoom}set maxZoom(R){this._maxZoom!==R&&(this._maxZoom=R,this.zoom=Math.min(this.zoom,R))}get minPitch(){return this._minPitch}set minPitch(R){this._minPitch!==R&&(this._minPitch=R,this.pitch=Math.max(this.pitch,R))}get maxPitch(){return this._maxPitch}set maxPitch(R){this._maxPitch!==R&&(this._maxPitch=R,this.pitch=Math.min(this.pitch,R))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(R){R===void 0?R=!0:R===null&&(R=!1),this._renderWorldCopies=R}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(R){let ae=-t.b3(R,-180,180)*Math.PI/180;this.angle!==ae&&(this._unmodified=!1,this.angle=ae,this._calcMatrices(),this.rotationMatrix=function(){var we=new t.A(4);return t.A!=Float32Array&&(we[1]=0,we[2]=0),we[0]=1,we[3]=1,we}(),function(we,Se,Oe){var pt=Se[0],At=Se[1],Bt=Se[2],$t=Se[3],br=Math.sin(Oe),Ar=Math.cos(Oe);we[0]=pt*Ar+Bt*br,we[1]=At*Ar+$t*br,we[2]=pt*-br+Bt*Ar,we[3]=At*-br+$t*Ar}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(R){let ae=t.ac(R,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ae&&(this._unmodified=!1,this._pitch=ae,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(R){R=Math.max(.01,Math.min(60,R)),this._fov!==R&&(this._unmodified=!1,this._fov=R/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(R){let ae=Math.min(Math.max(R,this.minZoom),this.maxZoom);this._zoom!==ae&&(this._unmodified=!1,this._zoom=ae,this.tileZoom=Math.max(0,Math.floor(ae)),this.scale=this.zoomScale(ae),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(R){R.lat===this._center.lat&&R.lng===this._center.lng||(this._unmodified=!1,this._center=R,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(R){R!==this._elevation&&(this._elevation=R,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(R){this._edgeInsets.equals(R)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,R,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(R){return this._edgeInsets.equals(R)}interpolatePadding(R,ae,we){this._unmodified=!1,this._edgeInsets.interpolate(R,ae,we),this._constrain(),this._calcMatrices()}coveringZoomLevel(R){let ae=(R.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/R.tileSize));return Math.max(0,ae)}getVisibleUnwrappedCoordinates(R){let ae=[new t.b4(0,R)];if(this._renderWorldCopies){let we=this.pointCoordinate(new t.P(0,0)),Se=this.pointCoordinate(new t.P(this.width,0)),Oe=this.pointCoordinate(new t.P(this.width,this.height)),pt=this.pointCoordinate(new t.P(0,this.height)),At=Math.floor(Math.min(we.x,Se.x,Oe.x,pt.x)),Bt=Math.floor(Math.max(we.x,Se.x,Oe.x,pt.x)),$t=1;for(let br=At-$t;br<=Bt+$t;br++)br!==0&&ae.push(new t.b4(br,R))}return ae}coveringTiles(R){var ae,we;let Se=this.coveringZoomLevel(R),Oe=Se;if(R.minzoom!==void 0&&Se<R.minzoom)return[];R.maxzoom!==void 0&&Se>R.maxzoom&&(Se=R.maxzoom);let pt=this.pointCoordinate(this.getCameraPoint()),At=t.Z.fromLngLat(this.center),Bt=Math.pow(2,Se),$t=[Bt*pt.x,Bt*pt.y,0],br=[Bt*At.x,Bt*At.y,0],Ar=nl.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Se),Yr=R.minzoom||0;!R.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Yr=Se);let sa=R.terrain?2/Math.min(this.tileSize,R.tileSize)*this.tileSize:3,He=wt=>({aabb:new dc([wt*Bt,0,0],[(wt+1)*Bt,Bt,0]),zoom:0,x:0,y:0,wrap:wt,fullyVisible:!1}),Je=[],ut=[],dt=Se,Ct=R.reparseOverscaled?Oe:Se;if(this._renderWorldCopies)for(let wt=1;wt<=3;wt++)Je.push(He(-wt)),Je.push(He(wt));for(Je.push(He(0));Je.length>0;){let wt=Je.pop(),Dt=wt.x,ur=wt.y,mr=wt.fullyVisible;if(!mr){let Sa=wt.aabb.intersects(Ar);if(Sa===0)continue;mr=Sa===2}let Er=R.terrain?$t:br,Br=wt.aabb.distanceX(Er),Qr=wt.aabb.distanceY(Er),ga=Math.max(Math.abs(Br),Math.abs(Qr));if(wt.zoom===dt||ga>sa+(1<<dt-wt.zoom)-2&&wt.zoom>=Yr){let Sa=dt-wt.zoom,Oa=$t[0]-.5-(Dt<<Sa),di=$t[1]-.5-(ur<<Sa);ut.push({tileID:new t.S(wt.zoom===dt?Ct:wt.zoom,wt.wrap,wt.zoom,Dt,ur),distanceSq:y([br[0]-.5-Dt,br[1]-.5-ur]),tileDistanceToCamera:Math.sqrt(Oa*Oa+di*di)})}else for(let Sa=0;Sa<4;Sa++){let Oa=(Dt<<1)+Sa%2,di=(ur<<1)+(Sa>>1),Wi=wt.zoom+1,Gi=wt.aabb.quadrant(Sa);if(R.terrain){let on=new t.S(Wi,wt.wrap,Wi,Oa,di),Tn=R.terrain.getMinMaxElevation(on),Wn=(ae=Tn.minElevation)!==null&&ae!==void 0?ae:this.elevation,Bn=(we=Tn.maxElevation)!==null&&we!==void 0?we:this.elevation;Gi=new dc([Gi.min[0],Gi.min[1],Wn],[Gi.max[0],Gi.max[1],Bn])}Je.push({aabb:Gi,zoom:Wi,x:Oa,y:di,wrap:wt.wrap,fullyVisible:mr})}}return ut.sort((wt,Dt)=>wt.distanceSq-Dt.distanceSq).map(wt=>wt.tileID)}resize(R,ae){this.width=R,this.height=ae,this.pixelsToGLUnits=[2/R,-2/ae],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(R){return Math.pow(2,R)}scaleZoom(R){return Math.log(R)/Math.LN2}project(R){let ae=t.ac(R.lat,-85.051129,bu);return new t.P(t.O(R.lng)*this.worldSize,t.Q(ae)*this.worldSize)}unproject(R){return new t.Z(R.x/this.worldSize,R.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(R){let ae=this.elevation,we=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Se=this.pointLocation(this.centerPoint,R),Oe=R.getElevationForLngLatZoom(Se,this.tileZoom);if(!(this.elevation-Oe))return;let pt=we+ae-Oe,At=Math.cos(this._pitch)*this.cameraToCenterDistance/pt/t.b5(1,Se.lat),Bt=this.scaleZoom(At/this.tileSize);this._elevation=Oe,this._center=Se,this.zoom=Bt}setLocationAtPoint(R,ae){let we=this.pointCoordinate(ae),Se=this.pointCoordinate(this.centerPoint),Oe=this.locationCoordinate(R),pt=new t.Z(Oe.x-(we.x-Se.x),Oe.y-(we.y-Se.y));this.center=this.coordinateLocation(pt),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(R,ae){return ae?this.coordinatePoint(this.locationCoordinate(R),ae.getElevationForLngLatZoom(R,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(R))}pointLocation(R,ae){return this.coordinateLocation(this.pointCoordinate(R,ae))}locationCoordinate(R){return t.Z.fromLngLat(R)}coordinateLocation(R){return R&&R.toLngLat()}pointCoordinate(R,ae){if(ae){let Yr=ae.pointCoordinate(R);if(Yr!=null)return Yr}let we=[R.x,R.y,0,1],Se=[R.x,R.y,1,1];t.af(we,we,this.pixelMatrixInverse),t.af(Se,Se,this.pixelMatrixInverse);let Oe=we[3],pt=Se[3],At=we[1]/Oe,Bt=Se[1]/pt,$t=we[2]/Oe,br=Se[2]/pt,Ar=$t===br?0:(0-$t)/(br-$t);return new t.Z(t.y.number(we[0]/Oe,Se[0]/pt,Ar)/this.worldSize,t.y.number(At,Bt,Ar)/this.worldSize)}coordinatePoint(R,ae=0,we=this.pixelMatrix){let Se=[R.x*this.worldSize,R.y*this.worldSize,ae,1];return t.af(Se,Se,we),new t.P(Se[0]/Se[3],Se[1]/Se[3])}getBounds(){let R=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new t.P(0,R))).extend(this.pointLocation(new t.P(this.width,R))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([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(R){R?(this.lngRange=[R.getWest(),R.getEast()],this.latRange=[R.getSouth(),R.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,bu])}calculateTileMatrix(R){let ae=R.canonical,we=this.worldSize/this.zoomScale(ae.z),Se=ae.x+Math.pow(2,ae.z)*R.wrap,Oe=t.an(new Float64Array(16));return t.J(Oe,Oe,[Se*we,ae.y*we,0]),t.K(Oe,Oe,[we/t.X,we/t.X,1]),Oe}calculatePosMatrix(R,ae=!1){let we=R.key,Se=ae?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[we])return Se[we];let Oe=this.calculateTileMatrix(R);return t.L(Oe,ae?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Oe),Se[we]=new Float32Array(Oe),Se[we]}calculateFogMatrix(R){let ae=R.key,we=this._fogMatrixCache;if(we[ae])return we[ae];let Se=this.calculateTileMatrix(R);return t.L(Se,this.fogMatrix,Se),we[ae]=new Float32Array(Se),we[ae]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(R,ae){ae=t.ac(+ae,this.minZoom,this.maxZoom);let we={center:new t.N(R.lng,R.lat),zoom:ae},Se=this.lngRange;if(!this._renderWorldCopies&&Se===null){let wt=179.9999999999;Se=[-wt,wt]}let Oe=this.tileSize*this.zoomScale(we.zoom),pt=0,At=Oe,Bt=0,$t=Oe,br=0,Ar=0,{x:Yr,y:sa}=this.size;if(this.latRange){let wt=this.latRange;pt=t.Q(wt[1])*Oe,At=t.Q(wt[0])*Oe,At-pt<sa&&(br=sa/(At-pt))}Se&&(Bt=t.b3(t.O(Se[0])*Oe,0,Oe),$t=t.b3(t.O(Se[1])*Oe,0,Oe),$t<Bt&&($t+=Oe),$t-Bt<Yr&&(Ar=Yr/($t-Bt)));let{x:He,y:Je}=this.project.call({worldSize:Oe},R),ut,dt,Ct=Math.max(Ar||0,br||0);if(Ct){let wt=new t.P(Ar?($t+Bt)/2:He,br?(At+pt)/2:Je);return we.center=this.unproject.call({worldSize:Oe},wt).wrap(),we.zoom+=this.scaleZoom(Ct),we}if(this.latRange){let wt=sa/2;Je-wt<pt&&(dt=pt+wt),Je+wt>At&&(dt=At-wt)}if(Se){let wt=(Bt+$t)/2,Dt=He;this._renderWorldCopies&&(Dt=t.b3(He,wt-Oe/2,wt+Oe/2));let ur=Yr/2;Dt-ur<Bt&&(ut=Bt+ur),Dt+ur>$t&&(ut=$t-ur)}if(ut!==void 0||dt!==void 0){let wt=new t.P(ut??He,dt??Je);we.center=this.unproject.call({worldSize:Oe},wt).wrap()}return we}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let R=this._unmodified,{center:ae,zoom:we}=this.getConstrained(this.center,this.zoom);this.center=ae,this.zoom=we,this._unmodified=R,this._constraining=!1}_calcMatrices(){if(!this.height)return;let R=this.centerOffset,ae=this.point.x,we=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Se=t.an(new Float64Array(16));t.K(Se,Se,[this.width/2,-this.height/2,1]),t.J(Se,Se,[1,-1,0]),this.labelPlaneMatrix=Se,Se=t.an(new Float64Array(16)),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[-1,-1,0]),t.K(Se,Se,[2/this.width,2/this.height,1]),this.glCoordMatrix=Se;let Oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pt=Math.min(this.elevation,this.minElevationForCurrentTile),At=Oe-pt*this._pixelPerMeter/Math.cos(this._pitch),Bt=pt<0?At:Oe,$t=Math.PI/2+this._pitch,br=this._fov*(.5+R.y/this.height),Ar=Math.sin(br)*Bt/Math.sin(t.ac(Math.PI-$t-br,.01,Math.PI-.01)),Yr=this.getHorizon(),sa=2*Math.atan(Yr/this.cameraToCenterDistance)*(.5+R.y/(2*Yr)),He=Math.sin(sa)*Bt/Math.sin(t.ac(Math.PI-$t-sa,.01,Math.PI-.01)),Je=Math.min(Ar,He);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Je+Bt),this.nearZ=this.height/50,Se=new Float64Array(16),t.b6(Se,this._fov,this.width/this.height,this.nearZ,this.farZ),Se[8]=2*-R.x/this.width,Se[9]=2*R.y/this.height,this.projectionMatrix=t.ae(Se),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[0,0,-this.cameraToCenterDistance]),t.b7(Se,Se,this._pitch),t.ad(Se,Se,this.angle),t.J(Se,Se,[-ae,-we,0]),this.mercatorMatrix=t.K([],Se,[this.worldSize,this.worldSize,this.worldSize]),t.K(Se,Se,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Se),t.J(Se,Se,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Se,this.invModelViewProjectionMatrix=t.as([],Se),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,Oe,this.farZ),this.fogMatrix[8]=2*-R.x/this.width,this.fogMatrix[9]=2*R.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-ae,-we,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,Se);let ut=this.width%2/2,dt=this.height%2/2,Ct=Math.cos(this.angle),wt=Math.sin(this.angle),Dt=ae-Math.round(ae)+Ct*ut+wt*dt,ur=we-Math.round(we)+Ct*dt+wt*ut,mr=new Float64Array(Se);if(t.J(mr,mr,[Dt>.5?Dt-1:Dt,ur>.5?ur-1:ur,0]),this.alignedModelViewProjectionMatrix=mr,Se=t.as(new Float64Array(16),this.pixelMatrix),!Se)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Se,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let R=this.pointCoordinate(new t.P(0,0)),ae=[R.x*this.worldSize,R.y*this.worldSize,0,1];return t.af(ae,ae,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let R=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,R))}getCameraQueryGeometry(R){let ae=this.getCameraPoint();if(R.length===1)return[R[0],ae];{let we=ae.x,Se=ae.y,Oe=ae.x,pt=ae.y;for(let At of R)we=Math.min(we,At.x),Se=Math.min(Se,At.y),Oe=Math.max(Oe,At.x),pt=Math.max(pt,At.y);return[new t.P(we,Se),new t.P(Oe,Se),new t.P(Oe,pt),new t.P(we,pt),new t.P(we,Se)]}}lngLatToCameraDepth(R,ae){let we=this.locationCoordinate(R),Se=[we.x*this.worldSize,we.y*this.worldSize,ae,1];return t.af(Se,Se,this.modelViewProjectionMatrix),Se[2]/Se[3]}}function Uf(Ne,R){let ae,we=!1,Se=null,Oe=null,pt=()=>{Se=null,we&&(Ne.apply(Oe,ae),Se=setTimeout(pt,R),we=!1)};return(...At)=>(we=!0,Oe=this,ae=At,Se||pt(),Se)}class Jf{constructor(R){this._getCurrentHash=()=>{let ae=window.location.hash.replace("#","");if(this._hashName){let we;return ae.split("&").map(Se=>Se.split("=")).forEach(Se=>{Se[0]===this._hashName&&(we=Se)}),(we&&we[1]||"").split("/")}return ae.split("/")},this._onHashChange=()=>{let ae=this._getCurrentHash();if(ae.length>=3&&!ae.some(we=>isNaN(we))){let we=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ae[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ae[2],+ae[1]],zoom:+ae[0],bearing:we,pitch:+(ae[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let ae=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ae)},this._removeHash=()=>{let ae=this._getCurrentHash();if(ae.length===0)return;let we=ae.join("/"),Se=we;Se.split("&").length>0&&(Se=Se.split("&")[0]),this._hashName&&(Se=`${this._hashName}=${we}`);let Oe=window.location.hash.replace(Se,"");Oe.startsWith("#&")?Oe=Oe.slice(0,1)+Oe.slice(2):Oe==="#"&&(Oe="");let pt=window.location.href.replace(/(#.+)?$/,Oe);pt=pt.replace("&&","&"),window.history.replaceState(window.history.state,null,pt)},this._updateHash=Uf(this._updateHashUnthrottled,300),this._hashName=R&&encodeURIComponent(R)}addTo(R){return this._map=R,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(R){let ae=this._map.getCenter(),we=Math.round(100*this._map.getZoom())/100,Se=Math.ceil((we*Math.LN2+Math.log(512/360/.5))/Math.LN10),Oe=Math.pow(10,Se),pt=Math.round(ae.lng*Oe)/Oe,At=Math.round(ae.lat*Oe)/Oe,Bt=this._map.getBearing(),$t=this._map.getPitch(),br="";if(br+=R?`/${pt}/${At}/${we}`:`${we}/${At}/${pt}`,(Bt||$t)&&(br+="/"+Math.round(10*Bt)/10),$t&&(br+=`/${Math.round($t)}`),this._hashName){let Ar=this._hashName,Yr=!1,sa=window.location.hash.slice(1).split("&").map(He=>{let Je=He.split("=")[0];return Je===Ar?(Yr=!0,`${Je}=${br}`):He}).filter(He=>He);return Yr||sa.push(`${Ar}=${br}`),`#${sa.join("&")}`}return`#${br}`}}let Bu={linearity:.3,easing:t.b8(0,0,.3,1)},Sc=t.e({deceleration:2500,maxSpeed:1400},Bu),vc=t.e({deceleration:20,maxSpeed:1400},Bu),Lh=t.e({deceleration:1e3,maxSpeed:360},Bu),nf=t.e({deceleration:1e3,maxSpeed:90},Bu);class df{constructor(R){this._map=R,this.clear()}clear(){this._inertiaBuffer=[]}record(R){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.now(),settings:R})}_drainInertiaBuffer(){let R=this._inertiaBuffer,ae=i.now();for(;R.length>0&&ae-R[0].time>160;)R.shift()}_onMoveEnd(R){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let ae={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Oe}of this._inertiaBuffer)ae.zoom+=Oe.zoomDelta||0,ae.bearing+=Oe.bearingDelta||0,ae.pitch+=Oe.pitchDelta||0,Oe.panDelta&&ae.pan._add(Oe.panDelta),Oe.around&&(ae.around=Oe.around),Oe.pinchAround&&(ae.pinchAround=Oe.pinchAround);let we=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Se={};if(ae.pan.mag()){let Oe=of(ae.pan.mag(),we,t.e({},Sc,R||{}));Se.offset=ae.pan.mult(Oe.amount/ae.pan.mag()),Se.center=this._map.transform.center,Nu(Se,Oe)}if(ae.zoom){let Oe=of(ae.zoom,we,vc);Se.zoom=this._map.transform.zoom+Oe.amount,Nu(Se,Oe)}if(ae.bearing){let Oe=of(ae.bearing,we,Lh);Se.bearing=this._map.transform.bearing+t.ac(Oe.amount,-179,179),Nu(Se,Oe)}if(ae.pitch){let Oe=of(ae.pitch,we,nf);Se.pitch=this._map.transform.pitch+Oe.amount,Nu(Se,Oe)}if(Se.zoom||Se.bearing){let Oe=ae.pinchAround===void 0?ae.around:ae.pinchAround;Se.around=Oe?this._map.unproject(Oe):this._map.getCenter()}return this.clear(),t.e(Se,{noMoveStart:!0})}}function Nu(Ne,R){(!Ne.duration||Ne.duration<R.duration)&&(Ne.duration=R.duration,Ne.easing=R.easing)}function of(Ne,R,ae){let{maxSpeed:we,linearity:Se,deceleration:Oe}=ae,pt=t.ac(Ne*Se/(R/1e3),-we,we),At=Math.abs(pt)/(Oe*Se);return{easing:ae.easing,duration:1e3*At,amount:pt*(At/2)}}class tu extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(R,ae,we,Se={}){let Oe=n.mousePos(ae.getCanvas(),we),pt=ae.unproject(Oe);super(R,t.e({point:Oe,lngLat:pt,originalEvent:we},Se)),this._defaultPrevented=!1,this.target=ae}}class Xc extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(R,ae,we){let Se=R==="touchend"?we.changedTouches:we.touches,Oe=n.touchPos(ae.getCanvasContainer(),Se),pt=Oe.map(Bt=>ae.unproject(Bt)),At=Oe.reduce((Bt,$t,br,Ar)=>Bt.add($t.div(Ar.length)),new t.P(0,0));super(R,{points:Oe,point:At,lngLats:pt,lngLat:ae.unproject(At),originalEvent:we}),this._defaultPrevented=!1}}class uh extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(R,ae,we){super(R,{originalEvent:we}),this._defaultPrevented=!1}}class vf{constructor(R,ae){this._map=R,this._clickTolerance=ae.clickTolerance}reset(){delete this._mousedownPos}wheel(R){return this._firePreventable(new uh(R.type,this._map,R))}mousedown(R,ae){return this._mousedownPos=ae,this._firePreventable(new tu(R.type,this._map,R))}mouseup(R){this._map.fire(new tu(R.type,this._map,R))}click(R,ae){this._mousedownPos&&this._mousedownPos.dist(ae)>=this._clickTolerance||this._map.fire(new tu(R.type,this._map,R))}dblclick(R){return this._firePreventable(new tu(R.type,this._map,R))}mouseover(R){this._map.fire(new tu(R.type,this._map,R))}mouseout(R){this._map.fire(new tu(R.type,this._map,R))}touchstart(R){return this._firePreventable(new Xc(R.type,this._map,R))}touchmove(R){this._map.fire(new Xc(R.type,this._map,R))}touchend(R){this._map.fire(new Xc(R.type,this._map,R))}touchcancel(R){this._map.fire(new Xc(R.type,this._map,R))}_firePreventable(R){if(this._map.fire(R),R.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ol{constructor(R){this._map=R}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(R){this._map.fire(new tu(R.type,this._map,R))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new tu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(R){this._delayContextMenu?this._contextMenuEvent=R:this._ignoreContextMenu||this._map.fire(new tu(R.type,this._map,R)),this._map.listens("contextmenu")&&R.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class mu{constructor(R){this._map=R}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(R){return this.transform.pointLocation(t.P.convert(R),this._map.terrain)}}class Pu{constructor(R,ae){this._map=R,this._tr=new mu(R),this._el=R.getCanvasContainer(),this._container=R.getContainer(),this._clickTolerance=ae.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(R,ae){this.isEnabled()&&R.shiftKey&&R.button===0&&(n.disableDrag(),this._startPos=this._lastPos=ae,this._active=!0)}mousemoveWindow(R,ae){if(!this._active)return;let we=ae;if(this._lastPos.equals(we)||!this._box&&we.dist(this._startPos)<this._clickTolerance)return;let Se=this._startPos;this._lastPos=we,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",R));let Oe=Math.min(Se.x,we.x),pt=Math.max(Se.x,we.x),At=Math.min(Se.y,we.y),Bt=Math.max(Se.y,we.y);n.setTransform(this._box,`translate(${Oe}px,${At}px)`),this._box.style.width=pt-Oe+"px",this._box.style.height=Bt-At+"px"}mouseupWindow(R,ae){if(!this._active||R.button!==0)return;let we=this._startPos,Se=ae;if(this.reset(),n.suppressClick(),we.x!==Se.x||we.y!==Se.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:R})),{cameraAnimation:Oe=>Oe.fitScreenCoordinates(we,Se,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",R)}keydown(R){this._active&&R.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",R))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(R,ae){return this._map.fire(new t.k(R,{originalEvent:ae}))}}function kf(Ne,R){if(Ne.length!==R.length)throw new Error(`The number of touches and points are not equal - touches ${Ne.length}, points ${R.length}`);let ae={};for(let we=0;we<Ne.length;we++)ae[Ne[we].identifier]=R[we];return ae}class hl{constructor(R){this.reset(),this.numTouches=R.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(R,ae,we){(this.centroid||we.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=R.timeStamp),we.length===this.numTouches&&(this.centroid=function(Se){let Oe=new t.P(0,0);for(let pt of Se)Oe._add(pt);return Oe.div(Se.length)}(ae),this.touches=kf(we,ae)))}touchmove(R,ae,we){if(this.aborted||!this.centroid)return;let Se=kf(we,ae);for(let Oe in this.touches){let pt=Se[Oe];(!pt||pt.dist(this.touches[Oe])>30)&&(this.aborted=!0)}}touchend(R,ae,we){if((!this.centroid||R.timeStamp-this.startTime>500)&&(this.aborted=!0),we.length===0){let Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}}}class sf{constructor(R){this.singleTap=new hl(R),this.numTaps=R.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(R,ae,we){this.singleTap.touchstart(R,ae,we)}touchmove(R,ae,we){this.singleTap.touchmove(R,ae,we)}touchend(R,ae,we){let Se=this.singleTap.touchend(R,ae,we);if(Se){let Oe=R.timeStamp-this.lastTime<500,pt=!this.lastTap||this.lastTap.dist(Se)<30;if(Oe&&pt||this.reset(),this.count++,this.lastTime=R.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}}}class Mc{constructor(R){this._tr=new mu(R),this._zoomIn=new sf({numTouches:1,numTaps:2}),this._zoomOut=new sf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(R,ae,we){this._zoomIn.touchstart(R,ae,we),this._zoomOut.touchstart(R,ae,we)}touchmove(R,ae,we){this._zoomIn.touchmove(R,ae,we),this._zoomOut.touchmove(R,ae,we)}touchend(R,ae,we){let Se=this._zoomIn.touchend(R,ae,we),Oe=this._zoomOut.touchend(R,ae,we),pt=this._tr;return Se?(this._active=!0,R.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:At=>At.easeTo({duration:300,zoom:pt.zoom+1,around:pt.unproject(Se)},{originalEvent:R})}):Oe?(this._active=!0,R.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:At=>At.easeTo({duration:300,zoom:pt.zoom-1,around:pt.unproject(Oe)},{originalEvent:R})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hu{constructor(R){this._enabled=!!R.enable,this._moveStateManager=R.moveStateManager,this._clickTolerance=R.clickTolerance||1,this._moveFunction=R.move,this._activateOnStart=!!R.activateOnStart,R.assignEvents(this),this.reset()}reset(R){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(R)}_move(...R){let ae=this._moveFunction(...R);if(ae.bearingDelta||ae.pitchDelta||ae.around||ae.panDelta)return this._active=!0,ae}dragStart(R,ae){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(R)&&(this._moveStateManager.startMove(R),this._lastPoint=ae.length?ae[0]:ae,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(R,ae){if(!this.isEnabled())return;let we=this._lastPoint;if(!we)return;if(R.preventDefault(),!this._moveStateManager.isValidMoveEvent(R))return void this.reset(R);let Se=ae.length?ae[0]:ae;return!this._moved&&Se.dist(we)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Se,this._move(we,Se))}dragEnd(R){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(R)&&(this._moved&&n.suppressClick(),this.reset(R))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let mf={0:1,2:2};class Wu{constructor(R){this._correctEvent=R.checkCorrectEvent}startMove(R){let ae=n.mouseButton(R);this._eventButton=ae}endMove(R){delete this._eventButton}isValidStartEvent(R){return this._correctEvent(R)}isValidMoveEvent(R){return!function(ae,we){let Se=mf[we];return ae.buttons===void 0||(ae.buttons&Se)!==Se}(R,this._eventButton)}isValidEndEvent(R){return n.mouseButton(R)===this._eventButton}}class Zc{constructor(){this._firstTouch=void 0}_isOneFingerTouch(R){return R.targetTouches.length===1}_isSameTouchEvent(R){return R.targetTouches[0].identifier===this._firstTouch}startMove(R){this._firstTouch=R.targetTouches[0].identifier}endMove(R){delete this._firstTouch}isValidStartEvent(R){return this._isOneFingerTouch(R)}isValidMoveEvent(R){return this._isOneFingerTouch(R)&&this._isSameTouchEvent(R)}isValidEndEvent(R){return this._isOneFingerTouch(R)&&this._isSameTouchEvent(R)}}let Lf=Ne=>{Ne.mousedown=Ne.dragStart,Ne.mousemoveWindow=Ne.dragMove,Ne.mouseup=Ne.dragEnd,Ne.contextmenu=R=>{R.preventDefault()}},ru=({enable:Ne,clickTolerance:R,bearingDegreesPerPixelMoved:ae=.8})=>{let we=new Wu({checkCorrectEvent:Se=>n.mouseButton(Se)===0&&Se.ctrlKey||n.mouseButton(Se)===2});return new Hu({clickTolerance:R,move:(Se,Oe)=>({bearingDelta:(Oe.x-Se.x)*ae}),moveStateManager:we,enable:Ne,assignEvents:Lf})},jf=({enable:Ne,clickTolerance:R,pitchDegreesPerPixelMoved:ae=-.5})=>{let we=new Wu({checkCorrectEvent:Se=>n.mouseButton(Se)===0&&Se.ctrlKey||n.mouseButton(Se)===2});return new Hu({clickTolerance:R,move:(Se,Oe)=>({pitchDelta:(Oe.y-Se.y)*ae}),moveStateManager:we,enable:Ne,assignEvents:Lf})};class Xu{constructor(R,ae){this._clickTolerance=R.clickTolerance||1,this._map=ae,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(R){return R<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(R,ae,we){return this._calculateTransform(R,ae,we)}touchmove(R,ae,we){if(this._active){if(!this._shouldBePrevented(we.length))return R.preventDefault(),this._calculateTransform(R,ae,we);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",R)}}touchend(R,ae,we){this._calculateTransform(R,ae,we),this._active&&this._shouldBePrevented(we.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(R,ae,we){we.length>0&&(this._active=!0);let Se=kf(we,ae),Oe=new t.P(0,0),pt=new t.P(0,0),At=0;for(let $t in Se){let br=Se[$t],Ar=this._touches[$t];Ar&&(Oe._add(br),pt._add(br.sub(Ar)),At++,Se[$t]=br)}if(this._touches=Se,this._shouldBePrevented(At)||!pt.mag())return;let Bt=pt.div(At);return this._sum._add(Bt),this._sum.mag()<this._clickTolerance?void 0:{around:Oe.div(At),panDelta:Bt}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ec{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(R,ae,we){this._firstTwoTouches||we.length<2||(this._firstTwoTouches=[we[0].identifier,we[1].identifier],this._start([ae[0],ae[1]]))}touchmove(R,ae,we){if(!this._firstTwoTouches)return;R.preventDefault();let[Se,Oe]=this._firstTwoTouches,pt=mc(we,ae,Se),At=mc(we,ae,Oe);if(!pt||!At)return;let Bt=this._aroundCenter?null:pt.add(At).div(2);return this._move([pt,At],Bt,R)}touchend(R,ae,we){if(!this._firstTwoTouches)return;let[Se,Oe]=this._firstTwoTouches,pt=mc(we,ae,Se),At=mc(we,ae,Oe);pt&&At||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(R){this._enabled=!0,this._aroundCenter=!!R&&R.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function mc(Ne,R,ae){for(let we=0;we<Ne.length;we++)if(Ne[we].identifier===ae)return R[we]}function jl(Ne,R){return Math.log(Ne/R)/Math.LN2}class gu extends Ec{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(R){this._startDistance=this._distance=R[0].dist(R[1])}_move(R,ae){let we=this._distance;if(this._distance=R[0].dist(R[1]),this._active||!(Math.abs(jl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:jl(this._distance,we),pinchAround:ae}}}function Cc(Ne,R){return 180*Ne.angleWith(R)/Math.PI}class Yc extends Ec{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(R){this._startVector=this._vector=R[0].sub(R[1]),this._minDiameter=R[0].dist(R[1])}_move(R,ae,we){let Se=this._vector;if(this._vector=R[0].sub(R[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Cc(this._vector,Se),pinchAround:ae}}_isBelowThreshold(R){this._minDiameter=Math.min(this._minDiameter,R.mag());let ae=25/(Math.PI*this._minDiameter)*360,we=Cc(R,this._startVector);return Math.abs(we)<ae}}function sc(Ne){return Math.abs(Ne.y)>Math.abs(Ne.x)}class kc extends Ec{constructor(R){super(),this._currentTouchCount=0,this._map=R}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(R,ae,we){super.touchstart(R,ae,we),this._currentTouchCount=we.length}_start(R){this._lastPoints=R,sc(R[0].sub(R[1]))&&(this._valid=!1)}_move(R,ae,we){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let Se=R[0].sub(this._lastPoints[0]),Oe=R[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Se,Oe,we.timeStamp),this._valid?(this._lastPoints=R,this._active=!0,{pitchDelta:(Se.y+Oe.y)/2*-.5}):void 0}gestureBeginsVertically(R,ae,we){if(this._valid!==void 0)return this._valid;let Se=R.mag()>=2,Oe=ae.mag()>=2;if(!Se&&!Oe)return;if(!Se||!Oe)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<100&&void 0;let pt=R.y>0==ae.y>0;return sc(R)&&sc(ae)&&pt}}let er={panStep:100,bearingStep:15,pitchStep:10};class yr{constructor(R){this._tr=new mu(R);let ae=er;this._panStep=ae.panStep,this._bearingStep=ae.bearingStep,this._pitchStep=ae.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(R){if(R.altKey||R.ctrlKey||R.metaKey)return;let ae=0,we=0,Se=0,Oe=0,pt=0;switch(R.keyCode){case 61:case 107:case 171:case 187:ae=1;break;case 189:case 109:case 173:ae=-1;break;case 37:R.shiftKey?we=-1:(R.preventDefault(),Oe=-1);break;case 39:R.shiftKey?we=1:(R.preventDefault(),Oe=1);break;case 38:R.shiftKey?Se=1:(R.preventDefault(),pt=-1);break;case 40:R.shiftKey?Se=-1:(R.preventDefault(),pt=1);break;default:return}return this._rotationDisabled&&(we=0,Se=0),{cameraAnimation:At=>{let Bt=this._tr;At.easeTo({duration:300,easeId:"keyboardHandler",easing:na,zoom:ae?Math.round(Bt.zoom)+ae*(R.shiftKey?2:1):Bt.zoom,bearing:Bt.bearing+we*this._bearingStep,pitch:Bt.pitch+Se*this._pitchStep,offset:[-Oe*this._panStep,-pt*this._panStep],center:Bt.center},{originalEvent:R})}}}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 na(Ne){return Ne*(2-Ne)}let $r=4.000244140625;class La{constructor(R,ae){this._onTimeout=we=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(we)},this._map=R,this._tr=new mu(R),this._triggerRenderFrame=ae,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(R){this._defaultZoomRate=R}setWheelZoomRate(R){this._wheelZoomRate=R}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(R){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!R&&R.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(R){return!!this._map.cooperativeGestures.isEnabled()&&!(R.ctrlKey||this._map.cooperativeGestures.isBypassed(R))}wheel(R){if(!this.isEnabled())return;if(this._shouldBePrevented(R))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",R);let ae=R.deltaMode===WheelEvent.DOM_DELTA_LINE?40*R.deltaY:R.deltaY,we=i.now(),Se=we-(this._lastWheelEventTime||0);this._lastWheelEventTime=we,ae!==0&&ae%$r==0?this._type="wheel":ae!==0&&Math.abs(ae)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ae,this._timeout=setTimeout(this._onTimeout,40,R)):this._type||(this._type=Math.abs(Se*ae)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ae+=this._lastValue)),R.shiftKey&&ae&&(ae/=4),this._type&&(this._lastWheelEvent=R,this._delta-=ae,this._active||this._start(R)),R.preventDefault()}_start(R){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 ae=n.mousePos(this._map.getCanvas(),R),we=this._tr;this._around=ae.y>we.transform.height/2-we.transform.getHorizon()?t.N.convert(this._aroundCenter?we.center:we.unproject(ae)):t.N.convert(we.center),this._aroundPoint=we.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let R=this._tr.transform;if(this._delta!==0){let Bt=this._type==="wheel"&&Math.abs(this._delta)>$r?this._wheelZoomRate:this._defaultZoomRate,$t=2/(1+Math.exp(-Math.abs(this._delta*Bt)));this._delta<0&&$t!==0&&($t=1/$t);let br=typeof this._targetZoom=="number"?R.zoomScale(this._targetZoom):R.scale;this._targetZoom=Math.min(R.maxZoom,Math.max(R.minZoom,R.scaleZoom(br*$t))),this._type==="wheel"&&(this._startZoom=R.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let ae=typeof this._targetZoom=="number"?this._targetZoom:R.zoom,we=this._startZoom,Se=this._easing,Oe,pt=!1,At=i.now()-this._lastWheelEventTime;if(this._type==="wheel"&&we&&Se&&At){let Bt=Math.min(At/200,1),$t=Se(Bt);Oe=t.y.number(we,ae,$t),Bt<1?this._frameId||(this._frameId=!0):pt=!0}else Oe=ae,pt=!0;return this._active=!0,pt&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!pt,zoomDelta:Oe-R.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(R){let ae=t.b9;if(this._prevEase){let we=this._prevEase,Se=(i.now()-we.start)/we.duration,Oe=we.easing(Se+.01)-we.easing(Se),pt=.27/Math.sqrt(Oe*Oe+1e-4)*.01,At=Math.sqrt(.0729-pt*pt);ae=t.b8(pt,At,.25,1)}return this._prevEase={start:i.now(),duration:R,easing:ae},ae}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class hi{constructor(R,ae){this._clickZoom=R,this._tapZoom=ae}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 Pi{constructor(R){this._tr=new mu(R),this.reset()}reset(){this._active=!1}dblclick(R,ae){return R.preventDefault(),{cameraAnimation:we=>{we.easeTo({duration:300,zoom:this._tr.zoom+(R.shiftKey?-1:1),around:this._tr.unproject(ae)},{originalEvent:R})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Zi{constructor(){this._tap=new sf({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(R,ae,we){if(!this._swipePoint)if(this._tapTime){let Se=ae[0],Oe=R.timeStamp-this._tapTime<500,pt=this._tapPoint.dist(Se)<30;Oe&&pt?we.length>0&&(this._swipePoint=Se,this._swipeTouch=we[0].identifier):this.reset()}else this._tap.touchstart(R,ae,we)}touchmove(R,ae,we){if(this._tapTime){if(this._swipePoint){if(we[0].identifier!==this._swipeTouch)return;let Se=ae[0],Oe=Se.y-this._swipePoint.y;return this._swipePoint=Se,R.preventDefault(),this._active=!0,{zoomDelta:Oe/128}}}else this._tap.touchmove(R,ae,we)}touchend(R,ae,we){if(this._tapTime)this._swipePoint&&we.length===0&&this.reset();else{let Se=this._tap.touchend(R,ae,we);Se&&(this._tapTime=R.timeStamp,this._tapPoint=Se)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class tn{constructor(R,ae,we){this._el=R,this._mousePan=ae,this._touchPan=we}enable(R){this._inertiaOptions=R||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class dn{constructor(R,ae,we){this._pitchWithRotate=R.pitchWithRotate,this._mouseRotate=ae,this._mousePitch=we}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 Ri{constructor(R,ae,we,Se){this._el=R,this._touchZoom=ae,this._touchRotate=we,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0}enable(R){this._touchZoom.enable(R),this._rotationDisabled||this._touchRotate.enable(R),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 Fi{constructor(R,ae){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=R,this._options=ae,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let R=this._map.getCanvasContainer();R.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",R);let ae=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ae=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let we=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Se=document.createElement("div");Se.className="maplibregl-desktop-message",Se.textContent=ae,this._container.appendChild(Se);let Oe=document.createElement("div");Oe.className="maplibregl-mobile-message",Oe.textContent=we,this._container.appendChild(Oe),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.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(R){return R[this._bypassKey]}notifyGestureBlocked(R,ae){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:R,originalEvent:ae})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let qi=Ne=>Ne.zoom||Ne.drag||Ne.pitch||Ne.rotate;class _i extends t.k{}function Mn(Ne){return Ne.panDelta&&Ne.panDelta.mag()||Ne.zoomDelta||Ne.bearingDelta||Ne.pitchDelta}class Kn{constructor(R,ae){this.handleWindowEvent=Se=>{this.handleEvent(Se,`${Se.type}Window`)},this.handleEvent=(Se,Oe)=>{if(Se.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let pt=Se.type==="renderFrame"?void 0:Se,At={needsRenderFrame:!1},Bt={},$t={},br=Se.touches,Ar=br?this._getMapTouches(br):void 0,Yr=Ar?n.touchPos(this._map.getCanvas(),Ar):n.mousePos(this._map.getCanvas(),Se);for(let{handlerName:Je,handler:ut,allowed:dt}of this._handlers){if(!ut.isEnabled())continue;let Ct;this._blockedByActive($t,dt,Je)?ut.reset():ut[Oe||Se.type]&&(Ct=ut[Oe||Se.type](Se,Yr,Ar),this.mergeHandlerResult(At,Bt,Ct,Je,pt),Ct&&Ct.needsRenderFrame&&this._triggerRenderFrame()),(Ct||ut.isActive())&&($t[Je]=ut)}let sa={};for(let Je in this._previousActiveHandlers)$t[Je]||(sa[Je]=pt);this._previousActiveHandlers=$t,(Object.keys(sa).length||Mn(At))&&(this._changes.push([At,Bt,sa]),this._triggerRenderFrame()),(Object.keys($t).length||Mn(At))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:He}=At;He&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],He(this._map))},this._map=R,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new df(R),this._bearingSnap=ae.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ae);let we=this._el;this._listeners=[[we,"touchstart",{passive:!0}],[we,"touchmove",{passive:!1}],[we,"touchend",void 0],[we,"touchcancel",void 0],[we,"mousedown",void 0],[we,"mousemove",void 0],[we,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[we,"mouseover",void 0],[we,"mouseout",void 0],[we,"dblclick",void 0],[we,"click",void 0],[we,"keydown",{capture:!1}],[we,"keyup",void 0],[we,"wheel",{passive:!1}],[we,"contextmenu",void 0],[window,"blur",void 0]];for(let[Se,Oe,pt]of this._listeners)n.addEventListener(Se,Oe,Se===document?this.handleWindowEvent:this.handleEvent,pt)}destroy(){for(let[R,ae,we]of this._listeners)n.removeEventListener(R,ae,R===document?this.handleWindowEvent:this.handleEvent,we)}_addDefaultHandlers(R){let ae=this._map,we=ae.getCanvasContainer();this._add("mapEvent",new vf(ae,R));let Se=ae.boxZoom=new Pu(ae,R);this._add("boxZoom",Se),R.interactive&&R.boxZoom&&Se.enable();let Oe=ae.cooperativeGestures=new Fi(ae,R.cooperativeGestures);this._add("cooperativeGestures",Oe),R.cooperativeGestures&&Oe.enable();let pt=new Mc(ae),At=new Pi(ae);ae.doubleClickZoom=new hi(At,pt),this._add("tapZoom",pt),this._add("clickZoom",At),R.interactive&&R.doubleClickZoom&&ae.doubleClickZoom.enable();let Bt=new Zi;this._add("tapDragZoom",Bt);let $t=ae.touchPitch=new kc(ae);this._add("touchPitch",$t),R.interactive&&R.touchPitch&&ae.touchPitch.enable(R.touchPitch);let br=ru(R),Ar=jf(R);ae.dragRotate=new dn(R,br,Ar),this._add("mouseRotate",br,["mousePitch"]),this._add("mousePitch",Ar,["mouseRotate"]),R.interactive&&R.dragRotate&&ae.dragRotate.enable();let Yr=(({enable:Ct,clickTolerance:wt})=>{let Dt=new Wu({checkCorrectEvent:ur=>n.mouseButton(ur)===0&&!ur.ctrlKey});return new Hu({clickTolerance:wt,move:(ur,mr)=>({around:mr,panDelta:mr.sub(ur)}),activateOnStart:!0,moveStateManager:Dt,enable:Ct,assignEvents:Lf})})(R),sa=new Xu(R,ae);ae.dragPan=new tn(we,Yr,sa),this._add("mousePan",Yr),this._add("touchPan",sa,["touchZoom","touchRotate"]),R.interactive&&R.dragPan&&ae.dragPan.enable(R.dragPan);let He=new Yc,Je=new gu;ae.touchZoomRotate=new Ri(we,Je,He,Bt),this._add("touchRotate",He,["touchPan","touchZoom"]),this._add("touchZoom",Je,["touchPan","touchRotate"]),R.interactive&&R.touchZoomRotate&&ae.touchZoomRotate.enable(R.touchZoomRotate);let ut=ae.scrollZoom=new La(ae,()=>this._triggerRenderFrame());this._add("scrollZoom",ut,["mousePan"]),R.interactive&&R.scrollZoom&&ae.scrollZoom.enable(R.scrollZoom);let dt=ae.keyboard=new yr(ae);this._add("keyboard",dt),R.interactive&&R.keyboard&&ae.keyboard.enable(),this._add("blockableMapEvent",new ol(ae))}_add(R,ae,we){this._handlers.push({handlerName:R,handler:ae,allowed:we}),this._handlersById[R]=ae}stop(R){if(!this._updatingCamera){for(let{handler:ae}of this._handlers)ae.reset();this._inertia.clear(),this._fireEvents({},{},R),this._changes=[]}}isActive(){for(let{handler:R}of this._handlers)if(R.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!qi(this._eventsInProgress)||this.isZooming()}_blockedByActive(R,ae,we){for(let Se in R)if(Se!==we&&(!ae||ae.indexOf(Se)<0))return!0;return!1}_getMapTouches(R){let ae=[];for(let we of R)this._el.contains(we.target)&&ae.push(we);return ae}mergeHandlerResult(R,ae,we,Se,Oe){if(!we)return;t.e(R,we);let pt={handlerName:Se,originalEvent:we.originalEvent||Oe};we.zoomDelta!==void 0&&(ae.zoom=pt),we.panDelta!==void 0&&(ae.drag=pt),we.pitchDelta!==void 0&&(ae.pitch=pt),we.bearingDelta!==void 0&&(ae.rotate=pt)}_applyChanges(){let R={},ae={},we={};for(let[Se,Oe,pt]of this._changes)Se.panDelta&&(R.panDelta=(R.panDelta||new t.P(0,0))._add(Se.panDelta)),Se.zoomDelta&&(R.zoomDelta=(R.zoomDelta||0)+Se.zoomDelta),Se.bearingDelta&&(R.bearingDelta=(R.bearingDelta||0)+Se.bearingDelta),Se.pitchDelta&&(R.pitchDelta=(R.pitchDelta||0)+Se.pitchDelta),Se.around!==void 0&&(R.around=Se.around),Se.pinchAround!==void 0&&(R.pinchAround=Se.pinchAround),Se.noInertia&&(R.noInertia=Se.noInertia),t.e(ae,Oe),t.e(we,pt);this._updateMapTransform(R,ae,we),this._changes=[]}_updateMapTransform(R,ae,we){let Se=this._map,Oe=Se._getTransformForUpdate(),pt=Se.terrain;if(!(Mn(R)||pt&&this._terrainMovement))return this._fireEvents(ae,we,!0);let{panDelta:At,zoomDelta:Bt,bearingDelta:$t,pitchDelta:br,around:Ar,pinchAround:Yr}=R;Yr!==void 0&&(Ar=Yr),Se._stop(!0),Ar=Ar||Se.transform.centerPoint;let sa=Oe.pointLocation(At?Ar.sub(At):Ar);$t&&(Oe.bearing+=$t),br&&(Oe.pitch+=br),Bt&&(Oe.zoom+=Bt),pt?this._terrainMovement||!ae.drag&&!ae.zoom?ae.drag&&this._terrainMovement?Oe.center=Oe.pointLocation(Oe.centerPoint.sub(At)):Oe.setLocationAtPoint(sa,Ar):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Oe.setLocationAtPoint(sa,Ar)):Oe.setLocationAtPoint(sa,Ar),Se._applyUpdatedTransform(Oe),this._map._update(),R.noInertia||this._inertia.record(R),this._fireEvents(ae,we,!0)}_fireEvents(R,ae,we){let Se=qi(this._eventsInProgress),Oe=qi(R),pt={};for(let Ar in R){let{originalEvent:Yr}=R[Ar];this._eventsInProgress[Ar]||(pt[`${Ar}start`]=Yr),this._eventsInProgress[Ar]=R[Ar]}!Se&&Oe&&this._fireEvent("movestart",Oe.originalEvent);for(let Ar in pt)this._fireEvent(Ar,pt[Ar]);Oe&&this._fireEvent("move",Oe.originalEvent);for(let Ar in R){let{originalEvent:Yr}=R[Ar];this._fireEvent(Ar,Yr)}let At={},Bt;for(let Ar in this._eventsInProgress){let{handlerName:Yr,originalEvent:sa}=this._eventsInProgress[Ar];this._handlersById[Yr].isActive()||(delete this._eventsInProgress[Ar],Bt=ae[Yr]||sa,At[`${Ar}end`]=Bt)}for(let Ar in At)this._fireEvent(Ar,At[Ar]);let $t=qi(this._eventsInProgress),br=(Se||Oe)&&!$t;if(br&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ar=this._map._getTransformForUpdate();Ar.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ar)}if(we&&br){this._updatingCamera=!0;let Ar=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Yr=sa=>sa!==0&&-this._bearingSnap<sa&&sa<this._bearingSnap;!Ar||!Ar.essential&&i.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:Bt})),Yr(this._map.getBearing())&&this._map.resetNorth()):(Yr(Ar.bearing||this._map.getBearing())&&(Ar.bearing=0),Ar.freezeElevation=!0,this._map.easeTo(Ar,{originalEvent:Bt})),this._updatingCamera=!1}}_fireEvent(R,ae){this._map.fire(new t.k(R,ae?{originalEvent:ae}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(R=>{delete this._frameId,this.handleEvent(new _i("renderFrame",{timeStamp:R})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends t.E{constructor(R,ae){super(),this._renderFrameCallback=()=>{let we=Math.min((i.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(we)),we<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=R,this._bearingSnap=ae.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(R,ae){return this.jumpTo({center:R},ae)}panBy(R,ae,we){return R=t.P.convert(R).mult(-1),this.panTo(this.transform.center,t.e({offset:R},ae),we)}panTo(R,ae,we){return this.easeTo(t.e({center:R},ae),we)}getZoom(){return this.transform.zoom}setZoom(R,ae){return this.jumpTo({zoom:R},ae),this}zoomTo(R,ae,we){return this.easeTo(t.e({zoom:R},ae),we)}zoomIn(R,ae){return this.zoomTo(this.getZoom()+1,R,ae),this}zoomOut(R,ae){return this.zoomTo(this.getZoom()-1,R,ae),this}getBearing(){return this.transform.bearing}setBearing(R,ae){return this.jumpTo({bearing:R},ae),this}getPadding(){return this.transform.padding}setPadding(R,ae){return this.jumpTo({padding:R},ae),this}rotateTo(R,ae,we){return this.easeTo(t.e({bearing:R},ae),we)}resetNorth(R,ae){return this.rotateTo(0,t.e({duration:1e3},R),ae),this}resetNorthPitch(R,ae){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},R),ae),this}snapToNorth(R,ae){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(R,ae):this}getPitch(){return this.transform.pitch}setPitch(R,ae){return this.jumpTo({pitch:R},ae),this}cameraForBounds(R,ae){R=re.convert(R).adjustAntiMeridian();let we=ae&&ae.bearing||0;return this._cameraForBoxAndBearing(R.getNorthWest(),R.getSouthEast(),we,ae)}_cameraForBoxAndBearing(R,ae,we,Se){let Oe={top:0,bottom:0,right:0,left:0};if(typeof(Se=t.e({padding:Oe,offset:[0,0],maxZoom:this.transform.maxZoom},Se)).padding=="number"){let Sa=Se.padding;Se.padding={top:Sa,bottom:Sa,right:Sa,left:Sa}}Se.padding=t.e(Oe,Se.padding);let pt=this.transform,At=pt.padding,Bt=new re(R,ae),$t=pt.project(Bt.getNorthWest()),br=pt.project(Bt.getNorthEast()),Ar=pt.project(Bt.getSouthEast()),Yr=pt.project(Bt.getSouthWest()),sa=t.ba(-we),He=$t.rotate(sa),Je=br.rotate(sa),ut=Ar.rotate(sa),dt=Yr.rotate(sa),Ct=new t.P(Math.max(He.x,Je.x,dt.x,ut.x),Math.max(He.y,Je.y,dt.y,ut.y)),wt=new t.P(Math.min(He.x,Je.x,dt.x,ut.x),Math.min(He.y,Je.y,dt.y,ut.y)),Dt=Ct.sub(wt),ur=(pt.width-(At.left+At.right+Se.padding.left+Se.padding.right))/Dt.x,mr=(pt.height-(At.top+At.bottom+Se.padding.top+Se.padding.bottom))/Dt.y;if(mr<0||ur<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");let Er=Math.min(pt.scaleZoom(pt.scale*Math.min(ur,mr)),Se.maxZoom),Br=t.P.convert(Se.offset),Qr=new t.P((Se.padding.left-Se.padding.right)/2,(Se.padding.top-Se.padding.bottom)/2).rotate(t.ba(we)),ga=Br.add(Qr).mult(pt.scale/pt.zoomScale(Er));return{center:pt.unproject($t.add(Ar).div(2).sub(ga)),zoom:Er,bearing:we}}fitBounds(R,ae,we){return this._fitInternal(this.cameraForBounds(R,ae),ae,we)}fitScreenCoordinates(R,ae,we,Se,Oe){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(R)),this.transform.pointLocation(t.P.convert(ae)),we,Se),Se,Oe)}_fitInternal(R,ae,we){return R?(delete(ae=t.e(R,ae)).padding,ae.linear?this.easeTo(ae,we):this.flyTo(ae,we)):this}jumpTo(R,ae){this.stop();let we=this._getTransformForUpdate(),Se=!1,Oe=!1,pt=!1;return"zoom"in R&&we.zoom!==+R.zoom&&(Se=!0,we.zoom=+R.zoom),R.center!==void 0&&(we.center=t.N.convert(R.center)),"bearing"in R&&we.bearing!==+R.bearing&&(Oe=!0,we.bearing=+R.bearing),"pitch"in R&&we.pitch!==+R.pitch&&(pt=!0,we.pitch=+R.pitch),R.padding==null||we.isPaddingEqual(R.padding)||(we.padding=R.padding),this._applyUpdatedTransform(we),this.fire(new t.k("movestart",ae)).fire(new t.k("move",ae)),Se&&this.fire(new t.k("zoomstart",ae)).fire(new t.k("zoom",ae)).fire(new t.k("zoomend",ae)),Oe&&this.fire(new t.k("rotatestart",ae)).fire(new t.k("rotate",ae)).fire(new t.k("rotateend",ae)),pt&&this.fire(new t.k("pitchstart",ae)).fire(new t.k("pitch",ae)).fire(new t.k("pitchend",ae)),this.fire(new t.k("moveend",ae))}calculateCameraOptionsFromTo(R,ae,we,Se=0){let Oe=t.Z.fromLngLat(R,ae),pt=t.Z.fromLngLat(we,Se),At=pt.x-Oe.x,Bt=pt.y-Oe.y,$t=pt.z-Oe.z,br=Math.hypot(At,Bt,$t);if(br===0)throw new Error("Can't calculate camera options with same From and To");let Ar=Math.hypot(At,Bt),Yr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/br/this.transform.tileSize),sa=180*Math.atan2(At,-Bt)/Math.PI,He=180*Math.acos(Ar/br)/Math.PI;return He=$t<0?90-He:90+He,{center:pt.toLngLat(),zoom:Yr,pitch:He,bearing:sa}}easeTo(R,ae){var we;this._stop(!1,R.easeId),((R=t.e({offset:[0,0],duration:500,easing:t.b9},R)).animate===!1||!R.essential&&i.prefersReducedMotion)&&(R.duration=0);let Se=this._getTransformForUpdate(),Oe=Se.zoom,pt=Se.bearing,At=Se.pitch,Bt=Se.padding,$t="bearing"in R?this._normalizeBearing(R.bearing,pt):pt,br="pitch"in R?+R.pitch:At,Ar="padding"in R?R.padding:Se.padding,Yr=t.P.convert(R.offset),sa=Se.centerPoint.add(Yr),He=Se.pointLocation(sa),{center:Je,zoom:ut}=Se.getConstrained(t.N.convert(R.center||He),(we=R.zoom)!==null&&we!==void 0?we:Oe);this._normalizeCenter(Je,Se);let dt=Se.project(He),Ct=Se.project(Je).sub(dt),wt=Se.zoomScale(ut-Oe),Dt,ur;R.around&&(Dt=t.N.convert(R.around),ur=Se.locationPoint(Dt));let mr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||ut!==Oe,this._rotating=this._rotating||pt!==$t,this._pitching=this._pitching||br!==At,this._padding=!Se.isPaddingEqual(Ar),this._easeId=R.easeId,this._prepareEase(ae,R.noMoveStart,mr),this.terrain&&this._prepareElevation(Je),this._ease(Er=>{if(this._zooming&&(Se.zoom=t.y.number(Oe,ut,Er)),this._rotating&&(Se.bearing=t.y.number(pt,$t,Er)),this._pitching&&(Se.pitch=t.y.number(At,br,Er)),this._padding&&(Se.interpolatePadding(Bt,Ar,Er),sa=Se.centerPoint.add(Yr)),this.terrain&&!R.freezeElevation&&this._updateElevation(Er),Dt)Se.setLocationAtPoint(Dt,ur);else{let Br=Se.zoomScale(Se.zoom-Oe),Qr=ut>Oe?Math.min(2,wt):Math.max(.5,wt),ga=Math.pow(Qr,1-Er),Sa=Se.unproject(dt.add(Ct.mult(Er*ga)).mult(Br));Se.setLocationAtPoint(Se.renderWorldCopies?Sa.wrap():Sa,sa)}this._applyUpdatedTransform(Se),this._fireMoveEvents(ae)},Er=>{this.terrain&&R.freezeElevation&&this._finalizeElevation(),this._afterEase(ae,Er)},R),this}_prepareEase(R,ae,we={}){this._moving=!0,ae||we.moving||this.fire(new t.k("movestart",R)),this._zooming&&!we.zooming&&this.fire(new t.k("zoomstart",R)),this._rotating&&!we.rotating&&this.fire(new t.k("rotatestart",R)),this._pitching&&!we.pitching&&this.fire(new t.k("pitchstart",R))}_prepareElevation(R){this._elevationCenter=R,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(R,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(R){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let ae=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(R<1&&ae!==this._elevationTarget){let we=this._elevationTarget-this._elevationStart;this._elevationStart+=R*(we-(ae-(we*R+this._elevationStart))/(1-R)),this._elevationTarget=ae}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,R)}_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(R){let ae=R.getCameraPosition(),we=this.terrain.getElevationForLngLatZoom(ae.lngLat,R.zoom);if(ae.altitude<we){let Se=this.calculateCameraOptionsFromTo(ae.lngLat,we,R.center,R.elevation);return{pitch:Se.pitch,zoom:Se.zoom}}return{}}_applyUpdatedTransform(R){let ae=[];if(this.terrain&&ae.push(Se=>this._elevateCameraIfInsideTerrain(Se)),this.transformCameraUpdate&&ae.push(Se=>this.transformCameraUpdate(Se)),!ae.length)return;let we=R.clone();for(let Se of ae){let Oe=we.clone(),{center:pt,zoom:At,pitch:Bt,bearing:$t,elevation:br}=Se(Oe);pt&&(Oe.center=pt),At!==void 0&&(Oe.zoom=At),Bt!==void 0&&(Oe.pitch=Bt),$t!==void 0&&(Oe.bearing=$t),br!==void 0&&(Oe.elevation=br),we.apply(Oe)}this.transform.apply(we)}_fireMoveEvents(R){this.fire(new t.k("move",R)),this._zooming&&this.fire(new t.k("zoom",R)),this._rotating&&this.fire(new t.k("rotate",R)),this._pitching&&this.fire(new t.k("pitch",R))}_afterEase(R,ae){if(this._easeId&&ae&&this._easeId===ae)return;delete this._easeId;let we=this._zooming,Se=this._rotating,Oe=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new t.k("zoomend",R)),Se&&this.fire(new t.k("rotateend",R)),Oe&&this.fire(new t.k("pitchend",R)),this.fire(new t.k("moveend",R))}flyTo(R,ae){var we;if(!R.essential&&i.prefersReducedMotion){let on=t.M(R,["center","zoom","bearing","pitch","around"]);return this.jumpTo(on,ae)}this.stop(),R=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},R);let Se=this._getTransformForUpdate(),Oe=Se.zoom,pt=Se.bearing,At=Se.pitch,Bt=Se.padding,$t="bearing"in R?this._normalizeBearing(R.bearing,pt):pt,br="pitch"in R?+R.pitch:At,Ar="padding"in R?R.padding:Se.padding,Yr=t.P.convert(R.offset),sa=Se.centerPoint.add(Yr),He=Se.pointLocation(sa),{center:Je,zoom:ut}=Se.getConstrained(t.N.convert(R.center||He),(we=R.zoom)!==null&&we!==void 0?we:Oe);this._normalizeCenter(Je,Se);let dt=Se.zoomScale(ut-Oe),Ct=Se.project(He),wt=Se.project(Je).sub(Ct),Dt=R.curve,ur=Math.max(Se.width,Se.height),mr=ur/dt,Er=wt.mag();if("minZoom"in R){let on=t.ac(Math.min(R.minZoom,Oe,ut),Se.minZoom,Se.maxZoom),Tn=ur/Se.zoomScale(on-Oe);Dt=Math.sqrt(Tn/Er*2)}let Br=Dt*Dt;function Qr(on){let Tn=(mr*mr-ur*ur+(on?-1:1)*Br*Br*Er*Er)/(2*(on?mr:ur)*Br*Er);return Math.log(Math.sqrt(Tn*Tn+1)-Tn)}function ga(on){return(Math.exp(on)-Math.exp(-on))/2}function Sa(on){return(Math.exp(on)+Math.exp(-on))/2}let Oa=Qr(!1),di=function(on){return Sa(Oa)/Sa(Oa+Dt*on)},Wi=function(on){return ur*((Sa(Oa)*(ga(Tn=Oa+Dt*on)/Sa(Tn))-ga(Oa))/Br)/Er;var Tn},Gi=(Qr(!0)-Oa)/Dt;if(Math.abs(Er)<1e-6||!isFinite(Gi)){if(Math.abs(ur-mr)<1e-6)return this.easeTo(R,ae);let on=mr<ur?-1:1;Gi=Math.abs(Math.log(mr/ur))/Dt,Wi=()=>0,di=Tn=>Math.exp(on*Dt*Tn)}return R.duration="duration"in R?+R.duration:1e3*Gi/("screenSpeed"in R?+R.screenSpeed/Dt:+R.speed),R.maxDuration&&R.duration>R.maxDuration&&(R.duration=0),this._zooming=!0,this._rotating=pt!==$t,this._pitching=br!==At,this._padding=!Se.isPaddingEqual(Ar),this._prepareEase(ae,!1),this.terrain&&this._prepareElevation(Je),this._ease(on=>{let Tn=on*Gi,Wn=1/di(Tn);Se.zoom=on===1?ut:Oe+Se.scaleZoom(Wn),this._rotating&&(Se.bearing=t.y.number(pt,$t,on)),this._pitching&&(Se.pitch=t.y.number(At,br,on)),this._padding&&(Se.interpolatePadding(Bt,Ar,on),sa=Se.centerPoint.add(Yr)),this.terrain&&!R.freezeElevation&&this._updateElevation(on);let Bn=on===1?Je:Se.unproject(Ct.add(wt.mult(Wi(Tn))).mult(Wn));Se.setLocationAtPoint(Se.renderWorldCopies?Bn.wrap():Bn,sa),this._applyUpdatedTransform(Se),this._fireMoveEvents(ae)},()=>{this.terrain&&R.freezeElevation&&this._finalizeElevation(),this._afterEase(ae)},R),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(R,ae){var we;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let Se=this._onEaseEnd;delete this._onEaseEnd,Se.call(this,ae)}return R||(we=this.handlers)===null||we===void 0||we.stop(!1),this}_ease(R,ae,we){we.animate===!1||we.duration===0?(R(1),ae()):(this._easeStart=i.now(),this._easeOptions=we,this._onEaseFrame=R,this._onEaseEnd=ae,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(R,ae){R=t.b3(R,-180,180);let we=Math.abs(R-ae);return Math.abs(R-360-ae)<we&&(R-=360),Math.abs(R+360-ae)<we&&(R+=360),R}_normalizeCenter(R,ae){if(!ae.renderWorldCopies||ae.lngRange)return;let we=R.lng-ae.center.lng;R.lng+=we>180?-360:we<-180?360:0}queryTerrainElevation(R){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(R),this.transform.tileZoom)-this.transform.elevation:null}}let Jn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class co{constructor(R=Jn){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=ae=>{!ae||ae.sourceDataType!=="metadata"&&ae.sourceDataType!=="visibility"&&ae.dataType!=="style"&&ae.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=R}getDefaultPosition(){return"bottom-right"}onAdd(R){return this._map=R,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.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(){n.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(R,ae){let we=this._map._getUIString(`AttributionControl.${ae}`);R.title=we,R.setAttribute("aria-label",we)}_updateAttributions(){if(!this._map.style)return;let R=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?R=R.concat(this.options.customAttribution.map(Se=>typeof Se!="string"?"":Se)):typeof this.options.customAttribution=="string"&&R.push(this.options.customAttribution)),this._map.style.stylesheet){let Se=this._map.style.stylesheet;this.styleOwner=Se.owner,this.styleId=Se.id}let ae=this._map.style.sourceCaches;for(let Se in ae){let Oe=ae[Se];if(Oe.used||Oe.usedForTerrain){let pt=Oe.getSource();pt.attribution&&R.indexOf(pt.attribution)<0&&R.push(pt.attribution)}}R=R.filter(Se=>String(Se).trim()),R.sort((Se,Oe)=>Se.length-Oe.length),R=R.filter((Se,Oe)=>{for(let pt=Oe+1;pt<R.length;pt++)if(R[pt].indexOf(Se)>=0)return!1;return!0});let we=R.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,R.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class wn{constructor(R={}){this._updateCompact=()=>{let ae=this._container.children;if(ae.length){let we=ae[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&we.classList.add("maplibregl-compact"):we.classList.remove("maplibregl-compact")}},this.options=R}getDefaultPosition(){return"bottom-left"}onAdd(R){this._map=R,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");let ae=n.create("a","maplibregl-ctrl-logo");return ae.target="_blank",ae.rel="noopener nofollow",ae.href="https://maplibre.org/",ae.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ae.setAttribute("rel","noopener nofollow"),this._container.appendChild(ae),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class un{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(R){let ae=++this._id;return this._queue.push({callback:R,id:ae,cancelled:!1}),ae}remove(R){let ae=this._currentlyRunning,we=ae?this._queue.concat(ae):this._queue;for(let Se of we)if(Se.id===R)return void(Se.cancelled=!0)}run(R=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let ae=this._currentlyRunning=this._queue;this._queue=[];for(let we of ae)if(!we.cancelled&&(we.callback(R),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var _o=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Qo extends t.E{constructor(R){super(),this.sourceCache=R,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,R.usedForTerrain=!0,R.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(R,ae){this.sourceCache.update(R,ae),this._renderableTilesKeys=[];let we={};for(let Se of R.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ae}))we[Se.key]=!0,this._renderableTilesKeys.push(Se.key),this._tiles[Se.key]||(Se.posMatrix=new Float64Array(16),t.aP(Se.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Se.key]=new st(Se,this.tileSize));for(let Se in this._tiles)we[Se]||delete this._tiles[Se]}freeRtt(R){for(let ae in this._tiles){let we=this._tiles[ae];(!R||we.tileID.equals(R)||we.tileID.isChildOf(R)||R.isChildOf(we.tileID))&&(we.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(R=>this.getTileByID(R))}getTileByID(R){return this._tiles[R]}getTerrainCoords(R){let ae={};for(let we of this._renderableTilesKeys){let Se=this._tiles[we].tileID;if(Se.canonical.equals(R.canonical)){let Oe=R.clone();Oe.posMatrix=new Float64Array(16),t.aP(Oe.posMatrix,0,t.X,0,t.X,0,1),ae[we]=Oe}else if(Se.canonical.isChildOf(R.canonical)){let Oe=R.clone();Oe.posMatrix=new Float64Array(16);let pt=Se.canonical.z-R.canonical.z,At=Se.canonical.x-(Se.canonical.x>>pt<<pt),Bt=Se.canonical.y-(Se.canonical.y>>pt<<pt),$t=t.X>>pt;t.aP(Oe.posMatrix,0,$t,0,$t,0,1),t.J(Oe.posMatrix,Oe.posMatrix,[-At*$t,-Bt*$t,0]),ae[we]=Oe}else if(R.canonical.isChildOf(Se.canonical)){let Oe=R.clone();Oe.posMatrix=new Float64Array(16);let pt=R.canonical.z-Se.canonical.z,At=R.canonical.x-(R.canonical.x>>pt<<pt),Bt=R.canonical.y-(R.canonical.y>>pt<<pt),$t=t.X>>pt;t.aP(Oe.posMatrix,0,t.X,0,t.X,0,1),t.J(Oe.posMatrix,Oe.posMatrix,[At*$t,Bt*$t,0]),t.K(Oe.posMatrix,Oe.posMatrix,[1/2**pt,1/2**pt,0]),ae[we]=Oe}}return ae}getSourceTile(R,ae){let we=this.sourceCache._source,Se=R.overscaledZ-this.deltaZoom;if(Se>we.maxzoom&&(Se=we.maxzoom),Se<we.minzoom)return null;this._sourceTileCache[R.key]||(this._sourceTileCache[R.key]=R.scaledTo(Se).key);let Oe=this.sourceCache.getTileByID(this._sourceTileCache[R.key]);if((!Oe||!Oe.dem)&&ae)for(;Se>=we.minzoom&&(!Oe||!Oe.dem);)Oe=this.sourceCache.getTileByID(R.scaledTo(Se--).key);return Oe}tilesAfterTime(R=Date.now()){return Object.values(this._tiles).filter(ae=>ae.timeAdded>=R)}}class xs{constructor(R,ae,we){this.painter=R,this.sourceCache=new Qo(ae),this.options=we,this.exaggeration=typeof we.exaggeration=="number"?we.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(R,ae,we,Se=t.X){var Oe;if(!(ae>=0&&ae<Se&&we>=0&&we<Se))return 0;let pt=this.getTerrainData(R),At=(Oe=pt.tile)===null||Oe===void 0?void 0:Oe.dem;if(!At)return 0;let Bt=function(He,Je,ut){var dt=Je[0],Ct=Je[1];return He[0]=ut[0]*dt+ut[4]*Ct+ut[12],He[1]=ut[1]*dt+ut[5]*Ct+ut[13],He}([],[ae/Se*t.X,we/Se*t.X],pt.u_terrain_matrix),$t=[Bt[0]*At.dim,Bt[1]*At.dim],br=Math.floor($t[0]),Ar=Math.floor($t[1]),Yr=$t[0]-br,sa=$t[1]-Ar;return At.get(br,Ar)*(1-Yr)*(1-sa)+At.get(br+1,Ar)*Yr*(1-sa)+At.get(br,Ar+1)*(1-Yr)*sa+At.get(br+1,Ar+1)*Yr*sa}getElevationForLngLatZoom(R,ae){if(!t.bb(ae,R.wrap()))return 0;let{tileID:we,mercatorX:Se,mercatorY:Oe}=this._getOverscaledTileIDFromLngLatZoom(R,ae);return this.getElevation(we,Se%t.X,Oe%t.X,t.X)}getElevation(R,ae,we,Se=t.X){return this.getDEMElevation(R,ae,we,Se)*this.exaggeration}getTerrainData(R){if(!this._emptyDemTexture){let Se=this.painter.context,Oe=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(Se,Oe,Se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(Se,new t.R({width:1,height:1}),Se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.an([])}let ae=this.sourceCache.getSourceTile(R,!0);if(ae&&ae.dem&&(!ae.demTexture||ae.needsTerrainPrepare)){let Se=this.painter.context;ae.demTexture=this.painter.getTileTexture(ae.dem.stride),ae.demTexture?ae.demTexture.update(ae.dem.getPixels(),{premultiply:!1}):ae.demTexture=new u(Se,ae.dem.getPixels(),Se.gl.RGBA,{premultiply:!1}),ae.demTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),ae.needsTerrainPrepare=!1}let we=ae&&ae+ae.tileID.key+R.key;if(we&&!this._demMatrixCache[we]){let Se=this.sourceCache.sourceCache._source.maxzoom,Oe=R.canonical.z-ae.tileID.canonical.z;R.overscaledZ>R.canonical.z&&(R.canonical.z>=Se?Oe=R.canonical.z-Se:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let pt=R.canonical.x-(R.canonical.x>>Oe<<Oe),At=R.canonical.y-(R.canonical.y>>Oe<<Oe),Bt=t.bc(new Float64Array(16),[1/(t.X<<Oe),1/(t.X<<Oe),0]);t.J(Bt,Bt,[pt*t.X,At*t.X,0]),this._demMatrixCache[R.key]={matrix:Bt,coord:R}}return{u_depth:2,u_terrain:3,u_terrain_dim:ae&&ae.dem&&ae.dem.dim||1,u_terrain_matrix:we?this._demMatrixCache[R.key].matrix:this._emptyDemMatrix,u_terrain_unpack:ae&&ae.dem&&ae.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(ae&&ae.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:ae}}getFramebuffer(R){let ae=this.painter,we=ae.width/devicePixelRatio,Se=ae.height/devicePixelRatio;return!this._fbo||this._fbo.width===we&&this._fbo.height===Se||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new u(ae.context,{width:we,height:Se,data:null},ae.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(ae.context.gl.NEAREST,ae.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new u(ae.context,{width:we,height:Se,data:null},ae.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(ae.context.gl.NEAREST,ae.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=ae.context.createFramebuffer(we,Se,!0,!1),this._fbo.depthAttachment.set(ae.context.createRenderbuffer(ae.context.gl.DEPTH_COMPONENT16,we,Se))),this._fbo.colorAttachment.set(R==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let R=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let ae=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let Oe=0,pt=0;Oe<this._coordsTextureSize;Oe++)for(let At=0;At<this._coordsTextureSize;At++,pt+=4)ae[pt+0]=255&At,ae[pt+1]=255&Oe,ae[pt+2]=At>>8<<4|Oe>>8,ae[pt+3]=0;let we=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ae.buffer)),Se=new u(R,we,R.gl.RGBA,{premultiply:!1});return Se.bind(R.gl.NEAREST,R.gl.CLAMP_TO_EDGE),this._coordsTexture=Se,Se}pointCoordinate(R){this.painter.maybeDrawDepthAndCoords(!0);let ae=new Uint8Array(4),we=this.painter.context,Se=we.gl,Oe=Math.round(R.x*this.painter.pixelRatio/devicePixelRatio),pt=Math.round(R.y*this.painter.pixelRatio/devicePixelRatio),At=Math.round(this.painter.height/devicePixelRatio);we.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Se.readPixels(Oe,At-pt-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ae),we.bindFramebuffer.set(null);let Bt=ae[0]+(ae[2]>>4<<8),$t=ae[1]+((15&ae[2])<<8),br=this.coordsIndex[255-ae[3]],Ar=br&&this.sourceCache.getTileByID(br);if(!Ar)return null;let Yr=this._coordsTextureSize,sa=(1<<Ar.tileID.canonical.z)*Yr;return new t.Z((Ar.tileID.canonical.x*Yr+Bt)/sa+Ar.tileID.wrap,(Ar.tileID.canonical.y*Yr+$t)/sa,this.getElevation(Ar.tileID,Bt,$t,Yr))}depthAtPoint(R){let ae=new Uint8Array(4),we=this.painter.context,Se=we.gl;return we.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Se.readPixels(R.x,this.painter.height/devicePixelRatio-R.y-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ae),we.bindFramebuffer.set(null),(ae[0]/16777216+ae[1]/65536+ae[2]/256+ae[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let R=this.painter.context,ae=new t.bd,we=new t.aY,Se=this.meshSize,Oe=t.X/Se,pt=Se*Se;for(let Ar=0;Ar<=Se;Ar++)for(let Yr=0;Yr<=Se;Yr++)ae.emplaceBack(Yr*Oe,Ar*Oe,0);for(let Ar=0;Ar<pt;Ar+=Se+1)for(let Yr=0;Yr<Se;Yr++)we.emplaceBack(Yr+Ar,Se+Yr+Ar+1,Se+Yr+Ar+2),we.emplaceBack(Yr+Ar,Se+Yr+Ar+2,Yr+Ar+1);let At=ae.length,Bt=At+2*(Se+1);for(let Ar of[0,1])for(let Yr=0;Yr<=Se;Yr++)for(let sa of[0,1])ae.emplaceBack(Yr*Oe,Ar*t.X,sa);for(let Ar=0;Ar<2*Se;Ar+=2)we.emplaceBack(Bt+Ar,Bt+Ar+1,Bt+Ar+3),we.emplaceBack(Bt+Ar,Bt+Ar+3,Bt+Ar+2),we.emplaceBack(At+Ar,At+Ar+3,At+Ar+1),we.emplaceBack(At+Ar,At+Ar+2,At+Ar+3);let $t=ae.length,br=$t+2*(Se+1);for(let Ar of[0,1])for(let Yr=0;Yr<=Se;Yr++)for(let sa of[0,1])ae.emplaceBack(Ar*t.X,Yr*Oe,sa);for(let Ar=0;Ar<2*Se;Ar+=2)we.emplaceBack($t+Ar,$t+Ar+1,$t+Ar+3),we.emplaceBack($t+Ar,$t+Ar+3,$t+Ar+2),we.emplaceBack(br+Ar,br+Ar+3,br+Ar+1),we.emplaceBack(br+Ar,br+Ar+2,br+Ar+3);return this._mesh=new Lu(R.createVertexBuffer(ae,_o.members),R.createIndexBuffer(we),t.a0.simpleSegment(0,0,ae.length,we.length)),this._mesh}getMeshFrameDelta(R){return 2*Math.PI*t.be/Math.pow(2,R)/5}getMinTileElevationForLngLatZoom(R,ae){var we;let{tileID:Se}=this._getOverscaledTileIDFromLngLatZoom(R,ae);return(we=this.getMinMaxElevation(Se).minElevation)!==null&&we!==void 0?we:0}getMinMaxElevation(R){let ae=this.getTerrainData(R).tile,we={minElevation:null,maxElevation:null};return ae&&ae.dem&&(we.minElevation=ae.dem.min*this.exaggeration,we.maxElevation=ae.dem.max*this.exaggeration),we}_getOverscaledTileIDFromLngLatZoom(R,ae){let we=t.Z.fromLngLat(R.wrap()),Se=(1<<ae)*t.X,Oe=we.x*Se,pt=we.y*Se,At=Math.floor(Oe/t.X),Bt=Math.floor(pt/t.X);return{tileID:new t.S(ae,0,ae,At,Bt),mercatorX:Oe,mercatorY:pt}}}class Qs{constructor(R,ae,we){this._context=R,this._size=ae,this._tileSize=we,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let R of this._objects)R.texture.destroy(),R.fbo.destroy()}_createObject(R){let ae=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),we=new u(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return we.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),ae.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),ae.colorAttachment.set(we.texture),{id:R,fbo:ae,texture:we,stamp:-1,inUse:!1}}getObjectForId(R){return this._objects[R]}useObject(R){R.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(ae=>R.id!==ae),this._recentlyUsed.push(R.id)}stampObject(R){R.stamp=++this._stamp}getOrCreateFreeObject(){for(let ae of this._recentlyUsed)if(!this._objects[ae].inUse)return this._objects[ae];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let R=this._createObject(this._objects.length);return this._objects.push(R),R}freeObject(R){R.inUse=!1}freeAllObjects(){for(let R of this._objects)this.freeObject(R)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(R=>!R.inUse)===!1}}let Rs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Ks{constructor(R,ae){this.painter=R,this.terrain=ae,this.pool=new Qs(R.context,30,ae.sourceCache.tileSize*ae.qualityFactor)}destruct(){this.pool.destruct()}getTexture(R){return this.pool.getObjectForId(R.rtt[this._stacks.length-1].id).texture}prepareForRender(R,ae){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=R._order.filter(we=>!R._layers[we].isHidden(ae)),this._coordsDescendingInv={};for(let we in R.sourceCaches){this._coordsDescendingInv[we]={};let Se=R.sourceCaches[we].getVisibleCoordinates();for(let Oe of Se){let pt=this.terrain.sourceCache.getTerrainCoords(Oe);for(let At in pt)this._coordsDescendingInv[we][At]||(this._coordsDescendingInv[we][At]=[]),this._coordsDescendingInv[we][At].push(pt[At])}}this._coordsDescendingInvStr={};for(let we of R._order){let Se=R._layers[we],Oe=Se.source;if(Rs[Se.type]&&!this._coordsDescendingInvStr[Oe]){this._coordsDescendingInvStr[Oe]={};for(let pt in this._coordsDescendingInv[Oe])this._coordsDescendingInvStr[Oe][pt]=this._coordsDescendingInv[Oe][pt].map(At=>At.key).sort().join()}}for(let we of this._renderableTiles)for(let Se in this._coordsDescendingInvStr){let Oe=this._coordsDescendingInvStr[Se][we.tileID.key];Oe&&Oe!==we.rttCoords[Se]&&(we.rtt=[])}}renderLayer(R){if(R.isHidden(this.painter.transform.zoom))return!1;let ae=R.type,we=this.painter,Se=this._renderableLayerIds[this._renderableLayerIds.length-1]===R.id;if(Rs[ae]&&(this._prevType&&Rs[this._prevType]||this._stacks.push([]),this._prevType=ae,this._stacks[this._stacks.length-1].push(R.id),!Se))return!0;if(Rs[this._prevType]||Rs[ae]&&Se){this._prevType=ae;let Oe=this._stacks.length-1,pt=this._stacks[Oe]||[];for(let At of this._renderableTiles){if(this.pool.isFull()&&(ml(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(At),At.rtt[Oe]){let $t=this.pool.getObjectForId(At.rtt[Oe].id);if($t.stamp===At.rtt[Oe].stamp){this.pool.useObject($t);continue}}let Bt=this.pool.getOrCreateFreeObject();this.pool.useObject(Bt),this.pool.stampObject(Bt),At.rtt[Oe]={id:Bt.id,stamp:Bt.stamp},we.context.bindFramebuffer.set(Bt.fbo.framebuffer),we.context.clear({color:t.aM.transparent,stencil:0}),we.currentStencilSource=void 0;for(let $t=0;$t<pt.length;$t++){let br=we.style._layers[pt[$t]],Ar=br.source?this._coordsDescendingInv[br.source][At.tileID.key]:[At.tileID];we.context.viewport.set([0,0,Bt.fbo.width,Bt.fbo.height]),we._renderTileClippingMasks(br,Ar),we.renderLayer(we,we.style.sourceCaches[br.source],br,Ar),br.source&&(At.rttCoords[br.source]=this._coordsDescendingInvStr[br.source][At.tileID.key])}}return ml(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Rs[ae]}return!1}}let ys={"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"},Fl=r,yl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Jn,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:t.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},sl=Ne=>{Ne.touchstart=Ne.dragStart,Ne.touchmoveWindow=Ne.dragMove,Ne.touchend=Ne.dragEnd},Un={showCompass:!0,showZoom:!0,visualizePitch:!1};class Io{constructor(R,ae,we=!1){this.mousedown=pt=>{this.startMouse(t.e({},pt,{ctrlKey:!0,preventDefault:()=>pt.preventDefault()}),n.mousePos(this.element,pt)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=pt=>{this.moveMouse(pt,n.mousePos(this.element,pt))},this.mouseup=pt=>{this.mouseRotate.dragEnd(pt),this.mousePitch&&this.mousePitch.dragEnd(pt),this.offTemp()},this.touchstart=pt=>{pt.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,pt.targetTouches)[0],this.startTouch(pt,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=pt=>{pt.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,pt.targetTouches)[0],this.moveTouch(pt,this._lastPos))},this.touchend=pt=>{pt.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 Se=R.dragRotate._mouseRotate.getClickTolerance(),Oe=R.dragRotate._mousePitch.getClickTolerance();this.element=ae,this.mouseRotate=ru({clickTolerance:Se,enable:!0}),this.touchRotate=(({enable:pt,clickTolerance:At,bearingDegreesPerPixelMoved:Bt=.8})=>{let $t=new Zc;return new Hu({clickTolerance:At,move:(br,Ar)=>({bearingDelta:(Ar.x-br.x)*Bt}),moveStateManager:$t,enable:pt,assignEvents:sl})})({clickTolerance:Se,enable:!0}),this.map=R,we&&(this.mousePitch=jf({clickTolerance:Oe,enable:!0}),this.touchPitch=(({enable:pt,clickTolerance:At,pitchDegreesPerPixelMoved:Bt=-.5})=>{let $t=new Zc;return new Hu({clickTolerance:At,move:(br,Ar)=>({pitchDelta:(Ar.y-br.y)*Bt}),moveStateManager:$t,enable:pt,assignEvents:sl})})({clickTolerance:Oe,enable:!0})),n.addEventListener(ae,"mousedown",this.mousedown),n.addEventListener(ae,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ae,"touchcancel",this.reset)}startMouse(R,ae){this.mouseRotate.dragStart(R,ae),this.mousePitch&&this.mousePitch.dragStart(R,ae),n.disableDrag()}startTouch(R,ae){this.touchRotate.dragStart(R,ae),this.touchPitch&&this.touchPitch.dragStart(R,ae),n.disableDrag()}moveMouse(R,ae){let we=this.map,{bearingDelta:Se}=this.mouseRotate.dragMove(R,ae)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.mousePitch){let{pitchDelta:Oe}=this.mousePitch.dragMove(R,ae)||{};Oe&&we.setPitch(we.getPitch()+Oe)}}moveTouch(R,ae){let we=this.map,{bearingDelta:Se}=this.touchRotate.dragMove(R,ae)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.touchPitch){let{pitchDelta:Oe}=this.touchPitch.dragMove(R,ae)||{};Oe&&we.setPitch(we.getPitch()+Oe)}}off(){let R=this.element;n.removeEventListener(R,"mousedown",this.mousedown),n.removeEventListener(R,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(R,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Xs;function Ls(Ne,R,ae){let we=new t.N(Ne.lng,Ne.lat);if(Ne=new t.N(Ne.lng,Ne.lat),R){let Se=new t.N(Ne.lng-360,Ne.lat),Oe=new t.N(Ne.lng+360,Ne.lat),pt=ae.locationPoint(Ne).distSqr(R);ae.locationPoint(Se).distSqr(R)<pt?Ne=Se:ae.locationPoint(Oe).distSqr(R)<pt&&(Ne=Oe)}for(;Math.abs(Ne.lng-ae.center.lng)>180;){let Se=ae.locationPoint(Ne);if(Se.x>=0&&Se.y>=0&&Se.x<=ae.width&&Se.y<=ae.height)break;Ne.lng>ae.center.lng?Ne.lng-=360:Ne.lng+=360}return Ne.lng!==we.lng&&ae.locationPoint(Ne).y>ae.height/2-ae.getHorizon()?Ne:we}let ou={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 Iu(Ne,R,ae){let we=Ne.classList;for(let Se in ou)we.remove(`maplibregl-${ae}-anchor-${Se}`);we.add(`maplibregl-${ae}-anchor-${R}`)}class Zu extends t.E{constructor(R){if(super(),this._onKeyPress=ae=>{let we=ae.code,Se=ae.charCode||ae.keyCode;we!=="Space"&&we!=="Enter"&&Se!==32&&Se!==13||this.togglePopup()},this._onMapClick=ae=>{let we=ae.originalEvent.target,Se=this._element;this._popup&&(we===Se||Se.contains(we))&&this.togglePopup()},this._update=ae=>{var we;if(!this._map)return;let Se=this._map.loaded()&&!this._map.isMoving();(ae?.type==="terrain"||ae?.type==="render"&&!Se)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Ls(this._lngLat,this._flatPos,this._map.transform):(we=this._lngLat)===null||we===void 0?void 0:we.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 Oe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Oe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Oe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let pt="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?pt="rotateX(0deg)":this._pitchAlignment==="map"&&(pt=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ae&&ae.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${ou[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${pt} ${Oe}`),i.frameAsync(new AbortController).then(()=>{this._updateOpacity(ae&&ae.type==="moveend")}).catch(()=>{})},this._onMove=ae=>{if(!this._isDragging){let we=this._clickTolerance||this._map._clickTolerance;this._isDragging=ae.point.dist(this._pointerdownPos)>=we}this._isDragging&&(this._pos=ae.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 t.k("dragstart"))),this.fire(new t.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 t.k("dragend")),this._state="inactive"},this._addDragHandler=ae=>{this._element.contains(ae.originalEvent.target)&&(ae.preventDefault(),this._positionDelta=ae.point.sub(this._pos).add(this._offset),this._pointerdownPos=ae.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=R&&R.anchor||"center",this._color=R&&R.color||"#3FB1CE",this._scale=R&&R.scale||1,this._draggable=R&&R.draggable||!1,this._clickTolerance=R&&R.clickTolerance||0,this._subpixelPositioning=R&&R.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=R&&R.rotation||0,this._rotationAlignment=R&&R.rotationAlignment||"auto",this._pitchAlignment=R&&R.pitchAlignment&&R.pitchAlignment!=="auto"?R.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(R?.opacity,R?.opacityWhenCovered),R&&R.element)this._element=R.element,this._offset=t.P.convert(R&&R.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");let ae=n.createNS("http://www.w3.org/2000/svg","svg"),we=41,Se=27;ae.setAttributeNS(null,"display","block"),ae.setAttributeNS(null,"height",`${we}px`),ae.setAttributeNS(null,"width",`${Se}px`),ae.setAttributeNS(null,"viewBox",`0 0 ${Se} ${we}`);let Oe=n.createNS("http://www.w3.org/2000/svg","g");Oe.setAttributeNS(null,"stroke","none"),Oe.setAttributeNS(null,"stroke-width","1"),Oe.setAttributeNS(null,"fill","none"),Oe.setAttributeNS(null,"fill-rule","evenodd");let pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"fill-rule","nonzero");let At=n.createNS("http://www.w3.org/2000/svg","g");At.setAttributeNS(null,"transform","translate(3.0, 29.0)"),At.setAttributeNS(null,"fill","#000000");let Bt=[{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 dt of Bt){let Ct=n.createNS("http://www.w3.org/2000/svg","ellipse");Ct.setAttributeNS(null,"opacity","0.04"),Ct.setAttributeNS(null,"cx","10.5"),Ct.setAttributeNS(null,"cy","5.80029008"),Ct.setAttributeNS(null,"rx",dt.rx),Ct.setAttributeNS(null,"ry",dt.ry),At.appendChild(Ct)}let $t=n.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"fill",this._color);let br=n.createNS("http://www.w3.org/2000/svg","path");br.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"),$t.appendChild(br);let Ar=n.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"opacity","0.25"),Ar.setAttributeNS(null,"fill","#000000");let Yr=n.createNS("http://www.w3.org/2000/svg","path");Yr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ar.appendChild(Yr);let sa=n.createNS("http://www.w3.org/2000/svg","g");sa.setAttributeNS(null,"transform","translate(6.0, 7.0)"),sa.setAttributeNS(null,"fill","#FFFFFF");let He=n.createNS("http://www.w3.org/2000/svg","g");He.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Je=n.createNS("http://www.w3.org/2000/svg","circle");Je.setAttributeNS(null,"fill","#000000"),Je.setAttributeNS(null,"opacity","0.25"),Je.setAttributeNS(null,"cx","5.5"),Je.setAttributeNS(null,"cy","5.5"),Je.setAttributeNS(null,"r","5.4999962");let ut=n.createNS("http://www.w3.org/2000/svg","circle");ut.setAttributeNS(null,"fill","#FFFFFF"),ut.setAttributeNS(null,"cx","5.5"),ut.setAttributeNS(null,"cy","5.5"),ut.setAttributeNS(null,"r","5.4999962"),He.appendChild(Je),He.appendChild(ut),pt.appendChild(At),pt.appendChild($t),pt.appendChild(Ar),pt.appendChild(sa),pt.appendChild(He),ae.appendChild(pt),ae.setAttributeNS(null,"height",we*this._scale+"px"),ae.setAttributeNS(null,"width",Se*this._scale+"px"),this._element.appendChild(ae),this._offset=t.P.convert(R&&R.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ae=>{ae.preventDefault()}),this._element.addEventListener("mousedown",ae=>{ae.preventDefault()}),Iu(this._element,this._anchor,"marker"),R&&R.className)for(let ae of R.className.split(" "))this._element.classList.add(ae);this._popup=null}addTo(R){return this.remove(),this._map=R,this._element.setAttribute("aria-label",R._getUIString("Marker.Title")),R.getCanvasContainer().appendChild(this._element),R.on("move",this._update),R.on("moveend",this._update),R.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),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(R){return this._lngLat=t.N.convert(R),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(R){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),R){if(!("offset"in R.options)){let Se=Math.abs(13.5)/Math.SQRT2;R.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Se,-1*(38.1-13.5+Se)],"bottom-right":[-Se,-1*(38.1-13.5+Se)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=R,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(R){return this._subpixelPositioning=R,this}getPopup(){return this._popup}togglePopup(){let R=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:R?(R.isOpen()?R.remove():(R.setLngLat(this._lngLat),R.addTo(this._map)),this):this}_updateOpacity(R=!1){var ae,we;if(!(!((ae=this._map)===null||ae===void 0)&&ae.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(R)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Se=this._map,Oe=Se.terrain.depthAtPoint(this._pos),pt=Se.terrain.getElevationForLngLatZoom(this._lngLat,Se.transform.tileZoom);if(Se.transform.lngLatToCameraDepth(this._lngLat,pt)-Oe<.006)return void(this._element.style.opacity=this._opacity);let At=-this._offset.y/Se.transform._pixelPerMeter,Bt=Math.sin(Se.getPitch()*Math.PI/180)*At,$t=Se.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),br=Se.transform.lngLatToCameraDepth(this._lngLat,pt+Bt)-$t>.006;!((we=this._popup)===null||we===void 0)&&we.isOpen()&&br&&this._popup.remove(),this._element.style.opacity=br?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(R){return this._offset=t.P.convert(R),this._update(),this}addClassName(R){this._element.classList.add(R)}removeClassName(R){this._element.classList.remove(R)}toggleClassName(R){return this._element.classList.toggle(R)}setDraggable(R){return this._draggable=!!R,this._map&&(R?(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(R){return this._rotation=R||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(R){return this._rotationAlignment=R||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(R){return this._pitchAlignment=R&&R!=="auto"?R:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(R,ae){return R===void 0&&ae===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),R!==void 0&&(this._opacity=R),ae!==void 0&&(this._opacityWhenCovered=ae),this._map&&this._updateOpacity(!0),this}}let Lc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},yu=0,Pc=!1,wu={maxWidth:100,unit:"metric"};function gc(Ne,R,ae){let we=ae&&ae.maxWidth||100,Se=Ne._container.clientHeight/2,Oe=Ne.unproject([0,Se]),pt=Ne.unproject([we,Se]),At=Oe.distanceTo(pt);if(ae&&ae.unit==="imperial"){let Bt=3.2808*At;Bt>5280?fo(R,we,Bt/5280,Ne._getUIString("ScaleControl.Miles")):fo(R,we,Bt,Ne._getUIString("ScaleControl.Feet"))}else ae&&ae.unit==="nautical"?fo(R,we,At/1852,Ne._getUIString("ScaleControl.NauticalMiles")):At>=1e3?fo(R,we,At/1e3,Ne._getUIString("ScaleControl.Kilometers")):fo(R,we,At,Ne._getUIString("ScaleControl.Meters"))}function fo(Ne,R,ae,we){let Se=function(Oe){let pt=Math.pow(10,`${Math.floor(Oe)}`.length-1),At=Oe/pt;return At=At>=10?10:At>=5?5:At>=3?3:At>=2?2:At>=1?1:function(Bt){let $t=Math.pow(10,Math.ceil(-Math.log(Bt)/Math.LN10));return Math.round(Bt*$t)/$t}(At),pt*At}(ae);Ne.style.width=R*(Se/ae)+"px",Ne.innerHTML=`${Se}&nbsp;${we}`}let zo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Ic=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function lc(Ne){if(Ne){if(typeof Ne=="number"){let R=Math.round(Math.abs(Ne)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,Ne),"top-left":new t.P(R,R),"top-right":new t.P(-R,R),bottom:new t.P(0,-Ne),"bottom-left":new t.P(R,-R),"bottom-right":new t.P(-R,-R),left:new t.P(Ne,0),right:new t.P(-Ne,0)}}if(Ne instanceof t.P||Array.isArray(Ne)){let R=t.P.convert(Ne);return{center:R,top:R,"top-left":R,"top-right":R,bottom:R,"bottom-left":R,"bottom-right":R,left:R,right:R}}return{center:t.P.convert(Ne.center||[0,0]),top:t.P.convert(Ne.top||[0,0]),"top-left":t.P.convert(Ne["top-left"]||[0,0]),"top-right":t.P.convert(Ne["top-right"]||[0,0]),bottom:t.P.convert(Ne.bottom||[0,0]),"bottom-left":t.P.convert(Ne["bottom-left"]||[0,0]),"bottom-right":t.P.convert(Ne["bottom-right"]||[0,0]),left:t.P.convert(Ne.left||[0,0]),right:t.P.convert(Ne.right||[0,0])}}return lc(new t.P(0,0))}let Yu=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=co,e.BoxZoomHandler=Pu,e.CanvasSource=tt,e.CooperativeGesturesHandler=Fi,e.DoubleClickZoomHandler=hi,e.DragPanHandler=tn,e.DragRotateHandler=dn,e.EdgeInsets=vu,e.FullscreenControl=class extends t.E{constructor(Ne={}){super(),this._onFullscreenChange=()=>{var R;let ae=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((R=ae?.shadowRoot)===null||R===void 0)&&R.fullscreenElement;)ae=ae.shadowRoot.fullscreenElement;ae===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Ne&&Ne.container&&(Ne.container instanceof HTMLElement?this._container=Ne.container:t.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(Ne){return this._map=Ne,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Ne=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",Ne).setAttribute("aria-hidden","true"),Ne.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Ne=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Ne),this._fullscreenButton.title=Ne}_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 t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.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()}},e.GeoJSONSource=Re,e.GeolocateControl=class extends t.E{constructor(Ne){super(),this._onSuccess=R=>{if(this._map){if(this._isOutOfMapMaxBounds(R))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",R)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=R,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(R),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(R),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",R)),this._finish()}},this._updateCamera=R=>{let ae=new t.N(R.coords.longitude,R.coords.latitude),we=R.coords.accuracy,Se=this._map.getBearing(),Oe=t.e({bearing:Se},this.options.fitBoundsOptions),pt=re.fromLngLat(ae,we);this._map.fitBounds(pt,Oe,{geolocateSource:!0})},this._updateMarker=R=>{if(R){let ae=new t.N(R.coords.longitude,R.coords.latitude);this._accuracyCircleMarker.setLngLat(ae).addTo(this._map),this._userLocationDotMarker.setLngLat(ae).addTo(this._map),this._accuracy=R.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=R=>{if(this._map){if(this.options.trackUserLocation)if(R.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 ae=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ae,this._geolocateButton.setAttribute("aria-label",ae),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(R.code===3&&Pc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",R)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",R=>R.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=R=>{if(this._map){if(R===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let ae=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ae,this._geolocateButton.setAttribute("aria-label",ae)}else{let ae=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ae,this._geolocateButton.setAttribute("aria-label",ae)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Zu({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zu({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",ae=>{ae.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ae.originalEvent&&ae.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 t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},Lc,Ne)}onAdd(Ne){return this._map=Ne,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,function*(R=!1){if(Xs!==void 0&&!R)return Xs;if(window.navigator.permissions===void 0)return Xs=!!window.navigator.geolocation,Xs;try{Xs=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Xs=!!window.navigator.geolocation}return Xs})}().then(R=>this._finishSetupUI(R)),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(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,yu=0,Pc=!1}_isOutOfMapMaxBounds(Ne){let R=this._map.getMaxBounds(),ae=Ne.coords;return R&&(ae.longitude<R.getWest()||ae.longitude>R.getEast()||ae.latitude<R.getSouth()||ae.latitude>R.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 Ne=this._map.getBounds(),R=Ne.getSouthEast(),ae=Ne.getNorthEast(),we=R.distanceTo(ae),Se=Math.ceil(this._accuracy/(we/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Se}px`,this._circleElement.style.height=`${Se}px`}trigger(){if(!this._setup)return t.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 t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":yu--,Pc=!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 t.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 t.k("trackuserlocationstart")),this.fire(new t.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 Ne;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),yu++,yu>1?(Ne={maximumAge:6e5,timeout:0},Pc=!0):(Ne=this.options.positionOptions,Pc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Ne)}}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)}},e.Hash=Jf,e.ImageSource=it,e.KeyboardHandler=yr,e.LngLatBounds=re,e.LogoControl=wn,e.Map=class extends ao{constructor(Ne){t.bf.mark(t.bg.create);let R=Object.assign(Object.assign({},yl),Ne);if(R.minZoom!=null&&R.maxZoom!=null&&R.minZoom>R.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(R.minPitch!=null&&R.maxPitch!=null&&R.minPitch>R.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(R.minPitch!=null&&R.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(R.maxPitch!=null&&R.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Ml(R.minZoom,R.maxZoom,R.minPitch,R.maxPitch,R.renderWorldCopies),{bearingSnap:R.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new un,this._controls=[],this._mapId=t.a4(),this._contextLost=ae=>{ae.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ae}))},this._contextRestored=ae=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ae}))},this._onMapScroll=ae=>{if(ae.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=R.interactive,this._maxTileCacheSize=R.maxTileCacheSize,this._maxTileCacheZoomLevels=R.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=R.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=R.preserveDrawingBuffer===!0,this._antialias=R.antialias===!0,this._trackResize=R.trackResize===!0,this._bearingSnap=R.bearingSnap,this._refreshExpiredTiles=R.refreshExpiredTiles===!0,this._fadeDuration=R.fadeDuration,this._crossSourceCollisions=R.crossSourceCollisions===!0,this._collectResourceTiming=R.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ys),R.locale),this._clickTolerance=R.clickTolerance,this._overridePixelRatio=R.pixelRatio,this._maxCanvasSize=R.maxCanvasSize,this.transformCameraUpdate=R.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=R.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(R.transformRequest),typeof R.container=="string"){if(this._container=document.getElementById(R.container),!this._container)throw new Error(`Container '${R.container}' not found.`)}else{if(!(R.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=R.container}if(R.maxBounds&&this.setMaxBounds(R.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<"u"){addEventListener("online",this._onWindowOnline,!1);let ae=!1,we=Uf(Se=>{this._trackResize&&!this._removed&&(this.resize(Se),this.redraw())},50);this._resizeObserver=new ResizeObserver(Se=>{ae?we(Se):ae=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Kn(this,R),this._hash=R.hash&&new Jf(typeof R.hash=="string"&&R.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:R.center,zoom:R.zoom,bearing:R.bearing,pitch:R.pitch}),R.bounds&&(this.resize(),this.fitBounds(R.bounds,t.e({},R.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=R.localIdeographFontFamily,this._validateStyle=R.validateStyle,R.style&&this.setStyle(R.style,{localIdeographFontFamily:R.localIdeographFontFamily}),R.attributionControl&&this.addControl(new co(typeof R.attributionControl=="boolean"?void 0:R.attributionControl)),R.maplibreLogo&&this.addControl(new wn,R.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ae=>{this._update(ae.dataType==="style"),this.fire(new t.k(`${ae.dataType}data`,ae))}),this.on("dataloading",ae=>{this.fire(new t.k(`${ae.dataType}dataloading`,ae))}),this.on("dataabort",ae=>{this.fire(new t.k("sourcedataabort",ae))})}_getMapId(){return this._mapId}addControl(Ne,R){if(R===void 0&&(R=Ne.getDefaultPosition?Ne.getDefaultPosition():"top-right"),!Ne||!Ne.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let ae=Ne.onAdd(this);this._controls.push(Ne);let we=this._controlPositions[R];return R.indexOf("bottom")!==-1?we.insertBefore(ae,we.firstChild):we.appendChild(ae),this}removeControl(Ne){if(!Ne||!Ne.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let R=this._controls.indexOf(Ne);return R>-1&&this._controls.splice(R,1),Ne.onRemove(this),this}hasControl(Ne){return this._controls.indexOf(Ne)>-1}calculateCameraOptionsFromTo(Ne,R,ae,we){return we==null&&this.terrain&&(we=this.terrain.getElevationForLngLatZoom(ae,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Ne,R,ae,we)}resize(Ne){var R;let ae=this._containerDimensions(),we=ae[0],Se=ae[1],Oe=this._getClampedPixelRatio(we,Se);if(this._resizeCanvas(we,Se,Oe),this.painter.resize(we,Se,Oe),this.painter.overLimit()){let At=this.painter.context.gl;this._maxCanvasSize=[At.drawingBufferWidth,At.drawingBufferHeight];let Bt=this._getClampedPixelRatio(we,Se);this._resizeCanvas(we,Se,Bt),this.painter.resize(we,Se,Bt)}this.transform.resize(we,Se),(R=this._requestedCameraState)===null||R===void 0||R.resize(we,Se);let pt=!this._moving;return pt&&(this.stop(),this.fire(new t.k("movestart",Ne)).fire(new t.k("move",Ne))),this.fire(new t.k("resize",Ne)),pt&&this.fire(new t.k("moveend",Ne)),this}_getClampedPixelRatio(Ne,R){let{0:ae,1:we}=this._maxCanvasSize,Se=this.getPixelRatio(),Oe=Ne*Se,pt=R*Se;return Math.min(Oe>ae?ae/Oe:1,pt>we?we/pt:1)*Se}getPixelRatio(){var Ne;return(Ne=this._overridePixelRatio)!==null&&Ne!==void 0?Ne:devicePixelRatio}setPixelRatio(Ne){this._overridePixelRatio=Ne,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Ne){return this.transform.setMaxBounds(re.convert(Ne)),this._update()}setMinZoom(Ne){if((Ne=Ne??-2)>=-2&&Ne<=this.transform.maxZoom)return this.transform.minZoom=Ne,this._update(),this.getZoom()<Ne&&this.setZoom(Ne),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Ne){if((Ne=Ne??22)>=this.transform.minZoom)return this.transform.maxZoom=Ne,this._update(),this.getZoom()>Ne&&this.setZoom(Ne),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Ne){if((Ne=Ne??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Ne>=0&&Ne<=this.transform.maxPitch)return this.transform.minPitch=Ne,this._update(),this.getPitch()<Ne&&this.setPitch(Ne),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Ne){if((Ne=Ne??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(Ne>=this.transform.minPitch)return this.transform.maxPitch=Ne,this._update(),this.getPitch()>Ne&&this.setPitch(Ne),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Ne){return this.transform.renderWorldCopies=Ne,this._update()}project(Ne){return this.transform.locationPoint(t.N.convert(Ne),this.style&&this.terrain)}unproject(Ne){return this.transform.pointLocation(t.P.convert(Ne),this.terrain)}isMoving(){var Ne;return this._moving||((Ne=this.handlers)===null||Ne===void 0?void 0:Ne.isMoving())}isZooming(){var Ne;return this._zooming||((Ne=this.handlers)===null||Ne===void 0?void 0:Ne.isZooming())}isRotating(){var Ne;return this._rotating||((Ne=this.handlers)===null||Ne===void 0?void 0:Ne.isRotating())}_createDelegatedListener(Ne,R,ae){if(Ne==="mouseenter"||Ne==="mouseover"){let we=!1;return{layers:R,listener:ae,delegates:{mousemove:Oe=>{let pt=R.filter(Bt=>this.getLayer(Bt)),At=pt.length!==0?this.queryRenderedFeatures(Oe.point,{layers:pt}):[];At.length?we||(we=!0,ae.call(this,new tu(Ne,this,Oe.originalEvent,{features:At}))):we=!1},mouseout:()=>{we=!1}}}}if(Ne==="mouseleave"||Ne==="mouseout"){let we=!1;return{layers:R,listener:ae,delegates:{mousemove:pt=>{let At=R.filter(Bt=>this.getLayer(Bt));(At.length!==0?this.queryRenderedFeatures(pt.point,{layers:At}):[]).length?we=!0:we&&(we=!1,ae.call(this,new tu(Ne,this,pt.originalEvent)))},mouseout:pt=>{we&&(we=!1,ae.call(this,new tu(Ne,this,pt.originalEvent)))}}}}{let we=Se=>{let Oe=R.filter(At=>this.getLayer(At)),pt=Oe.length!==0?this.queryRenderedFeatures(Se.point,{layers:Oe}):[];pt.length&&(Se.features=pt,ae.call(this,Se),delete Se.features)};return{layers:R,listener:ae,delegates:{[Ne]:we}}}}_saveDelegatedListener(Ne,R){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Ne]=this._delegatedListeners[Ne]||[],this._delegatedListeners[Ne].push(R)}_removeDelegatedListener(Ne,R,ae){if(!this._delegatedListeners||!this._delegatedListeners[Ne])return;let we=this._delegatedListeners[Ne];for(let Se=0;Se<we.length;Se++){let Oe=we[Se];if(Oe.listener===ae&&Oe.layers.length===R.length&&Oe.layers.every(pt=>R.includes(pt))){for(let pt in Oe.delegates)this.off(pt,Oe.delegates[pt]);return void we.splice(Se,1)}}}on(Ne,R,ae){if(ae===void 0)return super.on(Ne,R);let we=this._createDelegatedListener(Ne,typeof R=="string"?[R]:R,ae);this._saveDelegatedListener(Ne,we);for(let Se in we.delegates)this.on(Se,we.delegates[Se]);return this}once(Ne,R,ae){if(ae===void 0)return super.once(Ne,R);let we=typeof R=="string"?[R]:R,Se=this._createDelegatedListener(Ne,we,ae);for(let Oe in Se.delegates){let pt=Se.delegates[Oe];Se.delegates[Oe]=(...At)=>{this._removeDelegatedListener(Ne,we,ae),pt(...At)}}this._saveDelegatedListener(Ne,Se);for(let Oe in Se.delegates)this.once(Oe,Se.delegates[Oe]);return this}off(Ne,R,ae){return ae===void 0?super.off(Ne,R):(this._removeDelegatedListener(Ne,typeof R=="string"?[R]:R,ae),this)}queryRenderedFeatures(Ne,R){if(!this.style)return[];let ae,we=Ne instanceof t.P||Array.isArray(Ne),Se=we?Ne:[[0,0],[this.transform.width,this.transform.height]];if(R=R||(we?{}:Ne)||{},Se instanceof t.P||typeof Se[0]=="number")ae=[t.P.convert(Se)];else{let Oe=t.P.convert(Se[0]),pt=t.P.convert(Se[1]);ae=[Oe,new t.P(pt.x,Oe.y),pt,new t.P(Oe.x,pt.y),Oe]}return this.style.queryRenderedFeatures(ae,R,this.transform)}querySourceFeatures(Ne,R){return this.style.querySourceFeatures(Ne,R)}setStyle(Ne,R){return(R=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},R)).diff!==!1&&R.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Ne?(this._diffStyle(Ne,R),this):(this._localIdeographFontFamily=R.localIdeographFontFamily,this._updateStyle(Ne,R))}setTransformRequest(Ne){return this._requestManager.setTransformRequest(Ne),this}_getUIString(Ne){let R=this._locale[Ne];if(R==null)throw new Error(`Missing UI string '${Ne}'`);return R}_updateStyle(Ne,R){if(R.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Ne,R));let ae=this.style&&R.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Ne)),Ne?(this.style=new aa(this,R||{}),this.style.setEventedParent(this,{style:this.style}),typeof Ne=="string"?this.style.loadURL(Ne,R,ae):this.style.loadJSON(Ne,R,ae),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new aa(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Ne,R){if(typeof Ne=="string"){let ae=this._requestManager.transformRequest(Ne,"Style");t.h(ae,new AbortController).then(we=>{this._updateDiff(we.data,R)}).catch(we=>{we&&this.fire(new t.j(we))})}else typeof Ne=="object"&&this._updateDiff(Ne,R)}_updateDiff(Ne,R){try{this.style.setState(Ne,R)&&this._update(!0)}catch(ae){t.w(`Unable to perform style diff: ${ae.message||ae.error||ae}. Rebuilding the style from scratch.`),this._updateStyle(Ne,R)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(Ne,R){return this._lazyInitEmptyStyle(),this.style.addSource(Ne,R),this._update(!0)}isSourceLoaded(Ne){let R=this.style&&this.style.sourceCaches[Ne];if(R!==void 0)return R.loaded();this.fire(new t.j(new Error(`There is no source with ID '${Ne}'`)))}setTerrain(Ne){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Ne){let R=this.style.sourceCaches[Ne.source];if(!R)throw new Error(`cannot load terrain, because there exists no source with ID: ${Ne.source}`);this.terrain===null&&R.reload();for(let ae in this.style._layers){let we=this.style._layers[ae];we.type==="hillshade"&&we.source===Ne.source&&t.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 xs(this.painter,R,Ne),this.painter.renderToTexture=new Ks(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=ae=>{ae.dataType==="style"?this.terrain.sourceCache.freeRtt():ae.dataType==="source"&&ae.tile&&(ae.sourceId!==Ne.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(ae.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 t.k("terrain",{terrain:Ne})),this}getTerrain(){var Ne,R;return(R=(Ne=this.terrain)===null||Ne===void 0?void 0:Ne.options)!==null&&R!==void 0?R:null}areTilesLoaded(){let Ne=this.style&&this.style.sourceCaches;for(let R in Ne){let ae=Ne[R]._tiles;for(let we in ae){let Se=ae[we];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}}return!0}removeSource(Ne){return this.style.removeSource(Ne),this._update(!0)}getSource(Ne){return this.style.getSource(Ne)}addImage(Ne,R,ae={}){let{pixelRatio:we=1,sdf:Se=!1,stretchX:Oe,stretchY:pt,content:At,textFitWidth:Bt,textFitHeight:$t}=ae;if(this._lazyInitEmptyStyle(),!(R instanceof HTMLImageElement||t.b(R))){if(R.width===void 0||R.height===void 0)return this.fire(new t.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:br,height:Ar,data:Yr}=R,sa=R;return this.style.addImage(Ne,{data:new t.R({width:br,height:Ar},new Uint8Array(Yr)),pixelRatio:we,stretchX:Oe,stretchY:pt,content:At,textFitWidth:Bt,textFitHeight:$t,sdf:Se,version:0,userImage:sa}),sa.onAdd&&sa.onAdd(this,Ne),this}}{let{width:br,height:Ar,data:Yr}=i.getImageData(R);this.style.addImage(Ne,{data:new t.R({width:br,height:Ar},Yr),pixelRatio:we,stretchX:Oe,stretchY:pt,content:At,textFitWidth:Bt,textFitHeight:$t,sdf:Se,version:0})}}updateImage(Ne,R){let ae=this.style.getImage(Ne);if(!ae)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let we=R instanceof HTMLImageElement||t.b(R)?i.getImageData(R):R,{width:Se,height:Oe,data:pt}=we;if(Se===void 0||Oe===void 0)return this.fire(new t.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(Se!==ae.data.width||Oe!==ae.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let At=!(R instanceof HTMLImageElement||t.b(R));return ae.data.replace(pt,At),this.style.updateImage(Ne,ae),this}getImage(Ne){return this.style.getImage(Ne)}hasImage(Ne){return Ne?!!this.style.getImage(Ne):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(Ne){this.style.removeImage(Ne)}loadImage(Ne){return l.getImage(this._requestManager.transformRequest(Ne,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Ne,R){return this._lazyInitEmptyStyle(),this.style.addLayer(Ne,R),this._update(!0)}moveLayer(Ne,R){return this.style.moveLayer(Ne,R),this._update(!0)}removeLayer(Ne){return this.style.removeLayer(Ne),this._update(!0)}getLayer(Ne){return this.style.getLayer(Ne)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Ne,R,ae){return this.style.setLayerZoomRange(Ne,R,ae),this._update(!0)}setFilter(Ne,R,ae={}){return this.style.setFilter(Ne,R,ae),this._update(!0)}getFilter(Ne){return this.style.getFilter(Ne)}setPaintProperty(Ne,R,ae,we={}){return this.style.setPaintProperty(Ne,R,ae,we),this._update(!0)}getPaintProperty(Ne,R){return this.style.getPaintProperty(Ne,R)}setLayoutProperty(Ne,R,ae,we={}){return this.style.setLayoutProperty(Ne,R,ae,we),this._update(!0)}getLayoutProperty(Ne,R){return this.style.getLayoutProperty(Ne,R)}setGlyphs(Ne,R={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Ne,R),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Ne,R,ae={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Ne,R,ae,we=>{we||this._update(!0)}),this}removeSprite(Ne){return this._lazyInitEmptyStyle(),this.style.removeSprite(Ne),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Ne,R={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Ne,R,ae=>{ae||this._update(!0)}),this}setLight(Ne,R={}){return this._lazyInitEmptyStyle(),this.style.setLight(Ne,R),this._update(!0)}getLight(){return this.style.getLight()}setSky(Ne){return this._lazyInitEmptyStyle(),this.style.setSky(Ne),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Ne,R){return this.style.setFeatureState(Ne,R),this._update()}removeFeatureState(Ne,R){return this.style.removeFeatureState(Ne,R),this._update()}getFeatureState(Ne){return this.style.getFeatureState(Ne)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Ne=0,R=0;return this._container&&(Ne=this._container.clientWidth||400,R=this._container.clientHeight||300),[Ne,R]}_setupContainer(){let Ne=this._container;Ne.classList.add("maplibregl-map");let R=this._canvasContainer=n.create("div","maplibregl-canvas-container",Ne);this._interactive&&R.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",R),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 ae=this._containerDimensions(),we=this._getClampedPixelRatio(ae[0],ae[1]);this._resizeCanvas(ae[0],ae[1],we);let Se=this._controlContainer=n.create("div","maplibregl-control-container",Ne),Oe=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(pt=>{Oe[pt]=n.create("div",`maplibregl-ctrl-${pt} `,Se)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Ne,R,ae){this._canvas.width=Math.floor(ae*Ne),this._canvas.height=Math.floor(ae*R),this._canvas.style.width=`${Ne}px`,this._canvas.style.height=`${R}px`}_setupPainter(){let Ne={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},R=null;this._canvas.addEventListener("webglcontextcreationerror",we=>{R={requestedAttributes:Ne},we&&(R.statusMessage=we.statusMessage,R.type=we.type)},{once:!0});let ae=this._canvas.getContext("webgl2",Ne)||this._canvas.getContext("webgl",Ne);if(!ae){let we="Failed to initialize WebGL";throw R?(R.message=we,new Error(JSON.stringify(R))):new Error(we)}this.painter=new Ac(ae,this.transform),s.testSupport(ae)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Ne){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Ne,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Ne){return this._update(),this._renderTaskQueue.add(Ne)}_cancelRenderFrame(Ne){this._renderTaskQueue.remove(Ne)}_render(Ne){let R=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Ne),this._removed)return;let ae=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Se=this.transform.zoom,Oe=i.now();this.style.zoomHistory.update(Se,Oe);let pt=new t.z(Se,{now:Oe,fadeDuration:R,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),At=pt.crossFadingFactor();At===1&&At===this._crossFadingFactor||(ae=!0,this._crossFadingFactor=At),this.style.update(pt)}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,R,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:R,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||ae)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||we||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Ne;this._hash&&this._hash.remove();for(let ae of this._controls)ae.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<"u"&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),(Ne=this._resizeObserver)===null||Ne===void 0||Ne.disconnect();let R=this.painter.context.gl.getExtension("WEBGL_lose_context");R?.loseContext&&R.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,i.frameAsync(this._frameRequest).then(Ne=>{t.bf.frame(Ne),this._frameRequest=null,this._render(Ne)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Ne){this._showTileBoundaries!==Ne&&(this._showTileBoundaries=Ne,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Ne){this._showPadding!==Ne&&(this._showPadding=Ne,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Ne){this._showCollisionBoxes!==Ne&&(this._showCollisionBoxes=Ne,Ne?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Ne){this._showOverdrawInspector!==Ne&&(this._showOverdrawInspector=Ne,this._update())}get repaint(){return!!this._repaint}set repaint(Ne){this._repaint!==Ne&&(this._repaint=Ne,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Ne){this._vertices=Ne,this._update()}get version(){return Fl}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=tu,e.MapTouchEvent=Xc,e.MapWheelEvent=uh,e.Marker=Zu,e.NavigationControl=class{constructor(Ne){this._updateZoomButtons=()=>{let R=this._map.getZoom(),ae=R===this._map.getMaxZoom(),we=R===this._map.getMinZoom();this._zoomInButton.disabled=ae,this._zoomOutButton.disabled=we,this._zoomInButton.setAttribute("aria-disabled",ae.toString()),this._zoomOutButton.setAttribute("aria-disabled",we.toString())},this._rotateCompassArrow=()=>{let R=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=R},this._setButtonTitle=(R,ae)=>{let we=this._map._getUIString(`NavigationControl.${ae}`);R.title=we,R.setAttribute("aria-label",we)},this.options=t.e({},Un,Ne),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",R=>R.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",R=>this._map.zoomIn({},{originalEvent:R})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",R=>this._map.zoomOut({},{originalEvent:R})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",R=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:R}):this._map.resetNorth({},{originalEvent:R})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Ne){return this._map=Ne,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 Io(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.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(Ne,R){let ae=n.create("button",Ne,this._container);return ae.type="button",ae.addEventListener("click",R),ae}},e.Popup=class extends t.E{constructor(Ne){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.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 t.k("close"))),this),this._onMouseUp=R=>{this._update(R.point)},this._onMouseMove=R=>{this._update(R.point)},this._onDrag=R=>{this._update(R.point)},this._update=R=>{var ae;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let At of this.options.className.split(" "))this._container.classList.add(At);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?Ls(this._lngLat,this._flatPos,this._map.transform):(ae=this._lngLat)===null||ae===void 0?void 0:ae.wrap(),this._trackPointer&&!R)return;let we=this._flatPos=this._pos=this._trackPointer&&R?R:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&R?R:this._map.transform.locationPoint(this._lngLat));let Se=this.options.anchor,Oe=lc(this.options.offset);if(!Se){let At=this._container.offsetWidth,Bt=this._container.offsetHeight,$t;$t=we.y+Oe.bottom.y<Bt?["top"]:we.y>this._map.transform.height-Bt?["bottom"]:[],we.x<At/2?$t.push("left"):we.x>this._map.transform.width-At/2&&$t.push("right"),Se=$t.length===0?"bottom":$t.join("-")}let pt=we.add(Oe[Se]);this.options.subpixelPositioning||(pt=pt.round()),n.setTransform(this._container,`${ou[Se]} translate(${pt.x}px,${pt.y}px)`),Iu(this._container,Se,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(zo),Ne)}addTo(Ne){return this._map&&this.remove(),this._map=Ne,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 t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Ne){return this._lngLat=t.N.convert(Ne),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(Ne){return this.setDOMContent(document.createTextNode(Ne))}setHTML(Ne){let R=document.createDocumentFragment(),ae=document.createElement("body"),we;for(ae.innerHTML=Ne;we=ae.firstChild,we;)R.appendChild(we);return this.setDOMContent(R)}getMaxWidth(){var Ne;return(Ne=this._container)===null||Ne===void 0?void 0:Ne.style.maxWidth}setMaxWidth(Ne){return this.options.maxWidth=Ne,this._update(),this}setDOMContent(Ne){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Ne),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Ne){return this._container&&this._container.classList.add(Ne),this}removeClassName(Ne){return this._container&&this._container.classList.remove(Ne),this}setOffset(Ne){return this.options.offset=Ne,this._update(),this}toggleClassName(Ne){if(this._container)return this._container.classList.toggle(Ne)}setSubpixelPositioning(Ne){this.options.subpixelPositioning=Ne}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Ne=this._container.querySelector(Ic);Ne&&Ne.focus()}},e.RasterDEMTileSource=ze,e.RasterTileSource=Ae,e.ScaleControl=class{constructor(Ne){this._onMove=()=>{gc(this._map,this._container,this.options)},this.setUnit=R=>{this.options.unit=R,gc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},wu),Ne)}getDefaultPosition(){return"bottom-left"}onAdd(Ne){return this._map=Ne,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Ne.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=La,e.Style=aa,e.TerrainControl=class{constructor(Ne){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=Ne}onAdd(Ne){return this._map=Ne,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.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(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=kc,e.TwoFingersTouchRotateHandler=Yc,e.TwoFingersTouchZoomHandler=gu,e.TwoFingersTouchZoomRotateHandler=Ri,e.VectorTileSource=be,e.VideoSource=ot,e.addSourceType=(Ne,R)=>t._(void 0,void 0,void 0,function*(){if(Ee(Ne))throw new Error(`A source type called "${Ne}" already exists.`);((ae,we)=>{lt[ae]=we})(Ne,R)}),e.clearPrewarmedResources=function(){let Ne=he;Ne&&(Ne.isPreloaded()&&Ne.numActive()===1?(Ne.release(Q),he=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return rt().getRTLTextPluginStatus()},e.getVersion=function(){return Yu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(Ne){return X().broadcast("IS",Ne)},e.prewarm=function(){$().acquire(Q)},e.setMaxParallelImageRequests=function(Ne){t.a.MAX_PARALLEL_IMAGE_REQUESTS=Ne},e.setRTLTextPlugin=function(Ne,R){return rt().setRTLTextPlugin(Ne,R)},e.setWorkerCount=function(Ne){ue.workerCount=Ne},e.setWorkerUrl=function(Ne){t.a.WORKER_URL=Ne}});var M=d;return M})}}),jV=Ze({"src/plots/map/layers.js"(Z,q){"use strict";var d=ca(),x=fu().sanitizeHTML,A=R6(),M=_0();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=M.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s<n.length;s++){var c=n[s].id;if(typeof c=="string"&&c.indexOf(M.traceLayerPrefix)===0){i=c;break}}return i},t.updateLayer=function(i){var n=this.subplot,s=o(i),c=this.lookupBelow(),f=this.findFollowingMapLayerId(c);this.removeLayer(),r(i)&&n.addLayer({id:this.idLayer,source:this.idSource,"source-layer":i.sourcelayer||"",type:i.type,minzoom:i.minzoom,maxzoom:i.maxzoom,layout:s.layout,paint:s.paint},f),this.layerType=i.type,this.below=c},t.updateStyle=function(i){if(r(i)){var n=o(i);this.subplot.setOptions(this.idLayer,"setLayoutProperty",n.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",n.paint)}},t.removeLayer=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer)},t.dispose=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer),i.getSource(this.idSource)&&i.removeSource(this.idSource)};function r(i){if(!i.visible)return!1;var n=i.source;if(Array.isArray(n)&&n.length>0){for(var s=0;s<n.length;s++)if(typeof n[s]!="string"||n[s].length===0)return!1;return!0}return d.isPlainObject(n)||typeof n=="string"&&n.length>0}function o(i){var n={},s={};switch(i.type){case"circle":d.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":d.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":d.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var c=i.symbol,f=A(c.textposition,c.iconsize);d.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":f.anchor,"text-offset":f.offset,"symbol-placement":c.placement}),d.extendFlat(s,{"icon-color":i.color,"text-color":c.textfont.color,"text-opacity":i.opacity});break;case"raster":d.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,c={type:n},f;return n==="geojson"?f="data":n==="vector"?f=typeof s=="string"?"url":"tiles":n==="raster"?(f="tiles",c.tileSize=256):n==="image"&&(f="url",c.coordinates=i.coordinates),c[f]=s,i.sourceattribution&&(c.attribution=x(i.sourceattribution)),c}q.exports=function(n,s,c){var f=new e(n,s);return f.update(c),f}}}),qV=Ze({"src/plots/map/map.js"(Z,q){"use strict";var d=UV(),x=ca(),A=v0(),M=oo(),e=Wo(),t=Tp(),r=ef(),o=Jd(),a=o.drawMode,i=o.selectMode,n=Tf().prepSelect,s=Tf().clearOutline,c=Tf().clearSelectionsCache,f=Tf().selectOnClick,g=_0(),v=jV();function T(y,b){this.id=b,this.gd=y;var p=y._fullLayout,u=y._context;this.container=p._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=p._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(p),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(y,b,p){var u=this,m;u.map?m=new Promise(function(h,P){u.updateMap(y,b,h,P)}):m=new Promise(function(h,P){u.createMap(y,b,h,P)}),p.push(m)},l.createMap=function(y,b,p,u){var m=this,h=b[m.id],P=m.styleObj=w(h.style),L=h.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=m.map=new d.Map({container:m.div,style:P.style,center:E(h.center),zoom:h.zoom,bearing:h.bearing,pitch:h.pitch,maxBounds:z,interactive:!m.isStatic,preserveDrawingBuffer:m.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new d.AttributionControl({compact:!0})),B={};F.on("styleimagemissing",function(I){var N=I.id;if(!B[N]&&N.includes("-15")){B[N]=!0;var U=new Image(15,15);U.onload=function(){F.addImage(N,U)},U.crossOrigin="Anonymous",U.src="https://unpkg.com/maki@2.1.0/icons/"+N+".svg"}}),F.setTransformRequest(function(I){return I=I.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),I=I.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),I=I.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:I}}),F._canvas.style.left="0px",F._canvas.style.top="0px",m.rejectOnError(u),m.isStatic||m.initFx(y,b);var O=[];O.push(new Promise(function(I){F.once("load",I)})),O=O.concat(A.fetchTraceGeoData(y)),Promise.all(O).then(function(){m.fillBelowLookup(y,b),m.updateData(y),m.updateLayout(b),m.resolveOnRender(p)}).catch(u)},l.updateMap=function(y,b,p,u){var m=this,h=m.map,P=b[this.id];m.rejectOnError(u);var L=[],z=w(P.style);JSON.stringify(m.styleObj)!==JSON.stringify(z)&&(m.styleObj=z,h.setStyle(z.style),m.traceHash={},L.push(new Promise(function(F){h.once("styledata",F)}))),L=L.concat(A.fetchTraceGeoData(y)),Promise.all(L).then(function(){m.fillBelowLookup(y,b),m.updateData(y),m.updateLayout(b),m.resolveOnRender(p)}).catch(u)},l.fillBelowLookup=function(y,b){var p=b[this.id],u=p.layers,m,h,P=this.belowLookup={},L=!1;for(m=0;m<y.length;m++){var z=y[m][0].trace,F=z._module;typeof z.below=="string"?h=z.below:F.getBelow&&(h=F.getBelow(z,this)),h===""&&(L=!0),P["trace-"+z.uid]=h||""}for(m=0;m<u.length;m++){var B=u[m];typeof B.below=="string"?h=B.below:L?h="traces":h="",P["layout-"+m]=h}var O={},I,N;for(I in P)h=P[I],O[h]?O[h].push(I):O[h]=[I];for(h in O){var U=O[h];if(U.length>1)for(m=0;m<U.length;m++)I=U[m],I.indexOf("trace-")===0?(N=I.split("trace-")[1],this.traceHash[N]&&(this.traceHash[N].below=null)):I.indexOf("layout-")===0&&(N=I.split("layout-")[1],this.layerList[N]&&(this.layerList[N].below=null))}};var _={choroplethmap:0,densitymap:1,scattermap:2};l.updateData=function(y){var b=this.traceHash,p,u,m,h,P=y.slice().sort(function(O,I){return _[O[0].trace.type]-_[I[0].trace.type]});for(m=0;m<P.length;m++){var L=P[m];u=L[0].trace,p=b[u.uid];var z=!1;p&&(p.type===u.type?(p.update(L),z=!0):p.dispose()),!z&&u._module&&(b[u.uid]=u._module.plot(this,L))}var F=Object.keys(b);e:for(m=0;m<F.length;m++){var B=F[m];for(h=0;h<y.length;h++)if(u=y[h][0].trace,B===u.uid)continue e;p=b[B],p.dispose(),delete b[B]}},l.updateLayout=function(y){var b=this.map,p=y[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(E(p.center)),b.setZoom(p.zoom),b.setBearing(p.bearing),b.setPitch(p.pitch)),this.updateLayers(y),this.updateFramework(y),this.updateFx(y),this.map.resize(),this.gd._context._scrollZoom.map?b.scrollZoom.enable():b.scrollZoom.disable()},l.resolveOnRender=function(y){var b=this.map;b.on("render",function p(){b.loaded()&&(b.off("render",p),setTimeout(y,10))})},l.rejectOnError=function(y){var b=this.map;function p(){y(new Error(g.mapOnErrorMsg))}b.once("error",p),b.once("style.error",p),b.once("source.error",p),b.once("tile.error",p),b.once("layer.error",p)},l.createFramework=function(y){var b=this,p=b.div=document.createElement("div");p.id=b.uid,p.style.position="absolute",b.container.appendChild(p),b.xaxis={_id:"x",c2p:function(u){return b.project(u).x}},b.yaxis={_id:"y",c2p:function(u){return b.project(u).y}},b.updateFramework(y),b.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(b.mockAxis,y)},l.initFx=function(y,b){var p=this,u=p.gd,m=p.map;m.on("moveend",function(L){if(p.map){var z=u._fullLayout;if(L.originalEvent||p.wheeling){var F=z[p.id];M.call("_storeDirectGUIEdit",u.layout,z._preGUI,p.getViewEdits(F));var B=p.getView();F._input.center=F.center=B.center,F._input.zoom=F.zoom=B.zoom,F._input.bearing=F.bearing=B.bearing,F._input.pitch=F.pitch=B.pitch,u.emit("plotly_relayout",p.getViewEditsWithDerived(B))}L.originalEvent&&L.originalEvent.type==="mouseup"?p.dragging=!1:p.wheeling&&(p.wheeling=!1),z&&z._rehover&&z._rehover()}}),m.on("wheel",function(){p.wheeling=!0}),m.on("mousemove",function(L){var z=p.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},p.xaxis.p2c=function(){return m.unproject(F).lng},p.yaxis.p2c=function(){return m.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===p.id&&u._fullLayout[p.id]&&r.hover(u,L,p.id)},r.hover(u,L,p.id),u._fullLayout._hoversubplot=p.id});function h(){r.loneUnhover(b._hoverlayer)}m.on("dragstart",function(){p.dragging=!0,h()}),m.on("zoomstart",h),m.on("mouseout",function(){u._fullLayout._hoversubplot=null});function P(){var L=p.getView();u.emit("plotly_relayouting",p.getViewEditsWithDerived(L))}m.on("drag",P),m.on("zoom",P),m.on("dblclick",function(){var L=u._fullLayout[p.id];M.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,p.getViewEdits(L));var z=p.viewInitial;m.setCenter(E(z.center)),m.setZoom(z.zoom),m.setBearing(z.bearing),m.setPitch(z.pitch);var F=p.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",p.getViewEditsWithDerived(F))}),p.clearOutline=function(){c(p.dragOptions),s(p.dragOptions.gd)},p.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&f(z.originalEvent,u,[p.xaxis],[p.yaxis],p.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(y){var b=this,p=b.map,u=b.gd;if(b.isStatic)return;function m(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var h=y.dragmode,P;P=function(z,F){if(F.isRect){var B=z.range={};B[b.id]=[m([F.xmin,F.ymin]),m([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[b.id]=F.map(m)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:y.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:y[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:P},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),p.off("click",b.onClickInPanHandler),i(h)||a(h)?(p.dragPan.disable(),p.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,B){n(z,F,B,b.dragOptions,h)},t.init(b.dragOptions)):(p.dragPan.enable(),p.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),p.on("click",b.onClickInPanHandler))},l.updateFramework=function(y){var b=y[this.id].domain,p=y._size,u=this.div.style;u.width=p.w*(b.x[1]-b.x[0])+"px",u.height=p.h*(b.y[1]-b.y[0])+"px",u.left=p.l+b.x[0]*p.w+"px",u.top=p.t+(1-b.y[1])*p.h+"px",this.xaxis._offset=p.l+b.x[0]*p.w,this.xaxis._length=p.w*(b.x[1]-b.x[0]),this.yaxis._offset=p.t+(1-b.y[1])*p.h,this.yaxis._length=p.h*(b.y[1]-b.y[0])},l.updateLayers=function(y){var b=y[this.id],p=b.layers,u=this.layerList,m;if(p.length!==u.length){for(m=0;m<u.length;m++)u[m].dispose();for(u=this.layerList=[],m=0;m<p.length;m++)u.push(v(this,m,p[m]))}else for(m=0;m<p.length;m++)u[m].update(p[m])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(y,b,p){for(var u in p)this.map[b](y,u,p[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(y,b){var p=this.map;if(typeof b=="string"){if(b===""){p.addLayer(y,b);return}for(var u=this.getMapLayers(),m=0;m<u.length;m++)if(b===u[m].id){p.addLayer(y,b);return}x.warn(["Trying to add layer with *below* value",b,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}p.addLayer(y)},l.project=function(y){return this.map.project(new d.LngLat(y[0],y[1]))},l.getView=function(){var y=this.map,b=y.getCenter(),p=b.lng,u=b.lat,m={lon:p,lat:u},h=y.getCanvas(),P=parseInt(h.style.width),L=parseInt(h.style.height);return{center:m,zoom:y.getZoom(),bearing:y.getBearing(),pitch:y.getPitch(),_derived:{coordinates:[y.unproject([0,0]).toArray(),y.unproject([P,0]).toArray(),y.unproject([P,L]).toArray(),y.unproject([0,L]).toArray()]}}},l.getViewEdits=function(y){for(var b=this.id,p=["center","zoom","bearing","pitch"],u={},m=0;m<p.length;m++){var h=p[m];u[b+"."+h]=y[h]}return u},l.getViewEditsWithDerived=function(y){var b=this.id,p=this.getViewEdits(y);return p[b+"._derived"]=y._derived,p};function w(y){var b={};return x.isPlainObject(y)?(b.id=y.id,b.style=y):typeof y=="string"?(b.id=y,g.stylesMap[y]?b.style=g.stylesMap[y]:b.style=y):(b.id=g.styleValueDflt,b.style=S(g.styleValueDflt)),b.transition={duration:0,delay:0},b}function S(y){return g.styleUrlPrefix+y+"-"+g.styleUrlSuffix}function E(y){return[y.lon,y.lat]}q.exports=T}}),VV=Ze({"src/plots/map/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=i0(),A=fp(),M=Ex();q.exports=function(o,a,i){x(o,a,i,{type:"map",attributes:M,handleDefaults:e,partition:"y"})};function e(r,o,a){a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var i=a("bounds.west"),n=a("bounds.east"),s=a("bounds.south"),c=a("bounds.north");(i===void 0||n===void 0||s===void 0||c===void 0)&&delete o.bounds,A(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(g,v){return d.coerce(r,o,M.layers,g,v)}var i=a("visible");if(i){var n=a("sourcetype"),s=n==="raster"||n==="image";a("source"),a("sourceattribution"),n==="vector"&&a("sourcelayer"),n==="image"&&a("coordinates");var c;s&&(c="raster");var f=a("type",c);s&&f!=="raster"&&(f=o.type="raster",d.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),f==="circle"&&a("circle.radius"),f==="line"&&(a("line.width"),a("line.dash")),f==="fill"&&a("fill.outlinecolor"),f==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),d.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),kT=Ze({"src/plots/map/index.js"(Z){"use strict";var q=ca(),d=q.strTranslate,x=q.strScale,A=Hh().getSubplotCalcData,M=vd(),e=On(),t=as(),r=fu(),o=qV(),a="map";Z.name=a,Z.attr="subplot",Z.idRoot=a,Z.idRegex=Z.attrRegex=q.counterRegex(a),Z.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Z.layoutAttributes=Ex(),Z.supplyLayoutDefaults=VV(),Z.plot=function(n){for(var s=n._fullLayout,c=n.calcdata,f=s._subplots[a],g=0;g<f.length;g++){var v=f[g],T=A(c,a,v),l=s[v],_=l._subplot;_||(_=new o(n,v),s[v]._subplot=_),_.viewInitial||(_.viewInitial={center:q.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),_.plot(T,s,n._promises)}},Z.clean=function(i,n,s,c){for(var f=c._subplots[a]||[],g=0;g<f.length;g++){var v=f[g];!n[v]&&c[v]._subplot&&c[v]._subplot.destroy()}},Z.toSVG=function(i){for(var n=i._fullLayout,s=n._subplots[a],c=n._size,f=0;f<s.length;f++){var g=n[s[f]],v=g.domain,T=g._subplot,l=T.toImage("png"),_=n._glimages.append("svg:image");_.attr({xmlns:M.svg,"xlink:href":l,x:c.l+c.w*v.x[0],y:c.t+c.h*(1-v.y[1]),width:c.w*(v.x[1]-v.x[0]),height:c.h*(v.y[1]-v.y[0]),preserveAspectRatio:"none"});var w=e.select(g._subplot.div),S=w.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),E=n._glimages.append("g"),y=E.append("text");y.text(S).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":S});var b=t.bBox(y.node()),p=c.w*(v.x[1]-v.x[0]);if(b.width>p/2){var u=S.split("|").join("<br>");y.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),b=t.bBox(y.node())}y.attr("transform",d(-3,-b.height+8)),E.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 h=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];E.attr("transform",d(h[0],h[1])+x(m))}},Z.updateFx=function(i){for(var n=i._fullLayout,s=n._subplots[a],c=0;c<s.length;c++){var f=n[s[c]]._subplot;f.updateFx(n)}}}}),GV=Ze({"src/traces/scattermap/index.js"(Z,q){"use strict";q.exports={attributes:ET(),supplyDefaults:zV(),colorbar:hp(),formatLabels:I6(),calc:iT(),plot:OV(),hoverPoints:CT().hoverPoints,eventData:BV(),selectPoints:NV(),styleOnSelect:function(d,x){if(x){var A=x[0].trace;A._glTrace.update(x)}},moduleType:"trace",name:"scattermap",basePlotModule:kT(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),HV=Ze({"lib/scattermap.js"(Z,q){"use strict";q.exports=GV()}}),D6=Ze({"src/traces/choroplethmap/attributes.js"(Z,q){"use strict";var d=C1(),x=Mu(),A=Cs().hovertemplateAttrs,M=eu(),e=rs().extendFlat;q.exports=e({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:e({},d.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d.text,hovertext:d.hovertext,marker:{line:{color:e({},d.marker.line.color,{editType:"plot"}),width:e({},d.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:e({},d.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:e({},d.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:e({},d.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d.hoverinfo,hovertemplate:A({},{keys:["properties"]}),showlegend:e({},M.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),WV=Ze({"src/traces/choroplethmap/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=D6();q.exports=function(e,t,r,o){function a(f,g){return d.coerce(e,t,A,f,g)}var i=a("locations"),n=a("z"),s=a("geojson");if(!d.isArrayOrTypedArray(i)||!i.length||!d.isArrayOrTypedArray(n)||!n.length||!(typeof s=="string"&&s!==""||d.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(i.length,n.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var c=a("marker.line.width");c&&a("marker.line.color"),a("marker.opacity"),x(e,t,o,a,{prefix:"",cLetter:"z"}),d.coerceSelectionMarkerOpacity(t,a)}}}),z6=Ze({"src/traces/choroplethmap/convert.js"(Z,q){"use strict";var d=ns(),x=ca(),A=rc(),M=as(),e=d0().makeBlank,t=v0();function r(a){var i=a[0].trace,n=i.visible===!0&&i._length!==0,s={layout:{visibility:"none"},paint:{}},c={layout:{visibility:"none"},paint:{}},f=i._opts={fill:s,line:c,geojson:e()};if(!n)return f;var g=t.extractTraceFeature(a);if(!g)return f;var v=A.makeColorScaleFuncFromTrace(i),T=i.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(m){var h=m.mo;return d(h)?+x.constrain(h,0,1):0});var w;x.isArrayOrTypedArray(l.color)&&(w=function(m){return m.mlc});var S;x.isArrayOrTypedArray(l.width)&&(S=function(m){return m.mlw});for(var E=0;E<a.length;E++){var y=a[E],b=y.fOut;if(b){var p=b.properties;p.fc=v(y.z),_&&(p.mo=_(y)),w&&(p.mlc=w(y)),S&&(p.mlw=S(y)),y.ct=p.ct,y._polygons=t.feature2polygons(b)}}var u=_?{type:"identity",property:"mo"}:T.opacity;return x.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),x.extendFlat(c.paint,{"line-color":w?{type:"identity",property:"mlc"}:l.color,"line-width":S?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",c.layout.visibility="visible",f.geojson={type:"FeatureCollection",features:g},o(a),f}function o(a){var i=a[0].trace,n=i._opts,s;if(i.selectedpoints){for(var c=M.makeSelectedPointStyleFns(i),f=0;f<a.length;f++){var g=a[f];g.fOut&&(g.fOut.properties.mo2=c.selectedOpacityFn(g))}s={type:"identity",property:"mo2"}}else s=x.isArrayOrTypedArray(i.marker.opacity)?{type:"identity",property:"mo"}:i.marker.opacity;return x.extendFlat(n.fill.paint,{"fill-opacity":s}),x.extendFlat(n.line.paint,{"line-opacity":s}),n}q.exports={convert:r,convertOnSelect:o}}}),XV=Ze({"src/traces/choroplethmap/plot.js"(Z,q){"use strict";var d=z6().convert,x=z6().convertOnSelect,A=_0().traceLayerPrefix;function M(t,r){this.type="choroplethmap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",A+r+"-fill"],["line",A+r+"-line"]],this.below=null}var e=M.prototype;e.update=function(t){this._update(d(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(x(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var i=0;i<o.length;i++){var n=o[i],s=n[0],c=n[1],f=t[s];r.setOptions(c,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&r.setOptions(c,"setPaintProperty",f.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,i=this.sourceId,n=0;n<a.length;n++){var s=a[n],c=s[0],f=t[c];o.addLayer({type:c,id:s[1],source:i,layout:f.layout,paint:f.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},q.exports=function(r,o){var a=o[0].trace,i=new M(r,a.uid),n=i.sourceId,s=d(o),c=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,c),o[0].trace._glTrace=i,i}}}),ZV=Ze({"src/traces/choroplethmap/index.js"(Z,q){"use strict";q.exports={attributes:D6(),supplyDefaults:WV(),colorbar:a0(),calc:lT(),plot:XV(),hoverPoints:cT(),eventData:fT(),selectPoints:hT(),styleOnSelect:function(d,x){if(x){var A=x[0].trace;A._glTrace.updateOnSelect(x)}},getBelow:function(d,x){for(var A=x.getMapLayers(),M=A.length-2;M>=0;M--){var e=A[M].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=M+1;t<A.length;t++)if(e=A[t].id,typeof e=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmap",basePlotModule:kT(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),YV=Ze({"lib/choroplethmap.js"(Z,q){"use strict";q.exports=ZV()}}),F6=Ze({"src/traces/densitymap/attributes.js"(Z,q){"use strict";var d=Mu(),x=Cs().hovertemplateAttrs,A=eu(),M=ET(),e=rs().extendFlat;q.exports=e({lon:M.lon,lat:M.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:M.text,hovertext:M.hovertext,hoverinfo:e({},A.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:x(),showlegend:e({},A.showlegend,{dflt:!1})},d("",{cLetter:"z",editTypeOverride:"calc"}))}}),KV=Ze({"src/traces/densitymap/defaults.js"(Z,q){"use strict";var d=ca(),x=gh(),A=F6();q.exports=function(e,t,r,o){function a(c,f){return d.coerce(e,t,A,c,f)}var i=a("lon")||[],n=a("lat")||[],s=Math.min(i.length,n.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),x(e,t,o,a,{prefix:"",cLetter:"z"})}}}),JV=Ze({"src/traces/densitymap/calc.js"(Z,q){"use strict";var d=ns(),x=ca().isArrayOrTypedArray,A=qs().BADNUM,M=wp(),e=ca()._;q.exports=function(r,o){for(var a=o._length,i=new Array(a),n=o.z,s=x(n)&&n.length,c=0;c<a;c++){var f=i[c]={},g=o.lon[c],v=o.lat[c];if(f.lonlat=d(g)&&d(v)?[+g,+v]:[A,A],s){var T=n[c];f.z=d(T)?T:A}}return M(r,o,{vals:s?n:[0,1],containerStr:"",cLetter:"z"}),a&&(i[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),i}}}),$V=Ze({"src/traces/densitymap/convert.js"(Z,q){"use strict";var d=ns(),x=ca(),A=Yn(),M=rc(),e=qs().BADNUM,t=d0().makeBlank;q.exports=function(o){var a=o[0].trace,i=a.visible===!0&&a._length!==0,n={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:n,geojson:t()};if(!i)return s;var c=[],f,g=a.z,v=a.radius,T=x.isArrayOrTypedArray(g)&&g.length,l=x.isArrayOrTypedArray(v);for(f=0;f<o.length;f++){var _=o[f],w=_.lonlat;if(w[0]!==e){var S={};if(T){var E=_.z;S.z=E!==e?E:0}l&&(S.r=d(v[f])&&v[f]>0?+v[f]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:S})}}var y=M.extractOpts(a),b=y.reversescale?M.flipScale(y.colorscale):y.colorscale,p=b[0][1],u=A.opacity(p)<1?p:A.addOpacity(p,0),m=["interpolate",["linear"],["heatmap-density"],0,u];for(f=1;f<b.length;f++)m.push(b[f][0],b[f][1]);var h=["interpolate",["linear"],["get","z"],y.min,0,y.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?h:1/(y.max-y.min),"heatmap-color":m,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:c},s.heatmap.layout.visibility="visible",s}}}),QV=Ze({"src/traces/densitymap/plot.js"(Z,q){"use strict";var d=$V(),x=_0().traceLayerPrefix;function A(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",x+t+"-heatmap"]],this.below=null}var M=A.prototype;M.update=function(e){var t=this.subplot,r=this.layerList,o=d(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var i=0;i<r.length;i++){var n=r[i],s=n[0],c=n[1],f=o[s];t.setOptions(c,"setLayoutProperty",f.layout),f.layout.visibility==="visible"&&t.setOptions(c,"setPaintProperty",f.paint)}},M._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,i=0;i<o.length;i++){var n=o[i],s=n[0],c=e[s];r.addLayer({type:s,id:n[1],source:a,layout:c.layout,paint:c.paint},t)}},M._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},M.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},q.exports=function(t,r){var o=r[0].trace,a=new A(t,o.uid),i=a.sourceId,n=d(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),eG=Ze({"src/traces/densitymap/hover.js"(Z,q){"use strict";var d=Wo(),x=CT().hoverPoints,A=CT().getExtraText;q.exports=function(e,t,r){var o=x(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var c=a.subplot.mockAxis;a.z=s.z,a.zLabel=d.tickText(c,c.c2l(s.z),"hover").text}return a.extraText=A(n,s,i[0].t.labels),[a]}}}}),tG=Ze({"src/traces/densitymap/event_data.js"(Z,q){"use strict";q.exports=function(x,A){return x.lon=A.lon,x.lat=A.lat,x.z=A.z,x}}}),rG=Ze({"src/traces/densitymap/index.js"(Z,q){"use strict";q.exports={attributes:F6(),supplyDefaults:KV(),colorbar:a0(),formatLabels:I6(),calc:JV(),plot:QV(),hoverPoints:eG(),eventData:tG(),getBelow:function(d,x){for(var A=x.getMapLayers(),M=0;M<A.length;M++){var e=A[M],t=e.id;if(e.type==="symbol"&&typeof t=="string"&&t.indexOf("plotly-")===-1)return t}},moduleType:"trace",name:"densitymap",basePlotModule:kT(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),aG=Ze({"lib/densitymap.js"(Z,q){"use strict";q.exports=rG()}}),O6=Ze({"src/traces/sankey/attributes.js"(Z,q){"use strict";var d=tc(),x=eu(),A=oh(),M=Ky(),e=bc().attributes,t=Cs().hovertemplateAttrs,r=Mu(),o=Dl().templatedArray,a=Qc().descriptionOnlyNumbers,i=rs().extendFlat,n=pc().overrideAll,s=q.exports=n({hoverinfo:i({},x.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:M.hoverlabel,domain:e({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:a("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:d({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:A.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:M.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:A.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:M.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),colorscales:o("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:i(r().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),iG=Ze({"src/traces/sankey/defaults.js"(Z,q){"use strict";var d=ca(),x=O6(),A=Yn(),M=Ch(),e=bc().defaults,t=E_(),r=Dl(),o=fp();q.exports=function(n,s,c,f){function g(L,z){return d.coerce(n,s,x,L,z)}var v=d.extendDeep(f.hoverlabel,n.hoverlabel),T=n.node,l=r.newContainer(s,"node");function _(L,z){return d.coerce(T,l,x.node,L,z)}_("label"),_("groups"),_("x"),_("y"),_("pad"),_("thickness"),_("line.color"),_("line.width"),_("hoverinfo",n.hoverinfo),t(T,l,_,v),_("hovertemplate"),_("align");var w=f.colorway,S=function(L){return w[L%w.length]};_("color",l.label.map(function(L,z){return A.addOpacity(S(z),.8)})),_("customdata");var E=n.link||{},y=r.newContainer(s,"link");function b(L,z){return d.coerce(E,y,x.link,L,z)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",n.hoverinfo),t(E,y,b,v),b("hovertemplate");var p=M(f.paper_bgcolor).getLuminance()<.333,u=p?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",m=b("color",u);function h(L){var z=M(L);if(!z.isValid())return L;var F=z.getAlpha();return F<=.8?z.setAlpha(F+.2):z=p?z.brighten():z.darken(),z.toRgbString()}b("hovercolor",Array.isArray(m)?m.map(h):h(m)),b("customdata"),o(E,y,{name:"colorscales",handleItemDefaults:a}),e(s,f,g),g("orientation"),g("valueformat"),g("valuesuffix");var P;l.x.length&&l.y.length&&(P="freeform"),g("arrangement",P),d.coerceFont(g,"textfont",f.font,{autoShadowDflt:!0}),s._length=null};function a(i,n){function s(c,f){return d.coerce(i,n,x.link.colorscales,c,f)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}}),B6=Ze({"node_modules/strongly-connected-components/scc.js"(Z,q){"use strict";q.exports=d;function d(x){for(var A=x.length,M=new Array(A),e=new Array(A),t=new Array(A),r=new Array(A),o=new Array(A),a=new Array(A),i=0;i<A;++i)M[i]=-1,e[i]=0,t[i]=!1,r[i]=0,o[i]=-1,a[i]=[];var n=0,s=[],c=[];function f(l){var _=[l],w=[l];for(M[l]=e[l]=n,t[l]=!0,n+=1;w.length>0;){l=w[w.length-1];var S=x[l];if(r[l]<S.length){for(var E=r[l];E<S.length;++E){var y=S[E];if(M[y]<0){M[y]=e[y]=n,t[y]=!0,n+=1,_.push(y),w.push(y);break}else t[y]&&(e[l]=Math.min(e[l],e[y])|0);o[y]>=0&&a[l].push(o[y])}r[l]=E}else{if(e[l]===M[l]){for(var b=[],p=[],u=0,E=_.length-1;E>=0;--E){var m=_[E];if(t[m]=!1,b.push(m),p.push(a[m]),u+=a[m].length,o[m]=s.length,m===l){_.length=E;break}}s.push(b);for(var h=new Array(u),E=0;E<p.length;E++)for(var P=0;P<p[E].length;P++)h[--u]=p[E][P];c.push(h)}w.pop()}}}for(var i=0;i<A;++i)M[i]<0&&f(i);for(var g,i=0;i<c.length;i++){var v=c[i];if(v.length!==0){v.sort(function(_,w){return _-w}),g=[v[0]];for(var T=1;T<v.length;T++)v[T]!==v[T-1]&&g.push(v[T]);c[i]=g}}return{components:s,adjacencyList:c}}}}),nG=Ze({"src/traces/sankey/calc.js"(Z,q){"use strict";var d=B6(),x=ca(),A=Cv().wrap,M=x.isArrayOrTypedArray,e=x.isIndex,t=rc();function r(a){var i=a.node,n=a.link,s=[],c=M(n.color),f=M(n.hovercolor),g=M(n.customdata),v={},T={},l=n.colorscales.length,_;for(_=0;_<l;_++){var w=n.colorscales[_],S=t.extractScale(w,{cLetter:"c"}),E=t.makeColorScaleFunc(S);T[w.label]=E}var y=0;for(_=0;_<n.value.length;_++)n.source[_]>y&&(y=n.source[_]),n.target[_]>y&&(y=n.target[_]);var b=y+1;a.node._count=b;var p,u=a.node.groups,m={};for(_=0;_<u.length;_++){var h=u[_];for(p=0;p<h.length;p++){var P=h[p],L=b+_;m.hasOwnProperty(P)?x.warn("Node "+P+" is already part of a group."):m[P]=L}}var z={source:[],target:[]};for(_=0;_<n.value.length;_++){var F=n.value[_],B=n.source[_],O=n.target[_];if(F>0&&e(B,b)&&e(O,b)&&!(m.hasOwnProperty(B)&&m.hasOwnProperty(O)&&m[B]===m[O])){m.hasOwnProperty(O)&&(O=m[O]),m.hasOwnProperty(B)&&(B=m[B]),B=+B,O=+O,v[B]=v[O]=!0;var I="";n.label&&n.label[_]&&(I=n.label[_]);var N=null;I&&T.hasOwnProperty(I)&&(N=T[I]),s.push({pointNumber:_,label:I,color:c?n.color[_]:n.color,hovercolor:f?n.hovercolor[_]:n.hovercolor,customdata:g?n.customdata[_]:n.customdata,concentrationscale:N,source:B,target:O,value:+F}),z.source.push(B),z.target.push(O)}}var U=b+u.length,W=M(i.color),Q=M(i.customdata),ue=[];for(_=0;_<U;_++)if(v[_]){var le=i.label[_];ue.push({group:_>b-1,childrenNodes:[],pointNumber:_,label:le,color:W?i.color[_]:i.color,customdata:Q?i.customdata[_]:i.customdata})}var he=!1;return o(U,z.source,z.target)&&(he=!0),{circular:he,links:s,nodes:ue,groups:u,groupLookup:m}}function o(a,i,n){for(var s=x.init2dArray(a,0),c=0;c<Math.min(i.length,n.length);c++)if(x.isIndex(i[c],a)&&x.isIndex(n[c],a)){if(i[c]===n[c])return!0;s[i[c]].push(n[c])}var f=d(s);return f.components.some(function(g){return g.length>1})}q.exports=function(i,n){var s=r(n);return A({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),oG=Ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";function x(b){var p=+this._x.call(null,b),u=+this._y.call(null,b);return A(this.cover(p,u),p,u,b)}function A(b,p,u,m){if(isNaN(p)||isNaN(u))return b;var h,P=b._root,L={data:m},z=b._x0,F=b._y0,B=b._x1,O=b._y1,I,N,U,W,Q,ue,le,he;if(!P)return b._root=L,b;for(;P.length;)if((Q=p>=(I=(z+B)/2))?z=I:B=I,(ue=u>=(N=(F+O)/2))?F=N:O=N,h=P,!(P=P[le=ue<<1|Q]))return h[le]=L,b;if(U=+b._x.call(null,P.data),W=+b._y.call(null,P.data),p===U&&u===W)return L.next=P,h?h[le]=L:b._root=L,b;do h=h?h[le]=new Array(4):b._root=new Array(4),(Q=p>=(I=(z+B)/2))?z=I:B=I,(ue=u>=(N=(F+O)/2))?F=N:O=N;while((le=ue<<1|Q)===(he=(W>=N)<<1|U>=I));return h[he]=P,h[le]=L,b}function M(b){var p,u,m=b.length,h,P,L=new Array(m),z=new Array(m),F=1/0,B=1/0,O=-1/0,I=-1/0;for(u=0;u<m;++u)isNaN(h=+this._x.call(null,p=b[u]))||isNaN(P=+this._y.call(null,p))||(L[u]=h,z[u]=P,h<F&&(F=h),h>O&&(O=h),P<B&&(B=P),P>I&&(I=P));if(F>O||B>I)return this;for(this.cover(F,B).cover(O,I),u=0;u<m;++u)A(this,L[u],z[u],b[u]);return this}function e(b,p){if(isNaN(b=+b)||isNaN(p=+p))return this;var u=this._x0,m=this._y0,h=this._x1,P=this._y1;if(isNaN(u))h=(u=Math.floor(b))+1,P=(m=Math.floor(p))+1;else{for(var L=h-u,z=this._root,F,B;u>b||b>=h||m>p||p>=P;)switch(B=(p<m)<<1|b<u,F=new Array(4),F[B]=z,z=F,L*=2,B){case 0:h=u+L,P=m+L;break;case 1:u=h-L,P=m+L;break;case 2:h=u+L,m=P-L;break;case 3:u=h-L,m=P-L;break}this._root&&this._root.length&&(this._root=z)}return this._x0=u,this._y0=m,this._x1=h,this._y1=P,this}function t(){var b=[];return this.visit(function(p){if(!p.length)do b.push(p.data);while(p=p.next)}),b}function r(b){return arguments.length?this.cover(+b[0][0],+b[0][1]).cover(+b[1][0],+b[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function o(b,p,u,m,h){this.node=b,this.x0=p,this.y0=u,this.x1=m,this.y1=h}function a(b,p,u){var m,h=this._x0,P=this._y0,L,z,F,B,O=this._x1,I=this._y1,N=[],U=this._root,W,Q;for(U&&N.push(new o(U,h,P,O,I)),u==null?u=1/0:(h=b-u,P=p-u,O=b+u,I=p+u,u*=u);W=N.pop();)if(!(!(U=W.node)||(L=W.x0)>O||(z=W.y0)>I||(F=W.x1)<h||(B=W.y1)<P))if(U.length){var ue=(L+F)/2,le=(z+B)/2;N.push(new o(U[3],ue,le,F,B),new o(U[2],L,le,ue,B),new o(U[1],ue,z,F,le),new o(U[0],L,z,ue,le)),(Q=(p>=le)<<1|b>=ue)&&(W=N[N.length-1],N[N.length-1]=N[N.length-1-Q],N[N.length-1-Q]=W)}else{var he=b-+this._x.call(null,U.data),G=p-+this._y.call(null,U.data),$=he*he+G*G;if($<u){var J=Math.sqrt(u=$);h=b-J,P=p-J,O=b+J,I=p+J,m=U.data}}return m}function i(b){if(isNaN(O=+this._x.call(null,b))||isNaN(I=+this._y.call(null,b)))return this;var p,u=this._root,m,h,P,L=this._x0,z=this._y0,F=this._x1,B=this._y1,O,I,N,U,W,Q,ue,le;if(!u)return this;if(u.length)for(;;){if((W=O>=(N=(L+F)/2))?L=N:F=N,(Q=I>=(U=(z+B)/2))?z=U:B=U,p=u,!(u=u[ue=Q<<1|W]))return this;if(!u.length)break;(p[ue+1&3]||p[ue+2&3]||p[ue+3&3])&&(m=p,le=ue)}for(;u.data!==b;)if(h=u,!(u=u.next))return this;return(P=u.next)&&delete u.next,h?(P?h.next=P:delete h.next,this):p?(P?p[ue]=P:delete p[ue],(u=p[0]||p[1]||p[2]||p[3])&&u===(p[3]||p[2]||p[1]||p[0])&&!u.length&&(m?m[le]=u:this._root=u),this):(this._root=P,this)}function n(b){for(var p=0,u=b.length;p<u;++p)this.remove(b[p]);return this}function s(){return this._root}function c(){var b=0;return this.visit(function(p){if(!p.length)do++b;while(p=p.next)}),b}function f(b){var p=[],u,m=this._root,h,P,L,z,F;for(m&&p.push(new o(m,this._x0,this._y0,this._x1,this._y1));u=p.pop();)if(!b(m=u.node,P=u.x0,L=u.y0,z=u.x1,F=u.y1)&&m.length){var B=(P+z)/2,O=(L+F)/2;(h=m[3])&&p.push(new o(h,B,O,z,F)),(h=m[2])&&p.push(new o(h,P,O,B,F)),(h=m[1])&&p.push(new o(h,B,L,z,O)),(h=m[0])&&p.push(new o(h,P,L,B,O))}return this}function g(b){var p=[],u=[],m;for(this._root&&p.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));m=p.pop();){var h=m.node;if(h.length){var P,L=m.x0,z=m.y0,F=m.x1,B=m.y1,O=(L+F)/2,I=(z+B)/2;(P=h[0])&&p.push(new o(P,L,z,O,I)),(P=h[1])&&p.push(new o(P,O,z,F,I)),(P=h[2])&&p.push(new o(P,L,I,O,B)),(P=h[3])&&p.push(new o(P,O,I,F,B))}u.push(m)}for(;m=u.pop();)b(m.node,m.x0,m.y0,m.x1,m.y1);return this}function v(b){return b[0]}function T(b){return arguments.length?(this._x=b,this):this._x}function l(b){return b[1]}function _(b){return arguments.length?(this._y=b,this):this._y}function w(b,p,u){var m=new S(p??v,u??l,NaN,NaN,NaN,NaN);return b==null?m:m.addAll(b)}function S(b,p,u,m,h,P){this._x=b,this._y=p,this._x0=u,this._y0=m,this._x1=h,this._y1=P,this._root=void 0}function E(b){for(var p={data:b.data},u=p;b=b.next;)u=u.next={data:b.data};return p}var y=w.prototype=S.prototype;y.copy=function(){var b=new S(this._x,this._y,this._x0,this._y0,this._x1,this._y1),p=this._root,u,m;if(!p)return b;if(!p.length)return b._root=E(p),b;for(u=[{source:p,target:b._root=new Array(4)}];p=u.pop();)for(var h=0;h<4;++h)(m=p.source[h])&&(m.length?u.push({source:m,target:p.target[h]=new Array(4)}):p.target[h]=E(m));return b},y.add=x,y.addAll=M,y.cover=e,y.data=t,y.extent=r,y.find=a,y.remove=i,y.removeAll=n,y.root=s,y.size=c,y.visit=f,y.visitAfter=g,y.x=T,y.y=_,d.quadtree=w,Object.defineProperty(d,"__esModule",{value:!0})})}}),LT=Ze({"node_modules/d3-collection/dist/d3-collection.js"(Z,q){(function(d,x){x(typeof Z=="object"&&typeof q<"u"?Z:d.d3=d.d3||{})})(Z,function(d){"use strict";var x="$";function A(){}A.prototype=M.prototype={constructor:A,has:function(v){return x+v in this},get:function(v){return this[x+v]},set:function(v,T){return this[x+v]=T,this},remove:function(v){var T=x+v;return T in this&&delete this[T]},clear:function(){for(var v in this)v[0]===x&&delete this[v]},keys:function(){var v=[];for(var T in this)T[0]===x&&v.push(T.slice(1));return v},values:function(){var v=[];for(var T in this)T[0]===x&&v.push(this[T]);return v},entries:function(){var v=[];for(var T in this)T[0]===x&&v.push({key:T.slice(1),value:this[T]});return v},size:function(){var v=0;for(var T in this)T[0]===x&&++v;return v},empty:function(){for(var v in this)if(v[0]===x)return!1;return!0},each:function(v){for(var T in this)T[0]===x&&v(this[T],T.slice(1),this)}};function M(v,T){var l=new A;if(v instanceof A)v.each(function(y,b){l.set(b,y)});else if(Array.isArray(v)){var _=-1,w=v.length,S;if(T==null)for(;++_<w;)l.set(_,v[_]);else for(;++_<w;)l.set(T(S=v[_],_,v),S)}else if(v)for(var E in v)l.set(E,v[E]);return l}function e(){var v=[],T=[],l,_,w;function S(y,b,p,u){if(b>=v.length)return l!=null&&y.sort(l),_!=null?_(y):y;for(var m=-1,h=y.length,P=v[b++],L,z,F=M(),B,O=p();++m<h;)(B=F.get(L=P(z=y[m])+""))?B.push(z):F.set(L,[z]);return F.each(function(I,N){u(O,N,S(I,b,p,u))}),O}function E(y,b){if(++b>v.length)return y;var p,u=T[b-1];return _!=null&&b>=v.length?p=y.entries():(p=[],y.each(function(m,h){p.push({key:h,values:E(m,b)})})),u!=null?p.sort(function(m,h){return u(m.key,h.key)}):p}return w={object:function(y){return S(y,0,t,r)},map:function(y){return S(y,0,o,a)},entries:function(y){return E(S(y,0,o,a),0)},key:function(y){return v.push(y),w},sortKeys:function(y){return T[v.length-1]=y,w},sortValues:function(y){return l=y,w},rollup:function(y){return _=y,w}}}function t(){return{}}function r(v,T,l){v[T]=l}function o(){return M()}function a(v,T,l){v.set(T,l)}function i(){}var n=M.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(v){return v+="",this[x+v]=v,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(v,T){var l=new i;if(v instanceof i)v.each(function(S){l.add(S)});else if(v){var _=-1,w=v.length;if(T==null)for(;++_<w;)l.add(v[_]);else for(;++_<w;)l.add(T(v[_],_,v))}return l}function c(v){var T=[];for(var l in v)T.push(l);return T}function f(v){var T=[];for(var l in v)T.push(v[l]);return T}function g(v){var T=[];for(var l in v)T.push({key:l,value:v[l]});return T}d.nest=e,d.set=s,d.map=M,d.keys=c,d.values=f,d.entries=g,Object.defineProperty(d,"__esModule",{value:!0})})}}),sG=Ze({"node_modules/d3-dispatch/dist/d3-dispatch.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x={value:function(){}};function A(){for(var o=0,a=arguments.length,i={},n;o<a;++o){if(!(n=arguments[o]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new M(i)}function M(o){this._=o}function e(o,a){return o.trim().split(/^|\s+/).map(function(i){var n="",s=i.indexOf(".");if(s>=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}M.prototype=A.prototype={constructor:M,on:function(o,a){var i=this._,n=e(o+"",i),s,c=-1,f=n.length;if(arguments.length<2){for(;++c<f;)if((s=(o=n[c]).type)&&(s=t(i[s],o.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++c<f;)if(s=(o=n[c]).type)i[s]=r(i[s],o.name,a);else if(a==null)for(s in i)i[s]=r(i[s],o.name,null);return this},copy:function(){var o={},a=this._;for(var i in a)o[i]=a[i].slice();return new M(o)},call:function(o,a){if((s=arguments.length-2)>0)for(var i=new Array(s),n=0,s,c;n<s;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(c=this._[o],n=0,s=c.length;n<s;++n)c[n].value.apply(a,i)},apply:function(o,a,i){if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(var n=this._[o],s=0,c=n.length;s<c;++s)n[s].value.apply(a,i)}};function t(o,a){for(var i=0,n=o.length,s;i<n;++i)if((s=o[i]).name===a)return s.value}function r(o,a,i){for(var n=0,s=o.length;n<s;++n)if(o[n].name===a){o[n]=x,o=o.slice(0,n).concat(o.slice(n+1));break}return i!=null&&o.push({name:a,value:i}),o}d.dispatch=A,Object.defineProperty(d,"__esModule",{value:!0})})}}),lG=Ze({"node_modules/d3-timer/dist/d3-timer.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x=0,A=0,M=0,e=1e3,t,r,o=0,a=0,i=0,n=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(b){setTimeout(b,17)};function c(){return a||(s(f),a=n.now()+i)}function f(){a=0}function g(){this._call=this._time=this._next=null}g.prototype=v.prototype={constructor:g,restart:function(b,p,u){if(typeof b!="function")throw new TypeError("callback is not a function");u=(u==null?c():+u)+(p==null?0:+p),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=b,this._time=u,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function v(b,p,u){var m=new g;return m.restart(b,p,u),m}function T(){c(),++x;for(var b=t,p;b;)(p=a-b._time)>=0&&b._call.call(null,p),b=b._next;--x}function l(){a=(o=n.now())+i,x=A=0;try{T()}finally{x=0,w(),a=0}}function _(){var b=n.now(),p=b-o;p>e&&(i-=p,o=b)}function w(){for(var b,p=t,u,m=1/0;p;)p._call?(m>p._time&&(m=p._time),b=p,p=p._next):(u=p._next,p._next=null,p=b?b._next=u:t=u);r=b,S(m)}function S(b){if(!x){A&&(A=clearTimeout(A));var p=b-a;p>24?(b<1/0&&(A=setTimeout(l,b-n.now()-i)),M&&(M=clearInterval(M))):(M||(o=n.now(),M=setInterval(_,e)),x=1,s(l))}}function E(b,p,u){var m=new g;return p=p==null?0:+p,m.restart(function(h){m.stop(),b(h+p)},p,u),m}function y(b,p,u){var m=new g,h=p;return p==null?(m.restart(b,p,u),m):(p=+p,u=u==null?c():+u,m.restart(function P(L){L+=h,m.restart(P,h+=p,u),b(L)},p,u),m)}d.interval=y,d.now=c,d.timeout=E,d.timer=v,d.timerFlush=T,Object.defineProperty(d,"__esModule",{value:!0})})}}),uG=Ze({"node_modules/d3-force/dist/d3-force.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,oG(),LT(),sG(),lG()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3,d.d3)})(Z,function(d,x,A,M,e){"use strict";function t(b,p){var u;b==null&&(b=0),p==null&&(p=0);function m(){var h,P=u.length,L,z=0,F=0;for(h=0;h<P;++h)L=u[h],z+=L.x,F+=L.y;for(z=z/P-b,F=F/P-p,h=0;h<P;++h)L=u[h],L.x-=z,L.y-=F}return m.initialize=function(h){u=h},m.x=function(h){return arguments.length?(b=+h,m):b},m.y=function(h){return arguments.length?(p=+h,m):p},m}function r(b){return function(){return b}}function o(){return(Math.random()-.5)*1e-6}function a(b){return b.x+b.vx}function i(b){return b.y+b.vy}function n(b){var p,u,m=1,h=1;typeof b!="function"&&(b=r(b==null?1:+b));function P(){for(var F,B=p.length,O,I,N,U,W,Q,ue=0;ue<h;++ue)for(O=x.quadtree(p,a,i).visitAfter(L),F=0;F<B;++F)I=p[F],W=u[I.index],Q=W*W,N=I.x+I.vx,U=I.y+I.vy,O.visit(le);function le(he,G,$,J,X){var oe=he.data,ie=he.r,j=W+ie;if(oe){if(oe.index>I.index){var ee=N-oe.x-oe.vx,re=U-oe.y-oe.vy,ce=ee*ee+re*re;ce<j*j&&(ee===0&&(ee=o(),ce+=ee*ee),re===0&&(re=o(),ce+=re*re),ce=(j-(ce=Math.sqrt(ce)))/ce*m,I.vx+=(ee*=ce)*(j=(ie*=ie)/(Q+ie)),I.vy+=(re*=ce)*j,oe.vx-=ee*(j=1-j),oe.vy-=re*j)}return}return G>N+j||J<N-j||$>U+j||X<U-j}}function L(F){if(F.data)return F.r=u[F.data.index];for(var B=F.r=0;B<4;++B)F[B]&&F[B].r>F.r&&(F.r=F[B].r)}function z(){if(p){var F,B=p.length,O;for(u=new Array(B),F=0;F<B;++F)O=p[F],u[O.index]=+b(O,F,p)}}return P.initialize=function(F){p=F,z()},P.iterations=function(F){return arguments.length?(h=+F,P):h},P.strength=function(F){return arguments.length?(m=+F,P):m},P.radius=function(F){return arguments.length?(b=typeof F=="function"?F:r(+F),z(),P):b},P}function s(b){return b.index}function c(b,p){var u=b.get(p);if(!u)throw new Error("missing: "+p);return u}function f(b){var p=s,u=O,m,h=r(30),P,L,z,F,B=1;b==null&&(b=[]);function O(Q){return 1/Math.min(z[Q.source.index],z[Q.target.index])}function I(Q){for(var ue=0,le=b.length;ue<B;++ue)for(var he=0,G,$,J,X,oe,ie,j;he<le;++he)G=b[he],$=G.source,J=G.target,X=J.x+J.vx-$.x-$.vx||o(),oe=J.y+J.vy-$.y-$.vy||o(),ie=Math.sqrt(X*X+oe*oe),ie=(ie-P[he])/ie*Q*m[he],X*=ie,oe*=ie,J.vx-=X*(j=F[he]),J.vy-=oe*j,$.vx+=X*(j=1-j),$.vy+=oe*j}function N(){if(L){var Q,ue=L.length,le=b.length,he=A.map(L,p),G;for(Q=0,z=new Array(ue);Q<le;++Q)G=b[Q],G.index=Q,typeof G.source!="object"&&(G.source=c(he,G.source)),typeof G.target!="object"&&(G.target=c(he,G.target)),z[G.source.index]=(z[G.source.index]||0)+1,z[G.target.index]=(z[G.target.index]||0)+1;for(Q=0,F=new Array(le);Q<le;++Q)G=b[Q],F[Q]=z[G.source.index]/(z[G.source.index]+z[G.target.index]);m=new Array(le),U(),P=new Array(le),W()}}function U(){if(L)for(var Q=0,ue=b.length;Q<ue;++Q)m[Q]=+u(b[Q],Q,b)}function W(){if(L)for(var Q=0,ue=b.length;Q<ue;++Q)P[Q]=+h(b[Q],Q,b)}return I.initialize=function(Q){L=Q,N()},I.links=function(Q){return arguments.length?(b=Q,N(),I):b},I.id=function(Q){return arguments.length?(p=Q,I):p},I.iterations=function(Q){return arguments.length?(B=+Q,I):B},I.strength=function(Q){return arguments.length?(u=typeof Q=="function"?Q:r(+Q),U(),I):u},I.distance=function(Q){return arguments.length?(h=typeof Q=="function"?Q:r(+Q),W(),I):h},I}function g(b){return b.x}function v(b){return b.y}var T=10,l=Math.PI*(3-Math.sqrt(5));function _(b){var p,u=1,m=.001,h=1-Math.pow(m,1/300),P=0,L=.6,z=A.map(),F=e.timer(O),B=M.dispatch("tick","end");b==null&&(b=[]);function O(){I(),B.call("tick",p),u<m&&(F.stop(),B.call("end",p))}function I(W){var Q,ue=b.length,le;W===void 0&&(W=1);for(var he=0;he<W;++he)for(u+=(P-u)*h,z.each(function(G){G(u)}),Q=0;Q<ue;++Q)le=b[Q],le.fx==null?le.x+=le.vx*=L:(le.x=le.fx,le.vx=0),le.fy==null?le.y+=le.vy*=L:(le.y=le.fy,le.vy=0);return p}function N(){for(var W=0,Q=b.length,ue;W<Q;++W){if(ue=b[W],ue.index=W,ue.fx!=null&&(ue.x=ue.fx),ue.fy!=null&&(ue.y=ue.fy),isNaN(ue.x)||isNaN(ue.y)){var le=T*Math.sqrt(W),he=W*l;ue.x=le*Math.cos(he),ue.y=le*Math.sin(he)}(isNaN(ue.vx)||isNaN(ue.vy))&&(ue.vx=ue.vy=0)}}function U(W){return W.initialize&&W.initialize(b),W}return N(),p={tick:I,restart:function(){return F.restart(O),p},stop:function(){return F.stop(),p},nodes:function(W){return arguments.length?(b=W,N(),z.each(U),p):b},alpha:function(W){return arguments.length?(u=+W,p):u},alphaMin:function(W){return arguments.length?(m=+W,p):m},alphaDecay:function(W){return arguments.length?(h=+W,p):+h},alphaTarget:function(W){return arguments.length?(P=+W,p):P},velocityDecay:function(W){return arguments.length?(L=1-W,p):1-L},force:function(W,Q){return arguments.length>1?(Q==null?z.remove(W):z.set(W,U(Q)),p):z.get(W)},find:function(W,Q,ue){var le=0,he=b.length,G,$,J,X,oe;for(ue==null?ue=1/0:ue*=ue,le=0;le<he;++le)X=b[le],G=W-X.x,$=Q-X.y,J=G*G+$*$,J<ue&&(oe=X,ue=J);return oe},on:function(W,Q){return arguments.length>1?(B.on(W,Q),p):B.on(W)}}}function w(){var b,p,u,m=r(-30),h,P=1,L=1/0,z=.81;function F(N){var U,W=b.length,Q=x.quadtree(b,g,v).visitAfter(O);for(u=N,U=0;U<W;++U)p=b[U],Q.visit(I)}function B(){if(b){var N,U=b.length,W;for(h=new Array(U),N=0;N<U;++N)W=b[N],h[W.index]=+m(W,N,b)}}function O(N){var U=0,W,Q,ue=0,le,he,G;if(N.length){for(le=he=G=0;G<4;++G)(W=N[G])&&(Q=Math.abs(W.value))&&(U+=W.value,ue+=Q,le+=Q*W.x,he+=Q*W.y);N.x=le/ue,N.y=he/ue}else{W=N,W.x=W.data.x,W.y=W.data.y;do U+=h[W.data.index];while(W=W.next)}N.value=U}function I(N,U,W,Q){if(!N.value)return!0;var ue=N.x-p.x,le=N.y-p.y,he=Q-U,G=ue*ue+le*le;if(he*he/z<G)return G<L&&(ue===0&&(ue=o(),G+=ue*ue),le===0&&(le=o(),G+=le*le),G<P&&(G=Math.sqrt(P*G)),p.vx+=ue*N.value*u/G,p.vy+=le*N.value*u/G),!0;if(N.length||G>=L)return;(N.data!==p||N.next)&&(ue===0&&(ue=o(),G+=ue*ue),le===0&&(le=o(),G+=le*le),G<P&&(G=Math.sqrt(P*G)));do N.data!==p&&(he=h[N.data.index]*u/G,p.vx+=ue*he,p.vy+=le*he);while(N=N.next)}return F.initialize=function(N){b=N,B()},F.strength=function(N){return arguments.length?(m=typeof N=="function"?N:r(+N),B(),F):m},F.distanceMin=function(N){return arguments.length?(P=N*N,F):Math.sqrt(P)},F.distanceMax=function(N){return arguments.length?(L=N*N,F):Math.sqrt(L)},F.theta=function(N){return arguments.length?(z=N*N,F):Math.sqrt(z)},F}function S(b,p,u){var m,h=r(.1),P,L;typeof b!="function"&&(b=r(+b)),p==null&&(p=0),u==null&&(u=0);function z(B){for(var O=0,I=m.length;O<I;++O){var N=m[O],U=N.x-p||1e-6,W=N.y-u||1e-6,Q=Math.sqrt(U*U+W*W),ue=(L[O]-Q)*P[O]*B/Q;N.vx+=U*ue,N.vy+=W*ue}}function F(){if(m){var B,O=m.length;for(P=new Array(O),L=new Array(O),B=0;B<O;++B)L[B]=+b(m[B],B,m),P[B]=isNaN(L[B])?0:+h(m[B],B,m)}}return z.initialize=function(B){m=B,F()},z.strength=function(B){return arguments.length?(h=typeof B=="function"?B:r(+B),F(),z):h},z.radius=function(B){return arguments.length?(b=typeof B=="function"?B:r(+B),F(),z):b},z.x=function(B){return arguments.length?(p=+B,z):p},z.y=function(B){return arguments.length?(u=+B,z):u},z}function E(b){var p=r(.1),u,m,h;typeof b!="function"&&(b=r(b==null?0:+b));function P(z){for(var F=0,B=u.length,O;F<B;++F)O=u[F],O.vx+=(h[F]-O.x)*m[F]*z}function L(){if(u){var z,F=u.length;for(m=new Array(F),h=new Array(F),z=0;z<F;++z)m[z]=isNaN(h[z]=+b(u[z],z,u))?0:+p(u[z],z,u)}}return P.initialize=function(z){u=z,L()},P.strength=function(z){return arguments.length?(p=typeof z=="function"?z:r(+z),L(),P):p},P.x=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),P):b},P}function y(b){var p=r(.1),u,m,h;typeof b!="function"&&(b=r(b==null?0:+b));function P(z){for(var F=0,B=u.length,O;F<B;++F)O=u[F],O.vy+=(h[F]-O.y)*m[F]*z}function L(){if(u){var z,F=u.length;for(m=new Array(F),h=new Array(F),z=0;z<F;++z)m[z]=isNaN(h[z]=+b(u[z],z,u))?0:+p(u[z],z,u)}}return P.initialize=function(z){u=z,L()},P.strength=function(z){return arguments.length?(p=typeof z=="function"?z:r(+z),L(),P):p},P.y=function(z){return arguments.length?(b=typeof z=="function"?z:r(+z),L(),P):b},P}d.forceCenter=t,d.forceCollide=n,d.forceLink=f,d.forceManyBody=w,d.forceRadial=S,d.forceSimulation=_,d.forceX=E,d.forceY=y,Object.defineProperty(d,"__esModule",{value:!0})})}}),cG=Ze({"node_modules/d3-path/dist/d3-path.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z):(d=d||self,x(d.d3=d.d3||{}))})(Z,function(d){"use strict";var x=Math.PI,A=2*x,M=1e-6,e=A-M;function t(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new t}t.prototype=r.prototype={constructor:t,moveTo:function(o,a){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(o,a){this._+="L"+(this._x1=+o)+","+(this._y1=+a)},quadraticCurveTo:function(o,a,i,n){this._+="Q"+ +o+","+ +a+","+(this._x1=+i)+","+(this._y1=+n)},bezierCurveTo:function(o,a,i,n,s,c){this._+="C"+ +o+","+ +a+","+ +i+","+ +n+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(o,a,i,n,s){o=+o,a=+a,i=+i,n=+n,s=+s;var c=this._x1,f=this._y1,g=i-o,v=n-a,T=c-o,l=f-a,_=T*T+l*l;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=o)+","+(this._y1=a);else if(_>M)if(!(Math.abs(l*g-v*T)>M)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var w=i-c,S=n-f,E=g*g+v*v,y=w*w+S*S,b=Math.sqrt(E),p=Math.sqrt(_),u=s*Math.tan((x-Math.acos((E+_-y)/(2*b*p)))/2),m=u/p,h=u/b;Math.abs(m-1)>M&&(this._+="L"+(o+m*T)+","+(a+m*l)),this._+="A"+s+","+s+",0,0,"+ +(l*w>T*S)+","+(this._x1=o+h*g)+","+(this._y1=a+h*v)}},arc:function(o,a,i,n,s,c){o=+o,a=+a,i=+i,c=!!c;var f=i*Math.cos(n),g=i*Math.sin(n),v=o+f,T=a+g,l=1^c,_=c?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+v+","+T:(Math.abs(this._x1-v)>M||Math.abs(this._y1-T)>M)&&(this._+="L"+v+","+T),i&&(_<0&&(_=_%A+A),_>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-f)+","+(a-g)+"A"+i+","+i+",0,1,"+l+","+(this._x1=v)+","+(this._y1=T):_>M&&(this._+="A"+i+","+i+",0,"+ +(_>=x)+","+l+","+(this._x1=o+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(o,a,i,n){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}},d.path=r,Object.defineProperty(d,"__esModule",{value:!0})})}}),N6=Ze({"node_modules/d3-shape/dist/d3-shape.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,cG()):(d=d||self,x(d.d3=d.d3||{},d.d3))})(Z,function(d,x){"use strict";function A(It){return function(){return It}}var M=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,i=Math.sqrt,n=1e-12,s=Math.PI,c=s/2,f=2*s;function g(It){return It>1?0:It<-1?s:Math.acos(It)}function v(It){return It>=1?c:It<=-1?-c:Math.asin(It)}function T(It){return It.innerRadius}function l(It){return It.outerRadius}function _(It){return It.startAngle}function w(It){return It.endAngle}function S(It){return It&&It.padAngle}function E(It,dr,kr,ia,Ca,Fa,Ya,ha){var Da=kr-It,Xi=ia-dr,Li=Ya-Ca,fn=ha-Fa,An=fn*Da-Li*Xi;if(!(An*An<n))return An=(Li*(dr-Fa)-fn*(It-Ca))/An,[It+An*Da,dr+An*Xi]}function y(It,dr,kr,ia,Ca,Fa,Ya){var ha=It-kr,Da=dr-ia,Xi=(Ya?Fa:-Fa)/i(ha*ha+Da*Da),Li=Xi*Da,fn=-Xi*ha,An=It+Li,kn=dr+fn,zn=kr+Li,Xn=ia+fn,to=(An+zn)/2,mo=(kn+Xn)/2,pn=zn-An,Jo=Xn-kn,Xo=pn*pn+Jo*Jo,Ts=Ca-Fa,Po=An*Xn-zn*kn,so=(Jo<0?-1:1)*i(r(0,Ts*Ts*Xo-Po*Po)),Vn=(Po*Jo-pn*so)/Xo,To=(-Po*pn-Jo*so)/Xo,qo=(Po*Jo+pn*so)/Xo,Oo=(-Po*pn+Jo*so)/Xo,lo=Vn-to,Co=To-mo,os=qo-to,Ys=Oo-mo;return lo*lo+Co*Co>os*os+Ys*Ys&&(Vn=qo,To=Oo),{cx:Vn,cy:To,x01:-Li,y01:-fn,x11:Vn*(Ca/Ts-1),y11:To*(Ca/Ts-1)}}function b(){var It=T,dr=l,kr=A(0),ia=null,Ca=_,Fa=w,Ya=S,ha=null;function Da(){var Xi,Li,fn=+It.apply(this,arguments),An=+dr.apply(this,arguments),kn=Ca.apply(this,arguments)-c,zn=Fa.apply(this,arguments)-c,Xn=M(zn-kn),to=zn>kn;if(ha||(ha=Xi=x.path()),An<fn&&(Li=An,An=fn,fn=Li),!(An>n))ha.moveTo(0,0);else if(Xn>f-n)ha.moveTo(An*t(kn),An*a(kn)),ha.arc(0,0,An,kn,zn,!to),fn>n&&(ha.moveTo(fn*t(zn),fn*a(zn)),ha.arc(0,0,fn,zn,kn,to));else{var mo=kn,pn=zn,Jo=kn,Xo=zn,Ts=Xn,Po=Xn,so=Ya.apply(this,arguments)/2,Vn=so>n&&(ia?+ia.apply(this,arguments):i(fn*fn+An*An)),To=o(M(An-fn)/2,+kr.apply(this,arguments)),qo=To,Oo=To,lo,Co;if(Vn>n){var os=v(Vn/fn*a(so)),Ys=v(Vn/An*a(so));(Ts-=os*2)>n?(os*=to?1:-1,Jo+=os,Xo-=os):(Ts=0,Jo=Xo=(kn+zn)/2),(Po-=Ys*2)>n?(Ys*=to?1:-1,mo+=Ys,pn-=Ys):(Po=0,mo=pn=(kn+zn)/2)}var Os=An*t(mo),Yo=An*a(mo),Ui=fn*t(Xo),Cn=fn*a(Xo);if(To>n){var tl=An*t(pn),Bs=An*a(pn),uo=fn*t(Jo),$s=fn*a(Jo),ms;if(Xn<s&&(ms=E(Os,Yo,uo,$s,tl,Bs,Ui,Cn))){var Is=Os-ms[0],rl=Yo-ms[1],Sn=tl-ms[0],po=Bs-ms[1],ro=1/a(g((Is*Sn+rl*po)/(i(Is*Is+rl*rl)*i(Sn*Sn+po*po)))/2),As=i(ms[0]*ms[0]+ms[1]*ms[1]);qo=o(To,(fn-As)/(ro-1)),Oo=o(To,(An-As)/(ro+1))}}Po>n?Oo>n?(lo=y(uo,$s,Os,Yo,An,Oo,to),Co=y(tl,Bs,Ui,Cn,An,Oo,to),ha.moveTo(lo.cx+lo.x01,lo.cy+lo.y01),Oo<To?ha.arc(lo.cx,lo.cy,Oo,e(lo.y01,lo.x01),e(Co.y01,Co.x01),!to):(ha.arc(lo.cx,lo.cy,Oo,e(lo.y01,lo.x01),e(lo.y11,lo.x11),!to),ha.arc(0,0,An,e(lo.cy+lo.y11,lo.cx+lo.x11),e(Co.cy+Co.y11,Co.cx+Co.x11),!to),ha.arc(Co.cx,Co.cy,Oo,e(Co.y11,Co.x11),e(Co.y01,Co.x01),!to))):(ha.moveTo(Os,Yo),ha.arc(0,0,An,mo,pn,!to)):ha.moveTo(Os,Yo),!(fn>n)||!(Ts>n)?ha.lineTo(Ui,Cn):qo>n?(lo=y(Ui,Cn,tl,Bs,fn,-qo,to),Co=y(Os,Yo,uo,$s,fn,-qo,to),ha.lineTo(lo.cx+lo.x01,lo.cy+lo.y01),qo<To?ha.arc(lo.cx,lo.cy,qo,e(lo.y01,lo.x01),e(Co.y01,Co.x01),!to):(ha.arc(lo.cx,lo.cy,qo,e(lo.y01,lo.x01),e(lo.y11,lo.x11),!to),ha.arc(0,0,fn,e(lo.cy+lo.y11,lo.cx+lo.x11),e(Co.cy+Co.y11,Co.cx+Co.x11),to),ha.arc(Co.cx,Co.cy,qo,e(Co.y11,Co.x11),e(Co.y01,Co.x01),!to))):ha.arc(0,0,fn,Xo,Jo,to)}if(ha.closePath(),Xi)return ha=null,Xi+""||null}return Da.centroid=function(){var Xi=(+It.apply(this,arguments)+ +dr.apply(this,arguments))/2,Li=(+Ca.apply(this,arguments)+ +Fa.apply(this,arguments))/2-s/2;return[t(Li)*Xi,a(Li)*Xi]},Da.innerRadius=function(Xi){return arguments.length?(It=typeof Xi=="function"?Xi:A(+Xi),Da):It},Da.outerRadius=function(Xi){return arguments.length?(dr=typeof Xi=="function"?Xi:A(+Xi),Da):dr},Da.cornerRadius=function(Xi){return arguments.length?(kr=typeof Xi=="function"?Xi:A(+Xi),Da):kr},Da.padRadius=function(Xi){return arguments.length?(ia=Xi==null?null:typeof Xi=="function"?Xi:A(+Xi),Da):ia},Da.startAngle=function(Xi){return arguments.length?(Ca=typeof Xi=="function"?Xi:A(+Xi),Da):Ca},Da.endAngle=function(Xi){return arguments.length?(Fa=typeof Xi=="function"?Xi:A(+Xi),Da):Fa},Da.padAngle=function(Xi){return arguments.length?(Ya=typeof Xi=="function"?Xi:A(+Xi),Da):Ya},Da.context=function(Xi){return arguments.length?(ha=Xi??null,Da):ha},Da}function p(It){this._context=It}p.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(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,dr):this._context.moveTo(It,dr);break;case 1:this._point=2;default:this._context.lineTo(It,dr);break}}};function u(It){return new p(It)}function m(It){return It[0]}function h(It){return It[1]}function P(){var It=m,dr=h,kr=A(!0),ia=null,Ca=u,Fa=null;function Ya(ha){var Da,Xi=ha.length,Li,fn=!1,An;for(ia==null&&(Fa=Ca(An=x.path())),Da=0;Da<=Xi;++Da)!(Da<Xi&&kr(Li=ha[Da],Da,ha))===fn&&((fn=!fn)?Fa.lineStart():Fa.lineEnd()),fn&&Fa.point(+It(Li,Da,ha),+dr(Li,Da,ha));if(An)return Fa=null,An+""||null}return Ya.x=function(ha){return arguments.length?(It=typeof ha=="function"?ha:A(+ha),Ya):It},Ya.y=function(ha){return arguments.length?(dr=typeof ha=="function"?ha:A(+ha),Ya):dr},Ya.defined=function(ha){return arguments.length?(kr=typeof ha=="function"?ha:A(!!ha),Ya):kr},Ya.curve=function(ha){return arguments.length?(Ca=ha,ia!=null&&(Fa=Ca(ia)),Ya):Ca},Ya.context=function(ha){return arguments.length?(ha==null?ia=Fa=null:Fa=Ca(ia=ha),Ya):ia},Ya}function L(){var It=m,dr=null,kr=A(0),ia=h,Ca=A(!0),Fa=null,Ya=u,ha=null;function Da(Li){var fn,An,kn,zn=Li.length,Xn,to=!1,mo,pn=new Array(zn),Jo=new Array(zn);for(Fa==null&&(ha=Ya(mo=x.path())),fn=0;fn<=zn;++fn){if(!(fn<zn&&Ca(Xn=Li[fn],fn,Li))===to)if(to=!to)An=fn,ha.areaStart(),ha.lineStart();else{for(ha.lineEnd(),ha.lineStart(),kn=fn-1;kn>=An;--kn)ha.point(pn[kn],Jo[kn]);ha.lineEnd(),ha.areaEnd()}to&&(pn[fn]=+It(Xn,fn,Li),Jo[fn]=+kr(Xn,fn,Li),ha.point(dr?+dr(Xn,fn,Li):pn[fn],ia?+ia(Xn,fn,Li):Jo[fn]))}if(mo)return ha=null,mo+""||null}function Xi(){return P().defined(Ca).curve(Ya).context(Fa)}return Da.x=function(Li){return arguments.length?(It=typeof Li=="function"?Li:A(+Li),dr=null,Da):It},Da.x0=function(Li){return arguments.length?(It=typeof Li=="function"?Li:A(+Li),Da):It},Da.x1=function(Li){return arguments.length?(dr=Li==null?null:typeof Li=="function"?Li:A(+Li),Da):dr},Da.y=function(Li){return arguments.length?(kr=typeof Li=="function"?Li:A(+Li),ia=null,Da):kr},Da.y0=function(Li){return arguments.length?(kr=typeof Li=="function"?Li:A(+Li),Da):kr},Da.y1=function(Li){return arguments.length?(ia=Li==null?null:typeof Li=="function"?Li:A(+Li),Da):ia},Da.lineX0=Da.lineY0=function(){return Xi().x(It).y(kr)},Da.lineY1=function(){return Xi().x(It).y(ia)},Da.lineX1=function(){return Xi().x(dr).y(kr)},Da.defined=function(Li){return arguments.length?(Ca=typeof Li=="function"?Li:A(!!Li),Da):Ca},Da.curve=function(Li){return arguments.length?(Ya=Li,Fa!=null&&(ha=Ya(Fa)),Da):Ya},Da.context=function(Li){return arguments.length?(Li==null?Fa=ha=null:ha=Ya(Fa=Li),Da):Fa},Da}function z(It,dr){return dr<It?-1:dr>It?1:dr>=It?0:NaN}function F(It){return It}function B(){var It=F,dr=z,kr=null,ia=A(0),Ca=A(f),Fa=A(0);function Ya(ha){var Da,Xi=ha.length,Li,fn,An=0,kn=new Array(Xi),zn=new Array(Xi),Xn=+ia.apply(this,arguments),to=Math.min(f,Math.max(-f,Ca.apply(this,arguments)-Xn)),mo,pn=Math.min(Math.abs(to)/Xi,Fa.apply(this,arguments)),Jo=pn*(to<0?-1:1),Xo;for(Da=0;Da<Xi;++Da)(Xo=zn[kn[Da]=Da]=+It(ha[Da],Da,ha))>0&&(An+=Xo);for(dr!=null?kn.sort(function(Ts,Po){return dr(zn[Ts],zn[Po])}):kr!=null&&kn.sort(function(Ts,Po){return kr(ha[Ts],ha[Po])}),Da=0,fn=An?(to-Xi*Jo)/An:0;Da<Xi;++Da,Xn=mo)Li=kn[Da],Xo=zn[Li],mo=Xn+(Xo>0?Xo*fn:0)+Jo,zn[Li]={data:ha[Li],index:Da,value:Xo,startAngle:Xn,endAngle:mo,padAngle:pn};return zn}return Ya.value=function(ha){return arguments.length?(It=typeof ha=="function"?ha:A(+ha),Ya):It},Ya.sortValues=function(ha){return arguments.length?(dr=ha,kr=null,Ya):dr},Ya.sort=function(ha){return arguments.length?(kr=ha,dr=null,Ya):kr},Ya.startAngle=function(ha){return arguments.length?(ia=typeof ha=="function"?ha:A(+ha),Ya):ia},Ya.endAngle=function(ha){return arguments.length?(Ca=typeof ha=="function"?ha:A(+ha),Ya):Ca},Ya.padAngle=function(ha){return arguments.length?(Fa=typeof ha=="function"?ha:A(+ha),Ya):Fa},Ya}var O=N(u);function I(It){this._curve=It}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(It,dr){this._curve.point(dr*Math.sin(It),dr*-Math.cos(It))}};function N(It){function dr(kr){return new I(It(kr))}return dr._curve=It,dr}function U(It){var dr=It.curve;return It.angle=It.x,delete It.x,It.radius=It.y,delete It.y,It.curve=function(kr){return arguments.length?dr(N(kr)):dr()._curve},It}function W(){return U(P().curve(O))}function Q(){var It=L().curve(O),dr=It.curve,kr=It.lineX0,ia=It.lineX1,Ca=It.lineY0,Fa=It.lineY1;return It.angle=It.x,delete It.x,It.startAngle=It.x0,delete It.x0,It.endAngle=It.x1,delete It.x1,It.radius=It.y,delete It.y,It.innerRadius=It.y0,delete It.y0,It.outerRadius=It.y1,delete It.y1,It.lineStartAngle=function(){return U(kr())},delete It.lineX0,It.lineEndAngle=function(){return U(ia())},delete It.lineX1,It.lineInnerRadius=function(){return U(Ca())},delete It.lineY0,It.lineOuterRadius=function(){return U(Fa())},delete It.lineY1,It.curve=function(Ya){return arguments.length?dr(N(Ya)):dr()._curve},It}function ue(It,dr){return[(dr=+dr)*Math.cos(It-=Math.PI/2),dr*Math.sin(It)]}var le=Array.prototype.slice;function he(It){return It.source}function G(It){return It.target}function $(It){var dr=he,kr=G,ia=m,Ca=h,Fa=null;function Ya(){var ha,Da=le.call(arguments),Xi=dr.apply(this,Da),Li=kr.apply(this,Da);if(Fa||(Fa=ha=x.path()),It(Fa,+ia.apply(this,(Da[0]=Xi,Da)),+Ca.apply(this,Da),+ia.apply(this,(Da[0]=Li,Da)),+Ca.apply(this,Da)),ha)return Fa=null,ha+""||null}return Ya.source=function(ha){return arguments.length?(dr=ha,Ya):dr},Ya.target=function(ha){return arguments.length?(kr=ha,Ya):kr},Ya.x=function(ha){return arguments.length?(ia=typeof ha=="function"?ha:A(+ha),Ya):ia},Ya.y=function(ha){return arguments.length?(Ca=typeof ha=="function"?ha:A(+ha),Ya):Ca},Ya.context=function(ha){return arguments.length?(Fa=ha??null,Ya):Fa},Ya}function J(It,dr,kr,ia,Ca){It.moveTo(dr,kr),It.bezierCurveTo(dr=(dr+ia)/2,kr,dr,Ca,ia,Ca)}function X(It,dr,kr,ia,Ca){It.moveTo(dr,kr),It.bezierCurveTo(dr,kr=(kr+Ca)/2,ia,kr,ia,Ca)}function oe(It,dr,kr,ia,Ca){var Fa=ue(dr,kr),Ya=ue(dr,kr=(kr+Ca)/2),ha=ue(ia,kr),Da=ue(ia,Ca);It.moveTo(Fa[0],Fa[1]),It.bezierCurveTo(Ya[0],Ya[1],ha[0],ha[1],Da[0],Da[1])}function ie(){return $(J)}function j(){return $(X)}function ee(){var It=$(oe);return It.angle=It.x,delete It.x,It.radius=It.y,delete It.y,It}var re={draw:function(It,dr){var kr=Math.sqrt(dr/s);It.moveTo(kr,0),It.arc(0,0,kr,0,f)}},ce={draw:function(It,dr){var kr=Math.sqrt(dr/5)/2;It.moveTo(-3*kr,-kr),It.lineTo(-kr,-kr),It.lineTo(-kr,-3*kr),It.lineTo(kr,-3*kr),It.lineTo(kr,-kr),It.lineTo(3*kr,-kr),It.lineTo(3*kr,kr),It.lineTo(kr,kr),It.lineTo(kr,3*kr),It.lineTo(-kr,3*kr),It.lineTo(-kr,kr),It.lineTo(-3*kr,kr),It.closePath()}},be=Math.sqrt(1/3),Ae=be*2,ze={draw:function(It,dr){var kr=Math.sqrt(dr/Ae),ia=kr*be;It.moveTo(0,-kr),It.lineTo(ia,0),It.lineTo(0,kr),It.lineTo(-ia,0),It.closePath()}},Re=.8908130915292852,Xe=Math.sin(s/10)/Math.sin(7*s/10),it=Math.sin(f/10)*Xe,ot=-Math.cos(f/10)*Xe,tt={draw:function(It,dr){var kr=Math.sqrt(dr*Re),ia=it*kr,Ca=ot*kr;It.moveTo(0,-kr),It.lineTo(ia,Ca);for(var Fa=1;Fa<5;++Fa){var Ya=f*Fa/5,ha=Math.cos(Ya),Da=Math.sin(Ya);It.lineTo(Da*kr,-ha*kr),It.lineTo(ha*ia-Da*Ca,Da*ia+ha*Ca)}It.closePath()}},lt={draw:function(It,dr){var kr=Math.sqrt(dr),ia=-kr/2;It.rect(ia,ia,kr,kr)}},Ee=Math.sqrt(3),_e={draw:function(It,dr){var kr=-Math.sqrt(dr/(Ee*3));It.moveTo(0,kr*2),It.lineTo(-Ee*kr,-kr),It.lineTo(Ee*kr,-kr),It.closePath()}},fe=-.5,Fe=Math.sqrt(3)/2,rt=1/Math.sqrt(12),st=(rt/2+1)*3,Qe={draw:function(It,dr){var kr=Math.sqrt(dr/st),ia=kr/2,Ca=kr*rt,Fa=ia,Ya=kr*rt+kr,ha=-Fa,Da=Ya;It.moveTo(ia,Ca),It.lineTo(Fa,Ya),It.lineTo(ha,Da),It.lineTo(fe*ia-Fe*Ca,Fe*ia+fe*Ca),It.lineTo(fe*Fa-Fe*Ya,Fe*Fa+fe*Ya),It.lineTo(fe*ha-Fe*Da,Fe*ha+fe*Da),It.lineTo(fe*ia+Fe*Ca,fe*Ca-Fe*ia),It.lineTo(fe*Fa+Fe*Ya,fe*Ya-Fe*Fa),It.lineTo(fe*ha+Fe*Da,fe*Da-Fe*ha),It.closePath()}},Lt=[re,ce,ze,lt,tt,_e,Qe];function kt(){var It=A(re),dr=A(64),kr=null;function ia(){var Ca;if(kr||(kr=Ca=x.path()),It.apply(this,arguments).draw(kr,+dr.apply(this,arguments)),Ca)return kr=null,Ca+""||null}return ia.type=function(Ca){return arguments.length?(It=typeof Ca=="function"?Ca:A(Ca),ia):It},ia.size=function(Ca){return arguments.length?(dr=typeof Ca=="function"?Ca:A(+Ca),ia):dr},ia.context=function(Ca){return arguments.length?(kr=Ca??null,ia):kr},ia}function Vt(){}function Zt(It,dr,kr){It._context.bezierCurveTo((2*It._x0+It._x1)/3,(2*It._y0+It._y1)/3,(It._x0+2*It._x1)/3,(It._y0+2*It._y1)/3,(It._x0+4*It._x1+dr)/6,(It._y0+4*It._y1+kr)/6)}function Sr(It){this._context=It}Sr.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:Zt(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(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,dr):this._context.moveTo(It,dr);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:Zt(this,It,dr);break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=dr}};function xr(It){return new Sr(It)}function jr(It){this._context=It}jr.prototype={areaStart:Vt,areaEnd:Vt,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(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1,this._x2=It,this._y2=dr;break;case 1:this._point=2,this._x3=It,this._y3=dr;break;case 2:this._point=3,this._x4=It,this._y4=dr,this._context.moveTo((this._x0+4*this._x1+It)/6,(this._y0+4*this._y1+dr)/6);break;default:Zt(this,It,dr);break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=dr}};function wr(It){return new jr(It)}function Ir(It){this._context=It}Ir.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(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var kr=(this._x0+4*this._x1+It)/6,ia=(this._y0+4*this._y1+dr)/6;this._line?this._context.lineTo(kr,ia):this._context.moveTo(kr,ia);break;case 3:this._point=4;default:Zt(this,It,dr);break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=dr}};function bt(It){return new Ir(It)}function Be(It,dr){this._basis=new Sr(It),this._beta=dr}Be.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var It=this._x,dr=this._y,kr=It.length-1;if(kr>0)for(var ia=It[0],Ca=dr[0],Fa=It[kr]-ia,Ya=dr[kr]-Ca,ha=-1,Da;++ha<=kr;)Da=ha/kr,this._basis.point(this._beta*It[ha]+(1-this._beta)*(ia+Da*Fa),this._beta*dr[ha]+(1-this._beta)*(Ca+Da*Ya));this._x=this._y=null,this._basis.lineEnd()},point:function(It,dr){this._x.push(+It),this._y.push(+dr)}};var Ke=function It(dr){function kr(ia){return dr===1?new Sr(ia):new Be(ia,dr)}return kr.beta=function(ia){return It(+ia)},kr}(.85);function Ue(It,dr,kr){It._context.bezierCurveTo(It._x1+It._k*(It._x2-It._x0),It._y1+It._k*(It._y2-It._y0),It._x2+It._k*(It._x1-dr),It._y2+It._k*(It._y1-kr),It._x2,It._y2)}function Me(It,dr){this._context=It,this._k=(1-dr)/6}Me.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:Ue(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,dr):this._context.moveTo(It,dr);break;case 1:this._point=2,this._x1=It,this._y1=dr;break;case 2:this._point=3;default:Ue(this,It,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var qe=function It(dr){function kr(ia){return new Me(ia,dr)}return kr.tension=function(ia){return It(+ia)},kr}(0);function Ce(It,dr){this._context=It,this._k=(1-dr)/6}Ce.prototype={areaStart:Vt,areaEnd:Vt,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(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1,this._x3=It,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=It,this._y4=dr);break;case 2:this._point=3,this._x5=It,this._y5=dr;break;default:Ue(this,It,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Te=function It(dr){function kr(ia){return new Ce(ia,dr)}return kr.tension=function(ia){return It(+ia)},kr}(0);function Pe(It,dr){this._context=It,this._k=(1-dr)/6}Pe.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(It,dr){switch(It=+It,dr=+dr,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:Ue(this,It,dr);break}this._x0=this._x1,this._x1=this._x2,this._x2=It,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var at=function It(dr){function kr(ia){return new Pe(ia,dr)}return kr.tension=function(ia){return It(+ia)},kr}(0);function yt(It,dr,kr){var ia=It._x1,Ca=It._y1,Fa=It._x2,Ya=It._y2;if(It._l01_a>n){var ha=2*It._l01_2a+3*It._l01_a*It._l12_a+It._l12_2a,Da=3*It._l01_a*(It._l01_a+It._l12_a);ia=(ia*ha-It._x0*It._l12_2a+It._x2*It._l01_2a)/Da,Ca=(Ca*ha-It._y0*It._l12_2a+It._y2*It._l01_2a)/Da}if(It._l23_a>n){var Xi=2*It._l23_2a+3*It._l23_a*It._l12_a+It._l12_2a,Li=3*It._l23_a*(It._l23_a+It._l12_a);Fa=(Fa*Xi+It._x1*It._l23_2a-dr*It._l12_2a)/Li,Ya=(Ya*Xi+It._y1*It._l23_2a-kr*It._l12_2a)/Li}It._context.bezierCurveTo(ia,Ca,Fa,Ya,It._x2,It._y2)}function Tt(It,dr){this._context=It,this._alpha=dr}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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(It,dr){if(It=+It,dr=+dr,this._point){var kr=this._x2-It,ia=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(kr*kr+ia*ia,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(It,dr):this._context.moveTo(It,dr);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,It,dr);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=It,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Ot=function It(dr){function kr(ia){return dr?new Tt(ia,dr):new Me(ia,0)}return kr.alpha=function(ia){return It(+ia)},kr}(.5);function Gt(It,dr){this._context=It,this._alpha=dr}Gt.prototype={areaStart:Vt,areaEnd:Vt,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(It,dr){if(It=+It,dr=+dr,this._point){var kr=this._x2-It,ia=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(kr*kr+ia*ia,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=It,this._y3=dr;break;case 1:this._point=2,this._context.moveTo(this._x4=It,this._y4=dr);break;case 2:this._point=3,this._x5=It,this._y5=dr;break;default:yt(this,It,dr);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=It,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var rr=function It(dr){function kr(ia){return dr?new Gt(ia,dr):new Ce(ia,0)}return kr.alpha=function(ia){return It(+ia)},kr}(.5);function Qt(It,dr){this._context=It,this._alpha=dr}Qt.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(It,dr){if(It=+It,dr=+dr,this._point){var kr=this._x2-It,ia=this._y2-dr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(kr*kr+ia*ia,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:yt(this,It,dr);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=It,this._y0=this._y1,this._y1=this._y2,this._y2=dr}};var Tr=function It(dr){function kr(ia){return dr?new Qt(ia,dr):new Pe(ia,0)}return kr.alpha=function(ia){return It(+ia)},kr}(.5);function la(It){this._context=It}la.prototype={areaStart:Vt,areaEnd:Vt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(It,dr){It=+It,dr=+dr,this._point?this._context.lineTo(It,dr):(this._point=1,this._context.moveTo(It,dr))}};function Ua(It){return new la(It)}function Ba(It){return It<0?-1:1}function Ra(It,dr,kr){var ia=It._x1-It._x0,Ca=dr-It._x1,Fa=(It._y1-It._y0)/(ia||Ca<0&&-0),Ya=(kr-It._y1)/(Ca||ia<0&&-0),ha=(Fa*Ca+Ya*ia)/(ia+Ca);return(Ba(Fa)+Ba(Ya))*Math.min(Math.abs(Fa),Math.abs(Ya),.5*Math.abs(ha))||0}function ei(It,dr){var kr=It._x1-It._x0;return kr?(3*(It._y1-It._y0)/kr-dr)/2:dr}function za(It,dr,kr){var ia=It._x0,Ca=It._y0,Fa=It._x1,Ya=It._y1,ha=(Fa-ia)/3;It._context.bezierCurveTo(ia+ha,Ca+ha*dr,Fa-ha,Ya-ha*kr,Fa,Ya)}function ti(It){this._context=It}ti.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:za(this,this._t0,ei(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(It,dr){var kr=NaN;if(It=+It,dr=+dr,!(It===this._x1&&dr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(It,dr):this._context.moveTo(It,dr);break;case 1:this._point=2;break;case 2:this._point=3,za(this,ei(this,kr=Ra(this,It,dr)),kr);break;default:za(this,this._t0,kr=Ra(this,It,dr));break}this._x0=this._x1,this._x1=It,this._y0=this._y1,this._y1=dr,this._t0=kr}}};function Ci(It){this._context=new Jt(It)}(Ci.prototype=Object.create(ti.prototype)).point=function(It,dr){ti.prototype.point.call(this,dr,It)};function Jt(It){this._context=It}Jt.prototype={moveTo:function(It,dr){this._context.moveTo(dr,It)},closePath:function(){this._context.closePath()},lineTo:function(It,dr){this._context.lineTo(dr,It)},bezierCurveTo:function(It,dr,kr,ia,Ca,Fa){this._context.bezierCurveTo(dr,It,ia,kr,Fa,Ca)}};function Nt(It){return new ti(It)}function Kt(It){return new Ci(It)}function Wt(It){this._context=It}Wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var It=this._x,dr=this._y,kr=It.length;if(kr)if(this._line?this._context.lineTo(It[0],dr[0]):this._context.moveTo(It[0],dr[0]),kr===2)this._context.lineTo(It[1],dr[1]);else for(var ia=Pr(It),Ca=Pr(dr),Fa=0,Ya=1;Ya<kr;++Fa,++Ya)this._context.bezierCurveTo(ia[0][Fa],Ca[0][Fa],ia[1][Fa],Ca[1][Fa],It[Ya],dr[Ya]);(this._line||this._line!==0&&kr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(It,dr){this._x.push(+It),this._y.push(+dr)}};function Pr(It){var dr,kr=It.length-1,ia,Ca=new Array(kr),Fa=new Array(kr),Ya=new Array(kr);for(Ca[0]=0,Fa[0]=2,Ya[0]=It[0]+2*It[1],dr=1;dr<kr-1;++dr)Ca[dr]=1,Fa[dr]=4,Ya[dr]=4*It[dr]+2*It[dr+1];for(Ca[kr-1]=2,Fa[kr-1]=7,Ya[kr-1]=8*It[kr-1]+It[kr],dr=1;dr<kr;++dr)ia=Ca[dr]/Fa[dr-1],Fa[dr]-=ia,Ya[dr]-=ia*Ya[dr-1];for(Ca[kr-1]=Ya[kr-1]/Fa[kr-1],dr=kr-2;dr>=0;--dr)Ca[dr]=(Ya[dr]-Ca[dr+1])/Fa[dr];for(Fa[kr-1]=(It[kr]+Ca[kr-1])/2,dr=0;dr<kr-1;++dr)Fa[dr]=2*It[dr+1]-Ca[dr+1];return[Ca,Fa]}function ta(It){return new Wt(It)}function ma(It,dr){this._context=It,this._t=dr}ma.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(It,dr){switch(It=+It,dr=+dr,this._point){case 0:this._point=1,this._line?this._context.lineTo(It,dr):this._context.moveTo(It,dr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,dr),this._context.lineTo(It,dr);else{var kr=this._x*(1-this._t)+It*this._t;this._context.lineTo(kr,this._y),this._context.lineTo(kr,dr)}break}}this._x=It,this._y=dr}};function ra(It){return new ma(It,.5)}function Ia(It){return new ma(It,0)}function Ha(It){return new ma(It,1)}function $a(It,dr){if((Ya=It.length)>1)for(var kr=1,ia,Ca,Fa=It[dr[0]],Ya,ha=Fa.length;kr<Ya;++kr)for(Ca=Fa,Fa=It[dr[kr]],ia=0;ia<ha;++ia)Fa[ia][1]+=Fa[ia][0]=isNaN(Ca[ia][1])?Ca[ia][0]:Ca[ia][1]}function ai(It){for(var dr=It.length,kr=new Array(dr);--dr>=0;)kr[dr]=dr;return kr}function mi(It,dr){return It[dr]}function xt(){var It=A([]),dr=ai,kr=$a,ia=mi;function Ca(Fa){var Ya=It.apply(this,arguments),ha,Da=Fa.length,Xi=Ya.length,Li=new Array(Xi),fn;for(ha=0;ha<Xi;++ha){for(var An=Ya[ha],kn=Li[ha]=new Array(Da),zn=0,Xn;zn<Da;++zn)kn[zn]=Xn=[0,+ia(Fa[zn],An,zn,Fa)],Xn.data=Fa[zn];kn.key=An}for(ha=0,fn=dr(Li);ha<Xi;++ha)Li[fn[ha]].index=ha;return kr(Li,fn),Li}return Ca.keys=function(Fa){return arguments.length?(It=typeof Fa=="function"?Fa:A(le.call(Fa)),Ca):It},Ca.value=function(Fa){return arguments.length?(ia=typeof Fa=="function"?Fa:A(+Fa),Ca):ia},Ca.order=function(Fa){return arguments.length?(dr=Fa==null?ai:typeof Fa=="function"?Fa:A(le.call(Fa)),Ca):dr},Ca.offset=function(Fa){return arguments.length?(kr=Fa??$a,Ca):kr},Ca}function ct(It,dr){if((ia=It.length)>0){for(var kr,ia,Ca=0,Fa=It[0].length,Ya;Ca<Fa;++Ca){for(Ya=kr=0;kr<ia;++kr)Ya+=It[kr][Ca][1]||0;if(Ya)for(kr=0;kr<ia;++kr)It[kr][Ca][1]/=Ya}$a(It,dr)}}function Nr(It,dr){if((Da=It.length)>0)for(var kr,ia=0,Ca,Fa,Ya,ha,Da,Xi=It[dr[0]].length;ia<Xi;++ia)for(Ya=ha=0,kr=0;kr<Da;++kr)(Fa=(Ca=It[dr[kr]][ia])[1]-Ca[0])>0?(Ca[0]=Ya,Ca[1]=Ya+=Fa):Fa<0?(Ca[1]=ha,Ca[0]=ha+=Fa):(Ca[0]=0,Ca[1]=Fa)}function Or(It,dr){if((Ca=It.length)>0){for(var kr=0,ia=It[dr[0]],Ca,Fa=ia.length;kr<Fa;++kr){for(var Ya=0,ha=0;Ya<Ca;++Ya)ha+=It[Ya][kr][1]||0;ia[kr][1]+=ia[kr][0]=-ha/2}$a(It,dr)}}function Rr(It,dr){if(!(!((Ya=It.length)>0)||!((Fa=(Ca=It[dr[0]]).length)>0))){for(var kr=0,ia=1,Ca,Fa,Ya;ia<Fa;++ia){for(var ha=0,Da=0,Xi=0;ha<Ya;++ha){for(var Li=It[dr[ha]],fn=Li[ia][1]||0,An=Li[ia-1][1]||0,kn=(fn-An)/2,zn=0;zn<ha;++zn){var Xn=It[dr[zn]],to=Xn[ia][1]||0,mo=Xn[ia-1][1]||0;kn+=to-mo}Da+=fn,Xi+=kn*fn}Ca[ia-1][1]+=Ca[ia-1][0]=kr,Da&&(kr-=Xi/Da)}Ca[ia-1][1]+=Ca[ia-1][0]=kr,$a(It,dr)}}function Lr(It){var dr=It.map(Gr);return ai(It).sort(function(kr,ia){return dr[kr]-dr[ia]})}function Gr(It){for(var dr=-1,kr=0,ia=It.length,Ca,Fa=-1/0;++dr<ia;)(Ca=+It[dr][1])>Fa&&(Fa=Ca,kr=dr);return kr}function Kr(It){var dr=It.map(Ur);return ai(It).sort(function(kr,ia){return dr[kr]-dr[ia]})}function Ur(It){for(var dr=0,kr=-1,ia=It.length,Ca;++kr<ia;)(Ca=+It[kr][1])&&(dr+=Ca);return dr}function aa(It){return Kr(It).reverse()}function da(It){var dr=It.length,kr,ia,Ca=It.map(Ur),Fa=Lr(It),Ya=0,ha=0,Da=[],Xi=[];for(kr=0;kr<dr;++kr)ia=Fa[kr],Ya<ha?(Ya+=Ca[ia],Da.push(ia)):(ha+=Ca[ia],Xi.push(ia));return Xi.reverse().concat(Da)}function fa(It){return ai(It).reverse()}d.arc=b,d.area=L,d.areaRadial=Q,d.curveBasis=xr,d.curveBasisClosed=wr,d.curveBasisOpen=bt,d.curveBundle=Ke,d.curveCardinal=qe,d.curveCardinalClosed=Te,d.curveCardinalOpen=at,d.curveCatmullRom=Ot,d.curveCatmullRomClosed=rr,d.curveCatmullRomOpen=Tr,d.curveLinear=u,d.curveLinearClosed=Ua,d.curveMonotoneX=Nt,d.curveMonotoneY=Kt,d.curveNatural=ta,d.curveStep=ra,d.curveStepAfter=Ha,d.curveStepBefore=Ia,d.line=P,d.lineRadial=W,d.linkHorizontal=ie,d.linkRadial=ee,d.linkVertical=j,d.pie=B,d.pointRadial=ue,d.radialArea=Q,d.radialLine=W,d.stack=xt,d.stackOffsetDiverging=Nr,d.stackOffsetExpand=ct,d.stackOffsetNone=$a,d.stackOffsetSilhouette=Or,d.stackOffsetWiggle=Rr,d.stackOrderAppearance=Lr,d.stackOrderAscending=Kr,d.stackOrderDescending=aa,d.stackOrderInsideOut=da,d.stackOrderNone=ai,d.stackOrderReverse=fa,d.symbol=kt,d.symbolCircle=re,d.symbolCross=ce,d.symbolDiamond=ze,d.symbolSquare=lt,d.symbolStar=tt,d.symbolTriangle=_e,d.symbolWye=Qe,d.symbols=Lt,Object.defineProperty(d,"__esModule",{value:!0})})}}),fG=Ze({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,yx(),LT(),N6()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3)})(Z,function(d,x,A,M){"use strict";function e(u){return u.target.depth}function t(u){return u.depth}function r(u,m){return m-1-u.height}function o(u,m){return u.sourceLinks.length?u.depth:m-1}function a(u){return u.targetLinks.length?u.depth:u.sourceLinks.length?x.min(u.sourceLinks,e)-1:0}function i(u){return function(){return u}}function n(u,m){return c(u.source,m.source)||u.index-m.index}function s(u,m){return c(u.target,m.target)||u.index-m.index}function c(u,m){return u.y0-m.y0}function f(u){return u.value}function g(u){return(u.y0+u.y1)/2}function v(u){return g(u.source)*u.value}function T(u){return g(u.target)*u.value}function l(u){return u.index}function _(u){return u.nodes}function w(u){return u.links}function S(u,m){var h=u.get(m);if(!h)throw new Error("missing: "+m);return h}var E=function(){var u=0,m=0,h=1,P=1,L=24,z=8,F=l,B=o,O=_,I=w,N=32,U=2/3;function W(){var $={nodes:O.apply(null,arguments),links:I.apply(null,arguments)};return Q($),ue($),le($),he($,N),G($),$}W.update=function($){return G($),$},W.nodeId=function($){return arguments.length?(F=typeof $=="function"?$:i($),W):F},W.nodeAlign=function($){return arguments.length?(B=typeof $=="function"?$:i($),W):B},W.nodeWidth=function($){return arguments.length?(L=+$,W):L},W.nodePadding=function($){return arguments.length?(z=+$,W):z},W.nodes=function($){return arguments.length?(O=typeof $=="function"?$:i($),W):O},W.links=function($){return arguments.length?(I=typeof $=="function"?$:i($),W):I},W.size=function($){return arguments.length?(u=m=0,h=+$[0],P=+$[1],W):[h-u,P-m]},W.extent=function($){return arguments.length?(u=+$[0][0],h=+$[1][0],m=+$[0][1],P=+$[1][1],W):[[u,m],[h,P]]},W.iterations=function($){return arguments.length?(N=+$,W):N};function Q($){$.nodes.forEach(function(X,oe){X.index=oe,X.sourceLinks=[],X.targetLinks=[]});var J=A.map($.nodes,F);$.links.forEach(function(X,oe){X.index=oe;var ie=X.source,j=X.target;typeof ie!="object"&&(ie=X.source=S(J,ie)),typeof j!="object"&&(j=X.target=S(J,j)),ie.sourceLinks.push(X),j.targetLinks.push(X)})}function ue($){$.nodes.forEach(function(J){J.value=Math.max(x.sum(J.sourceLinks,f),x.sum(J.targetLinks,f))})}function le($){var J,X,oe;for(J=$.nodes,X=[],oe=0;J.length;++oe,J=X,X=[])J.forEach(function(j){j.depth=oe,j.sourceLinks.forEach(function(ee){X.indexOf(ee.target)<0&&X.push(ee.target)})});for(J=$.nodes,X=[],oe=0;J.length;++oe,J=X,X=[])J.forEach(function(j){j.height=oe,j.targetLinks.forEach(function(ee){X.indexOf(ee.source)<0&&X.push(ee.source)})});var ie=(h-u-L)/(oe-1);$.nodes.forEach(function(j){j.x1=(j.x0=u+Math.max(0,Math.min(oe-1,Math.floor(B.call(null,j,oe))))*ie)+L})}function he($){var J=A.nest().key(function(ce){return ce.x0}).sortKeys(x.ascending).entries($.nodes).map(function(ce){return ce.values});ie(),re();for(var X=1,oe=N;oe>0;--oe)ee(X*=.99),re(),j(X),re();function ie(){var ce=x.max(J,function(ze){return ze.length}),be=U*(P-m)/(ce-1);z>be&&(z=be);var Ae=x.min(J,function(ze){return(P-m-(ze.length-1)*z)/x.sum(ze,f)});J.forEach(function(ze){ze.forEach(function(Re,Xe){Re.y1=(Re.y0=Xe)+Re.value*Ae})}),$.links.forEach(function(ze){ze.width=ze.value*Ae})}function j(ce){J.forEach(function(be){be.forEach(function(Ae){if(Ae.targetLinks.length){var ze=(x.sum(Ae.targetLinks,v)/x.sum(Ae.targetLinks,f)-g(Ae))*ce;Ae.y0+=ze,Ae.y1+=ze}})})}function ee(ce){J.slice().reverse().forEach(function(be){be.forEach(function(Ae){if(Ae.sourceLinks.length){var ze=(x.sum(Ae.sourceLinks,T)/x.sum(Ae.sourceLinks,f)-g(Ae))*ce;Ae.y0+=ze,Ae.y1+=ze}})})}function re(){J.forEach(function(ce){var be,Ae,ze=m,Re=ce.length,Xe;for(ce.sort(c),Xe=0;Xe<Re;++Xe)be=ce[Xe],Ae=ze-be.y0,Ae>0&&(be.y0+=Ae,be.y1+=Ae),ze=be.y1+z;if(Ae=ze-z-P,Ae>0)for(ze=be.y0-=Ae,be.y1-=Ae,Xe=Re-2;Xe>=0;--Xe)be=ce[Xe],Ae=be.y1+z-ze,Ae>0&&(be.y0-=Ae,be.y1-=Ae),ze=be.y0})}}function G($){$.nodes.forEach(function(J){J.sourceLinks.sort(s),J.targetLinks.sort(n)}),$.nodes.forEach(function(J){var X=J.y0,oe=X;J.sourceLinks.forEach(function(ie){ie.y0=X+ie.width/2,X+=ie.width}),J.targetLinks.forEach(function(ie){ie.y1=oe+ie.width/2,oe+=ie.width})})}return W};function y(u){return[u.source.x1,u.y0]}function b(u){return[u.target.x0,u.y1]}var p=function(){return M.linkHorizontal().source(y).target(b)};d.sankey=E,d.sankeyCenter=a,d.sankeyLeft=t,d.sankeyRight=r,d.sankeyJustify=o,d.sankeyLinkHorizontal=p,Object.defineProperty(d,"__esModule",{value:!0})})}}),hG=Ze({"node_modules/elementary-circuits-directed-graph/johnson.js"(Z,q){var d=B6();q.exports=function(A,M){var e=[],t=[],r=[],o={},a=[],i;function n(S){r[S]=!1,o.hasOwnProperty(S)&&Object.keys(o[S]).forEach(function(E){delete o[S][E],r[E]&&n(E)})}function s(S){var E=!1;t.push(S),r[S]=!0;var y,b;for(y=0;y<a[S].length;y++)b=a[S][y],b===i?(c(i,t),E=!0):r[b]||(E=s(b));if(E)n(S);else for(y=0;y<a[S].length;y++){b=a[S][y];var p=o[b];p||(p={},o[b]=p),p[b]=!0}return t.pop(),E}function c(S,E){var y=[].concat(E).concat(S);M?M(s):e.push(y)}function f(S){for(var E=0;E<A.length;E++)E<S&&(A[E]=[]),A[E]=A[E].filter(function(y){return y>=S})}function g(S){f(S);for(var E=A,y=d(E),b=y.components.filter(function(z){return z.length>1}),p=1/0,u,m=0;m<b.length;m++)for(var h=0;h<b[m].length;h++)b[m][h]<p&&(p=b[m][h],u=m);var P=b[u];if(!P)return!1;var L=A.map(function(z,F){return P.indexOf(F)===-1?[]:z.filter(function(B){return P.indexOf(B)!==-1})});return{leastVertex:p,adjList:L}}i=0;for(var v=A.length;i<v;){var T=g(i);if(i=T.leastVertex,a=T.adjList,a){for(var l=0;l<a.length;l++)for(var _=0;_<a[l].length;_++){var w=a[l][_];r[+w]=!1,o[w]={}}s(i),i=i+1}else i=v}if(!M)return e}}}),pG=Ze({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(Z,q){(function(d,x){typeof Z=="object"&&typeof q<"u"?x(Z,yx(),LT(),N6(),hG()):x(d.d3=d.d3||{},d.d3,d.d3,d.d3,null)})(Z,function(d,x,A,M,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;function t(Re){return Re.target.depth}function r(Re){return Re.depth}function o(Re,Xe){return Xe-1-Re.height}function a(Re,Xe){return Re.sourceLinks.length?Re.depth:Xe-1}function i(Re){return Re.targetLinks.length?Re.depth:Re.sourceLinks.length?x.min(Re.sourceLinks,t)-1:0}function n(Re){return function(){return Re}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Re){return typeof Re}:function(Re){return Re&&typeof Symbol=="function"&&Re.constructor===Symbol&&Re!==Symbol.prototype?"symbol":typeof Re};function c(Re,Xe){return g(Re.source,Xe.source)||Re.index-Xe.index}function f(Re,Xe){return g(Re.target,Xe.target)||Re.index-Xe.index}function g(Re,Xe){return Re.partOfCycle===Xe.partOfCycle?Re.y0-Xe.y0:Re.circularLinkType==="top"||Xe.circularLinkType==="bottom"?-1:1}function v(Re){return Re.value}function T(Re){return(Re.y0+Re.y1)/2}function l(Re){return T(Re.source)}function _(Re){return T(Re.target)}function w(Re){return Re.index}function S(Re){return Re.nodes}function E(Re){return Re.links}function y(Re,Xe){var it=Re.get(Xe);if(!it)throw new Error("missing: "+Xe);return it}function b(Re,Xe){return Xe(Re)}var p=25,u=10,m=.3;function h(){var Re=0,Xe=0,it=1,ot=1,tt=24,lt,Ee=w,_e=a,fe=S,Fe=E,rt=32,st=2,Qe,Lt=null;function kt(){var bt={nodes:fe.apply(null,arguments),links:Fe.apply(null,arguments)};Vt(bt),P(bt,Ee,Lt),Zt(bt),jr(bt),L(bt,Ee),wr(bt,rt,Ee),Ir(bt);for(var Be=4,Ke=0;Ke<Be;Ke++)ee(bt,ot,Ee),re(bt,ot,Ee),oe(bt,Xe,ot,Ee),ee(bt,ot,Ee),re(bt,ot,Ee);return ze(bt,Xe,ot),N(bt,st,ot,Ee),bt}kt.nodeId=function(bt){return arguments.length?(Ee=typeof bt=="function"?bt:n(bt),kt):Ee},kt.nodeAlign=function(bt){return arguments.length?(_e=typeof bt=="function"?bt:n(bt),kt):_e},kt.nodeWidth=function(bt){return arguments.length?(tt=+bt,kt):tt},kt.nodePadding=function(bt){return arguments.length?(lt=+bt,kt):lt},kt.nodes=function(bt){return arguments.length?(fe=typeof bt=="function"?bt:n(bt),kt):fe},kt.links=function(bt){return arguments.length?(Fe=typeof bt=="function"?bt:n(bt),kt):Fe},kt.size=function(bt){return arguments.length?(Re=Xe=0,it=+bt[0],ot=+bt[1],kt):[it-Re,ot-Xe]},kt.extent=function(bt){return arguments.length?(Re=+bt[0][0],it=+bt[1][0],Xe=+bt[0][1],ot=+bt[1][1],kt):[[Re,Xe],[it,ot]]},kt.iterations=function(bt){return arguments.length?(rt=+bt,kt):rt},kt.circularLinkGap=function(bt){return arguments.length?(st=+bt,kt):st},kt.nodePaddingRatio=function(bt){return arguments.length?(Qe=+bt,kt):Qe},kt.sortNodes=function(bt){return arguments.length?(Lt=bt,kt):Lt},kt.update=function(bt){return L(bt,Ee),Ir(bt),bt.links.forEach(function(Be){Be.circular&&(Be.circularLinkType=Be.y0+Be.y1<ot?"top":"bottom",Be.source.circularLinkType=Be.circularLinkType,Be.target.circularLinkType=Be.circularLinkType)}),ee(bt,ot,Ee,!1),re(bt,ot,Ee),N(bt,st,ot,Ee),bt};function Vt(bt){bt.nodes.forEach(function(Ke,Ue){Ke.index=Ue,Ke.sourceLinks=[],Ke.targetLinks=[]});var Be=A.map(bt.nodes,Ee);return bt.links.forEach(function(Ke,Ue){Ke.index=Ue;var Me=Ke.source,qe=Ke.target;(typeof Me>"u"?"undefined":s(Me))!=="object"&&(Me=Ke.source=y(Be,Me)),(typeof qe>"u"?"undefined":s(qe))!=="object"&&(qe=Ke.target=y(Be,qe)),Me.sourceLinks.push(Ke),qe.targetLinks.push(Ke)}),bt}function Zt(bt){bt.nodes.forEach(function(Be){Be.partOfCycle=!1,Be.value=Math.max(x.sum(Be.sourceLinks,v),x.sum(Be.targetLinks,v)),Be.sourceLinks.forEach(function(Ke){Ke.circular&&(Be.partOfCycle=!0,Be.circularLinkType=Ke.circularLinkType)}),Be.targetLinks.forEach(function(Ke){Ke.circular&&(Be.partOfCycle=!0,Be.circularLinkType=Ke.circularLinkType)})})}function Sr(bt){var Be=0,Ke=0,Ue=0,Me=0,qe=x.max(bt.nodes,function(Ce){return Ce.column});return bt.links.forEach(function(Ce){Ce.circular&&(Ce.circularLinkType=="top"?Be=Be+Ce.width:Ke=Ke+Ce.width,Ce.target.column==0&&(Me=Me+Ce.width),Ce.source.column==qe&&(Ue=Ue+Ce.width))}),Be=Be>0?Be+p+u:Be,Ke=Ke>0?Ke+p+u:Ke,Ue=Ue>0?Ue+p+u:Ue,Me=Me>0?Me+p+u:Me,{top:Be,bottom:Ke,left:Me,right:Ue}}function xr(bt,Be){var Ke=x.max(bt.nodes,function(at){return at.column}),Ue=it-Re,Me=ot-Xe,qe=Ue+Be.right+Be.left,Ce=Me+Be.top+Be.bottom,Te=Ue/qe,Pe=Me/Ce;return Re=Re*Te+Be.left,it=Be.right==0?it:it*Te,Xe=Xe*Pe+Be.top,ot=ot*Pe,bt.nodes.forEach(function(at){at.x0=Re+at.column*((it-Re-tt)/Ke),at.x1=at.x0+tt}),Pe}function jr(bt){var Be,Ke,Ue;for(Be=bt.nodes,Ke=[],Ue=0;Be.length;++Ue,Be=Ke,Ke=[])Be.forEach(function(Me){Me.depth=Ue,Me.sourceLinks.forEach(function(qe){Ke.indexOf(qe.target)<0&&!qe.circular&&Ke.push(qe.target)})});for(Be=bt.nodes,Ke=[],Ue=0;Be.length;++Ue,Be=Ke,Ke=[])Be.forEach(function(Me){Me.height=Ue,Me.targetLinks.forEach(function(qe){Ke.indexOf(qe.source)<0&&!qe.circular&&Ke.push(qe.source)})});bt.nodes.forEach(function(Me){Me.column=Math.floor(_e.call(null,Me,Ue))})}function wr(bt,Be,Ke){var Ue=A.nest().key(function(at){return at.column}).sortKeys(x.ascending).entries(bt.nodes).map(function(at){return at.values});Ce(Ke),Pe();for(var Me=1,qe=Be;qe>0;--qe)Te(Me*=.99,Ke),Pe();function Ce(at){if(Qe){var yt=1/0;Ue.forEach(function(rr){var Qt=ot*Qe/(rr.length+1);yt=Qt<yt?Qt:yt}),lt=yt}var Tt=x.min(Ue,function(rr){return(ot-Xe-(rr.length-1)*lt)/x.sum(rr,v)});Tt=Tt*m,bt.links.forEach(function(rr){rr.width=rr.value*Tt});var Ot=Sr(bt),Gt=xr(bt,Ot);Tt=Tt*Gt,bt.links.forEach(function(rr){rr.width=rr.value*Tt}),Ue.forEach(function(rr){var Qt=rr.length;rr.forEach(function(Tr,la){Tr.depth==Ue.length-1&&Qt==1||Tr.depth==0&&Qt==1?(Tr.y0=ot/2-Tr.value*Tt,Tr.y1=Tr.y0+Tr.value*Tt):Tr.partOfCycle?B(Tr,at)==0?(Tr.y0=ot/2+la,Tr.y1=Tr.y0+Tr.value*Tt):Tr.circularLinkType=="top"?(Tr.y0=Xe+la,Tr.y1=Tr.y0+Tr.value*Tt):(Tr.y0=ot-Tr.value*Tt-la,Tr.y1=Tr.y0+Tr.value*Tt):Ot.top==0||Ot.bottom==0?(Tr.y0=(ot-Xe)/Qt*la,Tr.y1=Tr.y0+Tr.value*Tt):(Tr.y0=(ot-Xe)/2-Qt/2+la,Tr.y1=Tr.y0+Tr.value*Tt)})})}function Te(at,yt){var Tt=Ue.length;Ue.forEach(function(Ot){var Gt=Ot.length,rr=Ot[0].depth;Ot.forEach(function(Qt){var Tr;if((Qt.sourceLinks.length||Qt.targetLinks.length)&&!(Qt.partOfCycle&&B(Qt,yt)>0))if(rr==0&&Gt==1)Tr=Qt.y1-Qt.y0,Qt.y0=ot/2-Tr/2,Qt.y1=ot/2+Tr/2;else if(rr==Tt-1&&Gt==1)Tr=Qt.y1-Qt.y0,Qt.y0=ot/2-Tr/2,Qt.y1=ot/2+Tr/2;else{var la=0,Ua=x.mean(Qt.sourceLinks,_),Ba=x.mean(Qt.targetLinks,l);Ua&&Ba?la=(Ua+Ba)/2:la=Ua||Ba;var Ra=(la-T(Qt))*at;Qt.y0+=Ra,Qt.y1+=Ra}})})}function Pe(){Ue.forEach(function(at){var yt,Tt,Ot=Xe,Gt=at.length,rr;for(at.sort(g),rr=0;rr<Gt;++rr)yt=at[rr],Tt=Ot-yt.y0,Tt>0&&(yt.y0+=Tt,yt.y1+=Tt),Ot=yt.y1+lt;if(Tt=Ot-lt-ot,Tt>0)for(Ot=yt.y0-=Tt,yt.y1-=Tt,rr=Gt-2;rr>=0;--rr)yt=at[rr],Tt=yt.y1+lt-Ot,Tt>0&&(yt.y0-=Tt,yt.y1-=Tt),Ot=yt.y0})}}function Ir(bt){bt.nodes.forEach(function(Be){Be.sourceLinks.sort(f),Be.targetLinks.sort(c)}),bt.nodes.forEach(function(Be){var Ke=Be.y0,Ue=Ke,Me=Be.y1,qe=Me;Be.sourceLinks.forEach(function(Ce){Ce.circular?(Ce.y0=Me-Ce.width/2,Me=Me-Ce.width):(Ce.y0=Ke+Ce.width/2,Ke+=Ce.width)}),Be.targetLinks.forEach(function(Ce){Ce.circular?(Ce.y1=qe-Ce.width/2,qe=qe-Ce.width):(Ce.y1=Ue+Ce.width/2,Ue+=Ce.width)})})}return kt}function P(Re,Xe,it){var ot=0;if(it===null){for(var tt=[],lt=0;lt<Re.links.length;lt++){var Ee=Re.links[lt],_e=Ee.source.index,fe=Ee.target.index;tt[_e]||(tt[_e]=[]),tt[fe]||(tt[fe]=[]),tt[_e].indexOf(fe)===-1&&tt[_e].push(fe)}var Fe=e(tt);Fe.sort(function(Lt,kt){return Lt.length-kt.length});var rt={};for(lt=0;lt<Fe.length;lt++){var st=Fe[lt],Qe=st.slice(-2);rt[Qe[0]]||(rt[Qe[0]]={}),rt[Qe[0]][Qe[1]]=!0}Re.links.forEach(function(Lt){var kt=Lt.target.index,Vt=Lt.source.index;kt===Vt||rt[Vt]&&rt[Vt][kt]?(Lt.circular=!0,Lt.circularLinkID=ot,ot=ot+1):Lt.circular=!1})}else Re.links.forEach(function(Lt){Lt.source[it]<Lt.target[it]?Lt.circular=!1:(Lt.circular=!0,Lt.circularLinkID=ot,ot=ot+1)})}function L(Re,Xe){var it=0,ot=0;Re.links.forEach(function(tt){tt.circular&&(tt.source.circularLinkType||tt.target.circularLinkType?tt.circularLinkType=tt.source.circularLinkType?tt.source.circularLinkType:tt.target.circularLinkType:tt.circularLinkType=it<ot?"top":"bottom",tt.circularLinkType=="top"?it=it+1:ot=ot+1,Re.nodes.forEach(function(lt){(b(lt,Xe)==b(tt.source,Xe)||b(lt,Xe)==b(tt.target,Xe))&&(lt.circularLinkType=tt.circularLinkType)}))}),Re.links.forEach(function(tt){tt.circular&&(tt.source.circularLinkType==tt.target.circularLinkType&&(tt.circularLinkType=tt.source.circularLinkType),Ae(tt,Xe)&&(tt.circularLinkType=tt.source.circularLinkType))})}function z(Re){var Xe=Math.abs(Re.y1-Re.y0),it=Math.abs(Re.target.x0-Re.source.x1);return Math.atan(it/Xe)}function F(Re,Xe){return Re.source.column<Xe.target.column?!1:!(Re.target.column>Xe.source.column)}function B(Re,Xe){var it=0;Re.sourceLinks.forEach(function(tt){it=tt.circular&&!Ae(tt,Xe)?it+1:it});var ot=0;return Re.targetLinks.forEach(function(tt){ot=tt.circular&&!Ae(tt,Xe)?ot+1:ot}),it+ot}function O(Re){var Xe=Re.source.sourceLinks,it=0;Xe.forEach(function(lt){it=lt.circular?it+1:it});var ot=Re.target.targetLinks,tt=0;return ot.forEach(function(lt){tt=lt.circular?tt+1:tt}),!(it>1||tt>1)}function I(Re,Xe,it){return Re.sort(W),Re.forEach(function(ot,tt){var lt=0;if(Ae(ot,it)&&O(ot))ot.circularPathData.verticalBuffer=lt+ot.width/2;else{var Ee=0;for(Ee;Ee<tt;Ee++)if(F(Re[tt],Re[Ee])){var _e=Re[Ee].circularPathData.verticalBuffer+Re[Ee].width/2+Xe;lt=_e>lt?_e:lt}ot.circularPathData.verticalBuffer=lt+ot.width/2}}),Re}function N(Re,Xe,it,ot){var tt=5,lt=x.min(Re.links,function(fe){return fe.source.y0});Re.links.forEach(function(fe){fe.circular&&(fe.circularPathData={})});var Ee=Re.links.filter(function(fe){return fe.circularLinkType=="top"});I(Ee,Xe,ot);var _e=Re.links.filter(function(fe){return fe.circularLinkType=="bottom"});I(_e,Xe,ot),Re.links.forEach(function(fe){if(fe.circular){if(fe.circularPathData.arcRadius=fe.width+u,fe.circularPathData.leftNodeBuffer=tt,fe.circularPathData.rightNodeBuffer=tt,fe.circularPathData.sourceWidth=fe.source.x1-fe.source.x0,fe.circularPathData.sourceX=fe.source.x0+fe.circularPathData.sourceWidth,fe.circularPathData.targetX=fe.target.x0,fe.circularPathData.sourceY=fe.y0,fe.circularPathData.targetY=fe.y1,Ae(fe,ot)&&O(fe))fe.circularPathData.leftSmallArcRadius=u+fe.width/2,fe.circularPathData.leftLargeArcRadius=u+fe.width/2,fe.circularPathData.rightSmallArcRadius=u+fe.width/2,fe.circularPathData.rightLargeArcRadius=u+fe.width/2,fe.circularLinkType=="bottom"?(fe.circularPathData.verticalFullExtent=fe.source.y1+p+fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.rightLargeArcRadius):(fe.circularPathData.verticalFullExtent=fe.source.y0-p-fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.rightLargeArcRadius);else{var Fe=fe.source.column,rt=fe.circularLinkType,st=Re.links.filter(function(kt){return kt.source.column==Fe&&kt.circularLinkType==rt});fe.circularLinkType=="bottom"?st.sort(ue):st.sort(Q);var Qe=0;st.forEach(function(kt,Vt){kt.circularLinkID==fe.circularLinkID&&(fe.circularPathData.leftSmallArcRadius=u+fe.width/2+Qe,fe.circularPathData.leftLargeArcRadius=u+fe.width/2+Vt*Xe+Qe),Qe=Qe+kt.width}),Fe=fe.target.column,st=Re.links.filter(function(kt){return kt.target.column==Fe&&kt.circularLinkType==rt}),fe.circularLinkType=="bottom"?st.sort(he):st.sort(le),Qe=0,st.forEach(function(kt,Vt){kt.circularLinkID==fe.circularLinkID&&(fe.circularPathData.rightSmallArcRadius=u+fe.width/2+Qe,fe.circularPathData.rightLargeArcRadius=u+fe.width/2+Vt*Xe+Qe),Qe=Qe+kt.width}),fe.circularLinkType=="bottom"?(fe.circularPathData.verticalFullExtent=Math.max(it,fe.source.y1,fe.target.y1)+p+fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.rightLargeArcRadius):(fe.circularPathData.verticalFullExtent=lt-p-fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.rightLargeArcRadius)}fe.circularPathData.leftInnerExtent=fe.circularPathData.sourceX+fe.circularPathData.leftNodeBuffer,fe.circularPathData.rightInnerExtent=fe.circularPathData.targetX-fe.circularPathData.rightNodeBuffer,fe.circularPathData.leftFullExtent=fe.circularPathData.sourceX+fe.circularPathData.leftLargeArcRadius+fe.circularPathData.leftNodeBuffer,fe.circularPathData.rightFullExtent=fe.circularPathData.targetX-fe.circularPathData.rightLargeArcRadius-fe.circularPathData.rightNodeBuffer}if(fe.circular)fe.path=U(fe);else{var Lt=M.linkHorizontal().source(function(kt){var Vt=kt.source.x0+(kt.source.x1-kt.source.x0),Zt=kt.y0;return[Vt,Zt]}).target(function(kt){var Vt=kt.target.x0,Zt=kt.y1;return[Vt,Zt]});fe.path=Lt(fe)}})}function U(Re){var Xe="";return Re.circularLinkType=="top"?Xe="M"+Re.circularPathData.sourceX+" "+Re.circularPathData.sourceY+" L"+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.sourceY+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftSmallArcRadius+" 0 0 0 "+Re.circularPathData.leftFullExtent+" "+(Re.circularPathData.sourceY-Re.circularPathData.leftSmallArcRadius)+" L"+Re.circularPathData.leftFullExtent+" "+Re.circularPathData.verticalLeftInnerExtent+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftLargeArcRadius+" 0 0 0 "+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.verticalFullExtent+" L"+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.verticalFullExtent+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightLargeArcRadius+" 0 0 0 "+Re.circularPathData.rightFullExtent+" "+Re.circularPathData.verticalRightInnerExtent+" L"+Re.circularPathData.rightFullExtent+" "+(Re.circularPathData.targetY-Re.circularPathData.rightSmallArcRadius)+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightSmallArcRadius+" 0 0 0 "+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.targetY+" L"+Re.circularPathData.targetX+" "+Re.circularPathData.targetY:Xe="M"+Re.circularPathData.sourceX+" "+Re.circularPathData.sourceY+" L"+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.sourceY+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftSmallArcRadius+" 0 0 1 "+Re.circularPathData.leftFullExtent+" "+(Re.circularPathData.sourceY+Re.circularPathData.leftSmallArcRadius)+" L"+Re.circularPathData.leftFullExtent+" "+Re.circularPathData.verticalLeftInnerExtent+" A"+Re.circularPathData.leftLargeArcRadius+" "+Re.circularPathData.leftLargeArcRadius+" 0 0 1 "+Re.circularPathData.leftInnerExtent+" "+Re.circularPathData.verticalFullExtent+" L"+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.verticalFullExtent+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightLargeArcRadius+" 0 0 1 "+Re.circularPathData.rightFullExtent+" "+Re.circularPathData.verticalRightInnerExtent+" L"+Re.circularPathData.rightFullExtent+" "+(Re.circularPathData.targetY+Re.circularPathData.rightSmallArcRadius)+" A"+Re.circularPathData.rightLargeArcRadius+" "+Re.circularPathData.rightSmallArcRadius+" 0 0 1 "+Re.circularPathData.rightInnerExtent+" "+Re.circularPathData.targetY+" L"+Re.circularPathData.targetX+" "+Re.circularPathData.targetY,Xe}function W(Re,Xe){return G(Re)==G(Xe)?Re.circularLinkType=="bottom"?ue(Re,Xe):Q(Re,Xe):G(Xe)-G(Re)}function Q(Re,Xe){return Re.y0-Xe.y0}function ue(Re,Xe){return Xe.y0-Re.y0}function le(Re,Xe){return Re.y1-Xe.y1}function he(Re,Xe){return Xe.y1-Re.y1}function G(Re){return Re.target.column-Re.source.column}function $(Re){return Re.target.x0-Re.source.x1}function J(Re,Xe){var it=z(Re),ot=$(Xe)/Math.tan(it),tt=be(Re)=="up"?Re.y1+ot:Re.y1-ot;return tt}function X(Re,Xe){var it=z(Re),ot=$(Xe)/Math.tan(it),tt=be(Re)=="up"?Re.y1-ot:Re.y1+ot;return tt}function oe(Re,Xe,it,ot){Re.links.forEach(function(tt){if(!tt.circular&&tt.target.column-tt.source.column>1){var lt=tt.source.column+1,Ee=tt.target.column-1,_e=1,fe=Ee-lt+1;for(_e=1;lt<=Ee;lt++,_e++)Re.nodes.forEach(function(Fe){if(Fe.column==lt){var rt=_e/(fe+1),st=Math.pow(1-rt,3),Qe=3*rt*Math.pow(1-rt,2),Lt=3*Math.pow(rt,2)*(1-rt),kt=Math.pow(rt,3),Vt=st*tt.y0+Qe*tt.y0+Lt*tt.y1+kt*tt.y1,Zt=Vt-tt.width/2,Sr=Vt+tt.width/2,xr;Zt>Fe.y0&&Zt<Fe.y1?(xr=Fe.y1-Zt+10,xr=Fe.circularLinkType=="bottom"?xr:-xr,Fe=j(Fe,xr,Xe,it),Re.nodes.forEach(function(jr){b(jr,ot)==b(Fe,ot)||jr.column!=Fe.column||ie(Fe,jr)&&j(jr,xr,Xe,it)})):Sr>Fe.y0&&Sr<Fe.y1?(xr=Sr-Fe.y0+10,Fe=j(Fe,xr,Xe,it),Re.nodes.forEach(function(jr){b(jr,ot)==b(Fe,ot)||jr.column!=Fe.column||jr.y0<Fe.y1&&jr.y1>Fe.y1&&j(jr,xr,Xe,it)})):Zt<Fe.y0&&Sr>Fe.y1&&(xr=Sr-Fe.y0+10,Fe=j(Fe,xr,Xe,it),Re.nodes.forEach(function(jr){b(jr,ot)==b(Fe,ot)||jr.column!=Fe.column||jr.y0<Fe.y1&&jr.y1>Fe.y1&&j(jr,xr,Xe,it)}))}})}})}function ie(Re,Xe){return Re.y0>Xe.y0&&Re.y0<Xe.y1||Re.y1>Xe.y0&&Re.y1<Xe.y1?!0:Re.y0<Xe.y0&&Re.y1>Xe.y1}function j(Re,Xe,it,ot){return Re.y0+Xe>=it&&Re.y1+Xe<=ot&&(Re.y0=Re.y0+Xe,Re.y1=Re.y1+Xe,Re.targetLinks.forEach(function(tt){tt.y1=tt.y1+Xe}),Re.sourceLinks.forEach(function(tt){tt.y0=tt.y0+Xe})),Re}function ee(Re,Xe,it,ot){Re.nodes.forEach(function(tt){ot&&tt.y+(tt.y1-tt.y0)>Xe&&(tt.y=tt.y-(tt.y+(tt.y1-tt.y0)-Xe));var lt=Re.links.filter(function(fe){return b(fe.source,it)==b(tt,it)}),Ee=lt.length;Ee>1&&lt.sort(function(fe,Fe){if(!fe.circular&&!Fe.circular){if(fe.target.column==Fe.target.column)return fe.y1-Fe.y1;if(ce(fe,Fe)){if(fe.target.column>Fe.target.column){var rt=X(Fe,fe);return fe.y1-rt}if(Fe.target.column>fe.target.column){var st=X(fe,Fe);return st-Fe.y1}}else return fe.y1-Fe.y1}if(fe.circular&&!Fe.circular)return fe.circularLinkType=="top"?-1:1;if(Fe.circular&&!fe.circular)return Fe.circularLinkType=="top"?1:-1;if(fe.circular&&Fe.circular)return fe.circularLinkType===Fe.circularLinkType&&fe.circularLinkType=="top"?fe.target.column===Fe.target.column?fe.target.y1-Fe.target.y1:Fe.target.column-fe.target.column:fe.circularLinkType===Fe.circularLinkType&&fe.circularLinkType=="bottom"?fe.target.column===Fe.target.column?Fe.target.y1-fe.target.y1:fe.target.column-Fe.target.column:fe.circularLinkType=="top"?-1:1});var _e=tt.y0;lt.forEach(function(fe){fe.y0=_e+fe.width/2,_e=_e+fe.width}),lt.forEach(function(fe,Fe){if(fe.circularLinkType=="bottom"){var rt=Fe+1,st=0;for(rt;rt<Ee;rt++)st=st+lt[rt].width;fe.y0=tt.y1-st-fe.width/2}})})}function re(Re,Xe,it){Re.nodes.forEach(function(ot){var tt=Re.links.filter(function(_e){return b(_e.target,it)==b(ot,it)}),lt=tt.length;lt>1&&tt.sort(function(_e,fe){if(!_e.circular&&!fe.circular){if(_e.source.column==fe.source.column)return _e.y0-fe.y0;if(ce(_e,fe)){if(fe.source.column<_e.source.column){var Fe=J(fe,_e);return _e.y0-Fe}if(_e.source.column<fe.source.column){var rt=J(_e,fe);return rt-fe.y0}}else return _e.y0-fe.y0}if(_e.circular&&!fe.circular)return _e.circularLinkType=="top"?-1:1;if(fe.circular&&!_e.circular)return fe.circularLinkType=="top"?1:-1;if(_e.circular&&fe.circular)return _e.circularLinkType===fe.circularLinkType&&_e.circularLinkType=="top"?_e.source.column===fe.source.column?_e.source.y1-fe.source.y1:_e.source.column-fe.source.column:_e.circularLinkType===fe.circularLinkType&&_e.circularLinkType=="bottom"?_e.source.column===fe.source.column?_e.source.y1-fe.source.y1:fe.source.column-_e.source.column:_e.circularLinkType=="top"?-1:1});var Ee=ot.y0;tt.forEach(function(_e){_e.y1=Ee+_e.width/2,Ee=Ee+_e.width}),tt.forEach(function(_e,fe){if(_e.circularLinkType=="bottom"){var Fe=fe+1,rt=0;for(Fe;Fe<lt;Fe++)rt=rt+tt[Fe].width;_e.y1=ot.y1-rt-_e.width/2}})})}function ce(Re,Xe){return be(Re)==be(Xe)}function be(Re){return Re.y0-Re.y1>0?"up":"down"}function Ae(Re,Xe){return b(Re.source,Xe)==b(Re.target,Xe)}function ze(Re,Xe,it){var ot=Re.nodes,tt=Re.links,lt=!1,Ee=!1;if(tt.forEach(function(Qe){Qe.circularLinkType=="top"?lt=!0:Qe.circularLinkType=="bottom"&&(Ee=!0)}),lt==!1||Ee==!1){var _e=x.min(ot,function(Qe){return Qe.y0}),fe=x.max(ot,function(Qe){return Qe.y1}),Fe=fe-_e,rt=it-Xe,st=rt/Fe;ot.forEach(function(Qe){var Lt=(Qe.y1-Qe.y0)*st;Qe.y0=(Qe.y0-_e)*st,Qe.y1=Qe.y0+Lt}),tt.forEach(function(Qe){Qe.y0=(Qe.y0-_e)*st,Qe.y1=(Qe.y1-_e)*st,Qe.width=Qe.width*st})}}d.sankeyCircular=h,d.sankeyCenter=i,d.sankeyLeft=r,d.sankeyRight=o,d.sankeyJustify=a,Object.defineProperty(d,"__esModule",{value:!0})})}}),U6=Ze({"src/traces/sankey/constants.js"(Z,q){"use strict";q.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"}}}}),dG=Ze({"src/traces/sankey/render.js"(Z,q){"use strict";var d=uG(),x=(hg(),nh(f0)).interpolateNumber,A=On(),M=fG(),e=pG(),t=U6(),r=Ch(),o=Yn(),a=as(),i=ca(),n=i.strTranslate,s=i.strRotate,c=Cv(),f=c.keyFun,g=c.repeat,v=c.unwrap,T=fu(),l=oo(),_=mh(),w=_.CAP_SHIFT,S=_.LINE_SPACING,E=3;function y(J,X,oe){var ie=v(X),j=ie.trace,ee=j.domain,re=j.orientation==="h",ce=j.node.pad,be=j.node.thickness,Ae={justify:M.sankeyJustify,left:M.sankeyLeft,right:M.sankeyRight,center:M.sankeyCenter}[j.node.align],ze=J.width*(ee.x[1]-ee.x[0]),Re=J.height*(ee.y[1]-ee.y[0]),Xe=ie._nodes,it=ie._links,ot=ie.circular,tt;ot?tt=e.sankeyCircular().circularLinkGap(0):tt=M.sankey(),tt.iterations(t.sankeyIterations).size(re?[ze,Re]:[Re,ze]).nodeWidth(be).nodePadding(ce).nodeId(function(jr){return jr.pointNumber}).nodeAlign(Ae).nodes(Xe).links(it);var lt=tt();tt.nodePadding()<ce&&i.warn("node.pad was reduced to ",tt.nodePadding()," to fit within the figure.");var Ee,_e,fe;for(var Fe in ie._groupLookup){var rt=parseInt(ie._groupLookup[Fe]),st;for(Ee=0;Ee<lt.nodes.length;Ee++)if(lt.nodes[Ee].pointNumber===rt){st=lt.nodes[Ee];break}if(st){var Qe={pointNumber:parseInt(Fe),x0:st.x0,x1:st.x1,y0:st.y0,y1:st.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};lt.nodes.unshift(Qe),st.childrenNodes.unshift(Qe)}}function Lt(){for(Ee=0;Ee<lt.nodes.length;Ee++){var jr=lt.nodes[Ee],wr={},Ir,bt;for(_e=0;_e<jr.targetLinks.length;_e++)bt=jr.targetLinks[_e],Ir=bt.source.pointNumber+":"+bt.target.pointNumber,wr.hasOwnProperty(Ir)||(wr[Ir]=[]),wr[Ir].push(bt);var Be=Object.keys(wr);for(_e=0;_e<Be.length;_e++){Ir=Be[_e];var Ke=wr[Ir],Ue=0,Me={};for(fe=0;fe<Ke.length;fe++)bt=Ke[fe],Me[bt.label]||(Me[bt.label]=0),Me[bt.label]+=bt.value,Ue+=bt.value;for(fe=0;fe<Ke.length;fe++)bt=Ke[fe],bt.flow={value:Ue,labelConcentration:Me[bt.label]/Ue,concentration:bt.value/Ue,links:Ke},bt.concentrationscale&&(bt.color=r(bt.concentrationscale(bt.flow.labelConcentration)))}var qe=0;for(_e=0;_e<jr.sourceLinks.length;_e++)qe+=jr.sourceLinks[_e].value;for(_e=0;_e<jr.sourceLinks.length;_e++)bt=jr.sourceLinks[_e],bt.concentrationOut=bt.value/qe;var Ce=0;for(_e=0;_e<jr.targetLinks.length;_e++)Ce+=jr.targetLinks[_e].value;for(_e=0;_e<jr.targetLinks.length;_e++)bt=jr.targetLinks[_e],bt.concenrationIn=bt.value/Ce}}Lt();function kt(jr){jr.forEach(function(wr){var Ir,bt,Be=0,Ke=wr.length,Ue;for(wr.sort(function(Me,qe){return Me.y0-qe.y0}),Ue=0;Ue<Ke;++Ue)Ir=wr[Ue],Ir.y0>=Be||(bt=Be-Ir.y0,bt>1e-6&&(Ir.y0+=bt,Ir.y1+=bt)),Be=Ir.y1+ce})}function Vt(jr){var wr=jr.map(function(qe,Ce){return{x0:qe.x0,index:Ce}}).sort(function(qe,Ce){return qe.x0-Ce.x0}),Ir=[],bt=-1,Be,Ke=-1/0,Ue;for(Ee=0;Ee<wr.length;Ee++){var Me=jr[wr[Ee].index];Me.x0>Ke+be&&(bt+=1,Be=Me.x0),Ke=Me.x0,Ir[bt]||(Ir[bt]=[]),Ir[bt].push(Me),Ue=Be-Me.x0,Me.x0+=Ue,Me.x1+=Ue}return Ir}if(j.node.x.length&&j.node.y.length){for(Ee=0;Ee<Math.min(j.node.x.length,j.node.y.length,lt.nodes.length);Ee++)if(j.node.x[Ee]&&j.node.y[Ee]){var Zt=[j.node.x[Ee]*ze,j.node.y[Ee]*Re];lt.nodes[Ee].x0=Zt[0]-be/2,lt.nodes[Ee].x1=Zt[0]+be/2;var Sr=lt.nodes[Ee].y1-lt.nodes[Ee].y0;lt.nodes[Ee].y0=Zt[1]-Sr/2,lt.nodes[Ee].y1=Zt[1]+Sr/2}if(j.arrangement==="snap"){Xe=lt.nodes;var xr=Vt(Xe);kt(xr)}tt.update(lt)}return{circular:ot,key:oe,trace:j,guid:i.randstr(),horizontal:re,width:ze,height:Re,nodePad:j.node.pad,nodeLineColor:j.node.line.color,nodeLineWidth:j.node.line.width,linkLineColor:j.link.line.color,linkLineWidth:j.link.line.width,linkArrowLength:j.link.arrowlen,valueFormat:j.valueformat,valueSuffix:j.valuesuffix,textFont:j.textfont,translateX:ee.x[0]*J.width+J.margin.l,translateY:J.height-ee.y[1]*J.height+J.margin.t,dragParallel:re?Re:ze,dragPerpendicular:re?ze:Re,arrangement:j.arrangement,sankey:tt,graph:lt,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(J,X,oe){var ie=r(X.color),j=r(X.hovercolor),ee=X.source.label+"|"+X.target.label,re=ee+"__"+oe;return X.trace=J.trace,X.curveNumber=J.trace.index,{circular:J.circular,key:re,traceId:J.key,pointNumber:X.pointNumber,link:X,tinyColorHue:o.tinyRGB(ie),tinyColorAlpha:ie.getAlpha(),tinyColorHoverHue:o.tinyRGB(j),tinyColorHoverAlpha:j.getAlpha(),linkPath:u,linkLineColor:J.linkLineColor,linkLineWidth:J.linkLineWidth,linkArrowLength:J.linkArrowLength,valueFormat:J.valueFormat,valueSuffix:J.valueSuffix,sankey:J.sankey,parent:J,interactionState:J.interactionState,flow:X.flow}}function p(J,X){var oe="",ie=J.width/2,j=J.circularPathData,ee=j.sourceX+j.verticalBuffer<j.targetX,re=j.rightFullExtent-j.rightLargeArcRadius-X<=j.leftFullExtent-ie,ce=Math.abs(j.rightFullExtent-j.leftFullExtent-ie)<ie;return J.circularLinkType==="top"?(oe="M "+(j.targetX-X)+" "+(j.targetY+ie)+" L "+(j.rightInnerExtent-X)+" "+(j.targetY+ie)+"A "+(j.rightLargeArcRadius+ie)+" "+(j.rightSmallArcRadius+ie)+" 0 0 1 "+(j.rightFullExtent-ie-X)+" "+(j.targetY-j.rightSmallArcRadius)+"L "+(j.rightFullExtent-ie-X)+" "+j.verticalRightInnerExtent,ee&&re?oe+=" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 1 "+(j.rightFullExtent+ie-X-(j.rightLargeArcRadius-ie))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius+ie))+" L "+(j.rightFullExtent+ie-(j.rightLargeArcRadius-ie)-X)+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius+ie))+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftLargeArcRadius+ie)+" 0 0 1 "+(j.leftFullExtent+ie)+" "+j.verticalRightInnerExtent:ee?oe+=" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightLargeArcRadius-ie)+" 0 0 0 "+(j.rightFullExtent-ie-X-(j.rightLargeArcRadius-ie))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius-ie))+" L "+(j.leftFullExtent+ie+(j.rightLargeArcRadius-ie))+" "+(j.verticalRightInnerExtent-(j.rightLargeArcRadius-ie))+" A "+(j.leftLargeArcRadius-ie)+" "+(j.leftLargeArcRadius-ie)+" 0 0 0 "+(j.leftFullExtent+ie)+" "+j.verticalLeftInnerExtent:oe+=" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 1 "+(j.rightInnerExtent-X)+" "+(j.verticalFullExtent-ie)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent-ie)+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftLargeArcRadius+ie)+" 0 0 1 "+(j.leftFullExtent+ie)+" "+j.verticalLeftInnerExtent,oe+=" L "+(j.leftFullExtent+ie)+" "+(j.sourceY-j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftSmallArcRadius+ie)+" 0 0 1 "+j.leftInnerExtent+" "+(j.sourceY+ie)+" L "+j.sourceX+" "+(j.sourceY+ie)+" L "+j.sourceX+" "+(j.sourceY-ie)+" L "+j.leftInnerExtent+" "+(j.sourceY-ie)+" A "+(j.leftLargeArcRadius-ie)+" "+(j.leftSmallArcRadius-ie)+" 0 0 0 "+(j.leftFullExtent-ie)+" "+(j.sourceY-j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ie)+" "+j.verticalLeftInnerExtent,ee&&re?oe+=" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftSmallArcRadius+ie)+" 0 0 0 "+(j.leftFullExtent-ie)+" "+(j.verticalFullExtent+ie)+"L"+(j.rightFullExtent+ie-X)+" "+(j.verticalFullExtent+ie)+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftSmallArcRadius+ie)+" 0 0 0 "+(j.rightFullExtent+ie-X)+" "+j.verticalRightInnerExtent:ee?oe+=" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftSmallArcRadius+ie)+" 0 0 1 "+(j.leftFullExtent+ie)+" "+(j.verticalFullExtent-ie)+" L "+(j.rightFullExtent-ie-X)+" "+(j.verticalFullExtent-ie)+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftSmallArcRadius+ie)+" 0 0 1 "+(j.rightFullExtent+ie-X)+" "+j.verticalRightInnerExtent:oe+=" A "+(j.leftLargeArcRadius-ie)+" "+(j.leftLargeArcRadius-ie)+" 0 0 0 "+j.leftInnerExtent+" "+(j.verticalFullExtent+ie)+" L "+(j.rightInnerExtent-X)+" "+(j.verticalFullExtent+ie)+" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightLargeArcRadius-ie)+" 0 0 0 "+(j.rightFullExtent+ie-X)+" "+j.verticalRightInnerExtent,oe+=" L "+(j.rightFullExtent+ie-X)+" "+(j.targetY-j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightSmallArcRadius-ie)+" 0 0 0 "+(j.rightInnerExtent-X)+" "+(j.targetY-ie)+" L "+(j.targetX-X)+" "+(j.targetY-ie)+(X>0?" L "+j.targetX+" "+j.targetY:"")+"Z"):(oe="M "+(j.targetX-X)+" "+(j.targetY-ie)+" L "+(j.rightInnerExtent-X)+" "+(j.targetY-ie)+" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightSmallArcRadius+ie)+" 0 0 0 "+(j.rightFullExtent-ie-X)+" "+(j.targetY+j.rightSmallArcRadius)+" L "+(j.rightFullExtent-ie-X)+" "+j.verticalRightInnerExtent,ee&&re?oe+=" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 0 "+(j.rightInnerExtent-ie-X)+" "+(j.verticalFullExtent+ie)+" L "+(j.rightFullExtent+ie-X-(j.rightLargeArcRadius-ie))+" "+(j.verticalFullExtent+ie)+" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 0 "+(j.leftFullExtent+ie)+" "+j.verticalLeftInnerExtent:ee?oe+=" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightSmallArcRadius-ie)+" 0 0 1 "+(j.rightFullExtent-X-ie-(j.rightLargeArcRadius-ie))+" "+(j.verticalFullExtent-ie)+" L "+(j.leftFullExtent+ie+(j.rightLargeArcRadius-ie))+" "+(j.verticalFullExtent-ie)+" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightSmallArcRadius-ie)+" 0 0 1 "+(j.leftFullExtent+ie)+" "+j.verticalLeftInnerExtent:oe+=" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 0 "+(j.rightInnerExtent-X)+" "+(j.verticalFullExtent+ie)+" L "+j.leftInnerExtent+" "+(j.verticalFullExtent+ie)+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftLargeArcRadius+ie)+" 0 0 0 "+(j.leftFullExtent+ie)+" "+j.verticalLeftInnerExtent,oe+=" L "+(j.leftFullExtent+ie)+" "+(j.sourceY+j.leftSmallArcRadius)+" A "+(j.leftLargeArcRadius+ie)+" "+(j.leftSmallArcRadius+ie)+" 0 0 0 "+j.leftInnerExtent+" "+(j.sourceY-ie)+" L "+j.sourceX+" "+(j.sourceY-ie)+" L "+j.sourceX+" "+(j.sourceY+ie)+" L "+j.leftInnerExtent+" "+(j.sourceY+ie)+" A "+(j.leftLargeArcRadius-ie)+" "+(j.leftSmallArcRadius-ie)+" 0 0 1 "+(j.leftFullExtent-ie)+" "+(j.sourceY+j.leftSmallArcRadius)+" L "+(j.leftFullExtent-ie)+" "+j.verticalLeftInnerExtent,ee&&re?oe+=" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightSmallArcRadius-ie)+" 0 0 1 "+(j.leftFullExtent-ie-(j.rightLargeArcRadius-ie))+" "+(j.verticalFullExtent-ie)+" L "+(j.rightFullExtent+ie-X+(j.rightLargeArcRadius-ie))+" "+(j.verticalFullExtent-ie)+" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightSmallArcRadius-ie)+" 0 0 1 "+(j.rightFullExtent+ie-X)+" "+j.verticalRightInnerExtent:ee?oe+=" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 0 "+(j.leftFullExtent+ie)+" "+(j.verticalFullExtent+ie)+" L "+(j.rightFullExtent-X-ie)+" "+(j.verticalFullExtent+ie)+" A "+(j.rightLargeArcRadius+ie)+" "+(j.rightLargeArcRadius+ie)+" 0 0 0 "+(j.rightFullExtent+ie-X)+" "+j.verticalRightInnerExtent:oe+=" A "+(j.leftLargeArcRadius-ie)+" "+(j.leftLargeArcRadius-ie)+" 0 0 1 "+j.leftInnerExtent+" "+(j.verticalFullExtent-ie)+" L "+(j.rightInnerExtent-X)+" "+(j.verticalFullExtent-ie)+" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightLargeArcRadius-ie)+" 0 0 1 "+(j.rightFullExtent+ie-X)+" "+j.verticalRightInnerExtent,oe+=" L "+(j.rightFullExtent+ie-X)+" "+(j.targetY+j.rightSmallArcRadius)+" A "+(j.rightLargeArcRadius-ie)+" "+(j.rightSmallArcRadius-ie)+" 0 0 1 "+(j.rightInnerExtent-X)+" "+(j.targetY+ie)+" L "+(j.targetX-X)+" "+(j.targetY+ie)+(X>0?" L "+j.targetX+" "+j.targetY:"")+"Z"),oe}function u(){var J=.5;function X(oe){var ie=oe.linkArrowLength;if(oe.link.circular)return p(oe.link,ie);var j=Math.abs((oe.link.target.x0-oe.link.source.x1)/2);ie>j&&(ie=j);var ee=oe.link.source.x1,re=oe.link.target.x0-ie,ce=x(ee,re),be=ce(J),Ae=ce(1-J),ze=oe.link.y0-oe.link.width/2,Re=oe.link.y0+oe.link.width/2,Xe=oe.link.y1-oe.link.width/2,it=oe.link.y1+oe.link.width/2,ot="M"+ee+","+ze,tt="C"+be+","+ze+" "+Ae+","+Xe+" "+re+","+Xe,lt="C"+Ae+","+it+" "+be+","+Re+" "+ee+","+Re,Ee=ie>0?"L"+(re+ie)+","+(Xe+oe.link.width/2):"";return Ee+="L"+re+","+it,ot+tt+Ee+lt+"Z"}return X}function m(J,X){var oe=r(X.color),ie=t.nodePadAcross,j=J.nodePad/2;X.dx=X.x1-X.x0,X.dy=X.y1-X.y0;var ee=X.dx,re=Math.max(.5,X.dy),ce="node_"+X.pointNumber;return X.group&&(ce=i.randstr()),X.trace=J.trace,X.curveNumber=J.trace.index,{index:X.pointNumber,key:ce,partOfGroup:X.partOfGroup||!1,group:X.group,traceId:J.key,trace:J.trace,node:X,nodePad:J.nodePad,nodeLineColor:J.nodeLineColor,nodeLineWidth:J.nodeLineWidth,textFont:J.textFont,size:J.horizontal?J.height:J.width,visibleWidth:Math.ceil(ee),visibleHeight:re,zoneX:-ie,zoneY:-j,zoneWidth:ee+2*ie,zoneHeight:re+2*j,labelY:J.horizontal?X.dy/2+1:X.dx/2+1,left:X.originalLayer===1,sizeAcross:J.width,forceLayouts:J.forceLayouts,horizontal:J.horizontal,darkBackground:oe.getBrightness()<=128,tinyColorHue:o.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),valueFormat:J.valueFormat,valueSuffix:J.valueSuffix,sankey:J.sankey,graph:J.graph,arrangement:J.arrangement,uniqueNodeLabelPathId:[J.guid,J.key,ce].join("_"),interactionState:J.interactionState,figure:J}}function h(J){J.attr("transform",function(X){return n(X.node.x0.toFixed(3),X.node.y0.toFixed(3))})}function P(J){J.call(h)}function L(J,X){J.call(P),X.attr("d",u())}function z(J){J.attr("width",function(X){return X.node.x1-X.node.x0}).attr("height",function(X){return X.visibleHeight})}function F(J){return J.link.width>1||J.linkLineWidth>0}function B(J){var X=n(J.translateX,J.translateY);return X+(J.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(J,X,oe){J.on(".basic",null).on("mouseover.basic",function(ie){!ie.interactionState.dragInProgress&&!ie.partOfGroup&&(oe.hover(this,ie,X),ie.interactionState.hovered=[this,ie])}).on("mousemove.basic",function(ie){!ie.interactionState.dragInProgress&&!ie.partOfGroup&&(oe.follow(this,ie),ie.interactionState.hovered=[this,ie])}).on("mouseout.basic",function(ie){!ie.interactionState.dragInProgress&&!ie.partOfGroup&&(oe.unhover(this,ie,X),ie.interactionState.hovered=!1)}).on("click.basic",function(ie){ie.interactionState.hovered&&(oe.unhover(this,ie,X),ie.interactionState.hovered=!1),!ie.interactionState.dragInProgress&&!ie.partOfGroup&&oe.select(this,ie,X)})}function I(J,X,oe,ie){var j=A.behavior.drag().origin(function(ee){return{x:ee.node.x0+ee.visibleWidth/2,y:ee.node.y0+ee.visibleHeight/2}}).on("dragstart",function(ee){if(ee.arrangement!=="fixed"&&(i.ensureSingle(ie._fullLayout._infolayer,"g","dragcover",function(ce){ie._fullLayout._dragCover=ce}),i.raiseToTop(this),ee.interactionState.dragInProgress=ee.node,le(ee.node),ee.interactionState.hovered&&(oe.nodeEvents.unhover.apply(0,ee.interactionState.hovered),ee.interactionState.hovered=!1),ee.arrangement==="snap")){var re=ee.traceId+"|"+ee.key;ee.forceLayouts[re]?ee.forceLayouts[re].alpha(1):N(J,re,ee,ie),U(J,X,ee,re,ie)}}).on("drag",function(ee){if(ee.arrangement!=="fixed"){var re=A.event.x,ce=A.event.y;ee.arrangement==="snap"?(ee.node.x0=re-ee.visibleWidth/2,ee.node.x1=re+ee.visibleWidth/2,ee.node.y0=ce-ee.visibleHeight/2,ee.node.y1=ce+ee.visibleHeight/2):(ee.arrangement==="freeform"&&(ee.node.x0=re-ee.visibleWidth/2,ee.node.x1=re+ee.visibleWidth/2),ce=Math.max(0,Math.min(ee.size-ee.visibleHeight/2,ce)),ee.node.y0=ce-ee.visibleHeight/2,ee.node.y1=ce+ee.visibleHeight/2),le(ee.node),ee.arrangement!=="snap"&&(ee.sankey.update(ee.graph),L(J.filter(he(ee)),X))}}).on("dragend",function(ee){if(ee.arrangement!=="fixed"){ee.interactionState.dragInProgress=!1;for(var re=0;re<ee.node.childrenNodes.length;re++)ee.node.childrenNodes[re].x=ee.node.x,ee.node.childrenNodes[re].y=ee.node.y;ee.arrangement!=="snap"&&Q(ee,ie)}});J.on(".drag",null).call(j)}function N(J,X,oe,ie){G(oe.graph.nodes);var j=oe.graph.nodes.filter(function(ee){return ee.originalX===oe.node.originalX}).filter(function(ee){return!ee.partOfGroup});oe.forceLayouts[X]=d.forceSimulation(j).alphaDecay(0).force("collide",d.forceCollide().radius(function(ee){return ee.dy/2+oe.nodePad/2}).strength(1).iterations(t.forceIterations)).force("constrain",W(J,X,j,oe,ie)).stop()}function U(J,X,oe,ie,j){window.requestAnimationFrame(function ee(){var re;for(re=0;re<t.forceTicksPerFrame;re++)oe.forceLayouts[ie].tick();var ce=oe.graph.nodes;if($(ce),oe.sankey.update(oe.graph),L(J.filter(he(oe)),X),oe.forceLayouts[ie].alpha()>0)window.requestAnimationFrame(ee);else{var be=oe.node.originalX;oe.node.x0=be-oe.visibleWidth/2,oe.node.x1=be+oe.visibleWidth/2,Q(oe,j)}})}function W(J,X,oe,ie){return function(){for(var ee=0,re=0;re<oe.length;re++){var ce=oe[re];ce===ie.interactionState.dragInProgress?(ce.x=ce.lastDraggedX,ce.y=ce.lastDraggedY):(ce.vx=(ce.originalX-ce.x)/t.forceTicksPerFrame,ce.y=Math.min(ie.size-ce.dy/2,Math.max(ce.dy/2,ce.y))),ee=Math.max(ee,Math.abs(ce.vx),Math.abs(ce.vy))}!ie.interactionState.dragInProgress&&ee<.1&&ie.forceLayouts[X].alpha()>0&&ie.forceLayouts[X].alpha(0)}}function Q(J,X){for(var oe=[],ie=[],j=0;j<J.graph.nodes.length;j++){var ee=(J.graph.nodes[j].x0+J.graph.nodes[j].x1)/2,re=(J.graph.nodes[j].y0+J.graph.nodes[j].y1)/2;oe.push(ee/J.figure.width),ie.push(re/J.figure.height)}l.call("_guiRestyle",X,{"node.x":[oe],"node.y":[ie]},J.trace.index).then(function(){X._fullLayout._dragCover&&X._fullLayout._dragCover.remove()})}function ue(J){var X=[],oe;for(oe=0;oe<J.length;oe++)J[oe].originalX=(J[oe].x0+J[oe].x1)/2,J[oe].originalY=(J[oe].y0+J[oe].y1)/2,X.indexOf(J[oe].originalX)===-1&&X.push(J[oe].originalX);for(X.sort(function(ie,j){return ie-j}),oe=0;oe<J.length;oe++)J[oe].originalLayerIndex=X.indexOf(J[oe].originalX),J[oe].originalLayer=J[oe].originalLayerIndex/(X.length-1)}function le(J){J.lastDraggedX=J.x0+J.dx/2,J.lastDraggedY=J.y0+J.dy/2}function he(J){return function(X){return X.node.originalX===J.node.originalX}}function G(J){for(var X=0;X<J.length;X++)J[X].y=(J[X].y0+J[X].y1)/2,J[X].x=(J[X].x0+J[X].x1)/2}function $(J){for(var X=0;X<J.length;X++)J[X].y0=J[X].y-J[X].dy/2,J[X].y1=J[X].y0+J[X].dy,J[X].x0=J[X].x-J[X].dx/2,J[X].x1=J[X].x0+J[X].dx}q.exports=function(J,X,oe,ie,j){var ee=J._context.staticPlot,re=!1;i.ensureSingle(J._fullLayout._infolayer,"g","first-render",function(){re=!0});var ce=J._fullLayout._dragCover,be=oe.filter(function(lt){return v(lt).trace.visible}).map(y.bind(null,ie)),Ae=X.selectAll("."+t.cn.sankey).data(be,f);Ae.exit().remove(),Ae.enter().append("g").classed(t.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",ee?"none":"auto").attr("transform",B),Ae.each(function(lt,Ee){J._fullData[Ee]._sankey=lt;var _e="bgsankey-"+lt.trace.uid+"-"+Ee;i.ensureSingle(J._fullLayout._draggers,"rect",_e),J._fullData[Ee]._bgRect=A.select("."+_e),J._fullData[Ee]._bgRect.style("pointer-events",ee?"none":"all").attr("width",lt.width).attr("height",lt.height).attr("x",lt.translateX).attr("y",lt.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Ae.transition().ease(t.ease).duration(t.duration).attr("transform",B);var ze=Ae.selectAll("."+t.cn.sankeyLinks).data(g,f);ze.enter().append("g").classed(t.cn.sankeyLinks,!0).style("fill","none");var Re=ze.selectAll("."+t.cn.sankeyLink).data(function(lt){var Ee=lt.graph.links;return Ee.filter(function(_e){return _e.value}).map(b.bind(null,lt))},f);Re.enter().append("path").classed(t.cn.sankeyLink,!0).call(O,Ae,j.linkEvents),Re.style("stroke",function(lt){return F(lt)?o.tinyRGB(r(lt.linkLineColor)):lt.tinyColorHue}).style("stroke-opacity",function(lt){return F(lt)?o.opacity(lt.linkLineColor):lt.tinyColorAlpha}).style("fill",function(lt){return lt.tinyColorHue}).style("fill-opacity",function(lt){return lt.tinyColorAlpha}).style("stroke-width",function(lt){return F(lt)?lt.linkLineWidth:1}).attr("d",u()),Re.style("opacity",function(){return J._context.staticPlot||re||ce?1:0}).transition().ease(t.ease).duration(t.duration).style("opacity",1),Re.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var Xe=Ae.selectAll("."+t.cn.sankeyNodeSet).data(g,f);Xe.enter().append("g").classed(t.cn.sankeyNodeSet,!0),Xe.style("cursor",function(lt){switch(lt.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var it=Xe.selectAll("."+t.cn.sankeyNode).data(function(lt){var Ee=lt.graph.nodes;return ue(Ee),Ee.map(m.bind(null,lt))},f);it.enter().append("g").classed(t.cn.sankeyNode,!0).call(h).style("opacity",function(lt){return(J._context.staticPlot||re)&&!lt.partOfGroup?1:0}),it.call(O,Ae,j.nodeEvents).call(I,Re,j,J),it.transition().ease(t.ease).duration(t.duration).call(h).style("opacity",function(lt){return lt.partOfGroup?0:1}),it.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var ot=it.selectAll("."+t.cn.nodeRect).data(g);ot.enter().append("rect").classed(t.cn.nodeRect,!0).call(z),ot.style("stroke-width",function(lt){return lt.nodeLineWidth}).style("stroke",function(lt){return o.tinyRGB(r(lt.nodeLineColor))}).style("stroke-opacity",function(lt){return o.opacity(lt.nodeLineColor)}).style("fill",function(lt){return lt.tinyColorHue}).style("fill-opacity",function(lt){return lt.tinyColorAlpha}),ot.transition().ease(t.ease).duration(t.duration).call(z);var tt=it.selectAll("."+t.cn.nodeLabel).data(g);tt.enter().append("text").classed(t.cn.nodeLabel,!0).style("cursor","default"),tt.attr("data-notex",1).text(function(lt){return lt.node.label}).each(function(lt){var Ee=A.select(this);a.font(Ee,lt.textFont),T.convertToTspans(Ee,J)}).attr("text-anchor",function(lt){return lt.horizontal&&lt.left?"end":"start"}).attr("transform",function(lt){var Ee=A.select(this),_e=T.lineCount(Ee),fe=lt.textFont.size*((_e-1)*S-w),Fe=lt.nodeLineWidth/2+E,rt=((lt.horizontal?lt.visibleHeight:lt.visibleWidth)-fe)/2;lt.horizontal&&(lt.left?Fe=-Fe:Fe+=lt.visibleWidth);var st=lt.horizontal?"":"scale(-1,1)"+s(90);return n(lt.horizontal?Fe:rt,lt.horizontal?rt:Fe)+st}),tt.transition().ease(t.ease).duration(t.duration)}}}),j6=Ze({"src/traces/sankey/plot.js"(Z,q){"use strict";var d=On(),x=ca(),A=x.numberFormat,M=dG(),e=ef(),t=Yn(),r=U6().cn,o=x._;function a(w){return w!==""}function i(w,S){return w.filter(function(E){return E.key===S.traceId})}function n(w,S){d.select(w).select("path").style("fill-opacity",S),d.select(w).select("rect").style("fill-opacity",S)}function s(w){d.select(w).select("text.name").style("fill","black")}function c(w){return function(S){return w.node.sourceLinks.indexOf(S.link)!==-1||w.node.targetLinks.indexOf(S.link)!==-1}}function f(w){return function(S){return S.node.sourceLinks.indexOf(w.link)!==-1||S.node.targetLinks.indexOf(w.link)!==-1}}function g(w,S,E){S&&E&&i(E,S).selectAll("."+r.sankeyLink).filter(c(S)).call(T.bind(0,S,E,!1))}function v(w,S,E){S&&E&&i(E,S).selectAll("."+r.sankeyLink).filter(c(S)).call(l.bind(0,S,E,!1))}function T(w,S,E,y){y.style("fill",function(b){if(!b.link.concentrationscale)return b.tinyColorHoverHue}).style("fill-opacity",function(b){if(!b.link.concentrationscale)return b.tinyColorHoverAlpha}),y.each(function(b){var p=b.link.label;p!==""&&i(S,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===p}).style("fill",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverHue}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverAlpha})}),E&&i(S,w).selectAll("."+r.sankeyNode).filter(f(w)).call(g)}function l(w,S,E,y){y.style("fill",function(b){return b.tinyColorHue}).style("fill-opacity",function(b){return b.tinyColorAlpha}),y.each(function(b){var p=b.link.label;p!==""&&i(S,w).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===p}).style("fill",function(u){return u.tinyColorHue}).style("fill-opacity",function(u){return u.tinyColorAlpha})}),E&&i(S,w).selectAll(r.sankeyNode).filter(f(w)).call(v)}function _(w,S){var E=w.hoverlabel||{},y=x.nestedProperty(E,S).get();return Array.isArray(y)?!1:y}q.exports=function(S,E){for(var y=S._fullLayout,b=y._paper,p=y._size,u=0;u<S._fullData.length;u++)if(S._fullData[u].visible&&S._fullData[u].type===r.sankey&&!S._fullData[u]._viewInitial){var m=S._fullData[u].node;S._fullData[u]._viewInitial={node:{groups:m.groups.slice(),x:m.x.slice(),y:m.y.slice()}}}var h=function(le,he){var G=he.link;G.originalEvent=d.event,S._hoverdata=[G],e.click(S,{target:!0})},P=function(le,he,G){S._fullLayout.hovermode!==!1&&(d.select(le).call(T.bind(0,he,G,!0)),he.link.trace.link.hoverinfo!=="skip"&&(he.link.fullData=he.link.trace,S.emit("plotly_hover",{event:d.event,points:[he.link]})))},L=o(S,"source:")+" ",z=o(S,"target:")+" ",F=o(S,"concentration:")+" ",B=o(S,"incoming flow count:")+" ",O=o(S,"outgoing flow count:")+" ",I=function(le,he){if(S._fullLayout.hovermode===!1)return;var G=he.link.trace.link;if(G.hoverinfo==="none"||G.hoverinfo==="skip")return;var $=[];function J(ce){var be,Ae;ce.circular?(be=(ce.circularPathData.leftInnerExtent+ce.circularPathData.rightInnerExtent)/2,Ae=ce.circularPathData.verticalFullExtent):(be=(ce.source.x1+ce.target.x0)/2,Ae=(ce.y0+ce.y1)/2);var ze=[be,Ae];return ce.trace.orientation==="v"&&ze.reverse(),ze[0]+=he.parent.translateX,ze[1]+=he.parent.translateY,ze}for(var X=0,oe=0;oe<he.flow.links.length;oe++){var ie=he.flow.links[oe];if(!(S._fullLayout.hovermode==="closest"&&he.link.pointNumber!==ie.pointNumber)){he.link.pointNumber===ie.pointNumber&&(X=oe),ie.fullData=ie.trace,G=he.link.trace.link;var j=J(ie),ee={valueLabel:A(he.valueFormat)(ie.value)+he.valueSuffix};$.push({x:j[0],y:j[1],name:ee.valueLabel,text:[ie.label||"",L+ie.source.label,z+ie.target.label,ie.concentrationscale?F+A("%0.2f")(ie.flow.labelConcentration):""].filter(a).join("<br>"),color:_(G,"bgcolor")||t.addOpacity(ie.color,1),borderColor:_(G,"bordercolor"),fontFamily:_(G,"font.family"),fontSize:_(G,"font.size"),fontColor:_(G,"font.color"),fontWeight:_(G,"font.weight"),fontStyle:_(G,"font.style"),fontVariant:_(G,"font.variant"),fontTextcase:_(G,"font.textcase"),fontLineposition:_(G,"font.lineposition"),fontShadow:_(G,"font.shadow"),nameLength:_(G,"namelength"),textAlign:_(G,"align"),idealAlign:d.event.x<j[0]?"right":"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[ie]})}}var re=e.loneHover($,{container:y._hoverlayer.node(),outerContainer:y._paper.node(),gd:S,anchorIndex:X});re.each(function(){var ce=this;he.link.concentrationscale||n(ce,.65),s(ce)})},N=function(le,he,G){S._fullLayout.hovermode!==!1&&(d.select(le).call(l.bind(0,he,G,!0)),he.link.trace.link.hoverinfo!=="skip"&&(he.link.fullData=he.link.trace,S.emit("plotly_unhover",{event:d.event,points:[he.link]})),e.loneUnhover(y._hoverlayer.node()))},U=function(le,he,G){var $=he.node;$.originalEvent=d.event,S._hoverdata=[$],d.select(le).call(v,he,G),e.click(S,{target:!0})},W=function(le,he,G){S._fullLayout.hovermode!==!1&&(d.select(le).call(g,he,G),he.node.trace.node.hoverinfo!=="skip"&&(he.node.fullData=he.node.trace,S.emit("plotly_hover",{event:d.event,points:[he.node]})))},Q=function(le,he){if(S._fullLayout.hovermode!==!1){var G=he.node.trace.node;if(!(G.hoverinfo==="none"||G.hoverinfo==="skip")){var $=d.select(le).select("."+r.nodeRect),J=S._fullLayout._paperdiv.node().getBoundingClientRect(),X=$.node().getBoundingClientRect(),oe=X.left-2-J.left,ie=X.right+2-J.left,j=X.top+X.height/4-J.top,ee={valueLabel:A(he.valueFormat)(he.node.value)+he.valueSuffix};he.node.fullData=he.node.trace,S._fullLayout._calcInverseTransform(S);var re=S._fullLayout._invScaleX,ce=S._fullLayout._invScaleY,be=e.loneHover({x0:re*oe,x1:re*ie,y:ce*j,name:A(he.valueFormat)(he.node.value)+he.valueSuffix,text:[he.node.label,B+he.node.targetLinks.length,O+he.node.sourceLinks.length].filter(a).join("<br>"),color:_(G,"bgcolor")||he.tinyColorHue,borderColor:_(G,"bordercolor"),fontFamily:_(G,"font.family"),fontSize:_(G,"font.size"),fontColor:_(G,"font.color"),fontWeight:_(G,"font.weight"),fontStyle:_(G,"font.style"),fontVariant:_(G,"font.variant"),fontTextcase:_(G,"font.textcase"),fontLineposition:_(G,"font.lineposition"),fontShadow:_(G,"font.shadow"),nameLength:_(G,"namelength"),textAlign:_(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[he.node]},{container:y._hoverlayer.node(),outerContainer:y._paper.node(),gd:S});n(be,.85),s(be)}}},ue=function(le,he,G){S._fullLayout.hovermode!==!1&&(d.select(le).call(v,he,G),he.node.trace.node.hoverinfo!=="skip"&&(he.node.fullData=he.node.trace,S.emit("plotly_unhover",{event:d.event,points:[he.node]})),e.loneUnhover(y._hoverlayer.node()))};M(S,b,E,{width:p.w,height:p.h,margin:{t:p.t,r:p.r,b:p.b,l:p.l}},{linkEvents:{hover:P,follow:I,unhover:N,select:h},nodeEvents:{hover:W,follow:Q,unhover:ue,select:U}})}}}),vG=Ze({"src/traces/sankey/base_plot.js"(Z){"use strict";var q=pc().overrideAll,d=Hh().getModuleCalcData,x=j6(),A=Xm(),M=Kd(),e=Tp(),t=Tf().prepSelect,r=ca(),o=oo(),a="sankey";Z.name=a,Z.baseLayoutAttrOverrides=q({hoverlabel:A.hoverlabel},"plot","nested"),Z.plot=function(n){var s=d(n.calcdata,a)[0];x(n,s),Z.updateFx(n)},Z.clean=function(n,s,c,f){var g=f._has&&f._has(a),v=s._has&&s._has(a);g&&!v&&(f._paperdiv.selectAll(".sankey").remove(),f._paperdiv.selectAll(".bgsankey").remove())},Z.updateFx=function(n){for(var s=0;s<n._fullData.length;s++)i(n,s)};function i(n,s){var c=n._fullData[s],f=n._fullLayout,g=f.dragmode,v=f.dragmode==="pan"?"move":"crosshair",T=c._bgRect;if(T&&!(g==="pan"||g==="zoom")){M(T,v);var l={_id:"x",c2p:r.identity,_offset:c._sankey.translateX,_length:c._sankey.width},_={_id:"y",c2p:r.identity,_offset:c._sankey.translateY,_length:c._sankey.height},w={gd:n,element:T.node(),plotinfo:{id:s,xaxis:l,yaxis:_,fillRangeItems:r.noop},subplot:s,xaxes:[l],yaxes:[_],doneFnCompleted:function(S){var E=n._fullData[s],y,b=E.node.groups.slice(),p=[];function u(L){for(var z=E._sankey.graph.nodes,F=0;F<z.length;F++)if(z[F].pointNumber===L)return z[F]}for(var m=0;m<S.length;m++){var h=u(S[m].pointNumber);if(h)if(h.group){for(var P=0;P<h.childrenNodes.length;P++)p.push(h.childrenNodes[P].pointNumber);b[h.pointNumber-E.node._count]=!1}else p.push(h.pointNumber)}y=b.filter(Boolean).concat([p]),o.call("_guiRestyle",n,{"node.groups":[y]},s)}};w.prepFn=function(S,E,y){t(S,E,y,w,g)},e.init(w)}}}}),mG=Ze({"src/traces/sankey/select.js"(Z,q){"use strict";q.exports=function(x,A){for(var M=x.cd,e=[],t=M[0].trace,r=t._sankey.graph.nodes,o=0;o<r.length;o++){var a=r[o];if(!a.partOfGroup){var i=[(a.x0+a.x1)/2,(a.y0+a.y1)/2];t.orientation==="v"&&i.reverse(),A&&A.contains(i,!1,o,x)&&e.push({pointNumber:a.pointNumber})}}return e}}}),gG=Ze({"src/traces/sankey/index.js"(Z,q){"use strict";q.exports={attributes:O6(),supplyDefaults:iG(),calc:nG(),plot:j6(),moduleType:"trace",name:"sankey",basePlotModule:vG(),selectPoints:mG(),categories:["noOpacity"],meta:{}}}}),yG=Ze({"lib/sankey.js"(Z,q){"use strict";q.exports=gG()}}),_G=Ze({"src/traces/indicator/base_plot.js"(Z){"use strict";var q=xc();Z.name="indicator",Z.plot=function(d,x,A,M){q.plotBasePlot(Z.name,d,x,A,M)},Z.clean=function(d,x,A,M){q.cleanBasePlot(Z.name,d,x,A,M)}}}),q6=Ze({"src/traces/indicator/attributes.js"(Z,q){"use strict";var d=rs().extendFlat,x=rs().extendDeep,A=pc().overrideAll,M=tc(),e=oh(),t=bc().attributes,r=Wh(),o=Dl().templatedArray,a=d1(),i=Qc().descriptionOnlyNumbers,n=M({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:e.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"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},f=o("step",x({},s,{range:c}));q.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:t({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:d({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:i("value")},font:d({},n,{}),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:i("value")},increasing:{symbol:{valType:"string",dflt:a.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:a.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:d({},n,{}),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:x({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:A({range:c,visible:d({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:d({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:M({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:f,threshold:{line:{color:d({},s.line.color,{}),width:d({},s.line.width,{dflt:1}),editType:"plot"},thickness:d({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),V6=Ze({"src/traces/indicator/constants.js"(Z,q){"use strict";q.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),xG=Ze({"src/traces/indicator/defaults.js"(Z,q){"use strict";var d=ca(),x=q6(),A=bc().defaults,M=Dl(),e=fp(),t=V6(),r=X0(),o=t1(),a=$m(),i=Qm();function n(c,f,g,v){function T(I,N){return d.coerce(c,f,x,I,N)}A(f,v,T),T("mode"),f._hasNumber=f.mode.indexOf("number")!==-1,f._hasDelta=f.mode.indexOf("delta")!==-1,f._hasGauge=f.mode.indexOf("gauge")!==-1;var l=T("value");f._range=[0,typeof l=="number"?1.5*l:1];var _=new Array(2),w;if(f._hasNumber){T("number.valueformat");var S=d.extendFlat({},v.font);S.size=void 0,d.coerceFont(T,"number.font",S),f.number.font.size===void 0&&(f.number.font.size=t.defaultNumberFontSize,_[0]=!0),T("number.prefix"),T("number.suffix"),w=f.number.font.size}var E;if(f._hasDelta){var y=d.extendFlat({},v.font);y.size=void 0,d.coerceFont(T,"delta.font",y),f.delta.font.size===void 0&&(f.delta.font.size=(f._hasNumber?.5:1)*(w||t.defaultNumberFontSize),_[1]=!0),T("delta.reference",f.value),T("delta.relative"),T("delta.valueformat",f.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),E=f.delta.font.size}f._scaleNumbers=(!f._hasNumber||_[0])&&(!f._hasDelta||_[1])||!1;var b=d.extendFlat({},v.font);b.size=.25*(w||E||t.defaultNumberFontSize),d.coerceFont(T,"title.font",b),T("title.text");var p,u,m,h;function P(I,N){return d.coerce(p,u,x.gauge,I,N)}function L(I,N){return d.coerce(m,h,x.gauge.axis,I,N)}if(f._hasGauge){p=c.gauge,p||(p={}),u=M.newContainer(f,"gauge"),P("shape");var z=f._isBullet=f.gauge.shape==="bullet";z||T("title.align","center");var F=f._isAngular=f.gauge.shape==="angular";F||T("align","center"),P("bgcolor",v.paper_bgcolor),P("borderwidth"),P("bordercolor"),P("bar.color"),P("bar.line.color"),P("bar.line.width");var B=t.valueThickness*(f.gauge.shape==="bullet"?.5:1);P("bar.thickness",B),e(p,u,{name:"steps",handleItemDefaults:s}),P("threshold.value"),P("threshold.thickness"),P("threshold.line.width"),P("threshold.line.color"),m={},p&&(m=p.axis||{}),h=M.newContainer(u,"axis"),L("visible"),f._range=L("range",f._range);var O={font:v.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(m,h,L,"linear"),i(m,h,L,"linear",O),a(m,h,L,"linear",O),o(m,h,L,O)}else T("title.align","center"),T("align","center"),f._isAngular=f._isBullet=!1;f._length=null}function s(c,f){function g(v,T){return d.coerce(c,f,x.gauge.steps,v,T)}g("color"),g("line.color"),g("line.width"),g("range"),g("thickness")}q.exports={supplyDefaults:n}}}),bG=Ze({"src/traces/indicator/calc.js"(Z,q){"use strict";function d(x,A){var M=[],e=A.value;typeof A._lastValue!="number"&&(A._lastValue=A.value);var t=A._lastValue,r=t;return A._hasDelta&&typeof A.delta.reference=="number"&&(r=A.delta.reference),M[0]={y:e,lastY:t,delta:e-r,relativeDelta:(e-r)/r},M}q.exports={calc:d}}}),wG=Ze({"src/traces/indicator/plot.js"(Z,q){"use strict";var d=On(),x=(hg(),nh(f0)).interpolate,A=(hg(),nh(f0)).interpolateNumber,M=ca(),e=M.strScale,t=M.strTranslate,r=M.rad2deg,o=mh().MID_SHIFT,a=as(),i=V6(),n=fu(),s=Wo(),c=z_(),f=R2(),g=Wh(),v=Yn(),T={left:"start",center:"middle",right:"end"},l={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function w(z){return z&&z.duration>0}q.exports=function(F,B,O,I){var N=F._fullLayout,U;w(O)&&I&&(U=I()),M.makeTraceGroups(N._indicatorlayer,B,"trace").each(function(W){var Q=W[0],ue=Q.trace,le=d.select(this),he=ue._hasGauge,G=ue._isAngular,$=ue._isBullet,J=ue.domain,X={w:N._size.w*(J.x[1]-J.x[0]),h:N._size.h*(J.y[1]-J.y[0]),l:N._size.l+N._size.w*J.x[0],r:N._size.r+N._size.w*(1-J.x[1]),t:N._size.t+N._size.h*(1-J.y[1]),b:N._size.b+N._size.h*J.y[0]},oe=X.l+X.w/2,ie=X.t+X.h/2,j=Math.min(X.w/2,X.h),ee=i.innerRadius*j,re,ce,be,Ae=ue.align||"center";if(ce=ie,!he)re=X.l+l[Ae]*X.w,be=function(fe){return m(fe,X.w,X.h)};else if(G&&(re=oe,ce=ie+j/2,be=function(fe){return h(fe,.9*ee)}),$){var ze=i.bulletPadding,Re=1-i.bulletNumberDomainSize+ze;re=X.l+(Re+(1-Re)*l[Ae])*X.w,be=function(fe){return m(fe,(i.bulletNumberDomainSize-ze)*X.w,X.h)}}y(F,le,W,{numbersX:re,numbersY:ce,numbersScaler:be,transitionOpts:O,onComplete:U});var Xe,it;he&&(Xe={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},it={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var ot=le.selectAll("g.angular").data(G?W:[]);ot.exit().remove();var tt=le.selectAll("g.angularaxis").data(G?W:[]);tt.exit().remove(),G&&E(F,le,W,{radius:j,innerRadius:ee,gauge:ot,layer:tt,size:X,gaugeBg:Xe,gaugeOutline:it,transitionOpts:O,onComplete:U});var lt=le.selectAll("g.bullet").data($?W:[]);lt.exit().remove();var Ee=le.selectAll("g.bulletaxis").data($?W:[]);Ee.exit().remove(),$&&S(F,le,W,{gauge:lt,layer:Ee,size:X,gaugeBg:Xe,gaugeOutline:it,transitionOpts:O,onComplete:U});var _e=le.selectAll("text.title").data(W);_e.exit().remove(),_e.enter().append("text").classed("title",!0),_e.attr("text-anchor",function(){return $?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),_e.attr("transform",function(){var fe=X.l+X.w*l[ue.title.align],Fe,rt=i.titlePadding,st=a.bBox(_e.node());if(he){if(G)if(ue.gauge.axis.visible){var Qe=a.bBox(tt.node());Fe=Qe.top-rt-st.bottom}else Fe=X.t+X.h/2-j/2-st.bottom-rt;$&&(Fe=ce-(st.top+st.bottom)/2,fe=X.l-i.bulletPadding*X.w)}else Fe=ue._numbersTop-rt-st.bottom;return t(fe,Fe)})})};function S(z,F,B,O){var I=B[0].trace,N=O.gauge,U=O.layer,W=O.gaugeBg,Q=O.gaugeOutline,ue=O.size,le=I.domain,he=O.transitionOpts,G=O.onComplete,$,J,X,oe,ie;N.enter().append("g").classed("bullet",!0),N.attr("transform",t(ue.l,ue.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var j=ue.h,ee=I.gauge.bar.thickness*j,re=le.x[0],ce=le.x[0]+(le.x[1]-le.x[0])*(I._hasNumber||I._hasDelta?1-i.bulletNumberDomainSize:1);$=u(z,I.gauge.axis),$._id="xbulletaxis",$.domain=[re,ce],$.setScale(),J=s.calcTicks($),X=s.makeTransTickFn($),oe=s.getTickSigns($)[2],ie=ue.t+ue.h,$.visible&&(s.drawTicks(z,$,{vals:$.ticks==="inside"?s.clipEnds($,J):J,layer:U,path:s.makeTickPath($,ie,oe),transFn:X}),s.drawLabels(z,$,{vals:J,layer:U,transFn:X,labelFns:s.makeLabelFns($,ie)}));function be(tt){tt.attr("width",function(lt){return Math.max(0,$.c2p(lt.range[1])-$.c2p(lt.range[0]))}).attr("x",function(lt){return $.c2p(lt.range[0])}).attr("y",function(lt){return .5*(1-lt.thickness)*j}).attr("height",function(lt){return lt.thickness*j})}var Ae=[W].concat(I.gauge.steps),ze=N.selectAll("g.bg-bullet").data(Ae);ze.enter().append("g").classed("bg-bullet",!0).append("rect"),ze.select("rect").call(be).call(b),ze.exit().remove();var Re=N.selectAll("g.value-bullet").data([I.gauge.bar]);Re.enter().append("g").classed("value-bullet",!0).append("rect"),Re.select("rect").attr("height",ee).attr("y",(j-ee)/2).call(b),w(he)?Re.select("rect").transition().duration(he.duration).ease(he.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,$.c2p(Math.min(I.gauge.axis.range[1],B[0].y)))):Re.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,$.c2p(Math.min(I.gauge.axis.range[1],B[0].y))):0),Re.exit().remove();var Xe=B.filter(function(){return I.gauge.threshold.value||I.gauge.threshold.value===0}),it=N.selectAll("g.threshold-bullet").data(Xe);it.enter().append("g").classed("threshold-bullet",!0).append("line"),it.select("line").attr("x1",$.c2p(I.gauge.threshold.value)).attr("x2",$.c2p(I.gauge.threshold.value)).attr("y1",(1-I.gauge.threshold.thickness)/2*j).attr("y2",(1-(1-I.gauge.threshold.thickness)/2)*j).call(v.stroke,I.gauge.threshold.line.color).style("stroke-width",I.gauge.threshold.line.width),it.exit().remove();var ot=N.selectAll("g.gauge-outline").data([Q]);ot.enter().append("g").classed("gauge-outline",!0).append("rect"),ot.select("rect").call(be).call(b),ot.exit().remove()}function E(z,F,B,O){var I=B[0].trace,N=O.size,U=O.radius,W=O.innerRadius,Q=O.gaugeBg,ue=O.gaugeOutline,le=[N.l+N.w/2,N.t+N.h/2+U/2],he=O.gauge,G=O.layer,$=O.transitionOpts,J=O.onComplete,X=Math.PI/2;function oe(Lt){var kt=I.gauge.axis.range[0],Vt=I.gauge.axis.range[1],Zt=(Lt-kt)/(Vt-kt)*Math.PI-X;return Zt<-X?-X:Zt>X?X:Zt}function ie(Lt){return d.svg.arc().innerRadius((W+U)/2-Lt/2*(U-W)).outerRadius((W+U)/2+Lt/2*(U-W)).startAngle(-X)}function j(Lt){Lt.attr("d",function(kt){return ie(kt.thickness).startAngle(oe(kt.range[0])).endAngle(oe(kt.range[1]))()})}var ee,re,ce,be;he.enter().append("g").classed("angular",!0),he.attr("transform",t(le[0],le[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(z,I.gauge.axis),ee.type="linear",ee.range=I.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var Ae=function(Lt){return(ee.range[0]-Lt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},ze={},Re=s.makeLabelFns(ee,0),Xe=Re.labelStandoff;ze.xFn=function(Lt){var kt=Ae(Lt);return Math.cos(kt)*Xe},ze.yFn=function(Lt){var kt=Ae(Lt),Vt=Math.sin(kt)>0?.2:1;return-Math.sin(kt)*(Xe+Lt.fontSize*Vt)+Math.abs(Math.cos(kt))*(Lt.fontSize*o)},ze.anchorFn=function(Lt){var kt=Ae(Lt),Vt=Math.cos(kt);return Math.abs(Vt)<.1?"middle":Vt>0?"start":"end"},ze.heightFn=function(Lt,kt,Vt){var Zt=Ae(Lt);return-.5*(1+Math.sin(Zt))*Vt};var it=function(Lt){return t(le[0]+U*Math.cos(Lt),le[1]-U*Math.sin(Lt))};ce=function(Lt){return it(Ae(Lt))};var ot=function(Lt){var kt=Ae(Lt);return it(kt)+"rotate("+-r(kt)+")"};if(re=s.calcTicks(ee),be=s.getTickSigns(ee)[2],ee.visible){be=ee.ticks==="inside"?-1:1;var tt=(ee.linewidth||1)/2;s.drawTicks(z,ee,{vals:re,layer:G,path:"M"+be*tt+",0h"+be*ee.ticklen,transFn:ot}),s.drawLabels(z,ee,{vals:re,layer:G,transFn:ce,labelFns:ze})}var lt=[Q].concat(I.gauge.steps),Ee=he.selectAll("g.bg-arc").data(lt);Ee.enter().append("g").classed("bg-arc",!0).append("path"),Ee.select("path").call(j).call(b),Ee.exit().remove();var _e=ie(I.gauge.bar.thickness),fe=he.selectAll("g.value-arc").data([I.gauge.bar]);fe.enter().append("g").classed("value-arc",!0).append("path");var Fe=fe.select("path");w($)?(Fe.transition().duration($.duration).ease($.easing).each("end",function(){J&&J()}).each("interrupt",function(){J&&J()}).attrTween("d",p(_e,oe(B[0].lastY),oe(B[0].y))),I._lastValue=B[0].y):Fe.attr("d",typeof B[0].y=="number"?_e.endAngle(oe(B[0].y)):"M0,0Z"),Fe.call(b),fe.exit().remove(),lt=[];var rt=I.gauge.threshold.value;(rt||rt===0)&&lt.push({range:[rt,rt],color:I.gauge.threshold.color,line:{color:I.gauge.threshold.line.color,width:I.gauge.threshold.line.width},thickness:I.gauge.threshold.thickness});var st=he.selectAll("g.threshold-arc").data(lt);st.enter().append("g").classed("threshold-arc",!0).append("path"),st.select("path").call(j).call(b),st.exit().remove();var Qe=he.selectAll("g.gauge-outline").data([ue]);Qe.enter().append("g").classed("gauge-outline",!0).append("path"),Qe.select("path").call(j).call(b),Qe.exit().remove()}function y(z,F,B,O){var I=B[0].trace,N=O.numbersX,U=O.numbersY,W=I.align||"center",Q=T[W],ue=O.transitionOpts,le=O.onComplete,he=M.ensureSingle(F,"g","numbers"),G,$,J,X=[];I._hasNumber&&X.push("number"),I._hasDelta&&(X.push("delta"),I.delta.position==="left"&&X.reverse());var oe=he.selectAll("text").data(X);oe.enter().append("text"),oe.attr("text-anchor",function(){return Q}).attr("class",function(it){return it}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),oe.exit().remove();function ie(it,ot,tt,lt){if(it.match("s")&&tt>=0!=lt>=0&&!ot(tt).slice(-1).match(_)&&!ot(lt).slice(-1).match(_)){var Ee=it.slice().replace("s","f").replace(/\d+/,function(fe){return parseInt(fe)-1}),_e=u(z,{tickformat:Ee});return function(fe){return Math.abs(fe)<1?s.tickText(_e,fe).text:ot(fe)}}else return ot}function j(){var it=u(z,{tickformat:I.number.valueformat},I._range);it.setScale(),s.prepTicks(it);var ot=function(fe){return s.tickText(it,fe).text},tt=I.number.suffix,lt=I.number.prefix,Ee=he.select("text.number");function _e(){var fe=typeof B[0].y=="number"?lt+ot(B[0].y)+tt:"-";Ee.text(fe).call(a.font,I.number.font).call(n.convertToTspans,z)}return w(ue)?Ee.transition().duration(ue.duration).ease(ue.easing).each("end",function(){_e(),le&&le()}).each("interrupt",function(){_e(),le&&le()}).attrTween("text",function(){var fe=d.select(this),Fe=A(B[0].lastY,B[0].y);I._lastValue=B[0].y;var rt=ie(I.number.valueformat,ot,B[0].lastY,B[0].y);return function(st){fe.text(lt+rt(Fe(st))+tt)}}):_e(),G=P(lt+ot(B[0].y)+tt,I.number.font,Q,z),Ee}function ee(){var it=u(z,{tickformat:I.delta.valueformat},I._range);it.setScale(),s.prepTicks(it);var ot=function(st){return s.tickText(it,st).text},tt=I.delta.suffix,lt=I.delta.prefix,Ee=function(st){var Qe=I.delta.relative?st.relativeDelta:st.delta;return Qe},_e=function(st,Qe){return st===0||typeof st!="number"||isNaN(st)?"-":(st>0?I.delta.increasing.symbol:I.delta.decreasing.symbol)+lt+Qe(st)+tt},fe=function(st){return st.delta>=0?I.delta.increasing.color:I.delta.decreasing.color};I._deltaLastValue===void 0&&(I._deltaLastValue=Ee(B[0]));var Fe=he.select("text.delta");Fe.call(a.font,I.delta.font).call(v.fill,fe({delta:I._deltaLastValue}));function rt(){Fe.text(_e(Ee(B[0]),ot)).call(v.fill,fe(B[0])).call(n.convertToTspans,z)}return w(ue)?Fe.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var st=d.select(this),Qe=Ee(B[0]),Lt=I._deltaLastValue,kt=ie(I.delta.valueformat,ot,Lt,Qe),Vt=A(Lt,Qe);return I._deltaLastValue=Qe,function(Zt){st.text(_e(Vt(Zt),kt)),st.call(v.fill,fe({delta:Vt(Zt)}))}}).each("end",function(){rt(),le&&le()}).each("interrupt",function(){rt(),le&&le()}):rt(),$=P(_e(Ee(B[0]),ot),I.delta.font,Q,z),Fe}var re=I.mode+I.align,ce;if(I._hasDelta&&(ce=ee(),re+=I.delta.position+I.delta.font.size+I.delta.font.family+I.delta.valueformat,re+=I.delta.increasing.symbol+I.delta.decreasing.symbol,J=$),I._hasNumber&&(j(),re+=I.number.font.size+I.number.font.family+I.number.valueformat+I.number.suffix+I.number.prefix,J=G),I._hasDelta&&I._hasNumber){var be=[(G.left+G.right)/2,(G.top+G.bottom)/2],Ae=[($.left+$.right)/2,($.top+$.bottom)/2],ze,Re,Xe=.75*I.delta.font.size;I.delta.position==="left"&&(ze=L(I,"deltaPos",0,-1*(G.width*l[I.align]+$.width*(1-l[I.align])+Xe),re,Math.min),Re=be[1]-Ae[1],J={width:G.width+$.width+Xe,height:Math.max(G.height,$.height),left:$.left+ze,right:G.right,top:Math.min(G.top,$.top+Re),bottom:Math.max(G.bottom,$.bottom+Re)}),I.delta.position==="right"&&(ze=L(I,"deltaPos",0,G.width*(1-l[I.align])+$.width*l[I.align]+Xe,re,Math.max),Re=be[1]-Ae[1],J={width:G.width+$.width+Xe,height:Math.max(G.height,$.height),left:G.left,right:$.right+ze,top:Math.min(G.top,$.top+Re),bottom:Math.max(G.bottom,$.bottom+Re)}),I.delta.position==="bottom"&&(ze=null,Re=$.height,J={width:Math.max(G.width,$.width),height:G.height+$.height,left:Math.min(G.left,$.left),right:Math.max(G.right,$.right),top:G.bottom-G.height,bottom:G.bottom+$.height}),I.delta.position==="top"&&(ze=null,Re=G.top,J={width:Math.max(G.width,$.width),height:G.height+$.height,left:Math.min(G.left,$.left),right:Math.max(G.right,$.right),top:G.bottom-G.height-$.height,bottom:G.bottom}),ce.attr({dx:ze,dy:Re})}(I._hasNumber||I._hasDelta)&&he.attr("transform",function(){var it=O.numbersScaler(J);re+=it[2];var ot=L(I,"numbersScale",1,it[0],re,Math.min),tt;I._scaleNumbers||(ot=1),I._isAngular?tt=U-ot*J.bottom:tt=U-ot*(J.top+J.bottom)/2,I._numbersTop=ot*J.top+tt;var lt=J[W];W==="center"&&(lt=(J.left+J.right)/2);var Ee=N-ot*lt;return Ee=L(I,"numbersTranslate",0,Ee,re,Math.max),t(Ee,tt)+e(ot)})}function b(z){z.each(function(F){v.stroke(d.select(this),F.line.color)}).each(function(F){v.fill(d.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function p(z,F,B){return function(){var O=x(F,B);return function(I){return z.endAngle(O(I))()}}}function u(z,F,B){var O=z._fullLayout,I=M.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},F),N={type:"linear",_id:"x"+F._id},U={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function W(Q,ue){return M.coerce(I,N,g,Q,ue)}return c(I,N,W,U,O),f(I,N,W,U),N}function m(z,F,B){var O=Math.min(F/z.width,B/z.height);return[O,z,F+"x"+B]}function h(z,F){var B=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/B;return[O,z,F]}function P(z,F,B,O){var I=document.createElementNS("http://www.w3.org/2000/svg","text"),N=d.select(I);return N.text(z).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(N.node())}function L(z,F,B,O,I,N){var U="_cache"+F;z[U]&&z[U].key===I||(z[U]={key:I,value:B});var W=M.aggNums(N,null,[z[U].value,O],2);return z[U].value=W,W}}}),TG=Ze({"src/traces/indicator/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"indicator",basePlotModule:_G(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:q6(),supplyDefaults:xG().supplyDefaults,calc:bG().calc,plot:wG(),meta:{}}}}),AG=Ze({"lib/indicator.js"(Z,q){"use strict";q.exports=TG()}}),G6=Ze({"src/traces/table/attributes.js"(Z,q){"use strict";var d=K0(),x=rs().extendFlat,A=pc().overrideAll,M=tc(),e=bc().attributes,t=Qc().descriptionOnlyNumbers,r=q.exports=A({domain:e({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:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},d.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:x({},M({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},d.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:x({},M({arrayOk:!0}))}},"calc","from-root")}}),SG=Ze({"src/traces/table/defaults.js"(Z,q){"use strict";var d=ca(),x=G6(),A=bc().defaults;function M(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),i=a.slice().sort(function(c,f){return c-f}),n=a.map(function(c){return i.indexOf(c)}),s=n.length;s<o;s++)n.push(s);t("columnorder",n)}q.exports=function(t,r,o,a){function i(n,s){return d.coerce(t,r,x,n,s)}A(r,a,i),i("columnwidth"),i("header.values"),i("header.format"),i("header.align"),i("header.prefix"),i("header.suffix"),i("header.height"),i("header.line.width"),i("header.line.color"),i("header.fill.color"),d.coerceFont(i,"header.font",a.font),M(r,i),i("cells.values"),i("cells.format"),i("cells.align"),i("cells.prefix"),i("cells.suffix"),i("cells.height"),i("cells.line.width"),i("cells.line.color"),i("cells.fill.color"),d.coerceFont(i,"cells.font",a.font),r._length=null}}}),MG=Ze({"src/traces/table/calc.js"(Z,q){"use strict";var d=Cv().wrap;q.exports=function(){return d({})}}}),H6=Ze({"src/traces/table/constants.js"(Z,q){"use strict";q.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"}}}}),EG=Ze({"src/traces/table/data_preparation_helper.js"(Z,q){"use strict";var d=H6(),x=rs().extendFlat,A=ns(),M=xp().isTypedArray,e=xp().isArrayOrTypedArray;q.exports=function(g,v){var T=o(v.cells.values),l=function(Q){return Q.slice(v.header.values.length,Q.length)},_=o(v.header.values);_.length&&!_[0].length&&(_[0]=[""],_=o(_));var w=_.concat(l(T).map(function(){return a((_[0]||[""]).length)})),S=v.domain,E=Math.floor(g._fullLayout._size.w*(S.x[1]-S.x[0])),y=Math.floor(g._fullLayout._size.h*(S.y[1]-S.y[0])),b=v.header.values.length?w[0].map(function(){return v.header.height}):[d.emptyHeaderHeight],p=T.length?T[0].map(function(){return v.cells.height}):[],u=b.reduce(r,0),m=y-u,h=m+d.uplift,P=s(p,h),L=s(b,u),z=n(L,[]),F=n(P,z),B={},O=v._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function(Q,ue){return ue})));var I=w.map(function(Q,ue){var le=e(v.columnwidth)?v.columnwidth[Math.min(ue,v.columnwidth.length-1)]:v.columnwidth;return A(le)?Number(le):1}),N=I.reduce(r,0);I=I.map(function(Q){return Q/N*E});var U=Math.max(t(v.header.line.width),t(v.cells.line.width)),W={key:v.uid+g._context.staticPlot,translateX:S.x[0]*g._fullLayout._size.w,translateY:g._fullLayout._size.h*(1-S.y[1]),size:g._fullLayout._size,width:E,maxLineWidth:U,height:y,columnOrder:O,groupHeight:y,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:x({},v.cells,{values:T}),headerCells:x({},v.header,{values:w}),gdColumns:w.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:w.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function(Q,ue){var le=B[Q];B[Q]=(le||0)+1;var he=Q+"__"+B[Q];return{key:he,label:Q,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:I[ue]}})};return W.columns.forEach(function(Q){Q.calcdata=W,Q.x=i(Q)}),W};function t(f){if(e(f)){for(var g=0,v=0;v<f.length;v++)g=Math.max(g,t(f[v]));return g}return f}function r(f,g){return f+g}function o(f){var g=f.slice(),v=1/0,T=0,l;for(l=0;l<g.length;l++)M(g[l])?g[l]=Array.from(g[l]):e(g[l])||(g[l]=[g[l]]),v=Math.min(v,g[l].length),T=Math.max(T,g[l].length);if(v!==T)for(l=0;l<g.length;l++){var _=T-g[l].length;_&&(g[l]=g[l].concat(a(_)))}return g}function a(f){for(var g=new Array(f),v=0;v<f;v++)g[v]="";return g}function i(f){return f.calcdata.columns.reduce(function(g,v){return v.xIndex<f.xIndex?g+v.columnWidth:g},0)}function n(f,g){var v=Object.keys(f);return v.map(function(T){return x({},f[T],{auxiliaryBlocks:g})})}function s(f,g){for(var v={},T,l=0,_=0,w=c(),S=0,E=0,y=0;y<f.length;y++)T=f[y],w.rows.push({rowIndex:y,rowHeight:T}),_+=T,(_>=g||y===f.length-1)&&(v[l]=w,w.key=E++,w.firstRowIndex=S,w.lastRowIndex=y,w=c(),l+=_,S=y+1,_=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),CG=Ze({"src/traces/table/data_split_helpers.js"(Z){"use strict";var q=rs().extendFlat;Z.splitToPanels=function(x){var A=[0,0],M=q({},x,{key:"header",type:"header",page:0,prevPages:A,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:q({},x.calcdata,{cells:x.calcdata.headerCells})}),e=q({},x,{key:"cells1",type:"cells",page:0,prevPages:A,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),t=q({},x,{key:"cells2",type:"cells",page:1,prevPages:A,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[e,t,M]},Z.splitToCells=function(x){var A=d(x);return(x.values||[]).slice(A[0],A[1]).map(function(M,e){var t=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:A[0]+e,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:M}})};function d(x){var A=x.rowBlocks[x.page],M=A?A.rows[0].rowIndex:0,e=A?M+A.rows.length:0;return[M,e]}}}),W6=Ze({"src/traces/table/plot.js"(Z,q){"use strict";var d=H6(),x=On(),A=ca(),M=A.numberFormat,e=Cv(),t=as(),r=fu(),o=ca().raiseToTop,a=ca().strTranslate,i=ca().cancelTransition,n=EG(),s=CG(),c=Yn();q.exports=function(re,ce){var be=!re._context.staticPlot,Ae=re._fullLayout._paper.selectAll("."+d.cn.table).data(ce.map(function(Qe){var Lt=e.unwrap(Qe),kt=Lt.trace;return n(re,kt)}),e.keyFun);Ae.exit().remove(),Ae.enter().append("g").classed(d.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"),Ae.attr("width",function(Qe){return Qe.width+Qe.size.l+Qe.size.r}).attr("height",function(Qe){return Qe.height+Qe.size.t+Qe.size.b}).attr("transform",function(Qe){return a(Qe.translateX,Qe.translateY)});var ze=Ae.selectAll("."+d.cn.tableControlView).data(e.repeat,e.keyFun),Re=ze.enter().append("g").classed(d.cn.tableControlView,!0).style("box-sizing","content-box");if(be){var Xe="onwheel"in document?"wheel":"mousewheel";Re.on("mousemove",function(Qe){ze.filter(function(Lt){return Qe===Lt}).call(l,re)}).on(Xe,function(Qe){if(!Qe.scrollbarState.wheeling){Qe.scrollbarState.wheeling=!0;var Lt=Qe.scrollY+x.event.deltaY,kt=Q(re,ze,null,Lt)(Qe);kt||(x.event.stopPropagation(),x.event.preventDefault()),Qe.scrollbarState.wheeling=!1}}).call(l,re,!0)}ze.attr("transform",function(Qe){return a(Qe.size.l,Qe.size.t)});var it=ze.selectAll("."+d.cn.scrollBackground).data(e.repeat,e.keyFun);it.enter().append("rect").classed(d.cn.scrollBackground,!0).attr("fill","none"),it.attr("width",function(Qe){return Qe.width}).attr("height",function(Qe){return Qe.height}),ze.each(function(Qe){t.setClipUrl(x.select(this),g(re,Qe),re)});var ot=ze.selectAll("."+d.cn.yColumn).data(function(Qe){return Qe.columns},e.keyFun);ot.enter().append("g").classed(d.cn.yColumn,!0),ot.exit().remove(),ot.attr("transform",function(Qe){return a(Qe.x,0)}),be&&ot.call(x.behavior.drag().origin(function(Qe){var Lt=x.select(this);return B(Lt,Qe,-d.uplift),o(this),Qe.calcdata.columnDragInProgress=!0,l(ze.filter(function(kt){return Qe.calcdata.key===kt.key}),re),Qe}).on("drag",function(Qe){var Lt=x.select(this),kt=function(Sr){return(Qe===Sr?x.event.x:Sr.x)+Sr.columnWidth/2};Qe.x=Math.max(-d.overdrag,Math.min(Qe.calcdata.width+d.overdrag-Qe.columnWidth,x.event.x));var Vt=T(ot).filter(function(Sr){return Sr.calcdata.key===Qe.calcdata.key}),Zt=Vt.sort(function(Sr,xr){return kt(Sr)-kt(xr)});Zt.forEach(function(Sr,xr){Sr.xIndex=xr,Sr.x=Qe===Sr?Sr.x:Sr.xScale(Sr)}),ot.filter(function(Sr){return Qe!==Sr}).transition().ease(d.transitionEase).duration(d.transitionDuration).attr("transform",function(Sr){return a(Sr.x,0)}),Lt.call(i).attr("transform",a(Qe.x,-d.uplift))}).on("dragend",function(Qe){var Lt=x.select(this),kt=Qe.calcdata;Qe.x=Qe.xScale(Qe),Qe.calcdata.columnDragInProgress=!1,B(Lt,Qe,0),z(re,kt,kt.columns.map(function(Vt){return Vt.xIndex}))})),ot.each(function(Qe){t.setClipUrl(x.select(this),v(re,Qe),re)});var tt=ot.selectAll("."+d.cn.columnBlock).data(s.splitToPanels,e.keyFun);tt.enter().append("g").classed(d.cn.columnBlock,!0).attr("id",function(Qe){return Qe.key}),tt.style("cursor",function(Qe){return Qe.dragHandle?"ew-resize":Qe.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var lt=tt.filter(I),Ee=tt.filter(O);be&&Ee.call(x.behavior.drag().origin(function(Qe){return x.event.stopPropagation(),Qe}).on("drag",Q(re,ze,-1)).on("dragend",function(){})),_(re,ze,lt,tt),_(re,ze,Ee,tt);var _e=ze.selectAll("."+d.cn.scrollAreaClip).data(e.repeat,e.keyFun);_e.enter().append("clipPath").classed(d.cn.scrollAreaClip,!0).attr("id",function(Qe){return g(re,Qe)});var fe=_e.selectAll("."+d.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);fe.enter().append("rect").classed(d.cn.scrollAreaClipRect,!0).attr("x",-d.overdrag).attr("y",-d.uplift).attr("fill","none"),fe.attr("width",function(Qe){return Qe.width+2*d.overdrag}).attr("height",function(Qe){return Qe.height+d.uplift});var Fe=ot.selectAll("."+d.cn.columnBoundary).data(e.repeat,e.keyFun);Fe.enter().append("g").classed(d.cn.columnBoundary,!0);var rt=ot.selectAll("."+d.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);rt.enter().append("clipPath").classed(d.cn.columnBoundaryClippath,!0),rt.attr("id",function(Qe){return v(re,Qe)});var st=rt.selectAll("."+d.cn.columnBoundaryRect).data(e.repeat,e.keyFun);st.enter().append("rect").classed(d.cn.columnBoundaryRect,!0).attr("fill","none"),st.attr("width",function(Qe){return Qe.columnWidth+2*f(Qe)}).attr("height",function(Qe){return Qe.calcdata.height+2*f(Qe)+d.uplift}).attr("x",function(Qe){return-f(Qe)}).attr("y",function(Qe){return-f(Qe)}),W(null,Ee,ze)};function f(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function g(ee,re){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function v(ee,re){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function T(ee){return[].concat.apply([],ee.map(function(re){return re})).map(function(re){return re.__data__})}function l(ee,re,ce){function be(ot){var tt=ot.rowBlocks;return J(tt,tt.length-1)+(tt.length?X(tt[tt.length-1],1/0):1)}var Ae=ee.selectAll("."+d.cn.scrollbarKit).data(e.repeat,e.keyFun);Ae.enter().append("g").classed(d.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Ae.each(function(ot){var tt=ot.scrollbarState;tt.totalHeight=be(ot),tt.scrollableAreaHeight=ot.groupHeight-N(ot),tt.currentlyVisibleHeight=Math.min(tt.totalHeight,tt.scrollableAreaHeight),tt.ratio=tt.currentlyVisibleHeight/tt.totalHeight,tt.barLength=Math.max(tt.ratio*tt.currentlyVisibleHeight,d.goldenRatio*d.scrollbarWidth),tt.barWiggleRoom=tt.currentlyVisibleHeight-tt.barLength,tt.wiggleRoom=Math.max(0,tt.totalHeight-tt.scrollableAreaHeight),tt.topY=tt.barWiggleRoom===0?0:ot.scrollY/tt.wiggleRoom*tt.barWiggleRoom,tt.bottomY=tt.topY+tt.barLength,tt.dragMultiplier=tt.wiggleRoom/tt.barWiggleRoom}).attr("transform",function(ot){var tt=ot.width+d.scrollbarWidth/2+d.scrollbarOffset;return a(tt,N(ot))});var ze=Ae.selectAll("."+d.cn.scrollbar).data(e.repeat,e.keyFun);ze.enter().append("g").classed(d.cn.scrollbar,!0);var Re=ze.selectAll("."+d.cn.scrollbarSlider).data(e.repeat,e.keyFun);Re.enter().append("g").classed(d.cn.scrollbarSlider,!0),Re.attr("transform",function(ot){return a(0,ot.scrollbarState.topY||0)});var Xe=Re.selectAll("."+d.cn.scrollbarGlyph).data(e.repeat,e.keyFun);Xe.enter().append("line").classed(d.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",d.scrollbarWidth).attr("stroke-linecap","round").attr("y1",d.scrollbarWidth/2),Xe.attr("y2",function(ot){return ot.scrollbarState.barLength-d.scrollbarWidth/2}).attr("stroke-opacity",function(ot){return ot.columnDragInProgress||!ot.scrollbarState.barWiggleRoom||ce?0:.4}),Xe.transition().delay(0).duration(0),Xe.transition().delay(d.scrollbarHideDelay).duration(d.scrollbarHideDuration).attr("stroke-opacity",0);var it=ze.selectAll("."+d.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);it.enter().append("line").classed(d.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",d.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(ot){var tt=x.event.y,lt=this.getBoundingClientRect(),Ee=ot.scrollbarState,_e=tt-lt.top,fe=x.scale.linear().domain([0,Ee.scrollableAreaHeight]).range([0,Ee.totalHeight]).clamp(!0);Ee.topY<=_e&&_e<=Ee.bottomY||Q(re,ee,null,fe(_e-Ee.barLength/2))(ot)}).call(x.behavior.drag().origin(function(ot){return x.event.stopPropagation(),ot.scrollbarState.scrollbarScrollInProgress=!0,ot}).on("drag",Q(re,ee)).on("dragend",function(){})),it.attr("y2",function(ot){return ot.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(Xe.remove(),it.remove())}function _(ee,re,ce,be){var Ae=w(ce),ze=S(Ae);p(ze);var Re=E(ze);m(Re);var Xe=b(ze),it=y(Xe);u(it),h(it,re,be,ee),$(ze)}function w(ee){var re=ee.selectAll("."+d.cn.columnCells).data(e.repeat,e.keyFun);return re.enter().append("g").classed(d.cn.columnCells,!0),re.exit().remove(),re}function S(ee){var re=ee.selectAll("."+d.cn.columnCell).data(s.splitToCells,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(d.cn.columnCell,!0),re.exit().remove(),re}function E(ee){var re=ee.selectAll("."+d.cn.cellRect).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("rect").classed(d.cn.cellRect,!0),re}function y(ee){var re=ee.selectAll("."+d.cn.cellText).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("text").classed(d.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),re}function b(ee){var re=ee.selectAll("."+d.cn.cellTextHolder).data(e.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(d.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function p(ee){ee.each(function(re,ce){var be=re.calcdata.cells.font,Ae=re.column.specIndex,ze={size:F(be.size,Ae,ce),color:F(be.color,Ae,ce),family:F(be.family,Ae,ce),weight:F(be.weight,Ae,ce),style:F(be.style,Ae,ce),variant:F(be.variant,Ae,ce),textcase:F(be.textcase,Ae,ce),lineposition:F(be.lineposition,Ae,ce),shadow:F(be.shadow,Ae,ce)};re.rowNumber=re.key,re.align=F(re.calcdata.cells.align,Ae,ce),re.cellBorderWidth=F(re.calcdata.cells.line.width,Ae,ce),re.font=ze})}function u(ee){ee.each(function(re){t.font(x.select(this),re.font)})}function m(ee){ee.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var ce=x.select(this);c.stroke(ce,F(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),c.fill(ce,F(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function h(ee,re,ce,be){ee.text(function(Ae){var ze=Ae.column.specIndex,Re=Ae.rowNumber,Xe=Ae.value,it=typeof Xe=="string",ot=it&&Xe.match(/<br>/i),tt=!it||ot;Ae.mayHaveMarkup=it&&Xe.match(/[<&>]/);var lt=P(Xe);Ae.latex=lt;var Ee=lt?"":F(Ae.calcdata.cells.prefix,ze,Re)||"",_e=lt?"":F(Ae.calcdata.cells.suffix,ze,Re)||"",fe=lt?null:F(Ae.calcdata.cells.format,ze,Re)||null,Fe=Ee+(fe?M(fe)(Ae.value):Ae.value)+_e,rt;Ae.wrappingNeeded=!Ae.wrapped&&!tt&&!lt&&(rt=L(Fe)),Ae.cellHeightMayIncrease=ot||lt||Ae.mayHaveMarkup||(rt===void 0?L(Fe):rt),Ae.needsConvertToTspans=Ae.mayHaveMarkup||Ae.wrappingNeeded||Ae.latex;var st;if(Ae.wrappingNeeded){var Qe=d.wrapSplitCharacter===" "?Fe.replace(/<a href=/ig,"<a_href="):Fe,Lt=Qe.split(d.wrapSplitCharacter),kt=d.wrapSplitCharacter===" "?Lt.map(function(Vt){return Vt.replace(/<a_href=/ig,"<a href=")}):Lt;Ae.fragments=kt.map(function(Vt){return{text:Vt,width:null}}),Ae.fragments.push({fragment:d.wrapSpacer,width:null}),st=kt.join(d.lineBreaker)+d.lineBreaker+d.wrapSpacer}else delete Ae.fragments,st=Fe;return st}).attr("dy",function(Ae){return Ae.needsConvertToTspans?0:"0.75em"}).each(function(Ae){var ze=this,Re=x.select(ze),Xe=Ae.wrappingNeeded?le:he;Ae.needsConvertToTspans?r.convertToTspans(Re,be,Xe(ce,ze,re,be,Ae)):x.select(ze.parentNode).attr("transform",function(it){return a(G(it),d.cellPad)}).attr("text-anchor",function(it){return{left:"start",center:"middle",right:"end"}[it.align]})})}function P(ee){return typeof ee=="string"&&ee.match(d.latexCheck)}function L(ee){return ee.indexOf(d.wrapSplitCharacter)!==-1}function z(ee,re,ce){var be=re.gdColumnsOriginalOrder;re.gdColumns.sort(function(Ae,ze){return ce[be.indexOf(Ae)]-ce[be.indexOf(ze)]}),re.columnorder=ce,ee.emit("plotly_restyle")}function F(ee,re,ce){if(A.isArrayOrTypedArray(ee)){var be=ee[Math.min(re,ee.length-1)];return A.isArrayOrTypedArray(be)?be[Math.min(ce,be.length-1)]:be}else return ee}function B(ee,re,ce){ee.transition().ease(d.releaseTransitionEase).duration(d.releaseTransitionDuration).attr("transform",a(re.x,ce))}function O(ee){return ee.type==="cells"}function I(ee){return ee.type==="header"}function N(ee){var re=ee.rowBlocks.length?ee.rowBlocks[0].auxiliaryBlocks:[];return re.reduce(function(ce,be){return ce+X(be,1/0)},0)}function U(ee,re,ce){for(var be=[],Ae=0,ze=0;ze<ee.length;ze++){for(var Re=ee[ze],Xe=Re.rows,it=0,ot=0;ot<Xe.length;ot++)it+=Xe[ot].rowHeight;Re.allRowsHeight=it;var tt=Ae+it,lt=re,Ee=lt+ce;lt<tt&&Ee>Ae&&be.push(ze),Ae+=it}return be}function W(ee,re,ce){var be=T(re)[0];if(be!==void 0){var Ae=be.rowBlocks,ze=be.calcdata,Re=J(Ae,Ae.length),Xe=be.calcdata.groupHeight-N(be),it=ze.scrollY=Math.max(0,Math.min(Re-Xe,ze.scrollY)),ot=U(Ae,it,Xe);ot.length===1&&(ot[0]===Ae.length-1?ot.unshift(ot[0]-1):ot.push(ot[0]+1)),ot[0]%2&&ot.reverse(),re.each(function(tt,lt){tt.page=ot[lt],tt.scrollY=it}),re.attr("transform",function(tt){var lt=J(tt.rowBlocks,tt.page)-tt.scrollY;return a(0,lt)}),ee&&(ue(ee,ce,re,ot,be.prevPages,be,0),ue(ee,ce,re,ot,be.prevPages,be,1),l(ce,ee))}}function Q(ee,re,ce,be){return function(ze){var Re=ze.calcdata?ze.calcdata:ze,Xe=re.filter(function(lt){return Re.key===lt.key}),it=ce||Re.scrollbarState.dragMultiplier,ot=Re.scrollY;Re.scrollY=be===void 0?Re.scrollY+it*x.event.dy:be;var tt=Xe.selectAll("."+d.cn.yColumn).selectAll("."+d.cn.columnBlock).filter(O);return W(ee,tt,Xe),Re.scrollY===ot}}function ue(ee,re,ce,be,Ae,ze,Re){var Xe=be[Re]!==Ae[Re];Xe&&(clearTimeout(ze.currentRepaint[Re]),ze.currentRepaint[Re]=setTimeout(function(){var it=ce.filter(function(ot,tt){return tt===Re&&be[tt]!==Ae[tt]});_(ee,re,it,ce),Ae[Re]=be[Re]}))}function le(ee,re,ce,be){return function(){var ze=x.select(re.parentNode);ze.each(function(Re){var Xe=Re.fragments;ze.selectAll("tspan.line").each(function(Fe,rt){Xe[rt].width=this.getComputedTextLength()});var it=Xe[Xe.length-1].width,ot=Xe.slice(0,-1),tt=[],lt,Ee,_e=0,fe=Re.column.columnWidth-2*d.cellPad;for(Re.value="";ot.length;)lt=ot.shift(),Ee=lt.width+it,_e+Ee>fe&&(Re.value+=tt.join(d.wrapSpacer)+d.lineBreaker,tt=[],_e=0),tt.push(lt.text),_e+=Ee;_e&&(Re.value+=tt.join(d.wrapSpacer)),Re.wrapped=!0}),ze.selectAll("tspan.line").remove(),h(ze.select("."+d.cn.cellText),ce,ee,be),x.select(re.parentNode.parentNode).call($)}}function he(ee,re,ce,be,Ae){return function(){if(!Ae.settledY){var Re=x.select(re.parentNode),Xe=ie(Ae),it=Ae.key-Xe.firstRowIndex,ot=Xe.rows[it].rowHeight,tt=Ae.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*d.cellPad:ot,lt=Math.max(tt,ot),Ee=lt-Xe.rows[it].rowHeight;Ee&&(Xe.rows[it].rowHeight=lt,ee.selectAll("."+d.cn.columnCell).call($),W(null,ee.filter(O),0),l(ce,be,!0)),Re.attr("transform",function(){var _e=this,fe=_e.parentNode,Fe=fe.getBoundingClientRect(),rt=x.select(_e.parentNode).select("."+d.cn.cellRect).node().getBoundingClientRect(),st=_e.transform.baseVal.consolidate(),Qe=rt.top-Fe.top+(st?st.matrix.f:d.cellPad);return a(G(Ae,x.select(_e.parentNode).select("."+d.cn.cellTextHolder).node().getBoundingClientRect().width),Qe)}),Ae.settledY=!0}}}function G(ee,re){switch(ee.align){case"left":return d.cellPad;case"right":return ee.column.columnWidth-(re||0)-d.cellPad;case"center":return(ee.column.columnWidth-(re||0))/2;default:return d.cellPad}}function $(ee){ee.attr("transform",function(re){var ce=re.rowBlocks[0].auxiliaryBlocks.reduce(function(Re,Xe){return Re+X(Xe,1/0)},0),be=ie(re),Ae=X(be,re.key),ze=Ae+ce;return a(0,ze)}).selectAll("."+d.cn.cellRect).attr("height",function(re){return j(ie(re),re.key).rowHeight})}function J(ee,re){for(var ce=0,be=re-1;be>=0;be--)ce+=oe(ee[be]);return ce}function X(ee,re){for(var ce=0,be=0;be<ee.rows.length&&ee.rows[be].rowIndex<re;be++)ce+=ee.rows[be].rowHeight;return ce}function oe(ee){var re=ee.allRowsHeight;if(re!==void 0)return re;for(var ce=0,be=0;be<ee.rows.length;be++)ce+=ee.rows[be].rowHeight;return ee.allRowsHeight=ce,ce}function ie(ee){return ee.rowBlocks[ee.page]}function j(ee,re){return ee.rows[re-ee.firstRowIndex]}}}),kG=Ze({"src/traces/table/base_plot.js"(Z){"use strict";var q=Hh().getModuleCalcData,d=W6(),x="table";Z.name=x,Z.plot=function(A){var M=q(A.calcdata,x)[0];M.length&&d(A,M)},Z.clean=function(A,M,e,t){var r=t._has&&t._has(x),o=M._has&&M._has(x);r&&!o&&t._paperdiv.selectAll(".table").remove()}}}),LG=Ze({"src/traces/table/index.js"(Z,q){"use strict";q.exports={attributes:G6(),supplyDefaults:SG(),calc:MG(),plot:W6(),moduleType:"trace",name:"table",basePlotModule:kG(),categories:["noOpacity"],meta:{}}}}),PG=Ze({"lib/table.js"(Z,q){"use strict";q.exports=LG()}}),IG=Ze({"src/traces/carpet/axis_attributes.js"(Z,q){"use strict";var d=tc(),x=oh(),A=Wh(),M=Qc().descriptionWithDates,e=pc().overrideAll,t=Gh().dash,r=rs().extendFlat;q.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:d({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:A.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:r({},A.labelalias,{editType:"calc"}),tickfont:d({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:M("tick label")},tickformatstops:e(A.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:x.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:r({},t,{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:r({},t,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:x.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"}}}),PT=Ze({"src/traces/carpet/attributes.js"(Z,q){"use strict";var d=tc(),x=IG(),A=oh(),M=d({editType:"calc"}),e=tf().zorder;M.family.dflt='"Open Sans", verdana, arial, sans-serif',M.size.dflt=12,M.color.dflt=A.defaultLine,q.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:x,baxis:x,font:M,color:{valType:"color",dflt:A.defaultLine,editType:"plot"},zorder:e}}}),RG=Ze({"src/traces/carpet/xy_defaults.js"(Z,q){"use strict";var d=ca().isArray1D;q.exports=function(A,M,e){var t=e("x"),r=t&&t.length,o=e("y"),a=o&&o.length;if(!r&&!a)return!1;if(M._cheater=!t,(!r||d(t))&&(!a||d(o))){var i=r?t.length:1/0;a&&(i=Math.min(i,o.length)),M.a&&M.a.length&&(i=Math.min(i,M.a.length)),M.b&&M.b.length&&(i=Math.min(i,M.b.length)),M._length=i}else M._length=null;return!0}}}),DG=Ze({"src/traces/carpet/axis_defaults.js"(Z,q){"use strict";var d=PT(),x=Yn().addOpacity,A=oo(),M=ca(),e=X0(),t=$m(),r=Qm(),o=I2(),a=wv(),i=a1();q.exports=function(c,f,g){var v=g.letter,T=g.font||{},l=d[v+"axis"];function _(U,W){return M.coerce(c,f,l,U,W)}function w(U,W){return M.coerce2(c,f,l,U,W)}g.name&&(f._name=g.name,f._id=g.name),_("autotypenumbers",g.autotypenumbersDflt);var S=_("type");if(S==="-"&&(g.data&&n(f,g.data),f.type==="-"?f.type="linear":S=c.type=f.type),_("smoothing"),_("cheatertype"),_("showticklabels"),_("labelprefix",v+" = "),_("labelsuffix"),_("showtickprefix"),_("showticksuffix"),_("separatethousands"),_("tickformat"),_("exponentformat"),_("minexponent"),_("showexponent"),_("categoryorder"),_("tickmode"),_("tickvals"),_("ticktext"),_("tick0"),_("dtick"),f.tickmode==="array"&&(_("arraytick0"),_("arraydtick")),_("labelpadding"),f._hovertitle=v,S==="date"){var E=A.getComponentMethod("calendars","handleDefaults");E(c,f,"calendar",g.calendar)}a(f,g.fullLayout),f.c2p=M.identity;var y=_("color",g.dfltColor),b=y===c.color?y:T.color,p=_("title.text");p&&(M.coerceFont(_,"title.font",T,{overrideDflt:{size:M.bigFont(T.size),color:b}}),_("title.offset")),_("tickangle");var u=_("autorange",!f.isValidRange(c.range));u&&_("rangemode"),_("range"),f.cleanRange(),_("fixedrange"),e(c,f,_,S),r(c,f,_,S,g),t(c,f,_,S,g),o(c,f,_,{data:g.data,dataAttr:v});var m=w("gridcolor",x(y,.3)),h=w("gridwidth"),P=w("griddash"),L=_("showgrid");L||(delete f.gridcolor,delete f.gridwidth,delete f.griddash);var z=w("startlinecolor",y),F=w("startlinewidth",h),B=_("startline",f.showgrid||!!z||!!F);B||(delete f.startlinecolor,delete f.startlinewidth);var O=w("endlinecolor",y),I=w("endlinewidth",h),N=_("endline",f.showgrid||!!O||!!I);return N||(delete f.endlinecolor,delete f.endlinewidth),L?(_("minorgridcount"),_("minorgridwidth",h),_("minorgriddash",P),_("minorgridcolor",x(m,.06)),f.minorgridcount||(delete f.minorgridwidth,delete f.minorgriddash,delete f.minorgridcolor)):(delete f.gridcolor,delete f.gridwidth,delete f.griddash),f.showticklabels==="none"&&(delete f.tickfont,delete f.tickangle,delete f.showexponent,delete f.exponentformat,delete f.minexponent,delete f.tickformat,delete f.showticksuffix,delete f.showtickprefix),f.showticksuffix||delete f.ticksuffix,f.showtickprefix||delete f.tickprefix,_("tickmode"),f};function n(s,c){if(s.type==="-"){var f=s._id,g=f.charAt(0),v=g+"calendar",T=s[v];s.type=i(c,T,{autotypenumbers:s.autotypenumbers})}}}}),zG=Ze({"src/traces/carpet/ab_defaults.js"(Z,q){"use strict";var d=DG(),x=Dl();q.exports=function(e,t,r,o,a){var i=o("a");i||(o("da"),o("a0"));var n=o("b");n||(o("db"),o("b0")),A(e,t,r,a)};function A(M,e,t,r){var o=["aaxis","baxis"];o.forEach(function(a){var i=a.charAt(0),n=M[a]||{},s=x.newContainer(e,a),c={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:i+"axis",letter:i,font:e.font,name:a,data:M[i],calendar:e.calendar,dfltColor:r,bgColor:t.paper_bgcolor,autotypenumbersDflt:t.autotypenumbers,fullLayout:t};d(n,s,c),s._categories=s._categories||[],!M[a]&&n.type!=="-"&&(M[a]={type:n.type})})}}}),FG=Ze({"src/traces/carpet/defaults.js"(Z,q){"use strict";var d=ca(),x=RG(),A=zG(),M=PT(),e=oh();q.exports=function(r,o,a,i){function n(f,g){return d.coerce(r,o,M,f,g)}o._clipPathId="clip"+o.uid+"carpet";var s=n("color",e.defaultLine);if(d.coerceFont(n,"font",i.font),n("carpet"),A(r,o,i,n,s),!o.a||!o.b){o.visible=!1;return}o.a.length<3&&(o.aaxis.smoothing=0),o.b.length<3&&(o.baxis.smoothing=0);var c=x(r,o,n);c||(o.visible=!1),o._cheater&&n("cheaterslope"),n("zorder")}}}),X6=Ze({"src/traces/carpet/map_1d_array.js"(Z,q){"use strict";var d=ca().isArrayOrTypedArray;q.exports=function(A,M,e){var t;for(d(A)?A.length>M.length&&(A=A.slice(0,M.length)):A=[],t=0;t<M.length;t++)A[t]=e(M[t]);return A}}}),Z6=Ze({"src/traces/carpet/makepath.js"(Z,q){"use strict";q.exports=function(x,A,M){if(x.length===0)return"";var e,t=[],r=M?3:1;for(e=0;e<x.length;e+=r)t.push(x[e]+","+A[e]),M&&e<x.length-r&&(t.push("C"),t.push([x[e+1]+","+A[e+1],x[e+2]+","+A[e+2]+" "].join(" ")));return t.join(M?"":"L")}}}),OG=Ze({"src/traces/carpet/orient_text.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t,r){var o=t[0]*x.dpdx(A),a=t[1]*x.dpdy(M),i=1,n=1;if(r){var s=Math.sqrt(t[0]*t[0]+t[1]*t[1]),c=Math.sqrt(r[0]*r[0]+r[1]*r[1]),f=(t[0]*r[0]+t[1]*r[1])/s/c;n=Math.max(0,f)}var g=Math.atan2(a,o)*180/Math.PI;return g<-90?(g+=180,i=-i):g>90&&(g-=180,i=-i),{angle:g,flip:i,p:x.c2p(e,A,M),offsetMultplier:n}}}}),BG=Ze({"src/traces/carpet/plot.js"(Z,q){"use strict";var d=On(),x=as(),A=X6(),M=Z6(),e=OG(),t=fu(),r=ca(),o=r.strRotate,a=r.strTranslate,i=mh();q.exports=function(_,w,S,E){var y=_._context.staticPlot,b=w.xaxis,p=w.yaxis,u=_._fullLayout,m=u._clips;r.makeTraceGroups(E,S,"trace").each(function(h){var P=d.select(this),L=h[0],z=L.trace,F=z.aaxis,B=z.baxis,O=r.ensureSingle(P,"g","minorlayer"),I=r.ensureSingle(P,"g","majorlayer"),N=r.ensureSingle(P,"g","boundarylayer"),U=r.ensureSingle(P,"g","labellayer");P.style("opacity",z.opacity),s(b,p,I,F,"a",F._gridlines,!0,y),s(b,p,I,B,"b",B._gridlines,!0,y),s(b,p,O,F,"a",F._minorgridlines,!0,y),s(b,p,O,B,"b",B._minorgridlines,!0,y),s(b,p,N,F,"a-boundary",F._boundarylines,y),s(b,p,N,B,"b-boundary",B._boundarylines,y);var W=c(_,b,p,z,L,U,F._labels,"a-label"),Q=c(_,b,p,z,L,U,B._labels,"b-label");f(_,U,z,L,b,p,W,Q),n(z,L,m,b,p)})};function n(l,_,w,S,E){var y,b,p,u,m=w.select("#"+l._clipPathId);m.size()||(m=w.append("clipPath").classed("carpetclip",!0));var h=r.ensureSingle(m,"path","carpetboundary"),P=_.clipsegments,L=[];for(u=0;u<P.length;u++)y=P[u],b=A([],y.x,S.c2p),p=A([],y.y,E.c2p),L.push(M(b,p,y.bicubic));var z="M"+L.join("L")+"Z";m.attr("id",l._clipPathId),h.attr("d",z)}function s(l,_,w,S,E,y,b){var p="const-"+E+"-lines",u=w.selectAll("."+p).data(y);u.enter().append("path").classed(p,!0).style("vector-effect",b?"none":"non-scaling-stroke"),u.each(function(m){var h=m,P=h.x,L=h.y,z=A([],P,l.c2p),F=A([],L,_.c2p),B="M"+M(z,F,h.smoothing),O=d.select(this);O.attr("d",B).style("stroke-width",h.width).style("stroke",h.color).style("stroke-dasharray",x.dashStyle(h.dash,h.width)).style("fill","none")}),u.exit().remove()}function c(l,_,w,S,E,y,b,p){var u=y.selectAll("text."+p).data(b);u.enter().append("text").classed(p,!0);var m=0,h={};return u.each(function(P,L){var z;if(P.axis.tickangle==="auto")z=e(S,_,w,P.xy,P.dxy);else{var F=(P.axis.tickangle+180)*Math.PI/180;z=e(S,_,w,P.xy,[Math.cos(F),Math.sin(F)])}L||(h={angle:z.angle,flip:z.flip});var B=(P.endAnchor?-1:1)*z.flip,O=d.select(this).attr({"text-anchor":B>0?"start":"end","data-notex":1}).call(x.font,P.font).text(P.text).call(t.convertToTspans,l),I=x.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(P.axis.labelpadding*B,I.height*.3)),m=Math.max(m,I.width+P.axis.labelpadding)}),u.exit().remove(),h.maxExtent=m,h}function f(l,_,w,S,E,y,b,p){var u,m,h,P,L=r.aggNums(Math.min,null,w.a),z=r.aggNums(Math.max,null,w.a),F=r.aggNums(Math.min,null,w.b),B=r.aggNums(Math.max,null,w.b);u=.5*(L+z),m=F,h=w.ab2xy(u,m,!0),P=w.dxyda_rough(u,m),b.angle===void 0&&r.extendFlat(b,e(w,E,y,h,w.dxydb_rough(u,m))),T(l,_,w,S,h,P,w.aaxis,E,y,b,"a-title"),u=L,m=.5*(F+B),h=w.ab2xy(u,m,!0),P=w.dxydb_rough(u,m),p.angle===void 0&&r.extendFlat(p,e(w,E,y,h,w.dxyda_rough(u,m))),T(l,_,w,S,h,P,w.baxis,E,y,p,"b-title")}var g=i.LINE_SPACING,v=(1-i.MID_SHIFT)/g+1;function T(l,_,w,S,E,y,b,p,u,m,h){var P=[];b.title.text&&P.push(b.title.text);var L=_.selectAll("text."+h).data(P),z=m.maxExtent;L.enter().append("text").classed(h,!0),L.each(function(){var F=e(w,p,u,E,y);["start","both"].indexOf(b.showticklabels)===-1&&(z=0);var B=b.title.font.size;z+=B+b.title.offset;var O=m.angle+(m.flip<0?180:0),I=(O-F.angle+450)%360,N=I>90&&I<270,U=d.select(this);U.text(b.title.text).call(t.convertToTspans,l),N&&(z=(-t.lineCount(U)+v)*g*B-z),U.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(x.font,b.title.font)}),L.exit().remove()}}}),NG=Ze({"src/traces/carpet/cheater_basis.js"(Z,q){"use strict";var d=ca().isArrayOrTypedArray;q.exports=function(x,A,M){var e,t,r,o,a,i,n=[],s=d(x)?x.length:x,c=d(A)?A.length:A,f=d(x)?x:null,g=d(A)?A:null;f&&(r=(f.length-1)/(f[f.length-1]-f[0])/(s-1)),g&&(o=(g.length-1)/(g[g.length-1]-g[0])/(c-1));var v,T=1/0,l=-1/0;for(t=0;t<c;t++)for(n[t]=[],i=g?(g[t]-g[0])*o:t/(c-1),e=0;e<s;e++)a=f?(f[e]-f[0])*r:e/(s-1),v=a-i*M,T=Math.min(v,T),l=Math.max(v,l),n[t][e]=v;var _=1/(l-T),w=-T*_;for(t=0;t<c;t++)for(e=0;e<s;e++)n[t][e]=_*n[t][e]+w;return n}}}),UG=Ze({"src/traces/carpet/array_minmax.js"(Z,q){"use strict";var d=ca().isArrayOrTypedArray;q.exports=function(A){return x(A,0)};function x(A,M){if(!d(A)||M>=10)return null;for(var e=1/0,t=-1/0,r=A.length,o=0;o<r;o++){var a=A[o];if(d(a)){var i=x(a,M+1);i&&(e=Math.min(i[0],e),t=Math.max(i[1],t))}else e=Math.min(a,e),t=Math.max(a,t)}return[e,t]}}}),jG=Ze({"src/traces/carpet/calc_gridlines.js"(Z,q){"use strict";var d=Wo(),x=rs().extendFlat;q.exports=function(M,e,t){var r,o,a,i,n,s,c,f,g,v,T,l,_,w,S=M["_"+e],E=M[e+"axis"],y=E._gridlines=[],b=E._minorgridlines=[],p=E._boundarylines=[],u=M["_"+t],m=M[t+"axis"];E.tickmode==="array"&&(E.tickvals=S.slice());var h=M._xctrl,P=M._yctrl,L=h[0].length,z=h.length,F=M._a.length,B=M._b.length;d.prepTicks(E),E.tickmode==="array"&&delete E.tickvals;var O=E.smoothing?3:1;function I(U){var W,Q,ue,le,he,G,$,J,X,oe,ie,j,ee=[],re=[],ce={};if(e==="b")for(Q=M.b2j(U),ue=Math.floor(Math.max(0,Math.min(B-2,Q))),le=Q-ue,ce.length=B,ce.crossLength=F,ce.xy=function(be){return M.evalxy([],be,Q)},ce.dxy=function(be,Ae){return M.dxydi([],be,ue,Ae,le)},W=0;W<F;W++)G=Math.min(F-2,W),$=W-G,J=M.evalxy([],W,Q),m.smoothing&&W>0&&(X=M.dxydi([],W-1,ue,0,le),ee.push(he[0]+X[0]/3),re.push(he[1]+X[1]/3),oe=M.dxydi([],W-1,ue,1,le),ee.push(J[0]-oe[0]/3),re.push(J[1]-oe[1]/3)),ee.push(J[0]),re.push(J[1]),he=J;else for(W=M.a2i(U),G=Math.floor(Math.max(0,Math.min(F-2,W))),$=W-G,ce.length=F,ce.crossLength=B,ce.xy=function(be){return M.evalxy([],W,be)},ce.dxy=function(be,Ae){return M.dxydj([],G,be,$,Ae)},Q=0;Q<B;Q++)ue=Math.min(B-2,Q),le=Q-ue,J=M.evalxy([],W,Q),m.smoothing&&Q>0&&(ie=M.dxydj([],G,Q-1,$,0),ee.push(he[0]+ie[0]/3),re.push(he[1]+ie[1]/3),j=M.dxydj([],G,Q-1,$,1),ee.push(J[0]-j[0]/3),re.push(J[1]-j[1]/3)),ee.push(J[0]),re.push(J[1]),he=J;return ce.axisLetter=e,ce.axis=E,ce.crossAxis=m,ce.value=U,ce.constvar=t,ce.index=f,ce.x=ee,ce.y=re,ce.smoothing=m.smoothing,ce}function N(U){var W,Q,ue,le,he,G=[],$=[],J={};if(J.length=S.length,J.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(B-2,U)),he=Math.min(1,Math.max(0,U-ue)),J.xy=function(X){return M.evalxy([],X,U)},J.dxy=function(X,oe){return M.dxydi([],X,ue,oe,he)},W=0;W<L;W++)G[W]=h[U*O][W],$[W]=P[U*O][W];else for(Q=Math.max(0,Math.min(F-2,U)),le=Math.min(1,Math.max(0,U-Q)),J.xy=function(X){return M.evalxy([],U,X)},J.dxy=function(X,oe){return M.dxydj([],Q,X,le,oe)},W=0;W<z;W++)G[W]=h[W][U*O],$[W]=P[W][U*O];return J.axisLetter=e,J.axis=E,J.crossAxis=m,J.value=S[U],J.constvar=t,J.index=U,J.x=G,J.y=$,J.smoothing=m.smoothing,J}if(E.tickmode==="array"){for(i=5e-15,n=[Math.floor((S.length-1-E.arraytick0)/E.arraydtick*(1+i)),Math.ceil(-E.arraytick0/E.arraydtick/(1+i))].sort(function(U,W){return U-W}),s=n[0]-1,c=n[1]+1,f=s;f<c;f++)o=E.arraytick0+E.arraydtick*f,!(o<0||o>S.length-1)&&y.push(x(N(o),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s;f<c;f++)if(a=E.arraytick0+E.arraydtick*f,T=Math.min(a+E.arraydtick,S.length-1),!(a<0||a>S.length-1)&&!(T<0||T>S.length-1))for(l=S[a],_=S[T],r=0;r<E.minorgridcount;r++)w=T-a,!(w<=0)&&(v=l+(_-l)*(r+1)/(E.minorgridcount+1)*(E.arraydtick/w),!(v<S[0]||v>S[S.length-1])&&b.push(x(I(v),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&p.push(x(N(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&p.push(x(N(S.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((S[S.length-1]-E.tick0)/E.dtick*(1+i)),Math.ceil((S[0]-E.tick0)/E.dtick/(1+i))].sort(function(U,W){return U-W}),s=n[0],c=n[1],f=s;f<=c;f++)g=E.tick0+E.dtick*f,y.push(x(I(g),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=s-1;f<c+1;f++)for(g=E.tick0+E.dtick*f,r=0;r<E.minorgridcount;r++)v=g+E.dtick*(r+1)/(E.minorgridcount+1),!(v<S[0]||v>S[S.length-1])&&b.push(x(I(v),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&p.push(x(I(S[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&p.push(x(I(S[S.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),qG=Ze({"src/traces/carpet/calc_labels.js"(Z,q){"use strict";var d=Wo(),x=rs().extendFlat;q.exports=function(M,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t<s.length;t++)i=s[t],["start","both"].indexOf(e.showticklabels)!==-1&&(r=d.tickText(e,i.value),x(r,{prefix:o,suffix:a,endAnchor:!0,xy:i.xy(0),dxy:i.dxy(0,0),axis:i.axis,length:i.crossAxis.length,font:i.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),n.push(r)),["end","both"].indexOf(e.showticklabels)!==-1&&(r=d.tickText(e,i.value),x(r,{endAnchor:!1,xy:i.xy(i.crossLength-1),dxy:i.dxy(i.crossLength-2,1),axis:i.axis,length:i.crossAxis.length,font:i.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),n.push(r))}}}),VG=Ze({"src/traces/carpet/calc_clippath.js"(Z,q){"use strict";q.exports=function(x,A,M,e){var t,r,o,a=[],i=!!M.smoothing,n=!!e.smoothing,s=x[0].length-1,c=x.length-1;for(t=0,r=[],o=[];t<=s;t++)r[t]=x[0][t],o[t]=A[0][t];for(a.push({x:r,y:o,bicubic:i}),t=0,r=[],o=[];t<=c;t++)r[t]=x[t][s],o[t]=A[t][s];for(a.push({x:r,y:o,bicubic:n}),t=s,r=[],o=[];t>=0;t--)r[s-t]=x[c][t],o[s-t]=A[c][t];for(a.push({x:r,y:o,bicubic:i}),t=c,r=[],o=[];t>=0;t--)r[c-t]=x[t][0],o[c-t]=A[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),GG=Ze({"src/traces/carpet/smooth_fill_2d_array.js"(Z,q){"use strict";var d=ca();q.exports=function(A,M,e){var t,r,o,a=[],i=[],n=A[0].length,s=A.length;function c(Q,ue){var le=0,he,G=0;return Q>0&&(he=A[ue][Q-1])!==void 0&&(G++,le+=he),Q<n-1&&(he=A[ue][Q+1])!==void 0&&(G++,le+=he),ue>0&&(he=A[ue-1][Q])!==void 0&&(G++,le+=he),ue<s-1&&(he=A[ue+1][Q])!==void 0&&(G++,le+=he),le/Math.max(1,G)}var f=0;for(t=0;t<n;t++)for(r=0;r<s;r++)A[r][t]===void 0&&(a.push(t),i.push(r),A[r][t]=c(t,r)),f=Math.max(f,Math.abs(A[r][t]));if(!a.length)return A;var g,v,T,l,_,w,S,E,y,b,p,u=1e-5,m=0,h=100,P=0,L=a.length;do{for(m=0,o=0;o<L;o++){t=a[o],r=i[o];var z=0,F=0,B,O,I,N,U,W;t===0?(U=Math.min(n-1,2),I=M[U],N=M[1],B=A[r][U],O=A[r][1],F+=O+(O-B)*(M[0]-N)/(N-I),z++):t===n-1&&(U=Math.max(0,n-3),I=M[U],N=M[n-2],B=A[r][U],O=A[r][n-2],F+=O+(O-B)*(M[n-1]-N)/(N-I),z++),(t===0||t===n-1)&&r>0&&r<s-1&&(g=e[r+1]-e[r],v=e[r]-e[r-1],F+=(v*A[r+1][t]+g*A[r-1][t])/(v+g),z++),r===0?(W=Math.min(s-1,2),I=e[W],N=e[1],B=A[W][t],O=A[1][t],F+=O+(O-B)*(e[0]-N)/(N-I),z++):r===s-1&&(W=Math.max(0,s-3),I=e[W],N=e[s-2],B=A[W][t],O=A[s-2][t],F+=O+(O-B)*(e[s-1]-N)/(N-I),z++),(r===0||r===s-1)&&t>0&&t<n-1&&(g=M[t+1]-M[t],v=M[t]-M[t-1],F+=(v*A[r][t+1]+g*A[r][t-1])/(v+g),z++),z?F/=z:(T=M[t+1]-M[t],l=M[t]-M[t-1],_=e[r+1]-e[r],w=e[r]-e[r-1],S=T*l*(T+l),E=_*w*(_+w),F=(S*(w*A[r+1][t]+_*A[r-1][t])+E*(l*A[r][t+1]+T*A[r][t-1]))/(E*(l+T)+S*(w+_))),y=F-A[r][t],b=y/f,m+=b*b,p=z?0:.85,A[r][t]+=y*(1+p)}m=Math.sqrt(m)}while(P++<h&&m>u);return d.log("Smoother converged to",m,"after",P,"iterations"),A}}}),HG=Ze({"src/traces/carpet/constants.js"(Z,q){"use strict";q.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),WG=Ze({"src/traces/carpet/catmull_rom.js"(Z,q){"use strict";var d=.5;q.exports=function(A,M,e,t){var r=A[0]-M[0],o=A[1]-M[1],a=e[0]-M[0],i=e[1]-M[1],n=Math.pow(r*r+o*o,d/2),s=Math.pow(a*a+i*i,d/2),c=(s*s*r-n*n*a)*t,f=(s*s*o-n*n*i)*t,g=s*(n+s)*3,v=n*(n+s)*3;return[[M[0]+(g&&c/g),M[1]+(g&&f/g)],[M[0]-(v&&c/v),M[1]-(v&&f/v)]]}}}),XG=Ze({"src/traces/carpet/compute_control_points.js"(Z,q){"use strict";var d=WG(),x=ca().ensureArray;function A(M,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+M[0])/3,(2*o+M[1])/3]}q.exports=function(e,t,r,o,a,i){var n,s,c,f,g,v,T,l,_,w,S=r[0].length,E=r.length,y=a?3*S-2:S,b=i?3*E-2:E;for(e=x(e,b),t=x(t,b),c=0;c<b;c++)e[c]=x(e[c],y),t[c]=x(t[c],y);for(s=0,f=0;s<E;s++,f+=i?3:1)for(g=e[f],v=t[f],T=r[s],l=o[s],n=0,c=0;n<S;n++,c+=a?3:1)g[c]=T[n],v[c]=l[n];if(a)for(s=0,f=0;s<E;s++,f+=i?3:1){for(n=1,c=3;n<S-1;n++,c+=3)_=d([r[s][n-1],o[s][n-1]],[r[s][n],o[s][n]],[r[s][n+1],o[s][n+1]],a),e[f][c-1]=_[0][0],t[f][c-1]=_[0][1],e[f][c+1]=_[1][0],t[f][c+1]=_[1][1];w=A([e[f][0],t[f][0]],[e[f][2],t[f][2]],[e[f][3],t[f][3]]),e[f][1]=w[0],t[f][1]=w[1],w=A([e[f][y-1],t[f][y-1]],[e[f][y-3],t[f][y-3]],[e[f][y-4],t[f][y-4]]),e[f][y-2]=w[0],t[f][y-2]=w[1]}if(i)for(c=0;c<y;c++){for(f=3;f<b-3;f+=3)_=d([e[f-3][c],t[f-3][c]],[e[f][c],t[f][c]],[e[f+3][c],t[f+3][c]],i),e[f-1][c]=_[0][0],t[f-1][c]=_[0][1],e[f+1][c]=_[1][0],t[f+1][c]=_[1][1];w=A([e[0][c],t[0][c]],[e[2][c],t[2][c]],[e[3][c],t[3][c]]),e[1][c]=w[0],t[1][c]=w[1],w=A([e[b-1][c],t[b-1][c]],[e[b-3][c],t[b-3][c]],[e[b-4][c],t[b-4][c]]),e[b-2][c]=w[0],t[b-2][c]=w[1]}if(a&&i)for(f=1;f<b;f+=(f+1)%3===0?2:1){for(c=3;c<y-3;c+=3)_=d([e[f][c-3],t[f][c-3]],[e[f][c],t[f][c]],[e[f][c+3],t[f][c+3]],a),e[f][c-1]=.5*(e[f][c-1]+_[0][0]),t[f][c-1]=.5*(t[f][c-1]+_[0][1]),e[f][c+1]=.5*(e[f][c+1]+_[1][0]),t[f][c+1]=.5*(t[f][c+1]+_[1][1]);w=A([e[f][0],t[f][0]],[e[f][2],t[f][2]],[e[f][3],t[f][3]]),e[f][1]=.5*(e[f][1]+w[0]),t[f][1]=.5*(t[f][1]+w[1]),w=A([e[f][y-1],t[f][y-1]],[e[f][y-3],t[f][y-3]],[e[f][y-4],t[f][y-4]]),e[f][y-2]=.5*(e[f][y-2]+w[0]),t[f][y-2]=.5*(t[f][y-2]+w[1])}return[e,t]}}}),ZG=Ze({"src/traces/carpet/create_spline_evaluator.js"(Z,q){"use strict";q.exports=function(d,x,A,M,e){var t=x-2,r=A-2;return M&&e?function(o,a,i){o||(o=[]);var n,s,c,f,g,v,T=Math.max(0,Math.min(Math.floor(a),t)),l=Math.max(0,Math.min(Math.floor(i),r)),_=Math.max(0,Math.min(1,a-T)),w=Math.max(0,Math.min(1,i-l));T*=3,l*=3;var S=_*_,E=S*_,y=1-_,b=y*y,p=b*y,u=w*w,m=u*w,h=1-w,P=h*h,L=P*h;for(v=0;v<d.length;v++)g=d[v],n=p*g[l][T]+3*(b*_*g[l][T+1]+y*S*g[l][T+2])+E*g[l][T+3],s=p*g[l+1][T]+3*(b*_*g[l+1][T+1]+y*S*g[l+1][T+2])+E*g[l+1][T+3],c=p*g[l+2][T]+3*(b*_*g[l+2][T+1]+y*S*g[l+2][T+2])+E*g[l+2][T+3],f=p*g[l+3][T]+3*(b*_*g[l+3][T+1]+y*S*g[l+3][T+2])+E*g[l+3][T+3],o[v]=L*n+3*(P*w*s+h*u*c)+m*f;return o}:M?function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),c=Math.max(0,Math.min(1,a-n)),f=Math.max(0,Math.min(1,i-s)),g,v,T,l,_,w;n*=3;var S=c*c,E=S*c,y=1-c,b=y*y,p=b*y,u=1-f;for(_=0;_<d.length;_++)w=d[_],g=u*w[s][n]+f*w[s+1][n],v=u*w[s][n+1]+f*w[s+1][n+1],T=u*w[s][n+2]+f*w[s+1][n+1],l=u*w[s][n+3]+f*w[s+1][n+1],o[_]=p*g+3*(b*c*v+y*S*T)+E*l;return o}:e?function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),c=Math.max(0,Math.min(1,a-n)),f=Math.max(0,Math.min(1,i-s)),g,v,T,l,_,w;s*=3;var S=f*f,E=S*f,y=1-f,b=y*y,p=b*y,u=1-c;for(_=0;_<d.length;_++)w=d[_],g=u*w[s][n]+c*w[s][n+1],v=u*w[s+1][n]+c*w[s+1][n+1],T=u*w[s+2][n]+c*w[s+2][n+1],l=u*w[s+3][n]+c*w[s+3][n+1],o[_]=p*g+3*(b*f*v+y*S*T)+E*l;return o}:function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),c=Math.max(0,Math.min(1,a-n)),f=Math.max(0,Math.min(1,i-s)),g,v,T,l,_=1-f,w=1-c;for(T=0;T<d.length;T++)l=d[T],g=w*l[s][n]+c*l[s][n+1],v=w*l[s+1][n]+c*l[s+1][n+1],o[T]=_*g+f*v;return o}}}}),YG=Ze({"src/traces/carpet/create_i_derivative_evaluator.js"(Z,q){"use strict";q.exports=function(d,x,A){return x&&A?function(M,e,t,r,o){M||(M=[]);var a,i,n,s,c,f;e*=3,t*=3;var g=r*r,v=1-r,T=v*v,l=v*r*2,_=-3*T,w=3*(T-l),S=3*(l-g),E=3*g,y=o*o,b=y*o,p=1-o,u=p*p,m=u*p;for(f=0;f<d.length;f++)c=d[f],a=_*c[t][e]+w*c[t][e+1]+S*c[t][e+2]+E*c[t][e+3],i=_*c[t+1][e]+w*c[t+1][e+1]+S*c[t+1][e+2]+E*c[t+1][e+3],n=_*c[t+2][e]+w*c[t+2][e+1]+S*c[t+2][e+2]+E*c[t+2][e+3],s=_*c[t+3][e]+w*c[t+3][e+1]+S*c[t+3][e+2]+E*c[t+3][e+3],M[f]=m*a+3*(u*o*i+p*y*n)+b*s;return M}:x?function(M,e,t,r,o){M||(M=[]);var a,i,n,s;e*=3;var c=r*r,f=1-r,g=f*f,v=f*r*2,T=-3*g,l=3*(g-v),_=3*(v-c),w=3*c,S=1-o;for(n=0;n<d.length;n++)s=d[n],a=T*s[t][e]+l*s[t][e+1]+_*s[t][e+2]+w*s[t][e+3],i=T*s[t+1][e]+l*s[t+1][e+1]+_*s[t+1][e+2]+w*s[t+1][e+3],M[n]=S*a+o*i;return M}:A?function(M,e,t,r,o){M||(M=[]);var a,i,n,s,c,f;t*=3;var g=o*o,v=g*o,T=1-o,l=T*T,_=l*T;for(c=0;c<d.length;c++)f=d[c],a=f[t][e+1]-f[t][e],i=f[t+1][e+1]-f[t+1][e],n=f[t+2][e+1]-f[t+2][e],s=f[t+3][e+1]-f[t+3][e],M[c]=_*a+3*(l*o*i+T*g*n)+v*s;return M}:function(M,e,t,r,o){M||(M=[]);var a,i,n,s,c=1-o;for(n=0;n<d.length;n++)s=d[n],a=s[t][e+1]-s[t][e],i=s[t+1][e+1]-s[t+1][e],M[n]=c*a+o*i;return M}}}}),KG=Ze({"src/traces/carpet/create_j_derivative_evaluator.js"(Z,q){"use strict";q.exports=function(d,x,A){return x&&A?function(M,e,t,r,o){M||(M=[]);var a,i,n,s,c,f;e*=3,t*=3;var g=r*r,v=g*r,T=1-r,l=T*T,_=l*T,w=o*o,S=1-o,E=S*S,y=S*o*2,b=-3*E,p=3*(E-y),u=3*(y-w),m=3*w;for(f=0;f<d.length;f++)c=d[f],a=b*c[t][e]+p*c[t+1][e]+u*c[t+2][e]+m*c[t+3][e],i=b*c[t][e+1]+p*c[t+1][e+1]+u*c[t+2][e+1]+m*c[t+3][e+1],n=b*c[t][e+2]+p*c[t+1][e+2]+u*c[t+2][e+2]+m*c[t+3][e+2],s=b*c[t][e+3]+p*c[t+1][e+3]+u*c[t+2][e+3]+m*c[t+3][e+3],M[f]=_*a+3*(l*r*i+T*g*n)+v*s;return M}:x?function(M,e,t,r,o){M||(M=[]);var a,i,n,s,c,f;e*=3;var g=o*o,v=g*o,T=1-o,l=T*T,_=l*T;for(c=0;c<d.length;c++)f=d[c],a=f[t+1][e]-f[t][e],i=f[t+1][e+1]-f[t][e+1],n=f[t+1][e+2]-f[t][e+2],s=f[t+1][e+3]-f[t][e+3],M[c]=_*a+3*(l*o*i+T*g*n)+v*s;return M}:A?function(M,e,t,r,o){M||(M=[]);var a,i,n,s;t*=3;var c=1-r,f=o*o,g=1-o,v=g*g,T=g*o*2,l=-3*v,_=3*(v-T),w=3*(T-f),S=3*f;for(n=0;n<d.length;n++)s=d[n],a=l*s[t][e]+_*s[t+1][e]+w*s[t+2][e]+S*s[t+3][e],i=l*s[t][e+1]+_*s[t+1][e+1]+w*s[t+2][e+1]+S*s[t+3][e+1],M[n]=c*a+r*i;return M}:function(M,e,t,r,o){M||(M=[]);var a,i,n,s,c=1-r;for(n=0;n<d.length;n++)s=d[n],a=s[t+1][e]-s[t][e],i=s[t+1][e+1]-s[t][e+1],M[n]=c*a+r*i;return M}}}}),JG=Ze({"src/traces/carpet/set_convert.js"(Z,q){"use strict";var d=HG(),x=m2().findBin,A=XG(),M=ZG(),e=YG(),t=KG();q.exports=function(o){var a=o._a,i=o._b,n=a.length,s=i.length,c=o.aaxis,f=o.baxis,g=a[0],v=a[n-1],T=i[0],l=i[s-1],_=a[a.length-1]-a[0],w=i[i.length-1]-i[0],S=_*d.RELATIVE_CULL_TOLERANCE,E=w*d.RELATIVE_CULL_TOLERANCE;g-=S,v+=S,T-=E,l+=E,o.isVisible=function(y,b){return y>g&&y<v&&b>T&&b<l},o.isOccluded=function(y,b){return y<g||y>v||b<T||b>l},o.setScale=function(){var y=o._x,b=o._y,p=A(o._xctrl,o._yctrl,y,b,c.smoothing,f.smoothing);o._xctrl=p[0],o._yctrl=p[1],o.evalxy=M([o._xctrl,o._yctrl],n,s,c.smoothing,f.smoothing),o.dxydi=e([o._xctrl,o._yctrl],c.smoothing,f.smoothing),o.dxydj=t([o._xctrl,o._yctrl],c.smoothing,f.smoothing)},o.i2a=function(y){var b=Math.max(0,Math.floor(y[0]),n-2),p=y[0]-b;return(1-p)*a[b]+p*a[b+1]},o.j2b=function(y){var b=Math.max(0,Math.floor(y[1]),n-2),p=y[1]-b;return(1-p)*i[b]+p*i[b+1]},o.ij2ab=function(y){return[o.i2a(y[0]),o.j2b(y[1])]},o.a2i=function(y){var b=Math.max(0,Math.min(x(y,a),n-2)),p=a[b],u=a[b+1];return Math.max(0,Math.min(n-1,b+(y-p)/(u-p)))},o.b2j=function(y){var b=Math.max(0,Math.min(x(y,i),s-2)),p=i[b],u=i[b+1];return Math.max(0,Math.min(s-1,b+(y-p)/(u-p)))},o.ab2ij=function(y){return[o.a2i(y[0]),o.b2j(y[1])]},o.i2c=function(y,b){return o.evalxy([],y,b)},o.ab2xy=function(y,b,p){if(!p&&(y<a[0]||y>a[n-1]|b<i[0]||b>i[s-1]))return[!1,!1];var u=o.a2i(y),m=o.b2j(b),h=o.evalxy([],u,m);if(p){var P=0,L=0,z=[],F,B,O,I;y<a[0]?(F=0,B=0,P=(y-a[0])/(a[1]-a[0])):y>a[n-1]?(F=n-2,B=1,P=(y-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),B=u-F),b<i[0]?(O=0,I=0,L=(b-i[0])/(i[1]-i[0])):b>i[s-1]?(O=s-2,I=1,L=(b-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(m))),I=m-O),P&&(o.dxydi(z,F,O,B,I),h[0]+=z[0]*P,h[1]+=z[1]*P),L&&(o.dxydj(z,F,O,B,I),h[0]+=z[0]*L,h[1]+=z[1]*L)}return h},o.c2p=function(y,b,p){return[b.c2p(y[0]),p.c2p(y[1])]},o.p2x=function(y,b,p){return[b.p2c(y[0]),p.p2c(y[1])]},o.dadi=function(y){var b=Math.max(0,Math.min(a.length-2,y));return a[b+1]-a[b]},o.dbdj=function(y){var b=Math.max(0,Math.min(i.length-2,y));return i[b+1]-i[b]},o.dxyda=function(y,b,p,u){var m=o.dxydi(null,y,b,p,u),h=o.dadi(y,p);return[m[0]/h,m[1]/h]},o.dxydb=function(y,b,p,u){var m=o.dxydj(null,y,b,p,u),h=o.dbdj(b,u);return[m[0]/h,m[1]/h]},o.dxyda_rough=function(y,b,p){var u=_*(p||.1),m=o.ab2xy(y+u,b,!0),h=o.ab2xy(y-u,b,!0);return[(m[0]-h[0])*.5/u,(m[1]-h[1])*.5/u]},o.dxydb_rough=function(y,b,p){var u=w*(p||.1),m=o.ab2xy(y,b+u,!0),h=o.ab2xy(y,b-u,!0);return[(m[0]-h[0])*.5/u,(m[1]-h[1])*.5/u]},o.dpdx=function(y){return y._m},o.dpdy=function(y){return y._m}}}}),$G=Ze({"src/traces/carpet/calc.js"(Z,q){"use strict";var d=Wo(),x=ca().isArray1D,A=NG(),M=UG(),e=jG(),t=qG(),r=VG(),o=Y2(),a=GG(),i=Z2(),n=JG();q.exports=function(c,f){var g=d.getFromId(c,f.xaxis),v=d.getFromId(c,f.yaxis),T=f.aaxis,l=f.baxis,_=f.x,w=f.y,S=[];_&&x(_)&&S.push("x"),w&&x(w)&&S.push("y"),S.length&&i(f,T,l,"a","b",S);var E=f._a=f._a||f.a,y=f._b=f._b||f.b;_=f._x||f.x,w=f._y||f.y;var b={};if(f._cheater){var p=T.cheatertype==="index"?E.length:E,u=l.cheatertype==="index"?y.length:y;_=A(p,u,f.cheaterslope)}f._x=_=o(_),f._y=w=o(w),a(_,E,y),a(w,E,y),n(f),f.setScale();var m=M(_),h=M(w),P=.5*(m[1]-m[0]),L=.5*(m[1]+m[0]),z=.5*(h[1]-h[0]),F=.5*(h[1]+h[0]),B=1.3;return m=[L-P*B,L+P*B],h=[F-z*B,F+z*B],f._extremes[g._id]=d.findExtremes(g,m,{padded:!0}),f._extremes[v._id]=d.findExtremes(v,h,{padded:!0}),e(f,"a","b"),e(f,"b","a"),t(f,T),t(f,l),b.clipsegments=r(f._xctrl,f._yctrl,T,l),b.x=_,b.y=w,b.a=E,b.b=y,[b]}}}),QG=Ze({"src/traces/carpet/index.js"(Z,q){"use strict";q.exports={attributes:PT(),supplyDefaults:FG(),plot:BG(),calc:$G(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Zf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),eH=Ze({"lib/carpet.js"(Z,q){"use strict";q.exports=QG()}}),Y6=Ze({"src/traces/scattercarpet/attributes.js"(Z,q){"use strict";var d=$d(),x=tf(),A=eu(),M=Cs().hovertemplateAttrs,e=Cs().texttemplateAttrs,t=Mu(),r=rs().extendFlat,o=x.marker,a=x.line,i=o.line;q.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:r({},x.mode,{dflt:"markers"}),text:r({},x.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),hovertext:r({},x.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:r({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:r({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:d(),marker:r({symbol:o.symbol,opacity:o.opacity,maxdisplayed:o.maxdisplayed,angle:o.angle,angleref:o.angleref,standoff:o.standoff,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,line:r({width:i.width,editType:"calc"},t("marker.line")),gradient:o.gradient,editType:"calc"},t("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:r({},A.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:M(),zorder:x.zorder}}}),tH=Ze({"src/traces/scattercarpet/defaults.js"(Z,q){"use strict";var d=ca(),x=Tv(),A=Fu(),M=md(),e=Dd(),t=o1(),r=zd(),o=ev(),a=Y6();q.exports=function(n,s,c,f){function g(E,y){return d.coerce(n,s,a,E,y)}g("carpet"),s.xaxis="x",s.yaxis="y";var v=g("a"),T=g("b"),l=Math.min(v.length,T.length);if(!l){s.visible=!1;return}s._length=l,g("text"),g("texttemplate"),g("hovertext");var _=l<x.PTS_LINESONLY?"lines+markers":"lines";g("mode",_),A.hasMarkers(s)&&M(n,s,c,f,g,{gradient:!0}),A.hasLines(s)&&(e(n,s,c,f,g,{backoff:!0}),t(n,s,g),g("connectgaps")),A.hasText(s)&&r(n,s,f,g);var w=[];(A.hasMarkers(s)||A.hasText(s))&&(g("marker.maxdisplayed"),w.push("points")),g("fill"),s.fill!=="none"&&(o(n,s,c,g),A.hasLines(s)||t(n,s,g)),(s.fill==="tonext"||s.fill==="toself")&&w.push("fills");var S=g("hoveron",w.join("+")||"points");S!=="fills"&&g("hovertemplate"),g("zorder"),d.coerceSelectionMarkerOpacity(s,g)}}}),rH=Ze({"src/traces/scattercarpet/format_labels.js"(Z,q){"use strict";q.exports=function(x,A){var M={},e=A._carpet,t=e.ab2ij([x.a,x.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),i=t[1]-a,n=e.evalxy([],r,a,o,i);return M.yLabel=n[1].toFixed(3),M}}}),IT=Ze({"src/traces/carpet/lookup_carpetid.js"(Z,q){"use strict";q.exports=function(d,x){for(var A=d._fullData.length,M,e=0;e<A;e++){var t=d._fullData[e];if(t.index!==x.index&&t.type==="carpet"&&(M||(M=t),t.carpet===x.carpet))return t}return M}}}),aH=Ze({"src/traces/scattercarpet/calc.js"(Z,q){"use strict";var d=ns(),x=Fd(),A=Av(),M=Od(),e=Bd().calcMarkerSize,t=IT();q.exports=function(o,a){var i=a._carpetTrace=t(o,a);if(!(!i||!i.visible||i.visible==="legendonly")){var n;a.xaxis=i.xaxis,a.yaxis=i.yaxis;var s=a._length,c=new Array(s),f,g,v=!1;for(n=0;n<s;n++)if(f=a.a[n],g=a.b[n],d(f)&&d(g)){var T=i.ab2xy(+f,+g,!0),l=i.isVisible(+f,+g);l||(v=!0),c[n]={x:T[0],y:T[1],a:f,b:g,vis:l}}else c[n]={x:!1,y:!1};return a._needsCull=v,c[0].carpet=i,c[0].trace=a,e(a,s),x(o,a),A(c,a),M(c,a),c}}}}),iH=Ze({"src/traces/scattercarpet/plot.js"(Z,q){"use strict";var d=s1(),x=Wo(),A=as();q.exports=function(e,t,r,o){var a,i,n,s=r[0][0].carpet,c=x.getFromId(e,s.xaxis||"x"),f=x.getFromId(e,s.yaxis||"y"),g={xaxis:c,yaxis:f,plot:t.plot};for(a=0;a<r.length;a++)i=r[a][0].trace,i._xA=c,i._yA=f;for(d(e,g,r,o),a=0;a<r.length;a++)i=r[a][0].trace,n=o.selectAll("g.trace"+i.uid+" .js-line"),A.setClipUrl(n,r[a][0].carpet._clipPathId,e)}}}),nH=Ze({"src/traces/scattercarpet/hover.js"(Z,q){"use strict";var d=u1(),x=ca().fillText;q.exports=function(M,e,t,r){var o=d(M,e,t,r);if(!o||o[0].index===!1)return;var a=o[0];if(a.index===void 0){var i=1-a.y0/M.ya._length,n=M.xa._length,s=n*i/2,c=n-s;return a.x0=Math.max(Math.min(a.x0,c),s),a.x1=Math.max(Math.min(a.x1,c),s),o}var f=a.cd[a.index];a.a=f.a,a.b=f.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var g=a.trace,v=g._carpet,T=g._module.formatLabels(f,g);a.yLabel=T.yLabel,delete a.text;var l=[];function _(E,y){var b;E.labelprefix&&E.labelprefix.length>0?b=E.labelprefix.replace(/ = $/,""):b=E._hovertitle,l.push(b+": "+y.toFixed(3)+E.labelsuffix)}if(!g.hovertemplate){var w=f.hi||g.hoverinfo,S=w.split("+");S.indexOf("all")!==-1&&(S=["a","b","text"]),S.indexOf("a")!==-1&&_(v.aaxis,f.a),S.indexOf("b")!==-1&&_(v.baxis,f.b),l.push("y: "+a.yLabel),S.indexOf("text")!==-1&&x(f,g,l),a.extraText=l.join("<br>")}return o}}}),oH=Ze({"src/traces/scattercarpet/event_data.js"(Z,q){"use strict";q.exports=function(x,A,M,e,t){var r=e[t];return x.a=r.a,x.b=r.b,x.y=r.y,x}}}),sH=Ze({"src/traces/scattercarpet/index.js"(Z,q){"use strict";q.exports={attributes:Y6(),supplyDefaults:tH(),colorbar:hp(),formatLabels:rH(),calc:aH(),plot:iH(),style:ed().style,styleOnSelect:ed().styleOnSelect,hoverPoints:nH(),selectPoints:c1(),eventData:oH(),moduleType:"trace",name:"scattercarpet",basePlotModule:Zf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),lH=Ze({"lib/scattercarpet.js"(Z,q){"use strict";q.exports=sH()}}),K6=Ze({"src/traces/contourcarpet/attributes.js"(Z,q){"use strict";var d=p1(),x=q_(),A=Mu(),M=rs().extendFlat,e=x.contours;q.exports=M({carpet:{valType:"string",editType:"calc"},z:d.z,a:d.x,a0:d.x0,da:d.dx,b:d.y,b0:d.y0,db:d.dy,text:d.text,hovertext:d.hovertext,transpose:d.transpose,atype:d.xtype,btype:d.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},A("",{cLetter:"z",autoColorDflt:!1}))}}),J6=Ze({"src/traces/contourcarpet/defaults.js"(Z,q){"use strict";var d=ca(),x=X2(),A=K6(),M=wS(),e=s3(),t=l3();q.exports=function(o,a,i,n){function s(v,T){return d.coerce(o,a,A,v,T)}function c(v){return d.coerce2(o,a,A,v)}if(s("carpet"),o.a&&o.b){var f=x(o,a,s,n,"a","b");if(!f){a.visible=!1;return}s("text");var g=s("contours.type")==="constraint";g?M(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,c),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),uH=Ze({"src/traces/contourcarpet/calc.js"(Z,q){"use strict";var d=wp(),x=ca(),A=Z2(),M=Y2(),e=K2(),t=J2(),r=oS(),o=J6(),a=IT(),i=pS();q.exports=function(c,f){var g=f._carpetTrace=a(c,f);if(!(!g||!g.visible||g.visible==="legendonly")){if(!f.a||!f.b){var v=c.data[g.index],T=c.data[f.index];T.a||(T.a=v.a),T.b||(T.b=v.b),o(T,f,f._defaultColor,c._fullLayout)}var l=n(c,f);return i(f,f._z),l}};function n(s,c){var f=c._carpetTrace,g=f.aaxis,v=f.baxis,T,l,_,w,S,E,y;g._minDtick=0,v._minDtick=0,x.isArray1D(c.z)&&A(c,g,v,"a","b",["z"]),T=c._a=c._a||c.a,w=c._b=c._b||c.b,T=T?g.makeCalcdata(c,"_a"):[],w=w?v.makeCalcdata(c,"_b"):[],l=c.a0||0,_=c.da||1,S=c.b0||0,E=c.db||1,y=c._z=M(c._z||c.z,c.transpose),c._emptypoints=t(y),e(y,c._emptypoints);var b=x.maxRowLength(y),p=c.xtype==="scaled"?"":T,u=r(c,p,l,_,b,g),m=c.ytype==="scaled"?"":w,h=r(c,m,S,E,y.length,v),P={a:u,b:h,z:y};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&d(s,c,{vals:y,containerStr:"",cLetter:"z"}),[P]}}}),cH=Ze({"src/traces/carpet/axis_aligned_line.js"(Z,q){"use strict";var d=ca().isArrayOrTypedArray;q.exports=function(x,A,M,e){var t,r,o,a,i,n,s,c,f,g,v,T,l,_=d(M)?"a":"b",w=_==="a"?x.aaxis:x.baxis,S=w.smoothing,E=_==="a"?x.a2i:x.b2j,y=_==="a"?M:e,b=_==="a"?e:M,p=_==="a"?A.a.length:A.b.length,u=_==="a"?A.b.length:A.a.length,m=Math.floor(_==="a"?x.b2j(b):x.a2i(b)),h=_==="a"?function(ue){return x.evalxy([],ue,m)}:function(ue){return x.evalxy([],m,ue)};S&&(o=Math.max(0,Math.min(u-2,m)),a=m-o,r=_==="a"?function(ue,le){return x.dxydi([],ue,o,le,a)}:function(ue,le){return x.dxydj([],o,ue,a,le)});var P=E(y[0]),L=E(y[1]),z=P<L?1:-1,F=(L-P)*1e-8,B=z>0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,I=z>0?Math.min:Math.max,N=z>0?Math.max:Math.min,U=B(P+F),W=O(L-F);s=h(P);var Q=[[s]];for(t=U;t*z<W*z;t+=z)i=[],v=N(P,t),T=I(L,t+z),l=T-v,n=Math.max(0,Math.min(p-2,Math.floor(.5*(v+T)))),c=h(T),S&&(f=r(n,v-n),g=r(n,T-n),i.push([s[0]+f[0]/3*l,s[1]+f[1]/3*l]),i.push([c[0]-g[0]/3*l,c[1]-g[1]/3*l])),i.push(c),Q.push(i),s=c;return Q}}}),fH=Ze({"src/traces/contourcarpet/plot.js"(Z,q){"use strict";var d=On(),x=X6(),A=Z6(),M=as(),e=ca(),t=vS(),r=mS(),o=u3(),a=G_(),i=yS(),n=gS(),s=_S(),c=IT(),f=cH();q.exports=function(p,u,m,h){var P=u.xaxis,L=u.yaxis;e.makeTraceGroups(h,m,"contour").each(function(z){var F=d.select(this),B=z[0],O=B.trace,I=O._carpetTrace=c(p,O),N=p.calcdata[I.index][0];if(!I.visible||I.visible==="legendonly")return;var U=B.a,W=B.b,Q=O.contours,ue=n(Q,u,B),le=Q.type==="constraint",he=Q._operation,G=le?he==="="?"lines":"fill":Q.coloring;function $(ze){var Re=I.ab2xy(ze[0],ze[1],!0);return[P.c2p(Re[0]),L.c2p(Re[1])]}var J=[[U[0],W[W.length-1]],[U[U.length-1],W[W.length-1]],[U[U.length-1],W[0]],[U[0],W[0]]];t(ue);var X=(U[U.length-1]-U[0])*1e-8,oe=(W[W.length-1]-W[0])*1e-8;r(ue,X,oe);var ie=ue;Q.type==="constraint"&&(ie=i(ue,he)),g(ue,$);var j,ee,re,ce,be=[];for(ce=N.clipsegments.length-1;ce>=0;ce--)j=N.clipsegments[ce],ee=x([],j.x,P.c2p),re=x([],j.y,L.c2p),ee.reverse(),re.reverse(),be.push(A(ee,re,j.bicubic));var Ae="M"+be.join("L")+"Z";S(F,N.clipsegments,P,L,le,G),E(O,F,P,L,ie,J,$,I,N,G,Ae),v(F,ue,p,B,Q,u,I),M.setClipUrl(F,I._clipPathId,p)})};function g(b,p){var u,m,h,P,L,z,F,B,O;for(u=0;u<b.length;u++){for(P=b[u],L=P.pedgepaths=[],z=P.ppaths=[],m=0;m<P.edgepaths.length;m++){for(O=P.edgepaths[m],F=[],h=0;h<O.length;h++)F[h]=p(O[h]);L.push(F)}for(m=0;m<P.paths.length;m++){for(O=P.paths[m],B=[],h=0;h<O.length;h++)B[h]=p(O[h]);z.push(B)}}}function v(b,p,u,m,h,P,L){var z=u._context.staticPlot,F=e.ensureSingle(b,"g","contourlines"),B=h.showlines!==!1,O=h.showlabels,I=B&&O,N=o.createLines(F,B||O,p,z),U=o.createLineClip(F,I,u,m.trace.uid),W=b.selectAll("g.contourlabels").data(O?[0]:[]);if(W.exit().remove(),W.enter().append("g").classed("contourlabels",!0),O){var Q=P.xaxis,ue=P.yaxis,le=Q._length,he=ue._length,G=[[[0,0],[le,0],[le,he],[0,he]]],$=[];e.clearLocationCache();var J=o.labelFormatter(u,m),X=M.tester.append("text").attr("data-notex",1).call(M.font,h.labelfont),oe={left:0,right:le,center:le/2,top:0,bottom:he,middle:he/2},ie=Math.sqrt(le*le+he*he),j=a.LABELDISTANCE*ie/Math.max(1,p.length/a.LABELINCREASE);N.each(function(ee){var re=o.calcTextOpts(ee.level,J,X,u);d.select(this).selectAll("path").each(function(ce){var be=this,Ae=e.getVisibleSegment(be,oe,re.height/2);if(Ae&&(T(be,ce,ee,Ae,L,re.height),!(Ae.len<(re.width+re.height)*a.LABELMIN)))for(var ze=Math.min(Math.ceil(Ae.len/j),a.LABELMAX),Re=0;Re<ze;Re++){var Xe=o.findBestTextLocation(be,Ae,re,$,oe);if(!Xe)break;o.addLabelData(Xe,re,$,G)}})}),X.remove(),o.drawLabels(W,$,u,U,I?G:null)}O&&!B&&N.remove()}function T(b,p,u,m,h,P){for(var L,z=0;z<u.pedgepaths.length;z++)p===u.pedgepaths[z]&&(L=u.edgepaths[z]);if(!L)return;var F=h.a[0],B=h.a[h.a.length-1],O=h.b[0],I=h.b[h.b.length-1];function N(le,he){var G=0,$,J=.1;return(Math.abs(le[0]-F)<J||Math.abs(le[0]-B)<J)&&($=_(h.dxydb_rough(le[0],le[1],J)),G=Math.max(G,P*w(he,$)/2)),(Math.abs(le[1]-O)<J||Math.abs(le[1]-I)<J)&&($=_(h.dxyda_rough(le[0],le[1],J)),G=Math.max(G,P*w(he,$)/2)),G}var U=l(b,0,1),W=l(b,m.total,m.total-1),Q=N(L[0],U),ue=m.total-N(L[L.length-1],W);m.min<Q&&(m.min=Q),m.max>ue&&(m.max=ue),m.len=m.max-m.min}function l(b,p,u){var m=b.getPointAtLength(p),h=b.getPointAtLength(u),P=h.x-m.x,L=h.y-m.y,z=Math.sqrt(P*P+L*L);return[P/z,L/z]}function _(b){var p=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/p,b[1]/p]}function w(b,p){var u=Math.abs(b[0]*p[0]+b[1]*p[1]),m=Math.sqrt(1-u*u);return m/u}function S(b,p,u,m,h,P){var L,z,F,B,O=e.ensureSingle(b,"g","contourbg"),I=O.selectAll("path").data(P==="fill"&&!h?[0]:[]);I.enter().append("path"),I.exit().remove();var N=[];for(B=0;B<p.length;B++)L=p[B],z=x([],L.x,u.c2p),F=x([],L.y,m.c2p),N.push(A(z,F,L.bicubic));I.attr("d","M"+N.join("L")+"Z").style("stroke","none")}function E(b,p,u,m,h,P,L,z,F,B,O){var I=B==="fill";I&&s(h,b.contours);var N=e.ensureSingle(p,"g","contourfill"),U=N.selectAll("path").data(I?h:[]);U.enter().append("path"),U.exit().remove(),U.each(function(W){var Q=(W.prefixBoundary?O:"")+y(b,W,P,L,z,F,u,m);Q?d.select(this).attr("d",Q).style("stroke","none"):d.select(this).remove()})}function y(b,p,u,m,h,P,L,z){var F,B="",O=p.edgepaths.map(function(re,ce){return ce}),I=!0,N,U,W,Q,ue,le,he=Math.abs(u[0][0]-u[2][0])*1e-4,G=Math.abs(u[0][1]-u[2][1])*1e-4;function $(re){return Math.abs(re[1]-u[0][1])<G}function J(re){return Math.abs(re[1]-u[2][1])<G}function X(re){return Math.abs(re[0]-u[0][0])<he}function oe(re){return Math.abs(re[0]-u[2][0])<he}function ie(re,ce){var be,Ae,ze,Re,Xe="";for($(re)&&!oe(re)||J(re)&&!X(re)?(Re=h.aaxis,ze=f(h,P,[re[0],ce[0]],.5*(re[1]+ce[1]))):(Re=h.baxis,ze=f(h,P,.5*(re[0]+ce[0]),[re[1],ce[1]])),be=1;be<ze.length;be++)for(Xe+=Re.smoothing?"C":"L",Ae=0;Ae<ze[be].length;Ae++){var it=ze[be][Ae];Xe+=[L.c2p(it[0]),z.c2p(it[1])]+" "}return Xe}for(F=0,N=null;O.length;){var j=p.edgepaths[F][0];for(N&&(B+=ie(N,j)),le=M.smoothopen(p.edgepaths[F].map(m),p.smoothing),B+=I?le:le.replace(/^M/,"L"),O.splice(O.indexOf(F),1),N=p.edgepaths[F][p.edgepaths[F].length-1],Q=-1,W=0;W<4;W++){if(!N){e.log("Missing end?",F,p);break}for($(N)&&!oe(N)?U=u[1]:X(N)?U=u[0]:J(N)?U=u[3]:oe(N)&&(U=u[2]),ue=0;ue<p.edgepaths.length;ue++){var ee=p.edgepaths[ue][0];Math.abs(N[0]-U[0])<he?Math.abs(N[0]-ee[0])<he&&(ee[1]-N[1])*(U[1]-ee[1])>=0&&(U=ee,Q=ue):Math.abs(N[1]-U[1])<G?Math.abs(N[1]-ee[1])<G&&(ee[0]-N[0])*(U[0]-ee[0])>=0&&(U=ee,Q=ue):e.log("endpt to newendpt is not vert. or horz.",N,U,ee)}if(Q>=0)break;B+=ie(N,U),N=U}if(Q===p.edgepaths.length){e.log("unclosed perimeter path");break}F=Q,I=O.indexOf(F)===-1,I&&(F=O[0],B+=ie(N,U)+"Z",N=null)}for(F=0;F<p.paths.length;F++)B+=M.smoothclosed(p.paths[F].map(m),p.smoothing);return B}}}),hH=Ze({"src/traces/contourcarpet/index.js"(Z,q){"use strict";q.exports={attributes:K6(),supplyDefaults:J6(),colorbar:f3(),calc:uH(),plot:fH(),style:c3(),moduleType:"trace",name:"contourcarpet",basePlotModule:Zf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),pH=Ze({"lib/contourcarpet.js"(Z,q){"use strict";q.exports=hH()}}),RT=Ze({"src/traces/ohlc/attributes.js"(Z,q){"use strict";var d=ca().extendFlat,x=tf(),A=Qc().axisHoverFormat,M=Gh().dash,e=Ky(),t=d1(),r=t.INCREASING.COLOR,o=t.DECREASING.COLOR,a=x.line;function i(n){return{line:{color:d({},a.color,{dflt:n}),width:a.width,dash:M,editType:"style"},editType:"style"}}q.exports={xperiod:x.xperiod,xperiod0:x.xperiod0,xperiodalignment:x.xperiodalignment,xhoverformat:A("x"),yhoverformat:A("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:d({},a.width,{}),dash:d({},M,{}),editType:"style"},increasing:i(r),decreasing:i(o),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:d({},e.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:x.zorder}}}),$6=Ze({"src/traces/ohlc/ohlc_defaults.js"(Z,q){"use strict";var d=oo(),x=ca();q.exports=function(M,e,t,r){var o=t("x"),a=t("open"),i=t("high"),n=t("low"),s=t("close");t("hoverlabel.split");var c=d.getComponentMethod("calendars","handleTraceDefaults");if(c(M,e,["x"],r),!!(a&&i&&n&&s)){var f=Math.min(a.length,i.length,n.length,s.length);return o&&(f=Math.min(f,x.minRowLength(o))),e._length=f,f}}}}),dH=Ze({"src/traces/ohlc/defaults.js"(Z,q){"use strict";var d=ca(),x=$6(),A=Qd(),M=RT();q.exports=function(r,o,a,i){function n(c,f){return d.coerce(r,o,M,c,f)}var s=x(r,o,n,i);if(!s){o.visible=!1;return}A(r,o,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),e(r,o,n,"increasing"),e(r,o,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[o.xaxis]=!0,n("zorder")};function e(t,r,o,a){o(a+".line.color"),o(a+".line.width",r.line.width),o(a+".line.dash",r.line.dash)}}}),Q6=Ze({"src/traces/ohlc/calc.js"(Z,q){"use strict";var d=ca(),x=d._,A=Wo(),M=tv(),e=qs().BADNUM;function t(i,n){var s=A.getFromId(i,n.xaxis),c=A.getFromId(i,n.yaxis),f=a(i,s,n),g=n._minDiff;n._minDiff=null;var v=n._origX;n._origX=null;var T=n._xcalc;n._xcalc=null;var l=o(i,n,v,T,c,r);return n._extremes[s._id]=A.findExtremes(s,T,{vpad:g/2}),l.length?(d.extendFlat(l[0].t,{wHover:g/2,tickLen:f}),l):[{t:{empty:!0}}]}function r(i,n,s,c){return{o:i,h:n,l:s,c}}function o(i,n,s,c,f,g){for(var v=f.makeCalcdata(n,"open"),T=f.makeCalcdata(n,"high"),l=f.makeCalcdata(n,"low"),_=f.makeCalcdata(n,"close"),w=d.isArrayOrTypedArray(n.text),S=d.isArrayOrTypedArray(n.hovertext),E=!0,y=null,b=!!n.xperiodalignment,p=[],u=0;u<c.length;u++){var m=c[u],h=v[u],P=T[u],L=l[u],z=_[u];if(m!==e&&h!==e&&P!==e&&L!==e&&z!==e){z===h?y!==null&&z!==y&&(E=z>y):E=z>h,y=z;var F=g(h,P,L,z);F.pos=m,F.yc=(h+z)/2,F.i=u,F.dir=E?"increasing":"decreasing",F.x=F.pos,F.y=[L,P],b&&(F.orig_p=s[u]),w&&(F.tx=n.text[u]),S&&(F.htx=n.hovertext[u]),p.push(F)}else p.push({pos:m,empty:!0})}return n._extremes[f._id]=A.findExtremes(f,d.concat(l,T),{padded:!0}),p.length&&(p[0].t={labels:{open:x(i,"open:")+" ",high:x(i,"high:")+" ",low:x(i,"low:")+" ",close:x(i,"close:")+" "}}),p}function a(i,n,s){var c=s._minDiff;if(!c){var f=i._fullData,g=[];c=1/0;var v;for(v=0;v<f.length;v++){var T=f[v];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===n._id){g.push(T);var l=n.makeCalcdata(T,"x");T._origX=l;var _=M(s,n,"x",l).vals;T._xcalc=_;var w=d.distinctVals(_).minDiff;w&&isFinite(w)&&(c=Math.min(c,w))}}for(c===1/0&&(c=1),v=0;v<g.length;v++)g[v]._minDiff=c}return c*s.tickwidth}q.exports={calc:t,calcCommon:o}}}),vH=Ze({"src/traces/ohlc/plot.js"(Z,q){"use strict";var d=On(),x=ca();q.exports=function(M,e,t,r){var o=e.yaxis,a=e.xaxis,i=!!a.rangebreaks;x.makeTraceGroups(r,t,"trace ohlc").each(function(n){var s=d.select(this),c=n[0],f=c.t,g=c.trace;if(g.visible!==!0||f.empty){s.remove();return}var v=f.tickLen,T=s.selectAll("path").data(x.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(l){if(l.empty)return"M0,0Z";var _=a.c2p(l.pos-v,!0),w=a.c2p(l.pos+v,!0),S=i?(_+w)/2:a.c2p(l.pos,!0),E=o.c2p(l.o,!0),y=o.c2p(l.h,!0),b=o.c2p(l.l,!0),p=o.c2p(l.c,!0);return"M"+_+","+E+"H"+S+"M"+S+","+y+"V"+b+"M"+w+","+p+"H"+S})})}}}),mH=Ze({"src/traces/ohlc/style.js"(Z,q){"use strict";var d=On(),x=as(),A=Yn();q.exports=function(e,t,r){var o=r||d.select(e).selectAll("g.ohlclayer").selectAll("g.trace");o.style("opacity",function(a){return a[0].trace.opacity}),o.each(function(a){var i=a[0].trace;d.select(this).selectAll("path").each(function(n){if(!n.empty){var s=i[n.dir].line;d.select(this).style("fill","none").call(A.stroke,s.color).call(x.dashLine,s.dash,s.width).style("opacity",i.selectedpoints&&!n.selected?.3:1)}})})}}}),eC=Ze({"src/traces/ohlc/hover.js"(Z,q){"use strict";var d=Wo(),x=ca(),A=ef(),M=Yn(),e=ca().fillText,t=d1(),r={increasing:t.INCREASING.SYMBOL,decreasing:t.DECREASING.SYMBOL};function o(s,c,f,g){var v=s.cd,T=v[0].trace;return T.hoverlabel.split?i(s,c,f,g):n(s,c,f,g)}function a(s,c,f,g){var v=s.cd,T=s.xa,l=v[0].trace,_=v[0].t,w=l.type,S=w==="ohlc"?"l":"min",E=w==="ohlc"?"h":"max",y,b,p=_.bPos||0,u=function(W){return W.pos+p-c},m=_.bdPos||_.tickLen,h=_.wHover,P=Math.min(1,m/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));y=s.maxHoverDistance-P,b=s.maxSpikeDistance-P;function L(W){var Q=u(W);return A.inbox(Q-h,Q+h,y)}function z(W){var Q=W[S],ue=W[E];return Q===ue||A.inbox(Q-f,ue-f,y)}function F(W){return(L(W)+z(W))/2}var B=A.getDistanceFunction(g,L,z,F);if(A.getClosest(v,B,s),s.index===!1)return null;var O=v[s.index];if(O.empty)return null;var I=O.dir,N=l[I],U=N.line.color;return M.opacity(U)&&N.line.width?s.color=U:s.color=N.fillcolor,s.x0=T.c2p(O.pos+p-m,!0),s.x1=T.c2p(O.pos+p+m,!0),s.xLabelVal=O.orig_p!==void 0?O.orig_p:O.pos,s.spikeDistance=F(O)*b/y,s.xSpike=T.c2p(O.pos,!0),s}function i(s,c,f,g){var v=s.cd,T=s.ya,l=v[0].trace,_=v[0].t,w=[],S=a(s,c,f,g);if(!S)return[];var E=S.index,y=v[E],b=y.hi||l.hoverinfo,p=b.split("+"),u=b==="all",m=u||p.indexOf("y")!==-1;if(!m)return[];for(var h=["high","open","close","low"],P={},L=0;L<h.length;L++){var z=h[L],F=l[z][S.index],B=T.c2p(F,!0),O;F in P?(O=P[F],O.yLabel+="<br>"+_.labels[z]+d.hoverLabelText(T,F,l.yhoverformat)):(O=x.extendFlat({},S),O.y0=O.y1=B,O.yLabelVal=F,O.yLabel=_.labels[z]+d.hoverLabelText(T,F,l.yhoverformat),O.name="",w.push(O),P[F]=O)}return w}function n(s,c,f,g){var v=s.cd,T=s.ya,l=v[0].trace,_=v[0].t,w=a(s,c,f,g);if(!w)return[];var S=w.index,E=v[S],y=w.index=E.i,b=E.dir;function p(F){return _.labels[F]+d.hoverLabelText(T,l[F][y],l.yhoverformat)}var u=E.hi||l.hoverinfo,m=u.split("+"),h=u==="all",P=h||m.indexOf("y")!==-1,L=h||m.indexOf("text")!==-1,z=P?[p("open"),p("high"),p("low"),p("close")+" "+r[b]]:[];return L&&e(E,l,z),w.extraText=z.join("<br>"),w.y0=w.y1=T.c2p(E.yc,!0),[w]}q.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),tC=Ze({"src/traces/ohlc/select.js"(Z,q){"use strict";q.exports=function(x,A){var M=x.cd,e=x.xaxis,t=x.yaxis,r=[],o,a=M[0].t.bPos||0;if(A===!1)for(o=0;o<M.length;o++)M[o].selected=0;else for(o=0;o<M.length;o++){var i=M[o];A.contains([e.c2p(i.pos+a),t.c2p(i.yc)],null,i.i,x)?(r.push({pointNumber:i.i,x:e.c2d(i.pos),y:t.c2d(i.yc)}),i.selected=1):i.selected=0}return r}}}),gH=Ze({"src/traces/ohlc/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"ohlc",basePlotModule:Zf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:RT(),supplyDefaults:dH(),calc:Q6().calc,plot:vH(),style:mH(),hoverPoints:eC().hoverPoints,selectPoints:tC()}}}),yH=Ze({"lib/ohlc.js"(Z,q){"use strict";q.exports=gH()}}),rC=Ze({"src/traces/candlestick/attributes.js"(Z,q){"use strict";var d=ca().extendFlat,x=Qc().axisHoverFormat,A=RT(),M=B_();function e(t){return{line:{color:d({},M.line.color,{dflt:t}),width:M.line.width,editType:"style"},fillcolor:M.fillcolor,editType:"style"}}q.exports={xperiod:A.xperiod,xperiod0:A.xperiod0,xperiodalignment:A.xperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),x:A.x,open:A.open,high:A.high,low:A.low,close:A.close,line:{width:d({},M.line.width,{}),editType:"style"},increasing:e(A.increasing.line.color.dflt),decreasing:e(A.decreasing.line.color.dflt),text:A.text,hovertext:A.hovertext,whiskerwidth:d({},M.whiskerwidth,{dflt:0}),hoverlabel:A.hoverlabel,zorder:M.zorder}}}),_H=Ze({"src/traces/candlestick/defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=$6(),M=Qd(),e=rC();q.exports=function(o,a,i,n){function s(f,g){return d.coerce(o,a,e,f,g)}var c=A(o,a,s,n);if(!c){a.visible=!1;return}M(o,a,n,s,{x:!0}),s("xhoverformat"),s("yhoverformat"),s("line.width"),t(o,a,s,"increasing"),t(o,a,s,"decreasing"),s("text"),s("hovertext"),s("whiskerwidth"),n._requestRangeslider[a.xaxis]=!0,s("zorder")};function t(r,o,a,i){var n=a(i+".line.color");a(i+".line.width",o.line.width),a(i+".fillcolor",x.addOpacity(n,.5))}}}),xH=Ze({"src/traces/candlestick/calc.js"(Z,q){"use strict";var d=ca(),x=Wo(),A=tv(),M=Q6().calcCommon;q.exports=function(t,r){var o=t._fullLayout,a=x.getFromId(t,r.xaxis),i=x.getFromId(t,r.yaxis),n=a.makeCalcdata(r,"x"),s=A(r,a,"x",n).vals,c=M(t,r,n,s,i,e);return c.length?(d.extendFlat(c[0].t,{num:o._numBoxes,dPos:d.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),o._numBoxes++,c):[{t:{empty:!0}}]};function e(t,r,o,a){return{min:o,q1:Math.min(t,a),med:a,q3:Math.max(t,a),max:r}}}}),bH=Ze({"src/traces/candlestick/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"candlestick",basePlotModule:Zf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:rC(),layoutAttributes:N_(),supplyLayoutDefaults:V2().supplyLayoutDefaults,crossTraceCalc:G2().crossTraceCalc,supplyDefaults:_H(),calc:xH(),plot:H2().plot,layerName:"boxlayer",style:W2().style,hoverPoints:eC().hoverPoints,selectPoints:tC()}}}),wH=Ze({"lib/candlestick.js"(Z,q){"use strict";q.exports=bH()}}),aC=Ze({"src/plots/polar/set_convert.js"(Z,q){"use strict";var d=ca(),x=wv(),A=d.deg2rad,M=d.rad2deg;q.exports=function(i,n,s){switch(x(i,s),i._id){case"x":case"radialaxis":e(i,n);break;case"angularaxis":o(i,n);break}};function e(a,i){var n=i._subplot;a.setGeometry=function(){var s=a._rl[0],c=a._rl[1],f=n.innerRadius,g=(n.radius-f)/(c-s),v=f/g,T=s>c?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var _=a.c2l(l)-s;return(T(_)?_:0)+v},a.g2c=function(l){return a.l2c(l+s-v)},a.g2p=function(l){return l*g},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?A(a):a}function r(a,i){return i==="degrees"?M(a):a}function o(a,i){var n=a.type;if(n==="linear"){var s=a.d2c,c=a.c2d;a.d2c=function(f,g){return t(s(f),g)},a.c2d=function(f,g){return c(r(f,g))}}a.makeCalcdata=function(f,g){var v=f[g],T=f._length,l,_,w=function(p){return a.d2c(p,f.thetaunit)};if(v)for(l=new Array(T),_=0;_<T;_++)l[_]=w(v[_]);else{var S=g+"0",E="d"+g,y=S in f?w(f[S]):0,b=f[E]?w(f[E]):(a.period||2*Math.PI)/T;for(l=new Array(T),_=0;_<T;_++)l[_]=y+_*b}return l},a.setGeometry=function(){var f=i.sector,g=f.map(A),v={clockwise:-1,counterclockwise:1}[a.direction],T=A(a.rotation),l=function(u){return v*u+T},_=function(u){return(u-T)/v},w,S,E,y;switch(n){case"linear":S=w=d.identity,y=A,E=M,a.range=d.isFullCircle(g)?[f[0],f[0]+360]:g.map(_).map(M);break;case"category":var b=a._categories.length,p=a.period?Math.max(a.period,b):b;p===0&&(p=1),S=y=function(u){return u*2*Math.PI/p},w=E=function(u){return u*p/Math.PI/2},a.range=[0,p];break}a.c2g=function(u){return l(S(u))},a.g2c=function(u){return w(_(u))},a.t2g=function(u){return l(y(u))},a.g2t=function(u){return E(_(u))}}}}}),DT=Ze({"src/plots/polar/constants.js"(Z,q){"use strict";q.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}}}),zT=Ze({"src/plots/polar/helpers.js"(Z,q){"use strict";var d=ca(),x=P_().tester,A=d.findIndexOfMin,M=d.isAngleInsideSector,e=d.angleDelta,t=d.angleDist;function r(_,w,S,E,y){if(!M(w,E))return!1;var b,p;S[0]<S[1]?(b=S[0],p=S[1]):(b=S[1],p=S[0]);var u=x(s(b,E[0],E[1],y)),m=x(s(p,E[0],E[1],y)),h=[_*Math.cos(w),_*Math.sin(w)];return m.contains(h)&&!u.contains(h)}function o(_,w,S,E){var y,b,p=E[0],u=E[1],m=g(Math.sin(w)-Math.sin(_)),h=g(Math.cos(w)-Math.cos(_)),P=Math.tan(S),L=g(1/P),z=m/h,F=u-z*p;return L?m&&h?(y=F/(P-z),b=P*y):h?(y=u*L,b=u):(y=p,b=p*P):m&&h?(y=0,b=F):h?(y=0,b=u):y=b=NaN,[y,b]}function a(_,w,S,E){var y=-w*S,b=w*w+1,p=2*(w*y-S),u=y*y+S*S-_*_,m=Math.sqrt(p*p-4*b*u),h=(-p+m)/(2*b),P=(-p-m)/(2*b);return[[h,w*h+y+E],[P,w*P+y+E]]}function i(_,w){var S=w.length,E=new Array(S+1),y;for(y=0;y<S;y++){var b=w[y];E[y]=[_*Math.cos(b),_*Math.sin(b)]}return E[y]=E[0].slice(),E}function n(_,w,S,E){var y=E.length,b=[],p,u;function m(N){return[_*Math.cos(N),_*Math.sin(N)]}function h(N,U,W){return o(N,U,W,m(N))}function P(N){return d.mod(N,y)}function L(N){return M(N,[w,S])}var z=A(E,function(N){return L(N)?t(N,w):1/0}),F=h(E[z],E[P(z-1)],w);for(b.push(F),p=z,u=0;u<y;p++,u++){var B=E[P(p)];if(!L(B))break;b.push(m(B))}var O=A(E,function(N){return L(N)?t(N,S):1/0}),I=h(E[O],E[P(O+1)],S);return b.push(I),b.push([0,0]),b.push(b[0].slice()),b}function s(_,w,S,E){return d.isFullCircle([w,S])?i(_,E):n(_,w,S,E)}function c(_,w,S,E){for(var y=1/0,b=1/0,p=s(_,w,S,E),u=0;u<p.length;u++){var m=p[u];y=Math.min(y,m[0]),b=Math.min(b,-m[1])}return[y,b]}function f(_,w){var S=function(b){var p=e(b,_);return p>0?p:1/0},E=A(w,S),y=d.mod(E+1,w.length);return[w[E],w[y]]}function g(_){return Math.abs(_)>1e-10?_:0}function v(_,w,S){w=w||0,S=S||0;for(var E=_.length,y=new Array(E),b=0;b<E;b++){var p=_[b];y[b]=[w+p[0],S-p[1]]}return y}function T(_,w,S,E,y,b){var p=s(_,w,S,E);return"M"+v(p,y,b).join("L")}function l(_,w,S,E,y,b,p){var u,m;_<w?(u=_,m=w):(u=w,m=_);var h=v(s(u,S,E,y),b,p),P=v(s(m,S,E,y),b,p);return"M"+P.reverse().join("L")+"M"+h.join("L")}q.exports={isPtInsidePolygon:r,findPolygonOffset:c,findEnclosingVertexAngles:f,findIntersectionXY:o,findXYatLength:a,clampTiny:g,pathPolygon:T,pathPolygonAnnulus:l}}}),iC=Ze({"src/plots/smith/helpers.js"(Z,q){"use strict";function d(r){return r<0?-1:r>0?1:0}function x(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var i=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/i,2*a/i]}function A(r,o){var a=o[0],i=o[1];return[a*r.radius+r.cx,-i*r.radius+r.cy]}function M(r,o){return o*r.radius}function e(r,o,a,i){var n=A(r,x([a,o])),s=n[0],c=n[1],f=A(r,x([i,o])),g=f[0],v=f[1];if(o===0)return["M"+s+","+c,"L"+g+","+v].join(" ");var T=M(r,1/Math.abs(o));return["M"+s+","+c,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+g+","+v].join(" ")}function t(r,o,a,i){var n=M(r,1/(o+1)),s=A(r,x([o,a])),c=s[0],f=s[1],g=A(r,x([o,i])),v=g[0],T=g[1];if(d(a)!==d(i)){var l=A(r,x([o,0])),_=l[0],w=l[1];return["M"+c+","+f,"A"+n+","+n+" 0 0,"+(0<a?0:1)+" "+_+","+w,"A"+n+","+n+" 0 0,"+(i<0?0:1)+v+","+T].join(" ")}return["M"+c+","+f,"A"+n+","+n+" 0 0,"+(i<a?0:1)+" "+v+","+T].join(" ")}q.exports={smith:x,reactanceArc:e,resistanceArc:t,smithTransform:A}}}),nC=Ze({"src/plots/polar/polar.js"(Z,q){"use strict";var d=On(),x=Ch(),A=oo(),M=ca(),e=M.strRotate,t=M.strTranslate,r=Yn(),o=as(),a=xc(),i=Wo(),n=wv(),s=aC(),c=Yd().doAutoRange,f=L5(),g=Tp(),v=ef(),T=Z0(),l=Tf().prepSelect,_=Tf().selectOnClick,w=Tf().clearOutline,S=Kd(),E=C_(),y=L_().redrawReglTraces,b=mh().MID_SHIFT,p=DT(),u=zT(),m=iC(),h=m.smith,P=m.reactanceArc,L=m.resistanceArc,z=m.smithTransform,F=M._,B=M.mod,O=M.deg2rad,I=M.rad2deg;function N(he,G,$){this.isSmith=$||!1,this.id=G,this.gd=he,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var J=he._fullLayout,X="clip"+J._uid+G;this.clipIds.forTraces=X+"-for-traces",this.clipPaths.forTraces=J._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=J["_"+($?"smith":"polar")+"layer"].append("g").attr("class",G),this.getHole=function(oe){return this.isSmith?0:oe.hole},this.getSector=function(oe){return this.isSmith?[0,360]:oe.sector},this.getRadial=function(oe){return this.isSmith?oe.realaxis:oe.radialaxis},this.getAngular=function(oe){return this.isSmith?oe.imaginaryaxis:oe.angularaxis},$||(this.radialTickLayout=null,this.angularTickLayout=null)}var U=N.prototype;q.exports=function(G,$,J){return new N(G,$,J)},U.plot=function(he,G){for(var $=this,J=G[$.id],X=!1,oe=0;oe<he.length;oe++){var ie=he[oe][0].trace;if(ie.cliponaxis===!1){X=!0;break}}$._hasClipOnAxisFalse=X,$.updateLayers(G,J),$.updateLayout(G,J),a.generalUpdatePerTraceModule($.gd,$,he,J),$.updateFx(G,J),$.isSmith&&(delete J.realaxis.range,delete J.imaginaryaxis.range)},U.updateLayers=function(he,G){var $=this,J=$.isSmith,X=$.layers,oe=$.getRadial(G),ie=$.getAngular(G),j=p.layerNames,ee=j.indexOf("frontplot"),re=j.slice(0,ee),ce=ie.layer==="below traces",be=oe.layer==="below traces";ce&&re.push("angular-line"),be&&re.push("radial-line"),ce&&re.push("angular-axis"),be&&re.push("radial-axis"),re.push("frontplot"),ce||re.push("angular-line"),be||re.push("radial-line"),ce||re.push("angular-axis"),be||re.push("radial-axis");var Ae=(J?"smith":"polar")+"sublayer",ze=$.framework.selectAll("."+Ae).data(re,String);ze.enter().append("g").attr("class",function(Re){return Ae+" "+Re}).each(function(Re){var Xe=X[Re]=d.select(this);switch(Re){case"frontplot":J||Xe.append("g").classed("barlayer",!0),Xe.append("g").classed("scatterlayer",!0);break;case"backplot":Xe.append("g").classed("maplayer",!0);break;case"plotbg":X.bg=Xe.append("path");break;case"radial-grid":Xe.style("fill","none");break;case"angular-grid":Xe.style("fill","none");break;case"radial-line":Xe.append("line").style("fill","none");break;case"angular-line":Xe.append("path").style("fill","none");break}}),ze.order()},U.updateLayout=function(he,G){var $=this,J=$.layers,X=he._size,oe=$.getRadial(G),ie=$.getAngular(G),j=G.domain.x,ee=G.domain.y;$.xOffset=X.l+X.w*j[0],$.yOffset=X.t+X.h*(1-ee[1]);var re=$.xLength=X.w*(j[1]-j[0]),ce=$.yLength=X.h*(ee[1]-ee[0]),be=$.getSector(G);$.sectorInRad=be.map(O);var Ae=$.sectorBBox=Q(be),ze=Ae[2]-Ae[0],Re=Ae[3]-Ae[1],Xe=ce/re,it=Math.abs(Re/ze),ot,tt,lt,Ee,_e;Xe>it?(ot=re,tt=re*it,_e=(ce-tt)/X.h/2,lt=[j[0],j[1]],Ee=[ee[0]+_e,ee[1]-_e]):(ot=ce/it,tt=ce,_e=(re-ot)/X.w/2,lt=[j[0]+_e,j[1]-_e],Ee=[ee[0],ee[1]]),$.xLength2=ot,$.yLength2=tt,$.xDomain2=lt,$.yDomain2=Ee;var fe=$.xOffset2=X.l+X.w*lt[0],Fe=$.yOffset2=X.t+X.h*(1-Ee[1]),rt=$.radius=ot/ze,st=$.innerRadius=$.getHole(G)*rt,Qe=$.cx=fe-rt*Ae[0],Lt=$.cy=Fe+rt*Ae[3],kt=$.cxx=Qe-fe,Vt=$.cyy=Lt-Fe,Zt=oe.side,Sr;Zt==="counterclockwise"?(Sr=Zt,Zt="top"):Zt==="clockwise"&&(Sr=Zt,Zt="bottom"),$.radialAxis=$.mockAxis(he,G,oe,{_id:"x",side:Zt,_trueSide:Sr,domain:[st/X.w,rt/X.w]}),$.angularAxis=$.mockAxis(he,G,ie,{side:"right",domain:[0,Math.PI],autorange:!1}),$.doAutoRange(he,G),$.updateAngularAxis(he,G),$.updateRadialAxis(he,G),$.updateRadialAxisTitle(he,G),$.xaxis=$.mockCartesianAxis(he,G,{_id:"x",domain:lt}),$.yaxis=$.mockCartesianAxis(he,G,{_id:"y",domain:Ee});var xr=$.pathSubplot();$.clipPaths.forTraces.select("path").attr("d",xr).attr("transform",t(kt,Vt)),J.frontplot.attr("transform",t(fe,Fe)).call(o.setClipUrl,$._hasClipOnAxisFalse?null:$.clipIds.forTraces,$.gd),J.bg.attr("d",xr).attr("transform",t(Qe,Lt)).call(r.fill,G.bgcolor)},U.mockAxis=function(he,G,$,J){var X=M.extendFlat({},$,J);return s(X,G,he),X},U.mockCartesianAxis=function(he,G,$){var J=this,X=J.isSmith,oe=$._id,ie=M.extendFlat({type:"linear"},$);n(ie,he);var j={x:[0,2],y:[1,3]};return ie.setRange=function(){var ee=J.sectorBBox,re=j[oe],ce=J.radialAxis._rl,be=(ce[1]-ce[0])/(1-J.getHole(G));ie.range=[ee[re[0]]*be,ee[re[1]]*be]},ie.isPtWithinRange=oe==="x"&&!X?function(ee){return J.isPtInside(ee)}:function(){return!0},ie.setRange(),ie.setScale(),ie},U.doAutoRange=function(he,G){var $=this,J=$.gd,X=$.radialAxis,oe=$.getRadial(G);c(J,X);var ie=X.range;if(oe.range=ie.slice(),oe._input.range=ie.slice(),X._rl=[X.r2l(ie[0],null,"gregorian"),X.r2l(ie[1],null,"gregorian")],X.minallowed!==void 0){var j=X.r2l(X.minallowed);X._rl[0]>X._rl[1]?X._rl[1]=Math.max(X._rl[1],j):X._rl[0]=Math.max(X._rl[0],j)}if(X.maxallowed!==void 0){var ee=X.r2l(X.maxallowed);X._rl[0]<X._rl[1]?X._rl[1]=Math.min(X._rl[1],ee):X._rl[0]=Math.min(X._rl[0],ee)}},U.updateRadialAxis=function(he,G){var $=this,J=$.gd,X=$.layers,oe=$.radius,ie=$.innerRadius,j=$.cx,ee=$.cy,re=$.getRadial(G),ce=B($.getSector(G)[0],360),be=$.radialAxis,Ae=ie<oe,ze=$.isSmith;ze||($.fillViewInitialKey("radialaxis.angle",re.angle),$.fillViewInitialKey("radialaxis.range",be.range.slice()),be.setGeometry()),be.tickangle==="auto"&&ce>90&&ce<=270&&(be.tickangle=180);var Re=ze?function(rt){var st=z($,h([rt.x,0]));return t(st[0]-j,st[1]-ee)}:function(rt){return t(be.l2p(rt.x)+ie,0)},Xe=ze?function(rt){return L($,rt.x,-1/0,1/0)}:function(rt){return $.pathArc(be.r2p(rt.x)+ie)},it=W(re);if($.radialTickLayout!==it&&(X["radial-axis"].selectAll(".xtick").remove(),$.radialTickLayout=it),Ae){be.setScale();var ot=0,tt=ze?(be.tickvals||[]).filter(function(rt){return rt>=0}).map(function(rt){return i.tickText(be,rt,!0,!1)}):i.calcTicks(be),lt=ze?tt:i.clipEnds(be,tt),Ee=i.getTickSigns(be)[2];ze&&((be.ticks==="top"&&be.side==="bottom"||be.ticks==="bottom"&&be.side==="top")&&(Ee=-Ee),be.ticks==="top"&&be.side==="top"&&(ot=-be.ticklen),be.ticks==="bottom"&&be.side==="bottom"&&(ot=be.ticklen)),i.drawTicks(J,be,{vals:tt,layer:X["radial-axis"],path:i.makeTickPath(be,0,Ee),transFn:Re,crisp:!1}),i.drawGrid(J,be,{vals:lt,layer:X["radial-grid"],path:Xe,transFn:M.noop,crisp:!1}),i.drawLabels(J,be,{vals:tt,layer:X["radial-axis"],transFn:Re,labelFns:i.makeLabelFns(be,ot)})}var _e=$.radialAxisAngle=$.vangles?I(ue(O(re.angle),$.vangles)):re.angle,fe=t(j,ee),Fe=fe+e(-_e);le(X["radial-axis"],Ae&&(re.showticklabels||re.ticks),{transform:Fe}),le(X["radial-grid"],Ae&&re.showgrid,{transform:ze?"":fe}),le(X["radial-line"].select("line"),Ae&&re.showline,{x1:ze?-oe:ie,y1:0,x2:oe,y2:0,transform:Fe}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},U.updateRadialAxisTitle=function(he,G,$){if(!this.isSmith){var J=this,X=J.gd,oe=J.radius,ie=J.cx,j=J.cy,ee=J.getRadial(G),re=J.id+"title",ce=0;if(ee.title){var be=o.bBox(J.layers["radial-axis"].node()).height,Ae=ee.title.font.size,ze=ee.side;ce=ze==="top"?Ae:ze==="counterclockwise"?-(be+Ae*.4):be+Ae*.8}var Re=$!==void 0?$:J.radialAxisAngle,Xe=O(Re),it=Math.cos(Xe),ot=Math.sin(Xe),tt=ie+oe/2*it+ce*ot,lt=j-oe/2*ot+ce*it;J.layers["radial-axis-title"]=T.draw(X,re,{propContainer:ee,propName:J.id+".radialaxis.title",placeholder:F(X,"Click to enter radial axis title"),attributes:{x:tt,y:lt,"text-anchor":"middle"},transform:{rotate:-Re}})}},U.updateAngularAxis=function(he,G){var $=this,J=$.gd,X=$.layers,oe=$.radius,ie=$.innerRadius,j=$.cx,ee=$.cy,re=$.getAngular(G),ce=$.angularAxis,be=$.isSmith;be||($.fillViewInitialKey("angularaxis.rotation",re.rotation),ce.setGeometry(),ce.setScale());var Ae=be?function(st){var Qe=z($,h([0,st.x]));return Math.atan2(Qe[0]-j,Qe[1]-ee)-Math.PI/2}:function(st){return ce.t2g(st.x)};ce.type==="linear"&&ce.thetaunit==="radians"&&(ce.tick0=I(ce.tick0),ce.dtick=I(ce.dtick));var ze=function(st){return t(j+oe*Math.cos(st),ee-oe*Math.sin(st))},Re=be?function(st){var Qe=z($,h([0,st.x]));return t(Qe[0],Qe[1])}:function(st){return ze(Ae(st))},Xe=be?function(st){var Qe=z($,h([0,st.x])),Lt=Math.atan2(Qe[0]-j,Qe[1]-ee)-Math.PI/2;return t(Qe[0],Qe[1])+e(-I(Lt))}:function(st){var Qe=Ae(st);return ze(Qe)+e(-I(Qe))},it=be?function(st){return P($,st.x,0,1/0)}:function(st){var Qe=Ae(st),Lt=Math.cos(Qe),kt=Math.sin(Qe);return"M"+[j+ie*Lt,ee-ie*kt]+"L"+[j+oe*Lt,ee-oe*kt]},ot=i.makeLabelFns(ce,0),tt=ot.labelStandoff,lt={};lt.xFn=function(st){var Qe=Ae(st);return Math.cos(Qe)*tt},lt.yFn=function(st){var Qe=Ae(st),Lt=Math.sin(Qe)>0?.2:1;return-Math.sin(Qe)*(tt+st.fontSize*Lt)+Math.abs(Math.cos(Qe))*(st.fontSize*b)},lt.anchorFn=function(st){var Qe=Ae(st),Lt=Math.cos(Qe);return Math.abs(Lt)<.1?"middle":Lt>0?"start":"end"},lt.heightFn=function(st,Qe,Lt){var kt=Ae(st);return-.5*(1+Math.sin(kt))*Lt};var Ee=W(re);$.angularTickLayout!==Ee&&(X["angular-axis"].selectAll("."+ce._id+"tick").remove(),$.angularTickLayout=Ee);var _e=be?[1/0].concat(ce.tickvals||[]).map(function(st){return i.tickText(ce,st,!0,!1)}):i.calcTicks(ce);be&&(_e[0].text="\u221E",_e[0].fontSize*=1.75);var fe;if(G.gridshape==="linear"?(fe=_e.map(Ae),M.angleDelta(fe[0],fe[1])<0&&(fe=fe.slice().reverse())):fe=null,$.vangles=fe,ce.type==="category"&&(_e=_e.filter(function(st){return M.isAngleInsideSector(Ae(st),$.sectorInRad)})),ce.visible){var Fe=ce.ticks==="inside"?-1:1,rt=(ce.linewidth||1)/2;i.drawTicks(J,ce,{vals:_e,layer:X["angular-axis"],path:"M"+Fe*rt+",0h"+Fe*ce.ticklen,transFn:Xe,crisp:!1}),i.drawGrid(J,ce,{vals:_e,layer:X["angular-grid"],path:it,transFn:M.noop,crisp:!1}),i.drawLabels(J,ce,{vals:_e,layer:X["angular-axis"],repositionOnUpdate:!0,transFn:Re,labelFns:lt})}le(X["angular-line"].select("path"),re.showline,{d:$.pathSubplot(),transform:t(j,ee)}).attr("stroke-width",re.linewidth).call(r.stroke,re.linecolor)},U.updateFx=function(he,G){if(!this.gd._context.staticPlot){var $=!this.isSmith;$&&(this.updateAngularDrag(he),this.updateRadialDrag(he,G,0),this.updateRadialDrag(he,G,1)),this.updateHoverAndMainDrag(he)}},U.updateHoverAndMainDrag=function(he){var G=this,$=G.isSmith,J=G.gd,X=G.layers,oe=he._zoomlayer,ie=p.MINZOOM,j=p.OFFEDGE,ee=G.radius,re=G.innerRadius,ce=G.cx,be=G.cy,Ae=G.cxx,ze=G.cyy,Re=G.sectorInRad,Xe=G.vangles,it=G.radialAxis,ot=u.clampTiny,tt=u.findXYatLength,lt=u.findEnclosingVertexAngles,Ee=p.cornerHalfWidth,_e=p.cornerLen/2,fe,Fe,rt=f.makeDragger(X,"path","maindrag",he.dragmode===!1?"none":"crosshair");d.select(rt).attr("d",G.pathSubplot()).attr("transform",t(ce,be)),rt.onmousemove=function(rr){v.hover(J,rr,G.id),J._fullLayout._lasthover=rt,J._fullLayout._hoversubplot=G.id},rt.onmouseout=function(rr){J._dragging||g.unhover(J,rr)};var st={element:rt,gd:J,subplot:G.id,plotinfo:{id:G.id,xaxis:G.xaxis,yaxis:G.yaxis},xaxes:[G.xaxis],yaxes:[G.yaxis]},Qe,Lt,kt,Vt,Zt,Sr,xr,jr,wr;function Ir(rr,Qt){return Math.sqrt(rr*rr+Qt*Qt)}function bt(rr,Qt){return Ir(rr-Ae,Qt-ze)}function Be(rr,Qt){return Math.atan2(ze-Qt,rr-Ae)}function Ke(rr,Qt){return[rr*Math.cos(Qt),rr*Math.sin(-Qt)]}function Ue(rr,Qt){if(rr===0)return G.pathSector(2*Ee);var Tr=_e/rr,la=Qt-Tr,Ua=Qt+Tr,Ba=Math.max(0,Math.min(rr,ee)),Ra=Ba-Ee,ei=Ba+Ee;return"M"+Ke(Ra,la)+"A"+[Ra,Ra]+" 0,0,0 "+Ke(Ra,Ua)+"L"+Ke(ei,Ua)+"A"+[ei,ei]+" 0,0,1 "+Ke(ei,la)+"Z"}function Me(rr,Qt,Tr){if(rr===0)return G.pathSector(2*Ee);var la=Ke(rr,Qt),Ua=Ke(rr,Tr),Ba=ot((la[0]+Ua[0])/2),Ra=ot((la[1]+Ua[1])/2),ei,za;if(Ba&&Ra){var ti=Ra/Ba,Ci=-1/ti,Jt=tt(Ee,ti,Ba,Ra);ei=tt(_e,Ci,Jt[0][0],Jt[0][1]),za=tt(_e,Ci,Jt[1][0],Jt[1][1])}else{var Nt,Kt;Ra?(Nt=_e,Kt=Ee):(Nt=Ee,Kt=_e),ei=[[Ba-Nt,Ra-Kt],[Ba+Nt,Ra-Kt]],za=[[Ba-Nt,Ra+Kt],[Ba+Nt,Ra+Kt]]}return"M"+ei.join("L")+"L"+za.reverse().join("L")+"Z"}function qe(){kt=null,Vt=null,Zt=G.pathSubplot(),Sr=!1;var rr=J._fullLayout[G.id];xr=x(rr.bgcolor).getLuminance(),jr=f.makeZoombox(oe,xr,ce,be,Zt),jr.attr("fill-rule","evenodd"),wr=f.makeCorners(oe,ce,be),w(J)}function Ce(rr,Qt){return Qt=Math.max(Math.min(Qt,ee),re),rr<j?rr=0:ee-rr<j?rr=ee:Qt<j?Qt=0:ee-Qt<j&&(Qt=ee),Math.abs(Qt-rr)>ie?(rr<Qt?(kt=rr,Vt=Qt):(kt=Qt,Vt=rr),!0):(kt=null,Vt=null,!1)}function Te(rr,Qt){rr=rr||Zt,Qt=Qt||"M0,0Z",jr.attr("d",rr),wr.attr("d",Qt),f.transitionZoombox(jr,wr,Sr,xr),Sr=!0;var Tr={};Ot(Tr),J.emit("plotly_relayouting",Tr)}function Pe(rr,Qt){rr=rr*fe,Qt=Qt*Fe;var Tr=Qe+rr,la=Lt+Qt,Ua=bt(Qe,Lt),Ba=Math.min(bt(Tr,la),ee),Ra=Be(Qe,Lt),ei,za;Ce(Ua,Ba)&&(ei=Zt+G.pathSector(Vt),kt&&(ei+=G.pathSector(kt)),za=Ue(kt,Ra)+Ue(Vt,Ra)),Te(ei,za)}function at(rr,Qt,Tr,la){var Ua=u.findIntersectionXY(Tr,la,Tr,[rr-Ae,ze-Qt]);return Ir(Ua[0],Ua[1])}function yt(rr,Qt){var Tr=Qe+rr,la=Lt+Qt,Ua=Be(Qe,Lt),Ba=Be(Tr,la),Ra=lt(Ua,Xe),ei=lt(Ba,Xe),za=at(Qe,Lt,Ra[0],Ra[1]),ti=Math.min(at(Tr,la,ei[0],ei[1]),ee),Ci,Jt;Ce(za,ti)&&(Ci=Zt+G.pathSector(Vt),kt&&(Ci+=G.pathSector(kt)),Jt=[Me(kt,Ra[0],Ra[1]),Me(Vt,Ra[0],Ra[1])].join(" ")),Te(Ci,Jt)}function Tt(){if(f.removeZoombox(J),!(kt===null||Vt===null)){var rr={};Ot(rr),f.showDoubleClickNotifier(J),A.call("_guiRelayout",J,rr)}}function Ot(rr){var Qt=it._rl,Tr=(Qt[1]-Qt[0])/(1-re/ee)/ee,la=[Qt[0]+(kt-re)*Tr,Qt[0]+(Vt-re)*Tr];rr[G.id+".radialaxis.range"]=la}function Gt(rr,Qt){var Tr=J._fullLayout.clickmode;if(f.removeZoombox(J),rr===2){var la={};for(var Ua in G.viewInitial)la[G.id+"."+Ua]=G.viewInitial[Ua];J.emit("plotly_doubleclick",null),A.call("_guiRelayout",J,la)}Tr.indexOf("select")>-1&&rr===1&&_(Qt,J,[G.xaxis],[G.yaxis],G.id,st),Tr.indexOf("event")>-1&&v.click(J,Qt,G.id)}st.prepFn=function(rr,Qt,Tr){var la=J._fullLayout.dragmode,Ua=rt.getBoundingClientRect();J._fullLayout._calcInverseTransform(J);var Ba=J._fullLayout._invTransform;fe=J._fullLayout._invScaleX,Fe=J._fullLayout._invScaleY;var Ra=M.apply3DTransform(Ba)(Qt-Ua.left,Tr-Ua.top);if(Qe=Ra[0],Lt=Ra[1],Xe){var ei=u.findPolygonOffset(ee,Re[0],Re[1],Xe);Qe+=Ae+ei[0],Lt+=ze+ei[1]}switch(la){case"zoom":st.clickFn=Gt,$||(Xe?st.moveFn=yt:st.moveFn=Pe,st.doneFn=Tt,qe(rr,Qt,Tr));break;case"select":case"lasso":l(rr,Qt,Tr,st,la);break}},g.init(st)},U.updateRadialDrag=function(he,G,$){var J=this,X=J.gd,oe=J.layers,ie=J.radius,j=J.innerRadius,ee=J.cx,re=J.cy,ce=J.radialAxis,be=p.radialDragBoxSize,Ae=be/2;if(!ce.visible)return;var ze=O(J.radialAxisAngle),Re=ce._rl,Xe=Re[0],it=Re[1],ot=Re[$],tt=.75*(Re[1]-Re[0])/(1-J.getHole(G))/ie,lt,Ee,_e;$?(lt=ee+(ie+Ae)*Math.cos(ze),Ee=re-(ie+Ae)*Math.sin(ze),_e="radialdrag"):(lt=ee+(j-Ae)*Math.cos(ze),Ee=re-(j-Ae)*Math.sin(ze),_e="radialdrag-inner");var fe=f.makeRectDragger(oe,_e,"crosshair",-Ae,-Ae,be,be),Fe={element:fe,gd:X};he.dragmode===!1&&(Fe.dragmode=!1),le(d.select(fe),ce.visible&&j<ie,{transform:t(lt,Ee)});var rt,st,Qe;function Lt(xr,jr){if(rt)rt(xr,jr);else{var wr=[xr,-jr],Ir=[Math.cos(ze),Math.sin(ze)],bt=Math.abs(M.dot(wr,Ir)/Math.sqrt(M.dot(wr,wr)));isNaN(bt)||(rt=bt<.5?Zt:Sr)}var Be={};kt(Be),X.emit("plotly_relayouting",Be)}function kt(xr){st!==null?xr[J.id+".radialaxis.angle"]=st:Qe!==null&&(xr[J.id+".radialaxis.range["+$+"]"]=Qe)}function Vt(){st!==null?A.call("_guiRelayout",X,J.id+".radialaxis.angle",st):Qe!==null&&A.call("_guiRelayout",X,J.id+".radialaxis.range["+$+"]",Qe)}function Zt(xr,jr){if($!==0){var wr=lt+xr,Ir=Ee+jr;st=Math.atan2(re-Ir,wr-ee),J.vangles&&(st=ue(st,J.vangles)),st=I(st);var bt=t(ee,re)+e(-st);oe["radial-axis"].attr("transform",bt),oe["radial-line"].select("line").attr("transform",bt);var Be=J.gd._fullLayout,Ke=Be[J.id];J.updateRadialAxisTitle(Be,Ke,st)}}function Sr(xr,jr){var wr=M.dot([xr,-jr],[Math.cos(ze),Math.sin(ze)]);if(Qe=ot-tt*wr,tt>0!=($?Qe>Xe:Qe<it)){Qe=null;return}var Ir=X._fullLayout,bt=Ir[J.id];ce.range[$]=Qe,ce._rl[$]=Qe,J.updateRadialAxis(Ir,bt),J.xaxis.setRange(),J.xaxis.setScale(),J.yaxis.setRange(),J.yaxis.setScale();var Be=!1;for(var Ke in J.traceHash){var Ue=J.traceHash[Ke],Me=M.filterVisible(Ue),qe=Ue[0][0].trace._module;qe.plot(X,J,Me,bt),A.traceIs(Ke,"gl")&&Me.length&&(Be=!0)}Be&&(E(X),y(X))}Fe.prepFn=function(){rt=null,st=null,Qe=null,Fe.moveFn=Lt,Fe.doneFn=Vt,w(X)},Fe.clampFn=function(xr,jr){return Math.sqrt(xr*xr+jr*jr)<p.MINDRAG&&(xr=0,jr=0),[xr,jr]},g.init(Fe)},U.updateAngularDrag=function(he){var G=this,$=G.gd,J=G.layers,X=G.radius,oe=G.angularAxis,ie=G.cx,j=G.cy,ee=G.cxx,re=G.cyy,ce=p.angularDragBoxSize,be=f.makeDragger(J,"path","angulardrag",he.dragmode===!1?"none":"move"),Ae={element:be,gd:$};he.dragmode===!1?Ae.dragmode=!1:d.select(be).attr("d",G.pathAnnulus(X,X+ce)).attr("transform",t(ie,j)).call(S,"move");function ze(Qe,Lt){return Math.atan2(re+ce-Lt,Qe-ee-ce)}var Re=J.frontplot.select(".scatterlayer").selectAll(".trace"),Xe=Re.selectAll(".point"),it=Re.selectAll(".textpoint"),ot,tt,lt,Ee,_e,fe;function Fe(Qe,Lt){var kt=G.gd._fullLayout,Vt=kt[G.id],Zt=ot+Qe*he._invScaleX,Sr=tt+Lt*he._invScaleY,xr=ze(Zt,Sr),jr=I(xr-fe);if(Ee=lt+jr,J.frontplot.attr("transform",t(G.xOffset2,G.yOffset2)+e([-jr,ee,re])),G.vangles){_e=G.radialAxisAngle+jr;var wr=t(ie,j)+e(-jr),Ir=t(ie,j)+e(-_e);J.bg.attr("transform",wr),J["radial-grid"].attr("transform",wr),J["radial-axis"].attr("transform",Ir),J["radial-line"].select("line").attr("transform",Ir),G.updateRadialAxisTitle(kt,Vt,_e)}else G.clipPaths.forTraces.select("path").attr("transform",t(ee,re)+e(jr));Xe.each(function(){var Ce=d.select(this),Te=o.getTranslate(Ce);Ce.attr("transform",t(Te.x,Te.y)+e([jr]))}),it.each(function(){var Ce=d.select(this),Te=Ce.select("text"),Pe=o.getTranslate(Ce);Ce.attr("transform",e([jr,Te.attr("x"),Te.attr("y")])+t(Pe.x,Pe.y))}),oe.rotation=M.modHalf(Ee,360),G.updateAngularAxis(kt,Vt),G._hasClipOnAxisFalse&&!M.isFullCircle(G.sectorInRad)&&Re.call(o.hideOutsideRangePoints,G);var bt=!1;for(var Be in G.traceHash)if(A.traceIs(Be,"gl")){var Ke=G.traceHash[Be],Ue=M.filterVisible(Ke),Me=Ke[0][0].trace._module;Me.plot($,G,Ue,Vt),Ue.length&&(bt=!0)}bt&&(E($),y($));var qe={};rt(qe),$.emit("plotly_relayouting",qe)}function rt(Qe){Qe[G.id+".angularaxis.rotation"]=Ee,G.vangles&&(Qe[G.id+".radialaxis.angle"]=_e)}function st(){it.select("text").attr("transform",null);var Qe={};rt(Qe),A.call("_guiRelayout",$,Qe)}Ae.prepFn=function(Qe,Lt,kt){var Vt=he[G.id];lt=Vt.angularaxis.rotation;var Zt=be.getBoundingClientRect();ot=Lt-Zt.left,tt=kt-Zt.top,$._fullLayout._calcInverseTransform($);var Sr=M.apply3DTransform(he._invTransform)(ot,tt);ot=Sr[0],tt=Sr[1],fe=ze(ot,tt),Ae.moveFn=Fe,Ae.doneFn=st,w($)},G.vangles&&!M.isFullCircle(G.sectorInRad)&&(Ae.prepFn=M.noop,S(d.select(be),null)),g.init(Ae)},U.isPtInside=function(he){if(this.isSmith)return!0;var G=this.sectorInRad,$=this.vangles,J=this.angularAxis.c2g(he.theta),X=this.radialAxis,oe=X.c2l(he.r),ie=X._rl,j=$?u.isPtInsidePolygon:M.isPtInsideSector;return j(oe,J,ie,G,$)},U.pathArc=function(he){var G=this.sectorInRad,$=this.vangles,J=$?u.pathPolygon:M.pathArc;return J(he,G[0],G[1],$)},U.pathSector=function(he){var G=this.sectorInRad,$=this.vangles,J=$?u.pathPolygon:M.pathSector;return J(he,G[0],G[1],$)},U.pathAnnulus=function(he,G){var $=this.sectorInRad,J=this.vangles,X=J?u.pathPolygonAnnulus:M.pathAnnulus;return X(he,G,$[0],$[1],J)},U.pathSubplot=function(){var he=this.innerRadius,G=this.radius;return he?this.pathAnnulus(he,G):this.pathSector(G)},U.fillViewInitialKey=function(he,G){he in this.viewInitial||(this.viewInitial[he]=G)};function W(he){var G=he.ticks+String(he.ticklen)+String(he.showticklabels);return"side"in he&&(G+=he.side),G}function Q(he){var G=he[0],$=he[1],J=$-G,X=B(G,360),oe=X+J,ie=Math.cos(O(X)),j=Math.sin(O(X)),ee=Math.cos(O(oe)),re=Math.sin(O(oe)),ce,be,Ae,ze;return X<=90&&oe>=90||X>90&&oe>=450?ze=1:j<=0&&re<=0?ze=0:ze=Math.max(j,re),X<=180&&oe>=180||X>180&&oe>=540?ce=-1:ie>=0&&ee>=0?ce=0:ce=Math.min(ie,ee),X<=270&&oe>=270||X>270&&oe>=630?be=-1:j>=0&&re>=0?be=0:be=Math.min(j,re),oe>=360?Ae=1:ie<=0&&ee<=0?Ae=0:Ae=Math.max(ie,ee),[ce,be,Ae,ze]}function ue(he,G){var $=function(X){return M.angleDist(he,X)},J=M.findIndexOfMin(G,$);return G[J]}function le(he,G,$){return G?(he.attr("display",null),he.attr($)):he&&he.attr("display","none"),he}}}),oC=Ze({"src/plots/polar/layout_attributes.js"(Z,q){"use strict";var d=oh(),x=Wh(),A=bc().attributes,M=ca().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:M({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:M({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),o={visible:M({},x.visible,{dflt:!0}),type:M({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:M({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:M({},x.minallowed,{editType:"plot"}),maxallowed:M({},x.maxallowed,{editType:"plot"}),range:M({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:M({},x.title.text,{editType:"plot",dflt:""}),font:M({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(o,t,r);var a={visible:M({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.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:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};M(a,t,r),q.exports={domain:A({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:d.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),TH=Ze({"src/plots/polar/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Dl(),M=i0(),e=Hh().getSubplotData,t=X0(),r=t1(),o=$m(),a=Qm(),i=I2(),n=D_(),s=f5(),c=a1(),f=oC(),g=aC(),v=DT(),T=v.axisNames;function l(w,S,E,y){var b=E("bgcolor");y.bgColor=x.combine(b,y.paper_bgcolor);var p=E("sector");E("hole");var u=e(y.fullData,v.name,y.id),m=y.layoutOut,h;function P(be,Ae){return E(h+"."+be,Ae)}for(var L=0;L<T.length;L++){h=T[L],d.isPlainObject(w[h])||(w[h]={});var z=w[h],F=A.newContainer(S,h);F._id=F._name=h,F._attr=y.id+"."+h,F._traceIndices=u.map(function(be){return be.index});var B=v.axisName2dataArray[h],O=_(z,F,P,u,B,y);i(z,F,P,{axData:u,dataAttr:B});var I=P("visible");switch(g(F,S,m),P("uirevision",S.uirevision),F._m=1,h){case"radialaxis":P("minallowed"),P("maxallowed");var N=P("range"),U=F.getAutorangeDflt(N),W=P("autorange",U),Q;N&&(N[0]===null&&N[1]===null||(N[0]===null||N[1]===null)&&(W==="reversed"||W===!0)||N[0]!==null&&(W==="min"||W==="max reversed")||N[1]!==null&&(W==="max"||W==="min reversed"))&&(N=void 0,delete F.range,F.autorange=!0,Q=!0),Q||(U=F.getAutorangeDflt(N),W=P("autorange",U)),z.autorange=W,W&&(s(P,W,N),(O==="linear"||O==="-")&&P("rangemode"),F.isReversed()&&(F._m=-1)),F.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(O==="date"){d.log("Polar plots do not support date angular axes yet.");for(var ue=0;ue<u.length;ue++)u[ue].visible=!1;O=z.type=F.type="linear"}P(O==="linear"?"thetaunit":"period");var le=P("direction");P("rotation",{counterclockwise:0,clockwise:90}[le]);break}if(a(z,F,P,F.type,{tickSuffixDflt:F.thetaunit==="degrees"?"\xB0":void 0}),I){var he,G,$,J,X,oe,ie,j,ee,re,ce=y.font||{};he=P("color"),G=he===z.color?he:ce.color,$=ce.size,J=ce.family,X=ce.weight,oe=ce.style,ie=ce.variant,j=ce.textcase,ee=ce.lineposition,re=ce.shadow,t(z,F,P,F.type),o(z,F,P,F.type,{font:{weight:X,style:oe,variant:ie,textcase:j,lineposition:ee,shadow:re,color:G,size:$,family:J},noAutotickangles:h==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),r(z,F,P,{outerTicks:!0}),n(z,F,P,{dfltColor:he,bgColor:y.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:f[h]}),P("layer"),h==="radialaxis"&&(P("side"),P("angle",p[0]),P("title.text"),d.coerceFont(P,"title.font",{weight:X,style:oe,variant:ie,textcase:j,lineposition:ee,shadow:re,color:G,size:d.bigFont($),family:J}))}O!=="category"&&P("hoverformat"),F._input=z}S.angularaxis.type==="category"&&E("gridshape")}function _(w,S,E,y,b,p){var u=E("autotypenumbers",p.autotypenumbersDflt),m=E("type");if(m==="-"){for(var h,P=0;P<y.length;P++)if(y[P].visible){h=y[P];break}h&&h[b]&&(S.type=c(h[b],"gregorian",{noMultiCategory:!0,autotypenumbers:u})),S.type==="-"?S.type="linear":w.type=S.type}return S.type}q.exports=function(S,E,y){M(S,E,y,{type:v.name,attributes:f,handleDefaults:l,font:E.font,autotypenumbersDflt:E.autotypenumbers,paper_bgcolor:E.paper_bgcolor,fullData:y,layoutOut:E})}}}),FT=Ze({"src/plots/polar/index.js"(Z,q){"use strict";var d=Hh().getSubplotCalcData,x=ca().counterRegex,A=nC(),M=DT(),e=M.attr,t=M.name,r=x(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(n){for(var s=n._fullLayout,c=n.calcdata,f=s._subplots[t],g=0;g<f.length;g++){var v=f[g],T=d(c,t,v),l=s[v]._subplot;l||(l=A(n,v),s[v]._subplot=l),l.plot(T,s,n._promises)}}function i(n,s,c,f){for(var g=f._subplots[t]||[],v=f._has&&f._has("gl"),T=s._has&&s._has("gl"),l=v&&!T,_=0;_<g.length;_++){var w=g[_],S=f[w]._subplot;if(!s[w]&&S){S.framework.remove(),S.layers["radial-axis-title"].remove();for(var E in S.clipPaths)S.clipPaths[E].remove()}l&&S._scene&&(S._scene.destroy(),S._scene=null)}}q.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:oC(),supplyLayoutDefaults:TH(),plot:a,clean:i,toSVG:Zf().toSVG}}}),Cx=Ze({"src/traces/scatterpolar/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=rs().extendFlat,M=$d(),e=tf(),t=eu(),r=e.line;q.exports={mode:e.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:e.text,texttemplate:x({editType:"plot"},{keys:["r","theta","text"]}),hovertext:e.hovertext,line:{color:r.color,width:r.width,dash:r.dash,backoff:r.backoff,shape:A({},r.shape,{values:["linear","spline"]}),smoothing:r.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:A({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:A({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:M(),hoverinfo:A({},t.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:e.hoveron,hovertemplate:d(),selected:e.selected,unselected:e.unselected}}}),OT=Ze({"src/traces/scatterpolar/defaults.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=md(),M=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=Cx();function i(s,c,f,g){function v(_,w){return d.coerce(s,c,a,_,w)}var T=n(s,c,g,v);if(!T){c.visible=!1;return}v("thetaunit"),v("mode",T<o?"lines+markers":"lines"),v("text"),v("hovertext"),c.hoveron!=="fills"&&v("hovertemplate"),x.hasMarkers(c)&&A(s,c,f,g,v,{gradient:!0}),x.hasLines(c)&&(M(s,c,f,g,v,{backoff:!0}),e(s,c,v),v("connectgaps")),x.hasText(c)&&(v("texttemplate"),t(s,c,g,v));var l=[];(x.hasMarkers(c)||x.hasText(c))&&(v("cliponaxis"),v("marker.maxdisplayed"),l.push("points")),v("fill"),c.fill!=="none"&&(r(s,c,f,v),x.hasLines(c)||e(s,c,v)),(c.fill==="tonext"||c.fill==="toself")&&l.push("fills"),v("hoveron",l.join("+")||"points"),d.coerceSelectionMarkerOpacity(c,v)}function n(s,c,f,g){var v=g("r"),T=g("theta");d.isTypedArray(v)&&(c.r=v=Array.from(v)),d.isTypedArray(T)&&(c.theta=T=Array.from(T));var l;if(v)T?l=Math.min(v.length,T.length):(l=v.length,g("theta0"),g("dtheta"));else{if(!T)return 0;l=c.theta.length,g("r0"),g("dr")}return c._length=l,l}q.exports={handleRThetaDefaults:n,supplyDefaults:i}}}),BT=Ze({"src/traces/scatterpolar/format_labels.js"(Z,q){"use strict";var d=ca(),x=Wo();q.exports=function(M,e,t){var r={},o=t[e.subplot]._subplot,a,i;o?(a=o.radialAxis,i=o.angularAxis):(o=t[e.subplot],a=o.radialaxis,i=o.angularaxis);var n=a.c2l(M.r);r.rLabel=x.tickText(a,n,!0).text;var s=i.thetaunit==="degrees"?d.rad2deg(M.theta):M.theta;return r.thetaLabel=x.tickText(i,s,!0).text,r}}}),AH=Ze({"src/traces/scatterpolar/calc.js"(Z,q){"use strict";var d=ns(),x=qs().BADNUM,A=Wo(),M=Fd(),e=Av(),t=Od(),r=Bd().calcMarkerSize;q.exports=function(a,i){for(var n=a._fullLayout,s=i.subplot,c=n[s].radialaxis,f=n[s].angularaxis,g=c.makeCalcdata(i,"r"),v=f.makeCalcdata(i,"theta"),T=i._length,l=new Array(T),_=0;_<T;_++){var w=g[_],S=v[_],E=l[_]={};d(w)&&d(S)?(E.r=w,E.theta=S):E.r=x}var y=r(i,T);return i._extremes.x=A.findExtremes(c,g,{ppad:y}),M(a,i),e(l,i),t(l,i),l}}}),SH=Ze({"src/traces/scatterpolar/plot.js"(Z,q){"use strict";var d=s1(),x=qs().BADNUM;q.exports=function(M,e,t){for(var r=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,a=e.yaxis,i={xaxis:o,yaxis:a,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},n=e.radialAxis,s=e.angularAxis,c=0;c<t.length;c++)for(var f=t[c],g=0;g<f.length;g++){g===0&&(f[0].trace._xA=o,f[0].trace._yA=a);var v=f[g],T=v.r;if(T===x)v.x=v.y=x;else{var l=n.c2g(T),_=s.c2g(v.theta);v.x=l*Math.cos(_),v.y=l*Math.sin(_)}}d(M,i,t,r)}}}),NT=Ze({"src/traces/scatterpolar/hover.js"(Z,q){"use strict";var d=u1();function x(M,e,t,r){var o=d(M,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var i=M.subplot,n=a.cd[a.index],s=a.trace;if(i.isPtInside(n))return a.xLabelVal=void 0,a.yLabelVal=void 0,A(n,s,i,a),a.hovertemplate=s.hovertemplate,o}}function A(M,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="r",a._hovertitle="\u03B8";var i={};i[e.subplot]={_subplot:t};var n=e._module.formatLabels(M,e,i);r.rLabel=n.rLabel,r.thetaLabel=n.thetaLabel;var s=M.hi||e.hoverinfo,c=[];function f(v,T){c.push(v._hovertitle+": "+T)}if(!e.hovertemplate){var g=s.split("+");g.indexOf("all")!==-1&&(g=["r","theta","text"]),g.indexOf("r")!==-1&&f(o,r.rLabel),g.indexOf("theta")!==-1&&f(a,r.thetaLabel),g.indexOf("text")!==-1&&r.text&&(c.push(r.text),delete r.text),r.extraText=c.join("<br>")}}q.exports={hoverPoints:x,makeHoverPointText:A}}}),MH=Ze({"src/traces/scatterpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:FT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Cx(),supplyDefaults:OT().supplyDefaults,colorbar:hp(),formatLabels:BT(),calc:AH(),plot:SH(),style:ed().style,styleOnSelect:ed().styleOnSelect,hoverPoints:NT().hoverPoints,selectPoints:c1(),meta:{}}}}),EH=Ze({"lib/scatterpolar.js"(Z,q){"use strict";q.exports=MH()}}),sC=Ze({"src/traces/scatterpolargl/attributes.js"(Z,q){"use strict";var d=Cx(),x=_x(),A=Cs().texttemplateAttrs;q.exports={mode:d.mode,r:d.r,theta:d.theta,r0:d.r0,dr:d.dr,theta0:d.theta0,dtheta:d.dtheta,thetaunit:d.thetaunit,text:d.text,texttemplate:A({editType:"plot"},{keys:["r","theta","text"]}),hovertext:d.hovertext,hovertemplate:d.hovertemplate,line:{color:x.line.color,width:x.line.width,dash:x.line.dash,editType:"calc"},connectgaps:x.connectgaps,marker:x.marker,fill:x.fill,fillcolor:x.fillcolor,textposition:x.textposition,textfont:x.textfont,hoverinfo:d.hoverinfo,selected:d.selected,unselected:d.unselected}}}),CH=Ze({"src/traces/scatterpolargl/defaults.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=OT().handleRThetaDefaults,M=md(),e=Dd(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=sC();q.exports=function(n,s,c,f){function g(T,l){return d.coerce(n,s,a,T,l)}var v=A(n,s,f,g);if(!v){s.visible=!1;return}g("thetaunit"),g("mode",v<o?"lines+markers":"lines"),g("text"),g("hovertext"),s.hoveron!=="fills"&&g("hovertemplate"),x.hasMarkers(s)&&M(n,s,c,f,g,{noAngleRef:!0,noStandOff:!0}),x.hasLines(s)&&(e(n,s,c,f,g),g("connectgaps")),x.hasText(s)&&(g("texttemplate"),t(n,s,f,g,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),g("fill"),s.fill!=="none"&&r(n,s,c,g),d.coerceSelectionMarkerOpacity(s,g)}}}),kH=Ze({"src/traces/scatterpolargl/format_labels.js"(Z,q){"use strict";var d=BT();q.exports=function(A,M,e){var t=A.i;return"r"in A||(A.r=M._r[t]),"theta"in A||(A.theta=M._theta[t]),d(A,M,e)}}}),LH=Ze({"src/traces/scatterpolargl/calc.js"(Z,q){"use strict";var d=Fd(),x=Bd().calcMarkerSize,A=gg(),M=Wo(),e=m0().TOO_MANY_POINTS;q.exports=function(r,o){var a=r._fullLayout,i=o.subplot,n=a[i].radialaxis,s=a[i].angularaxis,c=o._r=n.makeCalcdata(o,"r"),f=o._theta=s.makeCalcdata(o,"theta"),g=o._length,v={};g<c.length&&(c=c.slice(0,g)),g<f.length&&(f=f.slice(0,g)),v.r=c,v.theta=f,d(r,o);var T=v.opts=A.style(r,o),l;return g<e?l=x(o,g):T.marker&&(l=2*(T.marker.sizeAvg||Math.max(T.marker.size,3))),o._extremes.x=M.findExtremes(n,c,{ppad:l}),[{x:!1,y:!1,t:v,trace:o}]}}}),PH=Ze({"src/traces/scatterpolargl/hover.js"(Z,q){"use strict";var d=pT(),x=NT().makeHoverPointText;function A(M,e,t,r){var o=M.cd,a=o[0].t,i=a.r,n=a.theta,s=d.hoverPoints(M,e,t,r);if(!(!s||s[0].index===!1)){var c=s[0];if(c.index===void 0)return s;var f=M.subplot,g=c.cd[c.index],v=c.trace;if(g.r=i[c.index],g.theta=n[c.index],!!f.isPtInside(g))return c.xLabelVal=void 0,c.yLabelVal=void 0,x(g,v,f,c),s}}q.exports={hoverPoints:A}}}),IH=Ze({"src/traces/scatterpolargl/base_index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:FT(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:sC(),supplyDefaults:CH(),colorbar:hp(),formatLabels:kH(),calc:LH(),hoverPoints:PH().hoverPoints,selectPoints:qE(),meta:{}}}}),RH=Ze({"src/traces/scatterpolargl/plot.js"(Z,q){"use strict";var d=vT(),x=ns(),A=h6(),M=UE(),e=gg(),t=ca(),r=m0().TOO_MANY_POINTS,o={};q.exports=function(i,n,s){if(s.length){var c=n.radialAxis,f=n.angularAxis,g=M(i,n);return s.forEach(function(v){if(!(!v||!v[0]||!v[0].trace)){var T=v[0],l=T.trace,_=T.t,w=l._length,S=_.r,E=_.theta,y=_.opts,b,p=S.slice(),u=E.slice();for(b=0;b<S.length;b++)n.isPtInside({r:S[b],theta:E[b]})||(p[b]=NaN,u[b]=NaN);var m=new Array(w*2),h=Array(w),P=Array(w);for(b=0;b<w;b++){var L=p[b],z,F;if(x(L)){var B=c.c2g(L),O=f.c2g(u[b],l.thetaunit);z=B*Math.cos(O),F=B*Math.sin(O)}else z=F=NaN;h[b]=m[b*2]=z,P[b]=m[b*2+1]=F}_.tree=d(m),y.marker&&w>=r&&(y.marker.cluster=_.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=m),y.line&&m.length>1&&t.extendFlat(y.line,e.linePositions(i,l,m)),y.text&&(t.extendFlat(y.text,{positions:m},e.textPosition(i,l,y.text,y.marker)),t.extendFlat(y.textSel,{positions:m},e.textPosition(i,l,y.text,y.markerSel)),t.extendFlat(y.textUnsel,{positions:m},e.textPosition(i,l,y.text,y.markerUnsel))),y.fill&&!g.fill2d&&(g.fill2d=!0),y.marker&&!g.scatter2d&&(g.scatter2d=!0),y.line&&!g.line2d&&(g.line2d=!0),y.text&&!g.glText&&(g.glText=!0),g.lineOptions.push(y.line),g.fillOptions.push(y.fill),g.markerOptions.push(y.marker),g.markerSelectedOptions.push(y.markerSel),g.markerUnselectedOptions.push(y.markerUnsel),g.textOptions.push(y.text),g.textSelectedOptions.push(y.textSel),g.textUnselectedOptions.push(y.textUnsel),g.selectBatch.push([]),g.unselectBatch.push([]),_.x=h,_.y=P,_.rawx=h,_.rawy=P,_.r=S,_.theta=E,_.positions=m,_._scene=g,_.index=g.count,g.count++}}),A(i,n,s)}},q.exports.reglPrecompiled=o}}),DH=Ze({"src/traces/scatterpolargl/index.js"(Z,q){"use strict";var d=IH();d.plot=RH(),q.exports=d}}),zH=Ze({"lib/scatterpolargl.js"(Z,q){"use strict";q.exports=DH()}}),lC=Ze({"src/traces/barpolar/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=rs().extendFlat,A=Cx(),M=Sv();q.exports={r:A.r,theta:A.theta,r0:A.r0,dr:A.dr,theta0:A.theta0,dtheta:A.dtheta,thetaunit:A.thetaunit,base:x({},M.base,{}),offset:x({},M.offset,{}),width:x({},M.width,{}),text:x({},M.text,{}),hovertext:x({},M.hovertext,{}),marker:e(),hoverinfo:A.hoverinfo,hovertemplate:d(),selected:M.selected,unselected:M.unselected};function e(){var t=x({},M.marker);return delete t.cornerradius,t}}}),uC=Ze({"src/traces/barpolar/layout_attributes.js"(Z,q){"use strict";q.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),FH=Ze({"src/traces/barpolar/defaults.js"(Z,q){"use strict";var d=ca(),x=OT().handleRThetaDefaults,A=j2(),M=lC();q.exports=function(t,r,o,a){function i(s,c){return d.coerce(t,r,M,s,c)}var n=x(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),A(t,r,i,o,a),d.coerceSelectionMarkerOpacity(r,i)}}}),OH=Ze({"src/traces/barpolar/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=uC();q.exports=function(A,M,e){var t={},r;function o(n,s){return d.coerce(A[r]||{},M[r],x,n,s)}for(var a=0;a<e.length;a++){var i=e[a];i.type==="barpolar"&&i.visible===!0&&(r=i.subplot,t[r]||(o("barmode"),o("bargap"),t[r]=1))}}}}),cC=Ze({"src/traces/barpolar/calc.js"(Z,q){"use strict";var d=bp().hasColorscale,x=wp(),A=ca().isArrayOrTypedArray,M=O_(),e=$0().setGroupPositions,t=Od(),r=oo().traceIs,o=ca().extendFlat;function a(n,s){for(var c=n._fullLayout,f=s.subplot,g=c[f].radialaxis,v=c[f].angularaxis,T=g.makeCalcdata(s,"r"),l=v.makeCalcdata(s,"theta"),_=s._length,w=new Array(_),S=T,E=l,y=0;y<_;y++)w[y]={p:E[y],s:S[y]};function b(p){var u=s[p];u!==void 0&&(s["_"+p]=A(u)?v.makeCalcdata(s,p):v.d2c(u,s.thetaunit))}return v.type==="linear"&&(b("width"),b("offset")),d(s,"marker")&&x(n,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),d(s,"marker.line")&&x(n,s,{vals:s.marker.line.color,containerStr:"marker.line",cLetter:"c"}),M(w,s),t(w,s),w}function i(n,s,c){for(var f=n.calcdata,g=[],v=0;v<f.length;v++){var T=f[v],l=T[0].trace;l.visible===!0&&r(l,"bar")&&l.subplot===c&&g.push(T)}var _=o({},s.radialaxis,{_id:"x"}),w=s.angularaxis;e(n,w,_,g,{mode:s.barmode,norm:s.barnorm,gap:s.bargap,groupgap:s.bargroupgap})}q.exports={calc:a,crossTraceCalc:i}}}),BH=Ze({"src/traces/barpolar/plot.js"(Z,q){"use strict";var d=On(),x=ns(),A=ca(),M=as(),e=zT();q.exports=function(o,a,i){var n=o._context.staticPlot,s=a.xaxis,c=a.yaxis,f=a.radialAxis,g=a.angularAxis,v=t(a),T=a.layers.frontplot.select("g.barlayer");A.makeTraceGroups(T,i,"trace bars").each(function(){var l=d.select(this),_=A.ensureSingle(l,"g","points"),w=_.selectAll("g.point").data(A.identity);w.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),w.exit().remove(),w.each(function(S){var E=d.select(this),y=S.rp0=f.c2p(S.s0),b=S.rp1=f.c2p(S.s1),p=S.thetag0=g.c2g(S.p0),u=S.thetag1=g.c2g(S.p1),m;if(!x(y)||!x(b)||!x(p)||!x(u)||y===b||p===u)m="M0,0Z";else{var h=f.c2g(S.s1),P=(p+u)/2;S.ct=[s.c2p(h*Math.cos(P)),c.c2p(h*Math.sin(P))],m=v(y,b,p,u)}A.ensureSingle(E,"path").attr("d",m)}),M.setClipUrl(l,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,o)})};function t(r){var o=r.cxx,a=r.cyy;return r.vangles?function(i,n,s,c){var f,g;A.angleDelta(s,c)>0?(f=s,g=c):(f=c,g=s);var v=e.findEnclosingVertexAngles(f,r.vangles)[0],T=e.findEnclosingVertexAngles(g,r.vangles)[1],l=[v,(f+g)/2,T];return e.pathPolygonAnnulus(i,n,f,g,l,o,a)}:function(i,n,s,c){return A.pathAnnulus(i,n,s,c,o,a)}}}}),NH=Ze({"src/traces/barpolar/hover.js"(Z,q){"use strict";var d=ef(),x=ca(),A=f1().getTraceColor,M=x.fillText,e=NT().makeHoverPointText,t=zT().isPtInsidePolygon;q.exports=function(o,a,i){var n=o.cd,s=n[0].trace,c=o.subplot,f=c.radialAxis,g=c.angularAxis,v=c.vangles,T=v?t:x.isPtInsideSector,l=o.maxHoverDistance,_=g._period||2*Math.PI,w=Math.abs(f.g2p(Math.sqrt(a*a+i*i))),S=Math.atan2(i,a);f.range[0]>f.range[1]&&(S+=Math.PI);var E=function(u){return T(w,S,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/_)-1+(u.rp1-w)/(u.rp1-u.rp0)-1:1/0};if(d.getClosest(n,E,o),o.index!==!1){var y=o.index,b=n[y];o.x0=o.x1=b.ct[0],o.y0=o.y1=b.ct[1];var p=x.extendFlat({},b,{r:b.s,theta:b.p});return M(b,s,o),e(p,s,c,o),o.hovertemplate=s.hovertemplate,o.color=A(s,b),o.xLabelVal=o.yLabelVal=void 0,b.s<0&&(o.idealAlign="left"),[o]}}}}),UH=Ze({"src/traces/barpolar/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"barpolar",basePlotModule:FT(),categories:["polar","bar","showLegend"],attributes:lC(),layoutAttributes:uC(),supplyDefaults:FH(),supplyLayoutDefaults:OH(),calc:cC().calc,crossTraceCalc:cC().crossTraceCalc,plot:BH(),colorbar:hp(),formatLabels:BT(),style:Nd().style,styleOnSelect:Nd().styleOnSelect,hoverPoints:NH(),selectPoints:h1(),meta:{}}}}),jH=Ze({"lib/barpolar.js"(Z,q){"use strict";q.exports=UH()}}),fC=Ze({"src/plots/smith/constants.js"(Z,q){"use strict";q.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),hC=Ze({"src/plots/smith/layout_attributes.js"(Z,q){"use strict";var d=oh(),x=Wh(),A=bc().attributes,M=ca().extendFlat,e=pc().overrideAll,t=e({color:x.color,showline:M({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:M({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),r=e({ticklen:x.ticklen,tickwidth:M({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),o=M({visible:M({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:M({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=M({visible:M({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},t,r);q.exports={domain:A({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:d.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),qH=Ze({"src/plots/smith/layout_defaults.js"(Z,q){"use strict";var d=ca(),x=Yn(),A=Dl(),M=i0(),e=Hh().getSubplotData,t=Qm(),r=$m(),o=D_(),a=wv(),i=hC(),n=fC(),s=n.axisNames,c=g(function(v){return d.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(T){return-T}).concat([0]).concat(v)},String);function f(v,T,l,_){var w=l("bgcolor");_.bgColor=x.combine(w,_.paper_bgcolor);var S=e(_.fullData,n.name,_.id),E=_.layoutOut,y;function b(U,W){return l(y+"."+U,W)}for(var p=0;p<s.length;p++){y=s[p],d.isPlainObject(v[y])||(v[y]={});var u=v[y],m=A.newContainer(T,y);m._id=m._name=y,m._attr=_.id+"."+y,m._traceIndices=S.map(function(U){return U.index});var h=b("visible");if(m.type="linear",a(m,E),t(u,m,b,m.type),h){var P=y==="realaxis";if(P&&b("side"),P)b("tickvals");else{var L=c(T.realaxis.tickvals||i.realaxis.tickvals.dflt);b("tickvals",L)}d.isTypedArray(m.tickvals)&&(m.tickvals=Array.from(m.tickvals));var z,F,B,O,I=_.font||{};h&&(z=b("color"),F=z===u.color?z:I.color,B=I.size,O=I.family),r(u,m,b,m.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!P,noExp:!0,font:{color:F,size:B,family:O}}),d.coerce2(v,T,i,y+".ticklen"),d.coerce2(v,T,i,y+".tickwidth"),d.coerce2(v,T,i,y+".tickcolor",T.color);var N=b("ticks");N||(delete T[y].ticklen,delete T[y].tickwidth,delete T[y].tickcolor),o(u,m,b,{dfltColor:z,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i[y]}),b("layer")}b("hoverformat"),delete m.type,m._input=u}}q.exports=function(T,l,_){M(T,l,_,{noUirevision:!0,type:n.name,attributes:i,handleDefaults:f,font:l.font,paper_bgcolor:l.paper_bgcolor,fullData:_,layoutOut:l})};function g(v,T){var l={};return function(_){var w=T?T(_):_;if(w in l)return l[w];var S=v(_);return l[w]=S,S}}}}),VH=Ze({"src/plots/smith/index.js"(Z,q){"use strict";var d=Hh().getSubplotCalcData,x=ca().counterRegex,A=nC(),M=fC(),e=M.attr,t=M.name,r=x(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(n){for(var s=n._fullLayout,c=n.calcdata,f=s._subplots[t],g=0;g<f.length;g++){var v=f[g],T=d(c,t,v),l=s[v]._subplot;l||(l=A(n,v,!0),s[v]._subplot=l),l.plot(T,s,n._promises)}}function i(n,s,c,f){for(var g=f._subplots[t]||[],v=0;v<g.length;v++){var T=g[v],l=f[T]._subplot;if(!s[T]&&l){l.framework.remove();for(var _ in l.clipPaths)l.clipPaths[_].remove()}}}q.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:hC(),supplyLayoutDefaults:qH(),plot:a,clean:i,toSVG:Zf().toSVG}}}),pC=Ze({"src/traces/scattersmith/attributes.js"(Z,q){"use strict";var d=Cs().hovertemplateAttrs,x=Cs().texttemplateAttrs,A=rs().extendFlat,M=$d(),e=tf(),t=eu(),r=e.line;q.exports={mode:e.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:e.text,texttemplate:x({editType:"plot"},{keys:["real","imag","text"]}),hovertext:e.hovertext,line:{color:r.color,width:r.width,dash:r.dash,backoff:r.backoff,shape:A({},r.shape,{values:["linear","spline"]}),smoothing:r.smoothing,editType:"calc"},connectgaps:e.connectgaps,marker:e.marker,cliponaxis:A({},e.cliponaxis,{dflt:!1}),textposition:e.textposition,textfont:e.textfont,fill:A({},e.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:M(),hoverinfo:A({},t.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:e.hoveron,hovertemplate:d(),selected:e.selected,unselected:e.unselected}}}),GH=Ze({"src/traces/scattersmith/defaults.js"(Z,q){"use strict";var d=ca(),x=Fu(),A=md(),M=Dd(),e=o1(),t=zd(),r=ev(),o=Tv().PTS_LINESONLY,a=pC();q.exports=function(s,c,f,g){function v(_,w){return d.coerce(s,c,a,_,w)}var T=i(s,c,g,v);if(!T){c.visible=!1;return}v("mode",T<o?"lines+markers":"lines"),v("text"),v("hovertext"),c.hoveron!=="fills"&&v("hovertemplate"),x.hasMarkers(c)&&A(s,c,f,g,v,{gradient:!0}),x.hasLines(c)&&(M(s,c,f,g,v,{backoff:!0}),e(s,c,v),v("connectgaps")),x.hasText(c)&&(v("texttemplate"),t(s,c,g,v));var l=[];(x.hasMarkers(c)||x.hasText(c))&&(v("cliponaxis"),v("marker.maxdisplayed"),l.push("points")),v("fill"),c.fill!=="none"&&(r(s,c,f,v),x.hasLines(c)||e(s,c,v)),(c.fill==="tonext"||c.fill==="toself")&&l.push("fills"),v("hoveron",l.join("+")||"points"),d.coerceSelectionMarkerOpacity(c,v)};function i(n,s,c,f){var g=f("real"),v=f("imag"),T;return g&&v&&(T=Math.min(g.length,v.length)),d.isTypedArray(g)&&(s.real=g=Array.from(g)),d.isTypedArray(v)&&(s.imag=v=Array.from(v)),s._length=T,T}}}),HH=Ze({"src/traces/scattersmith/format_labels.js"(Z,q){"use strict";var d=Wo();q.exports=function(A,M,e){var t={},r=e[M.subplot]._subplot;return t.realLabel=d.tickText(r.radialAxis,A.real,!0).text,t.imagLabel=d.tickText(r.angularAxis,A.imag,!0).text,t}}}),WH=Ze({"src/traces/scattersmith/calc.js"(Z,q){"use strict";var d=ns(),x=qs().BADNUM,A=Fd(),M=Av(),e=Od(),t=Bd().calcMarkerSize;q.exports=function(o,a){for(var i=o._fullLayout,n=a.subplot,s=i[n].realaxis,c=i[n].imaginaryaxis,f=s.makeCalcdata(a,"real"),g=c.makeCalcdata(a,"imag"),v=a._length,T=new Array(v),l=0;l<v;l++){var _=f[l],w=g[l],S=T[l]={};d(_)&&d(w)?(S.real=_,S.imag=w):S.real=x}return t(a,v),A(o,a),M(T,a),e(T,a),T}}}),XH=Ze({"src/traces/scattersmith/plot.js"(Z,q){"use strict";var d=s1(),x=qs().BADNUM,A=iC(),M=A.smith;q.exports=function(t,r,o){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,n=r.yaxis,s={xaxis:i,yaxis:n,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},c=0;c<o.length;c++)for(var f=o[c],g=0;g<f.length;g++){g===0&&(f[0].trace._xA=i,f[0].trace._yA=n);var v=f[g],T=v.real;if(T===x)v.x=v.y=x;else{var l=M([T,v.imag]);v.x=l[0],v.y=l[1]}}d(t,s,o,a)}}}),ZH=Ze({"src/traces/scattersmith/hover.js"(Z,q){"use strict";var d=u1();function x(M,e,t,r){var o=d(M,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var i=M.subplot,n=a.cd[a.index],s=a.trace;if(i.isPtInside(n))return a.xLabelVal=void 0,a.yLabelVal=void 0,A(n,s,i,a),a.hovertemplate=s.hovertemplate,o}}function A(M,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="real",a._hovertitle="imag";var i={};i[e.subplot]={_subplot:t};var n=e._module.formatLabels(M,e,i);r.realLabel=n.realLabel,r.imagLabel=n.imagLabel;var s=M.hi||e.hoverinfo,c=[];function f(v,T){c.push(v._hovertitle+": "+T)}if(!e.hovertemplate){var g=s.split("+");g.indexOf("all")!==-1&&(g=["real","imag","text"]),g.indexOf("real")!==-1&&f(o,r.realLabel),g.indexOf("imag")!==-1&&f(a,r.imagLabel),g.indexOf("text")!==-1&&r.text&&(c.push(r.text),delete r.text),r.extraText=c.join("<br>")}}q.exports={hoverPoints:x,makeHoverPointText:A}}}),YH=Ze({"src/traces/scattersmith/index.js"(Z,q){"use strict";q.exports={moduleType:"trace",name:"scattersmith",basePlotModule:VH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:pC(),supplyDefaults:GH(),colorbar:hp(),formatLabels:HH(),calc:WH(),plot:XH(),style:ed().style,styleOnSelect:ed().styleOnSelect,hoverPoints:ZH().hoverPoints,selectPoints:c1(),meta:{}}}}),KH=Ze({"lib/scattersmith.js"(Z,q){"use strict";q.exports=YH()}}),Sp=Ze({"node_modules/world-calendars/dist/main.js"(Z,q){var d=sh();function x(){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={}}d(x.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var i=this._localCals[o+"-"+a];if(!i&&this.calendars[o]&&(i=new this.calendars[o](a),this._localCals[o+"-"+a]=i),!i)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return i},newDate:function(o,a,i,n,s){return n=(o!=null&&o.year?o.calendar():typeof n=="string"?this.instance(n,s):n)||this.instance(),n.newDate(o,a,i)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(i){return o[i]})}},substituteChineseDigits:function(o,a){return function(i){for(var n="",s=0;i>0;){var c=i%10;n=(c===0?"":o[c]+a[s])+n,s++,i=Math.floor(i/10)}return n.indexOf(o[1]+a[1])===0&&(n=n.substr(1)),n||o[0]}}});function A(o,a,i,n){if(this._calendar=o,this._year=a,this._month=i,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function M(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}d(A.prototype,{newDate:function(o,a,i){return this._calendar.newDate(o??this,a,i)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,i){if(!this._calendar.isValid(o,a,i))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=i,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(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+M(Math.abs(this.year()),4)+"-"+M(this.month(),2)+"-"+M(this.day(),2)}});function e(){this.shortYearCutoff="+10"}d(e.prototype,{_validateLevel:0,newDate:function(o,a,i){return o==null?this.today():(o.year&&(this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),i=o.day(),a=o.month(),o=o.year()),new A(this,o,a,i))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+M(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(i.month()+this.monthsInYear(i)-this.firstMonth)%this.monthsInYear(i)+this.minMonth},fromMonthOfYear:function(o,a){var i=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,i,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),i},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.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(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(o,a,i){return this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,i){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,i),a,i)},_add:function(o,a,i){if(this._validateLevel++,i==="d"||i==="w"){var n=o.toJD()+a*(i==="w"?this.daysInWeek():1),s=o.calendar().fromJD(n);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=o.year()+(i==="y"?a:0),f=o.monthOfYear()+(i==="m"?a:0),s=o.day(),g=function(l){for(;f<l.minMonth;)c--,f+=l.monthsInYear(c);for(var _=l.monthsInYear(c);f>_-1+l.minMonth;)c++,f-=_,_=l.monthsInYear(c)};i==="y"?(o.month()!==this.fromMonthOfYear(c,f)&&(f=this.newDate(c,o.month(),this.minDay).monthOfYear()),f=Math.min(f,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,f)))):i==="m"&&(g(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,f))));var v=[c,this.fromMonthOfYear(c,f),s];return this._validateLevel--,v}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,i,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],c=i<0?-1:1;a=this._add(o,i*s[0]+c*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,i){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var n=i==="y"?a:o.year(),s=i==="m"?a:o.month(),c=i==="d"?a:o.day();return(i==="y"||i==="m")&&(c=Math.min(c,this.daysInMonth(n,s))),o.date(n,s,c)},isValid:function(o,a,i){this._validateLevel++;var n=this.hasYearZero||o!==0;if(n){var s=this.newDate(o,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth<this.monthsInYear(s)&&i>=this.minDay&&i-this.minDay<this.daysInMonth(s)}return this._validateLevel--,n},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return r.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(o){return this.fromJD(r.instance().fromJSDate(o).toJD())},_validate:function(o,a,i,n){if(o.year){if(this._validateLevel===0&&this.name!==o.calendar().name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,o.calendar().local.name);return o}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(o,a,i))throw n.replace(/\{0\}/,this.local.name);var s=this.newDate(o,a,i);return this._validateLevel--,s}catch(c){throw this._validateLevel--,c}}});function t(o){this.local=this.regionalOptions[o]||this.regionalOptions[""]}t.prototype=new e,d(t.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(i){var a=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),i=a.year()+(a.year()<0?1:0);return i%4===0&&(i%100!==0||i%400===0)},weekOfYear:function(o,a,i){var n=this.newDate(o,a,i);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(o,a){var i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return this.daysPerMonth[i.month()-1]+(i.month()===2&&this.leapYear(i.year())?1:0)},weekDay:function(o,a,i){return(this.dayOfWeek(o,a,i)||7)<6},toJD:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);o=n.year(),a=n.month(),i=n.day(),o<0&&o++,a<3&&(a+=12,o--);var s=Math.floor(o/100),c=2-s+Math.floor(s/4);return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(a+1))+i+c-1524.5},fromJD:function(o){var a=Math.floor(o+.5),i=Math.floor((a-186721625e-2)/36524.25);i=a+1+i-Math.floor(i/4);var n=i+1524,s=Math.floor((n-122.1)/365.25),c=Math.floor(365.25*s),f=Math.floor((n-c)/30.6001),g=n-c-Math.floor(f*30.6001),v=f-(f>13.5?13:1),T=s-(v>2.5?4716:4715);return T<=0&&T--,this.newDate(T,v,g)},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(n.year(),n.month()-1,n.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=q.exports=new x;r.cdate=A,r.baseCalendar=e,r.calendars.gregorian=t}}),JH=Ze({"node_modules/world-calendars/dist/plus.js"(){var Z=sh(),q=Sp();Z(q.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"}),q.local=q.regionalOptions[""],Z(q.cdate.prototype,{formatDate:function(d,x){return typeof d!="string"&&(x=d,d=""),this._calendar.formatDate(d||"",this,x)}}),Z(q.baseCalendar.prototype,{UNIX_EPOCH:q.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:q.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(d,x,A){if(typeof d!="string"&&(A=x,x=d,d=""),!x)return"";if(x.calendar()!==this)throw q.local.invalidFormat||q.regionalOptions[""].invalidFormat;d=d||this.local.dateFormat,A=A||{};for(var M=A.dayNamesShort||this.local.dayNamesShort,e=A.dayNames||this.local.dayNames,t=A.monthNumbers||this.local.monthNumbers,r=A.monthNamesShort||this.local.monthNamesShort,o=A.monthNames||this.local.monthNames,a=A.calculateWeek||this.local.calculateWeek,i=function(S,E){for(var y=1;w+y<d.length&&d.charAt(w+y)===S;)y++;return w+=y-1,Math.floor(y/(E||1))>1},n=function(S,E,y,b){var p=""+E;if(i(S,b))for(;p.length<y;)p="0"+p;return p},s=function(S,E,y,b){return i(S)?b[E]:y[E]},c=this,f=function(S){return typeof t=="function"?t.call(c,S,i("m")):T(n("m",S.month(),2))},g=function(S,E){return E?typeof o=="function"?o.call(c,S):o[S.month()-c.minMonth]:typeof r=="function"?r.call(c,S):r[S.month()-c.minMonth]},v=this.local.digits,T=function(S){return A.localNumbers&&v?v(S):S},l="",_=!1,w=0;w<d.length;w++)if(_)d.charAt(w)==="'"&&!i("'")?_=!1:l+=d.charAt(w);else switch(d.charAt(w)){case"d":l+=T(n("d",x.day(),2));break;case"D":l+=s("D",x.dayOfWeek(),M,e);break;case"o":l+=n("o",x.dayOfYear(),3);break;case"w":l+=n("w",x.weekOfYear(),2);break;case"m":l+=f(x);break;case"M":l+=g(x,i("M"));break;case"y":l+=i("y",2)?x.year():(x.year()%100<10?"0":"")+x.year()%100;break;case"Y":i("Y",2),l+=x.formatYear();break;case"J":l+=x.toJD();break;case"@":l+=(x.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":l+=(x.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":i("'")?l+="'":_=!0;break;default:l+=d.charAt(w)}return l},parseDate:function(d,x,A){if(x==null)throw q.local.invalidArguments||q.regionalOptions[""].invalidArguments;if(x=typeof x=="object"?x.toString():x+"",x==="")return null;d=d||this.local.dateFormat,A=A||{};var M=A.shortYearCutoff||this.shortYearCutoff;M=typeof M!="string"?M:this.today().year()%100+parseInt(M,10);for(var e=A.dayNamesShort||this.local.dayNamesShort,t=A.dayNames||this.local.dayNames,r=A.parseMonth||this.local.parseMonth,o=A.monthNumbers||this.local.monthNumbers,a=A.monthNamesShort||this.local.monthNamesShort,i=A.monthNames||this.local.monthNames,n=-1,s=-1,c=-1,f=-1,g=-1,v=!1,T=!1,l=function(P,L){for(var z=1;u+z<d.length&&d.charAt(u+z)===P;)z++;return u+=z-1,Math.floor(z/(L||1))>1},_=function(P,L){var z=l(P,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(P)+1],B=new RegExp("^-?\\d{1,"+F+"}"),O=x.substring(p).match(B);if(!O)throw(q.local.missingNumberAt||q.regionalOptions[""].missingNumberAt).replace(/\{0\}/,p);return p+=O[0].length,parseInt(O[0],10)},w=this,S=function(){if(typeof o=="function"){l("m");var P=o.call(w,x.substring(p));return p+=P.length,P}return _("m")},E=function(P,L,z,F){for(var B=l(P,F)?z:L,O=0;O<B.length;O++)if(x.substr(p,B[O].length).toLowerCase()===B[O].toLowerCase())return p+=B[O].length,O+w.minMonth;throw(q.local.unknownNameAt||q.regionalOptions[""].unknownNameAt).replace(/\{0\}/,p)},y=function(){if(typeof i=="function"){var P=l("M")?i.call(w,x.substring(p)):a.call(w,x.substring(p));return p+=P.length,P}return E("M",a,i)},b=function(){if(x.charAt(p)!==d.charAt(u))throw(q.local.unexpectedLiteralAt||q.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,p);p++},p=0,u=0;u<d.length;u++)if(T)d.charAt(u)==="'"&&!l("'")?T=!1:b();else switch(d.charAt(u)){case"d":f=_("d");break;case"D":E("D",e,t);break;case"o":g=_("o");break;case"w":_("w");break;case"m":c=S();break;case"M":c=y();break;case"y":var m=u;v=!l("y",2),u=m,s=_("y",2);break;case"Y":s=_("Y",2);break;case"J":n=_("J")+.5,x.charAt(p)==="."&&(p++,_("J"));break;case"@":n=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":n=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":p=x.length;break;case"'":l("'")?b():T=!0;break;default:b()}if(p<x.length)throw q.local.unexpectedText||q.regionalOptions[""].unexpectedText;if(s===-1?s=this.today().year():s<100&&v&&(s+=M===-1?1900:this.today().year()-this.today().year()%100-(s<=M?0:100)),typeof c=="string"&&(c=r.call(this,s,c)),g>-1){c=1,f=g;for(var h=this.daysInMonth(s,c);f>h;h=this.daysInMonth(s,c))c++,f-=h}return n>-1?this.fromJD(n):this.newDate(s,c,f)},determineDate:function(d,x,A,M,e){A&&typeof A!="object"&&(e=M,M=A,A=null),typeof M!="string"&&(e=M,M="");var t=this,r=function(o){try{return t.parseDate(M,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&A?A.newDate():null)||t.today(),i=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,n=i.exec(o);n;)a.add(parseInt(n[1],10),n[2]||"d"),n=i.exec(o);return a};return x=x?x.newDate():null,d=d==null?x:typeof d=="string"?r(d):typeof d=="number"?isNaN(d)||d===1/0||d===-1/0?x:t.today().add(d,"d"):t.newDate(d),d}})}}),$H=Ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Z=Sp(),q=sh(),d=Z.instance();function x(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,q(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,s){if(typeof n=="string"){var c=n.match(M);return c?c[0]:""}var f=this._validateYear(n),g=n.month(),v=""+this.toChineseMonth(f,g);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(f,g)&&(v+="i"),v},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var c=this._validateYear(n),f=n.month(),g=this.toChineseMonth(c,f),v=["\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"][g-1];return this.isIntercalaryMonth(c,f)&&(v="\u95F0"+v),v},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var c=this._validateYear(n),f=n.month(),g=this.toChineseMonth(c,f),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][g-1];return this.isIntercalaryMonth(c,f)&&(v="\u95F0"+v),v},parseMonth:function(n,s){n=this._validateYear(n);var c=parseInt(s),f;if(isNaN(c))s[0]==="\u95F0"&&(f=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var g=s[s.length-1];f=g==="i"||g==="I"}var v=this.toMonthIndex(n,c,f);return v},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(n,s){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw s.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,s,c){var f=this.intercalaryMonth(n),g=c&&s!==f;if(g||s<1||s>12)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return f?!c&&s<=f?v=s-1:v=s:v=s-1,v},toChineseMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var c=this.intercalaryMonth(n),f=c?12:11;if(s<0||s>f)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var g;return c?s<c?g=s+1:g=s:g=s+1,g},intercalaryMonth:function(n){n=this._validateYear(n);var s=r[n-r[0]],c=s>>13;return c},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var c=this.intercalaryMonth(n);return!!c&&c===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,c){var f=this._validateYear(n,Z.local.invalidyear),g=o[f-o[0]],v=g>>9&4095,T=g>>5&15,l=g&31,_;_=d.newDate(v,T,l),_.add(4-(_.dayOfWeek()||7),"d");var w=this.toJD(n,s,c)-_.toJD();return 1+Math.floor(w/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,s){n.year&&(s=n.month(),n=n.year()),n=this._validateYear(n);var c=r[n-r[0]],f=c>>13,g=f?12:11;if(s>g)throw Z.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(n,s,c){return(this.dayOfWeek(n,s,c)||7)<6},toJD:function(n,s,c){var f=this._validate(n,v,c,Z.local.invalidDate);n=this._validateYear(f.year()),s=f.month(),c=f.day();var g=this.isIntercalaryMonth(n,s),v=this.toChineseMonth(n,s),T=i(n,v,c,g);return d.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=d.fromJD(n),c=a(s.year(),s.month(),s.day()),f=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,f,c.day)},fromString:function(n){var s=n.match(A),c=this._validateYear(+s[1]),f=+s[2],g=!!s[3],v=this.toMonthIndex(c,f,g),T=+s[4];return this.newDate(c,v,T)},add:function(n,s,c){var f=n.year(),g=n.month(),v=this.isIntercalaryMonth(f,g),T=this.toChineseMonth(f,g),l=Object.getPrototypeOf(x.prototype).add.call(this,n,s,c);if(c==="y"){var _=l.year(),w=l.month(),S=this.isIntercalaryMonth(_,T),E=v&&S?this.toMonthIndex(_,T,!0):this.toMonthIndex(_,T,!1);E!==w&&l.month(E)}return l}});var A=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,M=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Z.calendars.chinese=x;var r=[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],o=[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 a(n,s,c,f){var g,v;if(typeof n=="object")g=n,v=s||{};else{var T=typeof n=="number"&&n>=1888&&n<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var _=typeof c=="number"&&c>=1&&c<=31;if(!_)throw new Error("Solar day outside range 1 - 31");g={year:n,month:s,day:c},v=f||{}}var w=o[g.year-o[0]],S=g.year<<9|g.month<<5|g.day;v.year=S>=w?g.year:g.year-1,w=o[v.year-o[0]];var E=w>>9&4095,y=w>>5&15,b=w&31,p,u=new Date(E,y-1,b),m=new Date(g.year,g.month-1,g.day);p=Math.round((m-u)/(24*3600*1e3));var h=r[v.year-r[0]],P;for(P=0;P<13;P++){var L=h&1<<12-P?30:29;if(p<L)break;p-=L}var z=h>>13;return!z||P<z?(v.isIntercalary=!1,v.month=1+P):P===z?(v.isIntercalary=!0,v.month=P):(v.isIntercalary=!1,v.month=P),v.day=1+p,v}function i(n,s,c,f,g){var v,T;if(typeof n=="object")T=n,v=s||{};else{var l=typeof n=="number"&&n>=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var _=typeof s=="number"&&s>=1&&s<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=30;if(!w)throw new Error("Lunar day outside range 1 - 30");var S;typeof f=="object"?(S=!1,v=f):(S=!!f,v=g||{}),T={year:n,month:s,day:c,isIntercalary:S}}var E;E=T.day-1;var y=r[T.year-r[0]],b=y>>13,p;b&&(T.month>b||T.isIntercalary)?p=T.month:p=T.month-1;for(var u=0;u<p;u++){var m=y&1<<12-u?30:29;E+=m}var h=o[T.year-o[0]],P=h>>9&4095,L=h>>5&15,z=h&31,F=new Date(P,L-1,z+E);return v.year=F.getFullYear(),v.month=1+F.getMonth(),v.day=F.getDate(),v}}}),QH=Ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Z=Sp(),q=sh();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(M){var A=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=A.year()+(A.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,A,M){var e=this.newDate(x,A,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,A){var M=this._validate(x,A,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(x,A,M){return(this.dayOfWeek(x,A,M)||7)<6},toJD:function(x,A,M){var e=this._validate(x,A,M,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var A=Math.floor(x)+.5-this.jdEpoch,M=Math.floor((A-Math.floor((A+366)/1461))/365)+1;M<=0&&M--,A=Math.floor(x)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(A/30)+1,t=A-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.coptic=d}}),eW=Ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Z=Sp(),q=sh();function d(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(A){return this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear),!1},monthsInYear:function(A){return this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear),13},daysInYear:function(A){return this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear),400},weekOfYear:function(A,M,e){var t=this.newDate(A,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(A,M){var e=this._validate(A,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate);return(t.day()+1)%8},weekDay:function(A,M,e){var t=this.dayOfWeek(A,M,e);return t>=2&&t<=6},extraInfo:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate);return{century:x[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate);return A=t.year()+(t.year()<0?1:0),M=t.month(),e=t.day(),e+(M>1?16:0)+(M>2?(M-2)*32:0)+(A-1)*400+this.jdEpoch-1},fromJD:function(A){A=Math.floor(A+.5)-Math.floor(this.jdEpoch)-1;var M=Math.floor(A/400)+1;A-=(M-1)*400,A+=A>15?16:0;var e=Math.floor(A/32)+1,t=A-(e-1)*32+1;return this.newDate(M<=0?M-1:M,e,t)}});var x={20:"Fruitbat",21:"Anchovy"};Z.calendars.discworld=d}}),tW=Ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Z=Sp(),q=sh();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(M){var A=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=A.year()+(A.year()<0?1:0);return M%4===3||M%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear),13},weekOfYear:function(x,A,M){var e=this.newDate(x,A,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,A){var M=this._validate(x,A,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===13&&this.leapYear(M.year())?1:0)},weekDay:function(x,A,M){return(this.dayOfWeek(x,A,M)||7)<6},toJD:function(x,A,M){var e=this._validate(x,A,M,Z.local.invalidDate);return x=e.year(),x<0&&x++,e.day()+(e.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var A=Math.floor(x)+.5-this.jdEpoch,M=Math.floor((A-Math.floor((A+366)/1461))/365)+1;M<=0&&M--,A=Math.floor(x)+.5-this.newDate(M,1,1).toJD();var e=Math.floor(A/30)+1,t=A-(e-1)*30+1;return this.newDate(M,e,t)}}),Z.calendars.ethiopian=d}}),rW=Ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Z=Sp(),q=sh();function d(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(A){var M=this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear);return this._leapYear(M.year())},_leapYear:function(A){return A=A<0?A+1:A,x(A*7+1,19)<7},monthsInYear:function(A){return this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear),this._leapYear(A.year?A.year():A)?13:12},weekOfYear:function(A,M,e){var t=this.newDate(A,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(A){var M=this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear);return A=M.year(),this.toJD(A===-1?1:A+1,7,1)-this.toJD(A,7,1)},daysInMonth:function(A,M){return A.year&&(M=A.month(),A=A.year()),this._validate(A,M,this.minDay,Z.local.invalidMonth),M===12&&this.leapYear(A)||M===8&&x(this.daysInYear(A),10)===5?30:M===9&&x(this.daysInYear(A),10)===3?29:this.daysPerMonth[M-1]},weekDay:function(A,M,e){return this.dayOfWeek(A,M,e)!==6},extraInfo:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate);A=t.year(),M=t.month(),e=t.day();var r=A<=0?A+1:A,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(M<7){for(var a=7;a<=this.monthsInYear(A);a++)o+=this.daysInMonth(A,a);for(var a=1;a<M;a++)o+=this.daysInMonth(A,a)}else for(var a=7;a<M;a++)o+=this.daysInMonth(A,a);return o},_delay1:function(A){var M=Math.floor((235*A-234)/19),e=12084+13753*M,t=M*29+Math.floor(e/25920);return x(3*(t+1),7)<3&&t++,t},_delay2:function(A){var M=this._delay1(A-1),e=this._delay1(A),t=this._delay1(A+1);return t-e===356?2:e-M===382?1:0},fromJD:function(A){A=Math.floor(A)+.5;for(var M=Math.floor((A-this.jdEpoch)*98496/35975351)-1;A>=this.toJD(M===-1?1:M+1,7,1);)M++;for(var e=A<this.toJD(M,1,1)?7:1;A>this.toJD(M,e,this.daysInMonth(M,e));)e++;var t=A-this.toJD(M,e,1)+1;return this.newDate(M,e,t)}});function x(A,M){return A-M*Math.floor(A/M)}Z.calendars.hebrew=d}}),aW=Ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Z=Sp(),q=sh();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(x){var A=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);return(A.year()*11+14)%30<11},weekOfYear:function(x,A,M){var e=this.newDate(x,A,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,A){var M=this._validate(x,A,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===12&&this.leapYear(M.year())?1:0)},weekDay:function(x,A,M){return this.dayOfWeek(x,A,M)!==5},toJD:function(x,A,M){var e=this._validate(x,A,M,Z.local.invalidDate);return x=e.year(),A=e.month(),M=e.day(),x=x<=0?x+1:x,M+Math.ceil(29.5*(A-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var A=Math.floor((30*(x-this.jdEpoch)+10646)/10631);A=A<=0?A-1:A;var M=Math.min(12,Math.ceil((x-29-this.toJD(A,1,1))/29.5)+1),e=x-this.toJD(A,M,1)+1;return this.newDate(A,M,e)}}),Z.calendars.islamic=d}}),iW=Ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var Z=Sp(),q=sh();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(M){var A=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),M=A.year()<0?A.year()+1:A.year();return M%4===0},weekOfYear:function(x,A,M){var e=this.newDate(x,A,M);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(x,A){var M=this._validate(x,A,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[M.month()-1]+(M.month()===2&&this.leapYear(M.year())?1:0)},weekDay:function(x,A,M){return(this.dayOfWeek(x,A,M)||7)<6},toJD:function(x,A,M){var e=this._validate(x,A,M,Z.local.invalidDate);return x=e.year(),A=e.month(),M=e.day(),x<0&&x++,A<=2&&(x--,A+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(A+1))+M-1524.5},fromJD:function(x){var A=Math.floor(x+.5),M=A+1524,e=Math.floor((M-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((M-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),i=M-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,i)}}),Z.calendars.julian=d}}),nW=Ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Z=Sp(),q=sh();function d(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),!1},formatYear:function(M){var e=this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear);M=e.year();var t=Math.floor(M/400);M=M%400,M+=M<0?400:0;var r=Math.floor(M/20);return t+"."+r+"."+M%20},forYear:function(M){if(M=M.split("."),M.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t<M.length;t++){var r=parseInt(M[t],10);if(Math.abs(r)>19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),18},weekOfYear:function(M,e,t){return this._validate(M,e,t,Z.local.invalidDate),0},daysInYear:function(M){return this._validate(M,this.minMonth,this.minDay,Z.local.invalidYear),360},daysInMonth:function(M,e){return this._validate(M,e,this.minDay,Z.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate);return r.day()},weekDay:function(M,e,t){return this._validate(M,e,t,Z.local.invalidDate),!0},extraInfo:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate),o=r.toJD(),a=this._toHaab(o),i=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(M){M-=this.jdEpoch;var e=x(M+8+17*20,365);return[Math.floor(e/20)+1,x(e,20)]},_toTzolkin:function(M){return M-=this.jdEpoch,[A(M+20,20),A(M+4,13)]},toJD:function(M,e,t){var r=this._validate(M,e,t,Z.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(M){M=Math.floor(M)+.5-this.jdEpoch;var e=Math.floor(M/360);M=M%360,M+=M<0?360:0;var t=Math.floor(M/20),r=M%20;return this.newDate(e,t,r)}});function x(M,e){return M-e*Math.floor(M/e)}function A(M,e){return x(M-1,e)+1}Z.calendars.mayan=d}}),oW=Ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Z=Sp(),q=sh();function d(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar;var x=Z.instance("gregorian");q(d.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(A){var M=this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear||Z.regionalOptions[""].invalidYear);return x.leapYear(M.year()+(M.year()<1?1:0)+1469)},weekOfYear:function(A,M,e){var t=this.newDate(A,M,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(A,M){var e=this._validate(A,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(A,M,e){return(this.dayOfWeek(A,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a<t.month();a++)o+=this.daysPerMonth[a-1];return o+x.toJD(r+1468,3,13)},fromJD:function(A){A=Math.floor(A+.5);for(var M=Math.floor((A-(this.jdEpoch-1))/366);A>=this.toJD(M+1,1,1);)M++;for(var e=A-Math.floor(this.toJD(M,1,1)+.5)+1,t=1;e>this.daysInMonth(M,t);)e-=this.daysInMonth(M,t),t++;return this.newDate(M,t,e)}}),Z.calendars.nanakshahi=d}}),sW=Ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Z=Sp(),q=sh();function d(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,A,M){var e=this.newDate(x,A,M);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(x){var A=this._validate(x,this.minMonth,this.minDay,Z.local.invalidYear);if(x=A.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var M=0,e=this.minMonth;e<=12;e++)M+=this.NEPALI_CALENDAR_DATA[x][e];return M},daysInMonth:function(x,A){return x.year&&(A=x.month(),x=x.year()),this._validate(x,A,this.minDay,Z.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[A-1]:this.NEPALI_CALENDAR_DATA[x][A]},weekDay:function(x,A,M){return this.dayOfWeek(x,A,M)!==6},toJD:function(x,A,M){var e=this._validate(x,A,M,Z.local.invalidDate);x=e.year(),A=e.month(),M=e.day();var t=Z.instance(),r=0,o=A,a=x;this._createMissingCalendarData(x);var i=x-(o>9||o===9&&M>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(A!==9&&(r=M,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return A===9?(r+=M-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(i))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(i,1,1).add(r,"d").toJD()},fromJD:function(x){var A=Z.instance(),M=A.fromJD(x),e=M.year(),t=M.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],i=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>i;)o++,o>12&&(o=1,r++),i+=this.NEPALI_CALENDAR_DATA[r][o];var n=this.NEPALI_CALENDAR_DATA[r][o]-(i-t);return this.newDate(r,o,n)},_createMissingCalendarData:function(x){var A=this.daysPerMonth.slice(0);A.unshift(17);for(var M=x-1;M<x+2;M++)typeof this.NEPALI_CALENDAR_DATA[M]>"u"&&(this.NEPALI_CALENDAR_DATA[M]=A)},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]}}),Z.calendars.nepali=d}}),lW=Ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var Z=Sp(),q=sh();function d(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}function x(A){var M=A-475;A<0&&M++;var e=.242197,t=e*M,r=e*(M+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}d.prototype=new Z.baseCalendar,q(d.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(A){var M=this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear);return x(M.year())},weekOfYear:function(A,M,e){var t=this.newDate(A,M,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(A,M){var e=this._validate(A,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(A,M,e){return this.dayOfWeek(A,M,e)!==5},toJD:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate);A=t.year(),M=t.month(),e=t.day();var r=0;if(A>0)for(var o=1;o<A;o++)x(o)&&r++;else if(A<0)for(var o=A;o<0;o++)x(o)&&r--;return e+(M<=7?(M-1)*31:(M-1)*30+6)+(A>0?A-1:A)*365+r+this.jdEpoch-1},fromJD:function(A){A=Math.floor(A)+.5;var M=475+(A-this.toJD(475,1,1))/365.242197,e=Math.floor(M);e<=0&&e--,A>this.toJD(e,12,x(e)?30:29)&&(e++,e===0&&e++);var t=A-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=A-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Z.calendars.persian=d,Z.calendars.jalali=d}}),uW=Ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Z=Sp(),q=sh(),d=Z.instance();function x(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,q(x.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(e){var M=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(M.year());return d.leapYear(e)},weekOfYear:function(r,M,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return d.weekOfYear(r,t.month(),t.day())},daysInMonth:function(A,M){var e=this._validate(A,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(A,M,e){return(this.dayOfWeek(A,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidDate),r=this._t2gYear(t.year());return d.toJD(r,t.month(),t.day())},fromJD:function(A){var M=d.fromJD(A),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.day())},_t2gYear:function(A){return A+this.yearsOffset+(A>=-this.yearsOffset&&A<=-1?1:0)},_g2tYear:function(A){return A-this.yearsOffset-(A>=1&&A<=this.yearsOffset?1:0)}}),Z.calendars.taiwan=x}}),cW=Ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var Z=Sp(),q=sh(),d=Z.instance();function x(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}x.prototype=new Z.baseCalendar,q(x.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(e){var M=this._validate(e,this.minMonth,this.minDay,Z.local.invalidYear),e=this._t2gYear(M.year());return d.leapYear(e)},weekOfYear:function(r,M,e){var t=this._validate(r,this.minMonth,this.minDay,Z.local.invalidYear),r=this._t2gYear(t.year());return d.weekOfYear(r,t.month(),t.day())},daysInMonth:function(A,M){var e=this._validate(A,M,this.minDay,Z.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(A,M,e){return(this.dayOfWeek(A,M,e)||7)<6},toJD:function(r,M,e){var t=this._validate(r,M,e,Z.local.invalidDate),r=this._t2gYear(t.year());return d.toJD(r,t.month(),t.day())},fromJD:function(A){var M=d.fromJD(A),e=this._g2tYear(M.year());return this.newDate(e,M.month(),M.day())},_t2gYear:function(A){return A-this.yearsOffset-(A>=1&&A<=this.yearsOffset?1:0)},_g2tYear:function(A){return A+this.yearsOffset+(A>=-this.yearsOffset&&A<=-1?1:0)}}),Z.calendars.thai=x}}),fW=Ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Z=Sp(),q=sh();function d(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}d.prototype=new Z.baseCalendar,q(d.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(A){var M=this._validate(A,this.minMonth,this.minDay,Z.local.invalidYear);return this.daysInYear(M.year())===355},weekOfYear:function(A,M,e){var t=this.newDate(A,M,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(A){for(var M=0,e=1;e<=12;e++)M+=this.daysInMonth(A,e);return M},daysInMonth:function(A,M){for(var e=this._validate(A,M,this.minDay,Z.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<x.length;o++){if(x[o]>t)return x[r]-x[r-1];r++}return 30},weekDay:function(A,M,e){return this.dayOfWeek(A,M,e)!==5},toJD:function(A,M,e){var t=this._validate(A,M,e,Z.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+x[r-1]-1;return o+24e5-.5},fromJD:function(A){for(var M=A-24e5+.5,e=0,t=0;t<x.length&&!(x[t]>M);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=M-x[e-1]+1;return this.newDate(a,i,n)},isValid:function(A,M,e){var t=Z.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(A=A.year!=null?A.year:A,t=A>=1276&&A<=1500),t},_validate:function(A,M,e,t){var r=Z.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Z.calendars.ummalqura=d;var x=[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]}}),hW=Ze({"src/components/calendars/calendars.js"(Z,q){"use strict";q.exports=Sp(),JH(),$H(),QH(),eW(),tW(),rW(),aW(),iW(),nW(),oW(),sW(),lW(),uW(),cW(),fW()}}),pW=Ze({"src/components/calendars/index.js"(Z,q){"use strict";var d=hW(),x=ca(),A=qs(),M=A.EPOCHJD,e=A.ONEDAY,t={valType:"enumerated",values:x.sortObjectKeys(d.calendars),editType:"calc",dflt:"gregorian"},r=function(y,b,p,u){var m={};return m[p]=t,x.coerce(y,b,m,p,u)},o=function(y,b,p,u){for(var m=0;m<p.length;m++)r(y,b,p[m]+"calendar",u.calendar)},a={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"},i={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"},n={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"]},s="##",c={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:s,w:s,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function f(y,b,p){for(var u=Math.floor((b+.05)/e)+M,m=v(p).fromJD(u),h=0,P,L,z,F,B;(h=y.indexOf("%",h))!==-1;)P=y.charAt(h+1),P==="0"||P==="-"||P==="_"?(z=3,L=y.charAt(h+2),P==="_"&&(P="-")):(L=P,P="0",z=2),F=c[L],F?(F===s?B=s:B=m.formatDate(F[P]),y=y.substr(0,h)+B+y.substr(h+z),h+=B.length):h+=z;return y}var g={};function v(y){var b=g[y];return b||(b=g[y]=d.instance(y),b)}function T(y){return x.extendFlat({},t,{description:y})}function l(y){return"Sets the calendar system to use with `"+y+"` date data."}var _={xcalendar:T(l("x"))},w=x.extendFlat({},_,{ycalendar:T(l("y"))}),S=x.extendFlat({},w,{zcalendar:T(l("z"))}),E=T(["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(" "));q.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:w,bar:w,box:w,heatmap:w,contour:w,histogram:w,histogram2d:w,histogram2dcontour:w,scatter3d:S,surface:S,mesh3d:S,scattergl:w,ohlc:_,candlestick:_},layout:{calendar:T(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:E},yaxis:{calendar:E},scene:{xaxis:{calendar:E},yaxis:{calendar:E},zaxis:{calendar:E}},polar:{radialaxis:{calendar:E}}}},layoutAttributes:t,handleDefaults:r,handleTraceDefaults:o,CANONICAL_SUNDAY:i,CANONICAL_TICK:a,DFLTRANGE:n,getCal:v,worldCalFmt:f}}}),dW=Ze({"lib/calendars.js"(Z,q){"use strict";q.exports=pW()}}),vW=Ze({"lib/index.js"(Z,q){var d=W9();d.register([K9(),Q9(),aF(),lF(),hF(),mF(),_F(),LF(),NF(),KF(),oO(),MB(),IB(),yN(),EN(),zN(),qN(),nU(),uU(),fU(),vU(),xU(),SU(),kU(),GU(),XU(),Lq(),Hq(),iV(),cV(),xV(),AV(),IV(),HV(),YV(),aG(),yG(),AG(),PG(),eH(),lH(),pH(),yH(),wH(),EH(),zH(),jH(),KH(),dW()]),q.exports=d}});return vW()})();return window.Plotly=se,se})});var uX=typeof global=="object"&&global&&global.Object===Object&&global,_b=uX;var cX=typeof self=="object"&&self&&self.Object===Object&&self,fX=_b||cX||Function("return this")(),_u=fX;var hX=_u.Symbol,If=hX;var WC=Object.prototype,pX=WC.hasOwnProperty,dX=WC.toString,a_=If?If.toStringTag:void 0;function vX(se){var ge=pX.call(se,a_),Ye=se[a_];try{se[a_]=void 0;var Pt=!0}catch{}var vr=dX.call(se);return Pt&&(ge?se[a_]=Ye:delete se[a_]),vr}var XC=vX;var mX=Object.prototype,gX=mX.toString;function yX(se){return gX.call(se)}var ZC=yX;var _X="[object Null]",xX="[object Undefined]",YC=If?If.toStringTag:void 0;function bX(se){return se==null?se===void 0?xX:_X:YC&&YC in Object(se)?XC(se):ZC(se)}var zc=bX;function wX(se){return se!=null&&typeof se=="object"}var Rl=wX;var TX="[object Symbol]";function AX(se){return typeof se=="symbol"||Rl(se)&&zc(se)==TX}var Rf=AX;var SX=NaN;function MX(se){return typeof se=="number"?se:Rf(se)?SX:+se}var wA=MX;function EX(se,ge){for(var Ye=-1,Pt=se==null?0:se.length,vr=Array(Pt);++Ye<Pt;)vr[Ye]=ge(se[Ye],Ye,se);return vr}var Sl=EX;var CX=Array.isArray,Do=CX;var kX=1/0,KC=If?If.prototype:void 0,JC=KC?KC.toString:void 0;function $C(se){if(typeof se=="string")return se;if(Do(se))return Sl(se,$C)+"";if(Rf(se))return JC?JC.call(se):"";var ge=se+"";return ge=="0"&&1/se==-kX?"-0":ge}var ah=$C;function LX(se,ge){return function(Ye,Pt){var vr;if(Ye===void 0&&Pt===void 0)return ge;if(Ye!==void 0&&(vr=Ye),Pt!==void 0){if(vr===void 0)return Pt;typeof Ye=="string"||typeof Pt=="string"?(Ye=ah(Ye),Pt=ah(Pt)):(Ye=wA(Ye),Pt=wA(Pt)),vr=se(Ye,Pt)}return vr}}var bm=LX;var PX=bm(function(se,ge){return se+ge},0),QC=PX;var IX=/\s/;function RX(se){for(var ge=se.length;ge--&&IX.test(se.charAt(ge)););return ge}var xb=RX;var DX=/^\s+/;function zX(se){return se&&se.slice(0,xb(se)+1).replace(DX,"")}var bb=zX;function FX(se){var ge=typeof se;return se!=null&&(ge=="object"||ge=="function")}var kl=FX;var ek=NaN,OX=/^[-+]0x[0-9a-f]+$/i,BX=/^0b[01]+$/i,NX=/^0o[0-7]+$/i,UX=parseInt;function jX(se){if(typeof se=="number")return se;if(Rf(se))return ek;if(kl(se)){var ge=typeof se.valueOf=="function"?se.valueOf():se;se=kl(ge)?ge+"":ge}if(typeof se!="string")return se===0?se:+se;se=bb(se);var Ye=BX.test(se);return Ye||NX.test(se)?UX(se.slice(2),Ye?2:8):OX.test(se)?ek:+se}var Th=jX;var tk=1/0,qX=17976931348623157e292;function VX(se){if(!se)return se===0?se:0;if(se=Th(se),se===tk||se===-tk){var ge=se<0?-1:1;return ge*qX}return se===se?se:0}var sd=VX;function GX(se){var ge=sd(se),Ye=ge%1;return ge===ge?Ye?ge-Ye:ge:0}var Go=GX;var HX="Expected a function";function WX(se,ge){if(typeof ge!="function")throw new TypeError(HX);return se=Go(se),function(){if(--se<1)return ge.apply(this,arguments)}}var rk=WX;function XX(se){return se}var Fc=XX;var ZX="[object AsyncFunction]",YX="[object Function]",KX="[object GeneratorFunction]",JX="[object Proxy]";function $X(se){if(!kl(se))return!1;var ge=zc(se);return ge==YX||ge==KX||ge==ZX||ge==JX}var ap=$X;var QX=_u["__core-js_shared__"],Xg=QX;var ak=function(){var se=/[^.]+$/.exec(Xg&&Xg.keys&&Xg.keys.IE_PROTO||"");return se?"Symbol(src)_1."+se:""}();function eZ(se){return!!ak&&ak in se}var ik=eZ;var tZ=Function.prototype,rZ=tZ.toString;function aZ(se){if(se!=null){try{return rZ.call(se)}catch{}try{return se+""}catch{}}return""}var jv=aZ;var iZ=/[\\^$.*+?()[\]{}|]/g,nZ=/^\[object .+?Constructor\]$/,oZ=Function.prototype,sZ=Object.prototype,lZ=oZ.toString,uZ=sZ.hasOwnProperty,cZ=RegExp("^"+lZ.call(uZ).replace(iZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fZ(se){if(!kl(se)||ik(se))return!1;var ge=ap(se)?cZ:nZ;return ge.test(jv(se))}var wb=fZ;function hZ(se,ge){return se?.[ge]}var nk=hZ;function pZ(se,ge){var Ye=nk(se,ge);return wb(Ye)?Ye:void 0}var ld=pZ;var dZ=ld(_u,"WeakMap"),U0=dZ;var vZ=U0&&new U0,Zg=vZ;var mZ=Zg?function(se,ge){return Zg.set(se,ge),se}:Fc,Tb=mZ;var ok=Object.create,gZ=function(){function se(){}return function(ge){if(!kl(ge))return{};if(ok)return ok(ge);se.prototype=ge;var Ye=new se;return se.prototype=void 0,Ye}}(),Td=gZ;function yZ(se){return function(){var ge=arguments;switch(ge.length){case 0:return new se;case 1:return new se(ge[0]);case 2:return new se(ge[0],ge[1]);case 3:return new se(ge[0],ge[1],ge[2]);case 4:return new se(ge[0],ge[1],ge[2],ge[3]);case 5:return new se(ge[0],ge[1],ge[2],ge[3],ge[4]);case 6:return new se(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5]);case 7:return new se(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5],ge[6])}var Ye=Td(se.prototype),Pt=se.apply(Ye,ge);return kl(Pt)?Pt:Ye}}var qv=yZ;var _Z=1;function xZ(se,ge,Ye){var Pt=ge&_Z,vr=qv(se);function Zr(){var ka=this&&this!==_u&&this instanceof Zr?vr:se;return ka.apply(Pt?Ye:this,arguments)}return Zr}var sk=xZ;function bZ(se,ge,Ye){switch(Ye.length){case 0:return se.call(ge);case 1:return se.call(ge,Ye[0]);case 2:return se.call(ge,Ye[0],Ye[1]);case 3:return se.call(ge,Ye[0],Ye[1],Ye[2])}return se.apply(ge,Ye)}var _f=bZ;var wZ=Math.max;function TZ(se,ge,Ye,Pt){for(var vr=-1,Zr=se.length,ka=Ye.length,oi=-1,ci=ge.length,Ln=wZ(Zr-ka,0),bn=Array(ci+Ln),Fn=!Pt;++oi<ci;)bn[oi]=ge[oi];for(;++vr<ka;)(Fn||vr<Zr)&&(bn[Ye[vr]]=se[vr]);for(;Ln--;)bn[oi++]=se[vr++];return bn}var Ab=TZ;var AZ=Math.max;function SZ(se,ge,Ye,Pt){for(var vr=-1,Zr=se.length,ka=-1,oi=Ye.length,ci=-1,Ln=ge.length,bn=AZ(Zr-oi,0),Fn=Array(bn+Ln),Uo=!Pt;++vr<bn;)Fn[vr]=se[vr];for(var ws=vr;++ci<Ln;)Fn[ws+ci]=ge[ci];for(;++ka<oi;)(Uo||vr<Zr)&&(Fn[ws+Ye[ka]]=se[vr++]);return Fn}var Sb=SZ;function MZ(se,ge){for(var Ye=se.length,Pt=0;Ye--;)se[Ye]===ge&&++Pt;return Pt}var lk=MZ;function EZ(){}var wm=EZ;var CZ=4294967295;function Mb(se){this.__wrapped__=se,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=CZ,this.__views__=[]}Mb.prototype=Td(wm.prototype);Mb.prototype.constructor=Mb;var Bl=Mb;function kZ(){}var Yg=kZ;var LZ=Zg?function(se){return Zg.get(se)}:Yg,Kg=LZ;var PZ={},Tm=PZ;var IZ=Object.prototype,RZ=IZ.hasOwnProperty;function DZ(se){for(var ge=se.name+"",Ye=Tm[ge],Pt=RZ.call(Tm,ge)?Ye.length:0;Pt--;){var vr=Ye[Pt],Zr=vr.func;if(Zr==null||Zr==se)return vr.name}return ge}var Jg=DZ;function Eb(se,ge){this.__wrapped__=se,this.__actions__=[],this.__chain__=!!ge,this.__index__=0,this.__values__=void 0}Eb.prototype=Td(wm.prototype);Eb.prototype.constructor=Eb;var Dp=Eb;function zZ(se,ge){var Ye=-1,Pt=se.length;for(ge||(ge=Array(Pt));++Ye<Pt;)ge[Ye]=se[Ye];return ge}var ff=zZ;function FZ(se){if(se instanceof Bl)return se.clone();var ge=new Dp(se.__wrapped__,se.__chain__);return ge.__actions__=ff(se.__actions__),ge.__index__=se.__index__,ge.__values__=se.__values__,ge}var Cb=FZ;var OZ=Object.prototype,BZ=OZ.hasOwnProperty;function kb(se){if(Rl(se)&&!Do(se)&&!(se instanceof Bl)){if(se instanceof Dp)return se;if(BZ.call(se,"__wrapped__"))return Cb(se)}return new Dp(se)}kb.prototype=wm.prototype;kb.prototype.constructor=kb;var _a=kb;function NZ(se){var ge=Jg(se),Ye=_a[ge];if(typeof Ye!="function"||!(ge in Bl.prototype))return!1;if(se===Ye)return!0;var Pt=Kg(Ye);return!!Pt&&se===Pt[0]}var i_=NZ;var UZ=800,jZ=16,qZ=Date.now;function VZ(se){var ge=0,Ye=0;return function(){var Pt=qZ(),vr=jZ-(Pt-Ye);if(Ye=Pt,vr>0){if(++ge>=UZ)return arguments[0]}else ge=0;return se.apply(void 0,arguments)}}var Lb=VZ;var GZ=Lb(Tb),Pb=GZ;var HZ=/\{\n\/\* \[wrapped with (.+)\] \*/,WZ=/,? & /;function XZ(se){var ge=se.match(HZ);return ge?ge[1].split(WZ):[]}var uk=XZ;var ZZ=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function YZ(se,ge){var Ye=ge.length;if(!Ye)return se;var Pt=Ye-1;return ge[Pt]=(Ye>1?"& ":"")+ge[Pt],ge=ge.join(Ye>2?", ":" "),se.replace(ZZ,`{
/* [wrapped with `+ge+`] */
`)}var ck=YZ;function KZ(se){return function(){return se}}var $g=KZ;var JZ=function(){try{var se=ld(Object,"defineProperty");return se({},"",{}),se}catch{}}(),Qg=JZ;var $Z=Qg?function(se,ge){return Qg(se,"toString",{configurable:!0,enumerable:!1,value:$g(ge),writable:!0})}:Fc,fk=$Z;var QZ=Lb(fk),ey=QZ;function eY(se,ge){for(var Ye=-1,Pt=se==null?0:se.length;++Ye<Pt&&ge(se[Ye],Ye,se)!==!1;);return se}var Nh=eY;function tY(se,ge,Ye,Pt){for(var vr=se.length,Zr=Ye+(Pt?1:-1);Pt?Zr--:++Zr<vr;)if(ge(se[Zr],Zr,se))return Zr;return-1}var Am=tY;function rY(se){return se!==se}var Ib=rY;function aY(se,ge,Ye){for(var Pt=Ye-1,vr=se.length;++Pt<vr;)if(se[Pt]===ge)return Pt;return-1}var hk=aY;function iY(se,ge,Ye){return ge===ge?hk(se,ge,Ye):Am(se,Ib,Ye)}var Ad=iY;function nY(se,ge){var Ye=se==null?0:se.length;return!!Ye&&Ad(se,ge,0)>-1}var Sm=nY;var oY=1,sY=2,lY=8,uY=16,cY=32,fY=64,hY=128,pY=256,dY=512,vY=[["ary",hY],["bind",oY],["bindKey",sY],["curry",lY],["curryRight",uY],["flip",dY],["partial",cY],["partialRight",fY],["rearg",pY]];function mY(se,ge){return Nh(vY,function(Ye){var Pt="_."+Ye[0];ge&Ye[1]&&!Sm(se,Pt)&&se.push(Pt)}),se.sort()}var pk=mY;function gY(se,ge,Ye){var Pt=ge+"";return ey(se,ck(Pt,pk(uk(Pt),Ye)))}var Rb=gY;var yY=1,_Y=2,xY=4,bY=8,dk=32,vk=64;function wY(se,ge,Ye,Pt,vr,Zr,ka,oi,ci,Ln){var bn=ge&bY,Fn=bn?ka:void 0,Uo=bn?void 0:ka,ws=bn?Zr:void 0,wo=bn?void 0:Zr;ge|=bn?dk:vk,ge&=~(bn?vk:dk),ge&xY||(ge&=~(yY|_Y));var Ze=[se,ge,vr,ws,Fn,wo,Uo,oi,ci,Ln],Ws=Ye.apply(void 0,Ze);return i_(se)&&Pb(Ws,Ze),Ws.placeholder=Pt,Rb(Ws,se,ge)}var Db=wY;function TY(se){var ge=se;return ge.placeholder}var Sd=TY;var AY=9007199254740991,SY=/^(?:0|[1-9]\d*)$/;function MY(se,ge){var Ye=typeof se;return ge=ge??AY,!!ge&&(Ye=="number"||Ye!="symbol"&&SY.test(se))&&se>-1&&se%1==0&&se<ge}var ip=MY;var EY=Math.min;function CY(se,ge){for(var Ye=se.length,Pt=EY(ge.length,Ye),vr=ff(se);Pt--;){var Zr=ge[Pt];se[Pt]=ip(Zr,Ye)?vr[Zr]:void 0}return se}var mk=CY;var gk="__lodash_placeholder__";function kY(se,ge){for(var Ye=-1,Pt=se.length,vr=0,Zr=[];++Ye<Pt;){var ka=se[Ye];(ka===ge||ka===gk)&&(se[Ye]=gk,Zr[vr++]=Ye)}return Zr}var Yp=kY;var LY=1,PY=2,IY=8,RY=16,DY=128,zY=512;function yk(se,ge,Ye,Pt,vr,Zr,ka,oi,ci,Ln){var bn=ge&DY,Fn=ge&LY,Uo=ge&PY,ws=ge&(IY|RY),wo=ge&zY,Ze=Uo?void 0:qv(se);function Ws(){for(var Yl=arguments.length,cu=Array(Yl),nh=Yl;nh--;)cu[nh]=arguments[nh];if(ws)var Eh=Sd(Ws),Up=lk(cu,Eh);if(Pt&&(cu=Ab(cu,Pt,vr,ws)),Zr&&(cu=Sb(cu,Zr,ka,ws)),Yl-=Up,ws&&Yl<Ln){var On=Yp(cu,Eh);return Db(se,ge,yk,Ws.placeholder,Ye,cu,On,oi,ci,Ln-Yl)}var $p=Fn?Ye:this,jp=Uo?$p[se]:se;return Yl=cu.length,oi?cu=mk(cu,oi):wo&&Yl>1&&cu.reverse(),bn&&ci<Yl&&(cu.length=ci),this&&this!==_u&&this instanceof Ws&&(jp=Ze||qv(jp)),jp.apply($p,cu)}return Ws}var ty=yk;function FY(se,ge,Ye){var Pt=qv(se);function vr(){for(var Zr=arguments.length,ka=Array(Zr),oi=Zr,ci=Sd(vr);oi--;)ka[oi]=arguments[oi];var Ln=Zr<3&&ka[0]!==ci&&ka[Zr-1]!==ci?[]:Yp(ka,ci);if(Zr-=Ln.length,Zr<Ye)return Db(se,ge,ty,vr.placeholder,void 0,ka,Ln,void 0,void 0,Ye-Zr);var bn=this&&this!==_u&&this instanceof vr?Pt:se;return _f(bn,this,ka)}return vr}var _k=FY;var OY=1;function BY(se,ge,Ye,Pt){var vr=ge&OY,Zr=qv(se);function ka(){for(var oi=-1,ci=arguments.length,Ln=-1,bn=Pt.length,Fn=Array(bn+ci),Uo=this&&this!==_u&&this instanceof ka?Zr:se;++Ln<bn;)Fn[Ln]=Pt[Ln];for(;ci--;)Fn[Ln++]=arguments[++oi];return _f(Uo,vr?Ye:this,Fn)}return ka}var xk=BY;var bk="__lodash_placeholder__",TA=1,NY=2,UY=4,wk=8,n_=128,Tk=256,jY=Math.min;function qY(se,ge){var Ye=se[1],Pt=ge[1],vr=Ye|Pt,Zr=vr<(TA|NY|n_),ka=Pt==n_&&Ye==wk||Pt==n_&&Ye==Tk&&se[7].length<=ge[8]||Pt==(n_|Tk)&&ge[7].length<=ge[8]&&Ye==wk;if(!(Zr||ka))return se;Pt&TA&&(se[2]=ge[2],vr|=Ye&TA?0:UY);var oi=ge[3];if(oi){var ci=se[3];se[3]=ci?Ab(ci,oi,ge[4]):oi,se[4]=ci?Yp(se[3],bk):ge[4]}return oi=ge[5],oi&&(ci=se[5],se[5]=ci?Sb(ci,oi,ge[6]):oi,se[6]=ci?Yp(se[5],bk):ge[6]),oi=ge[7],oi&&(se[7]=oi),Pt&n_&&(se[8]=se[8]==null?ge[8]:jY(se[8],ge[8])),se[9]==null&&(se[9]=ge[9]),se[0]=ge[0],se[1]=vr,se}var Ak=qY;var VY="Expected a function",Sk=1,GY=2,AA=8,SA=16,MA=32,Mk=64,Ek=Math.max;function HY(se,ge,Ye,Pt,vr,Zr,ka,oi){var ci=ge&GY;if(!ci&&typeof se!="function")throw new TypeError(VY);var Ln=Pt?Pt.length:0;if(Ln||(ge&=~(MA|Mk),Pt=vr=void 0),ka=ka===void 0?ka:Ek(Go(ka),0),oi=oi===void 0?oi:Go(oi),Ln-=vr?vr.length:0,ge&Mk){var bn=Pt,Fn=vr;Pt=vr=void 0}var Uo=ci?void 0:Kg(se),ws=[se,ge,Ye,Pt,vr,bn,Fn,Zr,ka,oi];if(Uo&&Ak(ws,Uo),se=ws[0],ge=ws[1],Ye=ws[2],Pt=ws[3],vr=ws[4],oi=ws[9]=ws[9]===void 0?ci?0:se.length:Ek(ws[9]-Ln,0),!oi&&ge&(AA|SA)&&(ge&=~(AA|SA)),!ge||ge==Sk)var wo=sk(se,ge,Ye);else ge==AA||ge==SA?wo=_k(se,ge,oi):(ge==MA||ge==(Sk|MA))&&!vr.length?wo=xk(se,ge,Ye,Pt):wo=ty.apply(void 0,ws);var Ze=Uo?Tb:Pb;return Rb(Ze(wo,ws),se,ge)}var np=HY;var WY=128;function XY(se,ge,Ye){return ge=Ye?void 0:ge,ge=se&&ge==null?se.length:ge,np(se,WY,void 0,void 0,void 0,void 0,ge)}var zb=XY;function ZY(se,ge,Ye){ge=="__proto__"&&Qg?Qg(se,ge,{configurable:!0,enumerable:!0,value:Ye,writable:!0}):se[ge]=Ye}var op=ZY;function YY(se,ge){return se===ge||se!==se&&ge!==ge}var ih=YY;var KY=Object.prototype,JY=KY.hasOwnProperty;function $Y(se,ge,Ye){var Pt=se[ge];(!(JY.call(se,ge)&&ih(Pt,Ye))||Ye===void 0&&!(ge in se))&&op(se,ge,Ye)}var vv=$Y;function QY(se,ge,Ye,Pt){var vr=!Ye;Ye||(Ye={});for(var Zr=-1,ka=ge.length;++Zr<ka;){var oi=ge[Zr],ci=Pt?Pt(Ye[oi],se[oi],oi,Ye,se):void 0;ci===void 0&&(ci=se[oi]),vr?op(Ye,oi,ci):vv(Ye,oi,ci)}return Ye}var Ah=QY;var Ck=Math.max;function eK(se,ge,Ye){return ge=Ck(ge===void 0?se.length-1:ge,0),function(){for(var Pt=arguments,vr=-1,Zr=Ck(Pt.length-ge,0),ka=Array(Zr);++vr<Zr;)ka[vr]=Pt[ge+vr];vr=-1;for(var oi=Array(ge+1);++vr<ge;)oi[vr]=Pt[vr];return oi[ge]=Ye(ka),_f(se,this,oi)}}var Fb=eK;function tK(se,ge){return ey(Fb(se,ge,Fc),se+"")}var Ho=tK;var rK=9007199254740991;function aK(se){return typeof se=="number"&&se>-1&&se%1==0&&se<=rK}var Mm=aK;function iK(se){return se!=null&&Mm(se.length)&&!ap(se)}var jc=iK;function nK(se,ge,Ye){if(!kl(Ye))return!1;var Pt=typeof ge;return(Pt=="number"?jc(Ye)&&ip(ge,Ye.length):Pt=="string"&&ge in Ye)?ih(Ye[ge],se):!1}var Oc=nK;function oK(se){return Ho(function(ge,Ye){var Pt=-1,vr=Ye.length,Zr=vr>1?Ye[vr-1]:void 0,ka=vr>2?Ye[2]:void 0;for(Zr=se.length>3&&typeof Zr=="function"?(vr--,Zr):void 0,ka&&Oc(Ye[0],Ye[1],ka)&&(Zr=vr<3?void 0:Zr,vr=1),ge=Object(ge);++Pt<vr;){var oi=Ye[Pt];oi&&se(ge,oi,Pt,Zr)}return ge})}var Md=oK;var sK=Object.prototype;function lK(se){var ge=se&&se.constructor,Ye=typeof ge=="function"&&ge.prototype||sK;return se===Ye}var mv=lK;function uK(se,ge){for(var Ye=-1,Pt=Array(se);++Ye<se;)Pt[Ye]=ge(Ye);return Pt}var ry=uK;var cK="[object Arguments]";function fK(se){return Rl(se)&&zc(se)==cK}var EA=fK;var kk=Object.prototype,hK=kk.hasOwnProperty,pK=kk.propertyIsEnumerable,dK=EA(function(){return arguments}())?EA:function(se){return Rl(se)&&hK.call(se,"callee")&&!pK.call(se,"callee")},dd=dK;function vK(){return!1}var ay=vK;var Ik=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Lk=Ik&&typeof module=="object"&&module&&!module.nodeType&&module,mK=Lk&&Lk.exports===Ik,Pk=mK?_u.Buffer:void 0,gK=Pk?Pk.isBuffer:void 0,yK=gK||ay,Kp=yK;var _K="[object Arguments]",xK="[object Array]",bK="[object Boolean]",wK="[object Date]",TK="[object Error]",AK="[object Function]",SK="[object Map]",MK="[object Number]",EK="[object Object]",CK="[object RegExp]",kK="[object Set]",LK="[object String]",PK="[object WeakMap]",IK="[object ArrayBuffer]",RK="[object DataView]",DK="[object Float32Array]",zK="[object Float64Array]",FK="[object Int8Array]",OK="[object Int16Array]",BK="[object Int32Array]",NK="[object Uint8Array]",UK="[object Uint8ClampedArray]",jK="[object Uint16Array]",qK="[object Uint32Array]",xf={};xf[DK]=xf[zK]=xf[FK]=xf[OK]=xf[BK]=xf[NK]=xf[UK]=xf[jK]=xf[qK]=!0;xf[_K]=xf[xK]=xf[IK]=xf[bK]=xf[RK]=xf[wK]=xf[TK]=xf[AK]=xf[SK]=xf[MK]=xf[EK]=xf[CK]=xf[kK]=xf[LK]=xf[PK]=!1;function VK(se){return Rl(se)&&Mm(se.length)&&!!xf[zc(se)]}var Rk=VK;function GK(se){return function(ge){return se(ge)}}var bf=GK;var Dk=typeof exports=="object"&&exports&&!exports.nodeType&&exports,o_=Dk&&typeof module=="object"&&module&&!module.nodeType&&module,HK=o_&&o_.exports===Dk,CA=HK&&_b.process,WK=function(){try{var se=o_&&o_.require&&o_.require("util").types;return se||CA&&CA.binding&&CA.binding("util")}catch{}}(),sp=WK;var zk=sp&&sp.isTypedArray,XK=zk?bf(zk):Rk,Ed=XK;var ZK=Object.prototype,YK=ZK.hasOwnProperty;function KK(se,ge){var Ye=Do(se),Pt=!Ye&&dd(se),vr=!Ye&&!Pt&&Kp(se),Zr=!Ye&&!Pt&&!vr&&Ed(se),ka=Ye||Pt||vr||Zr,oi=ka?ry(se.length,String):[],ci=oi.length;for(var Ln in se)(ge||YK.call(se,Ln))&&!(ka&&(Ln=="length"||vr&&(Ln=="offset"||Ln=="parent")||Zr&&(Ln=="buffer"||Ln=="byteLength"||Ln=="byteOffset")||ip(Ln,ci)))&&oi.push(Ln);return oi}var Ob=KK;function JK(se,ge){return function(Ye){return se(ge(Ye))}}var Bb=JK;var $K=Bb(Object.keys,Object),Fk=$K;var QK=Object.prototype,eJ=QK.hasOwnProperty;function tJ(se){if(!mv(se))return Fk(se);var ge=[];for(var Ye in Object(se))eJ.call(se,Ye)&&Ye!="constructor"&&ge.push(Ye);return ge}var iy=tJ;function rJ(se){return jc(se)?Ob(se):iy(se)}var du=rJ;var aJ=Object.prototype,iJ=aJ.hasOwnProperty,nJ=Md(function(se,ge){if(mv(ge)||jc(ge)){Ah(ge,du(ge),se);return}for(var Ye in ge)iJ.call(ge,Ye)&&vv(se,Ye,ge[Ye])}),Ok=nJ;function oJ(se){var ge=[];if(se!=null)for(var Ye in Object(se))ge.push(Ye);return ge}var Bk=oJ;var sJ=Object.prototype,lJ=sJ.hasOwnProperty;function uJ(se){if(!kl(se))return Bk(se);var ge=mv(se),Ye=[];for(var Pt in se)Pt=="constructor"&&(ge||!lJ.call(se,Pt))||Ye.push(Pt);return Ye}var Nk=uJ;function cJ(se){return jc(se)?Ob(se,!0):Nk(se)}var qc=cJ;var fJ=Md(function(se,ge){Ah(ge,qc(ge),se)}),s_=fJ;var hJ=Md(function(se,ge,Ye,Pt){Ah(ge,qc(ge),se,Pt)}),Em=hJ;var pJ=Md(function(se,ge,Ye,Pt){Ah(ge,du(ge),se,Pt)}),Uk=pJ;var dJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vJ=/^\w*$/;function mJ(se,ge){if(Do(se))return!1;var Ye=typeof se;return Ye=="number"||Ye=="symbol"||Ye=="boolean"||se==null||Rf(se)?!0:vJ.test(se)||!dJ.test(se)||ge!=null&&se in Object(ge)}var ny=mJ;var gJ=ld(Object,"create"),Vv=gJ;function yJ(){this.__data__=Vv?Vv(null):{},this.size=0}var jk=yJ;function _J(se){var ge=this.has(se)&&delete this.__data__[se];return this.size-=ge?1:0,ge}var qk=_J;var xJ="__lodash_hash_undefined__",bJ=Object.prototype,wJ=bJ.hasOwnProperty;function TJ(se){var ge=this.__data__;if(Vv){var Ye=ge[se];return Ye===xJ?void 0:Ye}return wJ.call(ge,se)?ge[se]:void 0}var Vk=TJ;var AJ=Object.prototype,SJ=AJ.hasOwnProperty;function MJ(se){var ge=this.__data__;return Vv?ge[se]!==void 0:SJ.call(ge,se)}var Gk=MJ;var EJ="__lodash_hash_undefined__";function CJ(se,ge){var Ye=this.__data__;return this.size+=this.has(se)?0:1,Ye[se]=Vv&&ge===void 0?EJ:ge,this}var Hk=CJ;function oy(se){var ge=-1,Ye=se==null?0:se.length;for(this.clear();++ge<Ye;){var Pt=se[ge];this.set(Pt[0],Pt[1])}}oy.prototype.clear=jk;oy.prototype.delete=qk;oy.prototype.get=Vk;oy.prototype.has=Gk;oy.prototype.set=Hk;var kA=oy;function kJ(){this.__data__=[],this.size=0}var Wk=kJ;function LJ(se,ge){for(var Ye=se.length;Ye--;)if(ih(se[Ye][0],ge))return Ye;return-1}var Cm=LJ;var PJ=Array.prototype,IJ=PJ.splice;function RJ(se){var ge=this.__data__,Ye=Cm(ge,se);if(Ye<0)return!1;var Pt=ge.length-1;return Ye==Pt?ge.pop():IJ.call(ge,Ye,1),--this.size,!0}var Xk=RJ;function DJ(se){var ge=this.__data__,Ye=Cm(ge,se);return Ye<0?void 0:ge[Ye][1]}var Zk=DJ;function zJ(se){return Cm(this.__data__,se)>-1}var Yk=zJ;function FJ(se,ge){var Ye=this.__data__,Pt=Cm(Ye,se);return Pt<0?(++this.size,Ye.push([se,ge])):Ye[Pt][1]=ge,this}var Kk=FJ;function sy(se){var ge=-1,Ye=se==null?0:se.length;for(this.clear();++ge<Ye;){var Pt=se[ge];this.set(Pt[0],Pt[1])}}sy.prototype.clear=Wk;sy.prototype.delete=Xk;sy.prototype.get=Zk;sy.prototype.has=Yk;sy.prototype.set=Kk;var km=sy;var OJ=ld(_u,"Map"),Lm=OJ;function BJ(){this.size=0,this.__data__={hash:new kA,map:new(Lm||km),string:new kA}}var Jk=BJ;function NJ(se){var ge=typeof se;return ge=="string"||ge=="number"||ge=="symbol"||ge=="boolean"?se!=="__proto__":se===null}var $k=NJ;function UJ(se,ge){var Ye=se.__data__;return $k(ge)?Ye[typeof ge=="string"?"string":"hash"]:Ye.map}var Pm=UJ;function jJ(se){var ge=Pm(this,se).delete(se);return this.size-=ge?1:0,ge}var Qk=jJ;function qJ(se){return Pm(this,se).get(se)}var eL=qJ;function VJ(se){return Pm(this,se).has(se)}var tL=VJ;function GJ(se,ge){var Ye=Pm(this,se),Pt=Ye.size;return Ye.set(se,ge),this.size+=Ye.size==Pt?0:1,this}var rL=GJ;function ly(se){var ge=-1,Ye=se==null?0:se.length;for(this.clear();++ge<Ye;){var Pt=se[ge];this.set(Pt[0],Pt[1])}}ly.prototype.clear=Jk;ly.prototype.delete=Qk;ly.prototype.get=eL;ly.prototype.has=tL;ly.prototype.set=rL;var j0=ly;var HJ="Expected a function";function LA(se,ge){if(typeof se!="function"||ge!=null&&typeof ge!="function")throw new TypeError(HJ);var Ye=function(){var Pt=arguments,vr=ge?ge.apply(this,Pt):Pt[0],Zr=Ye.cache;if(Zr.has(vr))return Zr.get(vr);var ka=se.apply(this,Pt);return Ye.cache=Zr.set(vr,ka)||Zr,ka};return Ye.cache=new(LA.Cache||j0),Ye}LA.Cache=j0;var Nb=LA;var WJ=500;function XJ(se){var ge=Nb(se,function(Pt){return Ye.size===WJ&&Ye.clear(),Pt}),Ye=ge.cache;return ge}var aL=XJ;var ZJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YJ=/\\(\\)?/g,KJ=aL(function(se){var ge=[];return se.charCodeAt(0)===46&&ge.push(""),se.replace(ZJ,function(Ye,Pt,vr,Zr){ge.push(vr?Zr.replace(YJ,"$1"):Pt||Ye)}),ge}),Ub=KJ;function JJ(se){return se==null?"":ah(se)}var Ds=JJ;function $J(se,ge){return Do(se)?se:ny(se,ge)?[se]:Ub(Ds(se))}var zp=$J;var QJ=1/0;function e$(se){if(typeof se=="string"||Rf(se))return se;var ge=se+"";return ge=="0"&&1/se==-QJ?"-0":ge}var Sh=e$;function t$(se,ge){ge=zp(ge,se);for(var Ye=0,Pt=ge.length;se!=null&&Ye<Pt;)se=se[Sh(ge[Ye++])];return Ye&&Ye==Pt?se:void 0}var ud=t$;function r$(se,ge,Ye){var Pt=se==null?void 0:ud(se,ge);return Pt===void 0?Ye:Pt}var uy=r$;function a$(se,ge){for(var Ye=-1,Pt=ge.length,vr=Array(Pt),Zr=se==null;++Ye<Pt;)vr[Ye]=Zr?void 0:uy(se,ge[Ye]);return vr}var cy=a$;function i$(se,ge){for(var Ye=-1,Pt=ge.length,vr=se.length;++Ye<Pt;)se[vr+Ye]=ge[Ye];return se}var Fp=i$;var iL=If?If.isConcatSpreadable:void 0;function n$(se){return Do(se)||dd(se)||!!(iL&&se&&se[iL])}var nL=n$;function oL(se,ge,Ye,Pt,vr){var Zr=-1,ka=se.length;for(Ye||(Ye=nL),vr||(vr=[]);++Zr<ka;){var oi=se[Zr];ge>0&&Ye(oi)?ge>1?oL(oi,ge-1,Ye,Pt,vr):Fp(vr,oi):Pt||(vr[vr.length]=oi)}return vr}var Qu=oL;function o$(se){var ge=se==null?0:se.length;return ge?Qu(se,1):[]}var jb=o$;function s$(se){return ey(Fb(se,void 0,jb),se+"")}var lp=s$;var l$=lp(cy),sL=l$;var u$=Bb(Object.getPrototypeOf,Object),Im=u$;var c$="[object Object]",f$=Function.prototype,h$=Object.prototype,lL=f$.toString,p$=h$.hasOwnProperty,d$=lL.call(Object);function v$(se){if(!Rl(se)||zc(se)!=c$)return!1;var ge=Im(se);if(ge===null)return!0;var Ye=p$.call(ge,"constructor")&&ge.constructor;return typeof Ye=="function"&&Ye instanceof Ye&&lL.call(Ye)==d$}var gv=v$;var m$="[object DOMException]",g$="[object Error]";function y$(se){if(!Rl(se))return!1;var ge=zc(se);return ge==g$||ge==m$||typeof se.message=="string"&&typeof se.name=="string"&&!gv(se)}var fy=y$;var _$=Ho(function(se,ge){try{return _f(se,void 0,ge)}catch(Ye){return fy(Ye)?Ye:new Error(Ye)}}),qb=_$;var x$="Expected a function";function b$(se,ge){var Ye;if(typeof ge!="function")throw new TypeError(x$);return se=Go(se),function(){return--se>0&&(Ye=ge.apply(this,arguments)),se<=1&&(ge=void 0),Ye}}var Vb=b$;var w$=1,T$=32,PA=Ho(function(se,ge,Ye){var Pt=w$;if(Ye.length){var vr=Yp(Ye,Sd(PA));Pt|=T$}return np(se,Pt,ge,Ye,vr)});PA.placeholder={};var Gb=PA;var A$=lp(function(se,ge){return Nh(ge,function(Ye){Ye=Sh(Ye),op(se,Ye,Gb(se[Ye],se))}),se}),uL=A$;var S$=1,M$=2,E$=32,IA=Ho(function(se,ge,Ye){var Pt=S$|M$;if(Ye.length){var vr=Yp(Ye,Sd(IA));Pt|=E$}return np(ge,Pt,se,Ye,vr)});IA.placeholder={};var cL=IA;function C$(se,ge,Ye){var Pt=-1,vr=se.length;ge<0&&(ge=-ge>vr?0:vr+ge),Ye=Ye>vr?vr:Ye,Ye<0&&(Ye+=vr),vr=ge>Ye?0:Ye-ge>>>0,ge>>>=0;for(var Zr=Array(vr);++Pt<vr;)Zr[Pt]=se[Pt+ge];return Zr}var Xf=C$;function k$(se,ge,Ye){var Pt=se.length;return Ye=Ye===void 0?Pt:Ye,!ge&&Ye>=Pt?se:Xf(se,ge,Ye)}var Op=k$;var L$="\\ud800-\\udfff",P$="\\u0300-\\u036f",I$="\\ufe20-\\ufe2f",R$="\\u20d0-\\u20ff",D$=P$+I$+R$,z$="\\ufe0e\\ufe0f",F$="\\u200d",O$=RegExp("["+F$+L$+D$+z$+"]");function B$(se){return O$.test(se)}var Cd=B$;function N$(se){return se.split("")}var fL=N$;var hL="\\ud800-\\udfff",U$="\\u0300-\\u036f",j$="\\ufe20-\\ufe2f",q$="\\u20d0-\\u20ff",V$=U$+j$+q$,G$="\\ufe0e\\ufe0f",H$="["+hL+"]",RA="["+V$+"]",DA="\\ud83c[\\udffb-\\udfff]",W$="(?:"+RA+"|"+DA+")",pL="[^"+hL+"]",dL="(?:\\ud83c[\\udde6-\\uddff]){2}",vL="[\\ud800-\\udbff][\\udc00-\\udfff]",X$="\\u200d",mL=W$+"?",gL="["+G$+"]?",Z$="(?:"+X$+"(?:"+[pL,dL,vL].join("|")+")"+gL+mL+")*",Y$=gL+mL+Z$,K$="(?:"+[pL+RA+"?",RA,dL,vL,H$].join("|")+")",J$=RegExp(DA+"(?="+DA+")|"+K$+Y$,"g");function $$(se){return se.match(J$)||[]}var yL=$$;function Q$(se){return Cd(se)?yL(se):fL(se)}var Uh=Q$;function eQ(se){return function(ge){ge=Ds(ge);var Ye=Cd(ge)?Uh(ge):void 0,Pt=Ye?Ye[0]:ge.charAt(0),vr=Ye?Op(Ye,1).join(""):ge.slice(1);return Pt[se]()+vr}}var Hb=eQ;var tQ=Hb("toUpperCase"),hy=tQ;function rQ(se){return hy(Ds(se).toLowerCase())}var Wb=rQ;function aQ(se,ge,Ye,Pt){var vr=-1,Zr=se==null?0:se.length;for(Pt&&Zr&&(Ye=se[++vr]);++vr<Zr;)Ye=ge(Ye,se[vr],vr,se);return Ye}var py=aQ;function iQ(se){return function(ge){return se?.[ge]}}var dy=iQ;var nQ={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},oQ=dy(nQ),_L=oQ;var sQ=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lQ="\\u0300-\\u036f",uQ="\\ufe20-\\ufe2f",cQ="\\u20d0-\\u20ff",fQ=lQ+uQ+cQ,hQ="["+fQ+"]",pQ=RegExp(hQ,"g");function dQ(se){return se=Ds(se),se&&se.replace(sQ,_L).replace(pQ,"")}var Xb=dQ;var vQ=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function mQ(se){return se.match(vQ)||[]}var xL=mQ;var gQ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function yQ(se){return gQ.test(se)}var bL=yQ;var ML="\\ud800-\\udfff",_Q="\\u0300-\\u036f",xQ="\\ufe20-\\ufe2f",bQ="\\u20d0-\\u20ff",wQ=_Q+xQ+bQ,EL="\\u2700-\\u27bf",CL="a-z\\xdf-\\xf6\\xf8-\\xff",TQ="\\xac\\xb1\\xd7\\xf7",AQ="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",SQ="\\u2000-\\u206f",MQ=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kL="A-Z\\xc0-\\xd6\\xd8-\\xde",EQ="\\ufe0e\\ufe0f",LL=TQ+AQ+SQ+MQ,PL="['\u2019]",wL="["+LL+"]",CQ="["+wQ+"]",IL="\\d+",kQ="["+EL+"]",RL="["+CL+"]",DL="[^"+ML+LL+IL+EL+CL+kL+"]",LQ="\\ud83c[\\udffb-\\udfff]",PQ="(?:"+CQ+"|"+LQ+")",IQ="[^"+ML+"]",zL="(?:\\ud83c[\\udde6-\\uddff]){2}",FL="[\\ud800-\\udbff][\\udc00-\\udfff]",vy="["+kL+"]",RQ="\\u200d",TL="(?:"+RL+"|"+DL+")",DQ="(?:"+vy+"|"+DL+")",AL="(?:"+PL+"(?:d|ll|m|re|s|t|ve))?",SL="(?:"+PL+"(?:D|LL|M|RE|S|T|VE))?",OL=PQ+"?",BL="["+EQ+"]?",zQ="(?:"+RQ+"(?:"+[IQ,zL,FL].join("|")+")"+BL+OL+")*",FQ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",OQ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",BQ=BL+OL+zQ,NQ="(?:"+[kQ,zL,FL].join("|")+")"+BQ,UQ=RegExp([vy+"?"+RL+"+"+AL+"(?="+[wL,vy,"$"].join("|")+")",DQ+"+"+SL+"(?="+[wL,vy+TL,"$"].join("|")+")",vy+"?"+TL+"+"+AL,vy+"+"+SL,OQ,FQ,IL,NQ].join("|"),"g");function jQ(se){return se.match(UQ)||[]}var NL=jQ;function qQ(se,ge,Ye){return se=Ds(se),ge=Ye?void 0:ge,ge===void 0?bL(se)?NL(se):xL(se):se.match(ge)||[]}var Zb=qQ;var VQ="['\u2019]",GQ=RegExp(VQ,"g");function HQ(se){return function(ge){return py(Zb(Xb(ge).replace(GQ,"")),se,"")}}var kd=HQ;var WQ=kd(function(se,ge,Ye){return ge=ge.toLowerCase(),se+(Ye?Wb(ge):ge)}),UL=WQ;function XQ(){if(!arguments.length)return[];var se=arguments[0];return Do(se)?se:[se]}var jL=XQ;var ZQ=_u.isFinite,YQ=Math.min;function KQ(se){var ge=Math[se];return function(Ye,Pt){if(Ye=Th(Ye),Pt=Pt==null?0:YQ(Go(Pt),292),Pt&&ZQ(Ye)){var vr=(Ds(Ye)+"e").split("e"),Zr=ge(vr[0]+"e"+(+vr[1]+Pt));return vr=(Ds(Zr)+"e").split("e"),+(vr[0]+"e"+(+vr[1]-Pt))}return ge(Ye)}}var my=KQ;var JQ=my("ceil"),qL=JQ;function $Q(se){var ge=_a(se);return ge.__chain__=!0,ge}var Yb=$Q;var QQ=Math.ceil,eee=Math.max;function tee(se,ge,Ye){(Ye?Oc(se,ge,Ye):ge===void 0)?ge=1:ge=eee(Go(ge),0);var Pt=se==null?0:se.length;if(!Pt||ge<1)return[];for(var vr=0,Zr=0,ka=Array(QQ(Pt/ge));vr<Pt;)ka[Zr++]=Xf(se,vr,vr+=ge);return ka}var VL=tee;function ree(se,ge,Ye){return se===se&&(Ye!==void 0&&(se=se<=Ye?se:Ye),ge!==void 0&&(se=se>=ge?se:ge)),se}var cd=ree;function aee(se,ge,Ye){return Ye===void 0&&(Ye=ge,ge=void 0),Ye!==void 0&&(Ye=Th(Ye),Ye=Ye===Ye?Ye:0),ge!==void 0&&(ge=Th(ge),ge=ge===ge?ge:0),cd(Th(se),ge,Ye)}var GL=aee;function iee(){this.__data__=new km,this.size=0}var HL=iee;function nee(se){var ge=this.__data__,Ye=ge.delete(se);return this.size=ge.size,Ye}var WL=nee;function oee(se){return this.__data__.get(se)}var XL=oee;function see(se){return this.__data__.has(se)}var ZL=see;var lee=200;function uee(se,ge){var Ye=this.__data__;if(Ye instanceof km){var Pt=Ye.__data__;if(!Lm||Pt.length<lee-1)return Pt.push([se,ge]),this.size=++Ye.size,this;Ye=this.__data__=new j0(Pt)}return Ye.set(se,ge),this.size=Ye.size,this}var YL=uee;function gy(se){var ge=this.__data__=new km(se);this.size=ge.size}gy.prototype.clear=HL;gy.prototype.delete=WL;gy.prototype.get=XL;gy.prototype.has=ZL;gy.prototype.set=YL;var yv=gy;function cee(se,ge){return se&&Ah(ge,du(ge),se)}var Kb=cee;function fee(se,ge){return se&&Ah(ge,qc(ge),se)}var KL=fee;var eP=typeof exports=="object"&&exports&&!exports.nodeType&&exports,JL=eP&&typeof module=="object"&&module&&!module.nodeType&&module,hee=JL&&JL.exports===eP,$L=hee?_u.Buffer:void 0,QL=$L?$L.allocUnsafe:void 0;function pee(se,ge){if(ge)return se.slice();var Ye=se.length,Pt=QL?QL(Ye):new se.constructor(Ye);return se.copy(Pt),Pt}var Jb=pee;function dee(se,ge){for(var Ye=-1,Pt=se==null?0:se.length,vr=0,Zr=[];++Ye<Pt;){var ka=se[Ye];ge(ka,Ye,se)&&(Zr[vr++]=ka)}return Zr}var Bp=dee;function vee(){return[]}var yy=vee;var mee=Object.prototype,gee=mee.propertyIsEnumerable,tP=Object.getOwnPropertySymbols,yee=tP?function(se){return se==null?[]:(se=Object(se),Bp(tP(se),function(ge){return gee.call(se,ge)}))}:yy,_y=yee;function _ee(se,ge){return Ah(se,_y(se),ge)}var rP=_ee;var xee=Object.getOwnPropertySymbols,bee=xee?function(se){for(var ge=[];se;)Fp(ge,_y(se)),se=Im(se);return ge}:yy,$b=bee;function wee(se,ge){return Ah(se,$b(se),ge)}var aP=wee;function Tee(se,ge,Ye){var Pt=ge(se);return Do(se)?Pt:Fp(Pt,Ye(se))}var Qb=Tee;function Aee(se){return Qb(se,du,_y)}var l_=Aee;function See(se){return Qb(se,qc,$b)}var xy=See;var Mee=ld(_u,"DataView"),ew=Mee;var Eee=ld(_u,"Promise"),tw=Eee;var Cee=ld(_u,"Set"),Rm=Cee;var iP="[object Map]",kee="[object Object]",nP="[object Promise]",oP="[object Set]",sP="[object WeakMap]",lP="[object DataView]",Lee=jv(ew),Pee=jv(Lm),Iee=jv(tw),Ree=jv(Rm),Dee=jv(U0),q0=zc;(ew&&q0(new ew(new ArrayBuffer(1)))!=lP||Lm&&q0(new Lm)!=iP||tw&&q0(tw.resolve())!=nP||Rm&&q0(new Rm)!=oP||U0&&q0(new U0)!=sP)&&(q0=function(se){var ge=zc(se),Ye=ge==kee?se.constructor:void 0,Pt=Ye?jv(Ye):"";if(Pt)switch(Pt){case Lee:return lP;case Pee:return iP;case Iee:return nP;case Ree:return oP;case Dee:return sP}return ge});var jh=q0;var zee=Object.prototype,Fee=zee.hasOwnProperty;function Oee(se){var ge=se.length,Ye=new se.constructor(ge);return ge&&typeof se[0]=="string"&&Fee.call(se,"index")&&(Ye.index=se.index,Ye.input=se.input),Ye}var uP=Oee;var Bee=_u.Uint8Array,by=Bee;function Nee(se){var ge=new se.constructor(se.byteLength);return new by(ge).set(new by(se)),ge}var wy=Nee;function Uee(se,ge){var Ye=ge?wy(se.buffer):se.buffer;return new se.constructor(Ye,se.byteOffset,se.byteLength)}var cP=Uee;var jee=/\w*$/;function qee(se){var ge=new se.constructor(se.source,jee.exec(se));return ge.lastIndex=se.lastIndex,ge}var fP=qee;var hP=If?If.prototype:void 0,pP=hP?hP.valueOf:void 0;function Vee(se){return pP?Object(pP.call(se)):{}}var dP=Vee;function Gee(se,ge){var Ye=ge?wy(se.buffer):se.buffer;return new se.constructor(Ye,se.byteOffset,se.length)}var rw=Gee;var Hee="[object Boolean]",Wee="[object Date]",Xee="[object Map]",Zee="[object Number]",Yee="[object RegExp]",Kee="[object Set]",Jee="[object String]",$ee="[object Symbol]",Qee="[object ArrayBuffer]",ete="[object DataView]",tte="[object Float32Array]",rte="[object Float64Array]",ate="[object Int8Array]",ite="[object Int16Array]",nte="[object Int32Array]",ote="[object Uint8Array]",ste="[object Uint8ClampedArray]",lte="[object Uint16Array]",ute="[object Uint32Array]";function cte(se,ge,Ye){var Pt=se.constructor;switch(ge){case Qee:return wy(se);case Hee:case Wee:return new Pt(+se);case ete:return cP(se,Ye);case tte:case rte:case ate:case ite:case nte:case ote:case ste:case lte:case ute:return rw(se,Ye);case Xee:return new Pt;case Zee:case Jee:return new Pt(se);case Yee:return fP(se);case Kee:return new Pt;case $ee:return dP(se)}}var vP=cte;function fte(se){return typeof se.constructor=="function"&&!mv(se)?Td(Im(se)):{}}var aw=fte;var hte="[object Map]";function pte(se){return Rl(se)&&jh(se)==hte}var mP=pte;var gP=sp&&sp.isMap,dte=gP?bf(gP):mP,iw=dte;var vte="[object Set]";function mte(se){return Rl(se)&&jh(se)==vte}var yP=mte;var _P=sp&&sp.isSet,gte=_P?bf(_P):yP,nw=gte;var yte=1,_te=2,xte=4,xP="[object Arguments]",bte="[object Array]",wte="[object Boolean]",Tte="[object Date]",Ate="[object Error]",bP="[object Function]",Ste="[object GeneratorFunction]",Mte="[object Map]",Ete="[object Number]",wP="[object Object]",Cte="[object RegExp]",kte="[object Set]",Lte="[object String]",Pte="[object Symbol]",Ite="[object WeakMap]",Rte="[object ArrayBuffer]",Dte="[object DataView]",zte="[object Float32Array]",Fte="[object Float64Array]",Ote="[object Int8Array]",Bte="[object Int16Array]",Nte="[object Int32Array]",Ute="[object Uint8Array]",jte="[object Uint8ClampedArray]",qte="[object Uint16Array]",Vte="[object Uint32Array]",hf={};hf[xP]=hf[bte]=hf[Rte]=hf[Dte]=hf[wte]=hf[Tte]=hf[zte]=hf[Fte]=hf[Ote]=hf[Bte]=hf[Nte]=hf[Mte]=hf[Ete]=hf[wP]=hf[Cte]=hf[kte]=hf[Lte]=hf[Pte]=hf[Ute]=hf[jte]=hf[qte]=hf[Vte]=!0;hf[Ate]=hf[bP]=hf[Ite]=!1;function ow(se,ge,Ye,Pt,vr,Zr){var ka,oi=ge&yte,ci=ge&_te,Ln=ge&xte;if(Ye&&(ka=vr?Ye(se,Pt,vr,Zr):Ye(se)),ka!==void 0)return ka;if(!kl(se))return se;var bn=Do(se);if(bn){if(ka=uP(se),!oi)return ff(se,ka)}else{var Fn=jh(se),Uo=Fn==bP||Fn==Ste;if(Kp(se))return Jb(se,oi);if(Fn==wP||Fn==xP||Uo&&!vr){if(ka=ci||Uo?{}:aw(se),!oi)return ci?aP(se,KL(ka,se)):rP(se,Kb(ka,se))}else{if(!hf[Fn])return vr?se:{};ka=vP(se,Fn,oi)}}Zr||(Zr=new yv);var ws=Zr.get(se);if(ws)return ws;Zr.set(se,ka),nw(se)?se.forEach(function(Ws){ka.add(ow(Ws,ge,Ye,Ws,se,Zr))}):iw(se)&&se.forEach(function(Ws,Yl){ka.set(Yl,ow(Ws,ge,Ye,Yl,se,Zr))});var wo=Ln?ci?xy:l_:ci?qc:du,Ze=bn?void 0:wo(se);return Nh(Ze||se,function(Ws,Yl){Ze&&(Yl=Ws,Ws=se[Yl]),vv(ka,Yl,ow(Ws,ge,Ye,Yl,se,Zr))}),ka}var up=ow;var Gte=4;function Hte(se){return up(se,Gte)}var TP=Hte;var Wte=1,Xte=4;function Zte(se){return up(se,Wte|Xte)}var AP=Zte;var Yte=1,Kte=4;function Jte(se,ge){return ge=typeof ge=="function"?ge:void 0,up(se,Yte|Kte,ge)}var SP=Jte;var $te=4;function Qte(se,ge){return ge=typeof ge=="function"?ge:void 0,up(se,$te,ge)}var MP=Qte;function ere(){return new Dp(this.value(),this.__chain__)}var EP=ere;function tre(se){for(var ge=-1,Ye=se==null?0:se.length,Pt=0,vr=[];++ge<Ye;){var Zr=se[ge];Zr&&(vr[Pt++]=Zr)}return vr}var CP=tre;function rre(){var se=arguments.length;if(!se)return[];for(var ge=Array(se-1),Ye=arguments[0],Pt=se;Pt--;)ge[Pt-1]=arguments[Pt];return Fp(Do(Ye)?ff(Ye):[Ye],Qu(ge,1))}var kP=rre;var are="__lodash_hash_undefined__";function ire(se){return this.__data__.set(se,are),this}var LP=ire;function nre(se){return this.__data__.has(se)}var PP=nre;function sw(se){var ge=-1,Ye=se==null?0:se.length;for(this.__data__=new j0;++ge<Ye;)this.add(se[ge])}sw.prototype.add=sw.prototype.push=LP;sw.prototype.has=PP;var Dm=sw;function ore(se,ge){for(var Ye=-1,Pt=se==null?0:se.length;++Ye<Pt;)if(ge(se[Ye],Ye,se))return!0;return!1}var Ty=ore;function sre(se,ge){return se.has(ge)}var Gv=sre;var lre=1,ure=2;function cre(se,ge,Ye,Pt,vr,Zr){var ka=Ye&lre,oi=se.length,ci=ge.length;if(oi!=ci&&!(ka&&ci>oi))return!1;var Ln=Zr.get(se),bn=Zr.get(ge);if(Ln&&bn)return Ln==ge&&bn==se;var Fn=-1,Uo=!0,ws=Ye&ure?new Dm:void 0;for(Zr.set(se,ge),Zr.set(ge,se);++Fn<oi;){var wo=se[Fn],Ze=ge[Fn];if(Pt)var Ws=ka?Pt(Ze,wo,Fn,ge,se,Zr):Pt(wo,Ze,Fn,se,ge,Zr);if(Ws!==void 0){if(Ws)continue;Uo=!1;break}if(ws){if(!Ty(ge,function(Yl,cu){if(!Gv(ws,cu)&&(wo===Yl||vr(wo,Yl,Ye,Pt,Zr)))return ws.push(cu)})){Uo=!1;break}}else if(!(wo===Ze||vr(wo,Ze,Ye,Pt,Zr))){Uo=!1;break}}return Zr.delete(se),Zr.delete(ge),Uo}var lw=cre;function fre(se){var ge=-1,Ye=Array(se.size);return se.forEach(function(Pt,vr){Ye[++ge]=[vr,Pt]}),Ye}var Ay=fre;function hre(se){var ge=-1,Ye=Array(se.size);return se.forEach(function(Pt){Ye[++ge]=Pt}),Ye}var zm=hre;var pre=1,dre=2,vre="[object Boolean]",mre="[object Date]",gre="[object Error]",yre="[object Map]",_re="[object Number]",xre="[object RegExp]",bre="[object Set]",wre="[object String]",Tre="[object Symbol]",Are="[object ArrayBuffer]",Sre="[object DataView]",IP=If?If.prototype:void 0,zA=IP?IP.valueOf:void 0;function Mre(se,ge,Ye,Pt,vr,Zr,ka){switch(Ye){case Sre:if(se.byteLength!=ge.byteLength||se.byteOffset!=ge.byteOffset)return!1;se=se.buffer,ge=ge.buffer;case Are:return!(se.byteLength!=ge.byteLength||!Zr(new by(se),new by(ge)));case vre:case mre:case _re:return ih(+se,+ge);case gre:return se.name==ge.name&&se.message==ge.message;case xre:case wre:return se==ge+"";case yre:var oi=Ay;case bre:var ci=Pt&pre;if(oi||(oi=zm),se.size!=ge.size&&!ci)return!1;var Ln=ka.get(se);if(Ln)return Ln==ge;Pt|=dre,ka.set(se,ge);var bn=lw(oi(se),oi(ge),Pt,vr,Zr,ka);return ka.delete(se),bn;case Tre:if(zA)return zA.call(se)==zA.call(ge)}return!1}var RP=Mre;var Ere=1,Cre=Object.prototype,kre=Cre.hasOwnProperty;function Lre(se,ge,Ye,Pt,vr,Zr){var ka=Ye&Ere,oi=l_(se),ci=oi.length,Ln=l_(ge),bn=Ln.length;if(ci!=bn&&!ka)return!1;for(var Fn=ci;Fn--;){var Uo=oi[Fn];if(!(ka?Uo in ge:kre.call(ge,Uo)))return!1}var ws=Zr.get(se),wo=Zr.get(ge);if(ws&&wo)return ws==ge&&wo==se;var Ze=!0;Zr.set(se,ge),Zr.set(ge,se);for(var Ws=ka;++Fn<ci;){Uo=oi[Fn];var Yl=se[Uo],cu=ge[Uo];if(Pt)var nh=ka?Pt(cu,Yl,Uo,ge,se,Zr):Pt(Yl,cu,Uo,se,ge,Zr);if(!(nh===void 0?Yl===cu||vr(Yl,cu,Ye,Pt,Zr):nh)){Ze=!1;break}Ws||(Ws=Uo=="constructor")}if(Ze&&!Ws){var Eh=se.constructor,Up=ge.constructor;Eh!=Up&&"constructor"in se&&"constructor"in ge&&!(typeof Eh=="function"&&Eh instanceof Eh&&typeof Up=="function"&&Up instanceof Up)&&(Ze=!1)}return Zr.delete(se),Zr.delete(ge),Ze}var DP=Lre;var Pre=1,zP="[object Arguments]",FP="[object Array]",uw="[object Object]",Ire=Object.prototype,OP=Ire.hasOwnProperty;function Rre(se,ge,Ye,Pt,vr,Zr){var ka=Do(se),oi=Do(ge),ci=ka?FP:jh(se),Ln=oi?FP:jh(ge);ci=ci==zP?uw:ci,Ln=Ln==zP?uw:Ln;var bn=ci==uw,Fn=Ln==uw,Uo=ci==Ln;if(Uo&&Kp(se)){if(!Kp(ge))return!1;ka=!0,bn=!1}if(Uo&&!bn)return Zr||(Zr=new yv),ka||Ed(se)?lw(se,ge,Ye,Pt,vr,Zr):RP(se,ge,ci,Ye,Pt,vr,Zr);if(!(Ye&Pre)){var ws=bn&&OP.call(se,"__wrapped__"),wo=Fn&&OP.call(ge,"__wrapped__");if(ws||wo){var Ze=ws?se.value():se,Ws=wo?ge.value():ge;return Zr||(Zr=new yv),vr(Ze,Ws,Ye,Pt,Zr)}}return Uo?(Zr||(Zr=new yv),DP(se,ge,Ye,Pt,vr,Zr)):!1}var BP=Rre;function NP(se,ge,Ye,Pt,vr){return se===ge?!0:se==null||ge==null||!Rl(se)&&!Rl(ge)?se!==se&&ge!==ge:BP(se,ge,Ye,Pt,NP,vr)}var Fm=NP;var Dre=1,zre=2;function Fre(se,ge,Ye,Pt){var vr=Ye.length,Zr=vr,ka=!Pt;if(se==null)return!Zr;for(se=Object(se);vr--;){var oi=Ye[vr];if(ka&&oi[2]?oi[1]!==se[oi[0]]:!(oi[0]in se))return!1}for(;++vr<Zr;){oi=Ye[vr];var ci=oi[0],Ln=se[ci],bn=oi[1];if(ka&&oi[2]){if(Ln===void 0&&!(ci in se))return!1}else{var Fn=new yv;if(Pt)var Uo=Pt(Ln,bn,ci,se,ge,Fn);if(!(Uo===void 0?Fm(bn,Ln,Dre|zre,Pt,Fn):Uo))return!1}}return!0}var Sy=Fre;function Ore(se){return se===se&&!kl(se)}var cw=Ore;function Bre(se){for(var ge=du(se),Ye=ge.length;Ye--;){var Pt=ge[Ye],vr=se[Pt];ge[Ye]=[Pt,vr,cw(vr)]}return ge}var My=Bre;function Nre(se,ge){return function(Ye){return Ye==null?!1:Ye[se]===ge&&(ge!==void 0||se in Object(Ye))}}var fw=Nre;function Ure(se){var ge=My(se);return ge.length==1&&ge[0][2]?fw(ge[0][0],ge[0][1]):function(Ye){return Ye===se||Sy(Ye,se,ge)}}var hw=Ure;function jre(se,ge){return se!=null&&ge in Object(se)}var UP=jre;function qre(se,ge,Ye){ge=zp(ge,se);for(var Pt=-1,vr=ge.length,Zr=!1;++Pt<vr;){var ka=Sh(ge[Pt]);if(!(Zr=se!=null&&Ye(se,ka)))break;se=se[ka]}return Zr||++Pt!=vr?Zr:(vr=se==null?0:se.length,!!vr&&Mm(vr)&&ip(ka,vr)&&(Do(se)||dd(se)))}var pw=qre;function Vre(se,ge){return se!=null&&pw(se,ge,UP)}var Ey=Vre;var Gre=1,Hre=2;function Wre(se,ge){return ny(se)&&cw(ge)?fw(Sh(se),ge):function(Ye){var Pt=uy(Ye,se);return Pt===void 0&&Pt===ge?Ey(Ye,se):Fm(ge,Pt,Gre|Hre)}}var dw=Wre;function Xre(se){return function(ge){return ge?.[se]}}var Cy=Xre;function Zre(se){return function(ge){return ud(ge,se)}}var jP=Zre;function Yre(se){return ny(se)?Cy(Sh(se)):jP(se)}var vw=Yre;function Kre(se){return typeof se=="function"?se:se==null?Fc:typeof se=="object"?Do(se)?dw(se[0],se[1]):hw(se):vw(se)}var bo=Kre;var Jre="Expected a function";function $re(se){var ge=se==null?0:se.length,Ye=bo;return se=ge?Sl(se,function(Pt){if(typeof Pt[1]!="function")throw new TypeError(Jre);return[Ye(Pt[0]),Pt[1]]}):[],Ho(function(Pt){for(var vr=-1;++vr<ge;){var Zr=se[vr];if(_f(Zr[0],this,Pt))return _f(Zr[1],this,Pt)}})}var qP=$re;function Qre(se,ge,Ye){var Pt=Ye.length;if(se==null)return!Pt;for(se=Object(se);Pt--;){var vr=Ye[Pt],Zr=ge[vr],ka=se[vr];if(ka===void 0&&!(vr in se)||!Zr(ka))return!1}return!0}var mw=Qre;function eae(se){var ge=du(se);return function(Ye){return mw(Ye,se,ge)}}var VP=eae;var tae=1;function rae(se){return VP(up(se,tae))}var GP=rae;function aae(se,ge){return ge==null||mw(se,ge,du(ge))}var HP=aae;function iae(se,ge,Ye,Pt){for(var vr=-1,Zr=se==null?0:se.length;++vr<Zr;){var ka=se[vr];ge(Pt,ka,Ye(ka),se)}return Pt}var WP=iae;function nae(se){return function(ge,Ye,Pt){for(var vr=-1,Zr=Object(ge),ka=Pt(ge),oi=ka.length;oi--;){var ci=ka[se?oi:++vr];if(Ye(Zr[ci],ci,Zr)===!1)break}return ge}}var gw=nae;var oae=gw(),ky=oae;function sae(se,ge){return se&&ky(se,ge,du)}var cp=sae;function lae(se,ge){return function(Ye,Pt){if(Ye==null)return Ye;if(!jc(Ye))return se(Ye,Pt);for(var vr=Ye.length,Zr=ge?vr:-1,ka=Object(Ye);(ge?Zr--:++Zr<vr)&&Pt(ka[Zr],Zr,ka)!==!1;);return Ye}}var yw=lae;var uae=yw(cp),Np=uae;function cae(se,ge,Ye,Pt){return Np(se,function(vr,Zr,ka){ge(Pt,vr,Ye(vr),ka)}),Pt}var XP=cae;function fae(se,ge){return function(Ye,Pt){var vr=Do(Ye)?WP:XP,Zr=ge?ge():{};return vr(Ye,se,bo(Pt,2),Zr)}}var Om=fae;var hae=Object.prototype,pae=hae.hasOwnProperty,dae=Om(function(se,ge,Ye){pae.call(se,Ye)?++se[Ye]:op(se,Ye,1)}),ZP=dae;function vae(se,ge){var Ye=Td(se);return ge==null?Ye:Kb(Ye,ge)}var YP=vae;var mae=8;function FA(se,ge,Ye){ge=Ye?void 0:ge;var Pt=np(se,mae,void 0,void 0,void 0,void 0,void 0,ge);return Pt.placeholder=FA.placeholder,Pt}FA.placeholder={};var KP=FA;var gae=16;function OA(se,ge,Ye){ge=Ye?void 0:ge;var Pt=np(se,gae,void 0,void 0,void 0,void 0,void 0,ge);return Pt.placeholder=OA.placeholder,Pt}OA.placeholder={};var JP=OA;var yae=function(){return _u.Date.now()},Ly=yae;var _ae="Expected a function",xae=Math.max,bae=Math.min;function wae(se,ge,Ye){var Pt,vr,Zr,ka,oi,ci,Ln=0,bn=!1,Fn=!1,Uo=!0;if(typeof se!="function")throw new TypeError(_ae);ge=Th(ge)||0,kl(Ye)&&(bn=!!Ye.leading,Fn="maxWait"in Ye,Zr=Fn?xae(Th(Ye.maxWait)||0,ge):Zr,Uo="trailing"in Ye?!!Ye.trailing:Uo);function ws(On){var $p=Pt,jp=vr;return Pt=vr=void 0,Ln=On,ka=se.apply(jp,$p),ka}function wo(On){return Ln=On,oi=setTimeout(Yl,ge),bn?ws(On):ka}function Ze(On){var $p=On-ci,jp=On-Ln,Zy=ge-$p;return Fn?bae(Zy,Zr-jp):Zy}function Ws(On){var $p=On-ci,jp=On-Ln;return ci===void 0||$p>=ge||$p<0||Fn&&jp>=Zr}function Yl(){var On=Ly();if(Ws(On))return cu(On);oi=setTimeout(Yl,Ze(On))}function cu(On){return oi=void 0,Uo&&Pt?ws(On):(Pt=vr=void 0,ka)}function nh(){oi!==void 0&&clearTimeout(oi),Ln=0,Pt=ci=vr=oi=void 0}function Eh(){return oi===void 0?ka:cu(Ly())}function Up(){var On=Ly(),$p=Ws(On);if(Pt=arguments,vr=this,ci=On,$p){if(oi===void 0)return wo(ci);if(Fn)return clearTimeout(oi),oi=setTimeout(Yl,ge),ws(ci)}return oi===void 0&&(oi=setTimeout(Yl,ge)),ka}return Up.cancel=nh,Up.flush=Eh,Up}var _w=wae;function Tae(se,ge){return se==null||se!==se?ge:se}var $P=Tae;var QP=Object.prototype,Aae=QP.hasOwnProperty,Sae=Ho(function(se,ge){se=Object(se);var Ye=-1,Pt=ge.length,vr=Pt>2?ge[2]:void 0;for(vr&&Oc(ge[0],ge[1],vr)&&(Pt=1);++Ye<Pt;)for(var Zr=ge[Ye],ka=qc(Zr),oi=-1,ci=ka.length;++oi<ci;){var Ln=ka[oi],bn=se[Ln];(bn===void 0||ih(bn,QP[Ln])&&!Aae.call(se,Ln))&&(se[Ln]=Zr[Ln])}return se}),eI=Sae;function Mae(se,ge,Ye){(Ye!==void 0&&!ih(se[ge],Ye)||Ye===void 0&&!(ge in se))&&op(se,ge,Ye)}var u_=Mae;function Eae(se){return Rl(se)&&jc(se)}var Su=Eae;function Cae(se,ge){if(!(ge==="constructor"&&typeof se[ge]=="function")&&ge!="__proto__")return se[ge]}var c_=Cae;function kae(se){return Ah(se,qc(se))}var xw=kae;function Lae(se,ge,Ye,Pt,vr,Zr,ka){var oi=c_(se,Ye),ci=c_(ge,Ye),Ln=ka.get(ci);if(Ln){u_(se,Ye,Ln);return}var bn=Zr?Zr(oi,ci,Ye+"",se,ge,ka):void 0,Fn=bn===void 0;if(Fn){var Uo=Do(ci),ws=!Uo&&Kp(ci),wo=!Uo&&!ws&&Ed(ci);bn=ci,Uo||ws||wo?Do(oi)?bn=oi:Su(oi)?bn=ff(oi):ws?(Fn=!1,bn=Jb(ci,!0)):wo?(Fn=!1,bn=rw(ci,!0)):bn=[]:gv(ci)||dd(ci)?(bn=oi,dd(oi)?bn=xw(oi):(!kl(oi)||ap(oi))&&(bn=aw(ci))):Fn=!1}Fn&&(ka.set(ci,bn),vr(bn,ci,Pt,Zr,ka),ka.delete(ci)),u_(se,Ye,bn)}var tI=Lae;function rI(se,ge,Ye,Pt,vr){se!==ge&&ky(ge,function(Zr,ka){if(vr||(vr=new yv),kl(Zr))tI(se,ge,ka,Ye,rI,Pt,vr);else{var oi=Pt?Pt(c_(se,ka),Zr,ka+"",se,ge,vr):void 0;oi===void 0&&(oi=Zr),u_(se,ka,oi)}},qc)}var Py=rI;function aI(se,ge,Ye,Pt,vr,Zr){return kl(se)&&kl(ge)&&(Zr.set(ge,se),Py(se,ge,void 0,aI,Zr),Zr.delete(ge)),se}var iI=aI;var Pae=Md(function(se,ge,Ye,Pt){Py(se,ge,Ye,Pt)}),bw=Pae;var Iae=Ho(function(se){return se.push(void 0,iI),_f(bw,void 0,se)}),nI=Iae;var Rae="Expected a function";function Dae(se,ge,Ye){if(typeof se!="function")throw new TypeError(Rae);return setTimeout(function(){se.apply(void 0,Ye)},ge)}var ww=Dae;var zae=Ho(function(se,ge){return ww(se,1,ge)}),oI=zae;var Fae=Ho(function(se,ge,Ye){return ww(se,Th(ge)||0,Ye)}),sI=Fae;function Oae(se,ge,Ye){for(var Pt=-1,vr=se==null?0:se.length;++Pt<vr;)if(Ye(ge,se[Pt]))return!0;return!1}var Iy=Oae;var Bae=200;function Nae(se,ge,Ye,Pt){var vr=-1,Zr=Sm,ka=!0,oi=se.length,ci=[],Ln=ge.length;if(!oi)return ci;Ye&&(ge=Sl(ge,bf(Ye))),Pt?(Zr=Iy,ka=!1):ge.length>=Bae&&(Zr=Gv,ka=!1,ge=new Dm(ge));e:for(;++vr<oi;){var bn=se[vr],Fn=Ye==null?bn:Ye(bn);if(bn=Pt||bn!==0?bn:0,ka&&Fn===Fn){for(var Uo=Ln;Uo--;)if(ge[Uo]===Fn)continue e;ci.push(bn)}else Zr(ge,Fn,Pt)||ci.push(bn)}return ci}var _v=Nae;var Uae=Ho(function(se,ge){return Su(se)?_v(se,Qu(ge,1,Su,!0)):[]}),lI=Uae;function jae(se){var ge=se==null?0:se.length;return ge?se[ge-1]:void 0}var wf=jae;var qae=Ho(function(se,ge){var Ye=wf(ge);return Su(Ye)&&(Ye=void 0),Su(se)?_v(se,Qu(ge,1,Su,!0),bo(Ye,2)):[]}),uI=qae;var Vae=Ho(function(se,ge){var Ye=wf(ge);return Su(Ye)&&(Ye=void 0),Su(se)?_v(se,Qu(ge,1,Su,!0),void 0,Ye):[]}),cI=Vae;var Gae=bm(function(se,ge){return se/ge},1),fI=Gae;function Hae(se,ge,Ye){var Pt=se==null?0:se.length;return Pt?(ge=Ye||ge===void 0?1:Go(ge),Xf(se,ge<0?0:ge,Pt)):[]}var hI=Hae;function Wae(se,ge,Ye){var Pt=se==null?0:se.length;return Pt?(ge=Ye||ge===void 0?1:Go(ge),ge=Pt-ge,Xf(se,0,ge<0?0:ge)):[]}var pI=Wae;function Xae(se,ge,Ye,Pt){for(var vr=se.length,Zr=Pt?vr:-1;(Pt?Zr--:++Zr<vr)&&ge(se[Zr],Zr,se););return Ye?Xf(se,Pt?0:Zr,Pt?Zr+1:vr):Xf(se,Pt?Zr+1:0,Pt?vr:Zr)}var Bm=Xae;function Zae(se,ge){return se&&se.length?Bm(se,bo(ge,3),!0,!0):[]}var dI=Zae;function Yae(se,ge){return se&&se.length?Bm(se,bo(ge,3),!0):[]}var vI=Yae;function Kae(se){return typeof se=="function"?se:Fc}var Mh=Kae;function Jae(se,ge){var Ye=Do(se)?Nh:Np;return Ye(se,Mh(ge))}var f_=Jae;function $ae(se,ge){for(var Ye=se==null?0:se.length;Ye--&&ge(se[Ye],Ye,se)!==!1;);return se}var mI=$ae;var Qae=gw(!0),Tw=Qae;function eie(se,ge){return se&&Tw(se,ge,du)}var Ry=eie;var tie=yw(Ry,!0),Aw=tie;function rie(se,ge){var Ye=Do(se)?mI:Aw;return Ye(se,Mh(ge))}var h_=rie;function aie(se,ge,Ye){se=Ds(se),ge=ah(ge);var Pt=se.length;Ye=Ye===void 0?Pt:cd(Go(Ye),0,Pt);var vr=Ye;return Ye-=ge.length,Ye>=0&&se.slice(Ye,vr)==ge}var gI=aie;function iie(se,ge){return Sl(ge,function(Ye){return[Ye,se[Ye]]})}var yI=iie;function nie(se){var ge=-1,Ye=Array(se.size);return se.forEach(function(Pt){Ye[++ge]=[Pt,Pt]}),Ye}var _I=nie;var oie="[object Map]",sie="[object Set]";function lie(se){return function(ge){var Ye=jh(ge);return Ye==oie?Ay(ge):Ye==sie?_I(ge):yI(ge,se(ge))}}var Sw=lie;var uie=Sw(du),p_=uie;var cie=Sw(qc),d_=cie;var fie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hie=dy(fie),xI=hie;var bI=/[&<>"']/g,pie=RegExp(bI.source);function die(se){return se=Ds(se),se&&pie.test(se)?se.replace(bI,xI):se}var Mw=die;var wI=/[\\^$.*+?()[\]{}|]/g,vie=RegExp(wI.source);function mie(se){return se=Ds(se),se&&vie.test(se)?se.replace(wI,"\\$&"):se}var TI=mie;function gie(se,ge){for(var Ye=-1,Pt=se==null?0:se.length;++Ye<Pt;)if(!ge(se[Ye],Ye,se))return!1;return!0}var Ew=gie;function yie(se,ge){var Ye=!0;return Np(se,function(Pt,vr,Zr){return Ye=!!ge(Pt,vr,Zr),Ye}),Ye}var AI=yie;function _ie(se,ge,Ye){var Pt=Do(se)?Ew:AI;return Ye&&Oc(se,ge,Ye)&&(ge=void 0),Pt(se,bo(ge,3))}var SI=_ie;var xie=4294967295;function bie(se){return se?cd(Go(se),0,xie):0}var Cw=bie;function wie(se,ge,Ye,Pt){var vr=se.length;for(Ye=Go(Ye),Ye<0&&(Ye=-Ye>vr?0:vr+Ye),Pt=Pt===void 0||Pt>vr?vr:Go(Pt),Pt<0&&(Pt+=vr),Pt=Ye>Pt?0:Cw(Pt);Ye<Pt;)se[Ye++]=ge;return se}var MI=wie;function Tie(se,ge,Ye,Pt){var vr=se==null?0:se.length;return vr?(Ye&&typeof Ye!="number"&&Oc(se,ge,Ye)&&(Ye=0,Pt=vr),MI(se,ge,Ye,Pt)):[]}var EI=Tie;function Aie(se,ge){var Ye=[];return Np(se,function(Pt,vr,Zr){ge(Pt,vr,Zr)&&Ye.push(Pt)}),Ye}var kw=Aie;function Sie(se,ge){var Ye=Do(se)?Bp:kw;return Ye(se,bo(ge,3))}var CI=Sie;function Mie(se){return function(ge,Ye,Pt){var vr=Object(ge);if(!jc(ge)){var Zr=bo(Ye,3);ge=du(ge),Ye=function(oi){return Zr(vr[oi],oi,vr)}}var ka=se(ge,Ye,Pt);return ka>-1?vr[Zr?ge[ka]:ka]:void 0}}var Lw=Mie;var Eie=Math.max;function Cie(se,ge,Ye){var Pt=se==null?0:se.length;if(!Pt)return-1;var vr=Ye==null?0:Go(Ye);return vr<0&&(vr=Eie(Pt+vr,0)),Am(se,bo(ge,3),vr)}var Pw=Cie;var kie=Lw(Pw),kI=kie;function Lie(se,ge,Ye){var Pt;return Ye(se,function(vr,Zr,ka){if(ge(vr,Zr,ka))return Pt=Zr,!1}),Pt}var Iw=Lie;function Pie(se,ge){return Iw(se,bo(ge,3),cp)}var LI=Pie;var Iie=Math.max,Rie=Math.min;function Die(se,ge,Ye){var Pt=se==null?0:se.length;if(!Pt)return-1;var vr=Pt-1;return Ye!==void 0&&(vr=Go(Ye),vr=Ye<0?Iie(Pt+vr,0):Rie(vr,Pt-1)),Am(se,bo(ge,3),vr,!0)}var Rw=Die;var zie=Lw(Rw),PI=zie;function Fie(se,ge){return Iw(se,bo(ge,3),Ry)}var II=Fie;function Oie(se){return se&&se.length?se[0]:void 0}var v_=Oie;function Bie(se,ge){var Ye=-1,Pt=jc(se)?Array(se.length):[];return Np(se,function(vr,Zr,ka){Pt[++Ye]=ge(vr,Zr,ka)}),Pt}var Dw=Bie;function Nie(se,ge){var Ye=Do(se)?Sl:Dw;return Ye(se,bo(ge,3))}var Nm=Nie;function Uie(se,ge){return Qu(Nm(se,ge),1)}var RI=Uie;var jie=1/0;function qie(se,ge){return Qu(Nm(se,ge),jie)}var DI=qie;function Vie(se,ge,Ye){return Ye=Ye===void 0?1:Go(Ye),Qu(Nm(se,ge),Ye)}var zI=Vie;var Gie=1/0;function Hie(se){var ge=se==null?0:se.length;return ge?Qu(se,Gie):[]}var FI=Hie;function Wie(se,ge){var Ye=se==null?0:se.length;return Ye?(ge=ge===void 0?1:Go(ge),Qu(se,ge)):[]}var OI=Wie;var Xie=512;function Zie(se){return np(se,Xie)}var BI=Zie;var Yie=my("floor"),NI=Yie;var Kie="Expected a function",Jie=8,$ie=32,Qie=128,ene=256;function tne(se){return lp(function(ge){var Ye=ge.length,Pt=Ye,vr=Dp.prototype.thru;for(se&&ge.reverse();Pt--;){var Zr=ge[Pt];if(typeof Zr!="function")throw new TypeError(Kie);if(vr&&!ka&&Jg(Zr)=="wrapper")var ka=new Dp([],!0)}for(Pt=ka?Pt:Ye;++Pt<Ye;){Zr=ge[Pt];var oi=Jg(Zr),ci=oi=="wrapper"?Kg(Zr):void 0;ci&&i_(ci[0])&&ci[1]==(Qie|Jie|$ie|ene)&&!ci[4].length&&ci[9]==1?ka=ka[Jg(ci[0])].apply(ka,ci[3]):ka=Zr.length==1&&i_(Zr)?ka[oi]():ka.thru(Zr)}return function(){var Ln=arguments,bn=Ln[0];if(ka&&Ln.length==1&&Do(bn))return ka.plant(bn).value();for(var Fn=0,Uo=Ye?ge[Fn].apply(this,Ln):bn;++Fn<Ye;)Uo=ge[Fn].call(this,Uo);return Uo}})}var zw=tne;var rne=zw(),UI=rne;var ane=zw(!0),jI=ane;function ine(se,ge){return se==null?se:ky(se,Mh(ge),qc)}var qI=ine;function nne(se,ge){return se==null?se:Tw(se,Mh(ge),qc)}var VI=nne;function one(se,ge){return se&&cp(se,Mh(ge))}var GI=one;function sne(se,ge){return se&&Ry(se,Mh(ge))}var HI=sne;function lne(se){for(var ge=-1,Ye=se==null?0:se.length,Pt={};++ge<Ye;){var vr=se[ge];Pt[vr[0]]=vr[1]}return Pt}var WI=lne;function une(se,ge){return Bp(ge,function(Ye){return ap(se[Ye])})}var Um=une;function cne(se){return se==null?[]:Um(se,du(se))}var XI=cne;function fne(se){return se==null?[]:Um(se,qc(se))}var ZI=fne;var hne=Object.prototype,pne=hne.hasOwnProperty,dne=Om(function(se,ge,Ye){pne.call(se,Ye)?se[Ye].push(ge):op(se,Ye,[ge])}),YI=dne;function vne(se,ge){return se>ge}var Dy=vne;function mne(se){return function(ge,Ye){return typeof ge=="string"&&typeof Ye=="string"||(ge=Th(ge),Ye=Th(Ye)),se(ge,Ye)}}var jm=mne;var gne=jm(Dy),KI=gne;var yne=jm(function(se,ge){return se>=ge}),JI=yne;var _ne=Object.prototype,xne=_ne.hasOwnProperty;function bne(se,ge){return se!=null&&xne.call(se,ge)}var $I=bne;function wne(se,ge){return se!=null&&pw(se,ge,$I)}var QI=wne;var Tne=Math.max,Ane=Math.min;function Sne(se,ge,Ye){return se>=Ane(ge,Ye)&&se<Tne(ge,Ye)}var e8=Sne;function Mne(se,ge,Ye){return ge=sd(ge),Ye===void 0?(Ye=ge,ge=0):Ye=sd(Ye),se=Th(se),e8(se,ge,Ye)}var t8=Mne;var Ene="[object String]";function Cne(se){return typeof se=="string"||!Do(se)&&Rl(se)&&zc(se)==Ene}var qm=Cne;function kne(se,ge){return Sl(ge,function(Ye){return se[Ye]})}var zy=kne;function Lne(se){return se==null?[]:zy(se,du(se))}var Ld=Lne;var Pne=Math.max;function Ine(se,ge,Ye,Pt){se=jc(se)?se:Ld(se),Ye=Ye&&!Pt?Go(Ye):0;var vr=se.length;return Ye<0&&(Ye=Pne(vr+Ye,0)),qm(se)?Ye<=vr&&se.indexOf(ge,Ye)>-1:!!vr&&Ad(se,ge,Ye)>-1}var r8=Ine;var Rne=Math.max;function Dne(se,ge,Ye){var Pt=se==null?0:se.length;if(!Pt)return-1;var vr=Ye==null?0:Go(Ye);return vr<0&&(vr=Rne(Pt+vr,0)),Ad(se,ge,vr)}var a8=Dne;function zne(se){var ge=se==null?0:se.length;return ge?Xf(se,0,-1):[]}var i8=zne;var Fne=Math.min;function One(se,ge,Ye){for(var Pt=Ye?Iy:Sm,vr=se[0].length,Zr=se.length,ka=Zr,oi=Array(Zr),ci=1/0,Ln=[];ka--;){var bn=se[ka];ka&&ge&&(bn=Sl(bn,bf(ge))),ci=Fne(bn.length,ci),oi[ka]=!Ye&&(ge||vr>=120&&bn.length>=120)?new Dm(ka&&bn):void 0}bn=se[0];var Fn=-1,Uo=oi[0];e:for(;++Fn<vr&&Ln.length<ci;){var ws=bn[Fn],wo=ge?ge(ws):ws;if(ws=Ye||ws!==0?ws:0,!(Uo?Gv(Uo,wo):Pt(Ln,wo,Ye))){for(ka=Zr;--ka;){var Ze=oi[ka];if(!(Ze?Gv(Ze,wo):Pt(se[ka],wo,Ye)))continue e}Uo&&Uo.push(wo),Ln.push(ws)}}return Ln}var Fy=One;function Bne(se){return Su(se)?se:[]}var Oy=Bne;var Nne=Ho(function(se){var ge=Sl(se,Oy);return ge.length&&ge[0]===se[0]?Fy(ge):[]}),n8=Nne;var Une=Ho(function(se){var ge=wf(se),Ye=Sl(se,Oy);return ge===wf(Ye)?ge=void 0:Ye.pop(),Ye.length&&Ye[0]===se[0]?Fy(Ye,bo(ge,2)):[]}),o8=Une;var jne=Ho(function(se){var ge=wf(se),Ye=Sl(se,Oy);return ge=typeof ge=="function"?ge:void 0,ge&&Ye.pop(),Ye.length&&Ye[0]===se[0]?Fy(Ye,void 0,ge):[]}),s8=jne;function qne(se,ge,Ye,Pt){return cp(se,function(vr,Zr,ka){ge(Pt,Ye(vr),Zr,ka)}),Pt}var l8=qne;function Vne(se,ge){return function(Ye,Pt){return l8(Ye,se,ge(Pt),{})}}var Fw=Vne;var Gne=Object.prototype,Hne=Gne.toString,Wne=Fw(function(se,ge,Ye){ge!=null&&typeof ge.toString!="function"&&(ge=Hne.call(ge)),se[ge]=Ye},$g(Fc)),u8=Wne;var c8=Object.prototype,Xne=c8.hasOwnProperty,Zne=c8.toString,Yne=Fw(function(se,ge,Ye){ge!=null&&typeof ge.toString!="function"&&(ge=Zne.call(ge)),Xne.call(se,ge)?se[ge].push(Ye):se[ge]=[Ye]},bo),f8=Yne;function Kne(se,ge){return ge.length<2?se:ud(se,Xf(ge,0,-1))}var Ow=Kne;function Jne(se,ge,Ye){ge=zp(ge,se),se=Ow(se,ge);var Pt=se==null?se:se[Sh(wf(ge))];return Pt==null?void 0:_f(Pt,se,Ye)}var xv=Jne;var $ne=Ho(xv),h8=$ne;var Qne=Ho(function(se,ge,Ye){var Pt=-1,vr=typeof ge=="function",Zr=jc(se)?Array(se.length):[];return Np(se,function(ka){Zr[++Pt]=vr?_f(ge,ka,Ye):xv(ka,ge,Ye)}),Zr}),p8=Qne;var eoe="[object ArrayBuffer]";function toe(se){return Rl(se)&&zc(se)==eoe}var d8=toe;var v8=sp&&sp.isArrayBuffer,roe=v8?bf(v8):d8,m8=roe;var aoe="[object Boolean]";function ioe(se){return se===!0||se===!1||Rl(se)&&zc(se)==aoe}var g8=ioe;var noe="[object Date]";function ooe(se){return Rl(se)&&zc(se)==noe}var y8=ooe;var _8=sp&&sp.isDate,soe=_8?bf(_8):y8,x8=soe;function loe(se){return Rl(se)&&se.nodeType===1&&!gv(se)}var b8=loe;var uoe="[object Map]",coe="[object Set]",foe=Object.prototype,hoe=foe.hasOwnProperty;function poe(se){if(se==null)return!0;if(jc(se)&&(Do(se)||typeof se=="string"||typeof se.splice=="function"||Kp(se)||Ed(se)||dd(se)))return!se.length;var ge=jh(se);if(ge==uoe||ge==coe)return!se.size;if(mv(se))return!iy(se).length;for(var Ye in se)if(hoe.call(se,Ye))return!1;return!0}var w8=poe;function doe(se,ge){return Fm(se,ge)}var T8=doe;function voe(se,ge,Ye){Ye=typeof Ye=="function"?Ye:void 0;var Pt=Ye?Ye(se,ge):void 0;return Pt===void 0?Fm(se,ge,void 0,Ye):!!Pt}var A8=voe;var moe=_u.isFinite;function goe(se){return typeof se=="number"&&moe(se)}var S8=goe;function yoe(se){return typeof se=="number"&&se==Go(se)}var Bw=yoe;function _oe(se,ge){return se===ge||Sy(se,ge,My(ge))}var M8=_oe;function xoe(se,ge,Ye){return Ye=typeof Ye=="function"?Ye:void 0,Sy(se,ge,My(ge),Ye)}var E8=xoe;var boe="[object Number]";function woe(se){return typeof se=="number"||Rl(se)&&zc(se)==boe}var Nw=woe;function Toe(se){return Nw(se)&&se!=+se}var C8=Toe;var Aoe=Xg?ap:ay,k8=Aoe;var Soe="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function Moe(se){if(k8(se))throw new Error(Soe);return wb(se)}var L8=Moe;function Eoe(se){return se==null}var P8=Eoe;function Coe(se){return se===null}var I8=Coe;var koe="[object RegExp]";function Loe(se){return Rl(se)&&zc(se)==koe}var R8=Loe;var D8=sp&&sp.isRegExp,Poe=D8?bf(D8):R8,By=Poe;var z8=9007199254740991;function Ioe(se){return Bw(se)&&se>=-z8&&se<=z8}var F8=Ioe;function Roe(se){return se===void 0}var O8=Roe;var Doe="[object WeakMap]";function zoe(se){return Rl(se)&&jh(se)==Doe}var B8=zoe;var Foe="[object WeakSet]";function Ooe(se){return Rl(se)&&zc(se)==Foe}var N8=Ooe;var Boe=1;function Noe(se){return bo(typeof se=="function"?se:up(se,Boe))}var U8=Noe;var Uoe=Array.prototype,joe=Uoe.join;function qoe(se,ge){return se==null?"":joe.call(se,ge)}var j8=qoe;var Voe=kd(function(se,ge,Ye){return se+(Ye?"-":"")+ge.toLowerCase()}),q8=Voe;var Goe=Om(function(se,ge,Ye){op(se,Ye,ge)}),V8=Goe;function Hoe(se,ge,Ye){for(var Pt=Ye+1;Pt--;)if(se[Pt]===ge)return Pt;return Pt}var G8=Hoe;var Woe=Math.max,Xoe=Math.min;function Zoe(se,ge,Ye){var Pt=se==null?0:se.length;if(!Pt)return-1;var vr=Pt;return Ye!==void 0&&(vr=Go(Ye),vr=vr<0?Woe(Pt+vr,0):Xoe(vr,Pt-1)),ge===ge?G8(se,ge,vr):Am(se,Ib,vr,!0)}var H8=Zoe;var Yoe=kd(function(se,ge,Ye){return se+(Ye?" ":"")+ge.toLowerCase()}),W8=Yoe;var Koe=Hb("toLowerCase"),X8=Koe;function Joe(se,ge){return se<ge}var Ny=Joe;var $oe=jm(Ny),Z8=$oe;var Qoe=jm(function(se,ge){return se<=ge}),Y8=Qoe;function ese(se,ge){var Ye={};return ge=bo(ge,3),cp(se,function(Pt,vr,Zr){op(Ye,ge(Pt,vr,Zr),Pt)}),Ye}var K8=ese;function tse(se,ge){var Ye={};return ge=bo(ge,3),cp(se,function(Pt,vr,Zr){op(Ye,vr,ge(Pt,vr,Zr))}),Ye}var J8=tse;var rse=1;function ase(se){return hw(up(se,rse))}var $8=ase;var ise=1;function nse(se,ge){return dw(se,up(ge,ise))}var Q8=nse;function ose(se,ge,Ye){for(var Pt=-1,vr=se.length;++Pt<vr;){var Zr=se[Pt],ka=ge(Zr);if(ka!=null&&(oi===void 0?ka===ka&&!Rf(ka):Ye(ka,oi)))var oi=ka,ci=Zr}return ci}var Vm=ose;function sse(se){return se&&se.length?Vm(se,Fc,Dy):void 0}var eR=sse;function lse(se,ge){return se&&se.length?Vm(se,bo(ge,2),Dy):void 0}var tR=lse;function use(se,ge){for(var Ye,Pt=-1,vr=se.length;++Pt<vr;){var Zr=ge(se[Pt]);Zr!==void 0&&(Ye=Ye===void 0?Zr:Ye+Zr)}return Ye}var Uy=use;var cse=NaN;function fse(se,ge){var Ye=se==null?0:se.length;return Ye?Uy(se,ge)/Ye:cse}var Uw=fse;function hse(se){return Uw(se,Fc)}var rR=hse;function pse(se,ge){return Uw(se,bo(ge,2))}var aR=pse;var dse=Md(function(se,ge,Ye){Py(se,ge,Ye)}),iR=dse;var vse=Ho(function(se,ge){return function(Ye){return xv(Ye,se,ge)}}),nR=vse;var mse=Ho(function(se,ge){return function(Ye){return xv(se,Ye,ge)}}),oR=mse;function gse(se){return se&&se.length?Vm(se,Fc,Ny):void 0}var sR=gse;function yse(se,ge){return se&&se.length?Vm(se,bo(ge,2),Ny):void 0}var lR=yse;function _se(se,ge,Ye){var Pt=du(ge),vr=Um(ge,Pt),Zr=!(kl(Ye)&&"chain"in Ye)||!!Ye.chain,ka=ap(se);return Nh(vr,function(oi){var ci=ge[oi];se[oi]=ci,ka&&(se.prototype[oi]=function(){var Ln=this.__chain__;if(Zr||Ln){var bn=se(this.__wrapped__),Fn=bn.__actions__=ff(this.__actions__);return Fn.push({func:ci,args:arguments,thisArg:se}),bn.__chain__=Ln,bn}return ci.apply(se,Fp([this.value()],arguments))})}),se}var jw=_se;var xse=bm(function(se,ge){return se*ge},1),uR=xse;var bse="Expected a function";function wse(se){if(typeof se!="function")throw new TypeError(bse);return function(){var ge=arguments;switch(ge.length){case 0:return!se.call(this);case 1:return!se.call(this,ge[0]);case 2:return!se.call(this,ge[0],ge[1]);case 3:return!se.call(this,ge[0],ge[1],ge[2])}return!se.apply(this,ge)}}var Hv=wse;function Tse(se){for(var ge,Ye=[];!(ge=se.next()).done;)Ye.push(ge.value);return Ye}var cR=Tse;var Ase="[object Map]",Sse="[object Set]",BA=If?If.iterator:void 0;function Mse(se){if(!se)return[];if(jc(se))return qm(se)?Uh(se):ff(se);if(BA&&se[BA])return cR(se[BA]());var ge=jh(se),Ye=ge==Ase?Ay:ge==Sse?zm:Ld;return Ye(se)}var qw=Mse;function Ese(){this.__values__===void 0&&(this.__values__=qw(this.value()));var se=this.__index__>=this.__values__.length,ge=se?void 0:this.__values__[this.__index__++];return{done:se,value:ge}}var fR=Ese;function Cse(se,ge){var Ye=se.length;if(Ye)return ge+=ge<0?Ye:0,ip(ge,Ye)?se[ge]:void 0}var Vw=Cse;function kse(se,ge){return se&&se.length?Vw(se,Go(ge)):void 0}var hR=kse;function Lse(se){return se=Go(se),Ho(function(ge){return Vw(ge,se)})}var pR=Lse;function Pse(se,ge){return ge=zp(ge,se),se=Ow(se,ge),se==null||delete se[Sh(wf(ge))]}var jy=Pse;function Ise(se){return gv(se)?void 0:se}var dR=Ise;var Rse=1,Dse=2,zse=4,Fse=lp(function(se,ge){var Ye={};if(se==null)return Ye;var Pt=!1;ge=Sl(ge,function(Zr){return Zr=zp(Zr,se),Pt||(Pt=Zr.length>1),Zr}),Ah(se,xy(se),Ye),Pt&&(Ye=up(Ye,Rse|Dse|zse,dR));for(var vr=ge.length;vr--;)jy(Ye,ge[vr]);return Ye}),vR=Fse;function Ose(se,ge,Ye,Pt){if(!kl(se))return se;ge=zp(ge,se);for(var vr=-1,Zr=ge.length,ka=Zr-1,oi=se;oi!=null&&++vr<Zr;){var ci=Sh(ge[vr]),Ln=Ye;if(ci==="__proto__"||ci==="constructor"||ci==="prototype")return se;if(vr!=ka){var bn=oi[ci];Ln=Pt?Pt(bn,ci,oi):void 0,Ln===void 0&&(Ln=kl(bn)?bn:ip(ge[vr+1])?[]:{})}vv(oi,ci,Ln),oi=oi[ci]}return se}var bv=Ose;function Bse(se,ge,Ye){for(var Pt=-1,vr=ge.length,Zr={};++Pt<vr;){var ka=ge[Pt],oi=ud(se,ka);Ye(oi,ka)&&bv(Zr,zp(ka,se),oi)}return Zr}var Gw=Bse;function Nse(se,ge){if(se==null)return{};var Ye=Sl(xy(se),function(Pt){return[Pt]});return ge=bo(ge),Gw(se,Ye,function(Pt,vr){return ge(Pt,vr[0])})}var Hw=Nse;function Use(se,ge){return Hw(se,Hv(bo(ge)))}var mR=Use;function jse(se){return Vb(2,se)}var gR=jse;function qse(se,ge){var Ye=se.length;for(se.sort(ge);Ye--;)se[Ye]=se[Ye].value;return se}var yR=qse;function Vse(se,ge){if(se!==ge){var Ye=se!==void 0,Pt=se===null,vr=se===se,Zr=Rf(se),ka=ge!==void 0,oi=ge===null,ci=ge===ge,Ln=Rf(ge);if(!oi&&!Ln&&!Zr&&se>ge||Zr&&ka&&ci&&!oi&&!Ln||Pt&&ka&&ci||!Ye&&ci||!vr)return 1;if(!Pt&&!Zr&&!Ln&&se<ge||Ln&&Ye&&vr&&!Pt&&!Zr||oi&&Ye&&vr||!ka&&vr||!ci)return-1}return 0}var Ww=Vse;function Gse(se,ge,Ye){for(var Pt=-1,vr=se.criteria,Zr=ge.criteria,ka=vr.length,oi=Ye.length;++Pt<ka;){var ci=Ww(vr[Pt],Zr[Pt]);if(ci){if(Pt>=oi)return ci;var Ln=Ye[Pt];return ci*(Ln=="desc"?-1:1)}}return se.index-ge.index}var _R=Gse;function Hse(se,ge,Ye){ge.length?ge=Sl(ge,function(Zr){return Do(Zr)?function(ka){return ud(ka,Zr.length===1?Zr[0]:Zr)}:Zr}):ge=[Fc];var Pt=-1;ge=Sl(ge,bf(bo));var vr=Dw(se,function(Zr,ka,oi){var ci=Sl(ge,function(Ln){return Ln(Zr)});return{criteria:ci,index:++Pt,value:Zr}});return yR(vr,function(Zr,ka){return _R(Zr,ka,Ye)})}var Xw=Hse;function Wse(se,ge,Ye,Pt){return se==null?[]:(Do(ge)||(ge=ge==null?[]:[ge]),Ye=Pt?void 0:Ye,Do(Ye)||(Ye=Ye==null?[]:[Ye]),Xw(se,ge,Ye))}var xR=Wse;function Xse(se){return lp(function(ge){return ge=Sl(ge,bf(bo)),Ho(function(Ye){var Pt=this;return se(ge,function(vr){return _f(vr,Pt,Ye)})})})}var qy=Xse;var Zse=qy(Sl),bR=Zse;var Yse=Ho,wR=Yse;var Kse=Math.min,Jse=wR(function(se,ge){ge=ge.length==1&&Do(ge[0])?Sl(ge[0],bf(bo)):Sl(Qu(ge,1),bf(bo));var Ye=ge.length;return Ho(function(Pt){for(var vr=-1,Zr=Kse(Pt.length,Ye);++vr<Zr;)Pt[vr]=ge[vr].call(this,Pt[vr]);return _f(se,this,Pt)})}),TR=Jse;var $se=qy(Ew),AR=$se;var Qse=qy(Ty),SR=Qse;var ele=9007199254740991,tle=Math.floor;function rle(se,ge){var Ye="";if(!se||ge<1||ge>ele)return Ye;do ge%2&&(Ye+=se),ge=tle(ge/2),ge&&(se+=se);while(ge);return Ye}var m_=rle;var ale=Cy("length"),MR=ale;var CR="\\ud800-\\udfff",ile="\\u0300-\\u036f",nle="\\ufe20-\\ufe2f",ole="\\u20d0-\\u20ff",sle=ile+nle+ole,lle="\\ufe0e\\ufe0f",ule="["+CR+"]",NA="["+sle+"]",UA="\\ud83c[\\udffb-\\udfff]",cle="(?:"+NA+"|"+UA+")",kR="[^"+CR+"]",LR="(?:\\ud83c[\\udde6-\\uddff]){2}",PR="[\\ud800-\\udbff][\\udc00-\\udfff]",fle="\\u200d",IR=cle+"?",RR="["+lle+"]?",hle="(?:"+fle+"(?:"+[kR,LR,PR].join("|")+")"+RR+IR+")*",ple=RR+IR+hle,dle="(?:"+[kR+NA+"?",NA,LR,PR,ule].join("|")+")",ER=RegExp(UA+"(?="+UA+")|"+dle+ple,"g");function vle(se){for(var ge=ER.lastIndex=0;ER.test(se);)++ge;return ge}var DR=vle;function mle(se){return Cd(se)?DR(se):MR(se)}var Pd=mle;var gle=Math.ceil;function yle(se,ge){ge=ge===void 0?" ":ah(ge);var Ye=ge.length;if(Ye<2)return Ye?m_(ge,se):ge;var Pt=m_(ge,gle(se/Pd(ge)));return Cd(ge)?Op(Uh(Pt),0,se).join(""):Pt.slice(0,se)}var V0=yle;var _le=Math.ceil,xle=Math.floor;function ble(se,ge,Ye){se=Ds(se),ge=Go(ge);var Pt=ge?Pd(se):0;if(!ge||Pt>=ge)return se;var vr=(ge-Pt)/2;return V0(xle(vr),Ye)+se+V0(_le(vr),Ye)}var zR=ble;function wle(se,ge,Ye){se=Ds(se),ge=Go(ge);var Pt=ge?Pd(se):0;return ge&&Pt<ge?se+V0(ge-Pt,Ye):se}var FR=wle;function Tle(se,ge,Ye){se=Ds(se),ge=Go(ge);var Pt=ge?Pd(se):0;return ge&&Pt<ge?V0(ge-Pt,Ye)+se:se}var OR=Tle;var Ale=/^\s+/,Sle=_u.parseInt;function Mle(se,ge,Ye){return Ye||ge==null?ge=0:ge&&(ge=+ge),Sle(Ds(se).replace(Ale,""),ge||0)}var BR=Mle;var Ele=32,jA=Ho(function(se,ge){var Ye=Yp(ge,Sd(jA));return np(se,Ele,void 0,ge,Ye)});jA.placeholder={};var Zw=jA;var Cle=64,qA=Ho(function(se,ge){var Ye=Yp(ge,Sd(qA));return np(se,Cle,void 0,ge,Ye)});qA.placeholder={};var NR=qA;var kle=Om(function(se,ge,Ye){se[Ye?0:1].push(ge)},function(){return[[],[]]}),UR=kle;function Lle(se,ge){return Gw(se,ge,function(Ye,Pt){return Ey(se,Pt)})}var jR=Lle;var Ple=lp(function(se,ge){return se==null?{}:jR(se,ge)}),qR=Ple;function Ile(se){for(var ge,Ye=this;Ye instanceof wm;){var Pt=Cb(Ye);Pt.__index__=0,Pt.__values__=void 0,ge?vr.__wrapped__=Pt:ge=Pt;var vr=Pt;Ye=Ye.__wrapped__}return vr.__wrapped__=se,ge}var VR=Ile;function Rle(se){return function(ge){return se==null?void 0:ud(se,ge)}}var GR=Rle;function Dle(se,ge,Ye,Pt){for(var vr=Ye-1,Zr=se.length;++vr<Zr;)if(Pt(se[vr],ge))return vr;return-1}var HR=Dle;var zle=Array.prototype,WR=zle.splice;function Fle(se,ge,Ye,Pt){var vr=Pt?HR:Ad,Zr=-1,ka=ge.length,oi=se;for(se===ge&&(ge=ff(ge)),Ye&&(oi=Sl(se,bf(Ye)));++Zr<ka;)for(var ci=0,Ln=ge[Zr],bn=Ye?Ye(Ln):Ln;(ci=vr(oi,bn,ci,Pt))>-1;)oi!==se&&WR.call(oi,ci,1),WR.call(se,ci,1);return se}var Vy=Fle;function Ole(se,ge){return se&&se.length&&ge&&ge.length?Vy(se,ge):se}var Yw=Ole;var Ble=Ho(Yw),XR=Ble;function Nle(se,ge,Ye){return se&&se.length&&ge&&ge.length?Vy(se,ge,bo(Ye,2)):se}var ZR=Nle;function Ule(se,ge,Ye){return se&&se.length&&ge&&ge.length?Vy(se,ge,void 0,Ye):se}var YR=Ule;var jle=Array.prototype,qle=jle.splice;function Vle(se,ge){for(var Ye=se?ge.length:0,Pt=Ye-1;Ye--;){var vr=ge[Ye];if(Ye==Pt||vr!==Zr){var Zr=vr;ip(vr)?qle.call(se,vr,1):jy(se,vr)}}return se}var Kw=Vle;var Gle=lp(function(se,ge){var Ye=se==null?0:se.length,Pt=cy(se,ge);return Kw(se,Sl(ge,function(vr){return ip(vr,Ye)?+vr:vr}).sort(Ww)),Pt}),KR=Gle;var Hle=Math.floor,Wle=Math.random;function Xle(se,ge){return se+Hle(Wle()*(ge-se+1))}var Gy=Xle;var Zle=parseFloat,Yle=Math.min,Kle=Math.random;function Jle(se,ge,Ye){if(Ye&&typeof Ye!="boolean"&&Oc(se,ge,Ye)&&(ge=Ye=void 0),Ye===void 0&&(typeof ge=="boolean"?(Ye=ge,ge=void 0):typeof se=="boolean"&&(Ye=se,se=void 0)),se===void 0&&ge===void 0?(se=0,ge=1):(se=sd(se),ge===void 0?(ge=se,se=0):ge=sd(ge)),se>ge){var Pt=se;se=ge,ge=Pt}if(Ye||se%1||ge%1){var vr=Kle();return Yle(se+vr*(ge-se+Zle("1e-"+((vr+"").length-1))),ge)}return Gy(se,ge)}var JR=Jle;var $le=Math.ceil,Qle=Math.max;function eue(se,ge,Ye,Pt){for(var vr=-1,Zr=Qle($le((ge-se)/(Ye||1)),0),ka=Array(Zr);Zr--;)ka[Pt?Zr:++vr]=se,se+=Ye;return ka}var $R=eue;function tue(se){return function(ge,Ye,Pt){return Pt&&typeof Pt!="number"&&Oc(ge,Ye,Pt)&&(Ye=Pt=void 0),ge=sd(ge),Ye===void 0?(Ye=ge,ge=0):Ye=sd(Ye),Pt=Pt===void 0?ge<Ye?1:-1:sd(Pt),$R(ge,Ye,Pt,se)}}var Jw=tue;var rue=Jw(),QR=rue;var aue=Jw(!0),e4=aue;var iue=256,nue=lp(function(se,ge){return np(se,iue,void 0,void 0,void 0,ge)}),t4=nue;function oue(se,ge,Ye,Pt,vr){return vr(se,function(Zr,ka,oi){Ye=Pt?(Pt=!1,Zr):ge(Ye,Zr,ka,oi)}),Ye}var $w=oue;function sue(se,ge,Ye){var Pt=Do(se)?py:$w,vr=arguments.length<3;return Pt(se,bo(ge,4),Ye,vr,Np)}var r4=sue;function lue(se,ge,Ye,Pt){var vr=se==null?0:se.length;for(Pt&&vr&&(Ye=se[--vr]);vr--;)Ye=ge(Ye,se[vr],vr,se);return Ye}var a4=lue;function uue(se,ge,Ye){var Pt=Do(se)?a4:$w,vr=arguments.length<3;return Pt(se,bo(ge,4),Ye,vr,Aw)}var i4=uue;function cue(se,ge){var Ye=Do(se)?Bp:kw;return Ye(se,Hv(bo(ge,3)))}var n4=cue;function fue(se,ge){var Ye=[];if(!(se&&se.length))return Ye;var Pt=-1,vr=[],Zr=se.length;for(ge=bo(ge,3);++Pt<Zr;){var ka=se[Pt];ge(ka,Pt,se)&&(Ye.push(ka),vr.push(Pt))}return Kw(se,vr),Ye}var o4=fue;function hue(se,ge,Ye){return(Ye?Oc(se,ge,Ye):ge===void 0)?ge=1:ge=Go(ge),m_(Ds(se),ge)}var s4=hue;function pue(){var se=arguments,ge=Ds(se[0]);return se.length<3?ge:ge.replace(se[1],se[2])}var l4=pue;var due="Expected a function";function vue(se,ge){if(typeof se!="function")throw new TypeError(due);return ge=ge===void 0?ge:Go(ge),Ho(se,ge)}var u4=vue;function mue(se,ge,Ye){ge=zp(ge,se);var Pt=-1,vr=ge.length;for(vr||(vr=1,se=void 0);++Pt<vr;){var Zr=se?.[Sh(ge[Pt])];Zr===void 0&&(Pt=vr,Zr=Ye),se=ap(Zr)?Zr.call(se):Zr}return se}var c4=mue;var gue=Array.prototype,yue=gue.reverse;function _ue(se){return se==null?se:yue.call(se)}var g_=_ue;var xue=my("round"),f4=xue;function bue(se){var ge=se.length;return ge?se[Gy(0,ge-1)]:void 0}var Qw=bue;function wue(se){return Qw(Ld(se))}var h4=wue;function Tue(se){var ge=Do(se)?Qw:h4;return ge(se)}var p4=Tue;function Aue(se,ge){var Ye=-1,Pt=se.length,vr=Pt-1;for(ge=ge===void 0?Pt:ge;++Ye<ge;){var Zr=Gy(Ye,vr),ka=se[Zr];se[Zr]=se[Ye],se[Ye]=ka}return se.length=ge,se}var Gm=Aue;function Sue(se,ge){return Gm(ff(se),cd(ge,0,se.length))}var d4=Sue;function Mue(se,ge){var Ye=Ld(se);return Gm(Ye,cd(ge,0,Ye.length))}var v4=Mue;function Eue(se,ge,Ye){(Ye?Oc(se,ge,Ye):ge===void 0)?ge=1:ge=Go(ge);var Pt=Do(se)?d4:v4;return Pt(se,ge)}var m4=Eue;function Cue(se,ge,Ye){return se==null?se:bv(se,ge,Ye)}var g4=Cue;function kue(se,ge,Ye,Pt){return Pt=typeof Pt=="function"?Pt:void 0,se==null?se:bv(se,ge,Ye,Pt)}var y4=kue;function Lue(se){return Gm(ff(se))}var _4=Lue;function Pue(se){return Gm(Ld(se))}var x4=Pue;function Iue(se){var ge=Do(se)?_4:x4;return ge(se)}var b4=Iue;var Rue="[object Map]",Due="[object Set]";function zue(se){if(se==null)return 0;if(jc(se))return qm(se)?Pd(se):se.length;var ge=jh(se);return ge==Rue||ge==Due?se.size:iy(se).length}var w4=zue;function Fue(se,ge,Ye){var Pt=se==null?0:se.length;return Pt?(Ye&&typeof Ye!="number"&&Oc(se,ge,Ye)?(ge=0,Ye=Pt):(ge=ge==null?0:Go(ge),Ye=Ye===void 0?Pt:Go(Ye)),Xf(se,ge,Ye)):[]}var T4=Fue;var Oue=kd(function(se,ge,Ye){return se+(Ye?"_":"")+ge.toLowerCase()}),A4=Oue;function Bue(se,ge){var Ye;return Np(se,function(Pt,vr,Zr){return Ye=ge(Pt,vr,Zr),!Ye}),!!Ye}var S4=Bue;function Nue(se,ge,Ye){var Pt=Do(se)?Ty:S4;return Ye&&Oc(se,ge,Ye)&&(ge=void 0),Pt(se,bo(ge,3))}var M4=Nue;var Uue=Ho(function(se,ge){if(se==null)return[];var Ye=ge.length;return Ye>1&&Oc(se,ge[0],ge[1])?ge=[]:Ye>2&&Oc(ge[0],ge[1],ge[2])&&(ge=[ge[0]]),Xw(se,Qu(ge,1),[])}),E4=Uue;var jue=4294967295,que=jue-1,Vue=Math.floor,Gue=Math.min;function Hue(se,ge,Ye,Pt){var vr=0,Zr=se==null?0:se.length;if(Zr===0)return 0;ge=Ye(ge);for(var ka=ge!==ge,oi=ge===null,ci=Rf(ge),Ln=ge===void 0;vr<Zr;){var bn=Vue((vr+Zr)/2),Fn=Ye(se[bn]),Uo=Fn!==void 0,ws=Fn===null,wo=Fn===Fn,Ze=Rf(Fn);if(ka)var Ws=Pt||wo;else Ln?Ws=wo&&(Pt||Uo):oi?Ws=wo&&Uo&&(Pt||!ws):ci?Ws=wo&&Uo&&!ws&&(Pt||!Ze):ws||Ze?Ws=!1:Ws=Pt?Fn<=ge:Fn<ge;Ws?vr=bn+1:Zr=bn}return Gue(Zr,que)}var Hy=Hue;var Wue=4294967295,Xue=Wue>>>1;function Zue(se,ge,Ye){var Pt=0,vr=se==null?Pt:se.length;if(typeof ge=="number"&&ge===ge&&vr<=Xue){for(;Pt<vr;){var Zr=Pt+vr>>>1,ka=se[Zr];ka!==null&&!Rf(ka)&&(Ye?ka<=ge:ka<ge)?Pt=Zr+1:vr=Zr}return vr}return Hy(se,ge,Fc,Ye)}var Hm=Zue;function Yue(se,ge){return Hm(se,ge)}var C4=Yue;function Kue(se,ge,Ye){return Hy(se,ge,bo(Ye,2))}var k4=Kue;function Jue(se,ge){var Ye=se==null?0:se.length;if(Ye){var Pt=Hm(se,ge);if(Pt<Ye&&ih(se[Pt],ge))return Pt}return-1}var L4=Jue;function $ue(se,ge){return Hm(se,ge,!0)}var P4=$ue;function Que(se,ge,Ye){return Hy(se,ge,bo(Ye,2),!0)}var I4=Que;function ece(se,ge){var Ye=se==null?0:se.length;if(Ye){var Pt=Hm(se,ge,!0)-1;if(ih(se[Pt],ge))return Pt}return-1}var R4=ece;function tce(se,ge){for(var Ye=-1,Pt=se.length,vr=0,Zr=[];++Ye<Pt;){var ka=se[Ye],oi=ge?ge(ka):ka;if(!Ye||!ih(oi,ci)){var ci=oi;Zr[vr++]=ka===0?0:ka}}return Zr}var e2=tce;function rce(se){return se&&se.length?e2(se):[]}var D4=rce;function ace(se,ge){return se&&se.length?e2(se,bo(ge,2)):[]}var z4=ace;var ice=4294967295;function nce(se,ge,Ye){return Ye&&typeof Ye!="number"&&Oc(se,ge,Ye)&&(ge=Ye=void 0),Ye=Ye===void 0?ice:Ye>>>0,Ye?(se=Ds(se),se&&(typeof ge=="string"||ge!=null&&!By(ge))&&(ge=ah(ge),!ge&&Cd(se))?Op(Uh(se),0,Ye):se.split(ge,Ye)):[]}var F4=nce;var oce="Expected a function",sce=Math.max;function lce(se,ge){if(typeof se!="function")throw new TypeError(oce);return ge=ge==null?0:sce(Go(ge),0),Ho(function(Ye){var Pt=Ye[ge],vr=Op(Ye,0,ge);return Pt&&Fp(vr,Pt),_f(se,this,vr)})}var O4=lce;var uce=kd(function(se,ge,Ye){return se+(Ye?" ":"")+hy(ge)}),B4=uce;function cce(se,ge,Ye){return se=Ds(se),Ye=Ye==null?0:cd(Go(Ye),0,se.length),ge=ah(ge),se.slice(Ye,Ye+ge.length)==ge}var N4=cce;function fce(){return{}}var U4=fce;function hce(){return""}var j4=hce;function pce(){return!0}var q4=pce;var dce=bm(function(se,ge){return se-ge},0),V4=dce;function vce(se){return se&&se.length?Uy(se,Fc):0}var G4=vce;function mce(se,ge){return se&&se.length?Uy(se,bo(ge,2)):0}var H4=mce;function gce(se){var ge=se==null?0:se.length;return ge?Xf(se,1,ge):[]}var W4=gce;function yce(se,ge,Ye){return se&&se.length?(ge=Ye||ge===void 0?1:Go(ge),Xf(se,0,ge<0?0:ge)):[]}var X4=yce;function _ce(se,ge,Ye){var Pt=se==null?0:se.length;return Pt?(ge=Ye||ge===void 0?1:Go(ge),ge=Pt-ge,Xf(se,ge<0?0:ge,Pt)):[]}var Z4=_ce;function xce(se,ge){return se&&se.length?Bm(se,bo(ge,3),!1,!0):[]}var Y4=xce;function bce(se,ge){return se&&se.length?Bm(se,bo(ge,3)):[]}var K4=bce;function wce(se,ge){return ge(se),se}var J4=wce;var $4=Object.prototype,Tce=$4.hasOwnProperty;function Ace(se,ge,Ye,Pt){return se===void 0||ih(se,$4[Ye])&&!Tce.call(Pt,Ye)?ge:se}var VA=Ace;var Sce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Mce(se){return"\\"+Sce[se]}var Q4=Mce;var Ece=/<%=([\s\S]+?)%>/g,t2=Ece;var Cce=/<%-([\s\S]+?)%>/g,eD=Cce;var kce=/<%([\s\S]+?)%>/g,tD=kce;var Lce={escape:eD,evaluate:tD,interpolate:t2,variable:"",imports:{_:{escape:Mw}}},y_=Lce;var Pce="Invalid `variable` option passed into `_.template`",Ice=/\b__p \+= '';/g,Rce=/\b(__p \+=) '' \+/g,Dce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zce=/[()=,{}\[\]\/\s]/,Fce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,r2=/($^)/,Oce=/['\n\r\u2028\u2029\\]/g,Bce=Object.prototype,rD=Bce.hasOwnProperty;function Nce(se,ge,Ye){var Pt=y_.imports._.templateSettings||y_;Ye&&Oc(se,ge,Ye)&&(ge=void 0),se=Ds(se),ge=Em({},ge,Pt,VA);var vr=Em({},ge.imports,Pt.imports,VA),Zr=du(vr),ka=zy(vr,Zr),oi,ci,Ln=0,bn=ge.interpolate||r2,Fn="__p += '",Uo=RegExp((ge.escape||r2).source+"|"+bn.source+"|"+(bn===t2?Fce:r2).source+"|"+(ge.evaluate||r2).source+"|$","g"),ws=rD.call(ge,"sourceURL")?"//# sourceURL="+(ge.sourceURL+"").replace(/\s/g," ")+`
`:"";se.replace(Uo,function(Ws,Yl,cu,nh,Eh,Up){return cu||(cu=nh),Fn+=se.slice(Ln,Up).replace(Oce,Q4),Yl&&(oi=!0,Fn+=`' +
__e(`+Yl+`) +
'`),Eh&&(ci=!0,Fn+=`';
`+Eh+`;
__p += '`),cu&&(Fn+=`' +
((__t = (`+cu+`)) == null ? '' : __t) +
'`),Ln=Up+Ws.length,Ws}),Fn+=`';
`;var wo=rD.call(ge,"variable")&&ge.variable;if(!wo)Fn=`with (obj) {
`+Fn+`
}
`;else if(zce.test(wo))throw new Error(Pce);Fn=(ci?Fn.replace(Ice,""):Fn).replace(Rce,"$1").replace(Dce,"$1;"),Fn="function("+(wo||"obj")+`) {
`+(wo?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(oi?", __e = _.escape":"")+(ci?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Fn+`return __p
}`;var Ze=qb(function(){return Function(Zr,ws+"return "+Fn).apply(void 0,ka)});if(Ze.source=Fn,fy(Ze))throw Ze;return Ze}var aD=Nce;var Uce="Expected a function";function jce(se,ge,Ye){var Pt=!0,vr=!0;if(typeof se!="function")throw new TypeError(Uce);return kl(Ye)&&(Pt="leading"in Ye?!!Ye.leading:Pt,vr="trailing"in Ye?!!Ye.trailing:vr),_w(se,ge,{leading:Pt,maxWait:ge,trailing:vr})}var iD=jce;function qce(se,ge){return ge(se)}var Wv=qce;var Vce=9007199254740991,GA=4294967295,Gce=Math.min;function Hce(se,ge){if(se=Go(se),se<1||se>Vce)return[];var Ye=GA,Pt=Gce(se,GA);ge=Mh(ge),se-=GA;for(var vr=ry(Pt,ge);++Ye<se;)ge(Ye);return vr}var nD=Hce;function Wce(){return this}var oD=Wce;function Xce(se,ge){var Ye=se;return Ye instanceof Bl&&(Ye=Ye.value()),py(ge,function(Pt,vr){return vr.func.apply(vr.thisArg,Fp([Pt],vr.args))},Ye)}var a2=Xce;function Zce(){return a2(this.__wrapped__,this.__actions__)}var Wm=Zce;function Yce(se){return Ds(se).toLowerCase()}var sD=Yce;function Kce(se){return Do(se)?Sl(se,Sh):Rf(se)?[se]:ff(Ub(Ds(se)))}var lD=Kce;var uD=9007199254740991;function Jce(se){return se?cd(Go(se),-uD,uD):se===0?se:0}var cD=Jce;function $ce(se){return Ds(se).toUpperCase()}var fD=$ce;function Qce(se,ge,Ye){var Pt=Do(se),vr=Pt||Kp(se)||Ed(se);if(ge=bo(ge,4),Ye==null){var Zr=se&&se.constructor;vr?Ye=Pt?new Zr:[]:kl(se)?Ye=ap(Zr)?Td(Im(se)):{}:Ye={}}return(vr?Nh:cp)(se,function(ka,oi,ci){return ge(Ye,ka,oi,ci)}),Ye}var hD=Qce;function efe(se,ge){for(var Ye=se.length;Ye--&&Ad(ge,se[Ye],0)>-1;);return Ye}var i2=efe;function tfe(se,ge){for(var Ye=-1,Pt=se.length;++Ye<Pt&&Ad(ge,se[Ye],0)>-1;);return Ye}var n2=tfe;function rfe(se,ge,Ye){if(se=Ds(se),se&&(Ye||ge===void 0))return bb(se);if(!se||!(ge=ah(ge)))return se;var Pt=Uh(se),vr=Uh(ge),Zr=n2(Pt,vr),ka=i2(Pt,vr)+1;return Op(Pt,Zr,ka).join("")}var pD=rfe;function afe(se,ge,Ye){if(se=Ds(se),se&&(Ye||ge===void 0))return se.slice(0,xb(se)+1);if(!se||!(ge=ah(ge)))return se;var Pt=Uh(se),vr=i2(Pt,Uh(ge))+1;return Op(Pt,0,vr).join("")}var dD=afe;var ife=/^\s+/;function nfe(se,ge,Ye){if(se=Ds(se),se&&(Ye||ge===void 0))return se.replace(ife,"");if(!se||!(ge=ah(ge)))return se;var Pt=Uh(se),vr=n2(Pt,Uh(ge));return Op(Pt,vr).join("")}var vD=nfe;var ofe=30,sfe="...",lfe=/\w*$/;function ufe(se,ge){var Ye=ofe,Pt=sfe;if(kl(ge)){var vr="separator"in ge?ge.separator:vr;Ye="length"in ge?Go(ge.length):Ye,Pt="omission"in ge?ah(ge.omission):Pt}se=Ds(se);var Zr=se.length;if(Cd(se)){var ka=Uh(se);Zr=ka.length}if(Ye>=Zr)return se;var oi=Ye-Pd(Pt);if(oi<1)return Pt;var ci=ka?Op(ka,0,oi).join(""):se.slice(0,oi);if(vr===void 0)return ci+Pt;if(ka&&(oi+=ci.length-oi),By(vr)){if(se.slice(oi).search(vr)){var Ln,bn=ci;for(vr.global||(vr=RegExp(vr.source,Ds(lfe.exec(vr))+"g")),vr.lastIndex=0;Ln=vr.exec(bn);)var Fn=Ln.index;ci=ci.slice(0,Fn===void 0?oi:Fn)}}else if(se.indexOf(ah(vr),oi)!=oi){var Uo=ci.lastIndexOf(vr);Uo>-1&&(ci=ci.slice(0,Uo))}return ci+Pt}var mD=ufe;function cfe(se){return zb(se,1)}var gD=cfe;var ffe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},hfe=dy(ffe),yD=hfe;var _D=/&(?:amp|lt|gt|quot|#39);/g,pfe=RegExp(_D.source);function dfe(se){return se=Ds(se),se&&pfe.test(se)?se.replace(_D,yD):se}var xD=dfe;var vfe=1/0,mfe=Rm&&1/zm(new Rm([,-0]))[1]==vfe?function(se){return new Rm(se)}:Yg,bD=mfe;var gfe=200;function yfe(se,ge,Ye){var Pt=-1,vr=Sm,Zr=se.length,ka=!0,oi=[],ci=oi;if(Ye)ka=!1,vr=Iy;else if(Zr>=gfe){var Ln=ge?null:bD(se);if(Ln)return zm(Ln);ka=!1,vr=Gv,ci=new Dm}else ci=ge?[]:oi;e:for(;++Pt<Zr;){var bn=se[Pt],Fn=ge?ge(bn):bn;if(bn=Ye||bn!==0?bn:0,ka&&Fn===Fn){for(var Uo=ci.length;Uo--;)if(ci[Uo]===Fn)continue e;ge&&ci.push(Fn),oi.push(bn)}else vr(ci,Fn,Ye)||(ci!==oi&&ci.push(Fn),oi.push(bn))}return oi}var Jp=yfe;var _fe=Ho(function(se){return Jp(Qu(se,1,Su,!0))}),wD=_fe;var xfe=Ho(function(se){var ge=wf(se);return Su(ge)&&(ge=void 0),Jp(Qu(se,1,Su,!0),bo(ge,2))}),TD=xfe;var bfe=Ho(function(se){var ge=wf(se);return ge=typeof ge=="function"?ge:void 0,Jp(Qu(se,1,Su,!0),void 0,ge)}),AD=bfe;function wfe(se){return se&&se.length?Jp(se):[]}var SD=wfe;function Tfe(se,ge){return se&&se.length?Jp(se,bo(ge,2)):[]}var MD=Tfe;function Afe(se,ge){return ge=typeof ge=="function"?ge:void 0,se&&se.length?Jp(se,void 0,ge):[]}var ED=Afe;var Sfe=0;function Mfe(se){var ge=++Sfe;return Ds(se)+ge}var CD=Mfe;function Efe(se,ge){return se==null?!0:jy(se,ge)}var kD=Efe;var Cfe=Math.max;function kfe(se){if(!(se&&se.length))return[];var ge=0;return se=Bp(se,function(Ye){if(Su(Ye))return ge=Cfe(Ye.length,ge),!0}),ry(ge,function(Ye){return Sl(se,Cy(Ye))})}var Wy=kfe;function Lfe(se,ge){if(!(se&&se.length))return[];var Ye=Wy(se);return ge==null?Ye:Sl(Ye,function(Pt){return _f(ge,void 0,Pt)})}var o2=Lfe;function Pfe(se,ge,Ye,Pt){return bv(se,ge,Ye(ud(se,ge)),Pt)}var s2=Pfe;function Ife(se,ge,Ye){return se==null?se:s2(se,ge,Mh(Ye))}var LD=Ife;function Rfe(se,ge,Ye,Pt){return Pt=typeof Pt=="function"?Pt:void 0,se==null?se:s2(se,ge,Mh(Ye),Pt)}var PD=Rfe;var Dfe=kd(function(se,ge,Ye){return se+(Ye?" ":"")+ge.toUpperCase()}),ID=Dfe;function zfe(se){return se==null?[]:zy(se,qc(se))}var RD=zfe;var Ffe=Ho(function(se,ge){return Su(se)?_v(se,ge):[]}),DD=Ffe;function Ofe(se,ge){return Zw(Mh(ge),se)}var zD=Ofe;var Bfe=lp(function(se){var ge=se.length,Ye=ge?se[0]:0,Pt=this.__wrapped__,vr=function(Zr){return cy(Zr,se)};return ge>1||this.__actions__.length||!(Pt instanceof Bl)||!ip(Ye)?this.thru(vr):(Pt=Pt.slice(Ye,+Ye+(ge?1:0)),Pt.__actions__.push({func:Wv,args:[vr],thisArg:void 0}),new Dp(Pt,this.__chain__).thru(function(Zr){return ge&&!Zr.length&&Zr.push(void 0),Zr}))}),FD=Bfe;function Nfe(){return Yb(this)}var OD=Nfe;function Ufe(){var se=this.__wrapped__;if(se instanceof Bl){var ge=se;return this.__actions__.length&&(ge=new Bl(this)),ge=ge.reverse(),ge.__actions__.push({func:Wv,args:[g_],thisArg:void 0}),new Dp(ge,this.__chain__)}return this.thru(g_)}var BD=Ufe;function jfe(se,ge,Ye){var Pt=se.length;if(Pt<2)return Pt?Jp(se[0]):[];for(var vr=-1,Zr=Array(Pt);++vr<Pt;)for(var ka=se[vr],oi=-1;++oi<Pt;)oi!=vr&&(Zr[vr]=_v(Zr[vr]||ka,se[oi],ge,Ye));return Jp(Qu(Zr,1),ge,Ye)}var Xy=jfe;var qfe=Ho(function(se){return Xy(Bp(se,Su))}),ND=qfe;var Vfe=Ho(function(se){var ge=wf(se);return Su(ge)&&(ge=void 0),Xy(Bp(se,Su),bo(ge,2))}),UD=Vfe;var Gfe=Ho(function(se){var ge=wf(se);return ge=typeof ge=="function"?ge:void 0,Xy(Bp(se,Su),void 0,ge)}),jD=Gfe;var Hfe=Ho(Wy),qD=Hfe;function Wfe(se,ge,Ye){for(var Pt=-1,vr=se.length,Zr=ge.length,ka={};++Pt<vr;){var oi=Pt<Zr?ge[Pt]:void 0;Ye(ka,se[Pt],oi)}return ka}var l2=Wfe;function Xfe(se,ge){return l2(se||[],ge||[],vv)}var VD=Xfe;function Zfe(se,ge){return l2(se||[],ge||[],bv)}var GD=Zfe;var Yfe=Ho(function(se){var ge=se.length,Ye=ge>1?se[ge-1]:void 0;return Ye=typeof Ye=="function"?(se.pop(),Ye):void 0,o2(se,Ye)}),HD=Yfe;var ds={chunk:VL,compact:CP,concat:kP,difference:lI,differenceBy:uI,differenceWith:cI,drop:hI,dropRight:pI,dropRightWhile:dI,dropWhile:vI,fill:EI,findIndex:Pw,findLastIndex:Rw,first:v_,flatten:jb,flattenDeep:FI,flattenDepth:OI,fromPairs:WI,head:v_,indexOf:a8,initial:i8,intersection:n8,intersectionBy:o8,intersectionWith:s8,join:j8,last:wf,lastIndexOf:H8,nth:hR,pull:XR,pullAll:Yw,pullAllBy:ZR,pullAllWith:YR,pullAt:KR,remove:o4,reverse:g_,slice:T4,sortedIndex:C4,sortedIndexBy:k4,sortedIndexOf:L4,sortedLastIndex:P4,sortedLastIndexBy:I4,sortedLastIndexOf:R4,sortedUniq:D4,sortedUniqBy:z4,tail:W4,take:X4,takeRight:Z4,takeRightWhile:Y4,takeWhile:K4,union:wD,unionBy:TD,unionWith:AD,uniq:SD,uniqBy:MD,uniqWith:ED,unzip:Wy,unzipWith:o2,without:DD,xor:ND,xorBy:UD,xorWith:jD,zip:qD,zipObject:VD,zipObjectDeep:GD,zipWith:HD};var _c={countBy:ZP,each:f_,eachRight:h_,every:SI,filter:CI,find:kI,findLast:PI,flatMap:RI,flatMapDeep:DI,flatMapDepth:zI,forEach:f_,forEachRight:h_,groupBy:YI,includes:r8,invokeMap:p8,keyBy:V8,map:Nm,orderBy:xR,partition:UR,reduce:r4,reduceRight:i4,reject:n4,sample:p4,sampleSize:m4,shuffle:b4,size:w4,some:M4,sortBy:E4};var HA={now:Ly};var Df={after:rk,ary:zb,before:Vb,bind:Gb,bindKey:cL,curry:KP,curryRight:JP,debounce:_w,defer:oI,delay:sI,flip:BI,memoize:Nb,negate:Hv,once:gR,overArgs:TR,partial:Zw,partialRight:NR,rearg:t4,rest:u4,spread:O4,throttle:iD,unary:gD,wrap:zD};var js={castArray:jL,clone:TP,cloneDeep:AP,cloneDeepWith:SP,cloneWith:MP,conformsTo:HP,eq:ih,gt:KI,gte:JI,isArguments:dd,isArray:Do,isArrayBuffer:m8,isArrayLike:jc,isArrayLikeObject:Su,isBoolean:g8,isBuffer:Kp,isDate:x8,isElement:b8,isEmpty:w8,isEqual:T8,isEqualWith:A8,isError:fy,isFinite:S8,isFunction:ap,isInteger:Bw,isLength:Mm,isMap:iw,isMatch:M8,isMatchWith:E8,isNaN:C8,isNative:L8,isNil:P8,isNull:I8,isNumber:Nw,isObject:kl,isObjectLike:Rl,isPlainObject:gv,isRegExp:By,isSafeInteger:F8,isSet:nw,isString:qm,isSymbol:Rf,isTypedArray:Ed,isUndefined:O8,isWeakMap:B8,isWeakSet:N8,lt:Z8,lte:Y8,toArray:qw,toFinite:sd,toInteger:Go,toLength:Cw,toNumber:Th,toPlainObject:xw,toSafeInteger:cD,toString:Ds};var _p={add:QC,ceil:qL,divide:fI,floor:NI,max:eR,maxBy:tR,mean:rR,meanBy:aR,min:sR,minBy:lR,multiply:uR,round:f4,subtract:V4,sum:G4,sumBy:H4};var __={clamp:GL,inRange:t8,random:JR};var dl={assign:Ok,assignIn:s_,assignInWith:Em,assignWith:Uk,at:sL,create:YP,defaults:eI,defaultsDeep:nI,entries:p_,entriesIn:d_,extend:s_,extendWith:Em,findKey:LI,findLastKey:II,forIn:qI,forInRight:VI,forOwn:GI,forOwnRight:HI,functions:XI,functionsIn:ZI,get:uy,has:QI,hasIn:Ey,invert:u8,invertBy:f8,invoke:h8,keys:du,keysIn:qc,mapKeys:K8,mapValues:J8,merge:iR,mergeWith:bw,omit:vR,omitBy:mR,pick:qR,pickBy:Hw,result:c4,set:g4,setWith:y4,toPairs:p_,toPairsIn:d_,transform:hD,unset:kD,update:LD,updateWith:PD,values:Ld,valuesIn:RD};var Id={at:FD,chain:Yb,commit:EP,lodash:_a,next:fR,plant:VR,reverse:BD,tap:J4,thru:Wv,toIterator:oD,toJSON:Wm,value:Wm,valueOf:Wm,wrapperChain:OD};var ju={camelCase:UL,capitalize:Wb,deburr:Xb,endsWith:gI,escape:Mw,escapeRegExp:TI,kebabCase:q8,lowerCase:W8,lowerFirst:X8,pad:zR,padEnd:FR,padStart:OR,parseInt:BR,repeat:s4,replace:l4,snakeCase:A4,split:F4,startCase:B4,startsWith:N4,template:aD,templateSettings:y_,toLower:sD,toUpper:fD,trim:pD,trimEnd:dD,trimStart:vD,truncate:mD,unescape:xD,upperCase:ID,upperFirst:hy,words:Zb};var ec={attempt:qb,bindAll:uL,cond:qP,conforms:GP,constant:$g,defaultTo:$P,flow:UI,flowRight:jI,identity:Fc,iteratee:U8,matches:$8,matchesProperty:Q8,method:nR,methodOf:oR,mixin:jw,noop:Yg,nthArg:pR,over:bR,overEvery:AR,overSome:SR,property:vw,propertyOf:GR,range:QR,rangeRight:e4,stubArray:yy,stubFalse:ay,stubObject:U4,stubString:j4,stubTrue:q4,times:nD,toPath:lD,uniqueId:CD};function Kfe(){var se=new Bl(this.__wrapped__);return se.__actions__=ff(this.__actions__),se.__dir__=this.__dir__,se.__filtered__=this.__filtered__,se.__iteratees__=ff(this.__iteratees__),se.__takeCount__=this.__takeCount__,se.__views__=ff(this.__views__),se}var WD=Kfe;function Jfe(){if(this.__filtered__){var se=new Bl(this);se.__dir__=-1,se.__filtered__=!0}else se=this.clone(),se.__dir__*=-1;return se}var XD=Jfe;var $fe=Math.max,Qfe=Math.min;function ehe(se,ge,Ye){for(var Pt=-1,vr=Ye.length;++Pt<vr;){var Zr=Ye[Pt],ka=Zr.size;switch(Zr.type){case"drop":se+=ka;break;case"dropRight":ge-=ka;break;case"take":ge=Qfe(ge,se+ka);break;case"takeRight":se=$fe(se,ge-ka);break}}return{start:se,end:ge}}var ZD=ehe;var the=1,rhe=2,ahe=Math.min;function ihe(){var se=this.__wrapped__.value(),ge=this.__dir__,Ye=Do(se),Pt=ge<0,vr=Ye?se.length:0,Zr=ZD(0,vr,this.__views__),ka=Zr.start,oi=Zr.end,ci=oi-ka,Ln=Pt?oi:ka-1,bn=this.__iteratees__,Fn=bn.length,Uo=0,ws=ahe(ci,this.__takeCount__);if(!Ye||!Pt&&vr==ci&&ws==ci)return a2(se,this.__actions__);var wo=[];e:for(;ci--&&Uo<ws;){Ln+=ge;for(var Ze=-1,Ws=se[Ln];++Ze<Fn;){var Yl=bn[Ze],cu=Yl.iteratee,nh=Yl.type,Eh=cu(Ws);if(nh==rhe)Ws=Eh;else if(!Eh){if(nh==the)continue e;break e}}wo[Uo++]=Ws}return wo}var YD=ihe;var nhe="4.17.21",ohe=2,she=1,lhe=3,$D=4294967295,uhe=Array.prototype,che=Object.prototype,QD=che.hasOwnProperty,KD=If?If.iterator:void 0,fhe=Math.max,JD=Math.min,WA=function(se){return function(ge,Ye,Pt){if(Pt==null){var vr=kl(Ye),Zr=vr&&du(Ye),ka=Zr&&Zr.length&&Um(Ye,Zr);(ka?ka.length:vr)||(Pt=Ye,Ye=ge,ge=this)}return se(ge,Ye,Pt)}}(jw);_a.after=Df.after;_a.ary=Df.ary;_a.assign=dl.assign;_a.assignIn=dl.assignIn;_a.assignInWith=dl.assignInWith;_a.assignWith=dl.assignWith;_a.at=dl.at;_a.before=Df.before;_a.bind=Df.bind;_a.bindAll=ec.bindAll;_a.bindKey=Df.bindKey;_a.castArray=js.castArray;_a.chain=Id.chain;_a.chunk=ds.chunk;_a.compact=ds.compact;_a.concat=ds.concat;_a.cond=ec.cond;_a.conforms=ec.conforms;_a.constant=ec.constant;_a.countBy=_c.countBy;_a.create=dl.create;_a.curry=Df.curry;_a.curryRight=Df.curryRight;_a.debounce=Df.debounce;_a.defaults=dl.defaults;_a.defaultsDeep=dl.defaultsDeep;_a.defer=Df.defer;_a.delay=Df.delay;_a.difference=ds.difference;_a.differenceBy=ds.differenceBy;_a.differenceWith=ds.differenceWith;_a.drop=ds.drop;_a.dropRight=ds.dropRight;_a.dropRightWhile=ds.dropRightWhile;_a.dropWhile=ds.dropWhile;_a.fill=ds.fill;_a.filter=_c.filter;_a.flatMap=_c.flatMap;_a.flatMapDeep=_c.flatMapDeep;_a.flatMapDepth=_c.flatMapDepth;_a.flatten=ds.flatten;_a.flattenDeep=ds.flattenDeep;_a.flattenDepth=ds.flattenDepth;_a.flip=Df.flip;_a.flow=ec.flow;_a.flowRight=ec.flowRight;_a.fromPairs=ds.fromPairs;_a.functions=dl.functions;_a.functionsIn=dl.functionsIn;_a.groupBy=_c.groupBy;_a.initial=ds.initial;_a.intersection=ds.intersection;_a.intersectionBy=ds.intersectionBy;_a.intersectionWith=ds.intersectionWith;_a.invert=dl.invert;_a.invertBy=dl.invertBy;_a.invokeMap=_c.invokeMap;_a.iteratee=ec.iteratee;_a.keyBy=_c.keyBy;_a.keys=du;_a.keysIn=dl.keysIn;_a.map=_c.map;_a.mapKeys=dl.mapKeys;_a.mapValues=dl.mapValues;_a.matches=ec.matches;_a.matchesProperty=ec.matchesProperty;_a.memoize=Df.memoize;_a.merge=dl.merge;_a.mergeWith=dl.mergeWith;_a.method=ec.method;_a.methodOf=ec.methodOf;_a.mixin=WA;_a.negate=Hv;_a.nthArg=ec.nthArg;_a.omit=dl.omit;_a.omitBy=dl.omitBy;_a.once=Df.once;_a.orderBy=_c.orderBy;_a.over=ec.over;_a.overArgs=Df.overArgs;_a.overEvery=ec.overEvery;_a.overSome=ec.overSome;_a.partial=Df.partial;_a.partialRight=Df.partialRight;_a.partition=_c.partition;_a.pick=dl.pick;_a.pickBy=dl.pickBy;_a.property=ec.property;_a.propertyOf=ec.propertyOf;_a.pull=ds.pull;_a.pullAll=ds.pullAll;_a.pullAllBy=ds.pullAllBy;_a.pullAllWith=ds.pullAllWith;_a.pullAt=ds.pullAt;_a.range=ec.range;_a.rangeRight=ec.rangeRight;_a.rearg=Df.rearg;_a.reject=_c.reject;_a.remove=ds.remove;_a.rest=Df.rest;_a.reverse=ds.reverse;_a.sampleSize=_c.sampleSize;_a.set=dl.set;_a.setWith=dl.setWith;_a.shuffle=_c.shuffle;_a.slice=ds.slice;_a.sortBy=_c.sortBy;_a.sortedUniq=ds.sortedUniq;_a.sortedUniqBy=ds.sortedUniqBy;_a.split=ju.split;_a.spread=Df.spread;_a.tail=ds.tail;_a.take=ds.take;_a.takeRight=ds.takeRight;_a.takeRightWhile=ds.takeRightWhile;_a.takeWhile=ds.takeWhile;_a.tap=Id.tap;_a.throttle=Df.throttle;_a.thru=Wv;_a.toArray=js.toArray;_a.toPairs=dl.toPairs;_a.toPairsIn=dl.toPairsIn;_a.toPath=ec.toPath;_a.toPlainObject=js.toPlainObject;_a.transform=dl.transform;_a.unary=Df.unary;_a.union=ds.union;_a.unionBy=ds.unionBy;_a.unionWith=ds.unionWith;_a.uniq=ds.uniq;_a.uniqBy=ds.uniqBy;_a.uniqWith=ds.uniqWith;_a.unset=dl.unset;_a.unzip=ds.unzip;_a.unzipWith=ds.unzipWith;_a.update=dl.update;_a.updateWith=dl.updateWith;_a.values=dl.values;_a.valuesIn=dl.valuesIn;_a.without=ds.without;_a.words=ju.words;_a.wrap=Df.wrap;_a.xor=ds.xor;_a.xorBy=ds.xorBy;_a.xorWith=ds.xorWith;_a.zip=ds.zip;_a.zipObject=ds.zipObject;_a.zipObjectDeep=ds.zipObjectDeep;_a.zipWith=ds.zipWith;_a.entries=dl.toPairs;_a.entriesIn=dl.toPairsIn;_a.extend=dl.assignIn;_a.extendWith=dl.assignInWith;WA(_a,_a);_a.add=_p.add;_a.attempt=ec.attempt;_a.camelCase=ju.camelCase;_a.capitalize=ju.capitalize;_a.ceil=_p.ceil;_a.clamp=__.clamp;_a.clone=js.clone;_a.cloneDeep=js.cloneDeep;_a.cloneDeepWith=js.cloneDeepWith;_a.cloneWith=js.cloneWith;_a.conformsTo=js.conformsTo;_a.deburr=ju.deburr;_a.defaultTo=ec.defaultTo;_a.divide=_p.divide;_a.endsWith=ju.endsWith;_a.eq=js.eq;_a.escape=ju.escape;_a.escapeRegExp=ju.escapeRegExp;_a.every=_c.every;_a.find=_c.find;_a.findIndex=ds.findIndex;_a.findKey=dl.findKey;_a.findLast=_c.findLast;_a.findLastIndex=ds.findLastIndex;_a.findLastKey=dl.findLastKey;_a.floor=_p.floor;_a.forEach=_c.forEach;_a.forEachRight=_c.forEachRight;_a.forIn=dl.forIn;_a.forInRight=dl.forInRight;_a.forOwn=dl.forOwn;_a.forOwnRight=dl.forOwnRight;_a.get=dl.get;_a.gt=js.gt;_a.gte=js.gte;_a.has=dl.has;_a.hasIn=dl.hasIn;_a.head=ds.head;_a.identity=Fc;_a.includes=_c.includes;_a.indexOf=ds.indexOf;_a.inRange=__.inRange;_a.invoke=dl.invoke;_a.isArguments=js.isArguments;_a.isArray=Do;_a.isArrayBuffer=js.isArrayBuffer;_a.isArrayLike=js.isArrayLike;_a.isArrayLikeObject=js.isArrayLikeObject;_a.isBoolean=js.isBoolean;_a.isBuffer=js.isBuffer;_a.isDate=js.isDate;_a.isElement=js.isElement;_a.isEmpty=js.isEmpty;_a.isEqual=js.isEqual;_a.isEqualWith=js.isEqualWith;_a.isError=js.isError;_a.isFinite=js.isFinite;_a.isFunction=js.isFunction;_a.isInteger=js.isInteger;_a.isLength=js.isLength;_a.isMap=js.isMap;_a.isMatch=js.isMatch;_a.isMatchWith=js.isMatchWith;_a.isNaN=js.isNaN;_a.isNative=js.isNative;_a.isNil=js.isNil;_a.isNull=js.isNull;_a.isNumber=js.isNumber;_a.isObject=kl;_a.isObjectLike=js.isObjectLike;_a.isPlainObject=js.isPlainObject;_a.isRegExp=js.isRegExp;_a.isSafeInteger=js.isSafeInteger;_a.isSet=js.isSet;_a.isString=js.isString;_a.isSymbol=js.isSymbol;_a.isTypedArray=js.isTypedArray;_a.isUndefined=js.isUndefined;_a.isWeakMap=js.isWeakMap;_a.isWeakSet=js.isWeakSet;_a.join=ds.join;_a.kebabCase=ju.kebabCase;_a.last=wf;_a.lastIndexOf=ds.lastIndexOf;_a.lowerCase=ju.lowerCase;_a.lowerFirst=ju.lowerFirst;_a.lt=js.lt;_a.lte=js.lte;_a.max=_p.max;_a.maxBy=_p.maxBy;_a.mean=_p.mean;_a.meanBy=_p.meanBy;_a.min=_p.min;_a.minBy=_p.minBy;_a.stubArray=ec.stubArray;_a.stubFalse=ec.stubFalse;_a.stubObject=ec.stubObject;_a.stubString=ec.stubString;_a.stubTrue=ec.stubTrue;_a.multiply=_p.multiply;_a.nth=ds.nth;_a.noop=ec.noop;_a.now=HA.now;_a.pad=ju.pad;_a.padEnd=ju.padEnd;_a.padStart=ju.padStart;_a.parseInt=ju.parseInt;_a.random=__.random;_a.reduce=_c.reduce;_a.reduceRight=_c.reduceRight;_a.repeat=ju.repeat;_a.replace=ju.replace;_a.result=dl.result;_a.round=_p.round;_a.sample=_c.sample;_a.size=_c.size;_a.snakeCase=ju.snakeCase;_a.some=_c.some;_a.sortedIndex=ds.sortedIndex;_a.sortedIndexBy=ds.sortedIndexBy;_a.sortedIndexOf=ds.sortedIndexOf;_a.sortedLastIndex=ds.sortedLastIndex;_a.sortedLastIndexBy=ds.sortedLastIndexBy;_a.sortedLastIndexOf=ds.sortedLastIndexOf;_a.startCase=ju.startCase;_a.startsWith=ju.startsWith;_a.subtract=_p.subtract;_a.sum=_p.sum;_a.sumBy=_p.sumBy;_a.template=ju.template;_a.times=ec.times;_a.toFinite=js.toFinite;_a.toInteger=Go;_a.toLength=js.toLength;_a.toLower=ju.toLower;_a.toNumber=js.toNumber;_a.toSafeInteger=js.toSafeInteger;_a.toString=js.toString;_a.toUpper=ju.toUpper;_a.trim=ju.trim;_a.trimEnd=ju.trimEnd;_a.trimStart=ju.trimStart;_a.truncate=ju.truncate;_a.unescape=ju.unescape;_a.uniqueId=ec.uniqueId;_a.upperCase=ju.upperCase;_a.upperFirst=ju.upperFirst;_a.each=_c.forEach;_a.eachRight=_c.forEachRight;_a.first=ds.head;WA(_a,function(){var se={};return cp(_a,function(ge,Ye){QD.call(_a.prototype,Ye)||(se[Ye]=ge)}),se}(),{chain:!1});_a.VERSION=nhe;(_a.templateSettings=ju.templateSettings).imports._=_a;Nh(["bind","bindKey","curry","curryRight","partial","partialRight"],function(se){_a[se].placeholder=_a});Nh(["drop","take"],function(se,ge){Bl.prototype[se]=function(Ye){Ye=Ye===void 0?1:fhe(Go(Ye),0);var Pt=this.__filtered__&&!ge?new Bl(this):this.clone();return Pt.__filtered__?Pt.__takeCount__=JD(Ye,Pt.__takeCount__):Pt.__views__.push({size:JD(Ye,$D),type:se+(Pt.__dir__<0?"Right":"")}),Pt},Bl.prototype[se+"Right"]=function(Ye){return this.reverse()[se](Ye).reverse()}});Nh(["filter","map","takeWhile"],function(se,ge){var Ye=ge+1,Pt=Ye==she||Ye==lhe;Bl.prototype[se]=function(vr){var Zr=this.clone();return Zr.__iteratees__.push({iteratee:bo(vr,3),type:Ye}),Zr.__filtered__=Zr.__filtered__||Pt,Zr}});Nh(["head","last"],function(se,ge){var Ye="take"+(ge?"Right":"");Bl.prototype[se]=function(){return this[Ye](1).value()[0]}});Nh(["initial","tail"],function(se,ge){var Ye="drop"+(ge?"":"Right");Bl.prototype[se]=function(){return this.__filtered__?new Bl(this):this[Ye](1)}});Bl.prototype.compact=function(){return this.filter(Fc)};Bl.prototype.find=function(se){return this.filter(se).head()};Bl.prototype.findLast=function(se){return this.reverse().find(se)};Bl.prototype.invokeMap=Ho(function(se,ge){return typeof se=="function"?new Bl(this):this.map(function(Ye){return xv(Ye,se,ge)})});Bl.prototype.reject=function(se){return this.filter(Hv(bo(se)))};Bl.prototype.slice=function(se,ge){se=Go(se);var Ye=this;return Ye.__filtered__&&(se>0||ge<0)?new Bl(Ye):(se<0?Ye=Ye.takeRight(-se):se&&(Ye=Ye.drop(se)),ge!==void 0&&(ge=Go(ge),Ye=ge<0?Ye.dropRight(-ge):Ye.take(ge-se)),Ye)};Bl.prototype.takeRightWhile=function(se){return this.reverse().takeWhile(se).reverse()};Bl.prototype.toArray=function(){return this.take($D)};cp(Bl.prototype,function(se,ge){var Ye=/^(?:filter|find|map|reject)|While$/.test(ge),Pt=/^(?:head|last)$/.test(ge),vr=_a[Pt?"take"+(ge=="last"?"Right":""):ge],Zr=Pt||/^find/.test(ge);vr&&(_a.prototype[ge]=function(){var ka=this.__wrapped__,oi=Pt?[1]:arguments,ci=ka instanceof Bl,Ln=oi[0],bn=ci||Do(ka),Fn=function(Yl){var cu=vr.apply(_a,Fp([Yl],oi));return Pt&&Uo?cu[0]:cu};bn&&Ye&&typeof Ln=="function"&&Ln.length!=1&&(ci=bn=!1);var Uo=this.__chain__,ws=!!this.__actions__.length,wo=Zr&&!Uo,Ze=ci&&!ws;if(!Zr&&bn){ka=Ze?ka:new Bl(this);var Ws=se.apply(ka,oi);return Ws.__actions__.push({func:Wv,args:[Fn],thisArg:void 0}),new Dp(Ws,Uo)}return wo&&Ze?se.apply(this,oi):(Ws=this.thru(Fn),wo?Pt?Ws.value()[0]:Ws.value():Ws)})});Nh(["pop","push","shift","sort","splice","unshift"],function(se){var ge=uhe[se],Ye=/^(?:push|sort|unshift)$/.test(se)?"tap":"thru",Pt=/^(?:pop|shift)$/.test(se);_a.prototype[se]=function(){var vr=arguments;if(Pt&&!this.__chain__){var Zr=this.value();return ge.apply(Do(Zr)?Zr:[],vr)}return this[Ye](function(ka){return ge.apply(Do(ka)?ka:[],vr)})}});cp(Bl.prototype,function(se,ge){var Ye=_a[ge];if(Ye){var Pt=Ye.name+"";QD.call(Tm,Pt)||(Tm[Pt]=[]),Tm[Pt].push({name:ge,func:Ye})}});Tm[ty(void 0,ohe).name]=[{name:"wrapper",func:void 0}];Bl.prototype.clone=WD;Bl.prototype.reverse=XD;Bl.prototype.value=YD;_a.prototype.at=Id.at;_a.prototype.chain=Id.wrapperChain;_a.prototype.commit=Id.commit;_a.prototype.next=Id.next;_a.prototype.plant=Id.plant;_a.prototype.reverse=Id.reverse;_a.prototype.toJSON=_a.prototype.valueOf=_a.prototype.value=Id.value;_a.prototype.first=_a.prototype.head;KD&&(_a.prototype[KD]=Id.toIterator);var Jc=_a;var Rd=lX(r7());window.PlotlyConfig={MathJaxConfig:"local"};var XA=class{constructor(ge,Ye){this.model=ge,this.serializers=Ye}get(ge){let Ye=this.serializers[ge],Pt=this.model.get(ge);return Ye?.deserialize?Ye.deserialize(Pt):Pt}set(ge,Ye){let Pt=this.serializers[ge];Pt?.serialize&&(Ye=Pt.serialize(Ye)),this.model.set(ge,Ye)}on(ge,Ye){this.model.on(ge,Ye)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(ge){if(ge==null){var Ye=this.model.get("_widget_data").length;ge=Jc.range(Ye)}return Array.isArray(ge)||(ge=[ge]),ge}do_data(){}do_layout(){}do_addTraces(){var ge=this.model.get("_py2js_addTraces");if(ge!==null){var Ye=this.model.get("_widget_data"),Pt=ge.trace_data;Jc.forEach(Pt,function(vr){Ye.push(vr)})}}do_deleteTraces(){var ge=this.model.get("_py2js_deleteTraces");if(ge!==null){var Ye=ge.delete_inds,Pt=this.model.get("_widget_data");Ye.slice().reverse().forEach(function(vr){Pt.splice(vr,1)})}}do_moveTraces(){var ge=this.model.get("_py2js_moveTraces");if(ge!==null){var Ye=this.model.get("_widget_data"),Pt=ge.current_trace_inds,vr=ge.new_trace_inds;mhe(Ye,Pt,vr)}}do_restyle(){var ge=this.model.get("_py2js_restyle");if(ge!==null){var Ye=ge.restyle_data,Pt=this._normalize_trace_indexes(ge.restyle_traces);i7(this.model.get("_widget_data"),Ye,Pt)}}do_relayout(){var ge=this.model.get("_py2js_relayout");ge!==null&&c2(this.model.get("_widget_layout"),ge.relayout_data)}do_update(){var ge=this.model.get("_py2js_update");if(ge!==null){var Ye=ge.style_data,Pt=ge.layout_data,vr=this._normalize_trace_indexes(ge.style_traces);i7(this.model.get("_widget_data"),Ye,vr),c2(this.model.get("_widget_layout"),Pt)}}do_animate(){var ge=this.model.get("_py2js_animate");if(ge!==null){for(var Ye=ge.style_data,Pt=ge.layout_data,vr=this._normalize_trace_indexes(ge.style_traces),Zr=0;Zr<Ye.length;Zr++){var ka=Ye[Zr],oi=vr[Zr],ci=this.model.get("_widget_data")[oi];c2(ci,ka)}c2(this.model.get("_widget_layout"),Pt)}}do_removeLayoutProps(){var ge=this.model.get("_py2js_removeLayoutProps");if(ge!==null){var Ye=ge.remove_props,Pt=this.model.get("_widget_layout");n7(Pt,Ye)}}do_removeTraceProps(){var ge=this.model.get("_py2js_removeTraceProps");if(ge!==null){var Ye=ge.remove_props,Pt=ge.remove_trace,vr=this.model.get("_widget_data")[Pt];n7(vr,Ye)}}},hhe={_widget_data:{deserialize:Vh,serialize:qh},_widget_layout:{deserialize:Vh,serialize:qh},_py2js_addTraces:{deserialize:Vh,serialize:qh},_py2js_deleteTraces:{deserialize:Vh,serialize:qh},_py2js_moveTraces:{deserialize:Vh,serialize:qh},_py2js_restyle:{deserialize:Vh,serialize:qh},_py2js_relayout:{deserialize:Vh,serialize:qh},_py2js_update:{deserialize:Vh,serialize:qh},_py2js_animate:{deserialize:Vh,serialize:qh},_py2js_removeLayoutProps:{deserialize:Vh,serialize:qh},_py2js_removeTraceProps:{deserialize:Vh,serialize:qh},_js2py_restyle:{deserialize:Vh,serialize:qh},_js2py_relayout:{deserialize:Vh,serialize:qh},_js2py_update:{deserialize:Vh,serialize:qh},_js2py_layoutDelta:{deserialize:Vh,serialize:qh},_js2py_traceDeltas:{deserialize:Vh,serialize:qh},_js2py_pointsCallback:{deserialize:Vh,serialize:qh}},ZA=class{constructor(ge,Ye){this.model=ge,this.el=Ye}perform_render(){var ge=this;this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Ye=this.model.get("_last_layout_edit_id"),Pt=this.model.get("_last_trace_edit_id");this.viewID=o7();var vr=Jc.cloneDeep(this.model.get("_widget_data")),Zr=Jc.cloneDeep(this.model.get("_widget_layout"));Zr.height||(Zr.height=360);var ka=this.model.get("_config");ka.editSelection=!1,Rd.default.newPlot(ge.el,vr,Zr,ka).then(function(){ge._sendTraceDeltas(Pt),ge._sendLayoutDelta(Ye),ge.el.on("plotly_restyle",function(ci){ge.handle_plotly_restyle(ci)}),ge.el.on("plotly_relayout",function(ci){ge.handle_plotly_relayout(ci)}),ge.el.on("plotly_update",function(ci){ge.handle_plotly_update(ci)}),ge.el.on("plotly_click",function(ci){ge.handle_plotly_click(ci)}),ge.el.on("plotly_hover",function(ci){ge.handle_plotly_hover(ci)}),ge.el.on("plotly_unhover",function(ci){ge.handle_plotly_unhover(ci)}),ge.el.on("plotly_selected",function(ci){ge.handle_plotly_selected(ci)}),ge.el.on("plotly_deselect",function(ci){ge.handle_plotly_deselect(ci)}),ge.el.on("plotly_doubleclick",function(ci){ge.handle_plotly_doubleclick(ci)});var oi=new CustomEvent("plotlywidget-after-render",{detail:{element:ge.el,viewID:ge.viewID}});document.dispatchEvent(oi)})}_processLuminoMessage(ge,Ye){Ye.apply(this,arguments);var Pt=this;switch(ge.type){case"before-attach":var vr={showgrid:!1,showline:!1,tickvals:[]};Rd.default.newPlot(Pt.el,[],{xaxis:vr,yaxis:vr}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var ge=this,Ye=ge.model.get("_widget_layout");(Jc.isNil(Ye)||Jc.isNil(Ye.width))&&Rd.default.Plots.resize(ge.el).then(function(){var Pt=ge.model.get("_last_layout_edit_id");ge._sendLayoutDelta(Pt)})}remove(){Rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Jc.mergeWith({},this.el._fullData,this.el.data,a7)}getFullLayout(){return Jc.mergeWith({},this.el._fullLayout,this.el.layout,a7)}buildPointsObject(ge){var Ye;if(ge.hasOwnProperty("points")){var Pt=ge.points,vr=Pt.length,Zr=!0;for(let bn=0;bn<vr&&(Zr=Zr&&Pt[bn].hasOwnProperty("pointNumbers"),!!Zr);bn++);var ka=vr;if(Zr){ka=0;for(let bn=0;bn<vr;bn++)ka+=Pt[bn].pointNumbers.length}if(Ye={trace_indexes:new Array(ka),point_indexes:new Array(ka),xs:new Array(ka),ys:new Array(ka)},Zr){for(var oi=0,ci=0;ci<vr;ci++)for(let Fn=0;Fn<Pt[ci].pointNumbers.length;Fn++,oi++)Ye.point_indexes[oi]=Pt[ci].pointNumbers[Fn],Ye.xs[oi]=Pt[ci].x,Ye.ys[oi]=Pt[ci].y,Ye.trace_indexes[oi]=Pt[ci].curveNumber;let bn=!0;for(let Fn=1;Fn<ka&&(bn=bn&&Ye.trace_indexes[Fn-1]===Ye.trace_indexes[Fn],!!bn);Fn++);bn&&Ye.point_indexes.sort(function(Fn,Uo){return Fn-Uo})}else for(var ci=0;ci<vr;ci++)Ye.trace_indexes[ci]=Pt[ci].curveNumber,Ye.point_indexes[ci]=Pt[ci].pointNumber,Ye.xs[ci]=Pt[ci].x,Ye.ys[ci]=Pt[ci].y;var Ln=Pt[0]!==void 0&&Pt[0].hasOwnProperty("z");if(Ln)for(Ye.zs=new Array(vr),ci=0;ci<vr;ci++)Ye.zs[ci]=Pt[ci].z;return Ye}else return null}buildInputDeviceStateObject(ge){var Ye=ge.event;if(Ye===void 0)return null;var Pt={alt:Ye.altKey,ctrl:Ye.ctrlKey,meta:Ye.metaKey,shift:Ye.shiftKey,button:Ye.button,buttons:Ye.buttons};return Pt}buildSelectorObject(ge){var Ye;return ge.hasOwnProperty("range")?Ye={type:"box",selector_state:{xrange:ge.range.x,yrange:ge.range.y}}:ge.hasOwnProperty("lassoPoints")?Ye={type:"lasso",selector_state:{xs:ge.lassoPoints.x,ys:ge.lassoPoints.y}}:Ye=null,Ye}handle_plotly_restyle(ge){if(ge!=null&&!(ge[0]&&ge[0].hasOwnProperty("_doNotReportToPy"))){var Ye=ge[0],Pt=ge[1],vr={style_data:Ye,style_traces:Pt,source_view_id:this.viewID};this.model.set("_js2py_restyle",vr),this.touch()}}touch(){this.model.save_changes()}handle_plotly_relayout(ge){if(ge!=null&&!ge.hasOwnProperty("_doNotReportToPy")){var Ye={relayout_data:ge,source_view_id:this.viewID};this.model.set("_js2py_relayout",Ye),this.touch()}}handle_plotly_update(ge){if(ge!=null&&!(ge.data&&ge.data[0].hasOwnProperty("_doNotReportToPy"))){var Ye={style_data:ge.data[0],style_traces:ge.data[1],layout_data:ge.layout,source_view_id:this.viewID};this.model.set("_js2py_update",Ye),this.touch()}}handle_plotly_click(ge){this._send_points_callback_message(ge,"plotly_click")}handle_plotly_hover(ge){this._send_points_callback_message(ge,"plotly_hover")}handle_plotly_unhover(ge){this._send_points_callback_message(ge,"plotly_unhover")}handle_plotly_selected(ge){this._send_points_callback_message(ge,"plotly_selected")}handle_plotly_deselect(ge){ge={points:[]},this._send_points_callback_message(ge,"plotly_deselect")}_send_points_callback_message(ge,Ye){if(ge!=null){var Pt={event_type:Ye,points:this.buildPointsObject(ge),device_state:this.buildInputDeviceStateObject(ge),selector:this.buildSelectorObject(ge)};Pt.points!==null&&Pt.points!==void 0&&(this.model.set("_js2py_pointsCallback",Pt),this.touch())}}handle_plotly_doubleclick(ge){}do_addTraces(){var ge=this.model.get("_py2js_addTraces");if(ge!==null){var Ye=this;Rd.default.addTraces(this.el,ge.trace_data).then(function(){Ye._sendTraceDeltas(ge.trace_edit_id);var Pt=ge.layout_edit_id;Ye._sendLayoutDelta(Pt)})}}do_deleteTraces(){var ge=this.model.get("_py2js_deleteTraces");if(ge!==null){var Ye=ge.delete_inds,Pt=this;Rd.default.deleteTraces(this.el,Ye).then(function(){var vr=ge.trace_edit_id;Pt._sendTraceDeltas(vr);var Zr=ge.layout_edit_id;Pt._sendLayoutDelta(Zr)})}}do_moveTraces(){var ge=this.model.get("_py2js_moveTraces");if(ge!==null){var Ye=ge.current_trace_inds,Pt=ge.new_trace_inds,vr=Jc.isEqual(Ye,Pt);vr||Rd.default.moveTraces(this.el,Ye,Pt)}}do_restyle(){var ge=this.model.get("_py2js_restyle");if(ge!==null){var Ye=ge.restyle_data,Pt=this.model._normalize_trace_indexes(ge.restyle_traces);Ye._doNotReportToPy=!0,Rd.default.restyle(this.el,Ye,Pt),this._sendTraceDeltas(ge.trace_edit_id);var vr=ge.layout_edit_id;this._sendLayoutDelta(vr)}}do_relayout(){var ge=this.model.get("_py2js_relayout");if(ge!==null){if(ge.source_view_id!==this.viewID){var Ye=ge.relayout_data;Ye._doNotReportToPy=!0,Rd.default.relayout(this.el,ge.relayout_data)}var Pt=ge.layout_edit_id;this._sendLayoutDelta(Pt)}}do_update(){var ge=this.model.get("_py2js_update");if(ge!==null){var Ye=ge.style_data||{},Pt=ge.layout_data||{},vr=this.model._normalize_trace_indexes(ge.style_traces);Ye._doNotReportToPy=!0,Rd.default.update(this.el,Ye,Pt,vr),this._sendTraceDeltas(ge.trace_edit_id);var Zr=ge.layout_edit_id;this._sendLayoutDelta(Zr)}}do_animate(){var ge=this.model.get("_py2js_animate");if(ge!==null){var Ye=ge.animation_opts,Pt=ge.style_data,vr=ge.layout_data,Zr=this.model._normalize_trace_indexes(ge.style_traces),ka={data:Pt,layout:vr,traces:Zr};ka._doNotReportToPy=!0;var oi=this;Rd.default.animate(this.el,ka,Ye).then(function(){oi._sendTraceDeltas(ge.trace_edit_id);var ci=ge.layout_edit_id;oi._sendLayoutDelta(ci)})}}_sendLayoutDelta(ge){var Ye=x_(this.getFullLayout(),this.model.get("_widget_layout")),Pt={layout_delta:Ye,layout_edit_id:ge};this.model.set("_js2py_widget_layoutDelta",Pt),this.touch()}_sendTraceDeltas(ge){for(var Ye=this.model.get("_widget_data"),Pt=Jc.range(Ye.length),vr=new Array(Pt.length),Zr=this.getFullData(),ka=0;ka<Pt.length;ka++){var oi=Pt[ka];vr[ka]=x_(Zr[oi],Ye[oi])}var ci={trace_deltas:vr,trace_edit_id:ge};this.model.set("_js2py_traceDeltas",ci),this.touch()}},phe={int8:Int8Array,int16:Int16Array,int32:Int32Array,uint8:Uint8Array,uint16:Uint16Array,uint32:Uint32Array,float32:Float32Array,float64:Float64Array};function dhe(se){var ge;if(se instanceof Int8Array)ge="int8";else if(se instanceof Int16Array)ge="int16";else if(se instanceof Int32Array)ge="int32";else if(se instanceof Uint8Array)ge="uint8";else if(se instanceof Uint16Array)ge="uint16";else if(se instanceof Uint32Array)ge="uint32";else if(se instanceof Float32Array)ge="float32";else if(se instanceof Float64Array)ge="float64";else return se;var Ye={dtype:ge,shape:[se.length],value:se.buffer};return Ye}function qh(se,ge){var Ye;if(Jc.isTypedArray(se))Ye=dhe(se);else if(Array.isArray(se)){Ye=new Array(se.length);for(var Pt=0;Pt<se.length;Pt++)Ye[Pt]=qh(se[Pt])}else if(Jc.isObject(se)){Ye={};for(var vr in se)se.hasOwnProperty(vr)&&(Ye[vr]=qh(se[vr]))}else se===void 0?Ye="_undefined_":Ye=se;return Ye}function Vh(se,ge){var Ye;if(Array.isArray(se)){Ye=new Array(se.length);for(var Pt=0;Pt<se.length;Pt++)Ye[Pt]=Vh(se[Pt])}else if(Jc.isObject(se))if((Jc.has(se,"value")||Jc.has(se,"buffer"))&&Jc.has(se,"dtype")&&Jc.has(se,"shape")){var vr=phe[se.dtype],Zr=Jc.has(se,"value")?se.value.buffer:se.buffer.buffer;Ye=new vr(Zr)}else{Ye={};for(var ka in se)se.hasOwnProperty(ka)&&(Ye[ka]=Vh(se[ka]))}else se==="_undefined_"?Ye=void 0:Ye=se;return Ye}function vhe(se){return ArrayBuffer.isView(se)&&!(se instanceof DataView)}function a7(se,ge,Ye){if(Ye[0]==="_")return null;if(vhe(ge))return ge}function c2(se,ge){for(var Ye in ge)if(ge.hasOwnProperty(Ye)){var Pt=ge[Ye];Pt===null?Jc.unset(se,Ye):Jc.set(se,Ye,Pt)}}function i7(se,ge,Ye){for(var Pt in ge)if(ge.hasOwnProperty(Pt)){var vr=ge[Pt];Array.isArray(vr)||(vr=[vr]);for(var Zr=0;Zr<Ye.length;Zr++){var ka=Ye[Zr],oi=se[ka],ci=vr[Zr%vr.length];ci===null?Jc.unset(oi,Pt):ci!==void 0&&Jc.set(oi,Pt,ci)}}}function mhe(se,ge,Ye){for(var Pt=[],vr=ge.length-1;vr>=0;vr--)Pt.splice(0,0,se[ge[vr]]),se.splice(ge[vr],1);var Zr=Jc(Ye).zip(Pt).sortBy(0).unzip().value();Ye=Zr[0],Pt=Zr[1];for(var ka=0;ka<Ye.length;ka++)se.splice(Ye[ka],0,Pt[ka])}function n7(se,ge){for(var Ye=0;Ye<ge.length;Ye++){var Pt=ge[Ye];Jc.unset(se,Pt)}}function x_(se,ge){var Ye;Array.isArray(se)?Ye=new Array(se.length):Ye={},ge==null&&(ge={});for(var Pt in se)if(Pt[0]!=="_"&&se.hasOwnProperty(Pt)&&se[Pt]!==null){var vr;if(vr=Jc.isEqual(se[Pt],ge[Pt]),!vr||Pt==="uid"){var Zr=se[Pt];if(ge.hasOwnProperty(Pt)&&typeof Zr=="object")if(Array.isArray(Zr))if(Zr.length>0&&typeof Zr[0]=="object"){Ye[Pt]=new Array(Zr.length);for(var ka=0;ka<Zr.length;ka++)!Array.isArray(ge[Pt])||ge[Pt].length<=ka?Ye[Pt][ka]=Zr[ka]:Ye[Pt][ka]=x_(Zr[ka],ge[Pt][ka])}else Ye[Pt]=Zr;else{var oi=x_(Zr,ge[Pt]);Object.keys(oi).length>0&&(Ye[Pt]=oi)}else typeof Zr=="object"&&!Array.isArray(Zr)?Ye[Pt]=x_(Zr,{}):Zr!==void 0&&typeof Zr!="function"&&(Ye[Pt]=Zr)}}return Ye}function o7(se,ge,Ye,Pt){if(Ye||(Ye=16),ge===void 0&&(ge=24),ge<=0)return"0";var vr=Math.log(Math.pow(2,ge))/Math.log(Ye),Zr="",ka,oi,ci;for(ka=2;vr===1/0;ka*=2)vr=Math.log(Math.pow(2,ge/ka))/Math.log(Ye)*ka;var Ln=vr-Math.floor(vr);for(ka=0;ka<Math.floor(vr);ka++)ci=Math.floor(Math.random()*Ye).toString(Ye),Zr=ci+Zr;Ln&&(oi=Math.pow(Ye,Ln),ci=Math.floor(Math.random()*oi).toString(Ye),Zr=ci+Zr);var bn=parseInt(Zr,Ye);return se&&se[Zr]||bn!==1/0&&bn>=Math.pow(2,ge)?Pt>10?(console.warn("randstr failed uniqueness"),Zr):o7(se,ge,Ye,(Pt||0)+1):Zr}var SHe=()=>{let se;return{initialize(ge){se=new XA(ge.model,hhe),se.initialize()},render({el:ge}){let Ye=new ZA(se,ge);return Ye.perform_render(),()=>Ye.remove()}}};export{XA as FigureModel,ZA as FigureView,SHe as default};
/*! Bundled license information:
plotly.js/dist/plotly.js:
(*!
* 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
*)
*)
lodash-es/lodash.default.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
lodash-es/lodash.js:
(**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="es" -o ./`
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
*/